diff options
author | Marco <marpan@google.com> | 2017-11-21 15:04:53 -0800 |
---|---|---|
committer | Marco <marpan@google.com> | 2017-11-26 22:17:48 -0800 |
commit | cbe62b9c2d2b006aba52c8eebe7d842e59166fe4 (patch) | |
tree | 0fb498a36115237a5b1d48242da8b9c12f02fcbf /vp9 | |
parent | 9639641cd43ffc46f7e55a6dabc54a197f2b65f9 (diff) | |
download | libvpx-cbe62b9c2d2b006aba52c8eebe7d842e59166fe4.tar libvpx-cbe62b9c2d2b006aba52c8eebe7d842e59166fe4.tar.gz libvpx-cbe62b9c2d2b006aba52c8eebe7d842e59166fe4.tar.bz2 libvpx-cbe62b9c2d2b006aba52c8eebe7d842e59166fe4.zip |
vp9-svc: Fix to the layer buffer settings.
For the case when the number of temporal layers > 1,
the buffer levels (starting/optimal_buffer_level,
and maximum_buffer_size) were not scaled properly.
In vp9_update_layer_context_change_config():
when setting the layer-buffer levels, fix is to scale
the layer-target_bandwidth by the target_bandwidth
(which is the full stream bandwidth) instead of the
spatial_layer_target.
This is needed because prior to the call
vp9_update_layer_context_change_config(), set_rc_buffer_sizes()
is called which sets the buffer levels based on target bandwidth
(which is the full bandwidth for the SVC stream).
This fix properly sets the layer-buffer levels based on the
layer-bandwidth, and leads to better rate targeting.
Small/neutral change in avgPSNR/SSIM metrics on RTC set.
Change-Id: Ic0f4f7f3487c37b9a9adb4781ae5edfed7140a57
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_svc_layercontext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index 4b928679c..b33434e62 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -174,7 +174,7 @@ void vp9_update_layer_context_change_config(VP9_COMP *const cpi, RATE_CONTROL *const lrc = &lc->rc; lc->spatial_layer_target_bandwidth = spatial_layer_target; - bitrate_alloc = (float)lc->target_bandwidth / spatial_layer_target; + bitrate_alloc = (float)lc->target_bandwidth / target_bandwidth; lrc->starting_buffer_level = (int64_t)(rc->starting_buffer_level * bitrate_alloc); lrc->optimal_buffer_level = |