Stop using last_width and last_height Instead use cm->prev_frame->width and cm->prev_frame->height. Change-Id: I2bdf0613ea8f871150501d48db13b7894f98d4df
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index e77847b..547c117 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -3191,17 +3191,15 @@ } static void dec_setup_frame_boundary_info(AV1_COMMON *const cm) { - { - int row, col; - for (row = 0; row < cm->mi_rows; ++row) { - BOUNDARY_TYPE *bi = cm->boundary_info + row * cm->mi_stride; - for (col = 0; col < cm->mi_cols; ++col) { - *bi = 0; - bi++; - } + int row, col; + for (row = 0; row < cm->mi_rows; ++row) { + BOUNDARY_TYPE *bi = cm->boundary_info + row * cm->mi_stride; + for (col = 0; col < cm->mi_cols; ++col) { + *bi = 0; + bi++; } - av1_setup_frame_boundary_info(cm); } + av1_setup_frame_boundary_info(cm); } int av1_decode_frame_headers_and_setup(AV1Decoder *pbi,
diff --git a/av1/encoder/aq_complexity.c b/av1/encoder/aq_complexity.c index 94d04e2..c5a6bc8 100644 --- a/av1/encoder/aq_complexity.c +++ b/av1/encoder/aq_complexity.c
@@ -49,8 +49,8 @@ AV1_COMMON *const cm = &cpi->common; struct segmentation *const seg = &cm->seg; int resolution_change = - (cm->width != cm->last_width || cm->height != cm->last_height) && - cm->prev_frame; + cm->prev_frame && (cm->width != cm->prev_frame->width || + cm->height != cm->prev_frame->height); // Make SURE use of floating point in this function is safe. aom_clear_system_state();
diff --git a/av1/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c index 6b2b091..dc6a100 100644 --- a/av1/encoder/aq_cyclicrefresh.c +++ b/av1/encoder/aq_cyclicrefresh.c
@@ -482,8 +482,8 @@ struct segmentation *const seg = &cm->seg; const int apply_cyclic_refresh = apply_cyclic_refresh_bitrate(cm, rc); int resolution_change = - (cm->width != cm->last_width || cm->height != cm->last_height) && - cm->prev_frame; + cm->prev_frame && (cm->width != cm->prev_frame->width || + cm->height != cm->prev_frame->height); if (resolution_change) { memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols); av1_clearall_segfeatures(seg);
diff --git a/av1/encoder/aq_variance.c b/av1/encoder/aq_variance.c index d73ebdb..a97fe3d 100644 --- a/av1/encoder/aq_variance.c +++ b/av1/encoder/aq_variance.c
@@ -48,8 +48,8 @@ int i; int resolution_change = - (cm->width != cm->last_width || cm->height != cm->last_height) && - cm->prev_frame; + cm->prev_frame && (cm->width != cm->prev_frame->width || + cm->height != cm->prev_frame->height); if (resolution_change) { memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols); av1_clearall_segfeatures(seg);