Commit febe9b06 authored by Yaowu Xu's avatar Yaowu Xu

Fix msvc compiler warnings

BUG=aomedia:80

Change-Id: Ie4bccf053d2c24dcb64519650bcbcef4baffcdae
parent 284d7779
......@@ -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
......
......@@ -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);
......
......@@ -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.
......
......@@ -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);
......
......@@ -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];
}
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment