ref: cd6f742980f1962d1ac6da98bbf32ab419725ff2
parent: 880adc33553cf0b48b91aea33eb7cccc730a6c39
author: Marco <marpan@google.com>
date: Thu Dec 8 10:25:07 EST 2016
vp8 multi_res_encoder: Ajust some settings in sample encoder. Set #threads to default 1 for all streams, change bit allocaton for 3 temporal layers, and enable denoiser on middle resolution layer. Change-Id: I4a57adbfdb2c319002b8f3cf359613842dc00d75
--- a/examples/vp8_multi_resolution_encoder.c
+++ b/examples/vp8_multi_resolution_encoder.c
@@ -240,9 +240,9 @@
cfg->ts_layer_id[1] = 2;
cfg->ts_layer_id[2] = 1;
cfg->ts_layer_id[3] = 2;
- // Use 40/20/40 bit allocation as example.
- cfg->ts_target_bitrate[0] = 0.4f * bitrate;
- cfg->ts_target_bitrate[1] = 0.6f * bitrate;
+ // Use 45/20/35 bit allocation as example.
+ cfg->ts_target_bitrate[0] = 0.45f * bitrate;
+ cfg->ts_target_bitrate[1] = 0.65f * bitrate;
cfg->ts_target_bitrate[2] = bitrate;
/* 0=L, 1=GF, 2=ARF */
@@ -460,7 +460,7 @@
// Set the number of threads per encode/spatial layer.
// (1, 1, 1) means no encoder threading.
- cfg[0].g_threads = 2;
+ cfg[0].g_threads = 1;
cfg[1].g_threads = 1;
cfg[2].g_threads = 1;
@@ -507,9 +507,11 @@
/* Set NOISE_SENSITIVITY to do TEMPORAL_DENOISING */
/* Enable denoising for the highest-resolution encoder. */
- if (vpx_codec_control(&codec[0], VP8E_SET_NOISE_SENSITIVITY, 4))
+ if (vpx_codec_control(&codec[0], VP8E_SET_NOISE_SENSITIVITY, 1))
die_codec(&codec[0], "Failed to set noise_sensitivity");
- for (i = 1; i < NUM_ENCODERS; i++) {
+ if (vpx_codec_control(&codec[1], VP8E_SET_NOISE_SENSITIVITY, 1))
+ die_codec(&codec[1], "Failed to set noise_sensitivity");
+ for (i = 2; i < NUM_ENCODERS; i++) {
if (vpx_codec_control(&codec[i], VP8E_SET_NOISE_SENSITIVITY, 0))
die_codec(&codec[i], "Failed to set noise_sensitivity");
}