shithub: libvpx

Download patch

ref: 00fbdc159b1ac4896a57a8ef5665a24df4a06e19
parent: 639e16ee00e37dab9f73830a349603c17f97ac8b
parent: 4205b51d512cd789d4d39bc43edfa47c66ef0ccd
author: Tom Finegan <tomfinegan@google.com>
date: Thu May 22 11:16:01 EDT 2014

Merge "vp9_ratectrl.c: Fix MSVC warnings."

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -612,9 +612,9 @@
   static const double cq_adjust_threshold = 0.5;
   int active_cq_level = oxcf->cq_level;
   if (oxcf->rc_mode == RC_MODE_CONSTRAINED_QUALITY) {
-    const double x = rc->total_actual_bits / rc->total_target_bits;
+    const double x = (double)rc->total_actual_bits / rc->total_target_bits;
     if (x < cq_adjust_threshold) {
-      active_cq_level = active_cq_level * x / cq_adjust_threshold;
+      active_cq_level = (int)(active_cq_level * x / cq_adjust_threshold);
     }
   }
   return active_cq_level;