12#ifndef AOM_AV1_ENCODER_BITSTREAM_H_
13#define AOM_AV1_ENCODER_BITSTREAM_H_
23#include "av1/common/av1_common_int.h"
24#include "av1/common/blockd.h"
26#include "av1/encoder/level.h"
27#include "aom_dsp/bitwriter.h"
28#include "aom_util/aom_pthread.h"
30struct aom_write_bit_buffer;
44 uint8_t *frame_header;
45 size_t obu_header_byte_offset;
50 struct aom_write_bit_buffer *saved_wb;
54 uint8_t *tile_data_curr;
56 uint8_t obu_extn_header;
57 uint32_t obu_header_size;
62 int is_last_tile_in_tg;
67 uint64_t abs_sum_level;
75 pthread_mutex_t *mutex_;
78 PackBSTileOrder pack_bs_tile_order[MAX_TILES];
92uint32_t av1_write_sequence_header_obu(
const SequenceHeader *seq_params,
93 uint8_t *
const dst,
size_t dst_size);
98uint32_t av1_write_obu_header(AV1LevelParams *
const level_params,
99 int *frame_header_count,
OBU_TYPE obu_type,
100 bool has_nonzero_operating_point_idc,
101 int obu_extension, uint8_t *
const dst);
106int av1_write_uleb_obu_size(
size_t obu_payload_size, uint8_t *dest,
110int av1_write_uleb_obu_size_unsafe(
size_t obu_payload_size, uint8_t *dest);
114void av1_pack_tile_info(
struct AV1_COMP *
const cpi,
struct ThreadData *
const td,
115 PackBSParams *
const pack_bs_params);
117void av1_write_last_tile_info(
118 struct AV1_COMP *
const cpi,
const FrameHeaderInfo *fh_info,
119 struct aom_write_bit_buffer *saved_wb,
size_t *curr_tg_data_size,
120 uint8_t *curr_tg_start, uint32_t *
const total_size,
121 uint8_t **tile_data_start,
int *
const largest_tile_id,
122 int *
const is_first_tg, uint32_t obu_header_size, uint8_t obu_extn_header);
130 size_t dst_size,
size_t *size,
131 int *
const largest_tile_id);
134 TX_TYPE tx_type, TX_SIZE tx_size, aom_writer *w);
136void av1_reset_pack_bs_thread_data(
struct ThreadData *
const td);
138void av1_accumulate_pack_bs_thread_data(
struct AV1_COMP *
const cpi,
139 struct ThreadData
const *td);
141void av1_write_obu_tg_tile_headers(
struct AV1_COMP *
const cpi,
143 PackBSParams *
const pack_bs_params,
146int av1_neg_interleave(
int x,
int ref,
int max);
OBU_TYPE
OBU types.
Definition aom_codec.h:562
int av1_pack_bitstream(struct AV1_COMP *const cpi, uint8_t *dst, size_t dst_size, size_t *size, int *const largest_tile_id)
Pack the bitstream for one frame.
Top level common structure used by both encoder and decoder.
Definition av1_common_int.h:757
Top level encoder structure.
Definition encoder.h:2870
Variables related to current coding block.
Definition blockd.h:570