[Mplayer-cvslog] CVS: main/postproc rgb2rgb.c,1.55,1.56 rgb2rgb_template.c,1.58,1.59 rgb2rgb.h,1.24,1.25 yuv2rgb_mlib.c,1.3,1.4yuv2rgb_template.c,1.11,1.12

Michael Niedermayer CVS michael at mplayerhq.hu
Tue Feb 11 13:58:08 CET 2003


Update of /cvsroot/mplayer/main/postproc
In directory mail:/var/tmp.root/cvs-serv3354

Modified Files:
	rgb2rgb.c rgb2rgb_template.c rgb2rgb.h yuv2rgb_mlib.c 
	yuv2rgb_template.c 
Log Message:
cleanup (unsigned stride -> int stride)


Index: rgb2rgb.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- rgb2rgb.c	6 Nov 2002 23:54:29 -0000	1.55
+++ rgb2rgb.c	11 Feb 2003 12:57:53 -0000	1.56
@@ -716,7 +716,7 @@
  */
 void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
+	int lumStride, int chromStride, int dstStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -737,7 +737,7 @@
  */
 void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
+	int lumStride, int chromStride, int dstStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -759,7 +759,7 @@
  */
 void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -782,7 +782,7 @@
  */
 void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -802,7 +802,7 @@
 void yvu9toyv12(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
 	uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride)
+	int lumStride, int chromStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -840,7 +840,7 @@
  */
 void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -856,8 +856,8 @@
 }
 
 void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst,
-		     unsigned width, unsigned height, unsigned src1Stride,
-		     unsigned src2Stride, unsigned dstStride)
+		     unsigned width, unsigned height, int src1Stride,
+		     int src2Stride, int dstStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	// ordered per speed fasterst first
@@ -875,8 +875,8 @@
 void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2,
 		uint8_t *dst1, uint8_t *dst2,
 		unsigned width, unsigned height,
-		unsigned srcStride1, unsigned srcStride2,
-		unsigned dstStride1, unsigned dstStride2)
+		int srcStride1, int srcStride2,
+		int dstStride1, int dstStride2)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	if(gCpuCaps.hasMMX2)
@@ -893,8 +893,8 @@
 void yvu9_to_yuy2(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
 		uint8_t *dst,
 		unsigned width, unsigned height,
-		unsigned srcStride1, unsigned srcStride2,
-		unsigned srcStride3, unsigned dstStride)
+		int srcStride1, int srcStride2,
+		int srcStride3, int dstStride)
 {
 #ifdef CAN_COMPILE_X86_ASM
 	if(gCpuCaps.hasMMX2)

Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- rgb2rgb_template.c	3 Feb 2003 18:45:25 -0000	1.58
+++ rgb2rgb_template.c	11 Feb 2003 12:57:53 -0000	1.59
@@ -1371,7 +1371,7 @@
 
 static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride, int vertLumPerChroma)
+	int lumStride, int chromStride, int dstStride, int vertLumPerChroma)
 {
 	unsigned y;
 	const unsigned chromWidth= width>>1;
@@ -1463,7 +1463,7 @@
  */
 static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
+	int lumStride, int chromStride, int dstStride)
 {
 	//FIXME interpolate chroma
 	RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2);
@@ -1475,7 +1475,7 @@
  */
 static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
+	int lumStride, int chromStride, int dstStride)
 {
 	RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 1);
 }
@@ -1487,7 +1487,7 @@
  */
 static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 	unsigned y;
 	const unsigned chromWidth= width>>1;
@@ -1607,7 +1607,7 @@
 
 static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
 	uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
