shithub: libvpx

Download patch

ref: b501251e2e7a4db4cb1ca2d6cbf24176d2a065dc
parent: 5979b89b9246b83fab71c77296b54a31686c8df9
author: Marco Paniconi <marpan@google.com>
date: Sun Sep 23 16:56:49 EDT 2012

Update to cyclic refresh:

Set the seg map to 0 for key frame.

In previous commit on cyclic refresh, the seg map for key frame
was not reset, and instead used the seg map from last frame.

Change-Id: I848eb2face420dfcd2f7daca6f070b9127ca938b

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -458,11 +458,12 @@
 
     cpi->cyclic_refresh_q = Q / 2;
 
+    // Set every macroblock to be eligible for update.
+    // For key frame this will reset seg map to 0.
+    vpx_memset(cpi->segmentation_map, 0, mbs_in_frame);
+
     if (cpi->common.frame_type != KEY_FRAME)
     {
-        // set every macroblock to eligible for update
-        vpx_memset(cpi->segmentation_map, 0, mbs_in_frame);
-
         /* Cycle through the macro_block rows */
         /* MB loop to set local segmentation map */
         i = cpi->cyclic_refresh_mode_index;