shithub: libvpx

Download patch

ref: e8223bd2503937db12abb5800292a57be2f02e85
parent: e6df50031e63d812c841a40d2522c487f78ed8ce
author: John Koleszar <jkoleszar@google.com>
date: Thu Feb 16 06:15:11 EST 2012

decoder: reset segmentation map on keyframes

Refactoring some of the mode decoding logic introduced a bug where
the segmentation maps would not be properly reset on keyframes.

http://code.google.com/p/webm/issues/detail?id=378

The text of the bug is somewhat misleading as I initially read it to
imply the bug was present in v0.9.7-p1 (Cayuga), but note the text
"master", which indicates this was something subsequent. This issue
bisects back to v0.9.7-p1-84-ga99c20c, so unfortunately it was broken
during the Duclair release.

Thanks to Alexei Leonenko for investigating the root cause.

Change-Id: I9713c9f070eb37b31b3b029d9ef96be9b6ea2def

--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -827,6 +827,12 @@
             }
         }
     }
+    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);