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/encx264.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/encx264.c')
-rw-r--r-- | libhb/encx264.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c index 4a831ba38..0e3edd040 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -195,8 +195,21 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) /* set up the VUI color model & gamma to match what the COLR atom * set in muxmp4.c says. See libhb/muxmp4.c for notes. */ - - if ( job->title->height >= 720 ) + if( job->color_matrix == 1 ) + { + // ITU BT.601 DVD or SD TV content + param.vui.i_colorprim = 6; + param.vui.i_transfer = 1; + param.vui.i_colmatrix = 6; + } + else if( job->color_matrix == 2 ) + { + // ITU BT.709 HD content + param.vui.i_colorprim = 1; + param.vui.i_transfer = 1; + param.vui.i_colmatrix = 1; + } + else if ( job->title->width >= 1280 || job->title->width >= 720 ) { // we guess that 720p or above is ITU BT.709 HD content param.vui.i_colorprim = 1; |