Commit a614262e authored by Yue Chen's avatar Yue Chen
Browse files

Optimizing obmc rd decision by checking the real rd cost

Instead of using model_rd_for_sb() to estimate the cost and make the
decision on bmc/obmc, we use super_block_yrd/uvrd() to calculate and
compare the real rd costs of bmc and obmc.

Average bit-rate reduction(%) of obmc experiment:
Before the optimization, the coding gain was:

Note: there is still some mysterious bug because that compared to
the previous version, the performance at low bit rate drops a lot.

Change-Id: I8dbee04a272190f10516a3953c1ae690f8136766
parent 35d9eadf
...@@ -104,6 +104,9 @@ struct macroblock { ...@@ -104,6 +104,9 @@ struct macroblock {
int mv_best_ref_index[MAX_REF_FRAMES]; int mv_best_ref_index[MAX_REF_FRAMES];
unsigned int max_mv_context[MAX_REF_FRAMES]; unsigned int max_mv_context[MAX_REF_FRAMES];
unsigned int source_variance; unsigned int source_variance;
unsigned int pred_variance;
#endif // CONFIG_OBMC
unsigned int pred_sse[MAX_REF_FRAMES]; unsigned int pred_sse[MAX_REF_FRAMES];
int pred_mv_sad[MAX_REF_FRAMES]; int pred_mv_sad[MAX_REF_FRAMES];
...@@ -4367,6 +4367,9 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td, ...@@ -4367,6 +4367,9 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td,
const int mi_height = num_8x8_blocks_high_lookup[bsize]; const int mi_height = num_8x8_blocks_high_lookup[bsize];
x->skip_recode = !x->select_tx_size && mbmi->sb_type >= BLOCK_8X8 && x->skip_recode = !x->select_tx_size && mbmi->sb_type >= BLOCK_8X8 &&
!(is_inter_block(mbmi) && is_obmc_allowed(mbmi)) &&
#endif // CONFIG_OBMC
cpi->oxcf.aq_mode != COMPLEXITY_AQ && cpi->oxcf.aq_mode != COMPLEXITY_AQ &&
cpi->oxcf.aq_mode != CYCLIC_REFRESH_AQ && cpi->oxcf.aq_mode != CYCLIC_REFRESH_AQ &&
cpi->sf.allow_skip_recode; cpi->sf.allow_skip_recode;
This diff is collapsed.
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