Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-28 01:23:41 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-05 18:04:29 +0300
commit134cba728bc6f4e3c5caec98b800faad244d8cfb (patch)
treef11ace95e1885c4572fbd761d4a6118d4bd886a0 /libavcodec/libx264.c
parent2ccf9ae6ccc8888ce27b6867d87c30c5743e72ce (diff)
Seperate x264rgb encoder and only enable when its actually supported
This avoids enabling and building the x264rgb encoder when its actually not supported and thus would not work Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 449d76dd38..4d14665361 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -442,7 +442,7 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
case AV_PIX_FMT_YUVJ444P:
case AV_PIX_FMT_YUV444P9:
case AV_PIX_FMT_YUV444P10: return X264_CSP_I444;
-#ifdef X264_CSP_BGR
+#if CONFIG_LIBX264RGB_ENCODER
case AV_PIX_FMT_BGR0:
return X264_CSP_BGRA;
case AV_PIX_FMT_BGR24:
@@ -896,14 +896,14 @@ static const enum AVPixelFormat pix_fmts_10bit[] = {
AV_PIX_FMT_NV20,
AV_PIX_FMT_NONE
};
+#if CONFIG_LIBX264RGB_ENCODER
static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
-#ifdef X264_CSP_BGR
AV_PIX_FMT_BGR0,
AV_PIX_FMT_BGR24,
AV_PIX_FMT_RGB24,
-#endif
AV_PIX_FMT_NONE
};
+#endif
static av_cold void X264_init_static(AVCodec *codec)
{
@@ -1047,13 +1047,6 @@ static const AVClass x264_class = {
.version = LIBAVUTIL_VERSION_INT,
};
-static const AVClass rgbclass = {
- .class_name = "libx264rgb",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
AVCodec ff_libx264_encoder = {
.name = "libx264",
.long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
@@ -1070,6 +1063,15 @@ AVCodec ff_libx264_encoder = {
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP,
};
+#endif
+
+#if CONFIG_LIBX264RGB_ENCODER
+static const AVClass rgbclass = {
+ .class_name = "libx264rgb",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
AVCodec ff_libx264rgb_encoder = {
.name = "libx264rgb",