ref: 13eed79c776477f0bc3ed5e70c2fce69165cb77e
parent: 8adc20ce35f273030cbaa989430874361329ed7f
parent: 640dea4d9df6befba574f069d5056ddd0719bca1
author: Dmitry Kovalev <dkovalev@google.com>
date: Thu Aug 22 10:39:55 EDT 2013
Merge "Adding vp9_is_scaled function."
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -257,8 +257,7 @@
fb->y_crop_width, fb->y_crop_height,
cm->width, cm->height);
- if (sf->x_scale_fp != VP9_REF_NO_SCALE ||
- sf->y_scale_fp != VP9_REF_NO_SCALE)
+ if (vp9_is_scaled(sf))
vp9_extend_frame_borders(fb, cm->subsampling_x, cm->subsampling_y);
}
}
--- a/vp9/common/vp9_scale.h
+++ b/vp9/common/vp9_scale.h
@@ -40,4 +40,9 @@
int other_w, int other_h,
int this_w, int this_h);
+static int vp9_is_scaled(const struct scale_factors *sf) {
+ return sf->x_scale_fp != VP9_REF_NO_SCALE ||
+ sf->y_scale_fp != VP9_REF_NO_SCALE;
+}
+
#endif // VP9_COMMON_VP9_SCALE_H_
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2285,8 +2285,7 @@
// Further refinement that is encode side only to test the top few candidates
// in full and choose the best as the centre point for subsequent searches.
// The current implementation doesn't support scaling.
- if (scale[frame_type].x_scale_fp == VP9_REF_NO_SCALE &&
- scale[frame_type].y_scale_fp == VP9_REF_NO_SCALE)
+ if (!vp9_is_scaled(&scale[frame_type]))
mv_pred(cpi, x, yv12_mb[frame_type][0].buf, yv12->y_stride,
frame_type, block_size);
}
@@ -3272,14 +3271,12 @@
// TODO(jingning, jkoleszar): scaling reference frame not supported for
// SPLITMV.
if (ref_frame > 0 &&
- (scale_factor[ref_frame].x_scale_fp != VP9_REF_NO_SCALE ||
- scale_factor[ref_frame].y_scale_fp != VP9_REF_NO_SCALE) &&
+ vp9_is_scaled(&scale_factor[ref_frame]) &&
this_mode == SPLITMV)
continue;
if (second_ref_frame > 0 &&
- (scale_factor[second_ref_frame].x_scale_fp != VP9_REF_NO_SCALE ||
- scale_factor[second_ref_frame].y_scale_fp != VP9_REF_NO_SCALE) &&
+ vp9_is_scaled(&scale_factor[second_ref_frame]) &&
this_mode == SPLITMV)
continue;
--
⑨