ref: ebb4c9e8e71b7d9270ecc2c3d87ff1a82c31ec34
parent: 4409a4bcfb6ac12dcbfa3a20eab9115380bbcadd
author: Jingning Han <[email protected]>
date: Mon Feb 9 04:48:44 EST 2015
Fix block partition size in fill_mode_info_sb This commit fixes the sub block partition size used in fill_mode_info_sb. Previous implementation effectively disabled the rectangular block sizes. This commit resolved this issue. Change-Id: Ic1c383ab0a9a2e7d59e85b388093f1f1f94d1e7f
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2810,11 +2810,12 @@
static void fill_mode_info_sb(VP9_COMMON *cm, MACROBLOCK *x,
int mi_row, int mi_col,
- BLOCK_SIZE bsize, BLOCK_SIZE subsize,
+ BLOCK_SIZE bsize,
PC_TREE *pc_tree) {
MACROBLOCKD *xd = &x->e_mbd;
int bsl = b_width_log2_lookup[bsize], hbs = (1 << bsl) / 4;
PARTITION_TYPE partition = pc_tree->partitioning;
+ BLOCK_SIZE subsize = get_subsize(bsize, partition);
assert(bsize >= BLOCK_8X8);
@@ -2830,34 +2831,32 @@
case PARTITION_VERT:
set_mode_info_offsets(cm, xd, mi_row, mi_col);
*(xd->mi[0].src_mi) = pc_tree->vertical[0].mic;
- duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, bsize);
+ duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, subsize);
if (mi_col + hbs < cm->mi_cols) {
set_mode_info_offsets(cm, xd, mi_row, mi_col + hbs);
*(xd->mi[0].src_mi) = pc_tree->vertical[1].mic;
- duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col + hbs, bsize);
+ duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col + hbs, subsize);
}
break;
case PARTITION_HORZ:
set_mode_info_offsets(cm, xd, mi_row, mi_col);
*(xd->mi[0].src_mi) = pc_tree->horizontal[0].mic;
- duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, bsize);
+ duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, subsize);
if (mi_row + hbs < cm->mi_rows) {
set_mode_info_offsets(cm, xd, mi_row + hbs, mi_col);
*(xd->mi[0].src_mi) = pc_tree->horizontal[1].mic;
- duplicate_mode_info_in_sb(cm, xd, mi_row + hbs, mi_col, bsize);
+ duplicate_mode_info_in_sb(cm, xd, mi_row + hbs, mi_col, subsize);
}
break;
case PARTITION_SPLIT: {
- BLOCK_SIZE subsubsize = get_subsize(subsize, PARTITION_SPLIT);
- fill_mode_info_sb(cm, x, mi_row, mi_col, subsize,
- subsubsize, pc_tree->split[0]);
+ fill_mode_info_sb(cm, x, mi_row, mi_col, subsize, pc_tree->split[0]);
fill_mode_info_sb(cm, x, mi_row, mi_col + hbs, subsize,
- subsubsize, pc_tree->split[1]);
+ pc_tree->split[1]);
fill_mode_info_sb(cm, x, mi_row + hbs, mi_col, subsize,
- subsubsize, pc_tree->split[2]);
+ pc_tree->split[2]);
fill_mode_info_sb(cm, x, mi_row + hbs, mi_col + hbs, subsize,
- subsubsize, pc_tree->split[3]);
+ pc_tree->split[3]);
break;
}
default:
@@ -3113,9 +3112,7 @@
}
// update mode info array
- subsize = get_subsize(bsize, pc_tree->partitioning);
- fill_mode_info_sb(cm, x, mi_row, mi_col, bsize, subsize,
- pc_tree);
+ fill_mode_info_sb(cm, x, mi_row, mi_col, bsize, pc_tree);
if (best_rdc.rate < INT_MAX && best_rdc.dist < INT64_MAX && do_recon) {
int output_enabled = (bsize == BLOCK_64X64);