diff --git a/vp10/encoder/dct.c b/vp10/encoder/dct.c index 2f52ed93c3e29616737564ed06eeef74148b93bd..588f429f080a9b96d161eaa432fe802f7e3ec399 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 b3f6359572ec5ba521fecd46f1fd4c09818ab505..2324173f485d2c928980cfb6615fe8d835b2ef4e 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