From: Yaowu Xu Date: Mon, 22 Aug 2016 16:55:31 +0000 (-0700) Subject: Make type conversion explicit X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04fe3499a40f60295edd6e40f63b5fc88087ce8d;p=libvpx Make type conversion explicit This fixes two MSVC compiler warnings. Change-Id: I55ad8833676e20c2c4a55885b99a7a9293d9623f --- diff --git a/vp10/encoder/dct.c b/vp10/encoder/dct.c index 2f52ed93c..588f429f0 100644 --- a/vp10/encoder/dct.c +++ b/vp10/encoder/dct.c @@ -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 diff --git a/vp10/encoder/quantize.c b/vp10/encoder/quantize.c index b3f635957..2324173f4 100644 --- a/vp10/encoder/quantize.c +++ b/vp10/encoder/quantize.c @@ -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