Move tx_mode decision logic into select_tx_mode()
Change-Id: I7f8f78c33eb3f33344b029a27bda320f4d68c577
This commit is contained in:
parent
a844a778c7
commit
581aee001e
@ -2749,6 +2749,10 @@ static MV_REFERENCE_FRAME get_frame_type(const VP9_COMP *cpi) {
|
||||
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||
|
||||
@ -3684,13 +3688,6 @@ static void encode_frame_internal(VP9_COMP *cpi) {
|
||||
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;
|
||||
@ -3708,6 +3705,8 @@ static void encode_frame_internal(VP9_COMP *cpi) {
|
||||
cm->lf.filter_level = 0;
|
||||
}
|
||||
|
||||
cm->tx_mode = select_tx_mode(cpi, xd);
|
||||
|
||||
vp9_frame_init_quantizer(cpi);
|
||||
|
||||
vp9_initialize_rd_consts(cpi);
|
||||
|
Loading…
x
Reference in New Issue
Block a user