]> granicus.if.org Git - libvpx/commitdiff
Update to cyclic refresh:
authorMarco Paniconi <marpan@google.com>
Mon, 24 Sep 2012 03:56:49 +0000 (20:56 -0700)
committerMarco Paniconi <marpan@google.com>
Mon, 24 Sep 2012 04:01:12 +0000 (21:01 -0700)
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

vp8/encoder/onyx_if.c

index a8929133ca10bc3588e9b2bb5b3bd049131c9256..fa6620625cb3e693be7d31c77b9b7973692339f6 100644 (file)
@@ -458,11 +458,12 @@ static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment)
 
     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;