From: Marco Paniconi Date: Mon, 24 Sep 2012 03:56:49 +0000 (-0700) Subject: Update to cyclic refresh: X-Git-Tag: v1.2.0~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b501251e2e7a4db4cb1ca2d6cbf24176d2a065dc;p=libvpx 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 --- diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index a8929133c..fa6620625 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -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;