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

Andrey Semashev andrey.semashev at gmail.com
Wed Oct 31 13:15:07 CET 2018


On 10/31/18 2:33 PM, praveen at multicorewareinc.com wrote:
> # HG changeset patch
> # User Praveen Tiwari <praveen at multicorewareinc.com>
> # Date 1540983948 -19800
> #      Wed Oct 31 16:35:48 2018 +0530
> # Node ID 1c878790edea64186edabcd40fb3df121f536311
> # Parent  fd517ae68f93dbfdd1bff45a9dd8e626523542b6
> fix Issue #442: linking issue on non x86 platform
> 
> diff -r fd517ae68f93 -r 1c878790edea 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 1c878790edea 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);
>               }
> +#elif

#else? Everywhere else, too.

> +            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);
>                   }
> +#elif
> +                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++)
>                   {
> 
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
> 



More information about the x265-devel mailing list