libspark/libeplayer: rudimentary subtitle support, probably unstable

This commit is contained in:
martii
2012-11-04 15:39:48 +01:00
parent 986b39c04e
commit 41daed4748
3 changed files with 50 additions and 0 deletions

View File

@@ -162,6 +162,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;
@@ -169,6 +178,7 @@ static int writeData(void* _call)
t = *dst;
*dst++ = (k*r + ck*t) / 255;
*dst++ = 0;
#endif
}
dst += dst_delta;