diff options
author | dynaflash <[email protected]> | 2010-05-20 15:28:27 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-05-20 15:28:27 +0000 |
commit | 5c0877e87e58f15cf5fe86c43afaad0778a8817d (patch) | |
tree | 6100ce310d0bedebcc3c1bf50883ab2365f846e0 /libhb/muxmkv.c | |
parent | f6b620012c27bc2858ea0ad198bd3edf34965ca3 (diff) |
Support for reading VOB subtitle tracks from file inputs initital implementation.
- Patch by davidfstr, Nice Work!
- Adds support for reading VOB subtitle tracks from file inputs.
Tested with:
- MKV VOB -> MKV VOB passthru.
- MKV VOB -> MKV VOB burned in.
VOB subtitle palette moved from per-title to per-track.
Discussion leading up to commit can be referenced here: http://forum.handbrake.fr/viewtopic.php?f=4&t=16267
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3308 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmkv.c')
-rw-r--r-- | libhb/muxmkv.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c index d30e7c01d..8fcd30b82 100644 --- a/libhb/muxmkv.c +++ b/libhb/muxmkv.c @@ -34,27 +34,6 @@ struct hb_mux_data_s int sub_format; }; -static int yuv2rgb(int yuv) -{ - double y, Cr, Cb; - int r, g, b; - - y = (yuv >> 16) & 0xff; - Cb = (yuv >> 8) & 0xff; - Cr = (yuv ) & 0xff; - - r = 1.164 * (y - 16) + 2.018 * (Cb - 128); - g = 1.164 * (y - 16) - 0.813 * (Cr - 128) - 0.391 * (Cb - 128); - b = 1.164 * (y - 16) + 1.596 * (Cr - 128); - r = (r < 0) ? 0 : r; - g = (g < 0) ? 0 : g; - b = (b < 0) ? 0 : b; - r = (r > 255) ? 255 : r; - g = (g > 255) ? 255 : g; - b = (b > 255) ? 255 : b; - return (r << 16) | (g << 8) | b; -} - /********************************************************************** * MKVInit ********************************************************************** @@ -296,7 +275,7 @@ static int MKVInit( hb_mux_object_t * m ) case PICTURESUB: track->codecID = MK_SUBTITLE_VOBSUB; for (j = 0; j < 16; j++) - rgb[j] = yuv2rgb(title->palette[j]); + rgb[j] = hb_yuv2rgb(subtitle->palette[j]); len = snprintf(subidx, 2048, subidx_fmt, title->width, title->height, 0, 0, "OFF", |