diff options
author | maurj <[email protected]> | 2007-05-06 21:32:01 +0000 |
---|---|---|
committer | maurj <[email protected]> | 2007-05-06 21:32:01 +0000 |
commit | 1b1c0f9ceaa8b712d5b43056276d7d2f83ca395b (patch) | |
tree | c8a8828362ee7b8d595b41007683b5540163d161 /macosx/Controller.mm | |
parent | 51f567d40d8706914b4bfca9670f2a8e609aebea (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 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index c8311f4e3..871dfae31 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1554,6 +1554,9 @@ return registrationDictionary; /* keep a track of the min and max mixdowns we used, so we can select the best match later */ int minMixdownUsed = 0; int maxMixdownUsed = 0; + + /* get the input channel layout without any lfe channels */ + int layout = audio->input_channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK; /* do we want to add a mono option? */ if (audioCodecsSupportMono == 1) { @@ -1568,8 +1571,7 @@ return registrationDictionary; /* do we want to add a stereo option? */ /* offer stereo if we have a mono source and non-mono-supporting codecs, as otherwise we won't have a mixdown at all */ /* also offer stereo if we have a stereo-or-better source */ - if ((audio->input_channel_layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || - audio->input_channel_layout >= HB_INPUT_CH_LAYOUT_STEREO) { + if ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO) { id<NSMenuItem> menuItem = [[mixdownPopUp menu] addItemWithTitle: [NSString stringWithCString: hb_audio_mixdowns[1].human_readable_name] action: NULL keyEquivalent: @""]; @@ -1579,8 +1581,7 @@ return registrationDictionary; } /* do we want to add a dolby surround (DPL1) option? */ - if (audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F1R || audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2R || - audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2RLFE || audio->input_channel_layout == HB_INPUT_CH_LAYOUT_DOLBY) { + if (layout == HB_INPUT_CH_LAYOUT_3F1R || layout == HB_INPUT_CH_LAYOUT_3F2R || layout == HB_INPUT_CH_LAYOUT_DOLBY) { id<NSMenuItem> menuItem = [[mixdownPopUp menu] addItemWithTitle: [NSString stringWithCString: hb_audio_mixdowns[2].human_readable_name] action: NULL keyEquivalent: @""]; @@ -1590,7 +1591,7 @@ return registrationDictionary; } /* do we want to add a dolby pro logic 2 (DPL2) option? */ - if (audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2R || audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2RLFE) { + if (layout == HB_INPUT_CH_LAYOUT_3F2R) { id<NSMenuItem> menuItem = [[mixdownPopUp menu] addItemWithTitle: [NSString stringWithCString: hb_audio_mixdowns[3].human_readable_name] action: NULL keyEquivalent: @""]; @@ -1600,7 +1601,7 @@ return registrationDictionary; } /* do we want to add a 6-channel discrete option? */ - if (audioCodecsSupport6Ch == 1 && audio->input_channel_layout == HB_INPUT_CH_LAYOUT_3F2RLFE) { + if (audioCodecsSupport6Ch == 1 && layout == HB_INPUT_CH_LAYOUT_3F2R && (audio->input_channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE)) { id<NSMenuItem> menuItem = [[mixdownPopUp menu] addItemWithTitle: [NSString stringWithCString: hb_audio_mixdowns[4].human_readable_name] action: NULL keyEquivalent: @""]; |