]> granicus.if.org Git - libvpx/commitdiff
Resetting of the cyclic_refresh_mode_index:
authorMarco Paniconi <marpan@google.com>
Thu, 27 Sep 2012 21:30:40 +0000 (14:30 -0700)
committerMarco Paniconi <marpan@google.com>
Thu, 27 Sep 2012 21:34:43 +0000 (14:34 -0700)
Reset the cyclie refresh mode index in alloc_compressor_data().
This is needed to handle both cases of internal and
external spatial resizing.

Change-Id: I2697e12d45135eae2e8f0d45161811f24722312a

vp8/encoder/onyx_if.c

index 1278b240162e805b5da302c9310e8c296a0abd5f..b4e02e22c0c03b85e1fe537d4421866f90d824d6 100644 (file)
@@ -1120,6 +1120,7 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
     CHECK_MEM_ERROR(cpi->segmentation_map,
                     vpx_calloc(cm->mb_rows * cm->mb_cols,
                     sizeof(*cpi->segmentation_map)));
+    cpi->cyclic_refresh_mode_index = 0;
     vpx_free(cpi->active_map);
     CHECK_MEM_ERROR(cpi->active_map,
                     vpx_calloc(cm->mb_rows * cm->mb_cols,
@@ -3916,7 +3917,6 @@ static void encode_frame_to_data_rate
               Q = vp8_regulate_q(cpi, cpi->this_frame_target);
               if (cpi->cyclic_refresh_mode_enabled)
               {
-                cpi->cyclic_refresh_mode_index = 0;
                 if (cpi->current_layer==0)
                   cyclic_background_refresh(cpi, Q, 0);
                 else