libspark/libeplayer: rudimentary subtitle support, probably unstable

This commit is contained in:
martii
2012-11-04 15:39:48 +01:00
committed by Stefan Seyfried
parent 1cc9619c49
commit f0446eeeb2
3 changed files with 50 additions and 0 deletions

View File

@@ -163,6 +163,15 @@ static int writeData(void* _call)
{
k = ((unsigned)src[x]) * opacity / 255;
ck = 255 - k;
#ifdef MARTII // or __sh__, or !HAVE_TRIPLEDRAGON
*dst++ = 0;
t = *dst;
*dst++ = (k*r + ck*t) / 255;
t = *dst;
*dst++ = (k*b + ck*t) / 255;
t = *dst;
*dst++ = (k*g + ck*t) / 255;
#else
t = *dst;
*dst++ = (k*b + ck*t) / 255;
t = *dst;
@@ -170,6 +179,7 @@ static int writeData(void* _call)
t = *dst;
*dst++ = (k*r + ck*t) / 255;
*dst++ = 0;
#endif
}
dst += dst_delta;