[MPlayer-cvslog] r28331 - in trunk/libmpcodecs: ad_hwac3.c native/rtjpegn.c vd_ffmpeg.c vf.c vf_scale.c
gpoirier
subversion at mplayerhq.hu
Fri Jan 16 11:07:14 CET 2009
Author: gpoirier
Date: Fri Jan 16 11:07:14 2009
New Revision: 28331
Log:
fix compilation on non x86 machines (PPC here)
Modified:
trunk/libmpcodecs/ad_hwac3.c
trunk/libmpcodecs/native/rtjpegn.c
trunk/libmpcodecs/vd_ffmpeg.c
trunk/libmpcodecs/vf.c
trunk/libmpcodecs/vf_scale.c
Modified: trunk/libmpcodecs/ad_hwac3.c
==============================================================================
--- trunk/libmpcodecs/ad_hwac3.c Fri Jan 16 10:44:36 2009 (r28330)
+++ trunk/libmpcodecs/ad_hwac3.c Fri Jan 16 11:07:14 2009 (r28331)
@@ -179,7 +179,7 @@ static int decode_audio(sh_audio_t *sh_a
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 @@ static int decode_audio_dts(unsigned cha
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
Modified: trunk/libmpcodecs/native/rtjpegn.c
==============================================================================
--- trunk/libmpcodecs/native/rtjpegn.c Fri Jan 16 10:44:36 2009 (r28330)
+++ trunk/libmpcodecs/native/rtjpegn.c Fri Jan 16 11:07:14 2009 (r28331)
@@ -33,7 +33,7 @@
#include "mpbswap.h"
#include "rtjpegn.h"
-#ifdef MMX
+#if MMX
#include "mmx.h"
#endif
@@ -88,7 +88,7 @@ static int RTjpeg_Ysize, RTjpeg_Csize;
static __s16 *RTjpeg_old=NULL;
-#ifdef MMX
+#if MMX
mmx_t RTjpeg_lmask;
mmx_t RTjpeg_cmask;
#else
@@ -610,7 +610,7 @@ void RTjpeg_quant(__s16 *block, __s32 *q
/*
* 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_init(void)
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 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi
register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
register int i, j, k;
-#ifdef MMX
+#if MMX
emms();
#endif
sb=sp;
@@ -2904,7 +2904,7 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi
bp3+=RTjpeg_width<<2;
}
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
@@ -2917,7 +2917,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsi
register __s8 * bp3 = bp2 + RTjpeg_Csize;
register int i, j, k;
-#ifdef MMX
+#if MMX
emms();
#endif
sb=sp;
@@ -2948,7 +2948,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsi
bp3+=RTjpeg_width<<2;
}
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
@@ -2959,7 +2959,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned
__s8 * sb;
int i, j;
-#ifdef MMX
+#if MMX
emms();
#endif
@@ -2976,7 +2976,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned
bp+=RTjpeg_width;
}
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
@@ -2988,7 +2988,7 @@ void RTjpeg_decompressYUV422(__s8 *sp, _
register __s8 * bp3 = bp2 + (RTjpeg_Csize);
int i, j,k;
-#ifdef MMX
+#if MMX
emms();
#endif
@@ -3025,7 +3025,7 @@ void RTjpeg_decompressYUV422(__s8 *sp, _
bp2+=RTjpeg_width<<2;
bp3+=RTjpeg_width<<2;
}
-#ifdef MMX
+#if MMX
emms();
#endif
}
@@ -3037,7 +3037,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, _
register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
int i, j,k;
-#ifdef MMX
+#if MMX
emms();
#endif
@@ -3087,7 +3087,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, _
bp2+=RTjpeg_width<<2;
bp3+=RTjpeg_width<<2;
}
-#ifdef MMX
+#if MMX
emms();
#endif
}
@@ -3096,7 +3096,7 @@ void RTjpeg_decompress8(__s8 *sp, __u8 *
{
int i, j;
-#ifdef MMX
+#if MMX
emms();
#endif
@@ -3141,7 +3141,7 @@ void RTjpeg_init_mcompress(void)
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 @@ int RTjpeg_mcompressYUV420(__s8 *sp, uns
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 @@ int RTjpeg_mcompressYUV420(__s8 *sp, uns
bp3+=RTjpeg_width<<2;
}
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
@@ -3309,7 +3309,7 @@ int RTjpeg_mcompressYUV422(__s8 *sp, uns
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 @@ int RTjpeg_mcompressYUV422(__s8 *sp, uns
bp3+=RTjpeg_width<<2;
}
printf ("%d\n", block - RTjpeg_old);
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
@@ -3383,7 +3383,7 @@ int RTjpeg_mcompress8(__s8 *sp, unsigned
__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 @@ int RTjpeg_mcompress8(__s8 *sp, unsigned
}
bp+=RTjpeg_width<<3;
}
-#ifdef MMX
+#if MMX
emms();
#endif
return (sp-sb);
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Fri Jan 16 10:44:36 2009 (r28330)
+++ trunk/libmpcodecs/vd_ffmpeg.c Fri Jan 16 11:07:14 2009 (r28331)
@@ -892,7 +892,7 @@ static mp_image_t* decode(sh_video_t *sh
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]);
Modified: trunk/libmpcodecs/vf.c
==============================================================================
--- trunk/libmpcodecs/vf.c Fri Jan 16 10:44:36 2009 (r28330)
+++ trunk/libmpcodecs/vf.c Fri Jan 16 11:07:14 2009 (r28331)
@@ -231,7 +231,7 @@ void vf_mpi_clear(mp_image_t* mpi,int x0
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
Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c Fri Jan 16 10:44:36 2009 (r28330)
+++ trunk/libmpcodecs/vf_scale.c Fri Jan 16 11:07:14 2009 (r28331)
@@ -322,7 +322,7 @@ static void start_slice(struct vf_instan
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;
More information about the MPlayer-cvslog
mailing list