aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2022-07-05 01:58:10 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2022-07-05 18:27:37 +0200
commit85bc6b5abf287cbc38744b32b9e033158ab24780 (patch)
tree0fe2a9907b2dc159b23370d99c93aedb7d02f555 /libavcodec/nvenc.c
parentf9dd8fcf9b87e757096de993dd32571c4a85a2cb (diff)
downloadffmpeg-85bc6b5abf287cbc38744b32b9e033158ab24780.tar.gz
avcodec/nvenc: add support for additional (10 bit) RGB pixel formats
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c10
1 files changed, 10 insertions, 0 deletions
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;
}