Commit f42bba25 authored by Yaowu Xu's avatar Yaowu Xu

Reinstate "fix msvc build warnings and errors"

This commit reinstates portion of a reverted commit to fix warnings
and errors with MSVC2013 build.

Change-Id: Ibb5fd665db6d8c897a657e5994547a1f82e3f188
parent 607ed425
......@@ -74,7 +74,7 @@ static INLINE int aom_reader_init(aom_reader *r, const uint8_t *buffer,
(void)decrypt_cb;
(void)decrypt_state;
assert(size <= INT_MAX);
return ans_read_init(r, buffer, size);
return ans_read_init(r, buffer, (int)size);
#elif CONFIG_DAALA_EC
(void)decrypt_cb;
(void)decrypt_state;
......
......@@ -85,14 +85,16 @@ static INLINE void copy_8x8_16bit_to_8bit(uint8_t *dst, int dstride,
int16_t *src, int sstride) {
int i, j;
for (i = 0; i < 8; i++)
for (j = 0; j < 8; j++) dst[i * dstride + j] = src[i * sstride + j];
for (j = 0; j < 8; j++)
dst[i * dstride + j] = (uint8_t)src[i * sstride + j];
}
static INLINE void copy_4x4_16bit_to_8bit(uint8_t *dst, int dstride,
int16_t *src, int sstride) {
int i, j;
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) dst[i * dstride + j] = src[i * sstride + j];
for (j = 0; j < 4; j++)
dst[i * dstride + j] = (uint8_t)src[i * sstride + j];
}
/* TODO: Optimize this function for SSE. */
......
......@@ -30,12 +30,7 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane, aom_reader *r);
int av1_decode_block_tokens(MACROBLOCKD *const xd, int plane,
const SCAN_ORDER *sc, int x, int y, TX_SIZE tx_size,
TX_TYPE tx_type, int16_t *max_scan_line,
#if CONFIG_ANS
struct AnsDecoder *const r,
#else
aom_reader *r,
#endif // CONFIG_ANS
int seg_id);
aom_reader *r, int seg_id);
#ifdef __cplusplus
} // extern "C"
......
......@@ -207,10 +207,10 @@ static int clpf_rdo(int y, int x, const YV12_BUFFER_CONFIG *rec,
w2 = AOMMIN(w - (1 << (fb_size_log2 - bslog)), w >> 1);
h2 = AOMMIN(h - (1 << (fb_size_log2 - bslog)), h >> 1);
i = get_msb(MAX_FB_SIZE) - fb_size_log2;
sum1 = res[i][1];
sum2 = res[i][2];
sum3 = res[i][3];
oldfiltered = res[i][0];
sum1 = (int)res[i][1];
sum2 = (int)res[i][2];
sum3 = (int)res[i][3];
oldfiltered = (int)res[i][0];
res[i][0] = 0;
filtered |= clpf_rdo(y, x, rec, org, cm, block_size, fb_size_log2, w1, h1,
......
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