From 543ea3eb3e25c552e9af598d1131ead84026edae Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Mon, 20 Jun 2016 12:05:29 -0700 Subject: [PATCH] Make type conversion explicit This fixes MSVC warnings. Change-Id: I675d8486230b2b74d7973d95720a4995c4750282 --- vpx_dsp/inv_txfm.h | 4 ++-- vpx_dsp/x86/inv_txfm_sse2.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vpx_dsp/inv_txfm.h b/vpx_dsp/inv_txfm.h index c407dd896..9cfe1be3a 100644 --- a/vpx_dsp/inv_txfm.h +++ b/vpx_dsp/inv_txfm.h @@ -118,13 +118,13 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd); static INLINE uint16_t highbd_clip_pixel_add(uint16_t dest, tran_high_t trans, int bd) { trans = HIGHBD_WRAPLOW(trans, bd); - return clip_pixel_highbd(dest + trans, bd); + return clip_pixel_highbd(dest + (int)trans, bd); } #endif static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) { trans = WRAPLOW(trans); - return clip_pixel(dest + trans); + return clip_pixel(dest + (int)trans); } #ifdef __cplusplus } // extern "C" diff --git a/vpx_dsp/x86/inv_txfm_sse2.c b/vpx_dsp/x86/inv_txfm_sse2.c index 9c0d3eb4c..df5068c62 100644 --- a/vpx_dsp/x86/inv_txfm_sse2.c +++ b/vpx_dsp/x86/inv_txfm_sse2.c @@ -158,8 +158,8 @@ void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, const __m128i zero = _mm_setzero_si128(); int a; - a = dct_const_round_shift(input[0] * cospi_16_64); - a = dct_const_round_shift(a * cospi_16_64); + a = (int)dct_const_round_shift(input[0] * cospi_16_64); + a = (int)dct_const_round_shift(a * cospi_16_64); a = ROUND_POWER_OF_TWO(a, 4); dc_value = _mm_set1_epi16(a); @@ -527,8 +527,8 @@ void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, const __m128i zero = _mm_setzero_si128(); int a; - a = dct_const_round_shift(input[0] * cospi_16_64); - a = dct_const_round_shift(a * cospi_16_64); + a = (int)dct_const_round_shift(input[0] * cospi_16_64); + a = (int)dct_const_round_shift(a * cospi_16_64); a = ROUND_POWER_OF_TWO(a, 5); dc_value = _mm_set1_epi16(a); @@ -1305,8 +1305,8 @@ void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, const __m128i zero = _mm_setzero_si128(); int a, i; - a = dct_const_round_shift(input[0] * cospi_16_64); - a = dct_const_round_shift(a * cospi_16_64); + a = (int)dct_const_round_shift(input[0] * cospi_16_64); + a = (int)dct_const_round_shift(a * cospi_16_64); a = ROUND_POWER_OF_TWO(a, 6); dc_value = _mm_set1_epi16(a); @@ -3462,8 +3462,8 @@ void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, const __m128i zero = _mm_setzero_si128(); int a, j; - a = dct_const_round_shift(input[0] * cospi_16_64); - a = dct_const_round_shift(a * cospi_16_64); + a = (int)dct_const_round_shift(input[0] * cospi_16_64); + a = (int)dct_const_round_shift(a * cospi_16_64); a = ROUND_POWER_OF_TWO(a, 6); dc_value = _mm_set1_epi16(a); -- 2.40.0