Commit 2b3b63f4 authored by Adrian Grange's avatar Adrian Grange Committed by Gerrit Code Review
Browse files

Merge "Fix ARF construction when scaling"

parents 99df7ded 1def634f
Branches
Tags
No related merge requests found
Showing with 9 additions and 7 deletions
...@@ -200,8 +200,8 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi, ...@@ -200,8 +200,8 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
int frame; int frame;
int mb_col, mb_row; int mb_col, mb_row;
unsigned int filter_weight; unsigned int filter_weight;
int mb_cols = cpi->common.mb_cols; int mb_cols = (frames[alt_ref_index]->y_crop_width + 15) >> 4;
int mb_rows = cpi->common.mb_rows; int mb_rows = (frames[alt_ref_index]->y_crop_height + 15) >> 4;
int mb_y_offset = 0; int mb_y_offset = 0;
int mb_uv_offset = 0; int mb_uv_offset = 0;
DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16 * 16 * 3); DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16 * 16 * 3);
...@@ -233,7 +233,7 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi, ...@@ -233,7 +233,7 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
// To keep the mv in play for both Y and UV planes the max that it // To keep the mv in play for both Y and UV planes the max that it
// can be on a border is therefore 16 - (2*VP9_INTERP_EXTEND+1). // can be on a border is therefore 16 - (2*VP9_INTERP_EXTEND+1).
cpi->mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VP9_INTERP_EXTEND)); cpi->mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VP9_INTERP_EXTEND));
cpi->mb.mv_row_max = ((cpi->common.mb_rows - 1 - mb_row) * 16) cpi->mb.mv_row_max = ((mb_rows - 1 - mb_row) * 16)
+ (17 - 2 * VP9_INTERP_EXTEND); + (17 - 2 * VP9_INTERP_EXTEND);
for (mb_col = 0; mb_col < mb_cols; mb_col++) { for (mb_col = 0; mb_col < mb_cols; mb_col++) {
...@@ -244,7 +244,7 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi, ...@@ -244,7 +244,7 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
vpx_memset(count, 0, 16 * 16 * 3 * sizeof(count[0])); vpx_memset(count, 0, 16 * 16 * 3 * sizeof(count[0]));
cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND)); cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND));
cpi->mb.mv_col_max = ((cpi->common.mb_cols - 1 - mb_col) * 16) cpi->mb.mv_col_max = ((mb_cols - 1 - mb_col) * 16)
+ (17 - 2 * VP9_INTERP_EXTEND); + (17 - 2 * VP9_INTERP_EXTEND);
for (frame = 0; frame < frame_count; frame++) { for (frame = 0; frame < frame_count; frame++) {
...@@ -480,10 +480,12 @@ void vp9_temporal_filter(VP9_COMP *cpi, int distance) { ...@@ -480,10 +480,12 @@ void vp9_temporal_filter(VP9_COMP *cpi, int distance) {
} }
} }
} else { } else {
// ARF is produced at the native frame size and resized when coded.
vp9_setup_scale_factors_for_frame(&sf, vp9_setup_scale_factors_for_frame(&sf,
get_frame_new_buffer(cm)->y_crop_width, frames[0]->y_crop_width,
get_frame_new_buffer(cm)->y_crop_height, frames[0]->y_crop_height,
cm->width, cm->height); frames[0]->y_crop_width,
frames[0]->y_crop_height);
} }
temporal_filter_iterate_c(cpi, frames, frames_to_blur, temporal_filter_iterate_c(cpi, frames, frames_to_blur,
......
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