[Mplayer-cvslog] CVS: main spudec.c,1.4,1.5
pl
pl at mplayer.dev.hu
Tue Nov 20 22:45:15 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv16105
Modified Files:
spudec.c
Log Message:
subtitles looked bad here (inverted colors sometimes)
looked like values wrapped around the byte
(not sure of the side effects but subtitles look good now)
Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- spudec.c 20 Nov 2001 18:36:07 -0000 1.4
+++ spudec.c 20 Nov 2001 21:45:07 -0000 1.5
@@ -153,7 +153,11 @@
len = this->width - x;
/* FIXME have to use palette and alpha map*/
memset(this->image + y * this->width + x, cmap[color], len);
- memset(this->aimage + y * this->width + x, alpha[color], len);
+ if (alpha[color] < cmap[color]) {
+ memset(this->aimage + y * this->width + x, 1, len);
+ } else {
+ memset(this->aimage + y * this->width + x, alpha[color] - cmap[color], len);
+ }
x += len;
if (x >= this->width) {
next_line(this);
More information about the MPlayer-cvslog
mailing list