ref: 12e5ec6aa82cd9c1b91eaf528d16df79e6cb47a7
parent: 2d50c8498d1b4e03fa249d83fd88b148bca590e5
parent: 86d2a9b978980f8507f7fbfa1f71a32720659f07
author: Jingning Han <[email protected]>
date: Mon Nov 25 04:14:46 EST 2013
Merge "Separate setup_scale_factor/extend_frame_borders"
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -219,9 +219,6 @@
vp9_setup_scale_factors_for_frame(sf, sfc,
fb->y_crop_width, fb->y_crop_height,
cm->width, cm->height);
-
- if (vp9_is_scaled(sfc))
- vp9_extend_frame_borders(fb, cm->subsampling_x, cm->subsampling_y);
}
}
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -11,6 +11,8 @@
#include <assert.h>
#include "./vp9_rtcd.h"
+#include "./vpx_scale_rtcd.h"
+
#include "vpx_mem/vpx_mem.h"
#include "vpx_scale/vpx_scale.h"
@@ -1164,8 +1166,12 @@
cm->allow_high_precision_mv = vp9_rb_read_bit(rb);
cm->mcomp_filter_type = read_interp_filter_type(rb);
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i)
+ for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
vp9_setup_scale_factors(cm, i);
+ if (vp9_is_scaled(&cm->active_ref_scale_comm[i]))
+ vp9_extend_frame_borders(&cm->yv12_fb[cm->active_ref_idx[i]],
+ cm->subsampling_x, cm->subsampling_y);
+ }
}
}
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3615,8 +3615,12 @@
VP9BORDERINPIXELS);
// Calculate scaling factors for each of the 3 available references
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i)
+ for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
vp9_setup_scale_factors(cm, i);
+ if (vp9_is_scaled(&cm->active_ref_scale_comm[i]))
+ vp9_extend_frame_borders(&cm->yv12_fb[cm->active_ref_idx[i]],
+ cm->subsampling_x, cm->subsampling_y);
+ }
vp9_setup_interp_filters(&cpi->mb.e_mbd, DEFAULT_INTERP_FILTER, cm);