Compare commits

...

7 Commits
el9 ... i9cr

Author SHA1 Message Date
MSVSphere Packaging Team c09cf9ab60
import compat-ffmpeg4-4.4.5-2.el9
2 weeks ago
ebasov 12ed82ed83
Rebuild for the new version of dav1d
4 weeks ago
MSVSphere Packaging Team 1ec723a1c6 import compat-ffmpeg4-4.4.5-1.el9
5 months ago
MSVSphere Packaging Team fd49352cbd Merge and update
1 year ago
MSVSphere Packaging Team 74f56c8659 Remove files from SOURCES
1 year ago
MSVSphere Packaging Team 9e60be6bd9 Remove unnecessary files
1 year ago
Arkady L. Shane 3048dacce6
import compat-ffmpeg4-4.4.4-1.el9
1 year ago

@ -0,0 +1,2 @@
1e863eff4a9830275298c2762645df3c1a7ef36b SOURCES/ffmpeg-4.4.5.tar.xz
b98d392acb4de914babe5297563227dc11a1f650 SOURCES/ffmpeg-4.4.5.tar.xz.asc

8
.gitignore vendored

@ -1,6 +1,2 @@
/ffmpeg-4.3.3.tar.xz SOURCES/ffmpeg-4.4.5.tar.xz
/ffmpeg-4.4.1.tar.xz SOURCES/ffmpeg-4.4.5.tar.xz.asc
/ffmpeg-4.4.2.tar.xz
/ffmpeg-4.4.3.tar.xz
/ffmpeg-4.4.4.tar.xz
/ffmpeg-4.4.4.tar.xz.asc

@ -0,0 +1,22 @@
From 03823ac0c6a38bd6ba972539e3203a592579792f Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <timo@rothenpieler.org>
Date: Thu, 1 Jun 2023 23:24:43 +0200
Subject: [PATCH] configure: use non-deprecated nvenc GUID for conftest
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 495493aa0e8a..ae56540f4eb0 100755
--- a/configure
+++ b/configure
@@ -7079,7 +7079,7 @@ enabled nvenc &&
test_cc -I$source_path <<EOF || disable nvenc
#include <ffnvcodec/nvEncodeAPI.h>
NV_ENCODE_API_FUNCTION_LIST flist;
-void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; }
+void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_CODEC_H264_GUID } }; }
int main(void) { return 0; }
EOF

