[x265] [PATCH] fix Issue #442: linking issue on non x86 platform

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Oct 31 13:30:47 CET 2018


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1540983948 -19800
#      Wed Oct 31 16:35:48 2018 +0530
# Node ID f0d02ca443adf8ff90ed61552d35347ff51c8e90
# Parent  fd517ae68f93dbfdd1bff45a9dd8e626523542b6
fix Issue #442: linking issue on non x86 platform

diff -r fd517ae68f93 -r f0d02ca443ad source/common/cpu.cpp
--- a/source/common/cpu.cpp	Tue Sep 25 16:02:31 2018 +0530
+++ b/source/common/cpu.cpp	Wed Oct 31 16:35:48 2018 +0530
@@ -127,6 +127,7 @@
 {
     return(enable512);
 }
+
 uint32_t cpu_detect(bool benableavx512 )
 {
 
diff -r fd517ae68f93 -r f0d02ca443ad source/common/quant.cpp
--- a/source/common/quant.cpp	Tue Sep 25 16:02:31 2018 +0530
+++ b/source/common/quant.cpp	Wed Oct 31 16:35:48 2018 +0530
@@ -723,6 +723,7 @@
             X265_CHECK(coeffNum[cgScanPos] == 0, "count of coeff failure\n");
             uint32_t scanPosBase = (cgScanPos << MLS_CG_SIZE);
             uint32_t blkPos      = codeParams.scan[scanPosBase];
+#if X265_ARCH_X86
             bool enable512 = detect512();
             if (enable512)
                 primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
@@ -731,6 +732,10 @@
                 primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff,  costUncoded, &totalUncodedCost, &totalRdCost,blkPos);
                 primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
             }
+#else
+            primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos);
+            primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
+#endif
         }
     }
     else
@@ -805,8 +810,8 @@
             uint32_t blkPos = codeParams.scan[scanPosBase];
             if (usePsyMask)
             {
+#if X265_ARCH_X86
                 bool enable512 = detect512();
-
                 if (enable512)
                     primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
                 else
@@ -814,6 +819,10 @@
                     primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos);
                     primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
                 }
+#else
+                primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos);
+                primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos);
+#endif
                 blkPos = codeParams.scan[scanPosBase];
                 for (int y = 0; y < MLS_CG_SIZE; y++)
                 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 3069 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20181031/de9fbf4c/attachment.bin>


More information about the x265-devel mailing list