[MPlayer-dev-eng] [PATCH]: postproc ppc gcc-4.0 build-fixes

Guido Guenther agx at sigxcpu.org
Mon Aug 1 17:19:51 CEST 2005


Hi,
I need this minor patch to get mplayer CVS from 2005-07-16 to build with
gcc 4.0.1 on linux ppc using altivec opt. Tested with gcc 4.0 and 3.4.
Please apply.
Cheers,
 -- Guido
-------------- next part --------------
--- mplayer-1.0-pre7cvs20050716/postproc/swscale_altivec_template.c.agx	2005-07-31 20:58:33.000000000 +0200
+++ mplayer-1.0-pre7cvs20050716/postproc/swscale_altivec_template.c	2005-08-01 15:37:49.000000000 +0200
@@ -27,9 +27,9 @@
 #endif
 
 static const vector signed int vzero =
-  (const vector signed int)AVV(0, 0, 0, 0);
+  AVV(0, 0, 0, 0);
 static const vector unsigned int altivec_vectorShiftInt19 =
-  (const vector unsigned int)AVV(19, 19, 19, 19);
+  AVV(19, 19, 19, 19);
 
 static inline void
 altivec_packIntArrayToCharArray(int *val, uint8_t* dest, int dstW) {
--- mplayer-1.0-pre7cvs20050716/postproc/yuv2rgb_altivec.c.agx	2005-08-01 15:38:46.000000000 +0200
+++ mplayer-1.0-pre7cvs20050716/postproc/yuv2rgb_altivec.c	2005-08-01 15:40:06.000000000 +0200
@@ -119,14 +119,14 @@
 */
 static
 const vector unsigned char
-  perm_rgb_0 = (const vector unsigned char)AVV(0x00,0x01,0x10,0x02,0x03,0x11,0x04,0x05,
-				      0x12,0x06,0x07,0x13,0x08,0x09,0x14,0x0a),
-  perm_rgb_1 = (const vector unsigned char)AVV(0x0b,0x15,0x0c,0x0d,0x16,0x0e,0x0f,0x17,
-				      0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f),
-  perm_rgb_2 = (const vector unsigned char)AVV(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
-				      0x00,0x01,0x18,0x02,0x03,0x19,0x04,0x05),
-  perm_rgb_3 = (const vector unsigned char)AVV(0x1a,0x06,0x07,0x1b,0x08,0x09,0x1c,0x0a,
-				      0x0b,0x1d,0x0c,0x0d,0x1e,0x0e,0x0f,0x1f);
+  perm_rgb_0 = AVV(0x00,0x01,0x10,0x02,0x03,0x11,0x04,0x05,
+		      0x12,0x06,0x07,0x13,0x08,0x09,0x14,0x0a),
+  perm_rgb_1 = AVV(0x0b,0x15,0x0c,0x0d,0x16,0x0e,0x0f,0x17,
+		      0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f),
+  perm_rgb_2 = AVV(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
+		      0x00,0x01,0x18,0x02,0x03,0x19,0x04,0x05),
+  perm_rgb_3 = AVV(0x1a,0x06,0x07,0x1b,0x08,0x09,0x1c,0x0a,
+		      0x0b,0x1d,0x0c,0x0d,0x1e,0x0e,0x0f,0x1f);
 
 #define vec_merge3(x2,x1,x0,y0,y1,y2)    \
 do {					 \
@@ -580,18 +580,18 @@
 // 0123 4567 89ab cdef
 static
 const vector unsigned char
-  demux_u = (const vector unsigned char)AVV(0x10,0x00,0x10,0x00,
-				   0x10,0x04,0x10,0x04,
-				   0x10,0x08,0x10,0x08,
-				   0x10,0x0c,0x10,0x0c),
-  demux_v = (const vector unsigned char)AVV(0x10,0x02,0x10,0x02,
-				   0x10,0x06,0x10,0x06,
-				   0x10,0x0A,0x10,0x0A,
-				   0x10,0x0E,0x10,0x0E),
-  demux_y = (const vector unsigned char)AVV(0x10,0x01,0x10,0x03,
-				   0x10,0x05,0x10,0x07,
-				   0x10,0x09,0x10,0x0B,
-				   0x10,0x0D,0x10,0x0F);
+  demux_u = AVV(0x10,0x00,0x10,0x00,
+		   0x10,0x04,0x10,0x04,
+		   0x10,0x08,0x10,0x08,
+		   0x10,0x0c,0x10,0x0c),
+  demux_v = AVV(0x10,0x02,0x10,0x02,
+		   0x10,0x06,0x10,0x06,
+		   0x10,0x0A,0x10,0x0A,
+		   0x10,0x0E,0x10,0x0E),
+  demux_y = AVV(0x10,0x01,0x10,0x03,
+		   0x10,0x05,0x10,0x07,
+		   0x10,0x09,0x10,0x0B,
+		   0x10,0x0D,0x10,0x0F);
 
 /*
   this is so I can play live CCIR raw video


More information about the MPlayer-dev-eng mailing list