]> granicus.if.org Git - libvpx/commitdiff
highbd_inv_txfm_sse4: make << of neg. val a multiply
authorJames Zern <jzern@google.com>
Sun, 30 Jul 2017 19:48:28 +0000 (12:48 -0700)
committerJames Zern <jzern@google.com>
Sun, 30 Jul 2017 19:48:28 +0000 (12:48 -0700)
left shifting a negative value is undefined; quiets a ubsan warning.
this is applied to a constant, no change in the generated code.

Change-Id: I595f0ff7904ef025e07bb80234293d958dc9f254

vpx_dsp/x86/highbd_inv_txfm_sse4.h

index 170f641d3733ed55cf3eccdeec14b4c036aeef5c..d19887d00bbc71e18c3a1b32c1764418b52b1445 100644 (file)
@@ -18,7 +18,7 @@
 
 static INLINE __m128i multiplication_round_shift_sse4_1(
     const __m128i *const in /*in[2]*/, const int c) {
-  const __m128i pair_c = pair_set_epi32(c << 2, 0);
+  const __m128i pair_c = pair_set_epi32(c * 4, 0);
   __m128i t0, t1;
 
   t0 = _mm_mul_epi32(in[0], pair_c);