aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec/src
Commit message (Collapse)AuthorAgeFilesLines
* Increase patchParam array size by one and fix out-of-bounce write in ↵Fraunhofer IIS FDK2023-05-311-2/+2
| | | | | | | | | | resetLppTransposer(). Bug: 279766766 Test: see POC Change-Id: I206973e0bb21140865efffd930e39f920f477359 Merged-In: I206973e0bb21140865efffd930e39f920f477359 (cherry picked from commit f682b8787eb312b9f8997dac4c2c18bb779cf0df)
* Prevent too large shift exponent in apply_inter_tes() and merge two loops.Fraunhofer IIS FDK2021-05-071-22/+9
| | | | | | Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I9ecb7fbae0a2c2c24af9067846afcf499b021608
* Use scaleValuesSaturate() to avoid integer overflows in QmfTransposerApply().Fraunhofer IIS FDK2021-05-071-33/+18
| | | | | | Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: Ib83bd37861e1e24ff18ea276244a370962808fcf
* Avoid unintentional sign conversions in lppTransposer() and lppTransposerHBE().Fraunhofer IIS FDK2021-05-061-10/+10
| | | | | | Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: Ifc4618b8de4e377df28e387fb976ab5acb5883d7
* Merge changes I42956a9f,I92f7c559,I5af62590 into sc-devTreeHugger Robot2021-05-052-13/+19
|\ | | | | | | | | | | | | * changes: Check the number of available escapes in rvlcDecodeBackward() to avoid out-of-bounds access. Sbr syncstate may only be set to upsampling if the sbr decoder was sucessfully initialized. Perform parameter check before parameter assignment to avoid incorrect initialization in resetFreqBandTables().
| * Sbr syncstate may only be set to upsampling if the sbr decoder was ↵Fraunhofer IIS FDK2021-04-291-5/+11
| | | | | | | | | | | | | | | | sucessfully initialized. Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I92f7c559af961ec063bfea74353f11092dcda653
| * Perform parameter check before parameter assignment to avoid incorrect ↵Fraunhofer IIS FDK2021-04-291-8/+8
| | | | | | | | | | | | | | | | initialization in resetFreqBandTables(). Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I5af625905b1e4365fa84423d186c227a49707f72
* | Merge "Revise synthesis QMF scaling for PS to avoid integer overflow in ↵TreeHugger Robot2021-04-301-14/+10
|\ \ | | | | | | | | | qmfSynPrototypeFirSlot()." into sc-dev
| * | Revise synthesis QMF scaling for PS to avoid integer overflow in ↵Fraunhofer IIS FDK2021-04-301-14/+10
| |/ | | | | | | | | | | | | | | qmfSynPrototypeFirSlot(). Bug: 186706541 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I23ff345a1b1d0a8d125d49164fbd020387a37901
* | Merge "Prevent signed integer overflow in calc_qmfBufferReal()." into sc-devTreeHugger Robot2021-04-301-14/+14
|\ \
| * | Prevent signed integer overflow in calc_qmfBufferReal().Fraunhofer IIS FDK2021-04-301-14/+14
| |/ | | | | | | | | | | Bug: 186706541 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I6d12fba9d958280ead368fcc4c6c5c79dc0111e2
* / Prevent signed integer overflow in complex path of calc_qmfBuffer().Fraunhofer IIS FDK2021-04-302-194/+31
|/ | | | | | Bug: 186706541 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: Iae0581ea983912bcf1bc6b3bdc2c0d8ee2f6248e
* Make sure that alphaValue is correctly initialized in sbrDecoder_drcApplySlot().Fraunhofer IIS FDK2020-12-281-19/+34
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I5bded2e3d29278bb5df561eaa2a46d963ee21df8
* Limit smoothedNoise values to avoid integer overflows in adjustTimeSlotHQ() ↵Fraunhofer IIS FDK2020-12-231-1/+18
| | | | | | | | and adjustTimeSlotHQ_GainAndNoise(). Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: Ib630d56a626ddd59a9155df38cda2011c3165346
* Fix heap buffer overflow in sbrDecoder_AssignQmfChannels2SbrChannels().Fraunhofer IIS FDK2020-08-101-6/+6
| | | | | | | | | | | | | | | In the bug the SBR decoder has already set up 9 channels and tries to allocate one more channel. The assignment of the QMF channels to SBR channels fails since the QMF domain manages only 8+1 channels instead of 10 channels as reqeusted by SBR. Here we have added a check in sbrDecoder_InitElement() which will return with a parse error in case additional SBR channels would exceed the maximum number of SBR channels. This solves the potential heap buffer overflow. Bug: 158762825 Test: atest DecoderTestAacDrc DecoderTestAacFormat DecoderTestXheAac Change-Id: I0150ac6d5a47ffce883010f531928656eebc619e
* Merge changes Iad37ae76,I4870251b,Icd937cad am: 662d974400 am: 0b8c6e731fKris Alder2020-04-091-1/+1
|\ | | | | | | Change-Id: Ie5c84f6923184c564793de5e5f0007bc197415e7
| * Stop using __DATE__/__TIME__ on all buildsAnuj Joshi2020-03-271-1/+1
| | | | | | | | | | | | | | Test: mmma external/libaac Bug: 151595970 Change-Id: Icd937cad3e4e2f70a5486cca424544eb410be26f
* | Avoid decoder internal clipping by converting the whole audio sample data ↵Fraunhofer IIS FDK2020-02-147-38/+52
| | | | | | | | | | | | | | | | path from 16 to 32 bit data width (FDKdec v3.2.0). Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I8a504ab709e42e27a61fe29840212953742283a5
* | Revise memory overlay usage and remove deprecated buffers and overlay tags.Fraunhofer IIS FDK2020-02-141-4/+1
| | | | | | | | | | | | Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I7aea2898a3c49e06209fae89d734939c100e1184
* | Avoid too large shift exponent in apply_inter_tes() by using fIsLessThan.Fraunhofer IIS FDK2020-01-161-11/+2
| | | | | | | | | | | | Bug: 146936613 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I8414072929ec8f786e0c003f18ab453dbacb9e5e
* | Adjust scaling in lppTransposerHBE() to prevent signed integer overflow in ↵Fraunhofer IIS FDK2019-12-271-4/+7
| | | | | | | | | | | | | | | | autocorrelation. Bug: 145669291 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ia32b081b982d6886f51642a7ed1ca73acb40dac9
* | Avoid signed integer overflows in multiple adjustTimeSlot*() functions.Fraunhofer IIS FDK2019-12-271-25/+72
| | | | | | | | | | | | Bug: 145669628 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Id0f3ee9d3413e534505c0c7eea379ce42880ca79
* | Improve robustness of limiter band table calculation in ResetLimiterBands().Fraunhofer IIS FDK2019-12-271-0/+5
| | | | | | | | | | | | Bug: 145668973 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ic076cf5b44c0618734064b670de61f9da532a13e
* | Fix signed integer overflow in pvcDecodeTimeSlot().Fraunhofer IIS FDK2019-12-271-12/+13
| | | | | | | | | | | | Bug: 145668022 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I0a165330cf174f24310f8d705523d310a3522e7a
* | Limit too large shift value in apply_inter_tes().Fraunhofer IIS FDK2019-10-181-1/+2
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I38cc7053e671f6e20a1a9ba4f1645d1cf8be77e2
* | Fix nrgGain_e update in equalizeFiltBufferExp(). Prevents negative shift ↵Fraunhofer IIS FDK2019-10-181-3/+4
| | | | | | | | | | | | | | | | exponents in calculateSbrEnvelope(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I66ad54dae0fa1d414d8b2b9a9e0b6145cce4042d
* | Fix signed integer overflow in calcFactorPerBand() calculation.Fraunhofer IIS FDK2019-10-181-2/+5
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I9f18f675112651be8dec5c0474601ca6531fbf15
* | Prevent integer overflow in sbrDecoder_calculateGainVec().Fraunhofer IIS FDK2019-10-181-7/+8
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I359f7f976a5ad5459be7d7b786145988a175e305
* | Saturate shift value in calculateSbrEnvelope(). Prevents too large shift values.Fraunhofer IIS FDK2019-10-141-2/+2
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I3331ac9bc267cd3fa4c1178bc445998869f0d99b
* | Limit shift exponent in adjustTimeSlot_EldGrid().Fraunhofer IIS FDK2019-10-141-6/+7
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I4000972d63d74e871d47f2db031308cd7ea285d6
* | Fix shift value assignment in addHighBandPart().Fraunhofer IIS FDK2019-10-141-2/+2
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I69457c1b551e33e3ee9ef39b457b0f83de2e370e
* | Replace obsolete SBR CRC with superior FDK CRC implementation. Fixes ELD SBR ↵Fraunhofer IIS FDK2019-10-113-382/+35
|/ | | | | | | | CRC decoding and prevents negative shift exponents in calcCRC(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I0c40609975de5854560643f3ce2c9fecf5973f73
* Improve random phase table accuracy.Fraunhofer IIS FDK2019-05-142-1063/+537
| | | | | | | Bug: 132641988 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ifca82aec87c0d21871d1f181b1be635c419433ee
* Increase scale factor gain in TES tool.Fraunhofer IIS FDK2019-05-141-1/+1
| | | | | | Bug: 132641988 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I498be80902da32944ab456436689ca4aba42d3f6
* Improve accuracy of division in calcSubbandGain().Fraunhofer IIS FDK2019-05-141-2/+10
| | | | | | | Bug: 132641988 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I3beeda23355ae1200d9f55c9e8cd1cc6bc899153
* Avoid -1.0 autocorrelation input data.Fraunhofer IIS FDK2019-05-141-3/+21
| | | | | | | Bug: 132641988 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I2d4ccf9ee666a5533417ea98302de4a01b74c5ce
* Discard SBR data in case of unsuccessful SBR header update.Fraunhofer IIS FDK2019-03-151-5/+4
| | | | Change-Id: I31ab01476d5a9de273c7adce14a1c29fa0023682
* libSBRdec: prevent OOB accessJean-Michel Trivi2019-03-071-0/+4
| | | | | | | | | In generateFixFixOnly() check validity of index before accessing SBR decoder envolope tables. Bug: 112052062 Test: see bug Change-Id: Icd7ec3807eea9ef8417dba7383f361101becc4f2
* Extend PS concealment/error treatmentFraunhofer IIS FDK2018-12-272-1/+13
| | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I19b87d33b1d0ed8b43b4ea57992f1c6df500d9f4
* Fix potential invalid memory access for concealment in decodeEnvelope()Fraunhofer IIS FDK2018-12-271-4/+9
| | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I916a24c000ef792aa3d5befa02a6b6f673161844
* Reset all noisefloor levels in leanSbrConcealment()Fraunhofer IIS FDK2018-12-271-2/+2
| | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I6d25e8c8844bdf8e15d1aab695cb5d19d6b232e2
* Apply sbrDecoder_Parse() function for all explict SBR elementsFraunhofer IIS FDK2018-12-271-0/+5
| | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I97471c4db309307a21100f1d5d88d3c4e24d2670
* Call QMF transposer initialization only with successful SBR processingFraunhofer IIS FDK2018-12-273-2/+11
| | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I8a8626a83e1bd87b2c14fad7c90174e4172c01b6
* Add error path to generateFixFixOnly()Fraunhofer IIS FDK2018-12-271-7/+10
| | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I1f1767403068a9eafd7b20edb96669b71b0110fc
* Merge "Limit too large shift exponent in apply_inter_tes()"Jean-Michel Trivi2018-12-271-2/+4
|\
| * Limit too large shift exponent in apply_inter_tes()Fraunhofer IIS FDK2018-12-271-2/+4
| | | | | | | | | | | | Bug: 112892200 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I74e349ecb796343b475b825ac7d97497560a1e7a
* | Limit too large scale_change exponent used in adjustTimeSlotFraunhofer IIS FDK2018-12-271-7/+9
|/ | | | | | Bug: 112892953 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I4fe66defb40a36612850582cb0f1da7fb07a8bed
* Prevent out of bounds accesses in lppTransposer() and lppTransposerHBE()Fraunhofer IIS FDK2018-10-201-27/+47
| | | | | | | Bug: 112160868 Test: see poc in bug Change-Id: I6a2161865d9cb9b51dc37c09d6e3a4a8e5d11f86 (cherry picked from commit 4dad829df00932b89858b9833cf5dcded8d97c37)
* FDKv2 ubsan patchesFraunhofer IIS FDK2018-05-232-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 80053205 Test: see bug for repro with FB "wow" atest DecoderTestAacDrc Fix signed integer overflows in CLpc_SynthesisLattice() Change-Id: Icbddfcc8c5fc73382ae5bf8c2a7703802c688e06 Fix signed integer overflows in imlt Change-Id: I687834fca2f1aab6210ed9862576b4f38fcdeb24 Fix overflow in addLowbandEnergies() Change-Id: Iaa9fdf9deb49c33ec6ca7ed3081c4ddaa920e9aa Concealment fix for audio frames containing acelp components Change-Id: Ibe5e83a6efa75a48f729984a161a76b826878f4e Fix out-of-bounds access in PS concealment Change-Id: I08809a03a40d1feaf00e41278db314d67e1efe88 Fix potential memory leak in setup of qmf domain Change-Id: Id9fc2448354dc7f1b439469128407305efa3def2 Reject channel config 13 Change-Id: Idf5236f6cd054df994e69c9c972c97f6768cf9e5 Fix unsigned integer overflow in configExtension() Change-Id: I8a1668810b85e6237c3892891444ff08f04b019b Fix unsigned integer overflow in CAacDecoder_DecodeFrame() Change-Id: I79678c571690178e6c37680f70a9b94dd3cbc439 Fix unsigned integer overflow in aacDecoder_UpdateBitStreamCounters() Change-Id: I3bff959da9f53fabb18cd0ae6c260e6256194526 Fix unsigned integer overflow in transportDec_readStream() Change-Id: I6a6f9f4acaa32fae0b5de9641f8787bbc7f8286b
* FDK patches: fix overflows in decoder out-of-band configFraunhofer IIS FDK2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 71430241 Bug: 79220129 Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestXheAac cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestAacDrc Unsigned Integer Overflows in CDataStreamElement_Read() Change-Id: Ic2f5b3ae111bf984d4d0db664823798957b0a979 Unsigned Integer Overflow in CProgramConfig_ReadHeightExt() Change-Id: Iaebc458bb59504203e604a28ed6d5cecaa875c42 Unsigned Integer Overflow in transportDec_OutOfBandConfig() Change-Id: I24a4b32d736f28c55147f0e2ca06fe5537da19c2 Unsigned Integer Overflows in CDKcrcEndReg() & crcCalc() Change-Id: I6ebbe541a4d3b6bacbd5ace17264972951de7ca8 Unsigned Integer Overflows in ReadPsData() Change-Id: Id36576fe545236860a06f17971494ecd4484c494 Unsigned Integer Overflow in SpatialDecParseSpecificConfig() Change-Id: Ib468f129a951c69776b88468407f008ab4cfd2c7 Unsigned Integer Overflows in _readUniDrcConfigExtension() & _readLoudnessInfoSetExtension() Change-Id: Ibcf7c6a23af49239206ea9301c58adac36e3ceba