Revision 49fb20cb

View differences:

configure
427 427
        ucname="`toupper $cfg`"
428 428
        if enabled $cfg; then
429 429
            echo "#define ${pfx}${ucname} 1" >> $header
430
            echo "#define ENABLE_${ucname} 1" >> $header
431 430
            echo "${pfx}${ucname}=yes" >> $makefile
432 431
        else
433 432
            echo "#define ${pfx}${ucname} 0" >> $header
434
            echo "#define ENABLE_${ucname} 0" >> $header
435 433
        fi
436 434
    done
437 435
}
ffmpeg.c
768 768
        picture2 = picture;
769 769
    }
770 770

  
771
    if (ENABLE_VHOOK)
771
    if (CONFIG_VHOOK)
772 772
        frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
773 773
                           1000000 * ist->pts / AV_TIME_BASE);
774 774

  
libavcodec/allcodecs.c
28 28

  
29 29
#define REGISTER_ENCODER(X,x) { \
30 30
          extern AVCodec x##_encoder; \
31
          if(ENABLE_##X##_ENCODER)  register_avcodec(&x##_encoder); }
31
          if(CONFIG_##X##_ENCODER)  register_avcodec(&x##_encoder); }
32 32
#define REGISTER_DECODER(X,x) { \
33 33
          extern AVCodec x##_decoder; \
34
          if(ENABLE_##X##_DECODER)  register_avcodec(&x##_decoder); }
34
          if(CONFIG_##X##_DECODER)  register_avcodec(&x##_decoder); }
35 35
#define REGISTER_ENCDEC(X,x)  REGISTER_ENCODER(X,x); REGISTER_DECODER(X,x)
36 36

  
37 37
#define REGISTER_PARSER(X,x) { \
38 38
          extern AVCodecParser x##_parser; \
39
          if(ENABLE_##X##_PARSER)  av_register_codec_parser(&x##_parser); }
39
          if(CONFIG_##X##_PARSER)  av_register_codec_parser(&x##_parser); }
40 40
#define REGISTER_BSF(X,x) { \
41 41
          extern AVBitStreamFilter x##_bsf; \
42
          if(ENABLE_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
42
          if(CONFIG_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
43 43

  
44 44
void avcodec_register_all(void)
45 45
{
libavcodec/arm/dsputil_arm.c
118 118

  
119 119
int mm_support(void)
120 120
{
121
    return ENABLE_IWMMXT * FF_MM_IWMMXT;
121
    return HAVE_IWMMXT * FF_MM_IWMMXT;
122 122
}
123 123

  
124 124
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
libavcodec/bitstream.c
82 82

  
83 83
    if(length==0) return;
84 84

  
85
    if(ENABLE_SMALL || words < 16 || put_bits_count(pb)&7){
85
    if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
86 86
        for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i]));
87 87
    }else{
88 88
        for(i=0; put_bits_count(pb)&31; i++)
libavcodec/dsputil.c
2842 2842
}
2843 2843

  
2844 2844
static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
2845
    if(ENABLE_ANY_H263) {
2845
    if(CONFIG_ANY_H263) {
2846 2846
    int x;
2847 2847
    const int strength= ff_h263_loop_filter_strength[qscale];
2848 2848

  
......
2879 2879
}
2880 2880

  
2881 2881
static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
2882
    if(ENABLE_ANY_H263) {
2882
    if(CONFIG_ANY_H263) {
2883 2883
    int y;
2884 2884
    const int strength= ff_h263_loop_filter_strength[qscale];
2885 2885

  
......
4285 4285
#endif //CONFIG_ENCODERS
4286 4286

  
4287 4287
    if(avctx->lowres==1){
4288
        if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !ENABLE_H264_DECODER){
4288
        if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !CONFIG_H264_DECODER){
4289 4289
            c->idct_put= ff_jref_idct4_put;
4290 4290
            c->idct_add= ff_jref_idct4_add;
4291 4291
        }else{
......
4310 4310
            c->idct_add= ff_jref_idct_add;
4311 4311
            c->idct    = j_rev_dct;
4312 4312
            c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
4313
        }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) &&
4313
        }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER ) &&
4314 4314
                avctx->idct_algo==FF_IDCT_VP3){
4315 4315
            c->idct_put= ff_vp3_idct_put_c;
4316 4316
            c->idct_add= ff_vp3_idct_add_c;
......
4326 4326
            c->idct_add= ff_faanidct_add;
4327 4327
            c->idct    = ff_faanidct;
4328 4328
            c->idct_permutation_type= FF_NO_IDCT_PERM;
4329
        }else if(ENABLE_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
4329
        }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
4330 4330
            c->idct_put= ff_ea_idct_put_c;
4331 4331
            c->idct_permutation_type= FF_NO_IDCT_PERM;
4332 4332
        }else{ //accurate/default
......
4337 4337
        }
4338 4338
    }
4339 4339

  
4340
    if (ENABLE_H264_DECODER) {
4340
    if (CONFIG_H264_DECODER) {
4341 4341
        c->h264_idct_add= ff_h264_idct_add_c;
4342 4342
        c->h264_idct8_add= ff_h264_idct8_add_c;
4343 4343
        c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
......
4572 4572
    c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
4573 4573
    c->h264_loop_filter_strength= NULL;
4574 4574

  
4575
    if (ENABLE_ANY_H263) {
4575
    if (CONFIG_ANY_H263) {
4576 4576
        c->h263_h_loop_filter= h263_h_loop_filter_c;
4577 4577
        c->h263_v_loop_filter= h263_v_loop_filter_c;
4578 4578
    }
4579 4579

  
4580
    if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
4580
    if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
4581 4581
        c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c;
4582 4582
        c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c;
4583 4583
    }
......
4623 4623
    memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
4624 4624
    memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
4625 4625

  
4626
    if (ENABLE_MMX)      dsputil_init_mmx   (c, avctx);
4627
    if (ENABLE_ARM)      dsputil_init_arm   (c, avctx);
4628
    if (ENABLE_MLIB)     dsputil_init_mlib  (c, avctx);
4629
    if (ENABLE_VIS)      dsputil_init_vis   (c, avctx);
4630
    if (ENABLE_ALPHA)    dsputil_init_alpha (c, avctx);
4631
    if (ENABLE_PPC)      dsputil_init_ppc   (c, avctx);
4632
    if (ENABLE_MMI)      dsputil_init_mmi   (c, avctx);
4633
    if (ENABLE_SH4)      dsputil_init_sh4   (c, avctx);
4634
    if (ENABLE_BFIN)     dsputil_init_bfin  (c, avctx);
4626
    if (HAVE_MMX)        dsputil_init_mmx   (c, avctx);
4627
    if (ARCH_ARM)        dsputil_init_arm   (c, avctx);
4628
    if (CONFIG_MLIB)     dsputil_init_mlib  (c, avctx);
4629
    if (HAVE_VIS)        dsputil_init_vis   (c, avctx);
4630
    if (ARCH_ALPHA)      dsputil_init_alpha (c, avctx);
4631
    if (ARCH_PPC)        dsputil_init_ppc   (c, avctx);
4632
    if (HAVE_MMI)        dsputil_init_mmi   (c, avctx);
4633
    if (ARCH_SH4)        dsputil_init_sh4   (c, avctx);
4634
    if (ARCH_BFIN)       dsputil_init_bfin  (c, avctx);
4635 4635

  
4636 4636
    for(i=0; i<64; i++){
4637 4637
        if(!c->put_2tap_qpel_pixels_tab[0][i])
libavcodec/dv.c
62 62

  
63 63
#define TEX_VLC_BITS 9
64 64

  
65
#if ENABLE_SMALL
65
#if CONFIG_SMALL
66 66
#define DV_VLC_MAP_RUN_SIZE 15
67 67
#define DV_VLC_MAP_LEV_SIZE 23
68 68
#else
......
326 326
        for (i = 0; i < NB_DV_VLC - 1; i++) {
327 327
           if (dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE)
328 328
               continue;
329
#if ENABLE_SMALL
329
#if CONFIG_SMALL
330 330
           if (dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE)
331 331
               continue;
332 332
#endif
......
340 340
               dv_vlc_len[i] + (!!dv_vlc_level[i]);
341 341
        }
342 342
        for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) {
343
#if ENABLE_SMALL
343
#if CONFIG_SMALL
344 344
           for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) {
345 345
              if (dv_vlc_map[i][j].size == 0) {
346 346
                  dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc |
......
692 692
    return 0;
693 693
}
694 694

  
695
#if ENABLE_SMALL
695
#if CONFIG_SMALL
696 696
/* Converts run and level (where level != 0) pair into vlc, returning bit size */
697 697
static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc)
698 698
{
libavcodec/h263.c
2355 2355
{
2356 2356
    int vo_ver_id;
2357 2357

  
2358
    if (!ENABLE_MPEG4_ENCODER)  return;
2358
    if (!CONFIG_MPEG4_ENCODER)  return;
2359 2359

  
2360 2360
    if(s->max_b_frames || s->quarter_sample){
2361 2361
        vo_ver_id= 5;
libavcodec/h263.h
25 25
#include "config.h"
26 26
#include "msmpeg4.h"
27 27

  
28
#define ENABLE_ANY_H263_DECODER (ENABLE_H263_DECODER    || \
29
                                 ENABLE_H263I_DECODER   || \
30
                                 ENABLE_FLV_DECODER     || \
31
                                 ENABLE_RV10_DECODER    || \
32
                                 ENABLE_RV20_DECODER    || \
33
                                 ENABLE_MPEG4_DECODER   || \
34
                                 ENABLE_MSMPEG4_DECODER || \
35
                                 ENABLE_WMV_DECODER)
36
#define ENABLE_ANY_H263_ENCODER (ENABLE_H263_ENCODER    || \
37
                                 ENABLE_H263P_ENCODER   || \
38
                                 ENABLE_FLV_ENCODER     || \
39
                                 ENABLE_RV10_ENCODER    || \
40
                                 ENABLE_RV20_ENCODER    || \
41
                                 ENABLE_MPEG4_ENCODER   || \
42
                                 ENABLE_MSMPEG4_ENCODER || \
43
                                 ENABLE_WMV_ENCODER)
44
#define ENABLE_ANY_H263 (ENABLE_ANY_H263_DECODER || ENABLE_ANY_H263_ENCODER)
28
#define CONFIG_ANY_H263_DECODER (CONFIG_H263_DECODER    || \
29
                                 CONFIG_H263I_DECODER   || \
30
                                 CONFIG_FLV_DECODER     || \
31
                                 CONFIG_RV10_DECODER    || \
32
                                 CONFIG_RV20_DECODER    || \
33
                                 CONFIG_MPEG4_DECODER   || \
34
                                 CONFIG_MSMPEG4_DECODER || \
35
                                 CONFIG_WMV_DECODER)
36
#define CONFIG_ANY_H263_ENCODER (CONFIG_H263_ENCODER    || \
37
                                 CONFIG_H263P_ENCODER   || \
38
                                 CONFIG_FLV_ENCODER     || \
39
                                 CONFIG_RV10_ENCODER    || \
40
                                 CONFIG_RV20_ENCODER    || \
41
                                 CONFIG_MPEG4_ENCODER   || \
42
                                 CONFIG_MSMPEG4_ENCODER || \
43
                                 CONFIG_WMV_ENCODER)
44
#define CONFIG_ANY_H263 (CONFIG_ANY_H263_DECODER || CONFIG_ANY_H263_ENCODER)
45 45

  
46 46
#endif /* AVCODEC_H263_H */
libavcodec/h263dec.c
111 111
        if (MPV_common_init(s) < 0)
112 112
            return -1;
113 113

  
114
    if (ENABLE_MSMPEG4_DECODER && s->h263_msmpeg4)
114
    if (CONFIG_MSMPEG4_DECODER && s->h263_msmpeg4)
115 115
        ff_msmpeg4_decode_init(s);
116 116
    else
117 117
        h263_decode_init_vlc(s);
......
355 355
    if(s->flags&CODEC_FLAG_TRUNCATED){
356 356
        int next;
357 357

  
358
        if(ENABLE_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
358
        if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
359 359
            next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
360
        }else if(ENABLE_H263_DECODER && s->codec_id==CODEC_ID_H263){
360
        }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
361 361
            next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
362 362
        }else{
363 363
            av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
......
390 390
    }
391 391

  
392 392
    /* let's go :-) */
393
    if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5) {
393
    if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5) {
394 394
        ret= ff_wmv2_decode_picture_header(s);
395
    } else if (ENABLE_MSMPEG4_DECODER && s->msmpeg4_version) {
395
    } else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) {
396 396
        ret = msmpeg4_decode_picture_header(s);
397 397
    } else if (s->h263_pred) {
398 398
        if(s->avctx->extradata_size && s->picture_number==0){
......
620 620

  
621 621
    //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type
622 622
    //which is not available before MPV_frame_start()
623
    if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5){
623
    if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5){
624 624
        ret = ff_wmv2_decode_secondary_picture_header(s);
625 625
        if(ret<0) return ret;
626 626
        if(ret==1) goto intrax8_decoded;
......
647 647
    }
648 648

  
649 649
    if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
650
        if(!ENABLE_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
650
        if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
651 651
            s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
652 652
        }
653 653

  
libavcodec/h264.c
1641 1641
        qpix_op[luma_xy](dest_y + delta, src_y + delta, h->mb_linesize);
1642 1642
    }
1643 1643

  
1644
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
1644
    if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
1645 1645

  
1646 1646
    if(MB_FIELD){
1647 1647
        // chroma offset when predicting from a field of opposite parity
......
2286 2286
            if(!MB_MBAFF){
2287 2287
                *(uint64_t*)(h->top_borders[0][s->mb_x]+ 0)= *(uint64_t*)(src_y +  15*linesize);
2288 2288
                *(uint64_t*)(h->top_borders[0][s->mb_x]+ 8)= *(uint64_t*)(src_y +8+15*linesize);
2289
                if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2289
                if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2290 2290
                    *(uint64_t*)(h->top_borders[0][s->mb_x]+16)= *(uint64_t*)(src_cb+7*uvlinesize);
2291 2291
                    *(uint64_t*)(h->top_borders[0][s->mb_x]+24)= *(uint64_t*)(src_cr+7*uvlinesize);
2292 2292
                }
......
2294 2294
        }else{
2295 2295
            if(!MB_MBAFF){
2296 2296
                h->left_border[0]= h->top_borders[0][s->mb_x][15];
2297
                if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2297
                if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2298 2298
                    h->left_border[34   ]= h->top_borders[0][s->mb_x][16+7  ];
2299 2299
                    h->left_border[34+18]= h->top_borders[0][s->mb_x][16+8+7];
2300 2300
                }
......
2317 2317
    *(uint64_t*)(h->top_borders[top_idx][s->mb_x]+0)= *(uint64_t*)(src_y +  16*linesize);
2318 2318
    *(uint64_t*)(h->top_borders[top_idx][s->mb_x]+8)= *(uint64_t*)(src_y +8+16*linesize);
2319 2319

  
2320
    if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2320
    if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2321 2321
        h->left_border[uvoffset+34   ]= h->top_borders[top_idx][s->mb_x][16+7];
2322 2322
        h->left_border[uvoffset+34+18]= h->top_borders[top_idx][s->mb_x][24+7];
2323 2323
        for(i=1; i<9 - skiplast; i++){
......
2387 2387
        }
2388 2388
    }
2389 2389

  
2390
    if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2390
    if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2391 2391
        if(deblock_left){
2392 2392
            for(i = !deblock_top; i<8; i++){
2393 2393
                XCHG(h->left_border[uvoffset+34   +i*step], src_cb[i*uvlinesize], temp8, xchg);
......
2415 2415
    int *block_offset = &h->block_offset[0];
2416 2416
    const int transform_bypass = !simple && (s->qscale == 0 && h->sps.transform_bypass);
2417 2417
    /* is_h264 should always be true if SVQ3 is disabled. */
2418
    const int is_h264 = !ENABLE_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264;
2418
    const int is_h264 = !CONFIG_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264;
2419 2419
    void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);
2420 2420
    void (*idct_dc_add)(uint8_t *dst, DCTELEM *block, int stride);
2421 2421

  
......
2471 2471
            if(h->deblocking_filter)
2472 2472
                xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1, simple);
2473 2473

  
2474
            if(simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2474
            if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
2475 2475
                h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cb, uvlinesize);
2476 2476
                h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cr, uvlinesize);
2477 2477
            }
