[MPlayer-cvslog] r34874 - trunk/sub/spudec.c

reimar subversion at mplayerhq.hu
Mon Apr 23 20:39:16 CEST 2012


Author: reimar
Date: Mon Apr 23 20:39:16 2012
New Revision: 34874

Log:
Use more precise alpha handling for -spuaa 4.

Modified:
   trunk/sub/spudec.c

Modified: trunk/sub/spudec.c
==============================================================================
--- trunk/sub/spudec.c	Mon Apr 23 20:39:14 2012	(r34873)
+++ trunk/sub/spudec.c	Mon Apr 23 20:39:16 2012	(r34874)
@@ -877,9 +877,9 @@ static void sws_spu_image(unsigned char 
 
 	ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
 	sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
-	for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
+	for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i];
 	sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
-	for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0;
+	for (i=ds*dh-1; i>=0; i--) d2[i] = -d2[i];
 	sws_freeContext(ctx);
 }
 


More information about the MPlayer-cvslog mailing list