<div dir="ltr"><div dir="ltr">This patch has been pushed to the master branch. <br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><b>__________________________</b></div><div><b>Karam Singh</b></div><div><b>Ph.D. IIT Guwahati</b></div><div><font size="1">Senior Software (Video Coding) Engineer  </font></div><div><font size="1">Mobile: +91 8011279030</font></div><div><font size="1">Block 9A, 6th floor, DLF Cyber City</font></div><div><font size="1">Manapakkam, Chennai 600 089</font></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 4, 2024 at 1:52 PM Ponsanthini Arunachalam <<a href="mailto:ponsanthini.arunachalam@multicorewareinc.com">ponsanthini.arunachalam@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Please find the updated patch below :<br>From 555108b18ded7b92d57b6060cd5e82593e0e3c5b Mon Sep 17 00:00:00 2001<br>From: Ponsanthini <<a href="mailto:ponsanthini.arunachalam@muticorewareinc.com" target="_blank">ponsanthini.arunachalam@muticorewareinc.com</a>><br>Date: Fri, 4 Oct 2024 08:13:35 +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 aab360c17..c1fa928e4 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> } // end of Windows+Aarch64<br>@@ -473,6 +477,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>@@ -488,6 +493,7 @@ uint32_t cpu_detect(bool /*benableavx512*/)<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><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 30, 2024 at 1:13 PM Ponsanthini Arunachalam <<a href="mailto:ponsanthini.arunachalam@multicorewareinc.com" target="_blank">ponsanthini.arunachalam@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">From d76788127f6a142ff41a8df19a0f9e74290689a8 Mon Sep 17 00:00:00 2001<br>From: Ponsanthini <<a href="mailto:ponsanthini.arunachalam@muticorewareinc.com" target="_blank">ponsanthini.arunachalam@muticorewareinc.com</a>><br>Date: Mon, 30 Sep 2024 07:29:25 +0000<br>Subject: [PATCH] Fix cpu capability issue<br><br>---<br> source/CMakeLists.txt |  4 ++++<br> source/common/cpu.cpp | 30 ++++++++++++++++--------------<br> 2 files changed, 20 insertions(+), 14 deletions(-)<br><br>diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt<br>index d1fe38559..3ec82c810 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 4f4376184..e31647293 100644<br>--- a/source/common/cpu.cpp<br>+++ b/source/common/cpu.cpp<br>@@ -455,20 +455,22 @@ uint32_t cpu_detect(bool benableavx512)<br> <br>     int flags = 0;<br> <br>-    #if HAVE_NEON<br>-         flags |= X265_CPU_NEON;    // All of ARM64 has NEON<br>-    #endif<br>-    #if HAVE_NEON_DOTPROD<br>-         flags |= (hwcaps & HWCAP_ASIMDDP ? X265_CPU_NEON_DOTPROD : 0);<br>-    #endif<br>-    #if HAVE_NEON_I8MM<br>-         flags |= (hwcaps2 & HWCAP2_I8MM ? X265_CPU_NEON_I8MM : 0);<br>-    #endif<br>-    #if HAVE_SVE<br>-         flags |= (hwcaps & HWCAP_SVE ? X265_CPU_SVE : 0);<br>-    #endif<br>-    #if HAVE_SVE2<br>-         flags |= (hwcaps2 & HWCAP2_SVE2 ? X265_CPU_SVE2 : 0);<br>+    #ifdef ENABLE_ASSEMBLY<br>+        #if HAVE_NEON<br>+             flags |= X265_CPU_NEON;<br>+        #endif<br>+        #if HAVE_NEON_DOTPROD<br>+             flags |= X265_CPU_NEON_DOTPROD;<br>+        #endif<br>+        #if HAVE_NEON_I8MM<br>+             flags |= X265_CPU_NEON_I8MM;<br>+        #endif<br>+        #if HAVE_SVE<br>+             flags |= X265_CPU_SVE;<br>+        #endif<br>+        #if HAVE_SVE2<br>+             flags |= X265_CPU_SVE2;<br>+        #endif<br>     #endif<br> <br>     return flags;<br>-- <br>2.34.1<br><br></div>
</blockquote></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div>