static TX_MODE select_tx_mode(const VP9_COMP *cpi, MACROBLOCKD *const xd) {
if (xd->lossless)
return ONLY_4X4;
+ if (cpi->common.frame_type == KEY_FRAME &&
+ cpi->sf.use_nonrd_pick_mode &&
+ cpi->sf.partition_search_type == VAR_BASED_PARTITION)
+ return ALLOW_16X16;
if (cpi->sf.tx_size_search_method == USE_LARGESTALL)
return ALLOW_32X32;
else if (cpi->sf.tx_size_search_method == USE_FULL_RD||
cm->uv_dc_delta_q == 0 &&
cm->uv_ac_delta_q == 0;
- cm->tx_mode = select_tx_mode(cpi, xd);
- if (cm->frame_type == KEY_FRAME &&
- cpi->sf.use_nonrd_pick_mode &&
- cpi->sf.partition_search_type == VAR_BASED_PARTITION) {
- cm->tx_mode = ALLOW_16X16;
- }
-
#if CONFIG_VP9_HIGHBITDEPTH
if (cm->use_highbitdepth)
x->fwd_txm4x4 = xd->lossless ? vp9_highbd_fwht4x4 : vp9_highbd_fdct4x4;
cm->lf.filter_level = 0;
}
+ cm->tx_mode = select_tx_mode(cpi, xd);
+
vp9_frame_init_quantizer(cpi);
vp9_initialize_rd_consts(cpi);