diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-04-23 18:39:16 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 03:34:38 +0200 |
commit | 97f0ed25ed9e50f61167e38414777525c5db063e (patch) | |
tree | e004b0aebbc93b6d1e423ba12533af36936b24f3 /sub | |
parent | 37901469827efed4b13fec40644d6b2de65b0639 (diff) | |
download | mpv-97f0ed25ed9e50f61167e38414777525c5db063e.tar.bz2 mpv-97f0ed25ed9e50f61167e38414777525c5db063e.tar.xz |
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
Diffstat (limited to 'sub')
-rw-r--r-- | sub/spudec.c | 4 |
1 files 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); } |