Fix partition coding of corner block
This commit fixed the allowable partition types for bottom-right corner blocks. When a block has over half of its pixels as valid content in both vertical and horizontal directions, allow all the four partition types in the bit-stream. Otherwise, apply partition type constraints. Change-Id: I2252e2de7125a8bfb1c824bf34299a13c81102e3
This commit is contained in:
parent
f18328cbf1
commit
551f37d63d
@ -313,9 +313,7 @@ static int check_bsize_coverage(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||
int bsl = mi_width_log2(bsize), bs = 1 << bsl;
|
||||
int ms = bs / 2;
|
||||
|
||||
if ((mi_row + bs <= cm->mi_rows) && (mi_col + ms < cm->mi_cols))
|
||||
return 0;
|
||||
if ((mi_col + bs <= cm->mi_cols) && (mi_row + ms < cm->mi_rows))
|
||||
if ((mi_row + ms < cm->mi_rows) && (mi_col + ms < cm->mi_cols))
|
||||
return 0;
|
||||
|
||||
// frame width/height are multiples of 8, hence 8x8 block should always
|
||||
@ -323,9 +321,11 @@ static int check_bsize_coverage(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||
assert(bsize > BLOCK_SIZE_SB8X8);
|
||||
|
||||
// return the node index in the prob tree for binary coding
|
||||
if ((mi_col + bs <= cm->mi_cols) && (mi_row + ms >= cm->mi_rows))
|
||||
// skip horizontal/none partition types
|
||||
if ((mi_col + ms < cm->mi_cols) && (mi_row + ms >= cm->mi_rows))
|
||||
return 1;
|
||||
if ((mi_row + bs <= cm->mi_rows) && (mi_col + ms >= cm->mi_cols))
|
||||
// skip vertical/none partition types
|
||||
if ((mi_row + ms < cm->mi_rows) && (mi_col + ms >= cm->mi_cols))
|
||||
return 2;
|
||||
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user