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>
pull/59/head
Paul B Mahol 13 years ago
parent 17fad33f81
commit 137e80817d
  1. 8
      libavcodec/8svx.c
  2. 5
      libavcodec/a64multienc.c
  3. 4
      libavcodec/asv1.c
  4. 5
      libavcodec/gsmdec.c
  5. 5
      libavcodec/iff.c
  6. 6
      libavcodec/imc.c
  7. 10
      libavcodec/libgsm.c
  8. 5
      libavcodec/mjpegdec.c
  9. 5
      libavcodec/mjpegenc.c
  10. 3
      libavcodec/mlpdec.c
  11. 5
      libavcodec/sp5xdec.c
  12. 5
      libavcodec/wmadec.c
  13. 5
      libavcodec/wmaenc.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

@ -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

@ -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 = {

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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",

@ -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

@ -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

@ -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

Loading…
Cancel
Save