]> granicus.if.org Git - libvpx/commitdiff
vpx_int_pro_col_sse2: use unaligned loads
authorJames Zern <jzern@google.com>
Wed, 23 Oct 2019 02:56:31 +0000 (19:56 -0700)
committerJames Zern <jzern@google.com>
Wed, 23 Oct 2019 02:58:29 +0000 (19:58 -0700)
this fixes a segfault when scaling is enabled; in some cases depending
on the ratio offsets may become odd.

vpx_int_pro_row_sse2 was updated previously, though the reason wasn't
listed:
54eda13f8 Apply fast motion search to golden reference frame

BUG=webm:1600

Change-Id: I8d5e105d876d8cf917919da301fce362adffab95

vpx_dsp/x86/avg_intrin_sse2.c

index 5aba903a2ddff355e99bc4e5188fea5ba58b2916..77c9e16808707c1b4ff3abe3ad77aa413c788e3d 100644 (file)
@@ -515,14 +515,14 @@ void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref,
 
 int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width) {
   __m128i zero = _mm_setzero_si128();
-  __m128i src_line = _mm_load_si128((const __m128i *)ref);
+  __m128i src_line = _mm_loadu_si128((const __m128i *)ref);
   __m128i s0 = _mm_sad_epu8(src_line, zero);
   __m128i s1;
   int i;
 
   for (i = 16; i < width; i += 16) {
     ref += 16;
-    src_line = _mm_load_si128((const __m128i *)ref);
+    src_line = _mm_loadu_si128((const __m128i *)ref);
     s1 = _mm_sad_epu8(src_line, zero);
     s0 = _mm_adds_epu16(s0, s1);
   }