diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-06-11 12:40:28 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-06-17 00:53:06 +0000 |
commit | 137e80817d00fca7a5f6ff6d4fc672fcfe4ad501 (patch) | |
tree | ff95f61379c6eec9990d17998b64f991c408a670 | |
parent | 17fad33f81c7e9787fcdc17934fc1eee6c6aa4bf (diff) | |
download | ffmpeg-137e80817d00fca7a5f6ff6d4fc672fcfe4ad501.tar.gz |
lavc: build some codecs only if they are actually enabled
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavcodec/8svx.c | 8 | ||||
-rw-r--r-- | libavcodec/a64multienc.c | 5 | ||||
-rw-r--r-- | libavcodec/asv1.c | 4 | ||||
-rw-r--r-- | libavcodec/gsmdec.c | 5 | ||||
-rw-r--r-- | libavcodec/iff.c | 5 | ||||
-rw-r--r-- | libavcodec/imc.c | 6 | ||||
-rw-r--r-- | libavcodec/libgsm.c | 10 | ||||
-rw-r--r-- | libavcodec/mjpegdec.c | 5 | ||||
-rw-r--r-- | libavcodec/mjpegenc.c | 5 | ||||
-rw-r--r-- | libavcodec/mlpdec.c | 3 | ||||
-rw-r--r-- | libavcodec/sp5xdec.c | 5 | ||||
-rw-r--r-- | libavcodec/wmadec.c | 5 | ||||
-rw-r--r-- | libavcodec/wmaenc.c | 5 |
13 files changed, 56 insertions, 15 deletions
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index e220ad13cc..6aa52d1e6c 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -208,6 +208,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx) return 0; } +#if CONFIG_EIGHTSVX_FIB_DECODER AVCodec ff_eightsvx_fib_decoder = { .name = "8svx_fib", .type = AVMEDIA_TYPE_AUDIO, @@ -219,7 +220,8 @@ AVCodec ff_eightsvx_fib_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"), }; - +#endif +#if CONFIG_EIGHTSVX_EXP_DECODER AVCodec ff_eightsvx_exp_decoder = { .name = "8svx_exp", .type = AVMEDIA_TYPE_AUDIO, @@ -231,7 +233,8 @@ AVCodec ff_eightsvx_exp_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"), }; - +#endif +#if CONFIG_PCM_S8_PLANAR_DECODER AVCodec ff_pcm_s8_planar_decoder = { .name = "pcm_s8_planar", .type = AVMEDIA_TYPE_AUDIO, @@ -243,3 +246,4 @@ AVCodec ff_pcm_s8_planar_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"), }; +#endif diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 09aaf0c5f9..baa48466a3 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -368,6 +368,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } +#if CONFIG_A64MULTI_ENCODER AVCodec ff_a64multi_encoder = { .name = "a64multi", .type = AVMEDIA_TYPE_VIDEO, @@ -380,7 +381,8 @@ AVCodec ff_a64multi_encoder = { .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"), .capabilities = CODEC_CAP_DELAY, }; - +#endif +#if CONFIG_A64MULTI5_ENCODER AVCodec ff_a64multi5_encoder = { .name = "a64multi5", .type = AVMEDIA_TYPE_VIDEO, @@ -393,3 +395,4 @@ AVCodec ff_a64multi5_encoder = { .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"), .capabilities = CODEC_CAP_DELAY, }; +#endif diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 702a59ee3f..571af56a69 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -614,6 +614,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ return 0; } +#if CONFIG_ASV1_DECODER AVCodec ff_asv1_decoder = { .name = "asv1", .type = AVMEDIA_TYPE_VIDEO, @@ -625,7 +626,9 @@ AVCodec ff_asv1_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"), }; +#endif +#if CONFIG_ASV2_DECODER AVCodec ff_asv2_decoder = { .name = "asv2", .type = AVMEDIA_TYPE_VIDEO, @@ -637,6 +640,7 @@ AVCodec ff_asv2_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"), }; +#endif #if CONFIG_ASV1_ENCODER AVCodec ff_asv1_encoder = { diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index 0b39e0a8dd..1bf3f33913 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -105,6 +105,7 @@ static void gsm_flush(AVCodecContext *avctx) memset(s, 0, sizeof(*s)); } +#if CONFIG_GSM_DECODER AVCodec ff_gsm_decoder = { .name = "gsm", .type = AVMEDIA_TYPE_AUDIO, @@ -116,7 +117,8 @@ AVCodec ff_gsm_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("GSM"), }; - +#endif +#if CONFIG_GSM_MS_DECODER AVCodec ff_gsm_ms_decoder = { .name = "gsm_ms", .type = AVMEDIA_TYPE_AUDIO, @@ -128,3 +130,4 @@ AVCodec ff_gsm_ms_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"), }; +#endif diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 90cafbd370..57ce570957 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -683,6 +683,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } +#if CONFIG_IFF_ILBM_DECODER AVCodec ff_iff_ilbm_decoder = { .name = "iff_ilbm", .type = AVMEDIA_TYPE_VIDEO, @@ -694,7 +695,8 @@ AVCodec ff_iff_ilbm_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IFF ILBM"), }; - +#endif +#if CONFIG_IFF_BYTERUN1_DECODER AVCodec ff_iff_byterun1_decoder = { .name = "iff_byterun1", .type = AVMEDIA_TYPE_VIDEO, @@ -706,3 +708,4 @@ AVCodec ff_iff_byterun1_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IFF ByteRun1"), }; +#endif diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 172c862ec6..2650bf7821 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -991,7 +991,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) return 0; } - +#if CONFIG_IMC_DECODER AVCodec ff_imc_decoder = { .name = "imc", .type = AVMEDIA_TYPE_AUDIO, @@ -1003,7 +1003,8 @@ AVCodec ff_imc_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), }; - +#endif +#if CONFIG_IAC_DECODER AVCodec ff_iac_decoder = { .name = "iac", .type = AVMEDIA_TYPE_AUDIO, @@ -1015,3 +1016,4 @@ AVCodec ff_iac_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"), }; +#endif diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index b7d4b54f3c..b2ed15be68 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -117,6 +117,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } +#if CONFIG_LIBGSM_ENCODER AVCodec ff_libgsm_encoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, @@ -128,7 +129,8 @@ AVCodec ff_libgsm_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; - +#endif +#if CONFIG_LIBGSM_MS_ENCODER AVCodec ff_libgsm_ms_encoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, @@ -140,6 +142,7 @@ AVCodec ff_libgsm_ms_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; +#endif typedef struct LibGSMDecodeContext { AVFrame frame; @@ -237,6 +240,7 @@ static void libgsm_flush(AVCodecContext *avctx) { gsm_option(s->state, GSM_OPT_WAV49, &one); } +#if CONFIG_LIBGSM_DECODER AVCodec ff_libgsm_decoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, @@ -249,7 +253,8 @@ AVCodec ff_libgsm_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; - +#endif +#if CONFIG_LIBGSM_MS_DECODER AVCodec ff_libgsm_ms_decoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, @@ -262,3 +267,4 @@ AVCodec ff_libgsm_ms_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; +#endif diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 05e58f79ec..f24b27913a 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1804,6 +1804,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) return 0; } +#if CONFIG_MJPEG_DECODER #define OFFSET(x) offsetof(MJpegDecodeContext, x) #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { @@ -1832,7 +1833,8 @@ AVCodec ff_mjpeg_decoder = { .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), .priv_class = &mjpegdec_class, }; - +#endif +#if CONFIG_THP_DECODER AVCodec ff_thp_decoder = { .name = "thp", .type = AVMEDIA_TYPE_VIDEO, @@ -1845,3 +1847,4 @@ AVCodec ff_thp_decoder = { .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"), }; +#endif diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 34c9d7ad2c..068f15c821 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -498,6 +498,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, return ff_MPV_encode_picture(avctx, pkt, &pic, got_packet); } +#if CONFIG_MJPEG_ENCODER AVCodec ff_mjpeg_encoder = { .name = "mjpeg", .type = AVMEDIA_TYPE_VIDEO, @@ -512,7 +513,8 @@ AVCodec ff_mjpeg_encoder = { }, .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), }; - +#endif +#if CONFIG_AMV_ENCODER AVCodec ff_amv_encoder = { .name = "amv", .type = AVMEDIA_TYPE_VIDEO, @@ -526,3 +528,4 @@ AVCodec ff_amv_encoder = { }, .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), }; +#endif diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index a2a6c91bfa..a8980129e2 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -1199,6 +1199,7 @@ error: return AVERROR_INVALIDDATA; } +#if CONFIG_MLP_DECODER AVCodec ff_mlp_decoder = { .name = "mlp", .type = AVMEDIA_TYPE_AUDIO, @@ -1209,7 +1210,7 @@ AVCodec ff_mlp_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), }; - +#endif #if CONFIG_TRUEHD_DECODER AVCodec ff_truehd_decoder = { .name = "truehd", diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c index 4aca0ccbd6..04ddf09fff 100644 --- a/libavcodec/sp5xdec.c +++ b/libavcodec/sp5xdec.c @@ -93,6 +93,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, return i; } +#if CONFIG_SP5X_DECODER AVCodec ff_sp5x_decoder = { .name = "sp5x", .type = AVMEDIA_TYPE_VIDEO, @@ -105,7 +106,8 @@ AVCodec ff_sp5x_decoder = { .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"), }; - +#endif +#if CONFIG_AMV_DECODER AVCodec ff_amv_decoder = { .name = "amv", .type = AVMEDIA_TYPE_VIDEO, @@ -116,3 +118,4 @@ AVCodec ff_amv_decoder = { .decode = sp5x_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), }; +#endif diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index f26a1433a9..2152c9fc65 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -954,6 +954,7 @@ static av_cold void flush(AVCodecContext *avctx) s->last_superframe_len= 0; } +#if CONFIG_WMAV1_DECODER AVCodec ff_wmav1_decoder = { .name = "wmav1", .type = AVMEDIA_TYPE_AUDIO, @@ -966,7 +967,8 @@ AVCodec ff_wmav1_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), }; - +#endif +#if CONFIG_WMAV2_DECODER AVCodec ff_wmav2_decoder = { .name = "wmav2", .type = AVMEDIA_TYPE_AUDIO, @@ -979,3 +981,4 @@ AVCodec ff_wmav2_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), }; +#endif diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index 71446e1ce1..7fb84794f5 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -417,6 +417,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, return 0; } +#if CONFIG_WMAV1_ENCODER AVCodec ff_wmav1_encoder = { .name = "wmav1", .type = AVMEDIA_TYPE_AUDIO, @@ -429,7 +430,8 @@ AVCodec ff_wmav1_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), }; - +#endif +#if CONFIG_WMAV2_ENCODER AVCodec ff_wmav2_encoder = { .name = "wmav2", .type = AVMEDIA_TYPE_AUDIO, @@ -442,3 +444,4 @@ AVCodec ff_wmav2_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), }; +#endif |