media/libvpx/I9713c9f0.patch
author Shih-Chiang Chien <schien@mozilla.com>
Thu, 04 Oct 2012 17:28:34 +0800
changeset 116849 a1a85eefb32983bfe2ff18ab79476cc06942701b
parent 97209 731c4bc9dd37ac8c1f9794d33cbcfa562affd4e8
permissions -rw-r--r--
Bug 790393 - Add MozPower.factoryReset() for factory reset. r=cjones, r=vingtetun, sr=sicking, a=blocking-basecamp

# HG changeset patch
# Parent d0bb669a2e26f138d416333b21f55151503dcdf9
# User Timothy B. Terriberry <tterribe@vt.edu>
decoder: reset segmentation map on keyframes

Upstream Change-Id: I9713c9f070eb37b31b3b029d9ef96be9b6ea2def

diff --git a/media/libvpx/vp8/decoder/decodframe.c b/media/libvpx/vp8/decoder/decodframe.c
--- a/media/libvpx/vp8/decoder/decodframe.c
+++ b/media/libvpx/vp8/decoder/decodframe.c
@@ -830,16 +830,22 @@ int vp8_decode_frame(VP8D_COMP *pbi)
             for (i = 0; i < MB_FEATURE_TREE_PROBS; i++)
             {
                 /* If not explicitly set value is defaulted to 255 by memset above */
                 if (vp8_read_bit(bc))
                     xd->mb_segment_tree_probs[i] = (vp8_prob)vp8_read_literal(bc, 8);
             }
         }
     }
+    else
+    {
+        /* No segmentation updates on this frame */
+        xd->update_mb_segmentation_map = 0;
+        xd->update_mb_segmentation_data = 0;
+    }
 
     /* Read the loop filter level and type */
     pc->filter_type = (LOOPFILTERTYPE) vp8_read_bit(bc);
     pc->filter_level = vp8_read_literal(bc, 6);
     pc->sharpness_level = vp8_read_literal(bc, 3);
 
     /* Read in loop filter deltas applied at the MB level based on mode or ref frame. */
     xd->mode_ref_lf_delta_update = 0;