@ -0,0 +1,130 @@
diff -uNrp a/libavcodec/nvenc.c b/libavcodec/nvenc.c
--- a/libavcodec/nvenc.c 2023-04-12 19:02:02.000000000 +0100
+++ b/libavcodec/nvenc.c 2024-04-06 17:42:31.123436353 +0100
@@ -39,9 +39,14 @@
#define CHECK_CU(x) FF_CUDA_CHECK_DL(avctx, dl_fn->cuda_dl, x)
#define NVENC_CAP 0x30
+
+#ifndef NVENC_NO_DEPRECATED_RC
#define IS_CBR(rc) (rc == NV_ENC_PARAMS_RC_CBR || \
rc == NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ || \
rc == NV_ENC_PARAMS_RC_CBR_HQ)
+#else
+#define IS_CBR(rc) (rc == NV_ENC_PARAMS_RC_CBR)
+#endif
const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
AV_PIX_FMT_YUV420P,
@@ -825,6 +830,7 @@ static void nvenc_override_rate_control(
case NV_ENC_PARAMS_RC_CONSTQP:
set_constqp(avctx);
return;
+#ifndef NVENC_NO_DEPRECATED_RC
case NV_ENC_PARAMS_RC_VBR_MINQP:
if (avctx->qmin < 0) {
av_log(avctx, AV_LOG_WARNING,
@@ -835,12 +841,15 @@ static void nvenc_override_rate_control(
}
/* fall through */
case NV_ENC_PARAMS_RC_VBR_HQ:
+#endif
case NV_ENC_PARAMS_RC_VBR:
set_vbr(avctx);
break;
case NV_ENC_PARAMS_RC_CBR:
+#ifndef NVENC_NO_DEPRECATED_RC
case NV_ENC_PARAMS_RC_CBR_HQ:
case NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ:
+#endif
break;
}
@@ -1074,12 +1083,14 @@ static av_cold int nvenc_setup_h264_conf
h264->outputPictureTimingSEI = 1;
+#ifndef NVENC_NO_DEPRECATED_RC
if (cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ ||
cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_CBR_HQ ||
cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_VBR_HQ) {
h264->adaptiveTransformMode = NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE;
h264->fmoMode = NV_ENC_H264_FMO_DISABLE;
}
+#endif
if (ctx->flags & NVENC_LOSSLESS) {
h264->qpPrimeYZeroTransformBypassFlag = 1;
diff -uNrp a/libavcodec/nvenc.h b/libavcodec/nvenc.h
--- a/libavcodec/nvenc.h 2023-04-12 19:01:50.000000000 +0100
+++ b/libavcodec/nvenc.h 2024-04-06 17:42:31.123436353 +0100
@@ -70,6 +70,11 @@ typedef void ID3D11Device;
#define NVENC_HAVE_H264_LVL6
#endif
+// SDK 12.1 compile time feature checks
+#if NVENCAPI_CHECK_VERSION(12, 1)
+#define NVENC_NO_DEPRECATED_RC
+#endif
+
typedef struct NvencSurface
{
NV_ENC_INPUT_PTR input_surface;
diff -uNrp a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
--- a/libavcodec/nvenc_h264.c 2023-04-12 19:01:50.000000000 +0100
+++ b/libavcodec/nvenc_h264.c 2024-04-06 17:42:31.124436369 +0100
@@ -100,6 +100,7 @@ static const AVOption options[] = {
{ "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, "rc" },
{ "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, "rc" },
{ "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, "rc" },
+#ifndef NVENC_NO_DEPRECATED_RC
{ "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_MINQP) }, 0, 0, VE, "rc" },
{ "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)",
0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_QUALITY) }, 0, 0, VE, "rc" },
@@ -109,6 +110,17 @@ static const AVOption options[] = {
{ "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ) }, 0, 0, VE, "rc" },
{ "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_HQ) }, 0, 0, VE, "rc" },
{ "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_HQ) }, 0, 0, VE, "rc" },
+#else
+ { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)",
+ 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)",
+ 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+#endif
{ "rc-lookahead", "Number of frames to look ahead for rate-control",
OFFSET(rc_lookahead), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_REGISTERED_FRAMES, VE },
diff -uNrp a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
--- a/libavcodec/nvenc_hevc.c 2023-04-12 19:01:50.000000000 +0100
+++ b/libavcodec/nvenc_hevc.c 2024-04-06 17:42:31.124436369 +0100
@@ -89,6 +89,7 @@ static const AVOption options[] = {
{ "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, "rc" },
{ "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, "rc" },
{ "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, "rc" },
+#ifndef NVENC_NO_DEPRECATED_RC
{ "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_MINQP) }, 0, 0, VE, "rc" },
{ "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)",
0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_QUALITY) }, 0, 0, VE, "rc" },
@@ -98,6 +99,17 @@ static const AVOption options[] = {
{ "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ) }, 0, 0, VE, "rc" },
{ "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_HQ) }, 0, 0, VE, "rc" },
{ "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_HQ) }, 0, 0, VE, "rc" },
+#else
+ { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)",
+ 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)",
+ 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+ { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, "rc" },
+ { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, "rc" },
+#endif
{ "rc-lookahead", "Number of frames to look ahead for rate-control",
OFFSET(rc_lookahead), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_REGISTERED_FRAMES, VE },

@ -0,0 +1,61 @@
diff -uNrp a/libavcodec/nvenc.c b/libavcodec/nvenc.c
--- a/libavcodec/nvenc.c 2024-07-28 23:54:46.000000000 +0100
+++ b/libavcodec/nvenc.c 2024-11-23 16:57:00.759959963 +0000
@@ -1114,6 +1114,11 @@ static av_cold int nvenc_setup_h264_conf
h264->level = ctx->level;
+#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API
+ h264->inputBitDepth = h264->outputBitDepth =
+ IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
+#endif
+
if (ctx->coder >= 0)
h264->entropyCodingMode = ctx->coder;
@@ -1200,7 +1205,12 @@ static av_cold int nvenc_setup_hevc_conf
hevc->chromaFormatIDC = IS_YUV444(ctx->data_pix_fmt) ? 3 : 1;
+#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API
+ hevc->inputBitDepth = hevc->outputBitDepth =
+ IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
+#else
hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
+#endif
hevc->level = ctx->level;
@@ -1405,14 +1415,14 @@ static NV_ENC_BUFFER_FORMAT nvenc_map_bu
{
switch (pix_fmt) {
case AV_PIX_FMT_YUV420P:
- return NV_ENC_BUFFER_FORMAT_YV12_PL;
+ return NV_ENC_BUFFER_FORMAT_YV12;
case AV_PIX_FMT_NV12:
- return NV_ENC_BUFFER_FORMAT_NV12_PL;
+ return NV_ENC_BUFFER_FORMAT_NV12;
case AV_PIX_FMT_P010:
case AV_PIX_FMT_P016:
return NV_ENC_BUFFER_FORMAT_YUV420_10BIT;
case AV_PIX_FMT_YUV444P:
- return NV_ENC_BUFFER_FORMAT_YUV444_PL;
+ return NV_ENC_BUFFER_FORMAT_YUV444;
case AV_PIX_FMT_YUV444P16:
return NV_ENC_BUFFER_FORMAT_YUV444_10BIT;
case AV_PIX_FMT_0RGB32:
diff -uNrp a/libavcodec/nvenc.h b/libavcodec/nvenc.h
--- a/libavcodec/nvenc.h 2024-11-23 17:00:50.338016687 +0000
+++ b/libavcodec/nvenc.h 2024-11-23 16:57:00.760959981 +0000
@@ -75,6 +75,11 @@ typedef void ID3D11Device;
#define NVENC_NO_DEPRECATED_RC
#endif
+// SDK 12.2 compile time feature checks
+#if NVENCAPI_CHECK_VERSION(12, 2)
+#define NVENC_HAVE_NEW_BIT_DEPTH_API
+#endif
+
typedef struct NvencSurface
{
NV_ENC_INPUT_PTR input_surface;

@ -42,13 +42,16 @@
Summary: Digital VCR and streaming server Summary: Digital VCR and streaming server
Name: compat-ffmpeg4 Name: compat-ffmpeg4
Version: 4.4.4 Version: 4.4.5
Release: 1%{?dist} Release: 2%{?dist}
License: %{ffmpeg_license} License: %{ffmpeg_license}
URL: https://ffmpeg.org/ URL: https://ffmpeg.org/
Source0: %{url}/releases/ffmpeg-%{version}.tar.xz Source0: %{url}/releases/ffmpeg-%{version}.tar.xz
Source1: %{url}/releases/ffmpeg-%{version}.tar.xz.asc Source1: %{url}/releases/ffmpeg-%{version}.tar.xz.asc
Source2: %{url}/ffmpeg-devel.asc Source2: %{url}/ffmpeg-devel.asc
Patch0: configure-fix-nvenc-detection.patch
Patch1: nvenc-stop-using-deprecated-rc-modes.patch
Patch2: nvenc-support-SDK-12.2-bit-depth-API.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
@ -174,7 +177,7 @@ This package contains development files for %{name}
--libdir=%{_libdir} \\\ --libdir=%{_libdir} \\\
--mandir=%{_mandir} \\\ --mandir=%{_mandir} \\\
--arch=%{_target_cpu} \\\ --arch=%{_target_cpu} \\\
--optflags="%{optflags}" \\\ --optflags="%{optflags} -Wno-int-conversion" \\\
--extra-ldflags="%{?__global_ldflags}" \\\ --extra-ldflags="%{?__global_ldflags}" \\\
--disable-manpages \\\ --disable-manpages \\\
%{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\ %{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\
@ -331,6 +334,33 @@ rm -rf %{buildroot}/%{_datadir}/compat-ffmpeg4/
%changelog %changelog
* Fri Nov 29 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 4.4.5-2
- Rebuilt against new dav1d
* Sat Nov 23 2024 Leigh Scott <leigh123linux@gmail.com> - 4.4.5-2
- Rebuild for new x265
* Sun Aug 04 2024 Leigh Scott <leigh123linux@gmail.com> - 4.4.5-1
- Update to 4.4.5
* Thu Aug 01 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 4.4.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Apr 06 2024 Leigh Scott <leigh123linux@gmail.com> - 4.4.4-5
- Rebuild for new x265 version
* Sat Feb 03 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 4.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Leigh Scott <leigh123linux@gmail.com> - 4.4.4-3
- rebuilt
* Wed Aug 02 2023 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 4.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 18 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 4.4.4-1
- Rebuilt for MSVSphere 9.2
* Thu Apr 13 2023 Leigh Scott <leigh123linux@gmail.com> - 4.4.4-1 * Thu Apr 13 2023 Leigh Scott <leigh123linux@gmail.com> - 4.4.4-1
- Update to 4.4.4 - Update to 4.4.4

@ -1,2 +0,0 @@
SHA512 (ffmpeg-4.4.4.tar.xz) = 253799eccd129dad331db85def5352178ae22303e42af47fc013a6adfd4b60d1e59ff5f9ac6118fe3b403affa56ea1f3ba658042f526a914fba27050c3065daf
SHA512 (ffmpeg-4.4.4.tar.xz.asc) = 47afa042d8b529d0bfce391455a25cda261f39f8510601d7de2aba6398483ecb623992626e8489aa2a636e3cb93008f26b32080e526143254226d4e2651accea
Loading…
Cancel
Save