]> granicus.if.org Git - libvpx/commitdiff
Make type conversion explicit
authorYaowu Xu <yaowu@google.com>
Mon, 22 Aug 2016 16:55:31 +0000 (09:55 -0700)
committerYaowu Xu <yaowu@google.com>
Tue, 23 Aug 2016 00:01:00 +0000 (00:01 +0000)
This fixes two MSVC compiler warnings.

Change-Id: I55ad8833676e20c2c4a55885b99a7a9293d9623f

vp10/encoder/dct.c
vp10/encoder/quantize.c

index 2f52ed93c3e29616737564ed06eeef74148b93bd..588f429f080a9b96d161eaa432fe802f7e3ec399 100644 (file)
@@ -1651,11 +1651,11 @@ void vp10_fdct8x8_quant_c(const int16_t *input, int stride,
       int64_t tmp = clamp(abs_coeff + round_ptr[rc != 0], INT16_MIN, INT16_MAX);
       int tmp32;
 #if CONFIG_AOM_QM
-      tmp32 = (tmp * quant_ptr[rc != 0] * wt) >> (16 + AOM_QM_BITS);
+      tmp32 = (int)((tmp * quant_ptr[rc != 0] * wt) >> (16 + AOM_QM_BITS));
       qcoeff_ptr[rc] = (tmp32 ^ coeff_sign) - coeff_sign;
       dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant;
 #else
-      tmp32 = (tmp * quant_ptr[rc != 0]) >> 16;
+      tmp32 = (int)((tmp * quant_ptr[rc != 0]) >> 16);
       qcoeff_ptr[rc] = (tmp32 ^ coeff_sign) - coeff_sign;
       dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0];
 #endif
index b3f6359572ec5ba521fecd46f1fd4c09818ab505..2324173f485d2c928980cfb6615fe8d835b2ef4e 100644 (file)
@@ -791,11 +791,11 @@ void vp10_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
       int64_t tmp = clamp(abs_coeff + round_ptr[rc != 0], INT16_MIN, INT16_MAX);
       int tmp32;
 #if CONFIG_AOM_QM
-      tmp32 = (tmp * wt * quant_ptr[rc != 0]) >> (16 + AOM_QM_BITS);
+      tmp32 = (int)((tmp * wt * quant_ptr[rc != 0]) >> (16 + AOM_QM_BITS));
       qcoeff_ptr[rc] = (tmp32 ^ coeff_sign) - coeff_sign;
       dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant;
 #else
-      tmp32 = (tmp * quant_ptr[rc != 0]) >> 16;
+      tmp32 = (int)((tmp * quant_ptr[rc != 0]) >> 16);
       qcoeff_ptr[rc] = (tmp32 ^ coeff_sign) - coeff_sign;
       dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0];
 #endif