summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2013-04-17 16:12:02 -0700
committerRonald S. Bultje <rbultje@google.com>2013-04-17 16:12:02 -0700
commitd63826ac127d4d9df9cd8f546f40c6c264abdbdf (patch)
tree12d3bea4c852dcccd97010d47c9a1cbbbf4cbf52 /vp9
parent0a20625bd85d44dd779ad9a0edf7ab2d2af40b91 (diff)
downloadlibvpx-d63826ac127d4d9df9cd8f546f40c6c264abdbdf.tar
libvpx-d63826ac127d4d9df9cd8f546f40c6c264abdbdf.tar.gz
libvpx-d63826ac127d4d9df9cd8f546f40c6c264abdbdf.tar.bz2
libvpx-d63826ac127d4d9df9cd8f546f40c6c264abdbdf.zip
Fix edge bug in recent merge of 64x64 and 32x32 inter predictors.
Change-Id: I83aa188d414922db19cccb210c4001c02d5a404c
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_reconinter.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c
index 716781170..79ca0b4e5 100644
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -1068,10 +1068,10 @@ static void build_inter_predictors_sby_w(MACROBLOCKD *x,
for (n = 0; n < bw * bh; n++) {
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
- x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
- x->mb_to_bottom_edge = edge[1] + (((1 - y_idx) * 16) << 3);
- x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
- x->mb_to_right_edge = edge[3] + (((1 - x_idx) * 16) << 3);
+ x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
+ x->mb_to_bottom_edge = edge[1] + (((bh - 1 - y_idx) * 16) << 3);
+ x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
+ x->mb_to_right_edge = edge[3] + (((bw - 1 - x_idx) * 16) << 3);
x->pre.y_buffer = y1 + scaled_buffer_offset(x_idx * 16,
y_idx * 16,
@@ -1136,10 +1136,10 @@ void vp9_build_inter_predictors_sby(MACROBLOCKD *x,
for (n = 0; n < bw * bh; n++) {
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
- x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
- x->mb_to_bottom_edge = edge[1] + (((1 - y_idx) * 16) << 3);
- x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
- x->mb_to_right_edge = edge[3] + (((1 - x_idx) * 16) << 3);
+ x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
+ x->mb_to_bottom_edge = edge[1] + (((bh - 1 - y_idx) * 16) << 3);
+ x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
+ x->mb_to_right_edge = edge[3] + (((bw - 1 - x_idx) * 16) << 3);
x->pre.y_buffer = y1 + scaled_buffer_offset(x_idx * 16,
y_idx * 16,
@@ -1193,10 +1193,10 @@ static void build_inter_predictors_sbuv_w(MACROBLOCKD *x,
int scaled_uv_offset;
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
- x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
- x->mb_to_bottom_edge = edge[1] + (((1 - y_idx) * 16) << 3);
- x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
- x->mb_to_right_edge = edge[3] + (((1 - x_idx) * 16) << 3);
+ x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
+ x->mb_to_bottom_edge = edge[1] + (((bh - 1 - y_idx) * 16) << 3);
+ x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
+ x->mb_to_right_edge = edge[3] + (((bw - 1 - x_idx) * 16) << 3);
scaled_uv_offset = scaled_buffer_offset(x_idx * 8,
y_idx * 8,
@@ -1273,10 +1273,10 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *x,
int scaled_uv_offset;
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
- x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
- x->mb_to_bottom_edge = edge[1] + (((1 - y_idx) * 16) << 3);
- x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
- x->mb_to_right_edge = edge[3] + (((1 - x_idx) * 16) << 3);
+ x->mb_to_top_edge = edge[0] - ((y_idx * 16) << 3);
+ x->mb_to_bottom_edge = edge[1] + (((bh - 1 - y_idx) * 16) << 3);
+ x->mb_to_left_edge = edge[2] - ((x_idx * 16) << 3);
+ x->mb_to_right_edge = edge[3] + (((bw - 1 - x_idx) * 16) << 3);
scaled_uv_offset = scaled_buffer_offset(x_idx * 8,
y_idx * 8,