shithub: libvpx

Download patch

ref: 885872f8995fa7dfe7962ae1dfa357af29ac547f
parent: 9c2ed00c8c16b0f55fbc994d15cbc3b3c279dc99
author: Yunqing Wang <[email protected]>
date: Wed Apr 13 05:09:08 EDT 2016

Fix Visual Studio build warning

Fixed warning C4244: '-=' : conversion from 'const double' to 'int',
possible loss of data.

Change-Id: Ic4691346037767b244e7f71248c2f871f92002f3

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -835,8 +835,8 @@
   int active_cq_level = oxcf->cq_level;
   if (oxcf->rc_mode == VPX_CQ) {
     if (twopass->mb_smooth_pct > SMOOTH_PCT_MIN) {
-      active_cq_level -= (twopass->mb_smooth_pct - SMOOTH_PCT_MIN) /
-          SMOOTH_PCT_DIV;
+      active_cq_level -= (int)((twopass->mb_smooth_pct - SMOOTH_PCT_MIN) /
+          SMOOTH_PCT_DIV);
       active_cq_level = VPXMAX(active_cq_level, 0);
     }
     if (rc->total_target_bits > 0) {