Go to the documentation of this file.
55 int render_x, render_y;
69 cols << 4, rows << 4);
74 if (render_x == 0 || render_x > cols ||
75 render_y == 0 || render_y > rows)
78 if (!
s->macroblocks ||
79 16*cols !=
s->avctx->coded_width ||
80 16*rows !=
s->avctx->coded_height) {
86 }
else if (!
s->macroblocks)
133 for (node=0; node<7; node++)
142 uint8_t def_prob[11];
147 memset(def_prob, 0x80,
sizeof(def_prob));
150 for (node=0; node<11; node++)
158 for (ct=0; ct<3; ct++)
160 for (cg=0; cg<6; cg++)
161 for (node=0; node<11; node++)
172 for (node=0; node<5; node++)
176 for (ct=0; ct<3; ct++)
178 for (cg=0; cg<3; cg++)
180 for (node=0; node<5; node++)
189 uint8_t *
permute =
s->idct_scantable;
190 uint8_t *model1, *model2;
191 int coeff, sign, coeff_idx;
192 int b,
i, cg, idx,
ctx, ctx_last;
200 for (
b=0;
b<6;
b++) {
206 +
s->above_blocks[
s->above_block_idx[
b]].not_null_dc;
260 if (coeff_idx < ctx_last)
261 for (
i=coeff_idx;
i<=ctx_last;
i++)
263 s->above_blocks[
s->above_block_idx[
b]].not_null_dc =
s->coeff_ctx[
ff_vp56_b6to4[
b]][0];
264 s->idct_selector[
b] = 63;
274 for (
i=0;
i<2;
i++) {
314 .priv_data_size =
sizeof(VP56Context),
static av_cold int vp5_decode_init(AVCodecContext *avctx)
static av_always_inline int vp56_rac_get_tree(VPXRangeCoder *c, const VP56Tree *tree, const uint8_t *probs)
static int vp5_parse_coeff(VP56Context *s)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
void ff_vp5dsp_init(VP56DSPContext *s)
static void vp5_default_models_init(VP56Context *s)
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
uint8_t mb_types_stats[3][10][2]
uint8_t coeff_acct[2][3][3][6][5]
const uint8_t ff_vp56_coeff_bit_length[]
const FFCodec ff_vp5_decoder
av_cold int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s, int flip, int has_alpha)
Initializes an VP56Context.
static void permute(int16_t dst[64], const int16_t src[64], enum idct_permutation_type perm_type)
static const uint8_t vp5_coord_div[]
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
uint8_t coeff_ract[2][3][6][11]
AVCodec p
The public AVCodec.
const uint8_t ff_vp56_b6to4[]
static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_unused int vp56_rac_gets_nn(VPXRangeCoder *c, int bits)
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
#define FF_CODEC_DECODE_CB(func)
av_cold int ff_vp56_free_context(VP56Context *s)
static const uint8_t vp5_ract_pct[3][2][6][11]
uint8_t coeff_dccv[2][11]
uint8_t coeff_dcct[2][36][5]
#define CODEC_LONG_NAME(str)
static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static const int16_t vp5_ract_lc[3][3][5][6][2]
const uint8_t ff_vp56_def_mb_types_stats[3][10][2]
static const uint8_t vp5_dccv_pct[2][11]
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
int(* init)(AVBSFContext *ctx)
static const int16_t vp5_dccv_lc[5][36][2]
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
const uint8_t ff_vp56_coeff_parse_table[6][11]
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static void vp5_parse_vector_models(VP56Context *s)
static int vp56_rac_gets(VPXRangeCoder *c, int bits)
vp56 specific range coder implementation
const VP56Tree ff_vp56_pva_tree[]
static av_always_inline int vpx_rac_is_end(VPXRangeCoder *c)
returns 1 if the end of the stream has been reached, 0 otherwise.
#define i(width, name, range_min, range_max)
static av_always_inline int vpx_rac_get_prob_branchy(VPXRangeCoder *c, int prob)
const VP56Tree ff_vp56_pc_tree[]
const char * name
Name of the codec implementation.
const uint8_t ff_vp56_coeff_bias[]
int ff_vpx_init_range_decoder(VPXRangeCoder *c, const uint8_t *buf, int buf_size)
int ff_vp56_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
main external API structure.
void ff_vp56_init_dequant(VP56Context *s, int quantizer)
static av_cold int vp56_free(AVCodecContext *avctx)
static av_always_inline int vpx_rac_get(VPXRangeCoder *c)
static const uint8_t vp5_coeff_groups[]
static int vp5_parse_coeff_models(VP56Context *s)
static const double coeff[2][5]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const uint8_t vp5_vmc_pct[2][11]