]> granicus.if.org Git - libvpx/commitdiff
Fixes a decoder bug
authorYaowu Xu <yaowu@google.com>
Wed, 1 Feb 2012 22:49:10 +0000 (14:49 -0800)
committerYaowu Xu <yaowu@google.com>
Wed, 1 Feb 2012 22:56:14 +0000 (14:56 -0800)
The bug was introduced by the commit that added I8X8 intra prediction
mode for inter frames, the decoder was not update to accept the additional
probability update from encoder. This causes the decoder typicall to crash
when encoder sends intra mode probability update.

Change-Id: Ib7dc42dc77a51178aa9ece41e081829818a25016

vp8/decoder/decodemv.c

index 5e00922e4b8ae75032d3b0b861431450d9c63e1a..73a20a2f056fd29f69200361ccc3631fc67b4a53 100644 (file)
@@ -490,7 +490,7 @@ static void mb_mode_mv_init(VP8D_COMP *pbi)
             {
                 cm->fc.ymode_prob[i] = (vp8_prob) vp8_read_literal(bc, 8);
             }
-            while (++i < 4);
+            while (++i < VP8_YMODES-1);
         }
 #if CONFIG_UVINTRA
         //vp8_read_bit(bc);
@@ -503,7 +503,7 @@ static void mb_mode_mv_init(VP8D_COMP *pbi)
             {
                 cm->fc.uv_mode_prob[i] = (vp8_prob) vp8_read_literal(bc, 8);
             }
-            while (++i < 3);
+            while (++i < VP8_UV_MODES-1);
         }
 #endif /* CONFIG_UVINTRA */
         read_mvcontexts(bc, mvc);