Commit 039068ae authored by diego's avatar diego

Replace generic CONFIG_DECODERS preprocessor conditionals by more specific

CONFIG_FOO_DECODER conditionals where appropriate.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15162 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4758b6a5
...@@ -1019,7 +1019,7 @@ static int dv_encode_mt(AVCodecContext *avctx, void* sl) ...@@ -1019,7 +1019,7 @@ static int dv_encode_mt(AVCodecContext *avctx, void* sl)
} }
#endif #endif
#ifdef CONFIG_DECODERS #ifdef CONFIG_DVVIDEO_DECODER
/* NOTE: exactly one frame must be given (120000 bytes for NTSC, /* NOTE: exactly one frame must be given (120000 bytes for NTSC,
144000 bytes for PAL - or twice those for 50Mbps) */ 144000 bytes for PAL - or twice those for 50Mbps) */
static int dvvideo_decode_frame(AVCodecContext *avctx, static int dvvideo_decode_frame(AVCodecContext *avctx,
...@@ -1060,7 +1060,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, ...@@ -1060,7 +1060,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
return s->sys->frame_size; return s->sys->frame_size;
} }
#endif #endif /* CONFIG_DVVIDEO_DECODER */
static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, uint8_t* buf) static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, uint8_t* buf)
......
...@@ -477,7 +477,7 @@ static int common_init(AVCodecContext *avctx){ ...@@ -477,7 +477,7 @@ static int common_init(AVCodecContext *avctx){
return 0; return 0;
} }
#ifdef CONFIG_DECODERS #if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
static av_cold int decode_init(AVCodecContext *avctx) static av_cold int decode_init(AVCodecContext *avctx)
{ {
HYuvContext *s = avctx->priv_data; HYuvContext *s = avctx->priv_data;
...@@ -573,7 +573,7 @@ s->bgr32=1; ...@@ -573,7 +573,7 @@ s->bgr32=1;
return 0; return 0;
} }
#endif #endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
#ifdef CONFIG_ENCODERS #ifdef CONFIG_ENCODERS
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){ static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
...@@ -931,7 +931,7 @@ static int encode_bgr_bitstream(HYuvContext *s, int count){ ...@@ -931,7 +931,7 @@ static int encode_bgr_bitstream(HYuvContext *s, int count){
return 0; return 0;
} }
#ifdef CONFIG_DECODERS #if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
static void draw_slice(HYuvContext *s, int y){ static void draw_slice(HYuvContext *s, int y){
int h, cy; int h, cy;
int offset[4]; int offset[4];
...@@ -1198,7 +1198,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const ...@@ -1198,7 +1198,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
return (get_bits_count(&s->gb)+31)/32*4 + table_size; return (get_bits_count(&s->gb)+31)/32*4 + table_size;
} }
#endif #endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
static int common_end(HYuvContext *s){ static int common_end(HYuvContext *s){
int i; int i;
...@@ -1209,7 +1209,7 @@ static int common_end(HYuvContext *s){ ...@@ -1209,7 +1209,7 @@ static int common_end(HYuvContext *s){
return 0; return 0;
} }
#ifdef CONFIG_DECODERS #if defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER)
static av_cold int decode_end(AVCodecContext *avctx) static av_cold int decode_end(AVCodecContext *avctx)
{ {
HYuvContext *s = avctx->priv_data; HYuvContext *s = avctx->priv_data;
...@@ -1224,7 +1224,7 @@ static av_cold int decode_end(AVCodecContext *avctx) ...@@ -1224,7 +1224,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
return 0; return 0;
} }
#endif #endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
#ifdef CONFIG_ENCODERS #ifdef CONFIG_ENCODERS
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
...@@ -1433,7 +1433,7 @@ static av_cold int encode_end(AVCodecContext *avctx) ...@@ -1433,7 +1433,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
} }
#endif /* CONFIG_ENCODERS */ #endif /* CONFIG_ENCODERS */
#ifdef CONFIG_DECODERS #ifdef CONFIG_HUFFYUV_DECODER
AVCodec huffyuv_decoder = { AVCodec huffyuv_decoder = {
"huffyuv", "huffyuv",
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
...@@ -1447,7 +1447,9 @@ AVCodec huffyuv_decoder = { ...@@ -1447,7 +1447,9 @@ AVCodec huffyuv_decoder = {
NULL, NULL,
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
}; };
#endif
#ifdef CONFIG_FFVHUFF_DECODER
AVCodec ffvhuff_decoder = { AVCodec ffvhuff_decoder = {
"ffvhuff", "ffvhuff",
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
......
...@@ -750,7 +750,7 @@ static int sonic_encode_frame(AVCodecContext *avctx, ...@@ -750,7 +750,7 @@ static int sonic_encode_frame(AVCodecContext *avctx,
} }
#endif //CONFIG_ENCODERS #endif //CONFIG_ENCODERS
#ifdef CONFIG_DECODERS #ifdef CONFIG_SONIC_DECODER
static av_cold int sonic_decode_init(AVCodecContext *avctx) static av_cold int sonic_decode_init(AVCodecContext *avctx)
{ {
SonicContext *s = avctx->priv_data; SonicContext *s = avctx->priv_data;
...@@ -935,7 +935,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, ...@@ -935,7 +935,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
return (get_bits_count(&gb)+7)/8; return (get_bits_count(&gb)+7)/8;
} }
#endif #endif /* CONFIG_SONIC_DECODER */
#ifdef CONFIG_ENCODERS #ifdef CONFIG_ENCODERS
AVCodec sonic_encoder = { AVCodec sonic_encoder = {
...@@ -963,7 +963,7 @@ AVCodec sonic_ls_encoder = { ...@@ -963,7 +963,7 @@ AVCodec sonic_ls_encoder = {
}; };
#endif #endif
#ifdef CONFIG_DECODERS #ifdef CONFIG_SONIC_DECODER
AVCodec sonic_decoder = { AVCodec sonic_decoder = {
"sonic", "sonic",
CODEC_TYPE_AUDIO, CODEC_TYPE_AUDIO,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment