Maxime Gauduin pushed to branch main at Arch Linux / Packaging / Packages / 
emby-ffmpeg


Commits:
b4afbc83 by Maxime Gauduin at 2024-04-15T22:32:17+02:00
fix patch

- - - - -


2 changed files:

- − 06c2a2c425f22e7dba5cad909737a631cc676e3f.patch
- + 06c2a2c425f22e7dba5cad909737a631cc676e3f.patch


Changes:

=====================================
06c2a2c425f22e7dba5cad909737a631cc676e3f.patch deleted
=====================================
@@ -1 +0,0 @@
-/home/alucryd/Packages/src/06c2a2c425f22e7dba5cad909737a631cc676e3f.patch
\ No newline at end of file


=====================================
06c2a2c425f22e7dba5cad909737a631cc676e3f.patch
=====================================
@@ -0,0 +1,55 @@
+From 06c2a2c425f22e7dba5cad909737a631cc676e3f Mon Sep 17 00:00:00 2001
+From: Timo Rothenpieler <t...@rothenpieler.org>
+Date: Sun, 31 Mar 2024 18:39:49 +0200
+Subject: [PATCH] avcodec/nvenc: support SDK 12.2 bit depth API
+
+---
+ libavcodec/nvenc.c | 15 +++++++++++++++
+ libavcodec/nvenc.h |  5 +++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
+index 0cb3b87c67d92..8327496937349 100644
+--- a/libavcodec/nvenc.c
++++ b/libavcodec/nvenc.c
+@@ -1255,6 +1255,11 @@ static av_cold int 
nvenc_setup_h264_config(AVCodecContext *avctx)
+ 
+     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;
+ 
+@@ -1370,7 +1375,12 @@ static av_cold int 
nvenc_setup_hevc_config(AVCodecContext *avctx)
+ 
+     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;
+ 
+diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
+index 48cdfc58aa26e..d99d8a0d760a0 100644
+--- a/libavcodec/nvenc.h
++++ b/libavcodec/nvenc.h
+@@ -83,6 +83,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;



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/emby-ffmpeg/-/commit/b4afbc8300d5272e4d83307aa879c144537adae3

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/emby-ffmpeg/-/commit/b4afbc8300d5272e4d83307aa879c144537adae3
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to