changeset 28296:08c1417e757b

fix compilation on non x86 machines (PPC here)
author gpoirier
date Fri, 16 Jan 2009 10:07:14 +0000
parents 373702f9db03
children 1c2bd849c7b5
files libmpcodecs/ad_hwac3.c libmpcodecs/native/rtjpegn.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vf.c libmpcodecs/vf_scale.c
diffstat 5 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_hwac3.c	Fri Jan 16 09:44:36 2009 +0000
+++ b/libmpcodecs/ad_hwac3.c	Fri Jan 16 10:07:14 2009 +0000
@@ -179,7 +179,7 @@
     buf16[2] = 0x0001;   // data-type ac3
     buf16[2] |= (sh_audio->a_in_buffer[5] & 0x7) << 8; // bsmod
     buf16[3] = len << 3; // number of bits in payload
-#ifdef WORDS_BIGENDIAN
+#if WORDS_BIGENDIAN
     memcpy(buf + 8, sh_audio->a_in_buffer, len);
 #else
     swab(sh_audio->a_in_buffer, buf + 8, len);
@@ -523,7 +523,7 @@
   buf16[3] = fsize << 3;
 
   if (!convert_16bits) {
-#ifdef WORDS_BIGENDIAN
+#if WORDS_BIGENDIAN
   /* BE stream */
   if (indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f)
 #else
--- a/libmpcodecs/native/rtjpegn.c	Fri Jan 16 09:44:36 2009 +0000
+++ b/libmpcodecs/native/rtjpegn.c	Fri Jan 16 10:07:14 2009 +0000
@@ -33,7 +33,7 @@
 #include "mpbswap.h"
 #include "rtjpegn.h"
 
-#ifdef MMX
+#if MMX
 #include "mmx.h"
 #endif
 
@@ -88,7 +88,7 @@
 
 static __s16 *RTjpeg_old=NULL;
 
-#ifdef MMX
+#if MMX
 mmx_t RTjpeg_lmask;
 mmx_t RTjpeg_cmask;
 #else
@@ -610,7 +610,7 @@
 /*
  * Perform the forward DCT on one block of samples.
  */
-#ifdef MMX
+#if MMX
 static mmx_t RTjpeg_C4   ={0x2D412D412D412D41LL};
 static mmx_t RTjpeg_C6   ={0x187E187E187E187ELL};
 static mmx_t RTjpeg_C2mC6={0x22A322A322A322A3LL};
@@ -1570,7 +1570,7 @@
 
 void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip)
 {
-#ifdef MMX
+#if MMX
 
 static mmx_t fix_141			= {0x5a825a825a825a82LL};
 static mmx_t fix_184n261	= {0xcf04cf04cf04cf04LL};
@@ -2864,7 +2864,7 @@
  register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
  register int i, j, k;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
  sb=sp;
@@ -2904,7 +2904,7 @@
   bp3+=RTjpeg_width<<2;
 			 
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
@@ -2917,7 +2917,7 @@
  register __s8 * bp3 = bp2 + RTjpeg_Csize;
  register int i, j, k;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
  sb=sp;
@@ -2948,7 +2948,7 @@
   bp3+=RTjpeg_width<<2;
 			 
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
@@ -2959,7 +2959,7 @@
  __s8 * sb;
  int i, j;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
  
@@ -2976,7 +2976,7 @@
   bp+=RTjpeg_width;
  }
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
@@ -2988,7 +2988,7 @@
  register __s8 * bp3 = bp2 + (RTjpeg_Csize);
  int i, j,k;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
 
@@ -3025,7 +3025,7 @@
   bp2+=RTjpeg_width<<2;
   bp3+=RTjpeg_width<<2;
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
 }
@@ -3037,7 +3037,7 @@
  register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
  int i, j,k;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
 
@@ -3087,7 +3087,7 @@
   bp2+=RTjpeg_width<<2;
   bp3+=RTjpeg_width<<2;
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
 }
@@ -3096,7 +3096,7 @@
 {
  int i, j;
 
-#ifdef MMX
+#if MMX
  emms();
 #endif
 
@@ -3141,7 +3141,7 @@
  memset(RTjpeg_old, 0, ((4*RTjpeg_width*RTjpeg_height)));
 }
 
-#ifdef MMX
+#if MMX
 
 int RTjpeg_bcomp(__s16 *old, mmx_t *mask)
 {
@@ -3218,7 +3218,7 @@
  register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
  register int i, j, k;
 
-#ifdef MMX
+#if MMX
  emms();
  RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
  RTjpeg_cmask.uq=((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask;
@@ -3294,7 +3294,7 @@
   bp3+=RTjpeg_width<<2;
 			 
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
@@ -3309,7 +3309,7 @@
  register __s8 * bp3;
  register int i, j, k;
 
-#ifdef MMX
+#if MMX
  emms();
  RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
  RTjpeg_cmask.uq=((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask;
@@ -3371,7 +3371,7 @@
   bp3+=RTjpeg_width<<2;
  }
  printf ("%d\n", block - RTjpeg_old);
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
@@ -3383,7 +3383,7 @@
  __s16 *block;
  int i, j;
 
-#ifdef MMX
+#if MMX
  emms();
  RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
 #else
@@ -3409,7 +3409,7 @@
   }
   bp+=RTjpeg_width<<3;
  }
-#ifdef MMX
+#if MMX
  emms();
 #endif
  return (sp-sb);
--- a/libmpcodecs/vd_ffmpeg.c	Fri Jan 16 09:44:36 2009 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Fri Jan 16 10:07:14 2009 +0000
@@ -892,7 +892,7 @@
 	mpi->stride[2]*=2;
     }
     
-#ifdef WORDS_BIGENDIAN
+#if WORDS_BIGENDIAN
     // FIXME: this might cause problems for buffers with FF_BUFFER_HINTS_PRESERVE
     if (mpi->bpp == 8)
         swap_palette(mpi->planes[1]);
--- a/libmpcodecs/vf.c	Fri Jan 16 09:44:36 2009 +0000
+++ b/libmpcodecs/vf.c	Fri Jan 16 10:07:14 2009 +0000
@@ -231,7 +231,7 @@
 	    unsigned int* p=(unsigned int*) dst;
 	    int size=(mpi->bpp>>3)*w/4;
 	    int i;
-#ifdef WORDS_BIGENDIAN
+#if WORDS_BIGENDIAN
 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
 #else
--- a/libmpcodecs/vf_scale.c	Fri Jan 16 09:44:36 2009 +0000
+++ b/libmpcodecs/vf_scale.c	Fri Jan 16 10:07:14 2009 +0000
@@ -322,7 +322,7 @@
 static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[3], int src_stride[3], int y, int h, 
                   uint8_t *dst[3], int dst_stride[3], int interlaced){
     uint8_t *src2[3]={src[0], src[1], src[2]};
-#ifdef WORDS_BIGENDIAN
+#if WORDS_BIGENDIAN
     uint32_t pal2[256];
     if (src[1] && !src[2]){
         int i;