mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Fix brightness of subtitles
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4123 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3b008ce8cf
commit
de72dd5aff
6
spudec.c
6
spudec.c
@ -116,9 +116,9 @@ static void spudec_process_data(spudec_handle_t *this)
|
||||
if (alpha[i] == 0)
|
||||
cmap[i] = 0;
|
||||
else {
|
||||
cmap[i] = ((this->global_palette[this->palette[i]] >> 16) & 0xff) - alpha[i];
|
||||
if (cmap[i] < 0)
|
||||
cmap[i] = 0;
|
||||
cmap[i] = ((this->global_palette[this->palette[i]] >> 16) & 0xff);
|
||||
if (cmap[i] + alpha[i] > 255)
|
||||
cmap[i] = 256 - alpha[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user