]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp5.c
Add descriptive long_name to AVCodec
[ffmpeg] / libavcodec / vp5.c
index 8939f02c345ee77fe83fe3969b75741e92162a5b..77bfedff199f2cec90d6d88e178015d5d2fa3328 100644 (file)
 #include "avcodec.h"
 #include "dsputil.h"
 #include "bitstream.h"
-#include "mpegvideo.h"
 
 #include "vp56.h"
 #include "vp56data.h"
 #include "vp5data.h"
 
 
-static int vp5_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
+static int vp5_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
                             int *golden_frame)
 {
     vp56_range_coder_t *c = &s->c;
@@ -205,7 +204,7 @@ static void vp5_parse_coeff(vp56_context_t *s)
                         s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 4;
                         idx = vp56_rac_get_tree(c, vp56_pc_tree, model1);
                         sign = vp56_rac_get(c);
-                        coeff = vp56_coeff_bias[idx];
+                        coeff = vp56_coeff_bias[idx+5];
                         for (i=vp56_coeff_bit_length[idx]; i>=0; i--)
                             coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i;
                     } else {
@@ -266,7 +265,7 @@ static void vp5_default_models_init(vp56_context_t *s)
     memset(model->vector_pdv, 0x80, sizeof(model->vector_pdv));
 }
 
-static int vp5_decode_init(AVCodecContext *avctx)
+static av_cold int vp5_decode_init(AVCodecContext *avctx)
 {
     vp56_context_t *s = avctx->priv_data;