pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/multimedia/x265



Module Name:    pkgsrc
Committed By:   jklos
Date:           Tue Dec 11 17:55:56 UTC 2018

Modified Files:
        pkgsrc/multimedia/x265: distinfo
Added Files:
        pkgsrc/multimedia/x265/patches: patch-common_cpu.cpp patch-common_cpu.h
            patch-common_quant.cpp

Log Message:
Fix x265 on non-x86 architectures. Patches are from maya%netbsd.org@localhost. Thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/multimedia/x265/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/x265/patches/patch-common_cpu.cpp \
    pkgsrc/multimedia/x265/patches/patch-common_cpu.h \
    pkgsrc/multimedia/x265/patches/patch-common_quant.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/multimedia/x265/distinfo
diff -u pkgsrc/multimedia/x265/distinfo:1.26 pkgsrc/multimedia/x265/distinfo:1.27
--- pkgsrc/multimedia/x265/distinfo:1.26        Sat Oct  6 12:12:48 2018
+++ pkgsrc/multimedia/x265/distinfo     Tue Dec 11 17:55:56 2018
@@ -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

Added files:

Index: pkgsrc/multimedia/x265/patches/patch-common_cpu.cpp
diff -u /dev/null pkgsrc/multimedia/x265/patches/patch-common_cpu.cpp:1.1
--- /dev/null   Tue Dec 11 17:55:56 2018
+++ pkgsrc/multimedia/x265/patches/patch-common_cpu.cpp Tue Dec 11 17:55:56 2018
@@ -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 )
+ {
+ 
Index: pkgsrc/multimedia/x265/patches/patch-common_cpu.h
diff -u /dev/null pkgsrc/multimedia/x265/patches/patch-common_cpu.h:1.1
--- /dev/null   Tue Dec 11 17:55:56 2018
+++ pkgsrc/multimedia/x265/patches/patch-common_cpu.h   Tue Dec 11 17:55:56 2018
@@ -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
+ {
Index: pkgsrc/multimedia/x265/patches/patch-common_quant.cpp
diff -u /dev/null pkgsrc/multimedia/x265/patches/patch-common_quant.cpp:1.1
--- /dev/null   Tue Dec 11 17:55:56 2018
+++ pkgsrc/multimedia/x265/patches/patch-common_quant.cpp       Tue Dec 11 17:55:56 2018
@@ -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



Home | Main Index | Thread Index | Old Index