]> granicus.if.org Git - libvpx/commitdiff
vp9_ratectrl.c: Fix MSVC warnings.
authorTom Finegan <tomfinegan@google.com>
Thu, 22 May 2014 21:10:11 +0000 (14:10 -0700)
committerTom Finegan <tomfinegan@google.com>
Thu, 22 May 2014 21:44:37 +0000 (14:44 -0700)
Change-Id: I4bd635949240880ced5f581c24e981ccd0374e40

vp9/encoder/vp9_ratectrl.c

index af889e3662ea5ddcc3aacf84f85c7ac419b0d8d5..b57e3897e0d8f751b5ddd2f29fa6cc0352fc3d2b 100644 (file)
@@ -612,9 +612,9 @@ static int get_active_cq_level(const RATE_CONTROL *rc,
   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;