ref: 551f37d63d508d24dfe071454ca9f38df01c29e9
parent: f18328cbf15b1a0ce194cea6288011beaa183ee6
author: Jingning Han <jingning@google.com>
date: Mon Jun 10 15:54:06 EDT 2013
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
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -313,10 +313,8 @@
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))
+ if ((mi_row + ms < cm->mi_rows) && (mi_col + ms < cm->mi_cols))
return 0;
- if ((mi_col + bs <= cm->mi_cols) && (mi_row + ms < cm->mi_rows))
- return 0;
// frame width/height are multiples of 8, hence 8x8 block should always
// pass the above check
@@ -323,9 +321,11 @@
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;