Compare commits

...

1 Commits
el9 ... i10ce

Author SHA1 Message Date
Arkady L. Shane 4f8f9540a5
import x265-3.6-3.el10
23 hours ago

2
.gitignore vendored

@ -1 +1 @@
x265*.tar.gz
SOURCES/x265_3.6.tar.gz

@ -0,0 +1 @@
51fc4592a9f1e340d87a51233361cc5a3ffd739d SOURCES/x265_3.6.tar.gz

@ -0,0 +1,29 @@
From 8454caf458c5f5d20cce711ff8ea8de55ec1ae50 Mon Sep 17 00:00:00 2001
From: harlanc <hailiang8@staff.weibo.com>
Date: Thu, 1 Dec 2022 07:46:13 +0000
Subject: [PATCH] fix crash when SEI length is variable
---
source/encoder/encoder.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
index 0fea6553c..5a3fcafc7 100644
--- a/source/encoder/encoder.cpp
+++ b/source/encoder/encoder.cpp
@@ -1103,6 +1103,12 @@ void Encoder::copyUserSEIMessages(Frame *frame, const x265_picture* pic_in)
input = seiMsg;
else
input = pic_in->userSEI.payloads[i];
+
+ if (frame->m_userSEI.payloads[i].payload && (frame->m_userSEI.payloads[i].payloadSize < input.payloadSize))
+ {
+ delete[] frame->m_userSEI.payloads[i].payload;
+ frame->m_userSEI.payloads[i].payload = NULL;
+ }
if (!frame->m_userSEI.payloads[i].payload)
frame->m_userSEI.payloads[i].payload = new uint8_t[input.payloadSize];
--
2.45.0

@ -1,12 +1,12 @@
# Use old cmake macro
%global __cmake_in_source_build 1
%global _so_version 199
%global _so_version 209
Summary: H.265/HEVC encoder
Name: x265
Version: 3.5
Release: 5%{?dist}
Version: 3.6
Release: 3%{?dist}
URL: http://x265.org/
# source/Lib/TLibCommon - BSD
# source/Lib/TLibEncoder - BSD
@ -17,13 +17,13 @@ Source0: https://bitbucket.org/multicoreware/%{name}_git/downloads/%{name}_%{
# fix building as PIC
Patch0: x265-pic.patch
Patch1: x265-high-bit-depth-soname.patch
Patch2: x265-detect_cpu_armhfp.patch
Patch3: x265-arm-cflags.patch
Patch4: x265-pkgconfig_path_fix.patch
Patch2: x265-pkgconfig_path_fix.patch
# https://bitbucket.org/multicoreware/x265_git/pull-requests/10
Patch3: https://bitbucket.org/harlancc/x265_git/commits/8454caf458c5f5d20cce711ff8ea8de55ec1ae50/raw#/x265-sei-length-crash-fix.patch
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: cmake3
BuildRequires: cmake
%{?el7:BuildRequires: epel-rpm-macros}
BuildRequires: nasm
BuildRequires: ninja-build
@ -72,7 +72,7 @@ This package contains the shared library development files.
# 10bit: libx265_main10.so
build() {
%cmake3 -Wno-dev -G "Ninja" \
%cmake -Wno-dev -G "Ninja" \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=YES \
-DENABLE_PIC:BOOL=ON \
@ -82,7 +82,7 @@ build() {
-DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy \
$* \
../source
%cmake3_build
%cmake_build
}
# High depth 10/12 bit libraries are supported only on 64 bit. They require
@ -113,7 +113,7 @@ popd
for i in 8 10 12; do
if [ -d ${i}bit ]; then
pushd ${i}bit
%cmake3_install
%cmake_install
# Remove unversioned library, should not be linked to
rm -f %{buildroot}%{_libdir}/libx265_main${i}.so
popd
@ -154,6 +154,24 @@ done
%{_libdir}/pkgconfig/x265.pc
%changelog
* Wed Dec 25 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 3.6-3
- Rebuilt for MSVSphere 10
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 3.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu May 16 2024 Dominik Mierzejewski <rpm@greysector.net> - 3.6-2
- Backport a fix for crashes when encoding with variable length SEI
* Sat Apr 06 2024 Leigh Scott <leigh123linux@gmail.com> - 3.6-1
- Update to 3.6
* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 3.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Aug 02 2023 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 3.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Dec 29 2022 Nicolas Chauvet <kwizart@gmail.com> - 3.5-5
- Enable ENABLE_HDR10_PLUS everywhere rfbz#6454

@ -1 +0,0 @@
SHA512 (x265_3.5.tar.gz) = 230e683239c3e262096ba96246c6f67229a1625d163f86647a411733bb1cf349685858aee3017bce818bb6992448d0abaa9241615a5b620561ce47ecb164f997

@ -1,63 +0,0 @@
--- x265_3.4/source/CMakeLists.txt.cflags
+++ x265_3.4/source/CMakeLists.txt
@@ -238,28 +238,6 @@
endif()
endif()
endif()
- if(ARM AND CROSS_COMPILE_ARM)
- if(ARM64)
- set(ARM_ARGS -fPIC)
- else()
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
- endif()
- message(STATUS "cross compile arm")
- elseif(ARM)
- if(ARM64)
- set(ARM_ARGS -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- find_package(Neon)
- if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- endif()
- add_definitions(${ARM_ARGS})
if(FPROFILE_GENERATE)
if(INTEL_CXX)
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
@@ -546,7 +524,7 @@
add_custom_command(
OUTPUT ${ASM}.${SUFFIX}
COMMAND ${CMAKE_CXX_COMPILER}
- ARGS ${ARM_ARGS} -c ${ASM_SRC} -o ${ASM}.${SUFFIX}
+ ARGS ${CFLAGS} -c ${ASM_SRC} -o ${ASM}.${SUFFIX}
DEPENDS ${ASM_SRC})
endforeach()
elseif(X86)
--- x265_3.4/source/dynamicHDR10/CMakeLists.txt.cflags
+++ x265_3.4/source/dynamicHDR10/CMakeLists.txt
@@ -42,18 +42,6 @@
endif()
endif()
endif()
- if(ARM AND CROSS_COMPILE_ARM)
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
- elseif(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
if(FPROFILE_GENERATE)
if(INTEL_CXX)
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")

@ -1,15 +0,0 @@
--- x265_v2.6/source/test/testharness.h.orig 2017-12-30 22:27:49.827620181 +0000
+++ x265_v2.6/source/test/testharness.h 2017-12-30 22:30:53.239500941 +0000
@@ -70,9 +70,10 @@ protected:
#include <intrin.h>
#elif (!defined(__APPLE__) && (defined (__GNUC__) && (defined(__x86_64__) || defined(__i386__))))
#include <x86intrin.h>
-#elif ( !defined(__APPLE__) && defined (__GNUC__) && defined(__ARM_NEON__))
-#include <arm_neon.h>
#elif defined(__GNUC__) && (!defined(__clang__) || __clang_major__ < 4)
+#if ( !defined(__APPLE__) && defined(__ARM_NEON__))
+#include <arm_neon.h>
+#endif
/* fallback for older GCC/MinGW */
static inline uint32_t __rdtsc(void)
{
Loading…
Cancel
Save