ELD downscale factor 3 is only allowed for framesize 480.

Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I9681942ba39761e4f1d66236ad80c2420ca5abe9
This commit is contained in:
Fraunhofer IIS FDK 2020-04-09 17:57:27 +02:00 committed by Ray Essick
parent b93f896f37
commit 18758b9fe1
1 changed files with 10 additions and 2 deletions

View File

@ -1818,9 +1818,17 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc,
downscaleFactorInBS = downscaleFactorInBS =
asc->m_samplingFrequency / asc->m_samplingFrequency /
asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency; asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency;
if (downscaleFactorInBS == 1 || downscaleFactorInBS == 2 || if ((downscaleFactorInBS == 1 || downscaleFactorInBS == 2 ||
downscaleFactorInBS == 3 || downscaleFactorInBS == 4) { (downscaleFactorInBS == 3 &&
asc->m_sc.m_eldSpecificConfig.m_frameLengthFlag) ||
downscaleFactorInBS == 4) &&
((asc->m_samplingFrequency %
asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency) ==
0)) {
downscaleFactor = downscaleFactorInBS; downscaleFactor = downscaleFactorInBS;
} else {
downscaleFactorInBS = 1;
downscaleFactor = 1;
} }
} }
} else { } else {