......
2606 2606
            }
2607 2607
        }
2608 2608

  
2609
        if((simple || !ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)) && (h->cbp&0x30)){
2609
        if((simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)) && (h->cbp&0x30)){
2610 2610
            uint8_t *dest[2] = {dest_cb, dest_cr};
2611 2611
            if(transform_bypass){
2612 2612
                if(IS_INTRA(mb_type) && h->sps.profile_idc==244 && (h->chroma_pred_mode==VERT_PRED8x8 || h->chroma_pred_mode==HOR_PRED8x8)){
......
2676 2676
    MpegEncContext * const s = &h->s;
2677 2677
    const int mb_xy= h->mb_xy;
2678 2678
    const int mb_type= s->current_picture.mb_type[mb_xy];
2679
    int is_complex = ENABLE_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0;
2679
    int is_complex = CONFIG_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0;
2680 2680

  
2681
    if(ENABLE_H264_ENCODER && !s->decode)
2681
    if(CONFIG_H264_ENCODER && !s->decode)
2682 2682
        return;
2683 2683

  
2684 2684
    if (is_complex)
......
6589 6589
    s->mb_skip_run= -1;
6590 6590

  
6591 6591
    h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME || s->codec_id != CODEC_ID_H264 ||
6592
                    (ENABLE_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (ENABLE_H264_ENCODER && s->encoding);
6592
                    (CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)) || (CONFIG_H264_ENCODER && s->encoding);
6593 6593

  
6594 6594
    if( h->pps.cabac ) {
6595 6595
        int i;
......
7423 7423
               && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=FF_B_TYPE)
7424 7424
               && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
7425 7425
               && avctx->skip_frame < AVDISCARD_ALL){
7426
                if(ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){
7426
                if(CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){
7427 7427
                    static const uint8_t start_code[] = {0x00, 0x00, 0x01};
7428 7428
                    ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code));
7429 7429
                    ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed );
......
7624 7624
        s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264;
7625 7625
        s->current_picture_ptr->pict_type= s->pict_type;
7626 7626

  
7627
        if (ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
7627
        if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
7628 7628
            ff_vdpau_h264_set_reference_frames(s);
7629 7629

  
7630 7630
        if(!s->dropable) {
......
7635 7635
        h->prev_frame_num_offset= h->frame_num_offset;
7636 7636
        h->prev_frame_num= h->frame_num;
7637 7637

  
7638
        if (ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
7638
        if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
7639 7639
            ff_vdpau_h264_picture_complete(s);
7640 7640

  
7641 7641
        /*
libavcodec/h264.h
86 86
#define CHROMA 1
87 87
#endif
88 88

  
89
#ifndef ENABLE_H264_ENCODER
90
#define ENABLE_H264_ENCODER 0
89
#ifndef CONFIG_H264_ENCODER
90
#define CONFIG_H264_ENCODER 0
91 91
#endif
92 92

  
93 93
#define EXTENDED_SAR          255
libavcodec/mjpegdec.c
977 977
        skip_bits(&s->gb, 8);
978 978

  
979 979
    if(s->lossless){
980
        if(ENABLE_JPEGLS_DECODER && s->ls){
980
        if(CONFIG_JPEGLS_DECODER && s->ls){
981 981
//            for(){
982 982
//            reset_ls_coding_parameters(s, 0);
983 983

  
......
1418 1418
                        return -1;
1419 1419
                    break;
1420 1420
                case LSE:
1421
                    if (!ENABLE_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0)
1421
                    if (!CONFIG_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0)
1422 1422
                        return -1;
1423 1423
                    break;
1424 1424
                case EOI:
libavcodec/mpegvideo.c
1448 1448
            ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
1449 1449
                             src_x, src_y<<field_based, h_edge_pos, v_edge_pos);
1450 1450
            ptr_y = s->edge_emu_buffer;
1451
            if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1451
            if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1452 1452
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
1453 1453
                ff_emulated_edge_mc(uvbuf  , ptr_cb, s->uvlinesize, 9, 9+field_based,
1454 1454
                                 uvsrc_x, uvsrc_y<<field_based, h_edge_pos>>1, v_edge_pos>>1);
......
1475 1475
    sy <<= 2 - lowres;
1476 1476
    pix_op[lowres-1](dest_y, ptr_y, linesize, h, sx, sy);
1477 1477

  
1478
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1478
    if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1479 1479
        uvsx <<= 2 - lowres;
1480 1480
        uvsy <<= 2 - lowres;
1481 1481
        pix_op[lowres](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
......
1581 1581
                my += s->mv[dir][i][1];
1582 1582
            }
1583 1583

  
1584
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
1584
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
1585 1585
            chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, pix_op, mx, my);
1586 1586
        break;
1587 1587
    case MV_TYPE_FIELD:
......
1870 1870
                add_dequant_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize, s->qscale);
1871 1871
                add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
1872 1872

  
1873
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1873
                if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1874 1874
                    if (s->chroma_y_shift){
1875 1875
                        add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
1876 1876
                        add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......
1889 1889
                add_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize);
1890 1890
                add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
1891 1891

  
1892
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1892
                if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1893 1893
                    if(s->chroma_y_shift){//Chroma420
1894 1894
                        add_dct(s, block[4], 4, dest_cb, uvlinesize);
1895 1895
                        add_dct(s, block[5], 5, dest_cr, uvlinesize);
......
1911 1911
                    }
1912 1912
                }//fi gray
1913 1913
            }
1914
            else if (ENABLE_WMV2) {
1914
            else if (CONFIG_WMV2) {
1915 1915
                ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
1916 1916
            }
1917 1917
        } else {
......
1922 1922
                put_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize, s->qscale);
1923 1923
                put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
1924 1924

  
1925
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1925
                if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1926 1926
                    if(s->chroma_y_shift){
1927 1927
                        put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
1928 1928
                        put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
......
1941 1941
                s->dsp.idct_put(dest_y + dct_offset             , dct_linesize, block[2]);
1942 1942
                s->dsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
1943 1943

  
1944
                if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1944
                if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
1945 1945
                    if(s->chroma_y_shift){
1946 1946
                        s->dsp.idct_put(dest_cb, uvlinesize, block[4]);
1947 1947
                        s->dsp.idct_put(dest_cr, uvlinesize, block[5]);
libavcodec/mpegvideo_common.h
103 103
        }
104 104
    }
105 105

  
106
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
106
    if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
107 107

  
108 108
    motion_x= s->sprite_offset[1][0];
109 109
    motion_y= s->sprite_offset[1][1];
......
172 172
           a+1, (1<<(2*a+1)) - s->no_rounding,
173 173
           s->h_edge_pos, s->v_edge_pos);
174 174

  
175
    if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return;
175
    if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
176 176

  
177 177
    ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8;
178 178
    oy= s->sprite_offset[1][1] + s->sprite_delta[1][0]*s->mb_x*8 + s->sprite_delta[1][1]*s->mb_y*8;
......
321 321
                                src_x, src_y<<field_based,
322 322
                                s->h_edge_pos, s->v_edge_pos);
323 323
            ptr_y = s->edge_emu_buffer;
324
            if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
324
            if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
325 325
                uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
326 326
                ff_emulated_edge_mc(uvbuf ,
327 327
                                    ptr_cb, s->uvlinesize,
......
352 352

  
353 353
    pix_op[0][dxy](dest_y, ptr_y, linesize, h);
354 354

  
355
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
355
    if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
356 356
        pix_op[s->chroma_x_shift][uvdxy]
357 357
                (dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
358 358
        pix_op[s->chroma_x_shift][uvdxy]
359 359
                (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
360 360
    }
361
    if(!is_mpeg12 && (ENABLE_H261_ENCODER || ENABLE_H261_DECODER) &&
361
    if(!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
362 362
         s->out_format == FMT_H261){
363 363
        ff_h261_loop_filter(s);
364 364
    }
......
517 517
                            17, 17+field_based, src_x, src_y<<field_based,
518 518
                            s->h_edge_pos, s->v_edge_pos);
519 519
        ptr_y= s->edge_emu_buffer;
520
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
520
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
521 521
            uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
522 522
            ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
523 523
                                9, 9 + field_based,
......
551 551
        qpix_op[1][dxy](dest_y  , ptr_y  , linesize);
552 552
        qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
553 553
    }
554
    if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
554
    if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
555 555
        pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
556 556
        pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
557 557
    }
......
705 705
            mx += mv[0][0];
706 706
            my += mv[0][1];
707 707
        }
708
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
708
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
709 709
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
710 710

  
711 711
        return;
......
726 726
                        0, 0, 0,
727 727
                        ref_picture, pix_op, qpix_op,
728 728
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
729
        }else if(!is_mpeg12 && ENABLE_WMV2 && s->mspel){
729
        }else if(!is_mpeg12 && CONFIG_WMV2 && s->mspel){
730 730
            ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
731 731
                        ref_picture, pix_op,
732 732
                        s->mv[dir][0][0], s->mv[dir][0][1], 16);
......
791 791
            }
792 792
        }
793 793

  
794
        if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY))
794
        if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
795 795
            chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
796 796
    }
797 797
        break;
libavcodec/mpegvideo_enc.c
518 518
        s->mjpeg_hsample[0] = 2;
519 519
        s->mjpeg_hsample[1] = 2>>chroma_h_shift;
520 520
        s->mjpeg_hsample[2] = 2>>chroma_h_shift;
521
        if (!(ENABLE_MJPEG_ENCODER || ENABLE_LJPEG_ENCODER)
521
        if (!(CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER)
522 522
            || ff_mjpeg_encode_init(s) < 0)
523 523
            return -1;
524 524
        avctx->delay=0;
525 525
        s->low_delay=1;
526 526
        break;
527 527
    case CODEC_ID_H261:
528
        if (!ENABLE_H261_ENCODER)  return -1;
528
        if (!CONFIG_H261_ENCODER)  return -1;
529 529
        if (ff_h261_get_picture_format(s->width, s->height) < 0) {
530 530
            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);
531 531
            return -1;
......
535 535
        s->low_delay=1;
536 536
        break;
537 537
    case CODEC_ID_H263:
538
        if (!ENABLE_H263_ENCODER)  return -1;
538
        if (!CONFIG_H263_ENCODER)  return -1;
539 539
        if (h263_get_picture_format(s->width, s->height) == 7) {
540 540
            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);
541 541
            return -1;
......
661 661
    if(avctx->trellis)
662 662
        s->dct_quantize = dct_quantize_trellis_c;
663 663

  
664
    if((ENABLE_H263P_ENCODER || ENABLE_RV20_ENCODER) && s->modified_quant)
664
    if((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant)
665 665
        s->chroma_qscale_table= ff_h263_chroma_qscale_table;
666 666
    s->progressive_frame=
667 667
    s->progressive_sequence= !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN));
......
670 670
    ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp);
671 671
    ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp);
672 672

  
673
    if (ENABLE_H261_ENCODER && s->out_format == FMT_H261)
673
    if (CONFIG_H261_ENCODER && s->out_format == FMT_H261)
674 674
        ff_h261_encode_init(s);
675
    if (ENABLE_ANY_H263_ENCODER && s->out_format == FMT_H263)
675
    if (CONFIG_ANY_H263_ENCODER && s->out_format == FMT_H263)
676 676
        h263_encode_init(s);
677
    if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version)
677
    if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
678 678
        ff_msmpeg4_encode_init(s);
679
    if ((ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
679
    if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
680 680
        && s->out_format == FMT_MPEG1)
681 681
        ff_mpeg1_encode_init(s);
682 682

  
683 683
    /* init q matrix */
684 684
    for(i=0;i<64;i++) {
685 685
        int j= s->dsp.idct_permutation[i];
686
        if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){
686
        if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){
687 687
            s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];
688 688
            s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];
689 689
        }else if(s->out_format == FMT_H263 || s->out_format == FMT_H261){
......
722 722
    ff_rate_control_uninit(s);
723 723

  
724 724
    MPV_common_end(s);
725
    if ((ENABLE_MJPEG_ENCODER || ENABLE_LJPEG_ENCODER) && s->out_format == FMT_MJPEG)
725
    if ((CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) && s->out_format == FMT_MJPEG)
726 726
        ff_mjpeg_encode_close(s);
727 727

  
728 728
    av_freep(&avctx->extradata);
......
1226 1226

  
1227 1227
        MPV_frame_end(s);
1228 1228

  
1229
        if (ENABLE_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
1229
        if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
1230 1230
            ff_mjpeg_encode_picture_trailer(s);
1231 1231

  
1232 1232
        if(avctx->rc_buffer_size){
......
1687 1687
    switch(s->codec_id){ //FIXME funct ptr could be slightly faster
1688 1688
    case CODEC_ID_MPEG1VIDEO:
1689 1689
    case CODEC_ID_MPEG2VIDEO:
1690
        if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
1690
        if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
1691 1691
            mpeg1_encode_mb(s, s->block, motion_x, motion_y);
1692 1692
        break;
1693 1693
    case CODEC_ID_MPEG4:
1694
        if (ENABLE_MPEG4_ENCODER)
1694
        if (CONFIG_MPEG4_ENCODER)
1695 1695
            mpeg4_encode_mb(s, s->block, motion_x, motion_y);
1696 1696
        break;
1697 1697
    case CODEC_ID_MSMPEG4V2:
1698 1698
    case CODEC_ID_MSMPEG4V3:
1699 1699
    case CODEC_ID_WMV1:
1700
        if (ENABLE_MSMPEG4_ENCODER)
1700
        if (CONFIG_MSMPEG4_ENCODER)
1701 1701
            msmpeg4_encode_mb(s, s->block, motion_x, motion_y);
1702 1702
        break;
1703 1703
    case CODEC_ID_WMV2:
1704
        if (ENABLE_WMV2_ENCODER)
1704
        if (CONFIG_WMV2_ENCODER)
1705 1705
            ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
1706 1706
        break;
1707 1707
    case CODEC_ID_H261:
1708
        if (ENABLE_H261_ENCODER)
1708
        if (CONFIG_H261_ENCODER)
1709 1709
            ff_h261_encode_mb(s, s->block, motion_x, motion_y);
1710 1710
        break;
1711 1711
    case CODEC_ID_H263:
......
1713 1713
    case CODEC_ID_FLV1:
1714 1714
    case CODEC_ID_RV10:
1715 1715
    case CODEC_ID_RV20:
1716
        if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER ||
1717
            ENABLE_FLV_ENCODER  || ENABLE_RV10_ENCODER  || ENABLE_RV20_ENCODER)
1716
        if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER ||
1717
            CONFIG_FLV_ENCODER  || CONFIG_RV10_ENCODER  || CONFIG_RV20_ENCODER)
1718 1718
            h263_encode_mb(s, s->block, motion_x, motion_y);
1719 1719
        break;
1720 1720
    case CODEC_ID_MJPEG:
1721
        if (ENABLE_MJPEG_ENCODER)
1721
        if (CONFIG_MJPEG_ENCODER)
1722 1722
            ff_mjpeg_encode_mb(s, s->block);
1723 1723
        break;
1724 1724
    default:
......
1965 1965
}
1966 1966

  
1967 1967
static void write_slice_end(MpegEncContext *s){
1968
    if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){
1968
    if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){
1969 1969
        if(s->partitioned_frame){
1970 1970
            ff_mpeg4_merge_partitions(s);
1971 1971
        }
1972 1972

  
1973 1973
        ff_mpeg4_stuffing(&s->pb);
1974
    }else if(ENABLE_MJPEG_ENCODER && s->out_format == FMT_MJPEG){
1974
    }else if(CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG){
1975 1975
        ff_mjpeg_encode_stuffing(&s->pb);
1976 1976
    }
1977 1977

  
......
2028 2028
    case CODEC_ID_H263:
2029 2029
    case CODEC_ID_H263P:
2030 2030
    case CODEC_ID_FLV1:
2031
        if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER || ENABLE_FLV_ENCODER)
2031
        if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER || CONFIG_FLV_ENCODER)
2032 2032
            s->gob_index = ff_h263_get_gob_height(s);
2033 2033
        break;
2034 2034
    case CODEC_ID_MPEG4:
2035
        if(ENABLE_MPEG4_ENCODER && s->partitioned_frame)
2035
        if(CONFIG_MPEG4_ENCODER && s->partitioned_frame)
2036 2036
            ff_mpeg4_init_partitions(s);
2037 2037
        break;
2038 2038
    }
......
2072 2072
            s->mb_y = mb_y;  // moved into loop, can get changed by H.261
2073 2073
            ff_update_block_index(s);
2074 2074

  
2075
            if(ENABLE_H261_ENCODER && s->codec_id == CODEC_ID_H261){
2075
            if(CONFIG_H261_ENCODER && s->codec_id == CODEC_ID_H261){
2076 2076
                ff_h261_reorder_mb_index(s);
2077 2077
                xy= s->mb_y*s->mb_stride + s->mb_x;
2078 2078
                mb_type= s->mb_type[xy];
......
2105 2105
                    if(s->start_mb_y != mb_y || mb_x!=0){
2106 2106
                        write_slice_end(s);
2107 2107

  
2108
                        if(ENABLE_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){
2108
                        if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){
2109 2109
                            ff_mpeg4_init_partitions(s);
2110 2110
                        }
2111 2111
                    }
......
2132 2132

  
2133 2133
                    switch(s->codec_id){
2134 2134
                    case CODEC_ID_MPEG4:
2135
                        if (ENABLE_MPEG4_ENCODER) {
2135
                        if (CONFIG_MPEG4_ENCODER) {
2136 2136
                            ff_mpeg4_encode_video_packet_header(s);
2137 2137
                            ff_mpeg4_clean_buffers(s);
2138 2138
                        }
2139 2139
                    break;
2140 2140
                    case CODEC_ID_MPEG1VIDEO:
2141 2141
                    case CODEC_ID_MPEG2VIDEO:
2142
                        if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER) {
2142
                        if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) {
2143 2143
                            ff_mpeg1_encode_slice_header(s);
2144 2144
                            ff_mpeg1_clean_buffers(s);
2145 2145
                        }
2146 2146
                    break;
2147 2147
                    case CODEC_ID_H263:
2148 2148
                    case CODEC_ID_H263P:
2149
                        if (ENABLE_H263_ENCODER || ENABLE_H263P_ENCODER)
2149
                        if (CONFIG_H263_ENCODER || CONFIG_H263P_ENCODER)
2150 2150
                            h263_encode_gob_header(s, mb_y);
2151 2151
                    break;
2152 2152
                    }
......
2355 2355
                        }
2356 2356
                    }
2357 2357
                }
