From 22232ec6024a9ccb2ec3bebc7664a723e3e99566 Mon Sep 17 00:00:00 2001
From: hkuang <hkuang@google.com>
Date: Fri, 21 Mar 2014 14:27:03 -0700
Subject: [PATCH] Change back the scaling calculation.

Let the calculation to be compatible with Google's HW implementation.

Change-Id: I22e179888cdb0419e230351c0a47661b37051fef
---
 vp9/common/vp9_reconinter.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c
index 005f370a0e..0a4c33962b 100644
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -308,10 +308,8 @@ static void dec_build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
       y0_16 = sf->scale_value_y(y0_16, sf);
 
       // Map the top left corner of the block into the reference frame.
-      // NOTE: This must be done in this way instead of
-      // sf->scale_value_x(x_start + x, sf).
-      x0 = sf->scale_value_x(x_start, sf) + sf->scale_value_x(x, sf);
-      y0 = sf->scale_value_y(y_start, sf) + sf->scale_value_y(y, sf);
+      x0 = sf->scale_value_x(x_start + x, sf);
+      y0 = sf->scale_value_y(y_start + y, sf);
 
       // Scale the MV and incorporate the sub-pixel offset of the block
       // in the reference frame.
-- 
GitLab