Commit eb8f5e87 authored by Jingning Han's avatar Jingning Han

Conditionally skip transform block partition search

Speed up recursive transform block partition search. When a txfm
block is selected as all zero coefficients, skip the search over
further split partition.

Tested with txk-sel on, this makes the speed 0 / 1 both 10 - 15%
faster at medium - high target bit-rate range. The coding
performance change is neutral - 0.011% better for lowres set.

Change-Id: I1247f3d5a33d15bf4bc5f0bcbac2bf1f3e1aca2e
parent 13025199
......@@ -3947,6 +3947,10 @@ static void select_tx_block(const AV1_COMP *cpi, MACROBLOCK *x, int blk_row,
int tx_split_prune_flag = 0;
if (cpi->sf.tx_type_search.prune_mode >= PRUNE_2D_ACCURATE)
tx_split_prune_flag = ((x->tx_search_prune[0] >> TX_TYPES) & 1);
if (cpi->sf.txb_split_cap)
if (p->eobs[block] == 0) tx_split_prune_flag = 1;
if (tx_size > TX_4X4 && depth < MAX_VARTX_DEPTH && tx_split_prune_flag == 0) {
const TX_SIZE sub_txs = sub_tx_size_map[1][tx_size];
const int bsw = tx_size_wide_unit[sub_txs];
......
......@@ -494,6 +494,7 @@ void av1_set_speed_features_framesize_independent(AV1_COMP *cpi) {
sf->fast_wedge_sign_estimate = 0;
sf->drop_ref = 0;
sf->skip_intra_in_interframe = 1;
sf->txb_split_cap = 1;
for (i = 0; i < TX_SIZES; i++) {
sf->intra_y_mode_mask[i] = INTRA_ALL;
......
......@@ -349,6 +349,10 @@ typedef struct SPEED_FEATURES {
TX_TYPE_SEARCH tx_type_search;
// Skip split transform block partition when the collocated bigger block
// is selected as all zero coefficients.
int txb_split_cap;
// Used if partition_search_type = FIXED_SIZE_PARTITION
BLOCK_SIZE always_this_block_size;
......
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