From 7025d72cd8e7ba48d6fc4bfca46b843a1050f060 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Wed, 20 Aug 2014 11:24:48 -0700 Subject: [PATCH] Revert "Removing unnecessary casts to int64_t." My fault, that was a float (not integer) which was converted to int64_t. This reverts commit a885e1cbf0551973daa42dbca032174be00bb577 Change-Id: Ic50708b959e1c3cb3e37da1429d334fafc3391d6 --- vp9/encoder/vp9_svc_layercontext.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index 1d9bdd869..fb52d1ab7 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -106,9 +106,12 @@ void vp9_update_layer_context_change_config(VP9_COMP *const cpi, } bitrate_alloc = (float)lc->target_bandwidth / target_bandwidth; // Update buffer-related quantities. - lrc->starting_buffer_level = rc->starting_buffer_level * bitrate_alloc; - lrc->optimal_buffer_level = rc->optimal_buffer_level * bitrate_alloc; - lrc->maximum_buffer_size = rc->maximum_buffer_size * bitrate_alloc; + lrc->starting_buffer_level = + (int64_t)(rc->starting_buffer_level * bitrate_alloc); + lrc->optimal_buffer_level = + (int64_t)(rc->optimal_buffer_level * bitrate_alloc); + lrc->maximum_buffer_size = + (int64_t)(rc->maximum_buffer_size * bitrate_alloc); lrc->bits_off_target = MIN(lrc->bits_off_target, lrc->maximum_buffer_size); lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size); // Update framerate-related quantities. -- 2.40.0