mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
fix compilation on non x86 machines (PPC here)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28331 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
17923f688b
commit
5538dcf03b
@ -179,7 +179,7 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
|
||||
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 char *indata_ptr, int len, unsigned char *b
|
||||
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
|
||||
|
@ -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 *qtbl)
|
||||
/*
|
||||
* 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, unsigned char *bp)
|
||||
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, unsigned char *bp)
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2917,7 +2917,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp)
|
||||
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, unsigned char *bp)
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2959,7 +2959,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
|
||||
__s8 * sb;
|
||||
int i, j;
|
||||
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
|
||||
@ -2976,7 +2976,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
|
||||
bp+=RTjpeg_width;
|
||||
}
|
||||
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2988,7 +2988,7 @@ void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp)
|
||||
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, __u8 *bp)
|
||||
bp2+=RTjpeg_width<<2;
|
||||
bp3+=RTjpeg_width<<2;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
}
|
||||
@ -3037,7 +3037,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp)
|
||||
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, __u8 *bp)
|
||||
bp2+=RTjpeg_width<<2;
|
||||
bp3+=RTjpeg_width<<2;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
}
|
||||
@ -3096,7 +3096,7 @@ void RTjpeg_decompress8(__s8 *sp, __u8 *bp)
|
||||
{
|
||||
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, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
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, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -3309,7 +3309,7 @@ int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
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, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
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 char *bp, __u16 lmask)
|
||||
__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 char *bp, __u16 lmask)
|
||||
}
|
||||
bp+=RTjpeg_width<<3;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
|
@ -892,7 +892,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
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]);
|
||||
|
@ -231,7 +231,7 @@ void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){
|
||||
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
|
||||
|
@ -322,7 +322,7 @@ static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user