diff options
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); |