summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-06-18 21:11:48 +0000
committerRodeo <[email protected]>2012-06-18 21:11:48 +0000
commitfc3e44b2ba28772fa559d39bd57b7a595a83292f (patch)
tree738449c393dcd8da6edf6881e53353b35e5c47b8 /libhb/decavcodec.c
parent510564b19b5a6d7ac77091cd02ec9c557941399f (diff)
libhb: drop HB_INPUT_CH_LAYOUT_*
AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 527b5791f..8a236ca4a 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -212,24 +212,22 @@ static int decavcodecaInit( hb_work_object_t * w, hb_job_t * job )
}
// DTS: work around lack of 6.0/6.1 support in libhb
- if( hb_ff_dts_disable_xch( pv->context ) )
+ if (hb_ff_dts_disable_xch(pv->context))
{
- hb_deep_log( 2, "decavcodecaInit: found DTS-ES, requesting DTS core" );
+ hb_deep_log(2, "decavcodecaInit: found DTS-ES, requesting DTS core");
}
- else if( ( !pv->context->channels || !pv->context->channel_layout ) &&
- ( w->audio->config.in.codec == HB_ACODEC_DCA_HD ) &&
- ( ( w->audio->config.in.channel_layout & ~HB_INPUT_CH_LAYOUT_HAS_LFE ) == HB_INPUT_CH_LAYOUT_3F2R ) )
+ else if ((!pv->context->channels || !pv->context->channel_layout) &&
+ (w->audio->config.in.codec == HB_ACODEC_DCA_HD) &&
+ ((w->audio->config.in.channel_layout & ~AV_CH_LOW_FREQUENCY) == AV_CH_LAYOUT_5POINT0))
{
/* XXX: when we are demuxing the stream ourselves, it seems we have no
* channel count/layout info in the context until we decode audio for
* the first time. If the scan info says the source is 5.0 or 5.1,
* make sure XCh processing is disabled in Libav before decoding. */
pv->context->request_channels = pv->context->channels =
- HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT( w->audio->config.in.channel_layout );
- pv->context->channel_layout = AV_CH_LAYOUT_5POINT0;
- if( w->audio->config.in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE )
- pv->context->channel_layout |= AV_CH_LOW_FREQUENCY;
- hb_deep_log( 2, "decavcodecaInit: scan detected DTS 5.0/5.1, disabling XCh processing" );
+ av_get_channel_layout_nb_channels(w->audio->config.in.channel_layout);
+ pv->context->channel_layout = w->audio->config.in.channel_layout;
+ hb_deep_log(2, "decavcodecaInit: scan detected DTS 5.0/5.1, disabling XCh processing");
}
if ( w->audio != NULL )