22 #ifndef AVCODEC_CAVS_H
23 #define AVCODEC_CAVS_H
29 #define SLICE_MAX_START_CODE 0x000001af
30 #define EXT_START_CODE 0x000001b5
31 #define USER_START_CODE 0x000001b2
32 #define CAVS_START_CODE 0x000001b0
33 #define PIC_I_START_CODE 0x000001b3
34 #define PIC_PB_START_CODE 0x000001b6
44 #define ESCAPE_CODE 59
55 #define MV_BWD_OFFS 12
175 uint8_t *
cy, *cu, *cv;
199 int pred_mode_Y[3*3];
211 uint8_t left_border_y[26], left_border_u[10], left_border_v[10];
212 uint8_t intern_border_y[26];
215 void (*intra_pred_l[8])(uint8_t *d,uint8_t *top,uint8_t *left,
int stride);
216 void (*intra_pred_c[7])(uint8_t *d,uint8_t *top,uint8_t *left,
int stride);
244 static inline void modify_pred(
const int8_t *mod_table,
int *mode)
246 *mode = mod_table[*mode];
287 DCTELEM *dst,
int mul,
int shift,
int coeff_num) {
288 int round = 1 << (shift - 1);
293 while(--coeff_num >= 0){
294 pos += run_buf[coeff_num];
297 "position out of block bounds at pic %d MB(%d,%d)\n",
301 dst[scantab[pos]] = (level_buf[coeff_num]*mul +
round) >> shift;
const struct dec_2dvlc ff_cavs_chroma_dec[5]
const cavs_vector ff_cavs_intra_mv
mark block as using intra prediction
const int8_t ff_top_modifier_c[7]
int mbidx
macroblock coordinates
const uint8_t ff_cavs_chroma_qp[64]
#define DECLARE_ALIGNED(n, t, v)
const cavs_vector ff_cavs_un_mv
mark block as unavailable, i.e.
void ff_cavs_modify_mb_i(AVSContext *h, int *pred_mode_uv)
static const uint8_t scantab[64]
static int dequant(AVSContext *h, DCTELEM *level_buf, uint8_t *run_buf, DCTELEM *dst, int mul, int shift, int coeff_num)
void ff_cavs_init_mb(AVSContext *h)
initialise predictors for motion vectors and intra prediction
static void modify_pred(const int8_t *mod_table, int *mode)
int ff_cavs_init(AVCodecContext *avctx)
void ff_cavs_load_intra_pred_luma(AVSContext *h, uint8_t *top, uint8_t **left, int block)
uint8_t * top_border_y
intra prediction is done with un-deblocked samples they are saved here before deblocking the MB ...
cavs_vector mv[2 *4 *3]
mv motion vector cache 0: D3 B2 B3 C2 4: A1 X0 X1 - 8: A3 X2 X3 -
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)
const uint8_t ff_cavs_scan3x3[4]
const struct dec_2dvlc ff_cavs_intra_dec[7]
int ff_cavs_end(AVCodecContext *avctx)
const int8_t ff_left_modifier_c[7]
void av_log(void *avcl, int level, const char *fmt,...)
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)
int skip_mode_flag
select between skip_count or one skip_flag per MB
void ff_cavs_init_top_lines(AVSContext *h)
some predictions require data from the top-neighbouring macroblock.
int stream_revision
0 for samples from 2006, 1 for rm52j encoder
const int8_t ff_top_modifier_l[8]
const uint8_t ff_cavs_partition_flags[30]
void ff_cavs_init_pic(AVSContext *h)
Picture picture
currently decoded frame
const cavs_vector ff_cavs_dir_mv
mark block as "no prediction from this direction" e.g.
const uint8_t ff_cavs_dequant_shift[64]
static const int8_t mv[256][2]
void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type)
main external API structure.
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
int sym_factor
for scaling in symmetrical B block
int pred_mode_Y[3 *3]
luma pred mode cache 0: – B2 B3 3: A1 X0 X1 6: A3 X2 X3
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const int8_t ff_left_modifier_l[8]
void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type)
in-loop deblocking filter for a single macroblock
struct AVCodecContext * avctx
const struct dec_2dvlc ff_cavs_inter_dec[7]
int flags
availability flags of neighbouring macroblocks
Decoded Picture Buffer (DPB).
static void set_mv_intra(AVSContext *h)
const uint16_t ff_cavs_dequant_mul[64]
static void set_mvs(cavs_vector *mv, enum cavs_block size)
static void set_intra_mode_default(AVSContext *h)