summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-10-02 12:39:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 12:39:22 +0000
commitbc6b959b0ff5f4fc83a049cba989edc0a06ae043 (patch)
tree4243ea0be7e11c566449b5f3883aceb9d5545d0f /media/libstagefright/ACodec.cpp
parentb76c2702fcae662b7ac0523d4735ef90c0f6dbba (diff)
parent52cb10c4d794e5041e04f20d716aac82c325b06b (diff)
downloadframeworks_av-bc6b959b0ff5f4fc83a049cba989edc0a06ae043.zip
frameworks_av-bc6b959b0ff5f4fc83a049cba989edc0a06ae043.tar.gz
frameworks_av-bc6b959b0ff5f4fc83a049cba989edc0a06ae043.tar.bz2
am 52cb10c4: am d0b9efe7: Merge "add AAC audio decoder params for PCM limiter enable" into lmp-dev
* commit '52cb10c4d794e5041e04f20d716aac82c325b06b': add AAC audio decoder params for PCM limiter enable
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 32365b8..d35f265 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1359,6 +1359,7 @@ status_t ACodec::configureCodec(
int32_t isADTS, aacProfile;
int32_t sbrMode;
int32_t maxOutputChannelCount;
+ int32_t pcmLimiterEnable;
drcParams_t drc;
if (!msg->findInt32("is-adts", &isADTS)) {
isADTS = 0;
@@ -1373,6 +1374,10 @@ status_t ACodec::configureCodec(
if (!msg->findInt32("aac-max-output-channel_count", &maxOutputChannelCount)) {
maxOutputChannelCount = -1;
}
+ if (!msg->findInt32("aac-pcm-limiter-enable", &pcmLimiterEnable)) {
+ // value is unknown
+ pcmLimiterEnable = -1;
+ }
if (!msg->findInt32("aac-encoded-target-level", &drc.encodedTargetLevel)) {
// value is unknown
drc.encodedTargetLevel = -1;
@@ -1396,7 +1401,8 @@ status_t ACodec::configureCodec(
err = setupAACCodec(
encoder, numChannels, sampleRate, bitRate, aacProfile,
- isADTS != 0, sbrMode, maxOutputChannelCount, drc);
+ isADTS != 0, sbrMode, maxOutputChannelCount, drc,
+ pcmLimiterEnable);
}
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_NB)) {
err = setupAMRCodec(encoder, false /* isWAMR */, bitRate);
@@ -1561,7 +1567,8 @@ status_t ACodec::selectAudioPortFormat(
status_t ACodec::setupAACCodec(
bool encoder, int32_t numChannels, int32_t sampleRate,
int32_t bitRate, int32_t aacProfile, bool isADTS, int32_t sbrMode,
- int32_t maxOutputChannelCount, const drcParams_t& drc) {
+ int32_t maxOutputChannelCount, const drcParams_t& drc,
+ int32_t pcmLimiterEnable) {
if (encoder && isADTS) {
return -EINVAL;
}
@@ -1691,6 +1698,7 @@ status_t ACodec::setupAACCodec(
presentation.nHeavyCompression = drc.heavyCompression;
presentation.nTargetReferenceLevel = drc.targetRefLevel;
presentation.nEncodedTargetLevel = drc.encodedTargetLevel;
+ presentation.nPCMLimiterEnable = pcmLimiterEnable;
status_t res = mOMX->setParameter(mNode, OMX_IndexParamAudioAac, &profile, sizeof(profile));
if (res == OK) {