diff options
author | Rodeo <[email protected]> | 2012-08-10 17:01:46 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-08-10 17:01:46 +0000 |
commit | 8c2ea6d8db7fafaf89273394d85b3f9a06df4d9c (patch) | |
tree | 1577897734b1154f365292e38a0c6b6fe5b23ffa /libhb/decavcodec.c | |
parent | bae8654397e1402fa4b9f1d4df31f5fb08317da5 (diff) |
Restore the old hack that disables DTS-ES extension processing. We support 6.1 now, but libavcodec's assembly optimizations are buggy under Win64, causing audio distortion when canceling the matrixed Cs channel out of Ls and Rs.
This can be removed when the bugs are fixed.
Note: unlike before, we still present the stream as 6.0/6.1 to users; it simplfies the code and doesn't make much difference since we always downmix to at least 5.1 anyway.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4896 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 5dc3b75b5..3ea41df23 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -221,6 +221,18 @@ static int decavcodecaInit( hb_work_object_t * w, hb_job_t * job ) hb_log( "decavcodecaInit: avcodec_open failed" ); return 1; } + /* Libav's ff_vector_fmac_scalar_*() asm functions are buggy under Win64 + * we can't let it decode the DTS-ES XCh extension until this is fixed + * + * Note: the DTS decoder doesn't support request_channels changing + * mid-stream, so we must do this here */ + if ((w->codec_param == CODEC_ID_DTS) && + (w->audio->config.in.channel_layout & ~AV_CH_LOW_FREQUENCY) == AV_CH_LAYOUT_6POINT0) + { + hb_deep_log(2, "decavcodecaInit: disabling DTS-ES XCh extension processing"); + pv->context->request_channels = + 5 + !!(w->audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY); + } return 0; } |