import compat-ffmpeg4-4.4.5-2.el9

i9cr changed/i9cr/compat-ffmpeg4-4.4.5-2.el9
MSVSphere Packaging Team 2 weeks ago
parent 12ed82ed83
commit c09cf9ab60
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -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;

@ -43,7 +43,7 @@
Summary: Digital VCR and streaming server Summary: Digital VCR and streaming server
Name: compat-ffmpeg4 Name: compat-ffmpeg4
Version: 4.4.5 Version: 4.4.5
Release: 1%{?dist}.1 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
@ -51,6 +51,7 @@ Source1: %{url}/releases/ffmpeg-%{version}.tar.xz.asc
Source2: %{url}/ffmpeg-devel.asc Source2: %{url}/ffmpeg-devel.asc
Patch0: configure-fix-nvenc-detection.patch Patch0: configure-fix-nvenc-detection.patch
Patch1: nvenc-stop-using-deprecated-rc-modes.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
@ -333,8 +334,11 @@ rm -rf %{buildroot}/%{_datadir}/compat-ffmpeg4/
%changelog %changelog
* Fri Nov 29 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 4.4.5-1.el9.1 * Fri Nov 29 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 4.4.5-2
- Rebuilt against new dav1d - 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 * Sun Aug 04 2024 Leigh Scott <leigh123linux@gmail.com> - 4.4.5-1
- Update to 4.4.5 - Update to 4.4.5

Loading…
Cancel
Save