[FFmpeg-devel] [PATCH] avcodec/libx264: expose nv21 input support

Yu Xiaolei dreifachstein at gmail.com
Sat Aug 1 00:42:15 CEST 2015


libx264 added support for NV21 input recently.

---
  libavcodec/libx264.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 5da816e..c017685 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -381,6 +381,9 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
      case AV_PIX_FMT_NV12:      return X264_CSP_NV12;
      case AV_PIX_FMT_NV16:
      case AV_PIX_FMT_NV20:      return X264_CSP_NV16;
+#ifdef X264_CSP_NV21
+    case AV_PIX_FMT_NV21:      return X264_CSP_NV21;
+#endif
      };
      return 0;
  }
@@ -770,6 +773,9 @@ static const enum AVPixelFormat pix_fmts_8bit[] = {
      AV_PIX_FMT_YUVJ444P,
      AV_PIX_FMT_NV12,
      AV_PIX_FMT_NV16,
+#ifdef X264_CSP_NV21
+    AV_PIX_FMT_NV21,
+#endif
      AV_PIX_FMT_NONE
  };
  static const enum AVPixelFormat pix_fmts_9bit[] = {
--
2.4.5




More information about the ffmpeg-devel mailing list