aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'aosp/main'Martin Storsjo2023-10-061-2/+2
|\
| * 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)
* | Merge remote-tracking branch 'aosp/master'Martin Storsjo2022-01-108-318/+161
|\|
| * 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 remote-tracking branch 'aosp/master'Martin Storsjo2020-11-1715-515/+234
|\ \
| * \ Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGEBill Yi2020-11-041-6/+6
| |\ \ | | |/ | |/| | | | | | | Merged-In: I44e842648acbceb02bbc28cf2ad729a0caddf60d Change-Id: Iead5cf2ca1c993da0844a11d1e64bf3cc86ed5dd
| | * Fix heap buffer overflow in sbrDecoder_AssignQmfChannels2SbrChannels().Fraunhofer IIS FDK2020-09-161-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 Merged-In: I0150ac6d5a47ffce883010f531928656eebc619e (cherry picked from commit bb8f983bf36ee2ad8af6acebf4823a58060004ab)
| * | 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-148-43/+62
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Avoid undefined shifts in calculateSbrEnvelopeMartin Storsjo2020-11-171-1/+3
| | | | | | | | | | | | Fixes: 26845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5670674796118016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* | Avoid undefined shifts in SBR calcCRCMartin Storsjo2020-11-171-2/+4
| | | | | | | | | | | | Fixes: 25404/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5397024709804032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* | Revert "Reapply: Avoid reading out of bounds due to negative aaIccIndexMapped"Martin Storsjo2019-10-081-6/+3
| | | | | | | | | | | | | | This reverts commit e6bb25613016ecd64ccbcb354768b4794ffd6351. It seems like this isn't needed any longer on the latest upstream version.
* | Revert "Reapply: Avoid reading out of bounds due to too large aaIidIndexMapped"Martin Storsjo2019-10-081-10/+5
| | | | | | | | | | | | | | This reverts commit 28fdc28ec436ceafb11ceb6a354e9916c5265981. It seems like this isn't needed any longer on the latest upstream version.
* | Merge remote-tracking branch 'aosp/master'Martin Storsjo2019-10-085-1074/+577
|\|
| * 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
* | Merge remote-tracking branch 'aosp/master'Martin Storsjo2019-01-219-52/+110
|\|
| * Extend PS concealment/error treatmentFraunhofer IIS FDK2018-12-272-1/+13
| | | | | | | | | | | | Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I19b87d33b1d0ed8b43b4ea57992f1c6df500d9f4