diff options
author | jbrjake <[email protected]> | 2008-10-19 23:39:52 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2008-10-19 23:39:52 +0000 |
commit | d83151d2858999d5ae7b491cf9b282aeb9dfd7b7 (patch) | |
tree | 1e3e8f5bef10d930bd9e71bcf5f0f201cea25c7f /libhb/muxmp4.c | |
parent | d235fedfc43b5b736806b4e072c11c803c2804ca (diff) |
Adds a configuration option for whether the COLR atom and h.264 VUI header should signal Bt.601 or Bt.7709 color, instead of just setting it based on whether the source is standard or high definition (which is preserved as default, and made more sensitive to letterboxed HD content).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1851 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r-- | libhb/muxmp4.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index a6ddedf5d..dfee48c54 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -251,10 +251,21 @@ static int MP4Init( hb_mux_object_t * m ) // Per the notes at: // http://developer.apple.com/quicktime/icefloe/dispatch019.html#colr // http://forum.doom9.org/showthread.php?t=133982#post1090068 + // the user can set it from job->color_matrix, otherwise by default // we say anything that's likely to be HD content is ITU BT.709 and // DVD, SD TV & other content is ITU BT.601. We look at the title height // rather than the job height here to get uncropped input dimensions. - if ( job->title->height >= 720 ) + if( job->color_matrix == 1 ) + { + // ITU BT.601 DVD or SD TV content + MP4AddColr(m->file, mux_data->track, 6, 1, 6); + } + else if( job->color_matrix == 2 ) + { + // ITU BT.709 HD content + MP4AddColr(m->file, mux_data->track, 1, 1, 1); + } + else if ( job->title->width >= 1280 || job->title->height >= 720 ) { // we guess that 720p or above is ITU BT.709 HD content MP4AddColr(m->file, mux_data->track, 1, 1, 1); |