22 #ifndef AVCODEC_CAVS_H 23 #define AVCODEC_CAVS_H 27 #include "h264chroma.h" 32 #define SLICE_MAX_START_CODE 0x000001af 33 #define EXT_START_CODE 0x000001b5 34 #define USER_START_CODE 0x000001b2 35 #define CAVS_START_CODE 0x000001b0 36 #define PIC_I_START_CODE 0x000001b3 37 #define PIC_PB_START_CODE 0x000001b6 47 #define ESCAPE_CODE 59 58 #define MV_BWD_OFFS 12 83 enum cavs_intra_luma {
94 enum cavs_intra_chroma {
131 MV_BWD_D3 = MV_BWD_OFFS,
138 MV_BWD_A3 = MV_BWD_OFFS+8,
152 int8_t level_add[27];
177 int mb_width, mb_height;
183 int loop_filter_disable;
184 int alpha_offset, beta_offset;
189 uint8_t *cy, *cu, *
cv;
205 cavs_vector mv[2*4*3];
206 cavs_vector *top_mv[2];
213 int pred_mode_Y[3*3];
215 ptrdiff_t l_stride, c_stride;
226 uint8_t left_border_y[26], left_border_u[10], left_border_v[10];
227 uint8_t intern_border_y[26];
228 uint8_t topleft_border_y, topleft_border_u, topleft_border_v;
230 void (*intra_pred_l[8])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride);
231 void (*intra_pred_c[7])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride);
232 uint8_t *col_type_base;
239 uint8_t *edge_emu_buffer;
245 extern const uint8_t ff_cavs_chroma_qp[64];
246 extern const uint8_t ff_cavs_partition_flags[30];
247 extern const cavs_vector ff_cavs_intra_mv;
248 extern const cavs_vector ff_cavs_dir_mv;
250 static inline void set_mvs(cavs_vector *mv,
enum cavs_block size) {
253 mv[MV_STRIDE ] = mv[0];
254 mv[MV_STRIDE+1] = mv[0];
259 mv[MV_STRIDE] = mv[0];
265 void ff_cavs_load_intra_pred_luma(
AVSContext *h, uint8_t *top, uint8_t **left,
267 void ff_cavs_load_intra_pred_chroma(
AVSContext *h);
268 void ff_cavs_modify_mb_i(
AVSContext *h,
int *pred_mode_uv);
269 void ff_cavs_inter(
AVSContext *h,
enum cavs_mb mb_type);
270 void ff_cavs_mv(
AVSContext *h,
enum cavs_mv_loc nP,
enum cavs_mv_loc nC,
271 enum cavs_mv_pred
mode,
enum cavs_block size,
int ref);
Definition: videodsp.h:41
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
int mbidx
macroblock coordinates
Definition: cavs.h:186
Scantable.
Definition: idctdsp.h:31
void ff_cavs_init_mb(AVSContext *h)
initialise predictors for motion vectors and intra prediction
Definition: cavs.c:637
uint8_t * top_border_y
intra prediction is done with un-deblocked samples they are saved here before deblocking the MB ...
Definition: cavs.h:225
Definition: h264chroma.h:27
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:120
bitstream reader API header.
void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type)
in-loop deblocking filter for a single macroblock
Definition: cavs.c:109
AVSFrame cur
currently decoded frame
Definition: cavs.h:171
int ff_cavs_next_mb(AVSContext *h)
save predictors for later macroblocks and increase macroblock address
Definition: cavs.c:678
int skip_mode_flag
select between skip_count or one skip_flag per MB
Definition: cavs.h:182
uint8_t * cv
current MB sample pointers
Definition: cavs.h:189
int stream_revision
0 for samples from 2006, 1 for rm52j encoder
Definition: cavs.h:179
int ff_cavs_init_top_lines(AVSContext *h)
some predictions require data from the top-neighbouring macroblock.
Definition: cavs.c:759
Definition: blockdsp.h:35
main external API structure.
Definition: avcodec.h:1518
int sym_factor
for scaling in symmetrical B block
Definition: cavs.h:235
int stc
last start code
Definition: cavs.h:188
Definition: get_bits.h:56
int flags
availability flags of neighbouring macroblocks
Definition: cavs.h:187
Core video DSP helper functions.
Decoded Picture Buffer (DPB).
Definition: vaapi_h264.c:82
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83