diff options
author | David Conrad <lessen42@gmail.com> | 2010-07-25 06:44:31 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-27 02:00:29 +0400 |
commit | 748f921ad1997a464fb8963d0ba2c5bb5e036b1b (patch) | |
tree | 6de344344829d00ebe599ff36131fa9be0776b29 /libavcodec/vp8.c | |
parent | ba3830e8a338eee766271fc8c47baaa0d70d7492 (diff) |
VP8: Unroll decoding segment update
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 8c0380315e..9b07608078 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -627,9 +627,10 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_ { VP56RangeCoder *c = &s->c; - if (s->segmentation.update_map) - *segment = vp8_rac_get_tree(c, vp8_segmentid_tree, s->prob->segmentid); - else + if (s->segmentation.update_map) { + int bit = vp56_rac_get_prob(c, s->prob->segmentid[0]); + *segment = vp56_rac_get_prob(c, s->prob->segmentid[1+bit]) + 2*bit; + } else *segment = ref ? *ref : *segment; s->segment = *segment; |