Просмотр исходного кода

replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_
and remove all ENABLE_ definitions.

Originally committed as revision 16600 to svn://svn.ffmpeg.org/ffmpeg/trunk

Aurelien Jacobs 16 лет назад
Родитель
Сommit
49fb20cb8a
10 измененных файлов с 53 добавлено и 55 удалено
  1. 0 2
      configure
  2. 1 1
      ffmpeg.c
  3. 4 4
      libavcodec/allcodecs.c
  4. 1 1
      libavcodec/arm/dsputil_arm.c
  5. 1 1
      libavcodec/bitstream.c
  6. 17 17
      libavcodec/dsputil.c
  7. 4 4
      libavcodec/dv.c
  8. 1 1
      libavcodec/h263.c
  9. 17 17
      libavcodec/h263.h
  10. 7 7
      libavcodec/h263dec.c

+ 0 - 2
configure

@@ -427,11 +427,9 @@ print_config(){
         ucname="`toupper $cfg`"
         if enabled $cfg; then
             echo "#define ${pfx}${ucname} 1" >> $header
-            echo "#define ENABLE_${ucname} 1" >> $header
             echo "${pfx}${ucname}=yes" >> $makefile
         else
             echo "#define ${pfx}${ucname} 0" >> $header
-            echo "#define ENABLE_${ucname} 0" >> $header
         fi
     done
 }

+ 1 - 1
ffmpeg.c

@@ -768,7 +768,7 @@ static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void
         picture2 = picture;
     }
 
-    if (ENABLE_VHOOK)
+    if (CONFIG_VHOOK)
         frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
                            1000000 * ist->pts / AV_TIME_BASE);
 

+ 4 - 4
libavcodec/allcodecs.c

@@ -28,18 +28,18 @@
 
 #define REGISTER_ENCODER(X,x) { \
           extern AVCodec x##_encoder; \
