]> granicus.if.org Git - libvpx/commitdiff
Fix a bug in create_s16x4_neon()
authorLinfeng Zhang <linfengz@google.com>
Tue, 27 Feb 2018 01:00:10 +0000 (17:00 -0800)
committerLinfeng Zhang <linfengz@google.com>
Tue, 27 Feb 2018 01:49:24 +0000 (17:49 -0800)
This bug exposes when 2nd argument is negative, and the higher 32 bits
would be all 1s.

Change-Id: I189ee8cd3753fde00a34847e7a37cde2caa4ba72

vpx_dsp/arm/mem_neon.h

index 2027a1d8d12d8764ce02f29850b0ed43c58c942a..12c0a54c8990b4f84abf3160dceea44ff008fb08 100644 (file)
@@ -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) {