Loading include/media/stagefright/ACodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,8 @@ private: 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); status_t setupAC3Codec(bool encoder, int32_t numChannels, int32_t sampleRate); Loading media/libstagefright/ACodec.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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); Loading Loading @@ -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; } Loading Loading @@ -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) { Loading media/libstagefright/codecs/aacdec/SoftAAC2.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,10 @@ OMX_ERRORTYPE SoftAAC2::internalSetParameter( aacPresParams->nEncodedTargetLevel); updateDrcWrapper = true; } if (aacPresParams->nPCMLimiterEnable >= 0) { aacDecoder_SetParam(mAACDecoder, AAC_PCM_LIMITER_ENABLE, (aacPresParams->nPCMLimiterEnable != 0)); } if (updateDrcWrapper) { mDrcWrap.update(); } Loading Loading
include/media/stagefright/ACodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -267,7 +267,8 @@ private: 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); status_t setupAC3Codec(bool encoder, int32_t numChannels, int32_t sampleRate); Loading
media/libstagefright/ACodec.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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); Loading Loading @@ -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; } Loading Loading @@ -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) { Loading
media/libstagefright/codecs/aacdec/SoftAAC2.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,10 @@ OMX_ERRORTYPE SoftAAC2::internalSetParameter( aacPresParams->nEncodedTargetLevel); updateDrcWrapper = true; } if (aacPresParams->nPCMLimiterEnable >= 0) { aacDecoder_SetParam(mAACDecoder, AAC_PCM_LIMITER_ENABLE, (aacPresParams->nPCMLimiterEnable != 0)); } if (updateDrcWrapper) { mDrcWrap.update(); } Loading