For non-rd pickmode: remove VAR_PARTITION condition.
Keep the logic, transform size based on cyclic refresh and bsize,
(that was conditioned on VAR_PARTITION conditions) the same
for all speeds in non-rd mode (speeds >= 5).
No change to speeds >=6.
Small improvement for speed 5, ~0.5/1.5% gain for avg psnr/ssim.
Change-Id: If9c5657f3d30efd3c7f147166bba7cb69ea55114
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index b0e255d..1af6094 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -297,13 +297,11 @@
else
tx_size = TX_8X8;
- if (cpi->sf.partition_search_type == VAR_BASED_PARTITION) {
- if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
- cyclic_refresh_segment_id_boosted(xd->mi[0]->mbmi.segment_id))
- tx_size = TX_8X8;
- else if (tx_size > TX_16X16)
- tx_size = TX_16X16;
- }
+ if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
+ cyclic_refresh_segment_id_boosted(xd->mi[0]->mbmi.segment_id))
+ tx_size = TX_8X8;
+ else if (tx_size > TX_16X16)
+ tx_size = TX_16X16;
} else {
tx_size = MIN(max_txsize_lookup[bsize],
tx_mode_to_biggest_tx_size[cpi->common.tx_mode]);
@@ -481,13 +479,11 @@
else
xd->mi[0]->mbmi.tx_size = TX_8X8;
- if (cpi->sf.partition_search_type == VAR_BASED_PARTITION) {
- if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
- cyclic_refresh_segment_id_boosted(xd->mi[0]->mbmi.segment_id))
- xd->mi[0]->mbmi.tx_size = TX_8X8;
- else if (xd->mi[0]->mbmi.tx_size > TX_16X16)
- xd->mi[0]->mbmi.tx_size = TX_16X16;
- }
+ if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
+ cyclic_refresh_segment_id_boosted(xd->mi[0]->mbmi.segment_id))
+ xd->mi[0]->mbmi.tx_size = TX_8X8;
+ else if (xd->mi[0]->mbmi.tx_size > TX_16X16)
+ xd->mi[0]->mbmi.tx_size = TX_16X16;
} else {
xd->mi[0]->mbmi.tx_size =
MIN(max_txsize_lookup[bsize],
@@ -1081,9 +1077,8 @@
unsigned int var_y = UINT_MAX;
unsigned int sse_y = UINT_MAX;
// Reduce the intra cost penalty for small blocks (<=16x16).
- const int reduction_fac =
- (cpi->sf.partition_search_type == VAR_BASED_PARTITION &&
- bsize <= BLOCK_16X16) ? ((bsize <= BLOCK_8X8) ? 4 : 2) : 0;
+ const int reduction_fac = (bsize <= BLOCK_16X16) ?
+ ((bsize <= BLOCK_8X8) ? 4 : 2) : 0;
const int intra_cost_penalty = vp9_get_intra_cost_penalty(
cm->base_qindex, cm->y_dc_delta_q, cm->bit_depth) >> reduction_fac;
const int64_t inter_mode_thresh = RDCOST(x->rdmult, x->rddiv,