[FFmpeg-devel] [PATCH 2/2] avcodec/nvenc: Use the right pix format for YUV444P10 content

Philip Langdale philipl at overt.org
Thu Feb 2 00:54:19 EET 2017


Now that we have an accurate pixfmt available, let's use it for
the format mapping in nvenc and stop pretending we support > 10bit.

Signed-off-by: Philip Langdale <philipl at overt.org>
---
 libavcodec/nvenc.c   | 8 ++++----
 libavcodec/version.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 7005465..b2b6ec9 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -41,7 +41,7 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
     AV_PIX_FMT_NV12,
     AV_PIX_FMT_P010,
     AV_PIX_FMT_YUV444P,
-    AV_PIX_FMT_YUV444P16,
+    AV_PIX_FMT_YUV444P10MSB,
     AV_PIX_FMT_0RGB32,
     AV_PIX_FMT_0BGR32,
     AV_PIX_FMT_CUDA,
@@ -49,10 +49,10 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
 };
 
 #define IS_10BIT(pix_fmt) (pix_fmt == AV_PIX_FMT_P010 ||    \
-                           pix_fmt == AV_PIX_FMT_YUV444P16)
+                           pix_fmt == AV_PIX_FMT_YUV444P10MSB)
 
 #define IS_YUV444(pix_fmt) (pix_fmt == AV_PIX_FMT_YUV444P || \
-                            pix_fmt == AV_PIX_FMT_YUV444P16)
+                            pix_fmt == AV_PIX_FMT_YUV444P10MSB)
 
 static const struct {
     NVENCSTATUS nverr;
@@ -1041,7 +1041,7 @@ static NV_ENC_BUFFER_FORMAT nvenc_map_buffer_format(enum AVPixelFormat pix_fmt)
         return NV_ENC_BUFFER_FORMAT_YUV420_10BIT;
     case AV_PIX_FMT_YUV444P:
         return NV_ENC_BUFFER_FORMAT_YUV444_PL;
-    case AV_PIX_FMT_YUV444P16:
+    case AV_PIX_FMT_YUV444P10MSB:
         return NV_ENC_BUFFER_FORMAT_YUV444_10BIT;
     case AV_PIX_FMT_0RGB32:
         return NV_ENC_BUFFER_FORMAT_ARGB;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index c038e4b..82a89f9 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  57
-#define LIBAVCODEC_VERSION_MINOR  75
+#define LIBAVCODEC_VERSION_MINOR  76
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-- 
2.9.3


More information about the ffmpeg-devel mailing list