2358
                if(ENABLE_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT){
2358
                if(CONFIG_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT){
2359 2359
                    int mx= s->b_direct_mv_table[xy][0];
2360 2360
                    int my= s->b_direct_mv_table[xy][1];
2361 2361

  
......
2366 2366
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
2367 2367
                                 &dmin, &next_block, mx, my);
2368 2368
                }
2369
                if(ENABLE_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT0){
2369
                if(CONFIG_MPEG4_ENCODER && mb_type&CANDIDATE_MB_TYPE_DIRECT0){
2370 2370
                    backup_s.dquant = 0;
2371 2371
                    s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
2372 2372
                    s->mb_intra= 0;
......
2381 2381
                    if(coded){
2382 2382
                        int mx,my;
2383 2383
                        memcpy(s->mv, best_s.mv, sizeof(s->mv));
2384
                        if(ENABLE_MPEG4_ENCODER && best_s.mv_dir & MV_DIRECT){
2384
                        if(CONFIG_MPEG4_ENCODER && best_s.mv_dir & MV_DIRECT){
2385 2385
                            mx=my=0; //FIXME find the one we actually used
2386 2386
                            ff_mpeg4_set_direct_mv(s, mx, my);
2387 2387
                        }else if(best_s.mv_dir&MV_DIR_BACKWARD){
......
2429 2429
                }
2430 2430
                s->last_bits= put_bits_count(&s->pb);
2431 2431

  
2432
                if (ENABLE_ANY_H263_ENCODER &&
2432
                if (CONFIG_ANY_H263_ENCODER &&
2433 2433
                    s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
2434 2434
                    ff_h263_update_motion_val(s);
2435 2435

  
......
2479 2479
                    }
2480 2480
                    break;
2481 2481
                case CANDIDATE_MB_TYPE_DIRECT:
2482
                    if (ENABLE_MPEG4_ENCODER) {
2482
                    if (CONFIG_MPEG4_ENCODER) {
2483 2483
                        s->mv_dir = MV_DIR_FORWARD|MV_DIR_BACKWARD|MV_DIRECT;
2484 2484
                        s->mb_intra= 0;
2485 2485
                        motion_x=s->b_direct_mv_table[xy][0];
......
2488 2488
                    }
2489 2489
                    break;
2490 2490
                case CANDIDATE_MB_TYPE_DIRECT0:
2491
                    if (ENABLE_MPEG4_ENCODER) {
2491
                    if (CONFIG_MPEG4_ENCODER) {
2492 2492
                        s->mv_dir = MV_DIR_FORWARD|MV_DIR_BACKWARD|MV_DIRECT;
2493 2493
                        s->mb_intra= 0;
2494 2494
                        ff_mpeg4_set_direct_mv(s, 0, 0);
......
2556 2556
                // RAL: Update last macroblock type
2557 2557
                s->last_mv_dir = s->mv_dir;
2558 2558

  
2559
                if (ENABLE_ANY_H263_ENCODER &&
2559
                if (CONFIG_ANY_H263_ENCODER &&
2560 2560
                    s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
2561 2561
                    ff_h263_update_motion_val(s);
2562 2562

  
......
2587 2587
                    s->dest[2], w>>1, h>>s->chroma_y_shift, s->uvlinesize);
2588 2588
            }
2589 2589
            if(s->loop_filter){
2590
                if(ENABLE_ANY_H263_ENCODER && s->out_format == FMT_H263)
2590
                if(CONFIG_ANY_H263_ENCODER && s->out_format == FMT_H263)
2591 2591
                    ff_h263_loop_filter(s);
2592 2592
            }
2593 2593
//printf("MB %d %d bits\n", s->mb_x+s->mb_y*s->mb_stride, put_bits_count(&s->pb));
......
2595 2595
    }
2596 2596

  
2597 2597
    //not beautiful here but we must write it before flushing so it has to be here
2598
    if (ENABLE_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == FF_I_TYPE)
2598
    if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == FF_I_TYPE)
2599 2599
        msmpeg4_encode_ext_header(s);
2600 2600

  
2601 2601
    write_slice_end(s);
......
2666 2666
    if(s->adaptive_quant){
2667 2667
        switch(s->codec_id){
2668 2668
        case CODEC_ID_MPEG4:
2669
            if (ENABLE_MPEG4_ENCODER)
2669
            if (CONFIG_MPEG4_ENCODER)
2670 2670
                ff_clean_mpeg4_qscales(s);
2671 2671
            break;
2672 2672
        case CODEC_ID_H263:
2673 2673
        case CODEC_ID_H263P:
2674 2674
        case CODEC_ID_FLV1:
2675
            if (ENABLE_H263_ENCODER||ENABLE_H263P_ENCODER||ENABLE_FLV_ENCODER)
2675
            if (CONFIG_H263_ENCODER||CONFIG_H263P_ENCODER||CONFIG_FLV_ENCODER)
2676 2676
                ff_clean_h263_qscales(s);
2677 2677
            break;
2678 2678
        }
......
2716 2716
    // RAL: Condition added for MPEG1VIDEO
2717 2717
    if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4))
2718 2718
        set_frame_distances(s);
2719
    if(ENABLE_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)
2719
    if(CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)
2720 2720
        ff_set_mpeg4_time(s);
2721 2721

  
2722 2722
    s->me.scene_change_score=0;
......
2871 2871
    s->last_bits= put_bits_count(&s->pb);
2872 2872
    switch(s->out_format) {
2873 2873
    case FMT_MJPEG:
2874
        if (ENABLE_MJPEG_ENCODER)
2874
        if (CONFIG_MJPEG_ENCODER)
2875 2875
            ff_mjpeg_encode_picture_header(s);
2876 2876
        break;
2877 2877
    case FMT_H261:
2878
        if (ENABLE_H261_ENCODER)
2878
        if (CONFIG_H261_ENCODER)
2879 2879
            ff_h261_encode_picture_header(s, picture_number);
2880 2880
        break;
2881 2881
    case FMT_H263:
2882
        if (ENABLE_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
2882
        if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
2883 2883
            ff_wmv2_encode_picture_header(s, picture_number);
2884
        else if (ENABLE_MSMPEG4_ENCODER && s->h263_msmpeg4)
2884
        else if (CONFIG_MSMPEG4_ENCODER && s->h263_msmpeg4)
2885 2885
            msmpeg4_encode_picture_header(s, picture_number);
2886
        else if (ENABLE_MPEG4_ENCODER && s->h263_pred)
2886
        else if (CONFIG_MPEG4_ENCODER && s->h263_pred)
2887 2887
            mpeg4_encode_picture_header(s, picture_number);
2888
        else if (ENABLE_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
2888
        else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
2889 2889
            rv10_encode_picture_header(s, picture_number);
2890
        else if (ENABLE_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
2890
        else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
2891 2891
            rv20_encode_picture_header(s, picture_number);
2892
        else if (ENABLE_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)
2892
        else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)
2893 2893
            ff_flv_encode_picture_header(s, picture_number);
2894
        else if (ENABLE_ANY_H263_ENCODER)
2894
        else if (CONFIG_ANY_H263_ENCODER)
2895 2895
            h263_encode_picture_header(s, picture_number);
2896 2896
        break;
2897 2897
    case FMT_MPEG1:
2898
        if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
2898
        if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
2899 2899
            mpeg1_encode_picture_header(s, picture_number);
2900 2900
        break;
2901 2901
    case FMT_H264:
libavcodec/msmpeg4.c
1142 1142
        s->decode_mb= msmpeg4v34_decode_mb;
1143 1143
        break;
1144 1144
    case 5:
1145
        if (ENABLE_WMV2_DECODER)
1145
        if (CONFIG_WMV2_DECODER)
1146 1146
            s->decode_mb= ff_wmv2_decode_mb;
1147 1147
    case 6:
1148 1148
        //FIXME + TODO VC1 decode mb
libavcodec/msmpeg4.h
49 49
                            int n, int coded, const uint8_t *scan_table);
50 50
int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
51 51

  
52
#define ENABLE_MSMPEG4_DECODER (ENABLE_MSMPEG4V1_DECODER || \
53
                                ENABLE_MSMPEG4V2_DECODER || \
54
                                ENABLE_MSMPEG4V3_DECODER || \
55
                                ENABLE_WMV2_DECODER      || \
56
                                ENABLE_VC1_DECODER       || \
57
                                ENABLE_WMV3_DECODER)
58
#define ENABLE_MSMPEG4_ENCODER (ENABLE_MSMPEG4V1_ENCODER || \
59
                                ENABLE_MSMPEG4V2_ENCODER || \
60
                                ENABLE_MSMPEG4V3_ENCODER || \
61
                                ENABLE_WMV2_ENCODER)
62
#define ENABLE_MSMPEG4 (ENABLE_MSMPEG4_DECODER || ENABLE_MSMPEG4_ENCODER)
63
#define ENABLE_WMV2 (ENABLE_WMV2_DECODER || ENABLE_WMV2_ENCODER)
64
#define ENABLE_WMV_DECODER (ENABLE_WMV1_DECODER || ENABLE_WMV2_DECODER)
65
#define ENABLE_WMV_ENCODER (ENABLE_WMV1_ENCODER || ENABLE_WMV2_ENCODER)
52
#define CONFIG_MSMPEG4_DECODER (CONFIG_MSMPEG4V1_DECODER || \
53
                                CONFIG_MSMPEG4V2_DECODER || \
54
                                CONFIG_MSMPEG4V3_DECODER || \
55
                                CONFIG_WMV2_DECODER      || \
56
                                CONFIG_VC1_DECODER       || \
57
                                CONFIG_WMV3_DECODER)
58
#define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V1_ENCODER || \
59
                                CONFIG_MSMPEG4V2_ENCODER || \
60
                                CONFIG_MSMPEG4V3_ENCODER || \
61
                                CONFIG_WMV2_ENCODER)
62
#define CONFIG_MSMPEG4 (CONFIG_MSMPEG4_DECODER || CONFIG_MSMPEG4_ENCODER)
63
#define CONFIG_WMV2 (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER)
64
#define CONFIG_WMV_DECODER (CONFIG_WMV1_DECODER || CONFIG_WMV2_DECODER)
65
#define CONFIG_WMV_ENCODER (CONFIG_WMV1_ENCODER || CONFIG_WMV2_ENCODER)
66 66

  
67 67
#endif /* AVCODEC_MSMPEG4_H */
libavcodec/ppc/dsputil_altivec.c
1450 1450

  
1451 1451
    c->hadamard8_diff[0] = hadamard8_diff16_altivec;
1452 1452
    c->hadamard8_diff[1] = hadamard8_diff8x8_altivec;
1453
    if (ENABLE_VORBIS_DECODER)
1453
    if (CONFIG_VORBIS_DECODER)
1454 1454
        c->vorbis_inverse_coupling = vorbis_inverse_coupling_altivec;
1455 1455
}
libavcodec/ppc/dsputil_ppc.c
262 262
    }
263 263

  
264 264
#if HAVE_ALTIVEC
265
    if(ENABLE_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
265
    if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
266 266

  
267 267
    if (has_altivec()) {
268 268
        mm_flags |= FF_MM_ALTIVEC;
269 269

  
270 270
        dsputil_init_altivec(c, avctx);
271
        if(ENABLE_SNOW_DECODER) snow_init_altivec(c, avctx);
272
        if(ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER)
271
        if(CONFIG_SNOW_DECODER) snow_init_altivec(c, avctx);
272
        if(CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER)
273 273
            vc1dsp_init_altivec(c, avctx);
274 274
        float_init_altivec(c, avctx);
275 275
        int_init_altivec(c, avctx);
libavcodec/utils.c
568 568
        return -1;
569 569
    }
570 570

  
571
    if (ENABLE_THREADS && avctx->thread_opaque)
571
    if (HAVE_THREADS && avctx->thread_opaque)
572 572
        avcodec_thread_free(avctx);
573 573
    if (avctx->codec->close)
574 574
        avctx->codec->close(avctx);
libavcodec/x86/dsputil_mmx.c
620 620
        "paddb %%mm1, %%mm6             \n\t"
621 621

  
622 622
static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){
623
    if(ENABLE_ANY_H263) {
623
    if(CONFIG_ANY_H263) {
624 624
    const int strength= ff_h263_loop_filter_strength[qscale];
625 625

  
626 626
    __asm__ volatile(
......
670 670
}
671 671

  
672 672
static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
673
    if(ENABLE_ANY_H263) {
673
    if(CONFIG_ANY_H263) {
674 674
    const int strength= ff_h263_loop_filter_strength[qscale];
675 675
    DECLARE_ALIGNED(8, uint64_t, temp[4]);
676 676
    uint8_t *btemp= (uint8_t*)temp;
......
2568 2568
                }
2569 2569
                c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
2570 2570
#endif
2571
            }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER) &&
2571
            }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER) &&
2572 2572
                     idct_algo==FF_IDCT_VP3){
2573 2573
                if(mm_flags & FF_MM_SSE2){
2574 2574
                    c->idct_put= ff_vp3_idct_put_sse2;
......
2631 2631

  
2632 2632
        c->draw_edges = draw_edges_mmx;
2633 2633

  
2634
        if (ENABLE_ANY_H263) {
2634
        if (CONFIG_ANY_H263) {
2635 2635
            c->h263_v_loop_filter= h263_v_loop_filter_mmx;
2636 2636
            c->h263_h_loop_filter= h263_h_loop_filter_mmx;
2637 2637
        }
......
2684 2684
                c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2;
2685 2685
                c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2;
2686 2686

  
2687
                if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
2687
                if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
2688 2688
                    c->vp3_v_loop_filter= ff_vp3_v_loop_filter_mmx2;
2689 2689
                    c->vp3_h_loop_filter= ff_vp3_h_loop_filter_mmx2;
2690 2690
                }
......
2760 2760
            c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2;
2761 2761
            c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2;
2762 2762

  
2763
            if (ENABLE_CAVS_DECODER)
2763
            if (CONFIG_CAVS_DECODER)
2764 2764
                ff_cavsdsp_init_mmx2(c, avctx);
2765 2765

  
2766
            if (ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER)
2766
            if (CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER)
2767 2767
                ff_vc1dsp_init_mmx(c, avctx);
2768 2768

  
2769 2769
            c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2;
......
2818 2818
            c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_3dnow;
2819 2819
            c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_3dnow;
2820 2820

  
2821
            if (ENABLE_CAVS_DECODER)
2821
            if (CONFIG_CAVS_DECODER)
2822 2822
                ff_cavsdsp_init_3dnow(c, avctx);
2823 2823
        }
2824 2824

  
......
2953 2953
        }
