diff options
author | Yaowu Xu <yaowu@google.com> | 2015-07-09 17:49:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-09 17:49:08 +0000 |
commit | f70c80289c16ca681ffa58ad1f01f642c667a9ea (patch) | |
tree | d77161926546e39dfe47199a5ae0f2f0533a93b1 /vp9 | |
parent | e8103f36765c3e01fdca7ef2a37ceea6ed8ffe5d (diff) | |
parent | c369daf3ea163d0e1a72e43315d0023b93e40c4e (diff) | |
download | libvpx-f70c80289c16ca681ffa58ad1f01f642c667a9ea.tar libvpx-f70c80289c16ca681ffa58ad1f01f642c667a9ea.tar.gz libvpx-f70c80289c16ca681ffa58ad1f01f642c667a9ea.tar.bz2 libvpx-f70c80289c16ca681ffa58ad1f01f642c667a9ea.zip |
Merge "Clean out more MSVC warnings"
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/common/vp9_idct.h | 6 | ||||
-rw-r--r-- | vp9/encoder/x86/vp9_dct32x32_sse2_impl.h | 5 | ||||
-rw-r--r-- | vp9/encoder/x86/vp9_dct_sse2_impl.h | 20 |
3 files changed, 18 insertions, 13 deletions
diff --git a/vp9/common/vp9_idct.h b/vp9/common/vp9_idct.h index cee1682a6..cbce2dd89 100644 --- a/vp9/common/vp9_idct.h +++ b/vp9/common/vp9_idct.h @@ -37,6 +37,10 @@ extern "C" { _mm_set_epi16((int16_t)(b), (int16_t)(b), (int16_t)(b), (int16_t)(b), \ (int16_t)(a), (int16_t)(a), (int16_t)(a), (int16_t)(a)) +#define octa_set_epi16(a, b, c, d, e, f, g, h) \ + _mm_setr_epi16((int16_t)(a), (int16_t)(b), (int16_t)(c), (int16_t)(d), \ + (int16_t)(e), (int16_t)(f), (int16_t)(g), (int16_t)(h)) + // Constants: // for (int i = 1; i< 32; ++i) // printf("static const int cospi_%d_64 = %.0f;\n", i, @@ -158,7 +162,7 @@ typedef struct { // bd of x uses trans_low with 8+x bits, need to remove 24-x bits #define WRAPLOW(x, bd) ((((int32_t)(x)) << (24 - bd)) >> (24 - bd)) #else -#define WRAPLOW(x, bd) (x) +#define WRAPLOW(x, bd) ((int32_t)(x)) #endif // CONFIG_EMULATE_HARDWARE void vp9_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, diff --git a/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h b/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h index 003ebd13f..5074d31a7 100644 --- a/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h +++ b/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h @@ -28,7 +28,8 @@ void vp9_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) { temp_in[j] = intermediate[j * 32 + i]; vp9_fdct32(temp_in, temp_out, 0); for (j = 0; j < 32; ++j) - out[j + i * 32] = (temp_out[j] + 1 + (temp_out[j] < 0)) >> 2; + out[j + i * 32] = + (tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2); } } #define HIGH_FDCT32x32_2D_C vp9_highbd_fdct32x32_c @@ -42,7 +43,7 @@ void vp9_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) { temp_in[j] = intermediate[j * 32 + i]; vp9_fdct32(temp_in, temp_out, 1); for (j = 0; j < 32; ++j) - out[j + i * 32] = temp_out[j]; + out[j + i * 32] = (tran_low_t)temp_out[j]; } } #define HIGH_FDCT32x32_2D_C vp9_highbd_fdct32x32_rd_c diff --git a/vp9/encoder/x86/vp9_dct_sse2_impl.h b/vp9/encoder/x86/vp9_dct_sse2_impl.h index 11bf5a25e..86e9ecf73 100644 --- a/vp9/encoder/x86/vp9_dct_sse2_impl.h +++ b/vp9/encoder/x86/vp9_dct_sse2_impl.h @@ -40,35 +40,35 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { // These are the coefficients used for the multiplies. // In the comments, pN means cos(N pi /64) and mN is -cos(N pi /64), // where cospi_N_64 = cos(N pi /64) - const __m128i k__cospi_A = _mm_setr_epi16(cospi_16_64, cospi_16_64, + const __m128i k__cospi_A = octa_set_epi16(cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64); - const __m128i k__cospi_B = _mm_setr_epi16(cospi_16_64, -cospi_16_64, + const __m128i k__cospi_B = octa_set_epi16(cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64); - const __m128i k__cospi_C = _mm_setr_epi16(cospi_8_64, cospi_24_64, + const __m128i k__cospi_C = octa_set_epi16(cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64, cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64); - const __m128i k__cospi_D = _mm_setr_epi16(cospi_24_64, -cospi_8_64, + const __m128i k__cospi_D = octa_set_epi16(cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64, cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64); - const __m128i k__cospi_E = _mm_setr_epi16(cospi_16_64, cospi_16_64, + const __m128i k__cospi_E = octa_set_epi16(cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64); - const __m128i k__cospi_F = _mm_setr_epi16(cospi_16_64, -cospi_16_64, + const __m128i k__cospi_F = octa_set_epi16(cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64); - const __m128i k__cospi_G = _mm_setr_epi16(cospi_8_64, cospi_24_64, + const __m128i k__cospi_G = octa_set_epi16(cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64, -cospi_8_64, -cospi_24_64, -cospi_8_64, -cospi_24_64); - const __m128i k__cospi_H = _mm_setr_epi16(cospi_24_64, -cospi_8_64, + const __m128i k__cospi_H = octa_set_epi16(cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64, -cospi_24_64, cospi_8_64, -cospi_24_64, cospi_8_64); @@ -267,7 +267,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { // When we use them, in one case, they are all the same. In all others // it's a pair of them that we need to repeat four times. This is done // by constructing the 32 bit constant corresponding to that pair. - const __m128i k__cospi_p16_p16 = _mm_set1_epi16(cospi_16_64); + const __m128i k__cospi_p16_p16 = _mm_set1_epi16((int16_t)cospi_16_64); const __m128i k__cospi_p16_m16 = pair_set_epi16(cospi_16_64, -cospi_16_64); const __m128i k__cospi_p24_p08 = pair_set_epi16(cospi_24_64, cospi_8_64); const __m128i k__cospi_m08_p24 = pair_set_epi16(-cospi_8_64, cospi_24_64); @@ -588,7 +588,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { // When we use them, in one case, they are all the same. In all others // it's a pair of them that we need to repeat four times. This is done // by constructing the 32 bit constant corresponding to that pair. - const __m128i k__cospi_p16_p16 = _mm_set1_epi16(cospi_16_64); + const __m128i k__cospi_p16_p16 = _mm_set1_epi16((int16_t)cospi_16_64); const __m128i k__cospi_p16_m16 = pair_set_epi16(cospi_16_64, -cospi_16_64); const __m128i k__cospi_p24_p08 = pair_set_epi16(cospi_24_64, cospi_8_64); const __m128i k__cospi_p08_m24 = pair_set_epi16(cospi_8_64, -cospi_24_64); |