Commit 70724cba authored by Aurelien Jacobs's avatar Aurelien Jacobs

replace some #ifdef CONFIG_* by if(ENABLE_*)

Originally committed as revision 9013 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6d8bfb52
...@@ -1210,8 +1210,8 @@ int MPV_encode_init(AVCodecContext *avctx) ...@@ -1210,8 +1210,8 @@ int MPV_encode_init(AVCodecContext *avctx)
avctx->delay=0; avctx->delay=0;
s->low_delay=1; s->low_delay=1;
break; break;
#ifdef CONFIG_H261_ENCODER
case CODEC_ID_H261: case CODEC_ID_H261:
if (!ENABLE_H261_ENCODER) return -1;
if (ff_h261_get_picture_format(s->width, s->height) < 0) { if (ff_h261_get_picture_format(s->width, s->height) < 0) {
av_log(avctx, AV_LOG_ERROR, "The specified picture size of %dx%d is not valid for the H.261 codec.\nValid sizes are 176x144, 352x288\n", s->width, s->height); av_log(avctx, AV_LOG_ERROR, "The specified picture size of %dx%d is not valid for the H.261 codec.\nValid sizes are 176x144, 352x288\n", s->width, s->height);
return -1; return -1;
...@@ -1220,7 +1220,6 @@ int MPV_encode_init(AVCodecContext *avctx) ...@@ -1220,7 +1220,6 @@ int MPV_encode_init(AVCodecContext *avctx)
avctx->delay=0; avctx->delay=0;
s->low_delay=1; s->low_delay=1;
break; break;
#endif
case CODEC_ID_H263: case CODEC_ID_H263:
if (h263_get_picture_format(s->width, s->height) == 7) { if (h263_get_picture_format(s->width, s->height) == 7) {
av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height); av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height);
...@@ -1348,10 +1347,8 @@ int MPV_encode_init(AVCodecContext *avctx) ...@@ -1348,10 +1347,8 @@ int MPV_encode_init(AVCodecContext *avctx)
ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp); ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp);
ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp); ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp);
#ifdef CONFIG_H261_ENCODER if (ENABLE_H261_ENCODER && s->out_format == FMT_H261)
if (s->out_format == FMT_H261)
ff_h261_encode_init(s); ff_h261_encode_init(s);
#endif
if (s->out_format == FMT_H263) if (s->out_format == FMT_H263)
h263_encode_init(s); h263_encode_init(s);
if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version) if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version)
...@@ -3057,11 +3054,9 @@ if(s->quarter_sample) ...@@ -3057,11 +3054,9 @@ if(s->quarter_sample)
pix_op[s->chroma_x_shift][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift); pix_op[s->chroma_x_shift][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
pix_op[s->chroma_x_shift][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift); pix_op[s->chroma_x_shift][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
} }
#if defined(CONFIG_H261_ENCODER) || defined(CONFIG_H261_DECODER) if((ENABLE_H261_ENCODER || ENABLE_H261_DECODER) && s->out_format == FMT_H261){
if(s->out_format == FMT_H261){
ff_h261_loop_filter(s); ff_h261_loop_filter(s);
} }
#endif
} }
/* apply one mpeg motion vector to the three components */ /* apply one mpeg motion vector to the three components */
...@@ -4588,10 +4583,9 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, ...@@ -4588,10 +4583,9 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
if (ENABLE_WMV2_ENCODER) if (ENABLE_WMV2_ENCODER)
ff_wmv2_encode_mb(s, s->block, motion_x, motion_y); ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
break; break;
#ifdef CONFIG_H261_ENCODER
case CODEC_ID_H261: case CODEC_ID_H261:
if (ENABLE_H261_ENCODER)
ff_h261_encode_mb(s, s->block, motion_x, motion_y); break; ff_h261_encode_mb(s, s->block, motion_x, motion_y); break;
#endif
case CODEC_ID_H263: case CODEC_ID_H263:
case CODEC_ID_H263P: case CODEC_ID_H263P:
case CODEC_ID_FLV1: case CODEC_ID_FLV1:
...@@ -5000,13 +4994,11 @@ static int encode_thread(AVCodecContext *c, void *arg){ ...@@ -5000,13 +4994,11 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->mb_y = mb_y; // moved into loop, can get changed by H.261 s->mb_y = mb_y; // moved into loop, can get changed by H.261
ff_update_block_index(s); ff_update_block_index(s);
#ifdef CONFIG_H261_ENCODER if(ENABLE_H261_ENCODER && s->codec_id == CODEC_ID_H261){
if(s->codec_id == CODEC_ID_H261){
ff_h261_reorder_mb_index(s); ff_h261_reorder_mb_index(s);
xy= s->mb_y*s->mb_stride + s->mb_x; xy= s->mb_y*s->mb_stride + s->mb_x;
mb_type= s->mb_type[xy]; mb_type= s->mb_type[xy];
} }
#endif
/* write gob / video packet header */ /* write gob / video packet header */
if(s->rtp_mode){ if(s->rtp_mode){
...@@ -5773,11 +5765,10 @@ static int encode_picture(MpegEncContext *s, int picture_number) ...@@ -5773,11 +5765,10 @@ static int encode_picture(MpegEncContext *s, int picture_number)
if (ENABLE_MJPEG_ENCODER) if (ENABLE_MJPEG_ENCODER)
mjpeg_picture_header(s); mjpeg_picture_header(s);
break; break;
#ifdef CONFIG_H261_ENCODER
case FMT_H261: case FMT_H261:
if (ENABLE_H261_ENCODER)
ff_h261_encode_picture_header(s, picture_number); ff_h261_encode_picture_header(s, picture_number);
break; break;
#endif
case FMT_H263: case FMT_H263:
if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2) if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
ff_wmv2_encode_picture_header(s, picture_number); ff_wmv2_encode_picture_header(s, picture_number);
...@@ -5785,14 +5776,10 @@ static int encode_picture(MpegEncContext *s, int picture_number) ...@@ -5785,14 +5776,10 @@ static int encode_picture(MpegEncContext *s, int picture_number)
msmpeg4_encode_picture_header(s, picture_number); msmpeg4_encode_picture_header(s, picture_number);
else if (s->h263_pred) else if (s->h263_pred)
mpeg4_encode_picture_header(s, picture_number); mpeg4_encode_picture_header(s, picture_number);
#ifdef CONFIG_RV10_ENCODER else if (ENABLE_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
else if (s->codec_id == CODEC_ID_RV10)
rv10_encode_picture_header(s, picture_number); rv10_encode_picture_header(s, picture_number);
#endif else if (ENABLE_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
#ifdef CONFIG_RV20_ENCODER
else if (s->codec_id == CODEC_ID_RV20)
rv20_encode_picture_header(s, picture_number); rv20_encode_picture_header(s, picture_number);
#endif
else if (s->codec_id == CODEC_ID_FLV1) else if (s->codec_id == CODEC_ID_FLV1)
ff_flv_encode_picture_header(s, picture_number); ff_flv_encode_picture_header(s, picture_number);
else else
......
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