Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: source/libvpx/vp9/common/vp9_scale.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_systemdependent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_scale.c
diff --git a/source/libvpx/vp9/common/vp9_scale.c b/source/libvpx/vp9/common/vp9_scale.c
index 8f5c72e7c6c067a80411a657764fcbd8adde3db0..b763b925b3ea49ccf682e1948350dcef67fd21cd 100644
--- a/source/libvpx/vp9/common/vp9_scale.c
+++ b/source/libvpx/vp9/common/vp9_scale.c
@@ -79,6 +79,7 @@ void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
// applied in one direction only, and not at all for 0,0, seems to give the
// best quality, but it may be worth trying an additional mode that does
// do the filtering on full-pel.
+
if (sf->x_step_q4 == 16) {
if (sf->y_step_q4 == 16) {
// No scaling in either direction.
@@ -90,35 +91,43 @@ void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
sf->predict[1][0][1] = vpx_convolve8_avg_horiz;
} else {
// No scaling in x direction. Must always scale in the y direction.
- sf->predict[0][0][0] = vpx_convolve8_vert;
- sf->predict[0][0][1] = vpx_convolve8_avg_vert;
- sf->predict[0][1][0] = vpx_convolve8_vert;
- sf->predict[0][1][1] = vpx_convolve8_avg_vert;
- sf->predict[1][0][0] = vpx_convolve8;
- sf->predict[1][0][1] = vpx_convolve8_avg;
+ sf->predict[0][0][0] = vpx_scaled_vert;
+ sf->predict[0][0][1] = vpx_scaled_avg_vert;
+ sf->predict[0][1][0] = vpx_scaled_vert;
+ sf->predict[0][1][1] = vpx_scaled_avg_vert;
+ sf->predict[1][0][0] = vpx_scaled_2d;
+ sf->predict[1][0][1] = vpx_scaled_avg_2d;
}
} else {
if (sf->y_step_q4 == 16) {
// No scaling in the y direction. Must always scale in the x direction.
- sf->predict[0][0][0] = vpx_convolve8_horiz;
- sf->predict[0][0][1] = vpx_convolve8_avg_horiz;
- sf->predict[0][1][0] = vpx_convolve8;
- sf->predict[0][1][1] = vpx_convolve8_avg;
- sf->predict[1][0][0] = vpx_convolve8_horiz;
- sf->predict[1][0][1] = vpx_convolve8_avg_horiz;
+ sf->predict[0][0][0] = vpx_scaled_horiz;
+ sf->predict[0][0][1] = vpx_scaled_avg_horiz;
+ sf->predict[0][1][0] = vpx_scaled_2d;
+ sf->predict[0][1][1] = vpx_scaled_avg_2d;
+ sf->predict[1][0][0] = vpx_scaled_horiz;
+ sf->predict[1][0][1] = vpx_scaled_avg_horiz;
} else {
// Must always scale in both directions.
- sf->predict[0][0][0] = vpx_convolve8;
- sf->predict[0][0][1] = vpx_convolve8_avg;
- sf->predict[0][1][0] = vpx_convolve8;
- sf->predict[0][1][1] = vpx_convolve8_avg;
- sf->predict[1][0][0] = vpx_convolve8;
- sf->predict[1][0][1] = vpx_convolve8_avg;
+ sf->predict[0][0][0] = vpx_scaled_2d;
+ sf->predict[0][0][1] = vpx_scaled_avg_2d;
+ sf->predict[0][1][0] = vpx_scaled_2d;
+ sf->predict[0][1][1] = vpx_scaled_avg_2d;
+ sf->predict[1][0][0] = vpx_scaled_2d;
+ sf->predict[1][0][1] = vpx_scaled_avg_2d;
}
}
+
// 2D subpel motion always gets filtered in both directions
- sf->predict[1][1][0] = vpx_convolve8;
- sf->predict[1][1][1] = vpx_convolve8_avg;
+
+ if ((sf->x_step_q4 != 16) || (sf->y_step_q4 != 16)) {
+ sf->predict[1][1][0] = vpx_scaled_2d;
+ sf->predict[1][1][1] = vpx_scaled_avg_2d;
+ } else {
+ sf->predict[1][1][0] = vpx_convolve8;
+ sf->predict[1][1][1] = vpx_convolve8_avg;
+ }
+
#if CONFIG_VP9_HIGHBITDEPTH
if (use_highbd) {
if (sf->x_step_q4 == 16) {
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_systemdependent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698