aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-08-07 20:41:02 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-08-07 20:41:02 +0200
commit81f25a105136bc404df63bf8386e90492ef84944 (patch)
tree3d0fbcedfca44c7a8b75ac83ed8d2f1d9ce49cb8
parenta66e74306a36c8467452a67d2d1af51dbbb9b4c5 (diff)
downloadffmpeg-81f25a105136bc404df63bf8386e90492ef84944.tar.gz
lavc/libx264: Support monochrome encoding.
-rw-r--r--libavcodec/libx264.c10
-rw-r--r--libavcodec/version.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 12379ff763..54e6703d73 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -161,6 +161,8 @@ static int avfmt2_num_planes(int avfmt)
case AV_PIX_FMT_BGR0:
case AV_PIX_FMT_BGR24:
case AV_PIX_FMT_RGB24:
+ case AV_PIX_FMT_GRAY8:
+ case AV_PIX_FMT_GRAY10:
return 1;
default:
@@ -443,6 +445,10 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
#ifdef X264_CSP_NV21
case AV_PIX_FMT_NV21: return X264_CSP_NV21;
#endif
+#ifdef X264_CSP_I400
+ case AV_PIX_FMT_GRAY8:
+ case AV_PIX_FMT_GRAY10: return X264_CSP_I400;
+#endif
};
return 0;
}
@@ -885,6 +891,10 @@ static const enum AVPixelFormat pix_fmts_all[] = {
AV_PIX_FMT_YUV422P10,
AV_PIX_FMT_YUV444P10,
AV_PIX_FMT_NV20,
+#ifdef X264_CSP_I400
+ AV_PIX_FMT_GRAY8,
+ AV_PIX_FMT_GRAY10,
+#endif
AV_PIX_FMT_NONE
};
#if CONFIG_LIBX264RGB_ENCODER
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3f0d98efdf..907c6fb111 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 22
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \