[packages/ffmpeg] up to 5.0 (new sonames)
atler
atler at pld-linux.org
Sun Jan 23 12:30:22 CET 2022
commit eaebd46790c06b15ecef28dc3b3965d3064fd75a
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Jan 23 12:18:29 2022 +0100
up to 5.0 (new sonames)
- libavresample dropped by upstream
ffmpeg-glslang.patch | 11 ---------
ffmpeg.spec | 55 ++++++++++++++++++++++----------------------
v4l2-request-hwdec.patch | 59 ++++++++----------------------------------------
3 files changed, 38 insertions(+), 87 deletions(-)
---
diff --git a/ffmpeg.spec b/ffmpeg.spec
index 9a24448..4f91501 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -31,7 +31,7 @@
%bcond_without flite # flite voice synthesis support
%bcond_without frei0r # frei0r video filtering
%bcond_without fribidi # fribidi support
-%bcond_without glslang # GLSL->SPIRV compilation via libglslang
+%bcond_with glslang # GLSL->SPIRV compilation via libglslang
%bcond_without gme # Game Music Emu support
%bcond_without gsm # GSM de/encoding via libgsm
%bcond_without iec61883 # ec61883 via libiec61883
@@ -42,6 +42,7 @@
%bcond_with libdrm # Linux Direct Rendering Manager code
%bcond_with libklvanc # Kernel Labs VANC processing (in decklink driver)
%bcond_without libmysofa # sofalizer filter
+%bcond_with libplacebo # libplacebo filters
%bcond_without librist # RIST support via librist
%bcond_with librsvg # SVG rasterization via librsvg
%bcond_with libxml2 # XML parsing using libxml2
@@ -62,6 +63,7 @@
%bcond_with rav1e # AV1 encoding using rav1e
%bcond_with rkmpp # Rockchip Media Process Platform code [implies libdrm]
%bcond_without rubberband # rubberband filter
+%bcond_without shaderc # GLSL->SPIRV compilation via libshaderc
%bcond_without shine # shine fixed-point MP3 encoder
%bcond_with smb # SMB support via libsmbclient
%bcond_without snappy # Snappy compression support (needed for hap encoding)
@@ -97,6 +99,9 @@
%if %{with rkmpp} || %{with v4l2_request}
%define with_libdrm 1
%endif
+%if %{with glslang}
+%undefine with_shaderc
+%endif
%ifnarch %{ix86} %{x8664}
%undefine with_ffnvcodec
@@ -116,7 +121,7 @@
Summary: FFmpeg - a very fast video and audio converter
Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
Name: ffmpeg
-Version: 4.4.1
+Version: 5.0
Release: 1
# LGPL or GPL, chosen at configure time (GPL version is more featured)
# GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
@@ -125,14 +130,13 @@ Release: 1
License: GPL v3+ with LGPL v3+ parts
Group: Applications/Multimedia
Source0: https://ffmpeg.org/releases/%{name}-%{version}.tar.xz
-# Source0-md5: 41a1ca8693acc56088e8eaf3899b91ea
+# Source0-md5: be3a9c73f7b492cd98301ac2086f0862
Patch0: %{name}-omx-libnames.patch
Patch1: %{name}-atadenoise.patch
Patch2: opencv4.patch
Patch3: v4l2-request-hwdec.patch
-Patch4: %{name}-glslang.patch
URL: http://www.ffmpeg.org/
-%{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.10}
+%{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.11}
%{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
%{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
@@ -140,7 +144,7 @@ URL: http://www.ffmpeg.org/
%{?with_omx:BuildRequires: OpenMAX-IL-devel}
BuildRequires: SDL2-devel >= 2.0.1
BuildRequires: SDL2-devel < 2.1.0
-%{?with_vulkan:BuildRequires: Vulkan-Loader-devel >= 1.1.97}
+%{?with_vulkan:BuildRequires: Vulkan-Loader-devel >= 1.2.189}
BuildRequires: alsa-lib-devel
%{?with_aom:BuildRequires: aom-devel >= 1.0.0}
%{?with_aribb24:BuildRequires: aribb24-devel}
@@ -168,7 +172,7 @@ BuildRequires: jack-audio-connection-kit-devel
%{?with_ladspa:BuildRequires: ladspa-devel}
BuildRequires: lame-libs-devel >= 3.98.3
%{?with_lensfun:BuildRequires: lensfun-devel >= 0.3.95}
-BuildRequires: libass-devel
+BuildRequires: libass-devel >= 0.11.0
%ifarch %{armv6}
BuildRequires: libatomic-devel
%endif
@@ -187,6 +191,7 @@ BuildRequires: libcdio-paranoia-devel >= 0.90-2
%{?with_modplug:BuildRequires: libmodplug-devel}
%{?with_libmysofa:BuildRequires: libmysofa-devel >= 0.7}
%{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.4.5}
+%{?with_libplacebo:BuildRequires: libplacebo-devel >= 4.192.0}
%if %{with dc1394} || %{with iec61883}
BuildRequires: libraw1394-devel >= 2
%endif
@@ -240,6 +245,7 @@ BuildRequires: pkgconfig
%{?with_rkmpp:BuildRequires: rockchip-mpp-devel >= 1.3.7}
BuildRequires: rpmbuild(macros) >= 2.007
%{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1}
+%{?with_shaderc:BuildRequires: shaderc-devel >= 2019.1}
%{?with_shine:BuildRequires: shine-devel >= 3.0.0}
%{?with_snappy:BuildRequires: snappy-devel}
%{?with_soxr:BuildRequires: soxr-devel}
@@ -308,7 +314,7 @@ Summary: ffmpeg libraries
Summary(pl.UTF-8): Biblioteki ffmpeg
Group: Libraries
Requires: SDL2 >= 2.0.1
-%{?with_vulkan:Requires: Vulkan-Loader >= 1.1.97}
+%{?with_vulkan:Requires: Vulkan-Loader >= 1.2.189}
%{?with_aom:Requires: aom >= 1.0.0}
Requires: celt >= 0.11.0
%{?with_dav1d:Requires: dav1d >= 0.5.0}
@@ -319,8 +325,10 @@ Requires: celt >= 0.11.0
Requires: gnutls-libs >= 3.0.20
%endif
%{?with_kvazaar:Requires: kvazaar-libs >= 0.8.1}
+Requires: libass >= 0.11.0
%{?with_libmysofa:Requires: libmysofa >= 0.7}
%{?with_openmpt:Requires: libopenmpt >= 0.4.5}
+%{?with_libplacebo:BuildRequires: libplacebo >= 4.192.0}
%{?with_librist:Requires: librist >= 0.2}
%{?with_theora:Requires: libtheora >= 1.0-0.beta3}
%if %{with va}
@@ -382,7 +390,7 @@ Requires: %{name}-libs = %{version}-%{release}
%{?with_openal:Requires: OpenAL-devel >= 1.1}
%{?with_opencl:Requires: OpenCL-devel >= 1.2}
%{?with_opengl:Requires: OpenGL-devel}
-%{?with_vulkan:Requires: Vulkan-Loader-devel >= 1.1.97}
+%{?with_vulkan:Requires: Vulkan-Loader-devel >= 1.2.189}
Requires: SDL2-devel >= 2.0.1
Requires: alsa-lib-devel
%{?with_aom:Requires: aom-devel >= 1.0.0}
@@ -404,7 +412,7 @@ Requires: jack-audio-connection-kit-devel
%{?with_kvazaar:Requires: kvazaar-devel >= 0.8.1}
Requires: lame-libs-devel >= 3.98.3
%{?with_lensfun:Requires: lensfun-devel >= 0.3.95}
-Requires: libass-devel
+Requires: libass-devel >= 0.11.0
%{?with_iec61883:Requires: libavc1394-devel}
Requires: libbluray-devel
%{?with_bs2b:Requires: libbs2b-devel}
@@ -537,7 +545,6 @@ Dokumentacja pakietu FFmpeg w formacie HTML.
%if %{with v4l2_request}
%patch3 -p1
%endif
-%patch4 -p1
# package the grep result for mplayer, the result formatted as ./mplayer/configure
cat <<EOF > ffmpeg-avconfig
@@ -624,7 +631,6 @@ EOF
--disable-stripping \
%{!?with_doc:--disable-doc} \
--enable-avfilter \
- --enable-avresample \
%{?with_chromaprint:--enable-chromaprint} \
%{?with_cudasdk:--enable-cuda-nvcc} \
%{?with_decklink:--enable-decklink} \
@@ -678,6 +684,7 @@ EOF
%{?with_librsvg:--enable-librsvg} \
--enable-librtmp \
%{?with_rubberband:--enable-librubberband} \
+ %{?with_shaderc:--enable-libshaderc} \
%{?with_shine:--enable-libshine} \
%{?with_smb:--enable-libsmbclient} \
%{?with_snappy:--enable-libsnappy} \
@@ -720,7 +727,7 @@ EOF
--enable-swscale \
%{!?with_va:--disable-vaapi} \
%{?with_vapoursynth:--enable-vapoursynth} \
- %{?with_vulkan:--enable-vulkan} \
+ %{!?with_vulkan:--disable-vulkan} \
%if %{with v4l2_request}
--enable-libudev \
--enable-v4l2-request \
@@ -814,23 +821,21 @@ rm -rf $RPM_BUILD_ROOT
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.58
+%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.59
%attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.58
+%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.59
%attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.7
+%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.8
%attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavformat.so.58
-%attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavresample.so.4
+%attr(755,root,root) %ghost %{_libdir}/libavformat.so.59
%attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavutil.so.56
+%attr(755,root,root) %ghost %{_libdir}/libavutil.so.57
%attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.55
+%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.56
%attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libswresample.so.3
+%attr(755,root,root) %ghost %{_libdir}/libswresample.so.4
%attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libswscale.so.5
+%attr(755,root,root) %ghost %{_libdir}/libswscale.so.6
%files devel
%defattr(644,root,root,755)
@@ -840,7 +845,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libavdevice.so
%attr(755,root,root) %{_libdir}/libavfilter.so
%attr(755,root,root) %{_libdir}/libavformat.so
-%attr(755,root,root) %{_libdir}/libavresample.so
%attr(755,root,root) %{_libdir}/libavutil.so
%attr(755,root,root) %{_libdir}/libpostproc.so
%attr(755,root,root) %{_libdir}/libswresample.so
@@ -850,7 +854,6 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/libavdevice
%{_includedir}/libavfilter
%{_includedir}/libavformat
-%{_includedir}/libavresample
%{_includedir}/libavutil
%{_includedir}/libpostproc
%{_includedir}/libswresample
@@ -859,7 +862,6 @@ rm -rf $RPM_BUILD_ROOT
%{_pkgconfigdir}/libavdevice.pc
%{_pkgconfigdir}/libavfilter.pc
%{_pkgconfigdir}/libavformat.pc
-%{_pkgconfigdir}/libavresample.pc
%{_pkgconfigdir}/libavutil.pc
%{_pkgconfigdir}/libpostproc.pc
%{_pkgconfigdir}/libswresample.pc
@@ -881,7 +883,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libavdevice.a
%{_libdir}/libavfilter.a
%{_libdir}/libavformat.a
-%{_libdir}/libavresample.a
%{_libdir}/libavutil.a
%{_libdir}/libpostproc.a
%{_libdir}/libswresample.a
diff --git a/ffmpeg-glslang.patch b/ffmpeg-glslang.patch
deleted file mode 100644
index 9fe8b00..0000000
--- a/ffmpeg-glslang.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ffmpeg-4.4/configure.orig 2021-04-28 18:44:17.052413617 +0200
-+++ ffmpeg-4.4/configure 2021-04-28 18:49:50.977271258 +0200
-@@ -6366,7 +6366,7 @@
- enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
- enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
- enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
--enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
-+enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
- enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
- require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
- enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
diff --git a/v4l2-request-hwdec.patch b/v4l2-request-hwdec.patch
index bac2e9b..f34e16a 100644
--- a/v4l2-request-hwdec.patch
+++ b/v4l2-request-hwdec.patch
@@ -40,7 +40,7 @@ index c0f3f6cc9abe..998beec9ac5b 100644
--- a/libavutil/buffer.h
+++ b/libavutil/buffer.h
@@ -267,6 +267,11 @@ AVBufferPool *av_buffer_pool_init2(int size, void *opaque,
- #endif
+ AVBufferRef* (*alloc)(void *opaque, size_t size),
void (*pool_free)(void *opaque));
+/**
@@ -100,15 +100,15 @@ index 8569a60bf827..9f9909a23696 100755
omx
opencl
+ v4l2_request
- vulkan
"
+ DOCUMENT_LIST="
@@ -2903,6 +2907,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
ffnvcodec_deps_any="libdl LoadLibrary"
nvdec_deps="ffnvcodec"
+v4l2_request_deps="linux_videodev2_h linux_media_h v4l2_timeval_to_ns libdrm libudev"
- vaapi_x11_deps="xlib"
+ vaapi_x11_deps="xlib_x11"
videotoolbox_hwaccel_deps="videotoolbox pthreads"
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
@@ -6376,6 +6381,7 @@ enabled libtls && require_pkg_config libtls libtls tls.h tls_configur
@@ -1237,45 +1237,6 @@ index 000000000000..58d2aa70af80
+int ff_v4l2_request_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);
+
+#endif /* AVCODEC_V4L2_REQUEST_H */
-From a0a5b816593e3911aeedd201baa8057b64a89a39 Mon Sep 17 00:00:00 2001
-From: Ezequiel Garcia <ezequiel at collabora.com>
-Date: Wed, 20 Feb 2019 11:18:00 -0300
-Subject: [PATCH] h264dec: add idr_pic_id to slice context
-
-Used by V4L2 request API h264 hwaccel
-
-Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
-Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
----
- libavcodec/h264_slice.c | 2 +-
- libavcodec/h264dec.h | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
-index db8363e4cc98..a19635a23d44 100644
---- a/libavcodec/h264_slice.c
-+++ b/libavcodec/h264_slice.c
-@@ -1818,7 +1818,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
- }
-
- if (nal->type == H264_NAL_IDR_SLICE)
-- get_ue_golomb_long(&sl->gb); /* idr_pic_id */
-+ sl->idr_pic_id = get_ue_golomb_long(&sl->gb);
-
- sl->poc_lsb = 0;
- sl->delta_poc_bottom = 0;
-diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
-index a419615124b2..316dc6a2c890 100644
---- a/libavcodec/h264dec.h
-+++ b/libavcodec/h264dec.h
-@@ -335,6 +335,7 @@ typedef struct H264SliceContext {
- int delta_poc[2];
- int curr_pic_num;
- int max_pic_num;
-+ int idr_pic_id;
- } H264SliceContext;
-
- /**
From 6349ae1e10d1b68c47c3b883b27567f9678c6e0c Mon Sep 17 00:00:00 2001
From: Boris Brezillon <boris.brezillon at collabora.com>
Date: Wed, 22 May 2019 14:44:22 +0200
@@ -1305,8 +1266,8 @@ index a19635a23d44..5a5ceb09352c 100644
if (first_slice)
av_assert0(!h->setup_finished);
@@ -1820,6 +1820,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
- if (nal->type == H264_NAL_IDR_SLICE)
- sl->idr_pic_id = get_ue_golomb_long(&sl->gb);
+ av_log(h->avctx, AV_LOG_WARNING, "idr_pic_id is invalid\n");
+ }
+ pos = sl->gb.index;
sl->poc_lsb = 0;
@@ -1343,11 +1304,11 @@ index 316dc6a2c890..f2cabac468d0 100644
+ int ref_pic_marking_bit_size;
int frame_num;
- int poc_lsb;
+ int idr_pic_id;
@@ -336,6 +337,7 @@ typedef struct H264SliceContext {
+ int delta_poc[2];
int curr_pic_num;
int max_pic_num;
- int idr_pic_id;
+ int pic_order_cnt_bit_size;
} H264SliceContext;
@@ -1415,15 +1376,15 @@ index 5a5ceb09352c..4ed267317184 100644
CONFIG_H264_VIDEOTOOLBOX_HWACCEL + \
CONFIG_H264_VDPAU_HWACCEL)
@@ -843,6 +844,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
- #endif
#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL
+ if (h->avctx->colorspace != AVCOL_SPC_RGB)
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
+#endif
+#if CONFIG_H264_V4L2REQUEST_HWACCEL
+ *fmt++ = AV_PIX_FMT_DRM_PRIME;
#endif
- if (h->avctx->codec->pix_fmts)
- choices = h->avctx->codec->pix_fmts;
+ if (CHROMA444(h)) {
+ if (h->avctx->colorspace == AVCOL_SPC_RGB) {
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 5eedeb3c275d..a504c89565c7 100644
--- a/libavcodec/h264dec.c
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ffmpeg.git/commitdiff/eaebd46790c06b15ecef28dc3b3965d3064fd75a
More information about the pld-cvs-commit
mailing list