From c24d8f144f3d0bebcf9c814c5477f1f4f084a14e Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 4 Feb 2015 19:54:12 -0800 Subject: [PATCH] cosmetics: upsampling_sse2: add const to some casts source pointers are often cast to __m128*, retain the const in those cases Change-Id: Ia6df6690c85f580b20f19ce85cc6ec7b52620aee --- src/dsp/upsampling_sse2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dsp/upsampling_sse2.c b/src/dsp/upsampling_sse2.c index cc35fd5a..19b7030c 100644 --- a/src/dsp/upsampling_sse2.c +++ b/src/dsp/upsampling_sse2.c @@ -60,10 +60,10 @@ // Loads 17 pixels each from rows r1 and r2 and generates 32 pixels. #define UPSAMPLE_32PIXELS(r1, r2, out) { \ const __m128i one = _mm_set1_epi8(1); \ - const __m128i a = _mm_loadu_si128((__m128i*)&(r1)[0]); \ - const __m128i b = _mm_loadu_si128((__m128i*)&(r1)[1]); \ - const __m128i c = _mm_loadu_si128((__m128i*)&(r2)[0]); \ - const __m128i d = _mm_loadu_si128((__m128i*)&(r2)[1]); \ + const __m128i a = _mm_loadu_si128((const __m128i*)&(r1)[0]); \ + const __m128i b = _mm_loadu_si128((const __m128i*)&(r1)[1]); \ + const __m128i c = _mm_loadu_si128((const __m128i*)&(r2)[0]); \ + const __m128i d = _mm_loadu_si128((const __m128i*)&(r2)[1]); \ \ const __m128i s = _mm_avg_epu8(a, d); /* s = (a + d + 1) / 2 */ \ const __m128i t = _mm_avg_epu8(b, c); /* t = (b + c + 1) / 2 */ \