aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-07-26 12:20:04 +0000
committerMåns Rullgård <mans@mansr.com>2009-07-26 12:20:04 +0000
commit63613fe615160671b394a232c1a3736319a6a8ec (patch)
tree4e85211d5388b91b47facca7700512abdd36446d /libavcodec
parent84c04e25196a59694abec3ae17af476994bc5ce8 (diff)
downloadffmpeg-63613fe615160671b394a232c1a3736319a6a8ec.tar.gz
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/8bps.c2
-rw-r--r--libavcodec/cscd.c2
-rw-r--r--libavcodec/flacenc.c2
-rw-r--r--libavcodec/flicvideo.c2
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/huffyuv.c2
-rw-r--r--libavcodec/imgconvert.c2
-rw-r--r--libavcodec/indeo3.c2
-rw-r--r--libavcodec/pcm.c8
-rw-r--r--libavcodec/ptx.c2
-rw-r--r--libavcodec/simple_idct.c2
-rw-r--r--libavcodec/targa.c2
-rw-r--r--libavcodec/tiffenc.c2
-rw-r--r--libavcodec/truemotion1.c12
14 files changed, 22 insertions, 22 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 47c90c9fe2..28187b0360 100644
--- a/libavcodec/8bps.c
+++ b/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
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 5fe097712d..e58cf7861d 100644
--- a/libavcodec/cscd.c
+++ b/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
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 66e5bfafcf..164e0c0324 100644
--- a/libavcodec/flacenc.c
+++ b/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]);
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 9a3ac9f129..2ee7837f60 100644
--- a/libavcodec/flicvideo.c
+++ b/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) {
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f6788cdedc..bc770fc5fd 100644
--- a/libavcodec/h264.c
+++ b/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);
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 40d980da45..53142c074e 100644
--- a/libavcodec/huffyuv.c
+++ b/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
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index a2db471222..ade803f69f 100644
--- a/libavcodec/imgconvert.c
+++ b/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
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index ba045bd7cb..05f79258b3 100644
--- a/libavcodec/indeo3.c
+++ b/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;
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 95e33fd607..8530cd689a 100644
--- a/libavcodec/pcm.c
+++ b/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;
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index f8bbca718a..f5aa601cde 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -79,7 +79,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
stride = p->linesize[0];
for (y=0; y<h; y++) {
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
unsigned int x;
for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel)
AV_WN16(ptr+x, AV_RL16(buf+x));
diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index fd59026ffa..6670740bf3 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -66,7 +66,7 @@ static inline void idctRowCondDC (DCTELEM * row)
#endif
#if HAVE_FAST_64BIT
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
#define ROW0_MASK 0xffff000000000000LL
#else
#define ROW0_MASK 0xffffLL
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index ba541619bf..3e7903ae52 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -199,7 +199,7 @@ static int decode_frame(AVCodecContext *avctx,
targa_decode_rle(avctx, s, buf, dst, avctx->width, avctx->height, stride, bpp);
else{
for(y = 0; y < s->height; y++){
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
if((s->bpp + 1) >> 3 == 2){
uint16_t *dst16 = (uint16_t*)dst;
for(x = 0; x < s->width; x++)
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 1bc3c82c7e..3d0619620b 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -91,7 +91,7 @@ static void tnput(uint8_t ** p, int n, const uint8_t * val, enum TiffTypes type,
int flip)
{
int i;
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
flip ^= ((int[]) {0, 0, 0, 1, 3, 3})[type];
#endif
for (i = 0; i < n * type_sizes2[type]; i++)
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index 891a042338..ae08bfe0b2 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -163,7 +163,7 @@ static void select_delta_tables(TrueMotion1Context *s, int delta_table_index)
}
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_ydt15_entry(int p2, int p1, int16_t *ydt)
#else
static int make_ydt15_entry(int p1, int p2, int16_t *ydt)
@@ -178,7 +178,7 @@ static int make_ydt15_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 16)) << 1;
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_cdt15_entry(int p2, int p1, int16_t *cdt)
#else
static int make_cdt15_entry(int p1, int p2, int16_t *cdt)
@@ -192,7 +192,7 @@ static int make_cdt15_entry(int p1, int p2, int16_t *cdt)
return (lo + (lo << 16)) << 1;
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_ydt16_entry(int p2, int p1, int16_t *ydt)
#else
static int make_ydt16_entry(int p1, int p2, int16_t *ydt)
@@ -207,7 +207,7 @@ static int make_ydt16_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 16)) << 1;
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_cdt16_entry(int p2, int p1, int16_t *cdt)
#else
static int make_cdt16_entry(int p1, int p2, int16_t *cdt)
@@ -221,7 +221,7 @@ static int make_cdt16_entry(int p1, int p2, int16_t *cdt)
return (lo + (lo << 16)) << 1;
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_ydt24_entry(int p2, int p1, int16_t *ydt)
#else
static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
@@ -234,7 +234,7 @@ static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 8) + (hi << 16)) << 1;
}
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
static int make_cdt24_entry(int p2, int p1, int16_t *cdt)
#else
static int make_cdt24_entry(int p1, int p2, int16_t *cdt)