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

Submitted by Philip Langdale on Feb. 1, 2017, 10:54 p.m.

Details

Message ID 20170201225419.32405-3-philipl@overt.org
State New
Headers show

Commit Message

Philip Langdale Feb. 1, 2017, 10:54 p.m.
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@overt.org>
---
 libavcodec/nvenc.c   | 8 ++++----
 libavcodec/version.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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, \