summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index b9d0809fd..d17b051ec 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -504,7 +504,7 @@ static void choose_partitioning(VP9_COMP *cpi,
threshold_base = (int64_t)(threshold_multiplier *
vp9_convert_qindex_to_q(cm->base_qindex, cm->bit_depth));
threshold = threshold_base;
- threshold_bsize_min = threshold_base << 6;
+ threshold_bsize_min = threshold_base << cpi->oxcf.speed;
threshold_bsize_max = threshold_base;
// Modify thresholds for key frame and for low-resolutions (set lower
@@ -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;
@@ -3703,10 +3700,10 @@ static void encode_frame_internal(VP9_COMP *cpi) {
#endif // CONFIG_VP9_HIGHBITDEPTH
x->itxm_add = xd->lossless ? vp9_iwht4x4_add : vp9_idct4x4_add;
- if (xd->lossless) {
+ if (xd->lossless)
x->optimize = 0;
- cm->lf.filter_level = 0;
- }
+
+ cm->tx_mode = select_tx_mode(cpi, xd);
vp9_frame_init_quantizer(cpi);
@@ -3794,9 +3791,6 @@ static INTERP_FILTER get_interp_filter(
void vp9_encode_frame(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
- RD_OPT *const rd_opt = &cpi->rd;
- FRAME_COUNTS *counts = cpi->td.counts;
- RD_COUNTS *const rdc = &cpi->td.rd_counts;
// In the longer term the encoder should be generalized to match the
// decoder such that we allow compound where one of the 3 buffers has a
@@ -3818,11 +3812,11 @@ void vp9_encode_frame(VP9_COMP *cpi) {
}
}
- vpx_memset(cpi->td.counts->tx.tx_totals, 0,
- sizeof(cpi->td.counts->tx.tx_totals));
-
if (cpi->sf.frame_parameter_update) {
int i;
+ RD_OPT *const rd_opt = &cpi->rd;
+ FRAME_COUNTS *counts = cpi->td.counts;
+ RD_COUNTS *const rdc = &cpi->td.rd_counts;
// This code does a single RD pass over the whole frame assuming
// either compound, single or hybrid prediction as per whatever has