Commit bf9c6b76 authored by Jingning Han's avatar Jingning Han

Enable 4x4 block partition search

This commit enables the 4x4 level block partition search. It turns
on the 4x4 level coding block unit.

Change-Id: I7251db10176fd6c4f853604d263170721252dd4f
parent cc60daae
......@@ -2163,11 +2163,16 @@ static void write_partition(const AV1_COMMON *const cm,
const MACROBLOCKD *const xd, int hbs, int mi_row,
int mi_col, PARTITION_TYPE p, BLOCK_SIZE bsize,
aom_writer *w) {
const int ctx = partition_plane_context(xd, mi_row, mi_col, bsize);
const int is_partition_point = bsize >= BLOCK_8X8;
const int ctx = is_partition_point
? partition_plane_context(xd, mi_row, mi_col, bsize)
: 0;
const aom_prob *const probs = cm->fc->partition_prob[ctx];
const int has_rows = (mi_row + hbs) < cm->mi_rows;
const int has_cols = (mi_col + hbs) < cm->mi_cols;
if (!is_partition_point) return;
if (has_rows && has_cols) {
#if CONFIG_EXT_PARTITION_TYPES
if (bsize <= BLOCK_8X8)
......
This diff is collapsed.
......@@ -1377,13 +1377,16 @@ static int64_t txfm_yrd(const AV1_COMP *const cpi, MACROBLOCK *x,
aom_prob skip_prob = av1_get_skip_prob(cm, xd);
int s0, s1;
const int is_inter = is_inter_block(mbmi);
const int tx_size_ctx = get_tx_size_context(xd);
const int tx_size_cat =
is_inter ? inter_tx_size_cat_lookup[bs] : intra_tx_size_cat_lookup[bs];
const TX_SIZE coded_tx_size = txsize_sqr_up_map[tx_size];
const int depth = tx_size_to_depth(coded_tx_size);
const int tx_select = cm->tx_mode == TX_MODE_SELECT;
const int r_tx_size = cpi->tx_size_cost[tx_size_cat][tx_size_ctx][depth];
const int tx_select =
cm->tx_mode == TX_MODE_SELECT && mbmi->sb_type >= BLOCK_8X8;
const int tx_size_ctx = tx_select ? get_tx_size_context(xd) : 0;
const int r_tx_size =
tx_select ? cpi->tx_size_cost[tx_size_cat][tx_size_ctx][depth] : 0;
assert(skip_prob > 0);
#if CONFIG_EXT_TX && CONFIG_RECT_TX
......@@ -2968,7 +2971,8 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
this_rate = this_rate_tokenonly + bmode_costs[mic->mbmi.mode];
if (!xd->lossless[xd->mi[0]->mbmi.segment_id]) {
if (!xd->lossless[xd->mi[0]->mbmi.segment_id] &&
mic->mbmi.sb_type >= BLOCK_8X8) {
// super_block_yrd above includes the cost of the tx_size in the
// tokenonly rate, but for intra blocks, tx_size is always coded
// (prediction granularity), so we account for it in the full rate,
......@@ -9198,7 +9202,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_ctx], 0);
#endif // CONFIG_PALETTE
if (!xd->lossless[mbmi->segment_id]) {
if (!xd->lossless[mbmi->segment_id] && bsize >= BLOCK_8X8) {
// super_block_yrd above includes the cost of the tx_size in the
// tokenonly rate, but for intra blocks, tx_size is always coded
// (prediction granularity), so we account for it in the full rate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment