Commit d539c1db authored by Marco Paniconi's avatar Marco Paniconi
Browse files

Reset the cyclic_refresh_mode_index to 0 on resize.

On an internal spatial resize, this mode index was not reset to 0,
and therefore could exceed dimensions of seg_map or cyclic_refresh_map.

Change-Id: I6fe85dbd2765eb0207a9d9f71fda8d8b8c34f075
parent 37309630
...@@ -467,6 +467,7 @@ static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment) ...@@ -467,6 +467,7 @@ static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment)
/* Cycle through the macro_block rows */ /* Cycle through the macro_block rows */
/* MB loop to set local segmentation map */ /* MB loop to set local segmentation map */
i = cpi->cyclic_refresh_mode_index; i = cpi->cyclic_refresh_mode_index;
assert(i < mbs_in_frame);
do do
{ {
/* If the MB is as a candidate for clean up then mark it for /* If the MB is as a candidate for clean up then mark it for
...@@ -3915,6 +3916,7 @@ static void encode_frame_to_data_rate ...@@ -3915,6 +3916,7 @@ static void encode_frame_to_data_rate
Q = vp8_regulate_q(cpi, cpi->this_frame_target); Q = vp8_regulate_q(cpi, cpi->this_frame_target);
if (cpi->cyclic_refresh_mode_enabled) if (cpi->cyclic_refresh_mode_enabled)
{ {
cpi->cyclic_refresh_mode_index = 0;
if (cpi->current_layer==0) if (cpi->current_layer==0)
cyclic_background_refresh(cpi, Q, 0); cyclic_background_refresh(cpi, Q, 0);
else else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment