60 cols << 4, rows << 4);
66 if (!s->macroblocks ||
67 16*cols != s->avctx->coded_width ||
68 16*rows != s->avctx->coded_height) {
72 }
else if (!s->macroblocks)
83 for (comp=0; comp<2; comp++) {
91 delta = di | (delta << 2);
92 delta = (delta ^ -sign) + sign;
107 for (comp=0; comp<2; comp++) {
118 for (comp=0; comp<2; comp++)
119 for (node=0; node<7; node++)
133 memset(def_prob, 0x80,
sizeof(def_prob));
135 for (pt=0; pt<2; pt++)
136 for (node=0; node<11; node++)
144 for (ct=0; ct<3; ct++)
145 for (pt=0; pt<2; pt++)
146 for (cg=0; cg<6; cg++)
147 for (node=0; node<11; node++)
156 for (pt=0; pt<2; pt++)
157 for (ctx=0; ctx<36; ctx++)
158 for (node=0; node<5; node++)
162 for (ct=0; ct<3; ct++)
163 for (pt=0; pt<2; pt++)
164 for (cg=0; cg<3; cg++)
165 for (ctx=0; ctx<6; ctx++)
166 for (node=0; node<5; node++)
177 int coeff, sign, coeff_idx;
178 int b, i, cg, idx, ctx, ctx_last;
181 for (b=0; b<6; b++) {
187 + s->above_blocks[s->above_block_idx[
b]].not_null_dc;
219 coeff = (coeff ^ -sign) + sign;
221 coeff *= s->dequant_ac;
222 s->block_coeff[
b][permute[coeff_idx]] =
coeff;
236 model2 = cg > 2 ? model1 : model->
coeff_acct[
pt][ct][cg][ctx];
241 if (coeff_idx < ctx_last)
242 for (i=coeff_idx; i<=ctx_last; i++)
244 s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[
ff_vp56_b6to4[b]][0];
253 for (i=0; i<2; i++) {
286 .priv_data_size =
sizeof(VP56Context),
av_cold int ff_vp56_free(AVCodecContext *avctx)
uint8_t coeff_ract[2][3][6][11]
#define AVERROR_PATCHWELCOME
VP5 and VP6 compatible video decoder (common features)
static av_cold int vp5_decode_init(AVCodecContext *avctx)
const uint8_t ff_vp56_coeff_bias[]
uint8_t coeff_dccv[2][11]
static av_cold int init(AVCodecContext *avctx)
uint8_t mb_types_stats[3][10][2]
static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size)
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
static const uint8_t vp5_coord_div[]
static int vp5_parse_coeff_models(VP56Context *s)
VP5 compatible video decoder.
static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
av_cold int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
static const uint8_t vp5_ract_pct[3][2][6][11]
const char * name
Name of the codec implementation.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
bitstream reader API header.
static av_always_inline int vp56_rac_get_tree(VP56RangeCoder *c, const VP56Tree *tree, const uint8_t *probs)
static const uint8_t vp5_dccv_pct[2][11]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void vp5_parse_vector_models(VP56Context *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_always_inline int vp56_rac_get(VP56RangeCoder *c)
void ff_vp56_init_dequant(VP56Context *s, int quantizer)
const uint8_t ff_vp56_b6to4[]
Libavcodec external API header.
VP5 and VP6 compatible video decoder (common data)
static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
static const int16_t vp5_ract_lc[3][3][5][6][2]
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
const uint8_t ff_vp56_coeff_bit_length[]
#define vp56_rac_get_prob
static void permute(int16_t dst[64], const int16_t src[64], int perm)
static const int16_t vp5_dccv_lc[5][36][2]
const VP56Tree ff_vp56_pc_tree[]
main external API structure.
static void close(AVCodecParserContext *s)
const uint8_t ff_vp56_coeff_parse_table[6][11]
uint8_t coeff_dcct[2][36][5]
void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size)
uint8_t coeff_acct[2][3][3][6][5]
static const uint8_t vp5_vmc_pct[2][11]
const VP56Tree ff_vp56_pva_tree[]
static void vp5_parse_coeff(VP56Context *s)
static void vp5_default_models_init(VP56Context *s)
static av_unused int vp56_rac_gets(VP56RangeCoder *c, int bits)
#define AVERROR_INVALIDDATA
static const double coeff[2][5]
static void comp(unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
static const uint8_t vp5_coeff_groups[]
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
const uint8_t ff_vp56_def_mb_types_stats[3][10][2]