diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h index 6121273c54dd5ca89ae86562360fd25f9263526d..d06db5f4bc498053b076bc91f04df2e35c1af8bf 100644 --- a/aom_dsp/bitreader.h +++ b/aom_dsp/bitreader.h @@ -78,7 +78,7 @@ static INLINE int aom_reader_init(aom_reader *r, const uint8_t *buffer, #elif CONFIG_DAALA_EC (void)decrypt_cb; (void)decrypt_state; - return aom_daala_reader_init(r, buffer, size); + return aom_daala_reader_init(r, buffer, (int)size); #else return aom_dk_reader_init(r, buffer, size, decrypt_cb, decrypt_state); #endif diff --git a/aom_dsp/dkboolreader.h b/aom_dsp/dkboolreader.h index add480a5dda0a3cbbedc6f7b061f4ce06e834d4d..fe3e92046efb8cfae9dc4e1c86706a443ccb3ea4 100644 --- a/aom_dsp/dkboolreader.h +++ b/aom_dsp/dkboolreader.h @@ -69,7 +69,8 @@ void aom_dk_reader_fill(struct aom_dk_reader *r); const uint8_t *aom_dk_reader_find_end(struct aom_dk_reader *r); static INLINE uint32_t aom_dk_reader_tell(const struct aom_dk_reader *r) { - const uint32_t bits_read = (r->buffer - r->buffer_start) * CHAR_BIT; + const uint32_t bits_read = + (uint32_t)((r->buffer - r->buffer_start) * CHAR_BIT); const int count = (r->count < LOTS_OF_BITS) ? r->count : r->count - LOTS_OF_BITS; assert(r->buffer >= r->buffer_start); diff --git a/aom_dsp/entdec.c b/aom_dsp/entdec.c index b015956fa03d93e0e4de21293cd667a2a08fb02d..4a0cd768841dbdbba0a80e78ad7d56534196c436 100644 --- a/aom_dsp/entdec.c +++ b/aom_dsp/entdec.c @@ -479,8 +479,8 @@ uint32_t od_ec_dec_bits_(od_ec_dec *dec, unsigned ftb) { This will always be slightly larger than the exact value (e.g., all rounding error is in the positive direction).*/ int od_ec_dec_tell(const od_ec_dec *dec) { - return ((dec->end - dec->eptr) + (dec->bptr - dec->buf)) * 8 - dec->cnt - - dec->nend_bits + dec->tell_offs; + return (int)(((dec->end - dec->eptr) + (dec->bptr - dec->buf)) * 8 - + dec->cnt - dec->nend_bits + dec->tell_offs); } /*Returns the number of bits "used" by the decoded symbols so far. diff --git a/av1/common/x86/idct_intrin_sse2.c b/av1/common/x86/idct_intrin_sse2.c index a6b6e1ef6d441dc281e969216f20328217226f12..315d1c3d12b296164f6ace87150155a2ef9372d6 100644 --- a/av1/common/x86/idct_intrin_sse2.c +++ b/av1/common/x86/idct_intrin_sse2.c @@ -576,7 +576,7 @@ static INLINE void flip_buffer_lr_8x8(__m128i *in) { static INLINE void scale_sqrt2_8x4(__m128i *in) { // Implements 'ROUND_POWER_OF_TWO(input * Sqrt2, DCT_CONST_BITS)' // for each element - const __m128i v_scale_w = _mm_set1_epi16(Sqrt2); + const __m128i v_scale_w = _mm_set1_epi16((int16_t)Sqrt2); const __m128i v_p0l_w = _mm_mullo_epi16(in[0], v_scale_w); const __m128i v_p0h_w = _mm_mulhi_epi16(in[0], v_scale_w); @@ -609,7 +609,7 @@ static INLINE void scale_sqrt2_8x4(__m128i *in) { static INLINE void scale_sqrt2_8x8(__m128i *in) { // Implements 'ROUND_POWER_OF_TWO_SIGNED(input * Sqrt2, DCT_CONST_BITS)' // for each element - const __m128i v_scale_w = _mm_set1_epi16(Sqrt2); + const __m128i v_scale_w = _mm_set1_epi16((int16_t)Sqrt2); const __m128i v_p0l_w = _mm_mullo_epi16(in[0], v_scale_w); const __m128i v_p0h_w = _mm_mulhi_epi16(in[0], v_scale_w); diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index c002dabc5da87db97b3c511675a7694665d24327..c137760b99194a04f298683a399bcf66569af478 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c @@ -1322,8 +1322,8 @@ void av1_fht8x16_c(const int16_t *input, tran_low_t *output, int stride, // Columns for (i = 0; i < n; ++i) { for (j = 0; j < n2; ++j) - temp_in[j] = ROUND_POWER_OF_TWO_SIGNED(input[j * stride + i] * 4 * Sqrt2, - DCT_CONST_BITS); + temp_in[j] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED( + input[j * stride + i] * 4 * Sqrt2, DCT_CONST_BITS); ht.cols(temp_in, temp_out); for (j = 0; j < n2; ++j) out[j * n + i] = temp_out[j]; } @@ -1374,8 +1374,8 @@ void av1_fht16x8_c(const int16_t *input, tran_low_t *output, int stride, // Columns for (i = 0; i < n2; ++i) { for (j = 0; j < n; ++j) - temp_in[j] = ROUND_POWER_OF_TWO_SIGNED(input[j * stride + i] * 4 * Sqrt2, - DCT_CONST_BITS); + temp_in[j] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED( + input[j * stride + i] * 4 * Sqrt2, DCT_CONST_BITS); ht.cols(temp_in, temp_out); for (j = 0; j < n; ++j) out[j * n2 + i] = temp_out[j]; } diff --git a/av1/encoder/x86/dct_intrin_sse2.c b/av1/encoder/x86/dct_intrin_sse2.c index 3596292a1141005979baafc0f6ee817c3135291d..8d602f19c2575319736cf3cf0d54197d0ec3c0d5 100644 --- a/av1/encoder/x86/dct_intrin_sse2.c +++ b/av1/encoder/x86/dct_intrin_sse2.c @@ -2596,7 +2596,7 @@ static INLINE void scale_sqrt2_8x4(__m128i *in) { // Implements fdct_round_shift(input * Sqrt2), which is equivalent to // ROUND_POWER_OF_TWO(input * Sqrt2, DCT_CONST_BITS), // for 32 consecutive elements. - const __m128i v_scale_w = _mm_set1_epi16(Sqrt2); + const __m128i v_scale_w = _mm_set1_epi16((int16_t)Sqrt2); const __m128i v_p0l_w = _mm_mullo_epi16(in[0], v_scale_w); const __m128i v_p0h_w = _mm_mulhi_epi16(in[0], v_scale_w); @@ -2629,7 +2629,7 @@ static INLINE void scale_sqrt2_8x4(__m128i *in) { static INLINE void scale_sqrt2_8x8_signed(__m128i *in) { // Implements 'ROUND_POWER_OF_TWO_SIGNED(input * Sqrt2, DCT_CONST_BITS)' // for each element - const __m128i v_scale_w = _mm_set1_epi16(Sqrt2); + const __m128i v_scale_w = _mm_set1_epi16((int16_t)Sqrt2); const __m128i v_p0l_w = _mm_mullo_epi16(in[0], v_scale_w); const __m128i v_p0h_w = _mm_mulhi_epi16(in[0], v_scale_w);