new blfs: media-libs/x265-3.6
This commit is contained in:
86
media-libs/x265-3.6.PKGBUILD
Normal file
86
media-libs/x265-3.6.PKGBUILD
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
pkgname=x265
|
||||||
|
pkgver=3.6
|
||||||
|
pkgdesc="Library for encoding video streams into the H.265/HEVC format"
|
||||||
|
homepage="https://www.x265.org/ https://bitbucket.org/multicoreware/x265_git/"
|
||||||
|
licenses=("GPL-2")
|
||||||
|
depends=(">=dev-lang/nasm-2.13")
|
||||||
|
_patches=(
|
||||||
|
"${pkgname}-3.5-r5-cpp-std.patch"
|
||||||
|
"${pkgname}-3.5-r5-gcc15.patch"
|
||||||
|
"${pkgname}-3.6-cmake-cleanup.patch"
|
||||||
|
"${pkgname}-3.6-code-cleanup.patch"
|
||||||
|
"${pkgname}-3.6-code-cleanup_2.patch"
|
||||||
|
"${pkgname}-3.6-code-cleanup_3.patch"
|
||||||
|
"${pkgname}-3.6-code-cleanup_4.patch"
|
||||||
|
"${pkgname}-cmake-min-version-3.28.patch"
|
||||||
|
)
|
||||||
|
_patch_sums=("2ce2c6fa598db565bd5a6acddd0ec9095b68fde28584a23c5a398a16b44a5514b6d4ec2f9b8e4ab9a871320c694f4723958eca55588d90b3fdb5a94244c08729"
|
||||||
|
"ed87e6919f0bcd6a719411716c4dbd0016e4d7c23beca4cf7d93d0beca4c7af275c8734e103098f7f358161917fed0a6a0d1301e1eb8de8744a8b4e6b288519f"
|
||||||
|
"43d4c8420e8722337b9787ad434f00747bb97d7fe71dfd4934e1a8b36525ee7cc96ba2dd1dde3b7621452a59b2db2dbcd887732c8bfd828449e48e955e9c7f9b"
|
||||||
|
"a4131ca9ccf7f8594f27506982ec2c0c00b026227343845aad8afd5e9d5d7a8722bfd2a5f365655fd4db52e5ce952258fd4fc89b3939b222b5e75d2f31c330db"
|
||||||
|
"b67f809161759bff76c5958c2a34b09d79066917424960d4654d5922bfabea3d2bde3028f0ddd7d0c408516d75978634b12505a12d45cb018edf6cdfa79bab76"
|
||||||
|
"37d327d59438b8b88db8de05d5a056c8baffbc46ea93d155c6ab5ffdded97f3ef5d621eb6c6a024f9022a8ff23b882663050cdaad99dd5cb8f236f1e9c4a1dae"
|
||||||
|
"6c88ffa5c008dcf2ca394a6f6edc5cd859343119a589b1ee6497fe84727f92f25ccff24818a347ee3b92516f574e8cba182d1c26f86df41dbd9ddb62ca8dcd7c"
|
||||||
|
"bef91e0d206c7e173c01ac775358e771c136da00afb7eb6ee27f1538ac6a1588556ed4c21ad93b2637f0c27c3ff50dd65e0b3c7266e62651416a603558a831c0"
|
||||||
|
)
|
||||||
|
sources=("${pkgname}-${pkgver}.tar.gz"
|
||||||
|
${_patches[@]}
|
||||||
|
)
|
||||||
|
urls=("https://bitbucket.org/multicoreware/x265_git/downloads/${pkgname}_${pkgver}.tar.gz"
|
||||||
|
${_patches[@]}
|
||||||
|
)
|
||||||
|
sha512sums=("570429c3f0b560b2f946ac9baba97d66d7d6485e46eb695b17003b5913028f62d35822477633e911cd3ea60e6ce0ecc7d9d82de7d8257272f9ca7b43761438be"
|
||||||
|
${_patch_sums[@]}
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||||
|
cd "source"
|
||||||
|
for _patch in ${_patches[@]}; do
|
||||||
|
patch -p1 -i ${filedir}/${_patch}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
src_build() {
|
||||||
|
local common_args=(
|
||||||
|
-S "source"
|
||||||
|
-D CMAKE_INSTALL_PREFIX=/usr
|
||||||
|
-D ENABLE_PIC=ON
|
||||||
|
-D ENABLE_LIBNUMA="no"
|
||||||
|
-D ENABLE_SVT_HEVC="no" # missing
|
||||||
|
-D ENABLE_VTUNE="no" # missing
|
||||||
|
-D GIT_ARCHETYPE=1 #814116
|
||||||
|
)
|
||||||
|
local hdr_args=(
|
||||||
|
"${common_args[@]}"
|
||||||
|
-D HIGH_BIT_DEPTH=ON
|
||||||
|
-D EXPORT_C_API=OFF
|
||||||
|
-D ENABLE_SHARED=OFF
|
||||||
|
-D ENABLE_CLI=OFF
|
||||||
|
)
|
||||||
|
local final_args=(
|
||||||
|
"${common_args[@]}"
|
||||||
|
-D ENABLE_SHARED=TRUE
|
||||||
|
-D EXTRA_LIB='libx265_main10.a;libx265_main12.a'
|
||||||
|
-D EXTRA_LINK_FLAGS='-L .'
|
||||||
|
-D LINKED_10BIT=TRUE
|
||||||
|
-D LINKED_12BIT=TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake -B build-10 "${hdr_args[@]}" -D ENABLE_HDR10_PLUS=ON
|
||||||
|
cmake --build build-10
|
||||||
|
cmake -B build-12 "${hdr_args[@]}" -D MAIN12=ON
|
||||||
|
cmake --build build-12
|
||||||
|
|
||||||
|
cmake -B build "${final_args[@]}"
|
||||||
|
ln -sr build-10/libx265.a build/libx265_main10.a
|
||||||
|
ln -sr build-12/libx265.a build/libx265_main12.a
|
||||||
|
cmake --build build
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
DESTDIR="${pkgdir}" cmake --install build
|
||||||
|
find "${pkgdir}" -name "*.a" -delete
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:ft=sh syn=sh et sw=2:
|
||||||
23
media-libs/x265-3.6/x265-3.5-r5-cpp-std.patch
Normal file
23
media-libs/x265-3.6/x265-3.5-r5-cpp-std.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Fri, 23 Aug 2024 14:31:40 +0200
|
||||||
|
Subject: [PATCH] don't force old c++ standards
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -221,14 +221,6 @@ if(GCC)
|
||||||
|
if(NOT INTEL_CXX AND NOT CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
|
||||||
|
add_definitions(-Wno-class-memaccess)
|
||||||
|
endif()
|
||||||
|
- if(ENABLE_HDR10_PLUS)
|
||||||
|
- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
|
||||||
|
- message(FATAL_ERROR "gcc version above 4.8 required to support hdr10plus")
|
||||||
|
- endif()
|
||||||
|
- add_definitions(-std=gnu++11)
|
||||||
|
- else()
|
||||||
|
- add_definitions(-std=gnu++98)
|
||||||
|
- endif()
|
||||||
|
if(ENABLE_PIC)
|
||||||
|
add_definitions(-fPIC)
|
||||||
|
endif(ENABLE_PIC)
|
||||||
29
media-libs/x265-3.6/x265-3.5-r5-gcc15.patch
Normal file
29
media-libs/x265-3.6/x265-3.5-r5-gcc15.patch
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
From: Ted Rodgers <ted.d.rodgers@gmail.com>
|
||||||
|
Date: Fri, 23 Aug 2024 12:15:56 +0200
|
||||||
|
Subject: [PATCH] Explicitly include <cstdint>
|
||||||
|
|
||||||
|
GCC 15 will no longer include <cstdint> by default, resulting in build
|
||||||
|
failures in projects that do not explicitly include it.
|
||||||
|
|
||||||
|
Error:
|
||||||
|
/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:101:32: error: ‘uint8_t’ does not name a type
|
||||||
|
101 | } else if (static_cast<uint8_t>(ch) <= 0x1f) {
|
||||||
|
| ^~~~~~~
|
||||||
|
/var/tmp/portage/media-libs/x265-3.5-r4/work/x265_3.5/source/dynamicHDR10/json11/json11.cpp:28:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
|
||||||
|
27 | #include <limits>
|
||||||
|
+++ |+#include <cstdint>
|
||||||
|
28 |
|
||||||
|
|
||||||
|
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
--- a/dynamicHDR10/json11/json11.cpp
|
||||||
|
+++ b/dynamicHDR10/json11/json11.cpp
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <limits>
|
||||||
|
+#include <cstdint>
|
||||||
|
|
||||||
|
#if _MSC_VER
|
||||||
|
#pragma warning(disable: 4510) //const member cannot be default initialized
|
||||||
47
media-libs/x265-3.6/x265-3.6-cmake-cleanup.patch
Normal file
47
media-libs/x265-3.6/x265-3.6-cmake-cleanup.patch
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
From d6b009be2aa62c679ea994125c02310d4b8d401b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:23:49 +0200
|
||||||
|
Subject: [PATCH 1/2] cmake: cleanup old policies
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -6,18 +6,9 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
FORCE)
|
||||||
|
endif()
|
||||||
|
message(STATUS "cmake version ${CMAKE_VERSION}")
|
||||||
|
-if(POLICY CMP0025)
|
||||||
|
- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
|
||||||
|
-endif()
|
||||||
|
-if(POLICY CMP0042)
|
||||||
|
- cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
|
||||||
|
-endif()
|
||||||
|
-if(POLICY CMP0054)
|
||||||
|
- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
|
||||||
|
-endif()
|
||||||
|
|
||||||
|
+cmake_minimum_required (VERSION 3.28) # OBJECT libraries require 2.8.8
|
||||||
|
project (x265)
|
||||||
|
-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
|
From 701cc9679e9453cc94afac7904657262109e56b5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:23:59 +0200
|
||||||
|
Subject: [PATCH 2/2] cmake: fix nasm warning
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
--- a/cmake/FindNasm.cmake
|
||||||
|
+++ b/cmake/FindNasm.cmake
|
||||||
|
@@ -20,6 +20,6 @@ if(NASM_EXECUTABLE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Provide standardized success/failure messages
|
||||||
|
-find_package_handle_standard_args(nasm
|
||||||
|
+find_package_handle_standard_args(Nasm
|
||||||
|
REQUIRED_VARS NASM_EXECUTABLE
|
||||||
|
VERSION_VAR NASM_VERSION_STRING)
|
||||||
41
media-libs/x265-3.6/x265-3.6-code-cleanup.patch
Normal file
41
media-libs/x265-3.6/x265-3.6-code-cleanup.patch
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
From bca0b4b72977683794d441e57adc8c279ff4bfca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:25:35 +0200
|
||||||
|
Subject: [PATCH 1/4] use boolean compare instead of bitwise
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/common/cudata.cpp b/common/cudata.cpp
|
||||||
|
index 19281de..d5b295f 100644
|
||||||
|
--- a/common/cudata.cpp
|
||||||
|
+++ b/common/cudata.cpp
|
||||||
|
@@ -73,7 +73,7 @@ inline bool isEqualRow(int addrA, int addrB)
|
||||||
|
/* Check whether 2 addresses point to the same row or column */
|
||||||
|
inline bool isEqualRowOrCol(int addrA, int addrB)
|
||||||
|
{
|
||||||
|
- return isEqualCol(addrA, addrB) | isEqualRow(addrA, addrB);
|
||||||
|
+ return isEqualCol(addrA, addrB) || isEqualRow(addrA, addrB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check whether one address points to the first column */
|
||||||
|
|
||||||
|
From da3eb3ea55be74e440b272e24d7d8e67cb7a76db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:44:55 +0200
|
||||||
|
Subject: [PATCH 2/4] fix variable shadowing
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/common/cudata.h b/common/cudata.h
|
||||||
|
index 8397f05..7f132e6 100644
|
||||||
|
--- a/common/cudata.h
|
||||||
|
+++ b/common/cudata.h
|
||||||
|
@@ -48,7 +48,7 @@ enum PartSize
|
||||||
|
SIZE_2NxnD, // asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
|
||||||
|
SIZE_nLx2N, // asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
|
||||||
|
SIZE_nRx2N, // asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
|
||||||
|
- NUM_SIZES
|
||||||
|
+ PART_NUM_SIZES
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PredMode
|
||||||
23
media-libs/x265-3.6/x265-3.6-code-cleanup_2.patch
Normal file
23
media-libs/x265-3.6/x265-3.6-code-cleanup_2.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From 4ec09af244e2cfe3dfb739d74af7640ac114e775 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:45:33 +0200
|
||||||
|
Subject: [PATCH 3/4] register is a unused and reserved keyword in c++-17
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/common/md5.cpp b/common/md5.cpp
|
||||||
|
index a9042f4..7e638e7 100644
|
||||||
|
--- a/common/md5.cpp
|
||||||
|
+++ b/common/md5.cpp
|
||||||
|
@@ -185,7 +185,10 @@ void MD5Final(MD5Context *ctx, uint8_t *digest)
|
||||||
|
*/
|
||||||
|
void MD5Transform(uint32_t *buf, uint32_t *in)
|
||||||
|
{
|
||||||
|
- register uint32_t a, b, c, d;
|
||||||
|
+#if __cplusplus < 201703L
|
||||||
|
+ register
|
||||||
|
+#endif
|
||||||
|
+ uint32_t a, b, c, d;
|
||||||
|
|
||||||
|
a = buf[0];
|
||||||
|
b = buf[1];
|
||||||
61
media-libs/x265-3.6/x265-3.6-code-cleanup_3.patch
Normal file
61
media-libs/x265-3.6/x265-3.6-code-cleanup_3.patch
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
From 09379bbfe797e54f91ef5702c802f75aad604067 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:26:55 +0200
|
||||||
|
Subject: [PATCH 4/4] use std::abs instead of abs to avoid truncating values
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/common/pixel.cpp b/common/pixel.cpp
|
||||||
|
index 3cd074c..62410f3 100644
|
||||||
|
--- a/common/pixel.cpp
|
||||||
|
+++ b/common/pixel.cpp
|
||||||
|
@@ -124,10 +124,10 @@ int ads_x4(int encDC[4], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
|
||||||
|
int nmv = 0;
|
||||||
|
for (int16_t i = 0; i < width; i++, sums++)
|
||||||
|
{
|
||||||
|
- int ads = abs(encDC[0] - long(sums[0]))
|
||||||
|
- + abs(encDC[1] - long(sums[lx >> 1]))
|
||||||
|
- + abs(encDC[2] - long(sums[delta]))
|
||||||
|
- + abs(encDC[3] - long(sums[delta + (lx >> 1)]))
|
||||||
|
+ int ads = std::abs(encDC[0] - long(sums[0]))
|
||||||
|
+ + std::abs(encDC[1] - long(sums[lx >> 1]))
|
||||||
|
+ + std::abs(encDC[2] - long(sums[delta]))
|
||||||
|
+ + std::abs(encDC[3] - long(sums[delta + (lx >> 1)]))
|
||||||
|
+ costMvX[i];
|
||||||
|
if (ads < thresh)
|
||||||
|
mvs[nmv++] = i;
|
||||||
|
@@ -141,8 +141,8 @@ int ads_x2(int encDC[2], uint32_t *sums, int delta, uint16_t *costMvX, int16_t *
|
||||||
|
int nmv = 0;
|
||||||
|
for (int16_t i = 0; i < width; i++, sums++)
|
||||||
|
{
|
||||||
|
- int ads = abs(encDC[0] - long(sums[0]))
|
||||||
|
- + abs(encDC[1] - long(sums[delta]))
|
||||||
|
+ int ads = std::abs(encDC[0] - long(sums[0]))
|
||||||
|
+ + std::abs(encDC[1] - long(sums[delta]))
|
||||||
|
+ costMvX[i];
|
||||||
|
if (ads < thresh)
|
||||||
|
mvs[nmv++] = i;
|
||||||
|
@@ -156,7 +156,7 @@ int ads_x1(int encDC[1], uint32_t *sums, int, uint16_t *costMvX, int16_t *mvs, i
|
||||||
|
int nmv = 0;
|
||||||
|
for (int16_t i = 0; i < width; i++, sums++)
|
||||||
|
{
|
||||||
|
- int ads = abs(encDC[0] - long(sums[0]))
|
||||||
|
+ int ads = std::abs(encDC[0] - long(sums[0]))
|
||||||
|
+ costMvX[i];
|
||||||
|
if (ads < thresh)
|
||||||
|
mvs[nmv++] = i;
|
||||||
|
diff --git a/encoder/analysis.cpp b/encoder/analysis.cpp
|
||||||
|
index aabf386..127032d 100644
|
||||||
|
--- a/encoder/analysis.cpp
|
||||||
|
+++ b/encoder/analysis.cpp
|
||||||
|
@@ -2692,8 +2692,8 @@ void Analysis::classifyCU(const CUData& ctu, const CUGeom& cuGeom, const Mode& b
|
||||||
|
{
|
||||||
|
offset = (depth * X265_REFINE_INTER_LEVELS) + i;
|
||||||
|
/* Calculate distance values */
|
||||||
|
- diffRefine[i] = abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
|
||||||
|
- diffRefineRd[i] = abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
|
||||||
|
+ diffRefine[i] = std::abs((int64_t)(trainData.cuVariance - m_frame->m_classifyVariance[offset]));
|
||||||
|
+ diffRefineRd[i] = std::abs((int64_t)(cuCost - m_frame->m_classifyRd[offset]));
|
||||||
|
|
||||||
|
/* Calculate prior probability - ranges between 0 and 1 */
|
||||||
|
if (trainingCount)
|
||||||
20
media-libs/x265-3.6/x265-3.6-code-cleanup_4.patch
Normal file
20
media-libs/x265-3.6/x265-3.6-code-cleanup_4.patch
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
From 09379bbfe797e54f91ef5702c802f75aad604067 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Mon, 26 Aug 2024 14:26:55 +0200
|
||||||
|
Subject: [PATCH 4/4] use std::abs instead of abs to avoid truncating values
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/encoder/ratecontrol.cpp b/encoder/ratecontrol.cpp
|
||||||
|
index 9f2b8d9..7732ccd 100644
|
||||||
|
--- a/encoder/ratecontrol.cpp
|
||||||
|
+++ b/encoder/ratecontrol.cpp
|
||||||
|
@@ -1891,7 +1891,7 @@ double RateControl::tuneQScaleForGrain(double rcOverflow)
|
||||||
|
int newQp = rcOverflow > 1.1 ? curQp + 2 : rcOverflow > 1 ? curQp + 1 : curQp - 1 ;
|
||||||
|
double projectedBitrate = int(m_fps + 0.5) * m_qpToEncodedBits[newQp];
|
||||||
|
if (curBitrate > 0 && projectedBitrate > 0)
|
||||||
|
- q = abs(projectedBitrate - m_bitrate) < abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
|
||||||
|
+ q = std::abs(projectedBitrate - m_bitrate) < std::abs (curBitrate - m_bitrate) ? x265_qp2qScale(newQp) : m_lastQScaleFor[P_SLICE];
|
||||||
|
else
|
||||||
|
q = rcOverflow > 1 ? qScaleAvg * qpstep : rcOverflow < 1 ? qScaleAvg / qpstep : m_lastQScaleFor[P_SLICE];
|
||||||
|
return q;
|
||||||
23
media-libs/x265-3.6/x265-cmake-min-version-3.28.patch
Normal file
23
media-libs/x265-3.6/x265-cmake-min-version-3.28.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From a6d121cbaf3f2cdcaf89b2188691a668a2803fd7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Sun, 29 Jun 2025 18:38:36 +0200
|
||||||
|
Subject: [PATCH] cmake min version 3.28
|
||||||
|
|
||||||
|
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/dynamicHDR10/CMakeLists.txt b/dynamicHDR10/CMakeLists.txt
|
||||||
|
index 3639281..88171de 100644
|
||||||
|
--- a/dynamicHDR10/CMakeLists.txt
|
||||||
|
+++ b/dynamicHDR10/CMakeLists.txt
|
||||||
|
@@ -10,7 +10,7 @@ add_library(dynamicHDR10 OBJECT
|
||||||
|
hdr10plus.h
|
||||||
|
api.cpp )
|
||||||
|
|
||||||
|
-cmake_minimum_required (VERSION 2.8.11)
|
||||||
|
+cmake_minimum_required (VERSION 3.28)
|
||||||
|
project(dynamicHDR10)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
--
|
||||||
|
2.50.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user