[MPlayer-cvslog] CVS: main/libvo vo_gl.c,1.88,1.89

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Aug 19 14:23:37 CEST 2005


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	vo_gl.c 
Log Message:
less weird OSD alpha transformation.


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- vo_gl.c	19 Aug 2005 12:16:52 -0000	1.88
+++ vo_gl.c	19 Aug 2005 12:23:34 -0000	1.89
@@ -331,8 +331,10 @@
   {
   int i;
   char *tmp = (char *)malloc(stride * h);
-  for (i = 0; i < h * stride; i++)
-    tmp[i] = ~(-srca[i]);
+  // convert alpha from weird MPlayer scale.
+  // in-place is not possible since it is reused for future OSDs
+  for (i = h * stride; i; i--)
+    tmp[i] = srca[i] - 1;
   glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride,
               0, 0, w, h, 0);
   free(tmp);




More information about the MPlayer-cvslog mailing list