From 9d3c5d33d1d4558bf8bf67806db353c61eec9080 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20R=C3=A4ncker?= Date: Fri, 21 Sep 2018 02:16:31 +0200 Subject: [PATCH] sanitizer: fix unaligned loads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Another instance of unaligned 4-byte loads. Signed-off-by: Matthias Räncker Change-Id: I06afc5405bb074384eec7a8c8123e5803e522937 --- vpx_dsp/x86/avg_pred_sse2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vpx_dsp/x86/avg_pred_sse2.c b/vpx_dsp/x86/avg_pred_sse2.c index f83b26490..e7db75559 100644 --- a/vpx_dsp/x86/avg_pred_sse2.c +++ b/vpx_dsp/x86/avg_pred_sse2.c @@ -13,6 +13,7 @@ #include "./vpx_dsp_rtcd.h" #include "vpx/vpx_integer.h" +#include "vpx_dsp/x86/mem_sse2.h" void vpx_comp_avg_pred_sse2(uint8_t *comp, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride) { @@ -45,10 +46,9 @@ void vpx_comp_avg_pred_sse2(uint8_t *comp, const uint8_t *pred, int width, r = _mm_loadu_si128((const __m128i *)ref); ref += 16; } else if (width == 4) { - r = _mm_set_epi32(*(const uint32_t *)(ref + 3 * ref_stride), - *(const uint32_t *)(ref + 2 * ref_stride), - *(const uint32_t *)(ref + ref_stride), - *(const uint32_t *)(ref)); + r = _mm_set_epi32(loadu_uint32(ref + 3 * ref_stride), + loadu_uint32(ref + 2 * ref_stride), + loadu_uint32(ref + ref_stride), loadu_uint32(ref)); ref += 4 * ref_stride; } else { -- 2.40.0