Use upstream patch to fix the build on !X86 archs.
from Brad (maintainer)
This commit is contained in:
parent
4cd0b851ec
commit
4d6731c749
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.38 2018/11/03 20:38:03 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.39 2018/11/05 07:58:37 ajacoutot Exp $
|
||||
|
||||
COMMENT= free H.265/HEVC encoder
|
||||
|
||||
VER= 2.9
|
||||
DISTNAME= x265_${VER}
|
||||
PKGNAME= x265-${VER}
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= https://bitbucket.org/multicoreware/x265/downloads/
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
$OpenBSD: patch-source_common_cpu_cpp,v 1.1 2018/10/30 11:20:33 ajacoutot Exp $
|
||||
|
||||
Fix the build on !X86 archs.
|
||||
|
||||
Index: source/common/cpu.cpp
|
||||
--- source/common/cpu.cpp.orig
|
||||
+++ source/common/cpu.cpp
|
||||
@@ -110,6 +110,11 @@ const cpu_name_t cpu_names[] =
|
||||
{ "", 0 },
|
||||
};
|
||||
|
||||
+bool detect512()
|
||||
+{
|
||||
+ return(enable512);
|
||||
+}
|
||||
+
|
||||
#if X265_ARCH_X86
|
||||
|
||||
extern "C" {
|
||||
@@ -123,10 +128,6 @@ uint64_t PFX(cpu_xgetbv)(int xcr);
|
||||
#pragma warning(disable: 4309) // truncation of constant value
|
||||
#endif
|
||||
|
||||
-bool detect512()
|
||||
-{
|
||||
- return(enable512);
|
||||
-}
|
||||
uint32_t cpu_detect(bool benableavx512 )
|
||||
{
|
||||
|
47
multimedia/x265/patches/patch-source_common_quant_cpp
Normal file
47
multimedia/x265/patches/patch-source_common_quant_cpp
Normal file
@ -0,0 +1,47 @@
|
||||
$OpenBSD: patch-source_common_quant_cpp,v 1.3 2018/11/05 07:58:37 ajacoutot Exp $
|
||||
|
||||
Fix the build on !X86 archs.
|
||||
|
||||
Index: source/common/quant.cpp
|
||||
--- source/common/quant.cpp.orig
|
||||
+++ source/common/quant.cpp
|
||||
@@ -723,6 +723,7 @@ uint32_t Quant::rdoQuant(const CUData& cu, int16_t* ds
|
||||
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 @@ uint32_t Quant::rdoQuant(const CUData& cu, int16_t* ds
|
||||
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 Quant::rdoQuant(const CUData& cu, int16_t* ds
|
||||
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 @@ uint32_t Quant::rdoQuant(const CUData& cu, int16_t* ds
|
||||
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++)
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user