summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2021-11-06 16:43:11 -0700
committerJames Zern <jzern@google.com>2021-11-08 13:43:09 -0800
commit2e73da326a26ddc367317e860e24e274947c26d8 (patch)
treeb50fc3a3c31fcb15ddeac6c31954154b465a9543
parent1676cddaaa4feebc766c64767f035ca9b0e5739f (diff)
downloadlibvpx-2e73da326a26ddc367317e860e24e274947c26d8.tar
libvpx-2e73da326a26ddc367317e860e24e274947c26d8.tar.gz
libvpx-2e73da326a26ddc367317e860e24e274947c26d8.tar.bz2
libvpx-2e73da326a26ddc367317e860e24e274947c26d8.zip
mem_sse2.h: storeu_uint32 -> storeu_int32
this changes the parameter to int32_t which matches the type with usage of this call using _mm_cvtsi128_si32() as a parameter. quiets an implicit conversion warning with clang-11 -fsanitize=undefined Change-Id: I1e9e9ffac5d2996962d29611458311221eca8ea0
-rw-r--r--vp8/common/x86/bilinear_filter_sse2.c4
-rw-r--r--vpx_dsp/x86/loopfilter_sse2.c16
-rw-r--r--vpx_dsp/x86/mem_sse2.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/vp8/common/x86/bilinear_filter_sse2.c b/vp8/common/x86/bilinear_filter_sse2.c
index 9bf65d804..ff6cbbd68 100644
--- a/vp8/common/x86/bilinear_filter_sse2.c
+++ b/vp8/common/x86/bilinear_filter_sse2.c
@@ -313,10 +313,10 @@ static INLINE void vertical_4x4(uint16_t *src, uint8_t *dst, const int stride,
const __m128i compensated = _mm_add_epi16(sum, round_factor);
const __m128i shifted = _mm_srai_epi16(compensated, VP8_FILTER_SHIFT);
__m128i packed = _mm_packus_epi16(shifted, shifted);
- storeu_uint32(dst, _mm_cvtsi128_si32(packed));
+ storeu_int32(dst, _mm_cvtsi128_si32(packed));
packed = _mm_srli_si128(packed, 4);
dst += stride;
- storeu_uint32(dst, _mm_cvtsi128_si32(packed));
+ storeu_int32(dst, _mm_cvtsi128_si32(packed));
dst += stride;
src += 8;
}
diff --git a/vpx_dsp/x86/loopfilter_sse2.c b/vpx_dsp/x86/loopfilter_sse2.c
index b6ff24834..347c9fdbe 100644
--- a/vpx_dsp/x86/loopfilter_sse2.c
+++ b/vpx_dsp/x86/loopfilter_sse2.c
@@ -211,21 +211,21 @@ void vpx_lpf_vertical_4_sse2(uint8_t *s, int pitch, const uint8_t *blimit,
// 00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33
ps1ps0 = _mm_unpacklo_epi8(ps1ps0, x0);
- storeu_uint32(s + 0 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
+ storeu_int32(s + 0 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
ps1ps0 = _mm_srli_si128(ps1ps0, 4);
- storeu_uint32(s + 1 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
+ storeu_int32(s + 1 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
ps1ps0 = _mm_srli_si128(ps1ps0, 4);
- storeu_uint32(s + 2 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
+ storeu_int32(s + 2 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
ps1ps0 = _mm_srli_si128(ps1ps0, 4);
- storeu_uint32(s + 3 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
+ storeu_int32(s + 3 * pitch - 2, _mm_cvtsi128_si32(ps1ps0));
- storeu_uint32(s + 4 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
+ storeu_int32(s + 4 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
qs1qs0 = _mm_srli_si128(qs1qs0, 4);
- storeu_uint32(s + 5 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
+ storeu_int32(s + 5 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
qs1qs0 = _mm_srli_si128(qs1qs0, 4);
- storeu_uint32(s + 6 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
+ storeu_int32(s + 6 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
qs1qs0 = _mm_srli_si128(qs1qs0, 4);
- storeu_uint32(s + 7 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
+ storeu_int32(s + 7 * pitch - 2, _mm_cvtsi128_si32(qs1qs0));
}
void vpx_lpf_horizontal_16_sse2(unsigned char *s, int pitch,
diff --git a/vpx_dsp/x86/mem_sse2.h b/vpx_dsp/x86/mem_sse2.h
index 258ab38e6..75fa2b0b7 100644
--- a/vpx_dsp/x86/mem_sse2.h
+++ b/vpx_dsp/x86/mem_sse2.h
@@ -16,7 +16,7 @@
#include "./vpx_config.h"
-static INLINE void storeu_uint32(void *dst, uint32_t v) {
+static INLINE void storeu_int32(void *dst, int32_t v) {
memcpy(dst, &v, sizeof(v));
}