From 76e3db8029917e6f916ec5238a08fca5fee1b836 Mon Sep 17 00:00:00 2001 From: Martin Piatka Date: Tue, 2 Jul 2024 16:17:32 +0200 Subject: [PATCH] pixfmt_conv.c: Fix undeclared x when building without SIMD --- src/pixfmt_conv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixfmt_conv.c b/src/pixfmt_conv.c index 1fd78bf83..bd06a7056 100644 --- a/src/pixfmt_conv.c +++ b/src/pixfmt_conv.c @@ -888,6 +888,8 @@ void vc_copylineUYVYtoGrayscale(unsigned char * __restrict dst, const unsigned c void vc_copylineRGBtoRGBA(unsigned char * __restrict dst, const unsigned char * __restrict src, int dst_len, int rshift, int gshift, int bshift) { + int x = 0; + #ifdef __SSSE3__ __m128i alpha_mask_sse = _mm_set1_epi32(0xFFFFFFFFU ^ (0xFFU << rshift) ^ (0xFFU << gshift) ^ (0xFFU << bshift)); @@ -906,8 +908,6 @@ void vc_copylineRGBtoRGBA(unsigned char * __restrict dst, const unsigned char * shuf = _mm_setr_epi8(2, 1, 0, 0xff, 5, 4, 3, 0xff, 8, 7, 6, 0xff, 11, 10, 9, 0xff); } - int x = 0; - if (is_simd_compat) { OPTIMIZED_FOR (x = 0; x <= dst_len - 16; x += 16) { loaded = _mm_lddqu_si128((const __m128i_u *) src);