From ed29c2f94599d2a0eb31ba2c6595bb3d514bbaea Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 8 Sep 2015 09:57:30 -0400 Subject: [PATCH] vp10: fix 4:2:2 chroma MVs for 8x4/4x4 blocks. In vp9, the bottom MV would be the average of the topright and bottomleft luma MV (instead of the bottomleft/bottomright luma MV). See issue 993. Change-Id: Ic91c0b195950e7b32fc26c84c04788a09321e391 --- vp10/common/reconinter.c | 4 ++-- vp10/decoder/decodeframe.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vp10/common/reconinter.c b/vp10/common/reconinter.c index c9e46e0..18e29a9 100644 --- a/vp10/common/reconinter.c +++ b/vp10/common/reconinter.c @@ -143,11 +143,11 @@ static void build_inter_predictors_for_planes(MACROBLOCKD *xd, BLOCK_SIZE bsize, const int bh = 4 * num_4x4_h; if (xd->mi[0]->mbmi.sb_type < BLOCK_8X8) { - int i = 0, x, y; + int x, y; assert(bsize == BLOCK_8X8); for (y = 0; y < num_4x4_h; ++y) for (x = 0; x < num_4x4_w; ++x) - build_inter_predictors(xd, plane, i++, bw, bh, + build_inter_predictors(xd, plane, y * 2 + x, bw, bh, 4 * x, 4 * y, 4, 4, mi_x, mi_y); } else { build_inter_predictors(xd, plane, 0, bw, bh, diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 6163ace..d3c0478 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -707,10 +707,10 @@ static void dec_build_inter_predictors_sb(VP10Decoder *const pbi, const int is_scaled = vp10_is_scaled(sf); if (sb_type < BLOCK_8X8) { - int i = 0, x, y; + int x, y; for (y = 0; y < num_4x4_h; ++y) { for (x = 0; x < num_4x4_w; ++x) { - const MV mv = average_split_mvs(pd, mi, ref, i++); + const MV mv = average_split_mvs(pd, mi, ref, y * 2 + x); dec_build_inter_predictors(pbi, xd, plane, n4w_x4, n4h_x4, 4 * x, 4 * y, 4, 4, mi_x, mi_y, kernel, sf, pre_buf, dst_buf, &mv, -- 2.7.4