ref: f0eea5be2a0e3dd8b41bd1e88fe0e1c58944f81b
parent: 84b813aa42c99bce15cec774153bdb1cd09e9578
parent: ebb4c9e8e71b7d9270ecc2c3d87ff1a82c31ec34
author: Jingning Han <[email protected]>
date: Tue Feb 10 05:49:03 EST 2015
Merge "Fix block partition size in fill_mode_info_sb"
--- 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);