26 #ifndef AVCODEC_VP56_H
27 #define AVCODEC_VP56_H
70 #define VP56_SIZE_CHANGE 1
75 int offset1,
int offset2,
int stride,
211 int flip,
int has_alpha);
236 code_word |= bytestream_get_be16(&c->
buffer) <<
bits;
249 #ifndef vp56_rac_get_prob
250 #define vp56_rac_get_prob vp56_rac_get_prob
254 unsigned int low = 1 + (((c->
high - 1) * prob) >> 8);
255 unsigned int low_shift = low << 16;
256 int bit = code_word >= low_shift;
258 c->
high = bit ? c->
high - low : low;
259 c->
code_word = bit ? code_word - low_shift : code_word;
265 #ifndef vp56_rac_get_prob_branchy
270 unsigned low = 1 + (((c->
high - 1) * prob) >> 8);
271 unsigned low_shift = low << 16;
273 if (code_word >= low_shift) {
289 int low = (c->
high + 1) >> 1;
290 unsigned int low_shift = low << 16;
291 int bit = code_word >= low_shift;
294 code_word -= low_shift;
365 while (tree->
val > 0) {
uint8_t coeff_ract[2][3][6][11]
static int shift(int a, int b)
uint8_t coeff_index_to_pos[64]
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
static av_always_inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t(*tree)[2], const uint8_t *probs)
uint8_t coeff_dccv[2][11]
uint8_t mb_types_stats[3][10][2]
Inter MB, no vector, from previous frame.
VP56ParseVectorAdjustment parse_vector_adjustment
#define DECLARE_ALIGNED(n, t, v)
void(* VP56DefaultModelsInit)(VP56Context *s)
VP56ParseCoeffModels parse_coeff_models
VP56ParseVectorModels parse_vector_models
int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
unsigned int nb_null[2][2]
void ff_vp56_init_dequant(VP56Context *s, int quantizer)
bitstream reader API header.
uint8_t * edge_emu_buffer
static av_always_inline int vp56_rac_get_tree(VP56RangeCoder *c, const VP56Tree *tree, const uint8_t *probs)
uint8_t coeff_reorder[64]
Inter MB, second vector, from golden frame.
VP56ParseCoeff parse_coeff
static const uint16_t mask[17]
static void flip(AVCodecContext *avctx, AVFrame *frame)
static av_always_inline int vp56_rac_get(VP56RangeCoder *c)
Inter MB, first vector, from previous frame.
static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
VP56Context * alpha_context
Inter MB, first vector, from golden frame.
static av_unused int vp8_rac_get_sint(VP56RangeCoder *c, int bits)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLsizei GLboolean const GLfloat * value
int(* VP56ParseCoeffModels)(VP56Context *s)
uint8_t idct_scantable[64]
VP56ParseHeader parse_header
#define vp56_rac_get_prob
VP56Macroblock * macroblocks
uint8_t coeff_runv[2][14]
static const int8_t mv[256][2]
static av_always_inline int vp56_rac_get_prob_branchy(VP56RangeCoder *c, int prob)
Inter MB, 4 vectors, from previous frame.
Inter MB, no vector, from golden frame.
int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s, int flip, int has_alpha)
Inter MB, second vector, from previous frame.
main external API structure.
static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c)
int ff_vp56_free(AVCodecContext *avctx)
void(* VP56ParseVectorAdjustment)(VP56Context *s, VP56mv *vect)
uint8_t mb_type[3][10][10]
VP56DefaultModelsInit default_models_init
uint8_t coeff_dcct[2][36][5]
Inter MB, above/left vector + delta, from previous frame.
static av_always_inline int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob)
void(* VP56ParseCoeff)(VP56Context *s)
int sample_variance_threshold
int ff_vp56_free_context(VP56Context *s)
const uint8_t ff_vp56_norm_shift[256]
vp56 specific range coder implementation
static int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size)
uint8_t coeff_acct[2][3][3][6][5]
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint8_t coeff_ctx_last[4]
const uint8_t * vp56_coord_div
GLint GLenum GLboolean GLsizei stride
int(* VP56ParseHeader)(VP56Context *s, const uint8_t *buf, int buf_size)
static av_always_inline int vp8_rac_get(VP56RangeCoder *c)
Core video DSP helper functions.
Inter MB, above/left vector + delta, from golden frame.
void(* VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src, int offset1, int offset2, int stride, VP56mv mv, int mask, int select, int luma)
uint8_t * edge_emu_buffer_alloc
static av_unused int vp8_rac_get_nn(VP56RangeCoder *c)
This structure stores compressed data.
VP56mv vector_candidate[2]
void(* VP56ParseVectorModels)(VP56Context *s)
H264ChromaContext h264chroma
static int vp56_rac_gets(VP56RangeCoder *c, int bits)
int16_t block_coeff[6][64]