lavc: Add support for interleaved chroma formats to libx264. Interleaved chroma is...
authorKieran Kunhya <kierank@ob-encoder.com>
Sun, 22 Sep 2013 15:54:47 +0000 (10:54 -0500)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Sep 2013 17:55:57 +0000 (19:55 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libx264.c

index 0d8ba29..197662d 100644 (file)
@@ -275,6 +275,9 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
     case AV_PIX_FMT_RGB24:
         return X264_CSP_RGB;
 #endif
+    case AV_PIX_FMT_NV12:      return X264_CSP_NV12;
+    case AV_PIX_FMT_NV16:
+    case AV_PIX_FMT_NV20:      return X264_CSP_NV16;
     };
     return 0;
 }
@@ -602,6 +605,8 @@ static const enum AVPixelFormat pix_fmts_8bit[] = {
     AV_PIX_FMT_YUVJ422P,
     AV_PIX_FMT_YUV444P,
     AV_PIX_FMT_YUVJ444P,
+    AV_PIX_FMT_NV12,
+    AV_PIX_FMT_NV16,
     AV_PIX_FMT_NONE
 };
 static const enum AVPixelFormat pix_fmts_9bit[] = {
@@ -613,6 +618,7 @@ static const enum AVPixelFormat pix_fmts_10bit[] = {
     AV_PIX_FMT_YUV420P10,
     AV_PIX_FMT_YUV422P10,
     AV_PIX_FMT_YUV444P10,
+    AV_PIX_FMT_NV20,
     AV_PIX_FMT_NONE
 };
 static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {