Porting ext_partition experiment from nextgen
This has been ported under ext_partition_types because it is due to be combined with the coding_unit_size experiment which is already being ported under ext_partition Change-Id: I47af869ae123ddf0aa99160dac644059d14266ee
This commit is contained in:
committed by
Debargha Mukherjee
parent
cbfc15b11b
commit
5cce322a09
@@ -164,15 +164,106 @@ static void count_segs_sb(const VP10_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col,
|
||||
BLOCK_SIZE bsize) {
|
||||
const int mis = cm->mi_stride;
|
||||
int bw, bh;
|
||||
const int bs = num_8x8_blocks_wide_lookup[bsize], hbs = bs / 2;
|
||||
#if CONFIG_EXT_PARTITION_TYPES
|
||||
PARTITION_TYPE partition;
|
||||
#else
|
||||
const int bw = num_8x8_blocks_wide_lookup[mi[0]->mbmi.sb_type];
|
||||
const int bh = num_8x8_blocks_high_lookup[mi[0]->mbmi.sb_type];
|
||||
#endif // CONFIG_EXT_PARTITION_TYPES
|
||||
|
||||
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
|
||||
return;
|
||||
|
||||
bw = num_8x8_blocks_wide_lookup[mi[0]->mbmi.sb_type];
|
||||
bh = num_8x8_blocks_high_lookup[mi[0]->mbmi.sb_type];
|
||||
|
||||
#if CONFIG_EXT_PARTITION_TYPES
|
||||
if (bsize == BLOCK_8X8)
|
||||
partition = PARTITION_NONE;
|
||||
else
|
||||
partition = get_partition(cm->mi, cm->mi_stride, cm->mi_rows, cm->mi_cols,
|
||||
mi_row, mi_col, bsize);
|
||||
switch (partition) {
|
||||
case PARTITION_NONE:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, bs, bs, mi_row, mi_col);
|
||||
break;
|
||||
case PARTITION_HORZ:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, bs, hbs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs * mis, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, bs, hbs,
|
||||
mi_row + hbs, mi_col);
|
||||
break;
|
||||
case PARTITION_VERT:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, bs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs,
|
||||
no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, bs, mi_row, mi_col + hbs);
|
||||
break;
|
||||
case PARTITION_HORZ_A:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, hbs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, hbs, hbs,
|
||||
mi_row, mi_col + hbs);
|
||||
count_segs(cm, xd, tile, mi + hbs * mis, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, bs, hbs,
|
||||
mi_row + hbs, mi_col);
|
||||
break;
|
||||
case PARTITION_HORZ_B:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, bs, hbs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs * mis, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, hbs, hbs,
|
||||
mi_row + hbs, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs + hbs * mis, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, hbs, hbs,
|
||||
mi_row + hbs, mi_col + hbs);
|
||||
break;
|
||||
case PARTITION_VERT_A:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, hbs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs * mis, no_pred_segcounts,
|
||||
temporal_predictor_count, t_unpred_seg_counts, hbs, hbs,
|
||||
mi_row + hbs, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs,
|
||||
no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, bs, mi_row, mi_col + hbs);
|
||||
break;
|
||||
case PARTITION_VERT_B:
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, bs, mi_row, mi_col);
|
||||
count_segs(cm, xd, tile, mi + hbs,
|
||||
no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, hbs, mi_row, mi_col + hbs);
|
||||
count_segs(cm, xd, tile, mi + hbs + hbs * mis,
|
||||
no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, hbs, hbs, mi_row + hbs, mi_col + hbs);
|
||||
break;
|
||||
case PARTITION_SPLIT:
|
||||
{
|
||||
const BLOCK_SIZE subsize = subsize_lookup[PARTITION_SPLIT][bsize];
|
||||
int n;
|
||||
|
||||
assert(num_8x8_blocks_wide_lookup[mi[0]->mbmi.sb_type] < bs &&
|
||||
num_8x8_blocks_high_lookup[mi[0]->mbmi.sb_type] < bs);
|
||||
|
||||
for (n = 0; n < 4; n++) {
|
||||
const int mi_dc = hbs * (n & 1);
|
||||
const int mi_dr = hbs * (n >> 1);
|
||||
|
||||
count_segs_sb(cm, xd, tile, &mi[mi_dr * mis + mi_dc],
|
||||
no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts,
|
||||
mi_row + mi_dr, mi_col + mi_dc, subsize);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
#else
|
||||
if (bw == bs && bh == bs) {
|
||||
count_segs(cm, xd, tile, mi, no_pred_segcounts, temporal_predictor_count,
|
||||
t_unpred_seg_counts, bs, bs, mi_row, mi_col);
|
||||
@@ -204,6 +295,7 @@ static void count_segs_sb(const VP10_COMMON *cm, MACROBLOCKD *xd,
|
||||
mi_row + mi_dr, mi_col + mi_dc, subsize);
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_EXT_PARTITION_TYPES
|
||||
}
|
||||
|
||||
void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) {
|
||||
|
||||
Reference in New Issue
Block a user