Index: source/libvpx/vp8/encoder/onyx_if.c |
=================================================================== |
--- source/libvpx/vp8/encoder/onyx_if.c (revision 285372) |
+++ source/libvpx/vp8/encoder/onyx_if.c (working copy) |
@@ -1405,7 +1405,7 @@ |
double prev_layer_framerate=0; |
assert(oxcf->number_of_layers <= VPX_TS_MAX_LAYERS); |
- for (i=0; i<oxcf->number_of_layers; i++) |
+ for (i = 0; i < oxcf->number_of_layers && i < VPX_TS_MAX_LAYERS; ++i) |
{ |
LAYER_CONTEXT *lc = &cpi->layer_context[i]; |
@@ -3232,17 +3232,9 @@ |
if (cm->frame_type == KEY_FRAME) |
{ |
int i; |
- vp8_yv12_copy_frame( |
- cpi->Source, |
- &cpi->denoiser.yv12_running_avg[LAST_FRAME]); |
- |
- vp8_yv12_extend_frame_borders( |
- &cpi->denoiser.yv12_running_avg[LAST_FRAME]); |
- |
- for (i = 2; i < MAX_REF_FRAMES - 1; i++) |
- vp8_yv12_copy_frame( |
- &cpi->denoiser.yv12_running_avg[LAST_FRAME], |
- &cpi->denoiser.yv12_running_avg[i]); |
+ for (i = LAST_FRAME; i < MAX_REF_FRAMES; ++i) |
+ vp8_yv12_copy_frame(cpi->Source, |
+ &cpi->denoiser.yv12_running_avg[i]); |
} |
else /* For non key frames */ |
{ |
@@ -5037,7 +5029,8 @@ |
/* Update frame rates for each layer */ |
assert(cpi->oxcf.number_of_layers <= VPX_TS_MAX_LAYERS); |
- for (i=0; i<cpi->oxcf.number_of_layers; i++) |
+ for (i = 0; i < cpi->oxcf.number_of_layers && |
+ i < VPX_TS_MAX_LAYERS; ++i) |
{ |
LAYER_CONTEXT *lc = &cpi->layer_context[i]; |
lc->framerate = cpi->ref_framerate / |