From 52d7ada5653f59290a82a2a565f08d359e4aa79c Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Tue, 13 Aug 2024 03:02:11 +0200 Subject: [PATCH] ffmpeg5.1: fix nvenc patch --- ffmpeg5.1 | 9 +++---- ...fix_nvenc_outdated_format_specifiers.patch | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 ffmpeg5.1.files/ffmpeg5.1-fix_nvenc_outdated_format_specifiers.patch diff --git a/ffmpeg5.1 b/ffmpeg5.1 index 421af53..e9b488d 100644 --- a/ffmpeg5.1 +++ b/ffmpeg5.1 @@ -1,9 +1,6 @@ -add#source#ffmpeg5.1-commit_9999000-nvenc_stop_using_long_deprecated_format_specifiers.patch::https://github.com/FFmpeg/FFmpeg/commit/43b417d516b0fabbec1f02120d948f636b8a018e.patch -add#b2sums#c8dfbed01442b1173c94ee7f7c7bda59802e86359be7dfcf52e25a05f245deac1ed8f3ca8e43650bef033cbd44c3ac15d32c191d913227da497187fcbbefa954 - -# add +icedream.2 to final package version without disturbing the script -replace#global#pkgver()#pkgver() {\n\tprintf '\%s+icedream.2' "$(_pkgver "$@")"\n}\n_pkgver() +# add +icedream.3 to final package version without disturbing the script +replace#global#pkgver()#pkgver() {\n\tprintf '\%s+icedream.3' "$(_pkgver "$@")"\n}\n_pkgver() replace#global#pkgver=#_pkgver= replace#global#$pkgver#\$_pkgver replace#global#${pkgver}#\${_pkgver} -addline#global#_pkgver=#pkgver=\${_pkgver}+icedream.2 +addline#global#_pkgver=#pkgver=\${_pkgver}+icedream.3 diff --git a/ffmpeg5.1.files/ffmpeg5.1-fix_nvenc_outdated_format_specifiers.patch b/ffmpeg5.1.files/ffmpeg5.1-fix_nvenc_outdated_format_specifiers.patch new file mode 100644 index 0000000..dcae1e6 --- /dev/null +++ b/ffmpeg5.1.files/ffmpeg5.1-fix_nvenc_outdated_format_specifiers.patch @@ -0,0 +1,26 @@ +diff --git c/ffmpeg/libavcodec/nvenc.c i/ffmpeg/libavcodec/nvenc.c +index 5d4989861c..288d2c4bfc 100644 +--- c/ffmpeg/libavcodec/nvenc.c ++++ i/ffmpeg/libavcodec/nvenc.c +@@ -1502,15 +1502,15 @@ static NV_ENC_BUFFER_FORMAT nvenc_map_buffer_format(enum AVPixelFormat pix_fmt) + { + 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_GBRP: + case AV_PIX_FMT_YUV444P: +- return NV_ENC_BUFFER_FORMAT_YUV444_PL; ++ return NV_ENC_BUFFER_FORMAT_YUV444; + case AV_PIX_FMT_GBRP16: + case AV_PIX_FMT_YUV444P16: + return NV_ENC_BUFFER_FORMAT_YUV444_10BIT; +-- +2.45.2 +