Lines 1-53
Link Here
|
1 |
--- contrib/x265/P01-freebsd-ppc.patch.orig 2019-11-12 19:13:27 UTC |
|
|
2 |
+++ contrib/x265/P01-freebsd-ppc.patch |
3 |
@@ -0,0 +1,50 @@ |
4 |
+--- x265_2.9/source/common/cpu.cpp.orig 2019-11-12 20:19:28.629150000 +0100 |
5 |
++++ x265_2.9/source/common/cpu.cpp |
6 |
+@@ -127,6 +127,7 @@ |
7 |
+ { |
8 |
+ return(enable512); |
9 |
+ } |
10 |
++ |
11 |
+ uint32_t cpu_detect(bool benableavx512 ) |
12 |
+ { |
13 |
+ |
14 |
+--- x265_2.9/source/common/quant.cpp.orig 2019-11-12 20:19:34.848807000 +0100 |
15 |
++++ x265_2.9/source/common/quant.cpp |
16 |
+@@ -723,6 +723,7 @@ |
17 |
+ X265_CHECK(coeffNum[cgScanPos] == 0, "count of coeff failure\n"); |
18 |
+ uint32_t scanPosBase = (cgScanPos << MLS_CG_SIZE); |
19 |
+ uint32_t blkPos = codeParams.scan[scanPosBase]; |
20 |
++#if X265_ARCH_X86 |
21 |
+ bool enable512 = detect512(); |
22 |
+ if (enable512) |
23 |
+ primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); |
24 |
+@@ -731,6 +732,10 @@ |
25 |
+ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost,blkPos); |
26 |
+ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); |
27 |
+ } |
28 |
++#else |
29 |
++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); |
30 |
++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); |
31 |
++#endif |
32 |
+ } |
33 |
+ } |
34 |
+ else |
35 |
+@@ -805,6 +810,7 @@ |
36 |
+ uint32_t blkPos = codeParams.scan[scanPosBase]; |
37 |
+ if (usePsyMask) |
38 |
+ { |
39 |
++#if X265_ARCH_X86 |
40 |
+ bool enable512 = detect512(); |
41 |
+ |
42 |
+ if (enable512) |
43 |
+@@ -814,6 +820,10 @@ |
44 |
+ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); |
45 |
+ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); |
46 |
+ } |
47 |
++#else |
48 |
++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); |
49 |
++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); |
50 |
++#endif |
51 |
+ blkPos = codeParams.scan[scanPosBase]; |
52 |
+ for (int y = 0; y < MLS_CG_SIZE; y++) |
53 |
+ { |