41#define SLICE_MAX_START_CODE 0x000001af
42#define EXT_START_CODE 0x000001b5
43#define USER_START_CODE 0x000001b2
44#define CAVS_START_CODE 0x000001b0
45#define PIC_I_START_CODE 0x000001b3
46#define PIC_PB_START_CODE 0x000001b6
312#define CAVS_DIR_MV (cavs_vector){ 0, 0, 1, REF_DIR, 0 }
315#define CAVS_INTRA_MV (cavs_vector){ 0, 0, 1, REF_INTRA, 0 }
337 memcpy(mvd[
MV_STRIDE ], mvd[0],
sizeof(*mvd));
338 memcpy(mvd[
MV_STRIDE+1], mvd[0],
sizeof(*mvd));
341 memcpy(mvd[1], mvd[0],
sizeof(*mvd));
344 memcpy(mvd[
MV_STRIDE], mvd[0],
sizeof(*mvd));
Libavcodec external API header.
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
int ff_cavs_init_pic(AVSContext *h)
void ff_cavs_set_mb_row(AVSContext *h)
Point the macroblock sample pointers at macroblock row h->mby, addressed inside the macroblock's own ...
const uint8_t ff_cavs_chroma_qp[64]
int ff_cavs_next_mb(AVSContext *h)
save predictors for later macroblocks and increase macroblock address
void ff_cavs_load_intra_pred_chroma(AVSContext *h)
static void set_mvds(int16_t(*mvd)[2], enum cavs_block size)
replicate one partition's mv_diff over the 8x8 blocks it covers
static void set_mvs(cavs_vector *mv, enum cavs_block size)
void ff_cavs_load_intra_pred_luma(AVSContext *h, uint8_t *top, uint8_t **left, int block)
void ff_cavs_mv(AVSContext *h, enum cavs_mv_loc nP, enum cavs_mv_loc nC, enum cavs_mv_pred mode, enum cavs_block size, int ref)
void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type)
void ff_cavs_modify_mb_i(AVSContext *h, int *pred_mode_uv)
const uint8_t ff_cavs_partition_flags[30]
int ff_cavs_init_top_lines(AVSContext *h)
some predictions require data from the top-neighbouring macroblock.
int ff_cavs_init(AVCodecContext *avctx)
int ff_cavs_end(AVCodecContext *avctx)
void ff_cavs_init_mb(AVSContext *h)
initialise predictors for motion vectors and intra prediction
void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type)
in-loop deblocking filter for a single macroblock
Chinese AVS video (AVS1-P16, Broadcasting profile) AEC decoder.
reference-counted frame API
bitstream reader API header.
static const int8_t mv[256][2]
Macro definitions for various function/variable attributes.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
main external API structure.
This structure describes decoded (raw) audio or video data.
uint16_t direct_den[512]
16384 / BlockDistanceRef of clause 9.9.1 b) 3), indexed by the co-located block's own distance,...
int aec_enable
the macroblock layer uses AEC (AVS1-P16)
int pic_data_end
a unit that is not a slice ended the picture's data
unsigned int stc_offset_size
void(* intra_pred_c[7])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride)
AVSFrame DPB[2]
reference frames
int mbidx
macroblock coordinates
int parity
first line of the reference field inside it
uint8_t permutated_scantable[64]
int16_t mvd[2 *4 *3][2]
mv_diff of the same blocks, for the ctxIdxInc of clause 8.4.4.2 g)
uint8_t * cv
current MB sample pointers
const uint8_t * scantable
the one of the two the current picture uses, selected in decode_pic()
int b_field_enhanced
BFieldEnhanced of the picture, clause 9.9.1 b)
AVSFrame cur
currently decoded frame
uint8_t left_border_y[26]
int field_mby
macroblock row of the current macroblock in it
int left_c_pred_mode
IntraChromaPredMode to the left, 8.4.4.2 e)
int stream_revision
0 for samples from 2006, 1 for rm52j encoder
uint8_t permutated_scantable_field[64]
inverse block scan method 2 of clause 9.5.3 c), for field pictures
int ref_base[2]
first entry of the forward and the backward list
int top_field_first
first coded field is the top one, clause 7.2.3
uint8_t * top_cbp
MbCBP of the macroblock above, one per column.
uint8_t * top_c_pred_mode
IntraChromaPredMode above, per column.
uint8_t * top_border_y
intra prediction is done with un-deblocked samples they are saved here before deblocking the MB
uint8_t intern_border_y[26]
CAVSAECContext aec
AEC decoder state and contexts, clause 8.4.
void(* intra_pred_l[8])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride)
H264ChromaContext h264chroma
int field
field of the current MB, 0 or 1, clause 3.24
uint8_t * edge_emu_buffer
uint8_t * top_mb_type
MbType above, one per column.
int left_cbp
MbCBP of the macroblock to the left.
int dist[4]
BlockDistance of every reference, clause 9.4.6.1.
AVFrame * f
frame the reference belongs to
uint8_t left_border_u[10]
uint32_t * stc_offset
byte offsets in deemulated_buf at which a start code prefix of the original payload begins
int p_field_skip
PFieldSkip of the picture, clause 9.9.1 a)
uint8_t left_border_v[10]
uint8_t * deemulated_buf
picture payload with the annex A pseudo start codes removed, allocated only for the pictures that car...
int aec_start
byte offset of the current AEC slice's payload
int flags
availability flags of neighbouring macroblocks
cavs_vector mv[2 *4 *3]
mv motion vector cache 0: D3 B2 B3 C2 4: A1 X0 X1 - 8: A3 X2 X3 -
int left_mb_type
MbType to the left, clause 8.4.4.2 b)
int pred_mode_Y[3 *3]
luma pred mode cache 0: – B2 B3 3: A1 X0 X1 6: A3 X2 X3
unsigned int deemulated_buf_size
int prev_delta_qp
PreviousDeltaQP of clause 9.4.8, an AEC context.
int skip_mode_flag
select between skip_count or one skip_flag per MB
int scale_den[4]
512 / dist[], for scaling neighbouring MVs (clause 9.4.6.2 step 3)
int16_t ref_idx
mb_reference_index of the block, 0 when it codes none (clause 9.4.5); ref above is where the referenc...
static int ref[MAX_W *MAX_W]
Core video DSP helper functions.