summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinfeng Zhang <linfengz@google.com>2018-02-26 17:00:10 -0800
committerLinfeng Zhang <linfengz@google.com>2018-02-26 17:49:24 -0800
commit3c6dc743aab5900d8436875f77b2cfd3b0ea893d (patch)
treeb8c7d09e89df5818588f064e1f8af43cdabb5ff6
parent8de0404ed99ffd99fd8ee5cd7dbddfc8d9ec011f (diff)
downloadlibvpx-3c6dc743aab5900d8436875f77b2cfd3b0ea893d.tar
libvpx-3c6dc743aab5900d8436875f77b2cfd3b0ea893d.tar.gz
libvpx-3c6dc743aab5900d8436875f77b2cfd3b0ea893d.tar.bz2
libvpx-3c6dc743aab5900d8436875f77b2cfd3b0ea893d.zip
Fix a bug in create_s16x4_neon()
This bug exposes when 2nd argument is negative, and the higher 32 bits would be all 1s. Change-Id: I189ee8cd3753fde00a34847e7a37cde2caa4ba72
-rw-r--r--vpx_dsp/arm/mem_neon.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/vpx_dsp/arm/mem_neon.h b/vpx_dsp/arm/mem_neon.h
index 2027a1d8d..12c0a54c8 100644
--- a/vpx_dsp/arm/mem_neon.h
+++ b/vpx_dsp/arm/mem_neon.h
@@ -21,9 +21,8 @@
static INLINE int16x4_t create_s16x4_neon(const int16_t c0, const int16_t c1,
const int16_t c2, const int16_t c3) {
- return vcreate_s16((uint16_t)c0 | ((uint16_t)c1 << 16) |
- ((int64_t)(uint16_t)c2 << 32) |
- ((int64_t)(uint16_t)c3 << 48));
+ return vcreate_s16((uint16_t)c0 | ((uint32_t)c1 << 16) |
+ ((int64_t)(uint16_t)c2 << 32) | ((int64_t)c3 << 48));
}
static INLINE int32x2_t create_s32x2_neon(const int32_t c0, const int32_t c1) {