From 8d9969febdcec59fee453888ed0bb6a64adf7679 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Mon, 3 Sep 2012 12:37:16 +0000 Subject: Audio improvements. New supported samplerates: 8, 11.025, 12, 16 kHz. Now 8, 11.025, 12, 16, 22.05, 24, 42, 44.1, 48 Khz are supported. Unsupported samplerates are sanitized to the closest samplerate for all encoders. Samplerates < 32 kHz are now forbidden for AC3 encoding (sanitized to 32 kHz). Most AC3 decoders don't support such samplerates. New upmixing: 3.0 (Front Left, Right & Center) can now be upmixed to 5.1 to preserve the center channel. New mixdowns: 6.1 (Front Left, Right & Center, Surround Left, Right & Center, LFE) 7.1 (Front Left, Right & Center, Surround Left & Right, Rear Left & Right, LFE) -> available to Vorbis & FLAC encoders for compatible input channel layouts 7.1 (Front Left, Right & Center, Front Left & Right of Center, Surround Left & Right, LFE) -> available to AAC encoders (ca_aac, ca_haac, faac) for compatible input channel layouts Mono (Left Only): Stereo to Mono by discarding the Right channel Mono (Right Only): Stereo to Mono by discarding the Left channel -> available to all encoders for non-Dolby Stereo input The "6-channel discrete" mixdown becomes "5.1 Channels". New bitrates: 960 - 1536 Kbps. This lets users work around poor audio quality in crappy encoders by throwing more bits at them. Bitrate limits have been re-worked and re-tested for all encoders. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4930 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBAudio.m | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'macosx/HBAudio.m') diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index 8a5f06291..fdd7b5462 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -224,37 +224,19 @@ static NSMutableArray *masterBitRateArray = nil; { NSMutableArray *permittedMixdowns = [NSMutableArray array]; NSDictionary *dict; - BOOL shouldAdd; int currentMixdown; unsigned long long channelLayout = [[track objectForKey: keyAudioInputChannelLayout] unsignedLongLongValue]; unsigned int count = [masterMixdownArray count]; int codecCodec = [[codec objectForKey: keyAudioCodec] intValue]; int theDefaultMixdown = hb_get_default_mixdown(codecCodec, channelLayout); - int theBestMixdown = hb_get_best_mixdown(codecCodec, channelLayout, HB_INVALID_AMIXDOWN); for (unsigned int i = 0; i < count; i++) { dict = [masterMixdownArray objectAtIndex: i]; currentMixdown = [[dict objectForKey: keyAudioMixdown] intValue]; - // Basically with the way the mixdowns are stored, the assumption from the libhb point of view - // currently is that all mixdowns from the best down to mono are supported. - if ((currentMixdown != HB_AMIXDOWN_NONE) && (currentMixdown <= theBestMixdown)) - { - shouldAdd = YES; - } - else if ((currentMixdown == HB_AMIXDOWN_NONE) && (codecCodec & HB_ACODEC_PASS_FLAG)) - { - // "None" mixdown (passthru) - shouldAdd = YES; - } - else - { - shouldAdd = NO; - } - - if (shouldAdd) + if (hb_mixdown_is_supported(currentMixdown, codecCodec, channelLayout)) { [permittedMixdowns addObject: dict]; } -- cgit v1.2.3