Mercurial > mplayer.hg
diff vobsub.c @ 25289:4bbc9ad3124c
Restore y of palette into the same value range as it was in the .ifo file.
author | ulion |
---|---|
date | Sat, 08 Dec 2007 02:38:02 +0000 |
parents | 80804f0631f4 |
children | a6a49a7a4be0 |
line wrap: on
line diff
--- a/vobsub.c Fri Dec 07 15:30:12 2007 +0000 +++ b/vobsub.c Sat Dec 08 02:38:02 2007 +0000 @@ -825,6 +825,7 @@ y = av_clip_uint8( 0.1494 * r + 0.6061 * g + 0.2445 * b); u = av_clip_uint8( 0.6066 * r - 0.4322 * g - 0.1744 * b + 128); v = av_clip_uint8(-0.08435 * r - 0.3422 * g + 0.4266 * b + 128); + y = y * 219 / 255 + 16; vob->palette[n++] = y << 16 | u << 8 | v; if (n == 16) break;