[FFmpeg-cvslog] VP8: Unroll decoding segment update

David Conrad git at videolan.org
Thu Oct 27 01:14:49 CEST 2011


ffmpeg | branch: master | David Conrad <lessen42 at gmail.com> | Sat Jul 24 22:44:31 2010 -0400| [748f921ad1997a464fb8963d0ba2c5bb5e036b1b] | committer: Michael Niedermayer

VP8: Unroll decoding segment update

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=748f921ad1997a464fb8963d0ba2c5bb5e036b1b
---

 libavcodec/vp8.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 8c03803..9b07608 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;
 



More information about the ffmpeg-cvslog mailing list