vp9: Allow usage of lookahead for real-time, 1 pass vbr.

Allow usage of lookahead for VBR in real-time mode, for 1 pass vbr.

Current usage is for fast checking of future scene cuts/changes,
and adjusting rate control (gf interval and active_worst/target size).

Added unittests (datarate) for 1 pass vbr mode, with non-zero lag.

Added an experimental option to limit QP based on lookahead.

Overall positive gain in metrics on ytlive set:
avgPNSR/SSIM up on average ~1-3%; several clips up by 5, 7%.

Change-Id: I960d57dfc89de121c4824b9a9bf88d2814e74b56
This commit is contained in:
Marco
2016-02-17 12:03:57 -08:00
parent 3e04114f3d
commit 05fe0f20a6
6 changed files with 308 additions and 76 deletions

View File

@@ -24,7 +24,7 @@ static const char quantizer_warning_string[] =
"Bad quantizer values. Quantizer values should not be equal, and should "
"differ by at least 8.";
static const char lag_in_frames_with_realtime[] =
"Lag in frames is ignored when deadline is set to realtime.";
"Lag in frames is ignored when deadline is set to realtime for cbr mode.";
struct WarningListNode {
const char *warning_string;
@@ -80,8 +80,9 @@ static void check_quantizer(int min_q, int max_q,
static void check_lag_in_frames_realtime_deadline(
int lag_in_frames,
int deadline,
int rc_end_usage,
struct WarningList *warning_list) {
if (deadline == VPX_DL_REALTIME && lag_in_frames != 0)
if (deadline == VPX_DL_REALTIME && lag_in_frames != 0 && rc_end_usage == 1)
add_warning(lag_in_frames_with_realtime, warning_list);
}
@@ -97,6 +98,7 @@ void check_encoder_config(int disable_prompt,
&warning_list);
check_lag_in_frames_realtime_deadline(stream_config->g_lag_in_frames,
global_config->deadline,
stream_config->rc_end_usage,
&warning_list);
/* Count and print warnings. */
for (warning = warning_list.warning_node;