From 97f0ed25ed9e50f61167e38414777525c5db063e Mon Sep 17 00:00:00 2001 From: mplayer-svn Date: Mon, 23 Apr 2012 18:39:16 +0000 Subject: spudec: use more precise alpha handling for -spuaa 4 Use more precise alpha handling for -spuaa 4. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34874 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar --- sub/spudec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sub/spudec.c b/sub/spudec.c index 33a5aabba1..82e8f2f793 100644 --- a/sub/spudec.c +++ b/sub/spudec.c @@ -873,9 +873,9 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, 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,(const uint8_t **)&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); } -- cgit v1.2.3