[x265] [PATCH 01/14] testbench.cpp: Guard extensions based on architecture
George Steed
george.steed at arm.com
Fri Sep 6 13:32:46 UTC 2024
The X265_CPU_* values on x86 and Arm platforms overlap with each other.
This means that for example on a CPU supporting SVE and SVE2 we will
currently try to run the SSE2 x86 tests.
To fix this, guard the extension list by the relevant architecture being
built for.
---
source/test/testbench.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/source/test/testbench.cpp b/source/test/testbench.cpp
index ec4f5d395..8c0b13998 100644
--- a/source/test/testbench.cpp
+++ b/source/test/testbench.cpp
@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
int flag;
} test_arch[] =
{
+#if X265_ARCH_X86
{ "SSE2", X265_CPU_SSE2 },
{ "SSE3", X265_CPU_SSE3 },
{ "SSSE3", X265_CPU_SSSE3 },
@@ -172,12 +173,14 @@ int main(int argc, char *argv[])
{ "AVX2", X265_CPU_AVX2 },
{ "BMI2", X265_CPU_AVX2 | X265_CPU_BMI1 | X265_CPU_BMI2 },
{ "AVX512", X265_CPU_AVX512 },
+#else
{ "ARMv6", X265_CPU_ARMV6 },
{ "NEON", X265_CPU_NEON },
{ "SVE2", X265_CPU_SVE2 },
{ "SVE", X265_CPU_SVE },
{ "Neon_DotProd", X265_CPU_NEON_DOTPROD },
{ "FastNeonMRC", X265_CPU_FAST_NEON_MRC },
+#endif
{ "", 0 },
};
--
2.42.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-testbench.cpp-Guard-extensions-based-on-architecture.patch
Type: text/x-patch
Size: 1669 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240906/8cefd8dc/attachment.bin>
More information about the x265-devel
mailing list