26 #ifndef AVCODEC_VP56_H
27 #define AVCODEC_VP56_H
42 #define VP56_SIZE_CHANGE 1
47 int offset1,
int offset2,
int stride,
54 int buf_size,
int *golden_frame);
77 uint8_t coeff_reorder[64];
78 uint8_t coeff_index_to_pos[64];
79 uint8_t vector_sig[2];
80 uint8_t vector_dct[2];
81 uint8_t vector_pdi[2][2];
82 uint8_t vector_pdv[2][7];
83 uint8_t vector_fdv[2][8];
84 uint8_t coeff_dccv[2][11];
85 uint8_t coeff_ract[2][3][6][11];
86 uint8_t coeff_acct[2][3][3][6][5];
87 uint8_t coeff_dcct[2][36][5];
88 uint8_t coeff_runv[2][14];
89 uint8_t mb_type[3][10][10];
90 uint8_t mb_types_stats[3][10][2];
200 code_word |= bytestream_get_be16(&c->
buffer) <<
bits;
213 #ifndef vp56_rac_get_prob
214 #define vp56_rac_get_prob vp56_rac_get_prob
218 unsigned int low = 1 + (((c->
high - 1) * prob) >> 8);
219 unsigned int low_shift = low << 16;
220 int bit = code_word >= low_shift;
222 c->
high = bit ? c->
high - low : low;
223 c->
code_word = bit ? code_word - low_shift : code_word;
229 #ifndef vp56_rac_get_prob_branchy
234 unsigned low = 1 + (((c->
high - 1) * prob) >> 8);
235 unsigned low_shift = low << 16;
237 if (code_word >= low_shift) {
253 int low = (c->
high + 1) >> 1;
254 unsigned int low_shift = low << 16;
255 int bit = code_word >= low_shift;
258 code_word -= low_shift;
327 const uint8_t *probs)
329 while (tree->
val > 0) {
345 const uint8_t *probs,
int i)
358 const uint8_t *probs)
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_always_inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t(*tree)[2], const uint8_t *probs)
void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
VP56ParseCoeffModels parse_coeff_models
VP56mv vector_candidate[2]
#define DECLARE_ALIGNED(n, t, v)
void(* VP56DefaultModelsInit)(VP56Context *s)
uint8_t * edge_emu_buffer_alloc
void ff_vp56_init_dequant(VP56Context *s, int quantizer)
VP56ParseCoeff parse_coeff
bitstream reader API header.
static av_always_inline int vp56_rac_get_tree(VP56RangeCoder *c, const VP56Tree *tree, const uint8_t *probs)
VP56ParseVectorAdjustment parse_vector_adjustment
static const uint16_t mask[17]
static av_always_inline int vp56_rac_get(VP56RangeCoder *c)
DCTELEM block_coeff[6][64]
VP56Macroblock * macroblocks
VP56ParseVectorModels parse_vector_models
const uint8_t * vp56_coord_div
int(* VP56ParseHeader)(VP56Context *s, const uint8_t *buf, int buf_size, int *golden_frame)
VP5 and VP6 compatible video decoder (common data)
static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
static av_unused int vp8_rac_get_sint(VP56RangeCoder *c, int bits)
int(* VP56ParseCoeffModels)(VP56Context *s)
uint8_t coeff_ctx_last[4]
static av_unused int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
int sample_variance_threshold
VP56DefaultModelsInit default_models_init
#define vp56_rac_get_prob
static const int8_t mv[256][2]
static av_always_inline int vp56_rac_get_prob_branchy(VP56RangeCoder *c, int prob)
main external API structure.
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c)
int ff_vp56_free(AVCodecContext *avctx)
void(* VP56ParseVectorAdjustment)(VP56Context *s, VP56mv *vect)
static av_always_inline int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob)
void(* VP56ParseCoeff)(VP56Context *s)
VP56ParseHeader parse_header
const uint8_t ff_vp56_norm_shift[256]
vp56 specific range coder implementation
void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size)
static av_always_inline int vp8_rac_get_tree_with_offset(VP56RangeCoder *c, const int8_t(*tree)[2], const uint8_t *probs, int i)
This is identical to vp8_rac_get_tree except for the possibility of starting on a node other than the...
uint8_t * edge_emu_buffer
static void flip(AVCodecContext *avctx, AVPicture *picture)
static av_always_inline int vp8_rac_get(VP56RangeCoder *c)
static av_unused int vp56_rac_gets(VP56RangeCoder *c, int bits)
void(* VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src, int offset1, int offset2, int stride, VP56mv mv, int mask, int select, int luma)
static av_unused int vp8_rac_get_nn(VP56RangeCoder *c)
unsigned int nb_null[2][2]
void(* VP56ParseVectorModels)(VP56Context *s)