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

Ashok Kumar Mishra ashok at multicorewareinc.com
Thu Nov 1 08:08:51 CET 2018


On Wed, Oct 31, 2018 at 6:00 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 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++)
>                  {
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel


Pushed to stable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20181101/0f02662f/attachment-0001.html>


More information about the x265-devel mailing list