ref: a57cff2132e9cff8767c6df9ff05409d399f43ec
parent: 7281c0b9086c10f1397aff9eb4b4d70e1c283369
author: Jingning Han <[email protected]>
date: Tue Mar 4 05:24:25 EST 2014
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
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2682,6 +2682,9 @@
}
}
} 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);
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3251,6 +3251,8 @@
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 {
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -282,8 +282,6 @@
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;