shithub: libvpx

Download patch

ref: 8f7e7663ad50cae947c83bfe12144da8e61c3956
parent: 877fac122b283455cf699e41e2fd4d455ef122dc
author: Marco <[email protected]>
date: Thu Jun 4 09:09:44 EDT 2015

Bugfx in setting layer framerate.

Index for ts_rate_decimator should be temporal layer (tl) index.

Change-Id: I0320b7f7ae987ef64fdfe7c45099e7978a8fef17

--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -131,7 +131,6 @@
         LAYER_CONTEXT *const lc =
             &svc->layer_context[sl * oxcf->ts_number_layers + tl];
         RATE_CONTROL *const lrc = &lc->rc;
-        layer = LAYER_IDS_TO_IDX(sl, tl, oxcf->ts_number_layers);
 
         lc->spatial_layer_target_bandwidth = spatial_layer_target;
         bitrate_alloc = (float)lc->target_bandwidth / spatial_layer_target;
@@ -144,7 +143,7 @@
         lrc->bits_off_target =
             MIN(lrc->bits_off_target, lrc->maximum_buffer_size);
         lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size);
-        lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[layer];
+        lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[tl];
         lrc->avg_frame_bandwidth = (int)(lc->target_bandwidth / lc->framerate);
         lrc->max_frame_bandwidth = rc->max_frame_bandwidth;
         lrc->worst_quality = rc->worst_quality;