-	unsigned int width, unsigned int height, unsigned int lumStride, unsigned int chromStride)
+	unsigned int width, unsigned int height, int lumStride, int chromStride)
 {
 	/* Y Plane */
 	memcpy(ydst, ysrc, width*height);
@@ -1725,7 +1725,7 @@
  */
 static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 	unsigned y;
 	const unsigned chromWidth= width>>1;
@@ -1851,7 +1851,7 @@
  */
 static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
+	int lumStride, int chromStride, int srcStride)
 {
 	unsigned y;
 	const unsigned chromWidth= width>>1;
@@ -2147,8 +2147,8 @@
 }
 
 void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
-			    unsigned width, unsigned height, unsigned src1Stride,
-			    unsigned src2Stride, unsigned dstStride){
+			    unsigned width, unsigned height, int src1Stride,
+			    int src2Stride, int dstStride){
 	unsigned h;
 
 	for(h=0; h < height; h++)
@@ -2230,10 +2230,11 @@
 static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
 			uint8_t *dst1, uint8_t *dst2,
 			unsigned width, unsigned height,
-			unsigned srcStride1, unsigned srcStride2,
-			unsigned dstStride1, unsigned dstStride2)
+			int srcStride1, int srcStride2,
+			int dstStride1, int dstStride2)
 {
-    unsigned y,x,w,h;
+    unsigned int y,x,h;
+    int w;
     w=width/2; h=height/2;
 #ifdef HAVE_MMX
     asm volatile(
@@ -2246,8 +2247,7 @@
 	uint8_t* d=dst1+dstStride1*y;
 	x=0;
 #ifdef HAVE_MMX
-	if(w > 32)
-	for(;x<w;x+=32)
+	for(;x<w-31;x+=32)
 	{
 	    asm volatile(
 		PREFETCH" 32%1\n\t"
@@ -2287,8 +2287,7 @@
 	uint8_t* d=dst2+dstStride2*y;
 	x=0;
 #ifdef HAVE_MMX
-	if(w > 32)
-	for(;x<w;x+=32)
+	for(;x<w-31;x+=32)
 	{
 	    asm volatile(
 		PREFETCH" 32%1\n\t"
@@ -2335,8 +2334,8 @@
 static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
 			uint8_t *dst,
 			unsigned width, unsigned height,
-			unsigned srcStride1, unsigned srcStride2,
-			unsigned srcStride3, unsigned dstStride)
+			int srcStride1, int srcStride2,
+			int srcStride3, int dstStride)
 {
     unsigned y,x,x2,w,h;
     w=width/2; h=height;

Index: rgb2rgb.h
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- rgb2rgb.h	22 Sep 2002 02:33:28 -0000	1.24
+++ rgb2rgb.h	11 Feb 2003 12:57:53 -0000	1.25
@@ -52,33 +52,33 @@
 
 extern void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride);
+	int lumStride, int chromStride, int dstStride);
 extern void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int dstStride);
+	int lumStride, int chromStride, int dstStride);
 extern void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
+	int lumStride, int chromStride, int srcStride);
 extern void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
 	unsigned int width, unsigned int height,
-	unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
+	int lumStride, int chromStride, int srcStride);
 extern void planar2x(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
 
 extern void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst,
-			    unsigned width, unsigned height, unsigned src1Stride,
-			    unsigned src2Stride, unsigned dstStride);
+			    unsigned width, unsigned height, int src1Stride,
+			    int src2Stride, int dstStride);
 
 extern void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2,
 			uint8_t *dst1, uint8_t *dst2,
 			unsigned width, unsigned height,
-			unsigned srcStride1, unsigned srcStride2,
-			unsigned dstStride1, unsigned dstStride2);
+			int srcStride1, int srcStride2,
+			int dstStride1, int dstStride2);
 
 extern void yvu9_to_yuy2(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
 			uint8_t *dst,
 			unsigned width, unsigned height,
-			unsigned srcStride1, unsigned srcStride2,
-			unsigned srcStride3, unsigned dstStride);
+			int srcStride1, int srcStride2,
+			int srcStride3, int dstStride);
 	
 
 #define MODE_RGB  0x1
