Fix msvc compiler warnings

BUG=aomedia:80

Change-Id: Ie4bccf053d2c24dcb64519650bcbcef4baffcdae
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index 6121273..d06db5f 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -78,7 +78,7 @@
 #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 add480a..fe3e920 100644
--- a/aom_dsp/dkboolreader.h
+++ b/aom_dsp/dkboolreader.h
@@ -69,7 +69,8 @@
 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 b015956..4a0cd76 100644
--- a/aom_dsp/entdec.c
+++ b/aom_dsp/entdec.c
@@ -479,8 +479,8 @@
           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 a6b6e1e..315d1c3 100644
--- a/av1/common/x86/idct_intrin_sse2.c
+++ b/av1/common/x86/idct_intrin_sse2.c
@@ -576,7 +576,7 @@
 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_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 c002dab..c137760 100644
--- a/av1/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -1322,8 +1322,8 @@
   // 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 @@
   // 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 3596292..8d602f1 100644
--- a/av1/encoder/x86/dct_intrin_sse2.c
+++ b/av1/encoder/x86/dct_intrin_sse2.c
@@ -2596,7 +2596,7 @@
   // 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_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);