2954 2954
    }
2955 2955

  
2956
    if (ENABLE_ENCODERS)
2956
    if (CONFIG_ENCODERS)
2957 2957
        dsputilenc_init_mmx(c, avctx);
2958 2958

  
2959 2959
#if 0
libavcodec/x86/dsputilenc_mmx.c
1413 1413
            c->sum_abs_dctelem= sum_abs_dctelem_sse2;
1414 1414
            c->hadamard8_diff[0]= hadamard8_diff16_sse2;
1415 1415
            c->hadamard8_diff[1]= hadamard8_diff_sse2;
1416
            if (ENABLE_FLAC_ENCODER)
1416
            if (CONFIG_FLAC_ENCODER)
1417 1417
                c->flac_compute_autocorr = ff_flac_compute_autocorr_sse2;
1418 1418
        }
1419 1419

  
libavdevice/alldevices.c
29 29

  
30 30
#define REGISTER_MUXER(X,x) { \
31 31
          extern AVOutputFormat x##_muxer; \
32
          if(ENABLE_##X##_MUXER)   av_register_output_format(&x##_muxer); }
32
          if(CONFIG_##X##_MUXER)   av_register_output_format(&x##_muxer); }
33 33
#define REGISTER_DEMUXER(X,x) { \
34 34
          extern AVInputFormat x##_demuxer; \
35
          if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
35
          if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
36 36
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
37 37

  
38 38
void avdevice_register_all(void)
libavdevice/libdc1394.c
23 23
#include "config.h"
24 24
#include "libavformat/avformat.h"
25 25

  
26
#if ENABLE_LIBDC1394_2
26
#if HAVE_LIBDC1394_2
27 27
#include <dc1394/dc1394.h>
28
#elif ENABLE_LIBDC1394_1
28
#elif HAVE_LIBDC1394_1
29 29
#include <libraw1394/raw1394.h>
30 30
#include <libdc1394/dc1394_control.h>
31 31

  
......
45 45
#undef free
46 46

  
47 47
typedef struct dc1394_data {
48
#if ENABLE_LIBDC1394_1
48
#if HAVE_LIBDC1394_1
49 49
    raw1394handle_t handle;
50 50
    dc1394_cameracapture camera;
51
#elif ENABLE_LIBDC1394_2
51
#elif HAVE_LIBDC1394_2
52 52
    dc1394_t *d;
53 53
    dc1394camera_t *camera;
54 54
    dc1394video_frame_t *frame;
......
142 142
    return -1;
143 143
}
144 144

  
145
#if ENABLE_LIBDC1394_1
145
#if HAVE_LIBDC1394_1
146 146
static int dc1394_v1_read_header(AVFormatContext *c, AVFormatParameters * ap)
147 147
{
148 148
    dc1394_data* dc1394 = c->priv_data;
......
236 236
    return 0;
237 237
}
238 238

  
239
#elif ENABLE_LIBDC1394_2
239
#elif HAVE_LIBDC1394_2
240 240
static int dc1394_v2_read_header(AVFormatContext *c, AVFormatParameters * ap)
241 241
{
242 242
    dc1394_data* dc1394 = c->priv_data;
......
359 359
};
360 360

  
361 361
#endif
362
#if ENABLE_LIBDC1394_1
362
#if HAVE_LIBDC1394_1
363 363
AVInputFormat libdc1394_demuxer = {
364 364
    .name           = "libdc1394",
365 365
    .long_name      = NULL_IF_CONFIG_SMALL("dc1394 v.1 A/V grab"),
libavfilter/allfilters.c
24 24

  
25 25
#define REGISTER_FILTER(X,x,y) { \
26 26
          extern AVFilter avfilter_##y##_##x ; \
27
          if(ENABLE_##X##_FILTER )  avfilter_register(&avfilter_##y##_##x ); }
27
          if(CONFIG_##X##_FILTER )  avfilter_register(&avfilter_##y##_##x ); }
28 28

  
29 29
void avfilter_register_all(void)
30 30
{
libavformat/allformats.c
24 24

  
25 25
#define REGISTER_MUXER(X,x) { \
26 26
    extern AVOutputFormat x##_muxer; \
27
    if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
27
    if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
28 28

  
29 29
#define REGISTER_DEMUXER(X,x) { \
30 30
    extern AVInputFormat x##_demuxer; \
31
    if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
31
    if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
32 32

  
33 33
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
34 34

  
35 35
#define REGISTER_PROTOCOL(X,x) { \
36 36
    extern URLProtocol x##_protocol; \
37
    if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
37
    if(CONFIG_##X##_PROTOCOL) register_protocol(&x##_protocol); }
38 38

  
39 39
/* If you do not call this function, then you can select exactly which
40 40
   formats you want to support */
libavformat/avidec.c
350 350
                av_freep(&s->streams[0]->codec->extradata);
351 351
                av_freep(&s->streams[0]);
352 352
                s->nb_streams = 0;
353
                if (ENABLE_DV_DEMUXER) {
353
                if (CONFIG_DV_DEMUXER) {
354 354
                    avi->dv_demux = dv_init_demux(s);
355 355
                    if (!avi->dv_demux)
356 356
                        goto fail;
......
636 636
    int64_t i, sync;
637 637
    void* dstr;
638 638

  
639
    if (ENABLE_DV_DEMUXER && avi->dv_demux) {
639
    if (CONFIG_DV_DEMUXER && avi->dv_demux) {
640 640
        size = dv_get_packet(avi->dv_demux, pkt);
641 641
        if (size >= 0)
642 642
            return size;
......
721 721
                memcpy(pkt->data + pkt->size - 4*256, ast->pal, 4*256);
722 722
        }
723 723

  
724
        if (ENABLE_DV_DEMUXER && avi->dv_demux) {
724
        if (CONFIG_DV_DEMUXER && avi->dv_demux) {
725 725
            dstr = pkt->destruct;
726 726
            size = dv_produce_packet(avi->dv_demux, pkt,
727 727
                                    pkt->data, pkt->size);
......
1012 1012

  
1013 1013
//    av_log(NULL, AV_LOG_DEBUG, "XX %"PRId64" %d %"PRId64"\n", timestamp, index, st->index_entries[index].timestamp);
1014 1014

  
1015
    if (ENABLE_DV_DEMUXER && avi->dv_demux) {
1015
    if (CONFIG_DV_DEMUXER && avi->dv_demux) {
1016 1016
        /* One and only one real stream for DV in AVI, and it has video  */
1017 1017
        /* offsets. Calling with other stream indexes should have failed */
1018 1018
        /* the av_index_search_timestamp call above.                     */
libavformat/mpegenc.c
297 297
    int video_bitrate;
298 298

  
299 299
    s->packet_number = 0;
300
    s->is_vcd =    (ENABLE_MPEG1VCD_MUXER  && ctx->oformat == &mpeg1vcd_muxer);
301
    s->is_svcd =   (ENABLE_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer);
302
    s->is_mpeg2 = ((ENABLE_MPEG2VOB_MUXER  && ctx->oformat == &mpeg2vob_muxer) ||
303
                   (ENABLE_MPEG2DVD_MUXER  && ctx->oformat == &mpeg2dvd_muxer) ||
304
                   (ENABLE_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer));
305
    s->is_dvd =    (ENABLE_MPEG2DVD_MUXER  && ctx->oformat == &mpeg2dvd_muxer);
300
    s->is_vcd =    (CONFIG_MPEG1VCD_MUXER  && ctx->oformat == &mpeg1vcd_muxer);
301
    s->is_svcd =   (CONFIG_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer);
302
    s->is_mpeg2 = ((CONFIG_MPEG2VOB_MUXER  && ctx->oformat == &mpeg2vob_muxer) ||
303
                   (CONFIG_MPEG2DVD_MUXER  && ctx->oformat == &mpeg2dvd_muxer) ||
304
                   (CONFIG_MPEG2SVCD_MUXER && ctx->oformat == &mpeg2svcd_muxer));
305
    s->is_dvd =    (CONFIG_MPEG2DVD_MUXER  && ctx->oformat == &mpeg2dvd_muxer);
306 306

  
307 307
    if(ctx->packet_size)
308 308
        s->packet_size = ctx->packet_size;

Also available in: Unified diff