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

Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN

Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård 15 лет назад
Родитель
Сommit
63613fe615

+ 0 - 5
configure

@@ -2591,11 +2591,6 @@ echo "HOSTLIBS=$host_libs" >> config.mak
 echo "TARGET_EXEC=$target_exec" >> config.mak
 echo "TARGET_PATH=$target_path" >> config.mak
 
-if enabled bigendian; then
-    echo "WORDS_BIGENDIAN=yes" >> config.mak
-    echo "#define WORDS_BIGENDIAN 1" >> $TMPH
-fi
-
 if enabled sdl; then
     echo "SDL_LIBS=$("${SDL_CONFIG}" --libs)" >> config.mak
     echo "SDL_CFLAGS=$("${SDL_CONFIG}" --cflags)" >> config.mak

+ 1 - 1
libavcodec/8bps.c

@@ -183,7 +183,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
                 case 32:
                         avctx->pix_fmt = PIX_FMT_RGB32;
                         c->planes = 4;
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
                         c->planemap[0] = 1; // 1st plane is red
                         c->planemap[1] = 2; // 2nd plane is green
                         c->planemap[2] = 3; // 3rd plane is blue

+ 1 - 1
libavcodec/cscd.c

@@ -59,7 +59,7 @@ static void add_frame_default(AVFrame *f, const uint8_t *src,
     }
 }
 
-#ifndef WORDS_BIGENDIAN
+#if !HAVE_BIGENDIAN
 #define copy_frame_16 copy_frame_default
 #define copy_frame_32 copy_frame_default
 #define add_frame_16 add_frame_default

+ 1 - 1
libavcodec/flacenc.c

@@ -1224,7 +1224,7 @@ static void output_frame_footer(FlacEncodeContext *s)
 
 static void update_md5_sum(FlacEncodeContext *s, int16_t *samples)
 {
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
     int i;
     for(i = 0; i < s->frame.blocksize*s->channels; i++) {
         int16_t smp = le2me_16(samples[i]);

+ 1 - 1
libavcodec/flicvideo.c

@@ -585,7 +585,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
                  * during decompression. So if it is required (i.e., this is not a LE target, we do
                  * a second pass over the line here, swapping the bytes.
                  */
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
                 pixel_ptr = y_ptr;
                 pixel_countdown = s->avctx->width;
                 while (pixel_countdown > 0) {

+ 1 - 1
libavcodec/h264.c

@@ -82,7 +82,7 @@ static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y,
 static Picture * remove_long(H264Context *h, int i, int ref_mask);
 
 static av_always_inline uint32_t pack16to32(int a, int b){
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
    return (b&0xFFFF) + (a<<16);
 #else
    return (a&0xFFFF) + (b<<16);

+ 1 - 1
libavcodec/huffyuv.c

@@ -35,7 +35,7 @@
 
 #define VLC_BITS 11
 
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
 #define B 3
 #define G 2
 #define R 1

+ 1 - 1
libavcodec/imgconvert.c

@@ -548,7 +548,7 @@ static enum PixelFormat avcodec_get_pix_fmt_internal(const char *name)
     return PIX_FMT_NONE;
 }
 
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
 #   define X_NE(be, le) be
 #else
 #   define X_NE(be, le) le

+ 1 - 1
libavcodec/indeo3.c

@@ -576,7 +576,7 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
                                 lv1 = ref_lp[0];
                                 lv2 = ref_lp[1];
                                 if(lp2 == 0 && flag1 != 0) {
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
                                     lv1 = lv1 & 0xFF00FF00;
                                     lv1 = (lv1 >> 8) | lv1;
                                     lv2 = lv2 & 0xFF00FF00;

+ 4 - 4
libavcodec/pcm.c

@@ -214,7 +214,7 @@ static int pcm_encode_frame(AVCodecContext *avctx,
             *dst++ = v - 128;
         }
         break;
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
     case CODEC_ID_PCM_F64LE:
         ENCODE(int64_t, le64, samples, dst, n, 0, 0)
         break;
@@ -244,7 +244,7 @@ static int pcm_encode_frame(AVCodecContext *avctx,
     case CODEC_ID_PCM_F32LE:
     case CODEC_ID_PCM_S32LE:
     case CODEC_ID_PCM_S16LE:
-#endif /* WORDS_BIGENDIAN */
+#endif /* HAVE_BIGENDIAN */
     case CODEC_ID_PCM_U8:
         memcpy(dst, samples, n*sample_size);
         dst += n*sample_size;
@@ -422,7 +422,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
         }
         samples= (short*)dstu8;
         break;
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
     case CODEC_ID_PCM_F64LE:
         DECODE(int64_t, le64, src, samples, n, 0, 0)
         break;
@@ -452,7 +452,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
     case CODEC_ID_PCM_F32LE:
     case CODEC_ID_PCM_S32LE:
     case CODEC_ID_PCM_S16LE:
-#endif /* WORDS_BIGENDIAN */
+#endif /* HAVE_BIGENDIAN */
     case CODEC_ID_PCM_U8:
         memcpy(samples, src, n*sample_size);
         src += n*sample_size;

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