From f8767c563d951db4ef8b4a0fd0c52f810da4f8a6 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Mon, 27 Jun 2022 09:10:56 +0800 Subject: Issue #1933 - Follow-up: Fix building on ARM. neon-compat should be imported as a .h header, not an .in file. --- media/libjpeg/simd/arm/neon-compat.h | 37 +++++++++++++++++++++++++++++++++ media/libjpeg/simd/arm/neon-compat.h.in | 37 --------------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 media/libjpeg/simd/arm/neon-compat.h delete mode 100644 media/libjpeg/simd/arm/neon-compat.h.in diff --git a/media/libjpeg/simd/arm/neon-compat.h b/media/libjpeg/simd/arm/neon-compat.h new file mode 100644 index 0000000000..d403f2289f --- /dev/null +++ b/media/libjpeg/simd/arm/neon-compat.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2020, D. R. Commander. All Rights Reserved. + * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#cmakedefine HAVE_VLD1_S16_X3 +#cmakedefine HAVE_VLD1_U16_X2 +#cmakedefine HAVE_VLD1Q_U8_X4 + +/* Define compiler-independent count-leading-zeros and byte-swap macros */ +#if defined(_MSC_VER) && !defined(__clang__) +#define BUILTIN_CLZ(x) _CountLeadingZeros(x) +#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x) +#define BUILTIN_BSWAP64(x) _byteswap_uint64(x) +#elif defined(__clang__) || defined(__GNUC__) +#define BUILTIN_CLZ(x) __builtin_clz(x) +#define BUILTIN_CLZLL(x) __builtin_clzll(x) +#define BUILTIN_BSWAP64(x) __builtin_bswap64(x) +#else +#error "Unknown compiler" +#endif diff --git a/media/libjpeg/simd/arm/neon-compat.h.in b/media/libjpeg/simd/arm/neon-compat.h.in deleted file mode 100644 index d403f2289f..0000000000 --- a/media/libjpeg/simd/arm/neon-compat.h.in +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2020, D. R. Commander. All Rights Reserved. - * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#cmakedefine HAVE_VLD1_S16_X3 -#cmakedefine HAVE_VLD1_U16_X2 -#cmakedefine HAVE_VLD1Q_U8_X4 - -/* Define compiler-independent count-leading-zeros and byte-swap macros */ -#if defined(_MSC_VER) && !defined(__clang__) -#define BUILTIN_CLZ(x) _CountLeadingZeros(x) -#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x) -#define BUILTIN_BSWAP64(x) _byteswap_uint64(x) -#elif defined(__clang__) || defined(__GNUC__) -#define BUILTIN_CLZ(x) __builtin_clz(x) -#define BUILTIN_CLZLL(x) __builtin_clzll(x) -#define BUILTIN_BSWAP64(x) __builtin_bswap64(x) -#else -#error "Unknown compiler" -#endif -- cgit v1.2.3 From ae8639dc24c7c19bc9644528aabd93a1ec2ff5fc Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Mon, 27 Jun 2022 14:10:21 +0800 Subject: Issue #1933 - Follow-up: Remove cmakedefine directives from neon-compat.h. Apparently it wasn't preprocessed yet. Just took the version from mozilla-central, and it worked, according to dbsoft. --- media/libjpeg/simd/arm/neon-compat.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/media/libjpeg/simd/arm/neon-compat.h b/media/libjpeg/simd/arm/neon-compat.h index d403f2289f..2907634e26 100644 --- a/media/libjpeg/simd/arm/neon-compat.h +++ b/media/libjpeg/simd/arm/neon-compat.h @@ -19,10 +19,6 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#cmakedefine HAVE_VLD1_S16_X3 -#cmakedefine HAVE_VLD1_U16_X2 -#cmakedefine HAVE_VLD1Q_U8_X4 - /* Define compiler-independent count-leading-zeros and byte-swap macros */ #if defined(_MSC_VER) && !defined(__clang__) #define BUILTIN_CLZ(x) _CountLeadingZeros(x) -- cgit v1.2.3