ref: badd32d91417d780d4eee465c212b755a8f1307b
parent: a91fe33c6d65010fe28b5cf2dec4fc8f6a48edc9
parent: dc42f343ae4365d68a096498ecdd8a960414905a
author: Paul Wilkins <[email protected]>
date: Fri Aug 26 11:46:45 EDT 2016
Merge "Add ALLOW_RECODE_FIRST speed mode."
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2425,8 +2425,9 @@
if ((rc->projected_frame_size >= rc->max_frame_bandwidth) ||
big_rate_miss(cpi, high_limit, low_limit) ||
(cpi->sf.recode_loop == ALLOW_RECODE) ||
- ((frame_is_kfgfarf || two_pass_first_group_inter(cpi)) &&
- (cpi->sf.recode_loop == ALLOW_RECODE_KFARFGF))) {
+ (two_pass_first_group_inter(cpi) &&
+ (cpi->sf.recode_loop == ALLOW_RECODE_FIRST)) ||
+ (frame_is_kfgfarf && (cpi->sf.recode_loop >= ALLOW_RECODE_KFARFGF))) {
if (frame_is_kfgfarf && (oxcf->resize_mode == RESIZE_DYNAMIC) &&
scale_down(cpi, q)) {
// Code this group at a lower resolution.
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -170,7 +170,6 @@
sf->mode_skip_start = 10;
sf->adaptive_pred_interp_filter = 1;
- sf->recode_loop = ALLOW_RECODE_KFARFGF;
sf->intra_y_mode_mask[TX_32X32] = INTRA_DC_H_V;
sf->intra_uv_mode_mask[TX_32X32] = INTRA_DC_H_V;
sf->intra_y_mode_mask[TX_16X16] = INTRA_DC_H_V;
@@ -180,6 +179,7 @@
}
if (speed >= 2) {
+ sf->recode_loop = ALLOW_RECODE_KFARFGF;
sf->tx_size_search_method =
frame_is_boosted(cpi) ? USE_FULL_RD : USE_LARGESTALL;
@@ -529,7 +529,7 @@
// best quality defaults
sf->frame_parameter_update = 1;
sf->mv.search_method = NSTEP;
- sf->recode_loop = ALLOW_RECODE_KFARFGF;
+ sf->recode_loop = ALLOW_RECODE_FIRST;
sf->mv.subpel_search_method = SUBPEL_TREE;
sf->mv.subpel_iters_per_step = 2;
sf->mv.subpel_force_stop = 0;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -67,8 +67,10 @@
ALLOW_RECODE_KFMAXBW = 1,
// Allow recode only for KF/ARF/GF frames.
ALLOW_RECODE_KFARFGF = 2,
+ // Allow recode for ARF/GF/KF and first normal frame in each group.
+ ALLOW_RECODE_FIRST = 3,
// Allow recode for all frames based on bitrate constraints.
- ALLOW_RECODE = 3,
+ ALLOW_RECODE = 4,
} RECODE_LOOP_TYPE;
typedef enum {