[Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.87,1.88 vo_x11.c,1.126,1.127

Michael Niedermayer CVS michael at mplayerhq.hu
Sun Feb 23 23:05:58 CET 2003


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

Modified Files:
	vo_vesa.c vo_x11.c 
Log Message:
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines


Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- vo_vesa.c	9 Feb 2003 20:18:23 -0000	1.87
+++ vo_vesa.c	23 Feb 2003 22:05:55 -0000	1.88
@@ -95,7 +95,7 @@
 static uint32_t srcW=0,srcH=0,srcBpp,srcFourcc; /* source image description */
 static uint32_t dstBpp,dstW, dstH,dstFourcc; /* destinition image description */
 
-static SwsContext * sws = NULL;
+static struct SwsContext * sws = NULL;
 
 static int32_t x_offset,y_offset; /* to center image on screen */
 static unsigned init_mode=0; /* mode before run of mplayer */
@@ -161,7 +161,7 @@
   if(HAS_DGA()) vbeUnmapVideoBuffer((unsigned long)win.ptr,win.high);
   if(dga_buffer && !HAS_DGA()) free(dga_buffer);
   vbeDestroy();
-  if(sws) freeSwsContext(sws);
+  if(sws) sws_freeContext(sws);
   sws=NULL;
 }
 
@@ -278,7 +278,7 @@
     dstStride[1]=
     dstStride[2]=dstStride[0]>>1;
     if(HAS_DGA()) dst[0] += y_offset*SCREEN_LINE_SIZE(PIXEL_SIZE())+x_offset*PIXEL_SIZE();
-    sws->swScale(sws,image,stride,y,h,dst,dstStride);
+    sws_scale(sws,image,stride,y,h,dst,dstStride);
     flip_trigger = 1;
     return 0;
 }
@@ -423,7 +423,7 @@
 	else
 	    srcStride[0] = srcW*2;
 	if(HAS_DGA()) dst[0] += y_offset*SCREEN_LINE_SIZE(PIXEL_SIZE())+x_offset*PIXEL_SIZE();
-	sws->swScale(sws,src,srcStride,0,srcH,dst,dstStride);
+	sws_scale(sws,src,srcStride,0,srcH,dst,dstStride);
 	flip_trigger=1;
     }
     return 0;
@@ -800,7 +800,7 @@
 #endif
 		) 
 		{
-		    sws = getSwsContextFromCmdLine(srcW,srcH,srcFourcc,dstW,dstH,dstFourcc);
+		    sws = sws_getContextFromCmdLine(srcW,srcH,srcFourcc,dstW,dstH,dstFourcc);
 		    if(!sws)
 		    {
 			printf("vo_vesa: Can't initialize SwScaler\n");

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- vo_x11.c	4 Feb 2003 18:31:44 -0000	1.126
+++ vo_x11.c	23 Feb 2003 22:05:55 -0000	1.127
@@ -23,6 +23,7 @@
 #include "sub.h"
 
 #include "../postproc/swscale.h"
+#include "../postproc/swscale_internal.h" //FIXME
 #include "../postproc/rgb2rgb.h"
 
 #include "../mp_msg.h"
@@ -371,7 +372,7 @@
   if ( myximage )
    {
     freeMyXImage();
-    freeSwsContext(swsContext);
+    sws_freeContext(swsContext);
    }
   getMyXImage();
   
@@ -397,7 +398,7 @@
   }
 
   /* always allocate swsContext as size could change between frames */
-  swsContext= getSwsContextFromCmdLine(width, height, in_format, width, height, out_format );
+  swsContext= sws_getContextFromCmdLine(width, height, in_format, width, height, out_format );
 
   //printf( "X11 bpp: %d  color mask:  R:%lX  G:%lX  B:%lX\n",bpp,myximage->red_mask,myximage->green_mask,myximage->blue_mask );
 
@@ -482,7 +483,7 @@
 
     if(sws_flags==0) newW&= (~31); // not needed but, if the user wants the FAST_BILINEAR SCALER, then its needed
 
-    swsContext= getSwsContextFromCmdLine(srcW, srcH, in_format, 
+    swsContext= sws_getContextFromCmdLine(srcW, srcH, in_format, 
     					 newW, newH, out_format);
     if(swsContext)
     {
@@ -491,7 +492,7 @@
 
 	freeMyXImage();
 	getMyXImage();
-	freeSwsContext(oldContext);
+	sws_freeContext(oldContext);
     }    
     else
     {
@@ -507,13 +508,13 @@
   {
 	dstStride[0]= -image_width*((bpp+7)/8);
 	dst[0]=ImageData - dstStride[0]*(image_height-1);
-	swsContext->swScale(swsContext,src,stride,y,h,dst, dstStride);
+	sws_scale(swsContext,src,stride,y,h,dst, dstStride);
   }
   else
   {
 	dstStride[0]=image_width*((bpp+7)/8);
 	dst[0]=ImageData;
-	swsContext->swScale(swsContext,src,stride,y,h,dst, dstStride);
+	sws_scale(swsContext,src,stride,y,h,dst, dstStride);
   }
   return 0;
 }
@@ -609,7 +610,7 @@
  zoomFlag=0;
  vo_x11_uninit();
 
- freeSwsContext(swsContext);
+ sws_freeContext(swsContext);
 }
 
 static uint32_t preinit(const char *arg)



More information about the MPlayer-cvslog mailing list