[MPlayer-cvslog] CVS: main/libmpcodecs/native RTjpegN.c, 1.9, 1.10 RTjpegN.h, 1.2, 1.3

Reimar Döffinger CVS syncmail at mplayerhq.hu
Tue Oct 4 14:15:14 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpcodecs/native
In directory mail:/var2/tmp/cvs-serv19656

Modified Files:
	RTjpegN.c RTjpegN.h 
Log Message:
Fix 100l bugs that break playback on 64 bit systems (like typedefing __u32
as long!!).


Index: RTjpegN.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/RTjpegN.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- RTjpegN.c	3 Mar 2005 10:19:56 -0000	1.9
+++ RTjpegN.c	4 Oct 2005 12:15:12 -0000	1.10
@@ -3221,11 +3221,11 @@
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
- RTjpeg_cmask=(mmx_t)(((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask);
+ 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;
 #else
- RTjpeg_lmask=lmask;
- RTjpeg_cmask=cmask;
+ RTjpeg_lmask.uq=lmask;
+ RTjpeg_cmask.uq=cmask;
 #endif
  
  sb=sp;
@@ -3312,11 +3312,11 @@
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
- RTjpeg_cmask=(mmx_t)(((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask);
+ 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;
 #else
- RTjpeg_lmask=lmask;
- RTjpeg_cmask=cmask;
+ RTjpeg_lmask.uq=lmask;
+ RTjpeg_cmask.uq=cmask;
 #endif
  
  bp = bp - RTjpeg_width*0;
@@ -3386,9 +3386,9 @@
 
 #ifdef MMX
  emms();
- RTjpeg_lmask=(mmx_t)(((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask);
+ RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
 #else
- RTjpeg_lmask=lmask;
+ RTjpeg_lmask.uq=lmask;
 #endif
 
  

Index: RTjpegN.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/RTjpegN.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RTjpegN.h	26 Jun 2004 12:39:20 -0000	1.2
+++ RTjpegN.h	4 Oct 2005 12:15:12 -0000	1.3
@@ -22,19 +22,18 @@
     
 */
 
-#if !defined(_I386_TYPES_H) && !defined(_X86_64_TYPES_H)
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned long __u32;
-typedef unsigned long long __u64;
-typedef signed char __s8;
-typedef signed short __s16;
-typedef signed long __s32;
-#endif
+#define __u8 uint8_t
+#define __u16 uint16_t
+#define __u32 uint32_t
+#define __u64 uint64_t
+#define __s8 int8_t
+#define __s16 int16_t
+#define __s32 int32_t
+#define __s64 int64_t
 
 extern void RTjpeg_init_Q(__u8 Q);
-extern void RTjpeg_init_compress(long unsigned int *buf, int width, int height, __u8 Q);
-extern void RTjpeg_init_decompress(long unsigned int *buf, int width, int height);
+extern void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q);
+extern void RTjpeg_init_decompress(__u32 *buf, int width, int height);
 extern int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp);
 extern int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp);
 extern void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp);




More information about the MPlayer-cvslog mailing list