mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
less weird OSD alpha transformation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16273 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f37f504f2a
commit
77ec0f850d
@ -331,8 +331,10 @@ static void create_osd_texture(int x0, int y0, int w, int h,
|
||||
{
|
||||
int i;
|
||||
char *tmp = (char *)malloc(stride * h);
|
||||
for (i = 0; i < h * stride; i++)
|
||||
tmp[i] = ~(-srca[i]);
|
||||
// convert alpha from weird MPlayer scale.
|
||||
// in-place is not possible since it is reused for future OSDs
|
||||
for (i = h * stride; i; i--)
|
||||
tmp[i] = srca[i] - 1;
|
||||
glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride,
|
||||
0, 0, w, h, 0);
|
||||
free(tmp);
|
||||
|
Loading…
Reference in New Issue
Block a user