[FFmpeg-cvslog] avcodec/nvenc: add support for additional (10 bit) RGB pixel formats

Timo Rothenpieler git at videolan.org
Tue Jul 5 19:35:45 EEST 2022


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Jul  5 01:58:10 2022 +0200| [85bc6b5abf287cbc38744b32b9e033158ab24780] | committer: Timo Rothenpieler

avcodec/nvenc: add support for additional (10 bit) RGB pixel formats

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85bc6b5abf287cbc38744b32b9e033158ab24780
---

 libavcodec/nvenc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index b6bcec8246..e19378736f 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -51,7 +51,11 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
     AV_PIX_FMT_P016,      // Truncated to 10bits
     AV_PIX_FMT_YUV444P16, // Truncated to 10bits
     AV_PIX_FMT_0RGB32,
+    AV_PIX_FMT_RGB32,
     AV_PIX_FMT_0BGR32,
+    AV_PIX_FMT_BGR32,
+    AV_PIX_FMT_X2RGB10,
+    AV_PIX_FMT_X2BGR10,
     AV_PIX_FMT_GBRP,
     AV_PIX_FMT_GBRP16,    // Truncated to 10bits
     AV_PIX_FMT_CUDA,
@@ -1510,9 +1514,15 @@ static NV_ENC_BUFFER_FORMAT nvenc_map_buffer_format(enum AVPixelFormat pix_fmt)
     case AV_PIX_FMT_YUV444P16:
         return NV_ENC_BUFFER_FORMAT_YUV444_10BIT;
     case AV_PIX_FMT_0RGB32:
+    case AV_PIX_FMT_RGB32:
         return NV_ENC_BUFFER_FORMAT_ARGB;
     case AV_PIX_FMT_0BGR32:
+    case AV_PIX_FMT_BGR32:
         return NV_ENC_BUFFER_FORMAT_ABGR;
+    case AV_PIX_FMT_X2RGB10:
+        return NV_ENC_BUFFER_FORMAT_ARGB10;
+    case AV_PIX_FMT_X2BGR10:
+        return NV_ENC_BUFFER_FORMAT_ABGR10;
     default:
         return NV_ENC_BUFFER_FORMAT_UNDEFINED;
     }



More information about the ffmpeg-cvslog mailing list