[MPlayer-dev-eng] [PATCH] bugfix for black bar besides gaussed vobsubs
Csillag Kristof
fenwick at freemail.hu
Sat Jan 8 20:02:06 CET 2005
2005-01-08, szo keltezéssel 13.25-kor D Richard Felker III ezt írta:
> > > I dunno, if you have a way that works it's ok, but my code is correct
> > > and not slow anyway.
> >
> > Huh? And what about that black stripe then? That's intended??? Or what
> > do you mean?
>
> I just mean the (s2[i] - 1) ^ 255 thing. Obviously the black stripe is
> wrong and needs to be fixed.
No offense, just for the record:
Your code was this:
for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
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;
The (s2[i] - 1) ^ 255 thing was written by me (and is obsolated by now),
and with that the black stripe thing is already corrected.
Kristof
ps. The latest version, as sent in the patch is:
for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i];
// Invert alpha values 1-255, leave 0 in place
sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
for (i=ds*dh-1; i>=0; i--) d2[i] = -d2[i];
// Re-invert alpha values (back to original)
--
Csillag Kristof <fenwick at freemail.hu>
More information about the MPlayer-dev-eng
mailing list