summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorYu Xiaolei <dreifachstein@gmail.com>2015-08-01 06:42:15 +0800
committerLuca Barbato <lu_zero@gentoo.org>2015-10-01 14:00:28 +0200
commiteb02387add350f2b34a3e61539fe25ec6213eb18 (patch)
tree14b9cae5fdf6a23b4031bfe2fa9b8a2998f4dbda /libavcodec/libx264.c
parent74942685cb457c01937686892878403a409baf27 (diff)
x264: Expose the NV21 input support
x264 build 147 adds the native support for NV21. Useful to avoid additional pixel format conversion when encoding from a wide range of capture devices, Android among those. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index befc47dd08..1a22fa360a 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -323,6 +323,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;
}
@@ -607,6 +610,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[] = {