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

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

Issue 1339513003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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_pred_common.h ('k') | source/libvpx/vp9/common/vp9_thread_common.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_reconinter.c
diff --git a/source/libvpx/vp9/common/vp9_reconinter.c b/source/libvpx/vp9/common/vp9_reconinter.c
index f83f8257aa71ec2ad2e54ab34fd5bd227bd30a73..d8c14ecc818bec4833a90f7bc89ef78c576f61b8 100644
--- a/source/libvpx/vp9/common/vp9_reconinter.c
+++ b/source/libvpx/vp9/common/vp9_reconinter.c
@@ -187,7 +187,19 @@ static void build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
const int is_scaled = vp9_is_scaled(sf);
if (is_scaled) {
- pre = pre_buf->buf + scaled_buffer_offset(x, y, pre_buf->stride, sf);
+ // Co-ordinate of containing block to pixel precision.
+ const int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
+ const int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));
+ if (plane == 0)
+ pre_buf->buf = xd->block_refs[ref]->buf->y_buffer;
+ else if (plane == 1)
+ pre_buf->buf = xd->block_refs[ref]->buf->u_buffer;
+ else
+ pre_buf->buf = xd->block_refs[ref]->buf->v_buffer;
+
+ pre_buf->buf += scaled_buffer_offset(x_start + x, y_start + y,
+ pre_buf->stride, sf);
+ pre = pre_buf->buf;
scaled_mv = vp9_scale_mv(&mv_q4, mi_x + x, mi_y + y, sf);
xs = sf->x_step_q4;
ys = sf->y_step_q4;
« no previous file with comments | « source/libvpx/vp9/common/vp9_pred_common.h ('k') | source/libvpx/vp9/common/vp9_thread_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698