[Mplayer-cvslog] CVS: main/libvo osd_template.c,1.20,1.21

Nicolas Plourde CVS syncmail at mplayerhq.hu
Mon May 31 17:13:38 CEST 2004


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv26753/libvo

Modified Files:
	osd_template.c 
Log Message:
draw alpha for uyvy

Index: osd_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/osd_template.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- osd_template.c	3 Aug 2003 18:33:28 -0000	1.20
+++ osd_template.c	31 May 2004 15:13:35 -0000	1.21
@@ -160,6 +160,30 @@
     return;
 }
 
+static inline void RENAME(vo_draw_alpha_uyvy)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
+  int y;
+#if defined(FAST_OSD)
+  w=w>>1;
+#endif
+  for(y=0;y<h;y++){
+    register int x;
+    for(x=0;x<w;x++){
+#ifdef FAST_OSD
+      if(srca[2*x+0]) dstbase[4*x+2]=src[2*x+0];
+      if(srca[2*x+1]) dstbase[4*x+0]=src[2*x+1];
+#else
+      if(srca[x]) {
+	dstbase[2*x+1]=((dstbase[2*x+1]*srca[x])>>8)+src[x];
+	dstbase[2*x]=((((signed)dstbase[2*x]-128)*srca[x])>>8)+128;
+      }
+#endif
+    }
+    src+=srcstride;
+    srca+=srcstride;
+    dstbase+=dststride;
+  }
+}
+
 static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
     int y;
     for(y=0;y<h;y++){




More information about the MPlayer-cvslog mailing list