@@ -87,7 +87,7 @@
 typedef void (* yuv2rgb_fun) (uint8_t * image, uint8_t * py,
 			      uint8_t * pu, uint8_t * pv,
 			      unsigned h_size, unsigned v_size,
-			      unsigned rgb_stride, unsigned y_stride, unsigned uv_stride);
+			      int rgb_stride, int y_stride, int uv_stride);
 
 extern yuv2rgb_fun yuv2rgb;
 

Index: yuv2rgb_mlib.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/yuv2rgb_mlib.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- yuv2rgb_mlib.c	22 Jun 2002 08:49:45 -0000	1.3
+++ yuv2rgb_mlib.c	11 Feb 2003 12:57:53 -0000	1.4
@@ -30,7 +30,7 @@
 static void mlib_YUV2ARGB420_32(uint8_t* image, uint8_t* py, 
 			 uint8_t* pu, uint8_t* pv, 
 			 unsigned h_size, unsigned v_size, 
-			 unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			 int rgb_stride, int y_stride, int uv_stride)
 {
   mlib_VideoColorYUV2ARGB420(image, py, pu, pv, h_size,
 			     v_size, rgb_stride, y_stride, uv_stride);
@@ -39,7 +39,7 @@
 static void mlib_YUV2ABGR420_32(uint8_t* image, uint8_t* py, 
 			 uint8_t* pu, uint8_t* pv, 
 			 unsigned h_size, unsigned v_size, 
-			 unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			 int rgb_stride, int y_stride, int uv_stride)
 {
   mlib_VideoColorYUV2ABGR420(image, py, pu, pv, h_size,
 			     v_size, rgb_stride, y_stride, uv_stride);
@@ -48,7 +48,7 @@
 static void mlib_YUV2RGB420_24(uint8_t* image, uint8_t* py, 
 			 uint8_t* pu, uint8_t* pv, 
 			 unsigned h_size, unsigned v_size, 
-			 unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			 int rgb_stride, int y_stride, int uv_stride)
 {
   mlib_VideoColorYUV2RGB420(image, py, pu, pv, h_size,
 			    v_size, rgb_stride, y_stride, uv_stride);

Index: yuv2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/yuv2rgb_template.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- yuv2rgb_template.c	22 Jun 2002 08:49:45 -0000	1.11
+++ yuv2rgb_template.c	11 Feb 2003 12:57:53 -0000	1.12
@@ -124,7 +124,7 @@
 static inline void RENAME(yuv420_rgb16) (uint8_t * image, uint8_t * py,
 			      uint8_t * pu, uint8_t * pv,
 			      unsigned h_size, unsigned v_size,
-			      unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			      int rgb_stride, int y_stride, int uv_stride)
 {
     int even = 1;
     int x, y;
@@ -229,7 +229,7 @@
 static inline void RENAME(yuv420_rgb15) (uint8_t * image, uint8_t * py,
 			      uint8_t * pu, uint8_t * pv,
 			      unsigned h_size, unsigned v_size,
-			      unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			      int rgb_stride, int y_stride, int uv_stride)
 {
     int even = 1;
     int x, y;
@@ -330,7 +330,7 @@
 static inline void RENAME(yuv420_rgb24) (uint8_t * image, uint8_t * py,
 			      uint8_t * pu, uint8_t * pv,
 			      unsigned h_size, unsigned v_size,
-			      unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			      int rgb_stride, int y_stride, int uv_stride)
 {
     int even = 1;
     int x, y;
@@ -489,7 +489,7 @@
 static inline void RENAME(yuv420_argb32) (uint8_t * image, uint8_t * py,
 			       uint8_t * pu, uint8_t * pv,
 			       unsigned h_size, unsigned v_size,
-			       unsigned rgb_stride, unsigned y_stride, unsigned uv_stride)
+			       int rgb_stride, int y_stride, int uv_stride)
 {
     int even = 1;
     int x, y;



More information about the MPlayer-cvslog mailing list