shithub: libvpx

Download patch

ref: 22bbdc48f634a7076ceff5445d81dd7ad08e7ea2
parent: c8e933ef4be6c8cbe28734c62e7765bbbb76d4da
parent: 7025d72cd8e7ba48d6fc4bfca46b843a1050f060
author: Dmitry Kovalev <[email protected]>
date: Wed Aug 20 08:31:32 EDT 2014

Merge "Revert "Removing unnecessary casts to int64_t.""

--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -106,9 +106,12 @@
     }
     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.