summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authormaurj <[email protected]>2007-05-06 21:32:01 +0000
committermaurj <[email protected]>2007-05-06 21:32:01 +0000
commit1b1c0f9ceaa8b712d5b43056276d7d2f83ca395b (patch)
treec8a8828362ee7b8d595b41007683b5540163d161 /libhb/work.c
parent51f567d40d8706914b4bfca9670f2a8e609aebea (diff)
Updated the input channel layouts to store the source LFE information as well as the non-LFE layout. This is so muxavi.c can output the correct channel count for AC3 passthru for all AC3 sources. Updated Controller.mm, scan.c and work.c to use these revised layouts.
Added a new property to the work object, to remember the source audio codec for audio work objects. This enables encfaac to detect an 6-channel AC3 source to apply the QuickTime 6-channel audio mapping (as opposed to a DTS source, which doesn't need it). Fixed the Dolby Pro Logic I/II downmix mappings in libdca and updated the libdca patch. Uploaded a new set of pre-built darwin contribs (0014) with this patch applied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@570 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 7cdb09fcc..aa7709719 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -255,7 +255,7 @@ static void do_job( hb_job_t * job, int cpu_count )
audio->codec == HB_ACODEC_DCA) && job->acodec == HB_ACODEC_FAAC);
/* find out what the format of our source audio is */
- switch (audio->input_channel_layout) {
+ switch (audio->input_channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK) {
/* mono sources */
case HB_INPUT_CH_LAYOUT_MONO:
@@ -297,14 +297,13 @@ static void do_job( hb_job_t * job, int cpu_count )
/* 3F/2R input */
case HB_INPUT_CH_LAYOUT_3F2R:
- case HB_INPUT_CH_LAYOUT_3F2RLFE:
/* if we've requested a mono mixdown, and it is supported, then do the mix */
/* use dpl2 if not supported */
if (job->audio_mixdowns[i] == HB_AMIXDOWN_MONO && audioCodecsSupportMono == 0) {
job->audio_mixdowns[i] = HB_AMIXDOWN_DOLBYPLII;
} else {
/* check if we have 3F2R input and also have an LFE - i.e. we have a 5.1 source) */
- if (audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2RLFE) {
+ if (audio->input_channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE) {
/* we have a 5.1 source */
/* if we requested 6ch, but our audio format doesn't support it, then mix to DPLII instead */
if (job->audio_mixdowns[i] == HB_AMIXDOWN_6CH && audioCodecsSupport6Ch == 0) {
@@ -383,10 +382,11 @@ static void do_job( hb_job_t * job, int cpu_count )
w = getWork( WORK_DECLPCM );
break;
}
- w->fifo_in = audio->fifo_in;
- w->fifo_out = audio->fifo_raw;
- w->config = &audio->config;
- w->amixdown = audio->amixdown;
+ w->fifo_in = audio->fifo_in;
+ w->fifo_out = audio->fifo_raw;
+ w->config = &audio->config;
+ w->amixdown = audio->amixdown;
+ w->source_acodec = audio->codec;
/* FIXME: This feels really hackish, anything better? */
audio_w = calloc( sizeof( hb_work_object_t ), 1 );
@@ -409,10 +409,11 @@ static void do_job( hb_job_t * job, int cpu_count )
if( job->acodec != HB_ACODEC_AC3 )
{
- w->fifo_in = audio->fifo_sync;
- w->fifo_out = audio->fifo_out;
- w->config = &audio->config;
- w->amixdown = audio->amixdown;
+ w->fifo_in = audio->fifo_sync;
+ w->fifo_out = audio->fifo_out;
+ w->config = &audio->config;
+ w->amixdown = audio->amixdown;
+ w->source_acodec = audio->codec;
/* FIXME: This feels really hackish, anything better? */
audio_w = calloc( sizeof( hb_work_object_t ), 1 );