Move set_speed_feature out of frame encoding
Set speed features before running frame encoding. This avoids redundant RD threshold calculation in key frame coding. Change-Id: If8e3cf2c02976baa59b310c1c23af9eea0c46e36
This commit is contained in:
@@ -2682,6 +2682,9 @@ void vp9_encode_frame(VP9_COMP *cpi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cpi->mb.e_mbd.lossless = cpi->oxcf.lossless;
|
||||
select_tx_mode(cpi);
|
||||
cm->reference_mode = SINGLE_REFERENCE;
|
||||
// Force the usage of the BILINEAR interp_filter.
|
||||
cm->interp_filter = BILINEAR;
|
||||
encode_frame_internal(cpi);
|
||||
|
||||
@@ -3251,6 +3251,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
|
||||
set_high_precision_mv(cpi, q < HIGH_PRECISION_MV_QTHRESH);
|
||||
}
|
||||
|
||||
vp9_set_speed_features(cpi);
|
||||
|
||||
if (cpi->sf.recode_loop == DISALLOW_RECODE) {
|
||||
encode_without_recode_loop(cpi, size, dest, q);
|
||||
} else {
|
||||
|
||||
@@ -282,8 +282,6 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
|
||||
x->errorperbit = cpi->RDMULT / RD_MULT_EPB_RATIO;
|
||||
x->errorperbit += (x->errorperbit == 0);
|
||||
|
||||
vp9_set_speed_features(cpi);
|
||||
|
||||
x->select_txfm_size = (cpi->sf.tx_size_search_method == USE_LARGESTALL &&
|
||||
cm->frame_type != KEY_FRAME) ? 0 : 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user