diff options
author | Rodeo <[email protected]> | 2012-09-07 18:15:22 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-09-07 18:15:22 +0000 |
commit | f5bd3741a9df3d157a223650740bc0510cf1e18a (patch) | |
tree | bbd882a80ea3d5a8480f57220ffe429e8dc5da05 | |
parent | 772f360f99b3de05477a2f888cfd99fefbc1f2de (diff) |
Update Libav -> HandBrake colorimetry translation after http://git.libav.org/?p=libav.git;a=commit;h=ca93f0fa361c302e60455c5b82f88422ab66f589
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4932 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decavcodec.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index a5312273d..783342a44 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1317,14 +1317,16 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) } } - /* AVCOL_TRC_BT709 -> HB_COLR_TRA_BT709 - * AVCOL_TRC_GAMMA22 (bt470m) -> HB_COLR_TRA_BT709 - * AVCOL_TRC_GAMMA28 (bt470bg) -> HB_COLR_TRA_BT709 - * AVCOL_TRC_UNSPECIFIED, AVCOL_TRC_NB: - * -> ITU BT.709 -> HB_COLR_TRA_BT709 - * -> ITU BT.601 -> HB_COLR_TRA_BT709 - * TODO: AVCOL_TRC_SMPTE240M -> HB_COLR_TRA_SMPTE240M but it's not yet in Libav */ - info->color_transfer = HB_COLR_TRA_BT709; + switch( pv->context->color_trc ) + { + case AVCOL_TRC_SMPTE240M: + info->color_transfer = HB_COLR_TRA_SMPTE240M; + break; + default: + // ITU BT.601, BT.709, anything else + info->color_transfer = HB_COLR_TRA_BT709; + break; + } switch( pv->context->colorspace ) { |