<div dir="ltr">Please find the below updated patch :<br><br>From 98bc7a5a7d33ad4b23a70ff4b093db473222e1b8 Mon Sep 17 00:00:00 2001<br>From: Ponsanthini <<a href="mailto:ponsanthini.arunachalam@muticorewareinc.com">ponsanthini.arunachalam@muticorewareinc.com</a>><br>Date: Thu, 3 Oct 2024 07:39:47 +0000<br>Subject: [PATCH] Fix cpu capability issue<br><br>---<br> source/CMakeLists.txt | 4 ++++<br> source/common/cpu.cpp | 6 ++++++<br> 2 files changed, 10 insertions(+)<br><br>diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt<br>index d1fe38559..cd19050c3 100755<br>--- a/source/CMakeLists.txt<br>+++ b/source/CMakeLists.txt<br>@@ -479,6 +479,10 @@ else()<br>     option(ENABLE_ASSEMBLY "Enable use of assembly coded primitives" OFF)<br> endif()<br> <br>+if(ENABLE_ASSEMBLY)<br>+   add_definitions(-DENABLE_ASSEMBLY)<br>+endif()<br>+<br> option(CHECKED_BUILD "Enable run-time sanity checks (debugging)" OFF)<br> if(CHECKED_BUILD)<br>     add_definitions(-DCHECKED_BUILD=1)<br>diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp<br>index 745e9dc41..f5f30c917 100644<br>--- a/source/common/cpu.cpp<br>+++ b/source/common/cpu.cpp<br>@@ -396,6 +396,7 @@ uint32_t cpu_detect(bool /*benableavx512*/)<br> {<br>     int flags = 0;<br> <br>+#ifdef ENABLE_ASSEMBLY<br>     #if HAVE_NEON<br>          flags |= X265_CPU_NEON;<br>     #endif<br>@@ -411,6 +412,7 @@ uint32_t cpu_detect(bool /*benableavx512*/)<br>     #if HAVE_SVE2<br>          flags |= X265_CPU_SVE2;<br>     #endif<br>+#endif<br> <br>     return flags;<br> }<br>@@ -442,6 +444,7 @@ uint32_t cpu_detect(bool /*benableavx512*/)<br> <br>     int flags = 0;<br> <br>+#ifdef ENABLE_ASSEMBLY<br>     #if HAVE_NEON<br>          flags |= X265_CPU_NEON;    // All of ARM64 has NEON<br>     #endif<br>@@ -457,6 +460,7 @@ uint32_t cpu_detect(bool /*benableavx512*/)<br>     #if HAVE_SVE2 && defined(PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE)<br>          flags |= IsProcessorFeaturePresent(PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE) ? X265_CPU_SVE2 : 0;<br>     #endif<br>+#endif<br> <br>     return flags;<br> }<br>@@ -473,6 +477,7 @@ uint32_t cpu_detect(bool /*benableavx5128*/)<br> <br>     int flags = 0;<br> <br>+#ifdef ENABLE_ASSEMBLY<br>     #if HAVE_NEON<br>          flags |= X265_CPU_NEON;    // All of ARM64 has NEON<br>     #endif<br>@@ -488,6 +493,7 @@ uint32_t cpu_detect(bool /*benableavx5128*/)<br>     #if HAVE_SVE2<br>          flags |= (hwcaps2 & HWCAP2_SVE2 ? X265_CPU_SVE2 : 0);<br>     #endif<br>+#endif<br> <br>     return flags;<br> }<br>-- <br>2.34.1<br><br></div>