diff --git a/simd/arm/aarch32/jsimd.c b/simd/arm/aarch32/jsimd.c index 292b8a36..1f369009 100644 --- a/simd/arm/aarch32/jsimd.c +++ b/simd/arm/aarch32/jsimd.c @@ -1,7 +1,8 @@ /* * Copyright 2009 Pierre Ossman for Cendio AB * Copyright (C) 2011, Nokia Corporation and/or its subsidiary(-ies). - * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022, 2024, D. R. Commander. + * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022, 2024-2025, + * D. R. Commander. * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. * Copyright (C) 2019, Google LLC. * Copyright (C) 2020, Arm Limited. @@ -907,7 +908,7 @@ jsimd_can_huff_encode_one_block(void) if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_NEON && simd_huffman) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; @@ -932,7 +933,7 @@ jsimd_can_encode_mcu_AC_first_prepare(void) if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_NEON) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; @@ -957,7 +958,7 @@ jsimd_can_encode_mcu_AC_refine_prepare(void) if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_NEON) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; diff --git a/simd/arm/aarch64/jsimd.c b/simd/arm/aarch64/jsimd.c index e91ff83d..86948388 100644 --- a/simd/arm/aarch64/jsimd.c +++ b/simd/arm/aarch64/jsimd.c @@ -1,7 +1,7 @@ /* * Copyright 2009 Pierre Ossman for Cendio AB * Copyright (C) 2011, Nokia Corporation and/or its subsidiary(-ies). - * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2020, 2022, 2024, + * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2020, 2022, 2024-2025, * D. R. Commander. * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. * Copyright (C) 2020, Arm Limited. @@ -973,7 +973,7 @@ jsimd_can_huff_encode_one_block(void) if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_NEON && simd_huffman) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; @@ -1008,7 +1008,7 @@ jsimd_can_encode_mcu_AC_first_prepare(void) if (SIZEOF_SIZE_T != 8) return 0; - if (simd_support & JSIMD_NEON) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; @@ -1035,7 +1035,7 @@ jsimd_can_encode_mcu_AC_refine_prepare(void) if (SIZEOF_SIZE_T != 8) return 0; - if (simd_support & JSIMD_NEON) + if ((simd_support & JSIMD_NEON) && simd_huffman) return 1; return 0; diff --git a/simd/i386/jsimd.c b/simd/i386/jsimd.c index 5df7b8c9..bd2902c0 100644 --- a/simd/i386/jsimd.c +++ b/simd/i386/jsimd.c @@ -1,6 +1,6 @@ /* * Copyright 2009 Pierre Ossman for Cendio AB - * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022-2024, D. R. Commander. + * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, 2022-2025, D. R. Commander. * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. * * Based on the x86 SIMD extension for IJG JPEG library, @@ -1267,7 +1267,7 @@ jsimd_can_encode_mcu_AC_first_prepare(void) return 0; if (SIZEOF_SIZE_T != 4) return 0; - if (simd_support & JSIMD_SSE2) + if ((simd_support & JSIMD_SSE2) && simd_huffman) return 1; return 0; @@ -1293,7 +1293,7 @@ jsimd_can_encode_mcu_AC_refine_prepare(void) return 0; if (SIZEOF_SIZE_T != 4) return 0; - if (simd_support & JSIMD_SSE2) + if ((simd_support & JSIMD_SSE2) && simd_huffman) return 1; return 0; diff --git a/simd/x86_64/jsimd.c b/simd/x86_64/jsimd.c index f783e6dc..8cfd38b1 100644 --- a/simd/x86_64/jsimd.c +++ b/simd/x86_64/jsimd.c @@ -1,6 +1,6 @@ /* * Copyright 2009 Pierre Ossman for Cendio AB - * Copyright (C) 2009-2011, 2014, 2016, 2018, 2022-2024, D. R. Commander. + * Copyright (C) 2009-2011, 2014, 2016, 2018, 2022-2025, D. R. Commander. * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. * * Based on the x86 SIMD extension for IJG JPEG library, @@ -1067,7 +1067,7 @@ jsimd_can_encode_mcu_AC_first_prepare(void) return 0; if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_SSE2) + if ((simd_support & JSIMD_SSE2) && simd_huffman) return 1; return 0; @@ -1091,7 +1091,7 @@ jsimd_can_encode_mcu_AC_refine_prepare(void) return 0; if (sizeof(JCOEF) != 2) return 0; - if (simd_support & JSIMD_SSE2) + if ((simd_support & JSIMD_SSE2) && simd_huffman) return 1; return 0;