-          if(ENABLE_##X##_ENCODER)  register_avcodec(&x##_encoder); }
+          if(CONFIG_##X##_ENCODER)  register_avcodec(&x##_encoder); }
 #define REGISTER_DECODER(X,x) { \
           extern AVCodec x##_decoder; \
-          if(ENABLE_##X##_DECODER)  register_avcodec(&x##_decoder); }
+          if(CONFIG_##X##_DECODER)  register_avcodec(&x##_decoder); }
 #define REGISTER_ENCDEC(X,x)  REGISTER_ENCODER(X,x); REGISTER_DECODER(X,x)
 
 #define REGISTER_PARSER(X,x) { \
           extern AVCodecParser x##_parser; \
-          if(ENABLE_##X##_PARSER)  av_register_codec_parser(&x##_parser); }
+          if(CONFIG_##X##_PARSER)  av_register_codec_parser(&x##_parser); }
 #define REGISTER_BSF(X,x) { \
           extern AVBitStreamFilter x##_bsf; \
-          if(ENABLE_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
+          if(CONFIG_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
 
 void avcodec_register_all(void)
 {

+ 1 - 1
libavcodec/arm/dsputil_arm.c

@@ -118,7 +118,7 @@ static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
 
 int mm_support(void)
 {
-    return ENABLE_IWMMXT * FF_MM_IWMMXT;
+    return HAVE_IWMMXT * FF_MM_IWMMXT;
 }
 
 void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)

+ 1 - 1
libavcodec/bitstream.c

@@ -82,7 +82,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
 
     if(length==0) return;
 
-    if(ENABLE_SMALL || words < 16 || put_bits_count(pb)&7){
+    if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
         for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i]));
     }else{
         for(i=0; put_bits_count(pb)&31; i++)

+ 17 - 17
libavcodec/dsputil.c

@@ -2842,7 +2842,7 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){
 }
 
 static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
-    if(ENABLE_ANY_H263) {
+    if(CONFIG_ANY_H263) {
     int x;
     const int strength= ff_h263_loop_filter_strength[qscale];
 
@@ -2879,7 +2879,7 @@ static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
 }
 
 static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
-    if(ENABLE_ANY_H263) {
+    if(CONFIG_ANY_H263) {
     int y;
     const int strength= ff_h263_loop_filter_strength[qscale];
 
@@ -4285,7 +4285,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
 #endif //CONFIG_ENCODERS
 
     if(avctx->lowres==1){
-        if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !ENABLE_H264_DECODER){
+        if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !CONFIG_H264_DECODER){
             c->idct_put= ff_jref_idct4_put;
             c->idct_add= ff_jref_idct4_add;
         }else{
@@ -4310,7 +4310,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
             c->idct_add= ff_jref_idct_add;
             c->idct    = j_rev_dct;
             c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
-        }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) &&
+        }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER ) &&
                 avctx->idct_algo==FF_IDCT_VP3){
             c->idct_put= ff_vp3_idct_put_c;
             c->idct_add= ff_vp3_idct_add_c;
@@ -4326,7 +4326,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
             c->idct_add= ff_faanidct_add;
             c->idct    = ff_faanidct;
             c->idct_permutation_type= FF_NO_IDCT_PERM;
-        }else if(ENABLE_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
+        }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
             c->idct_put= ff_ea_idct_put_c;
             c->idct_permutation_type= FF_NO_IDCT_PERM;
         }else{ //accurate/default
@@ -4337,7 +4337,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
         }
     }
 
-    if (ENABLE_H264_DECODER) {
+    if (CONFIG_H264_DECODER) {
         c->h264_idct_add= ff_h264_idct_add_c;
         c->h264_idct8_add= ff_h264_idct8_add_c;
         c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
@@ -4572,12 +4572,12 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
     c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
     c->h264_loop_filter_strength= NULL;
 
-    if (ENABLE_ANY_H263) {
+    if (CONFIG_ANY_H263) {
         c->h263_h_loop_filter= h263_h_loop_filter_c;
         c->h263_v_loop_filter= h263_v_loop_filter_c;
     }
 
-    if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
+    if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
         c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c;
         c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c;
     }
@@ -4623,15 +4623,15 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
     memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
     memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
 
-    if (ENABLE_MMX)      dsputil_init_mmx   (c, avctx);
-    if (ENABLE_ARM)      dsputil_init_arm   (c, avctx);
-    if (ENABLE_MLIB)     dsputil_init_mlib  (c, avctx);
-    if (ENABLE_VIS)      dsputil_init_vis   (c, avctx);
-    if (ENABLE_ALPHA)    dsputil_init_alpha (c, avctx);
-    if (ENABLE_PPC)      dsputil_init_ppc   (c, avctx);
-    if (ENABLE_MMI)      dsputil_init_mmi   (c, avctx);
-    if (ENABLE_SH4)      dsputil_init_sh4   (c, avctx);
-    if (ENABLE_BFIN)     dsputil_init_bfin  (c, avctx);
+    if (HAVE_MMX)        dsputil_init_mmx   (c, avctx);
+    if (ARCH_ARM)        dsputil_init_arm   (c, avctx);
+    if (CONFIG_MLIB)     dsputil_init_mlib  (c, avctx);
+    if (HAVE_VIS)        dsputil_init_vis   (c, avctx);
+    if (ARCH_ALPHA)      dsputil_init_alpha (c, avctx);
+    if (ARCH_PPC)        dsputil_init_ppc   (c, avctx);
+    if (HAVE_MMI)        dsputil_init_mmi   (c, avctx);
+    if (ARCH_SH4)        dsputil_init_sh4   (c, avctx);
+    if (ARCH_BFIN)       dsputil_init_bfin  (c, avctx);
 
     for(i=0; i<64; i++){
         if(!c->put_2tap_qpel_pixels_tab[0][i])

+ 4 - 4
libavcodec/dv.c

@@ -62,7 +62,7 @@ typedef struct DVVideoContext {
 
 #define TEX_VLC_BITS 9
 
-#if ENABLE_SMALL
+#if CONFIG_SMALL
 #define DV_VLC_MAP_RUN_SIZE 15
 #define DV_VLC_MAP_LEV_SIZE 23
 #else
@@ -326,7 +326,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
         for (i = 0; i < NB_DV_VLC - 1; i++) {
            if (dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE)
                continue;
-#if ENABLE_SMALL
+#if CONFIG_SMALL
            if (dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE)
                continue;
 #endif
@@ -340,7 +340,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
                dv_vlc_len[i] + (!!dv_vlc_level[i]);
         }
         for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) {
-#if ENABLE_SMALL
+#if CONFIG_SMALL
            for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) {
               if (dv_vlc_map[i][j].size == 0) {
                   dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc |
@@ -692,7 +692,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu
     return 0;
 }
 
-#if ENABLE_SMALL
+#if CONFIG_SMALL
 /* Converts run and level (where level != 0) pair into vlc, returning bit size */
 static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc)
 {

+ 1 - 1
libavcodec/h263.c

@@ -2355,7 +2355,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
 {
     int vo_ver_id;
 
-    if (!ENABLE_MPEG4_ENCODER)  return;
+    if (!CONFIG_MPEG4_ENCODER)  return;
 
     if(s->max_b_frames || s->quarter_sample){
         vo_ver_id= 5;

+ 17 - 17
libavcodec/h263.h

@@ -25,22 +25,22 @@
 #include "config.h"
 #include "msmpeg4.h"
 
-#define ENABLE_ANY_H263_DECODER (ENABLE_H263_DECODER    || \
-                                 ENABLE_H263I_DECODER   || \
-                                 ENABLE_FLV_DECODER     || \
-                                 ENABLE_RV10_DECODER    || \
-                                 ENABLE_RV20_DECODER    || \
-                                 ENABLE_MPEG4_DECODER   || \
-                                 ENABLE_MSMPEG4_DECODER || \
-                                 ENABLE_WMV_DECODER)
-#define ENABLE_ANY_H263_ENCODER (ENABLE_H263_ENCODER    || \
-                                 ENABLE_H263P_ENCODER   || \
-                                 ENABLE_FLV_ENCODER     || \
-                                 ENABLE_RV10_ENCODER    || \
-                                 ENABLE_RV20_ENCODER    || \
-                                 ENABLE_MPEG4_ENCODER   || \
-                                 ENABLE_MSMPEG4_ENCODER || \
-                                 ENABLE_WMV_ENCODER)
-#define ENABLE_ANY_H263 (ENABLE_ANY_H263_DECODER || ENABLE_ANY_H263_ENCODER)
+#define CONFIG_ANY_H263_DECODER (CONFIG_H263_DECODER    || \
+                                 CONFIG_H263I_DECODER   || \
+                                 CONFIG_FLV_DECODER     || \
+                                 CONFIG_RV10_DECODER    || \
+                                 CONFIG_RV20_DECODER    || \
+                                 CONFIG_MPEG4_DECODER   || \
+                                 CONFIG_MSMPEG4_DECODER || \
+                                 CONFIG_WMV_DECODER)
+#define CONFIG_ANY_H263_ENCODER (CONFIG_H263_ENCODER    || \
+                                 CONFIG_H263P_ENCODER   || \
+                                 CONFIG_FLV_ENCODER     || \
+                                 CONFIG_RV10_ENCODER    || \
+                                 CONFIG_RV20_ENCODER    || \
+                                 CONFIG_MPEG4_ENCODER   || \
+                                 CONFIG_MSMPEG4_ENCODER || \
+                                 CONFIG_WMV_ENCODER)
+#define CONFIG_ANY_H263 (CONFIG_ANY_H263_DECODER || CONFIG_ANY_H263_ENCODER)
 
 #endif /* AVCODEC_H263_H */

+ 7 - 7
libavcodec/h263dec.c

@@ -111,7 +111,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
         if (MPV_common_init(s) < 0)
             return -1;
 
-    if (ENABLE_MSMPEG4_DECODER && s->h263_msmpeg4)
+    if (CONFIG_MSMPEG4_DECODER && s->h263_msmpeg4)
         ff_msmpeg4_decode_init(s);
     else
         h263_decode_init_vlc(s);
@@ -355,9 +355,9 @@ uint64_t time= rdtsc();
     if(s->flags&CODEC_FLAG_TRUNCATED){
         int next;
 
-        if(ENABLE_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
+        if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
             next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
-        }else if(ENABLE_H263_DECODER && s->codec_id==CODEC_ID_H263){
+        }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
             next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
         }else{
             av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
@@ -390,9 +390,9 @@ retry:
     }
 
     /* let's go :-) */
-    if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5) {
+    if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5) {
         ret= ff_wmv2_decode_picture_header(s);
-    } else if (ENABLE_MSMPEG4_DECODER && s->msmpeg4_version) {
+    } else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) {
         ret = msmpeg4_decode_picture_header(s);
     } else if (s->h263_pred) {
         if(s->avctx->extradata_size && s->picture_number==0){
@@ -620,7 +620,7 @@ retry:
 
     //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type
     //which is not available before MPV_frame_start()
-    if (ENABLE_WMV2_DECODER && s->msmpeg4_version==5){
+    if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5){
         ret = ff_wmv2_decode_secondary_picture_header(s);
         if(ret<0) return ret;
         if(ret==1) goto intrax8_decoded;
@@ -647,7 +647,7 @@ retry:
     }
 
     if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
-        if(!ENABLE_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
+        if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
             s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
         }
 

Некоторые файлы не были показаны из-за большого количества измененных файлов