Commit 55dc7bc1 authored by Jingning Han's avatar Jingning Han

Fix the top-right reference block location

This commit fixes the top-right reference block location for block
sizes above 8x8. It improves the coding performance of ref-mv:

lowres 0.08%
midres 0.15%

Thanks to jiafeng@ for finding this issue.

Change-Id: I70750fc7b18bf0126d3e07abc1b63ca5a160193e
parent c266df05
......@@ -252,9 +252,13 @@ static int has_top_right(const MACROBLOCKD *xd, int mi_row, int mi_col,
bs <<= 1;
}
// The left hand of two vertical rectangles always has a top right (as the
// block above will have been decoded)
if (xd->n8_w < xd->n8_h)
if (!xd->is_sec_rect) has_tr = 1;
// The bottom of two horizontal rectangles never has a top right (as the block
// to the right won't have been decoded)
if (xd->n8_w > xd->n8_h)
if (xd->is_sec_rect) has_tr = 0;
......@@ -363,8 +367,8 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd,
// Check top-right boundary
if (has_tr)
newmv_count += scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, 1,
ref_mv_stack, refmv_count);
newmv_count += scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, -1,
xd->n8_w, ref_mv_stack, refmv_count);
nearest_refmv_count = *refmv_count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment