summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-12-18 09:43:21 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2013-12-27 09:54:14 -0800
commitc21623371d947b2c0bf9c4029bcc8d33c590a8ef (patch)
tree3ee14a53e99d92e1e9eac455b64bc69dcd4c8eaf /media/libstagefright/codecs
parent554a69a80db4a1f146f53d5ab525cc74c7b64330 (diff)
downloadframeworks_av-c21623371d947b2c0bf9c4029bcc8d33c590a8ef.zip
frameworks_av-c21623371d947b2c0bf9c4029bcc8d33c590a8ef.tar.gz
frameworks_av-c21623371d947b2c0bf9c4029bcc8d33c590a8ef.tar.bz2
Update AAC decoder wrapper to latest FDK API for output channel count
Rename decoder parameter for the maximum number of PCM output channels, according to FDK AAC decoder interface, as defined in aacdecoder_lib.h Bug 9428126 Change-Id: I2f0f6ca848bdbc8657d8dea589b03238245c0eaf
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
index f842e27..2f5eff4 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
@@ -30,7 +30,7 @@
#define DRC_DEFAULT_MOBILE_REF_LEVEL 64 /* 64*-0.25dB = -16 dB below full scale for mobile conf */
#define DRC_DEFAULT_MOBILE_DRC_CUT 127 /* maximum compression of dynamic range for mobile conf */
#define DRC_DEFAULT_MOBILE_DRC_BOOST 127 /* maximum compression of dynamic range for mobile conf */
-#define MAX_CHANNEL_COUNT 6 /* maximum number of audio channels that can be decoded */
+#define MAX_CHANNEL_COUNT 8 /* maximum number of audio channels that can be decoded */
// names of properties that can be used to override the default DRC settings
#define PROP_DRC_OVERRIDE_REF_LEVEL "aac_drc_reference_level"
#define PROP_DRC_OVERRIDE_CUT "aac_drc_cut"
@@ -296,8 +296,11 @@ void SoftAAC2::maybeConfigureDownmix() const {
if (!(property_get("media.aac_51_output_enabled", value, NULL) &&
(!strcmp(value, "1") || !strcasecmp(value, "true")))) {
ALOGI("Downmixing multichannel AAC to stereo");
- aacDecoder_SetParam(mAACDecoder, AAC_PCM_OUTPUT_CHANNELS, 2);
+ aacDecoder_SetParam(mAACDecoder, AAC_PCM_MAX_OUTPUT_CHANNELS, 2);
mStreamInfo->numChannels = 2;
+ // By default, the decoder creates a 5.1 channel downmix signal
+ // for seven and eight channel input streams. To enable 6.1 and 7.1 channel output
+ // use aacDecoder_SetParam(mAACDecoder, AAC_PCM_MAX_OUTPUT_CHANNELS, -1)
}
}
}