#include "dsputil.h"
#include "bitstream.h"
#include "huffman.h"
-#include "mpegvideo.h"
#include "vp56.h"
#include "vp56data.h"
static void vp6_parse_coeff(vp56_context_t *s);
static void vp6_parse_coeff_huffman(vp56_context_t *s);
-static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
+static int vp6_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
vp56_range_coder_t *c = &s->c;
buf_size -= coeff_offset;
if (s->use_huffman) {
s->parse_coeff = vp6_parse_coeff_huffman;
- init_get_bits(&s->gb, buf, buf_size);
+ init_get_bits(&s->gb, buf, buf_size<<3);
} else {
vp56_init_range_decoder(&s->cc, buf, buf_size);
s->ccp = &s->cc;
}
/* then build the huffman tree accodring to probabilities */
- ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp, 1);
+ ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
+ FF_HUFFMAN_FLAG_HNODE_FIRST);
}
static void vp6_parse_coeff_models(vp56_context_t *s)
}
}
-static int vp6_decode_init(AVCodecContext *avctx)
+static av_cold int vp6_decode_init(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
vp56_free,
vp56_decode_frame,
CODEC_CAP_DR1,
+ .long_name = "On2 VP6",
};
/* flash version, not flipped upside-down */
vp56_free,
vp56_decode_frame,
CODEC_CAP_DR1,
+ .long_name = "On2 VP6 (Flash version)"
};
/* flash version, not flipped upside-down, with alpha channel */
vp56_free,
vp56_decode_frame,
CODEC_CAP_DR1,
+ .long_name = "On2 VP6 (Flash version, with alpha channel)",
};