Commit f913eeea authored by Dustin Brody's avatar Dustin Brody Committed by Ronald S. Bultje

vp6: partially propagate huffman tree building errors during coeff model...

vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 09c274e0
...@@ -215,8 +215,8 @@ static int vp6_huff_cmp(const void *va, const void *vb) ...@@ -215,8 +215,8 @@ static int vp6_huff_cmp(const void *va, const void *vb)
return (a->count - b->count)*16 + (b->sym - a->sym); return (a->count - b->count)*16 + (b->sym - a->sym);
} }
static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[], static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
const uint8_t *map, unsigned size, VLC *vlc) const uint8_t *map, unsigned size, VLC *vlc)
{ {
Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size]; Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size];
int a, b, i; int a, b, i;
...@@ -231,9 +231,9 @@ static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[], ...@@ -231,9 +231,9 @@ static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
} }
free_vlc(vlc); free_vlc(vlc);
/* then build the huffman tree accodring to probabilities */ /* then build the huffman tree according to probabilities */
ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp, return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
FF_HUFFMAN_FLAG_HNODE_FIRST); FF_HUFFMAN_FLAG_HNODE_FIRST);
} }
static void vp6_parse_coeff_models(VP56Context *s) static void vp6_parse_coeff_models(VP56Context *s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment