diff options
author | jklos <jklos@pkgsrc.org> | 2018-12-11 17:55:56 +0000 |
---|---|---|
committer | jklos <jklos@pkgsrc.org> | 2018-12-11 17:55:56 +0000 |
commit | 75be4d780a8bfce33a229058582ea1a89e16e120 (patch) | |
tree | b25a85e5f211f97b52b8a0d458bc945c7478c0c5 /multimedia | |
parent | 6a2cd9b5b314c171a77aa4a0e9f75c6786c17ffe (diff) | |
download | pkgsrc-75be4d780a8bfce33a229058582ea1a89e16e120.tar.gz |
Fix x265 on non-x86 architectures. Patches are from maya@netbsd.org. Thanks!
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/x265/distinfo | 5 | ||||
-rw-r--r-- | multimedia/x265/patches/patch-common_cpu.cpp | 26 | ||||
-rw-r--r-- | multimedia/x265/patches/patch-common_cpu.h | 15 | ||||
-rw-r--r-- | multimedia/x265/patches/patch-common_quant.cpp | 23 |
4 files changed, 68 insertions, 1 deletions
diff --git a/multimedia/x265/distinfo b/multimedia/x265/distinfo index 43e764c0434..c450392953a 100644 --- a/multimedia/x265/distinfo +++ b/multimedia/x265/distinfo @@ -1,8 +1,11 @@ -$NetBSD: distinfo,v 1.26 2018/10/06 12:12:48 adam Exp $ +$NetBSD: distinfo,v 1.27 2018/12/11 17:55:56 jklos Exp $ SHA1 (x265_2.9.tar.gz) = 3c005b4ab409c6f996b36ad88d780ff85fbc9abf RMD160 (x265_2.9.tar.gz) = ea6772ec426c141eb1756cdf6bb2def3d6319f47 SHA512 (x265_2.9.tar.gz) = 270818c7fd84947fde371e32bef225c1880cfb0bcd95378d95b51f50577a134d7cd585fcdfa43b103a24d76c5ad826b09509a07eb9e208e8f2b56f2f77365cf3 Size (x265_2.9.tar.gz) = 1385848 bytes SHA1 (patch-CMakeLists.txt) = fbf4d08133a48b342a060f1b45bab0253455a1b1 +SHA1 (patch-common_cpu.cpp) = 78ca000d57dba65bd0bf6d6c4d3bd878ae3387e7 +SHA1 (patch-common_cpu.h) = 33e3bb9bc9cb60735aa09efa185c474ebd3e6af5 +SHA1 (patch-common_quant.cpp) = 8cbaf6f00c1799ffaa503ffa372f05b76e97ae3b SHA1 (patch-encoder_encoder.cpp) = 907db18c8e9afd51684ed886da70c23ac3d3652a diff --git a/multimedia/x265/patches/patch-common_cpu.cpp b/multimedia/x265/patches/patch-common_cpu.cpp new file mode 100644 index 00000000000..7478f0ff9ce --- /dev/null +++ b/multimedia/x265/patches/patch-common_cpu.cpp @@ -0,0 +1,26 @@ +$NetBSD: patch-common_cpu.cpp,v 1.1 2018/12/11 17:55:56 jklos Exp $ + +Retire detect512, make enable512 a global. + +--- common/cpu.cpp.orig 2018-10-05 12:14:40.000000000 +0000 ++++ common/cpu.cpp +@@ -58,7 +58,7 @@ static void sigill_handler(int sig) + #endif // if X265_ARCH_ARM + + namespace X265_NS { +-static bool enable512 = false; ++bool enable512 = false; + const cpu_name_t cpu_names[] = + { + #if X265_ARCH_X86 +@@ -123,10 +123,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 ) + { + diff --git a/multimedia/x265/patches/patch-common_cpu.h b/multimedia/x265/patches/patch-common_cpu.h new file mode 100644 index 00000000000..dd9e28e7789 --- /dev/null +++ b/multimedia/x265/patches/patch-common_cpu.h @@ -0,0 +1,15 @@ +$NetBSD: patch-common_cpu.h,v 1.1 2018/12/11 17:55:56 jklos Exp $ + +Retire detect512, use enable512 as a global + +--- common/cpu.h.orig 2018-10-05 12:14:40.000000000 +0000 ++++ common/cpu.h +@@ -50,7 +50,7 @@ extern "C" void PFX(safe_intel_cpu_indic + + namespace X265_NS { + uint32_t cpu_detect(bool); +-bool detect512(); ++extern bool enable512; + + struct cpu_name_t + { diff --git a/multimedia/x265/patches/patch-common_quant.cpp b/multimedia/x265/patches/patch-common_quant.cpp new file mode 100644 index 00000000000..df5627db5f8 --- /dev/null +++ b/multimedia/x265/patches/patch-common_quant.cpp @@ -0,0 +1,23 @@ +$NetBSD: patch-common_quant.cpp,v 1.1 2018/12/11 17:55:56 jklos Exp $ + +Use enable512 as a global, not through detect512 + +--- common/quant.cpp.orig 2018-10-05 12:14:40.000000000 +0000 ++++ common/quant.cpp +@@ -723,7 +723,6 @@ uint32_t Quant::rdoQuant(const CUData& c + X265_CHECK(coeffNum[cgScanPos] == 0, "count of coeff failure\n"); + uint32_t scanPosBase = (cgScanPos << MLS_CG_SIZE); + uint32_t blkPos = codeParams.scan[scanPosBase]; +- bool enable512 = detect512(); + if (enable512) + primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); + else +@@ -805,8 +804,6 @@ uint32_t Quant::rdoQuant(const CUData& c + uint32_t blkPos = codeParams.scan[scanPosBase]; + if (usePsyMask) + { +- bool enable512 = detect512(); +- + if (enable512) + primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); + else |