aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec
Commit message (Collapse)AuthorAgeFilesLines
* Merge changes I42956a9f,I92f7c559,I5af62590 into sc-devTreeHugger Robot2021-05-051-7/+8
|\ | | | | | | | | | | | | * 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().
| * Check the number of available escapes in rvlcDecodeBackward() to avoid ↵Fraunhofer IIS FDK2021-04-291-7/+8
| | | | | | | | | | | | | | | | out-of-bounds access. Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I42956a9fd7a8e78c3c0f4f553370ac5a9f1ac2ca
* | Merge changes Ic767aeb6,I2aef40ef into sc-devTreeHugger Robot2021-05-051-22/+27
|\| | | | | | | | | | | * changes: Use local variables for sbr and mps state in CAacDecoder_Init() to avoid inconsistencies in case of failing initialization. Follow-up on: Improve decoder robustness by storing flags and elFlags temporarily.
| * Use local variables for sbr and mps state in CAacDecoder_Init() to avoid ↵Fraunhofer IIS FDK2021-04-291-16/+23
| | | | | | | | | | | | | | | | inconsistencies in case of failing initialization. Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: Ic767aeb63cdc7d4556bc68cee0c4f7aeba05d12f
| * Follow-up on: Improve decoder robustness by storing flags and elFlags ↵Fraunhofer IIS FDK2021-04-291-6/+4
| | | | | | | | | | | | | | | | temporarily. Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I2aef40ef1868832cd00e4d761b060aa41b1b7efa
* | Fix stack buffer overflow in Pred_lt4().Fraunhofer IIS FDK2021-04-301-2/+2
|/ | | | | | | Bug: 186706541 Bug: 160187491 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I3b8d9326319cca21145cc246588b01c5bf29a9a0
* Merge "Solve issue regarding config changes between Loudness-only vs. ↵Jean-Michel Trivi2021-01-191-3/+14
|\ | | | | | | Loudness+DRC."
| * Solve issue regarding config changes between Loudness-only vs. Loudness+DRC.Fraunhofer IIS FDK2021-01-141-3/+14
| | | | | | | | | | | | | | | | Fix config changes from Loudness+DRC to Loudness-only configurations by clearing the DRC configuration Bug: 176246647 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I7afef848308478c29a82b13f24ba8c2a9760fd45
* | Fix USAC time domain limiter latency at config change.Fraunhofer IIS FDK2021-01-145-141/+156
| | | | | | | | | | | | | | | | | | | | We have observed quality problems regarding config switching for USAC streams. Crossfading did not consider the USAC time domain limiter latency correctly. The limiter memory still contained the last part of the frame before the config change. With this patch we were able to improve the quality by moving the limiter processing to the end of the processing chain (crossfade -> DRC -> limiter). By that we don't have to consider the limiter latency at the crossfader anymore and can resolve the quality issue. Bug: 176246647 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I0dfd3b76ff2b0daf495ad406283f56a39982ad8f Change-Id: I26f5da65ef8344602007e180e837820c6a25f173
* | Consider TNS headroom for complex prediction.Fraunhofer IIS FDK2021-01-141-2/+4
|/ | | | | | Bug: 176246647 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I8261106b98d7e7c5a8a2af38585c726285ea8623
* Check number of core channels and SAC decoder input channels to avoid a ↵Fraunhofer IIS FDK2020-12-281-9/+7
| | | | | | | | channel mismatch. Bug: 176246647 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: Ib8b6973e9c29e13b8ef33d7736be2b977928face
* Improve decoder robustness by storing flags and elFlags temporarily.Fraunhofer IIS FDK2020-12-281-53/+82
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I6aaeef87e1f2ce5d5031f088b8c57e6f5806929d
* ELD downscale factor 3 is only allowed for framesize 480.Fraunhofer IIS FDK2020-12-281-2/+10
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I9681942ba39761e4f1d66236ad80c2420ca5abe9
* Check transportDec_OutOfBandConfig() input buffer size parameter.Fraunhofer IIS FDK2020-12-281-2/+4
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I60ac86f09a5652c820d60dfdc12212637f888164
* Introduce aacDecoder_drcDisable() and always disable legacy DRC for USAC.Fraunhofer IIS FDK2020-12-283-8/+24
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I75edf24b18e1f5392b6eb179d5574cb93fcbc7c2
* Fix unsigned integer overflow in Hcr_State_BODY_SIGN_ESC__ESC_WORD().Fraunhofer IIS FDK2020-12-281-1/+3
| | | | | | Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I5eb0f88a55e856c427f9e4647332070f66e673c5
* Validate DRC compression factor and DRC boost factor value range in ↵Fraunhofer IIS FDK2020-12-231-0/+6
| | | | | | | | aacDecoder_SetParam(). Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I1d8534145bcf400c5da58d64d3b7e73a87cb43be
* 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
* | Remove outdated apply_normalization parameter from legacy DRC module.Fraunhofer IIS FDK2020-02-144-24/+3
| | | | | | | | | | | | Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I9b894007fc9d80da6aaee09d84c2b356f2c06ff7
* | Avoid decoder internal clipping by converting the whole audio sample data ↵Fraunhofer IIS FDK2020-02-1415-217/+273
| | | | | | | | | | | | | | | | path from 16 to 32 bit data width (FDKdec v3.2.0). Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I8a504ab709e42e27a61fe29840212953742283a5
* | Create new applyDrcLevelNormalization() function for subsequent usage.Fraunhofer IIS FDK2020-02-143-2/+222
| | | | | | | | | | | | Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I23cc3081ff71830bc96766a31131594499dbdd04
* | Revise memory overlay usage and remove deprecated buffers and overlay tags.Fraunhofer IIS FDK2020-02-142-15/+2
| | | | | | | | | | | | Bug: 149514474 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I7aea2898a3c49e06209fae89d734939c100e1184
* | Revise and straighten out useless references from decoder documentation.Fraunhofer IIS FDK2020-02-131-72/+44
| | | | | | | | | | | | Bug: 149481606 Test: doc update in header, so just make Change-Id: I656e76762ee336931d4f1938e5c39c8ad7f65954
* | Extend decoder API with audio output loudness info (FDKdec v3.1.3).Fraunhofer IIS FDK2020-02-113-10/+54
| | | | | | | | | | | | Bug: 148385721 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I68b09883def21baef259c9ab914922567ab8cee3
* | Fix AACDEC_INTR handling for USAC configuration with multiple pre-roll AUsFraunhofer IIS FDK2020-01-271-3/+3
| | | | | | | | | | | | Bug: 148384920 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I88cd6da0b18c73f7b521ea58ba8b8f364278b64f
* | Reject HE-AAC SBR with a ratio greater than 2:1 and reject USAC streams ↵Fraunhofer IIS FDK2020-01-221-7/+32
| | | | | | | | | | | | | | | | containing legacy DRC info. Bug: 146937553 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I1a23d986160c1de07a7159ac026f57d821d3ff1d
* | Fix too large shift exponent in CConcealment_InterpolateBuffer().Fraunhofer IIS FDK2020-01-161-8/+3
| | | | | | | | | | | | Bug: 146938361 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Idb0a4e2c87962e453a991f0a573155ace6e9bf40
* | Prevent negation of INT_MIN in CConcealment_ApplyRandomSign().Fraunhofer IIS FDK2020-01-141-2/+2
| | | | | | | | | | | | Bug: 146937601 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I9747110eca96b37604df996ef5e86ea58e2d8932
* | Add sanity check for huffman escape sequences in HCR tool.Fraunhofer IIS FDK2019-12-271-1/+5
| | | | | | | | | | | | Bug: 145669389 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Iaa624f3040269b5c84883bc3ee38cad7cd88e54d
* | Prevent signed integer overflows in ELD filterbank, multE2_DinvF_fdk().Fraunhofer IIS FDK2019-12-271-7/+11
| | | | | | | | | | | | Bug: 145669388 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Iaba69b58666833c90e05b296c502ba6509a087a9
* | Use one additional bit headroom to prevent signed integer overflow in ↵Fraunhofer IIS FDK2019-12-271-10/+13
| | | | | | | | | | | | | | | | BuildAdaptiveExcitation(). Bug: 145666984 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I5c881238562c3d9f7cd8d77a8c52f7231126587f
* | FDK: USAC CLpd_Reset uses rate constantsJean-Michel Trivi2019-10-211-1/+1
| | | | | | | | | | | | | | Use constants defined in libAACdec/src/usacdec_const.h Test: atest DecoderTestXheAac Change-Id: Idf1aa9fefb92b1abf64f50b044b2490b0d31b426
* | Prevent signed integer overflows in CLpd_FAC_Mdct2Acelp().Fraunhofer IIS FDK2019-10-181-3/+3
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I348fe4be577ac39f961352902d138a8e07982096
* | Prevent signed integer overflows in CLpd_FAC_Acelp2Mdct().Fraunhofer IIS FDK2019-10-181-6/+4
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I216f97b0c75a9076f3963036b098af37b390c5bb
* | Fix integer overflow in complex multiplication called from ↵Fraunhofer IIS FDK2019-10-181-10/+10
| | | | | | | | | | | | | | | | CLpd_FAC_Acelp2Mdct(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I7cd234698821cf13b163d323cfd90fdccaaec3c1
* | Avoid signed integer overflow in bass_pf_1sf_delay().Fraunhofer IIS FDK2019-10-181-6/+11
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I67bfab71987b31601a4666c8cf292f71bcb6799a
* | Prevent signed integer overflow in filtLP().Fraunhofer IIS FDK2019-10-181-3/+4
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I8da32f4794274e2955936ccd42c009485fbe1972
* | Suppress integer overflow in lsf_weight_2st() by using 64 bit multiplication ↵Fraunhofer IIS FDK2019-10-151-1/+2
| | | | | | | | | | | | | | | | with explicit 32 bit integer result. Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I82ce4858688e90abee0c44c4ada34a9a7b08342f
* | Prevent signed integer overflow in RE8_PPV().Fraunhofer IIS FDK2019-10-151-5/+5
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ic66ac4742d8e466431c5cf09d02b0d9c7f842df2
* | Avoid signed integer overflow in E_LPC_f_lsp_a_conversion().Fraunhofer IIS FDK2019-10-151-8/+6
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: If2110ad246bb5b57ef76c9cd251874ecd4b05109
* | Use SATURATE_LEFT_SHIFT in get_lsppol() to prevent integer overflow.Fraunhofer IIS FDK2019-10-151-3/+6
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ie9ec52485a52b076a900b111b035289110c004f8
* | Fix integer overflow in E_UTIL_preemph().Fraunhofer IIS FDK2019-10-151-2/+2
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Iaaa0630e59d8e83e58b25168a3db04304485429b
* | Overcome potential integer overflows in M/S module for complex prediction.Fraunhofer IIS FDK2019-10-151-25/+15
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ic0648203b6a61ebff8bcc93c4b1099e033bc6860
* | Avoid integer overflows with pseudoLR in CAacDecoder_DecodeFrame().Fraunhofer IIS FDK2019-10-151-5/+9
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I5c83d72b5c0f4cd1569b648f102c8c549a7a6ac2
* | Restrict size of huffman escape sequence to prevent shift with too large ↵Fraunhofer IIS FDK2019-10-141-9/+19
| | | | | | | | | | | | | | | | exponent in DecodeEscapeSequence(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ibcd182e313e9ef480e92619023bf424762b92e23
* | Limit too large shift exponent in CJointStereo_ApplyMS()Fraunhofer IIS FDK2019-10-141-16/+14
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ia6ab654654e899368ba207a66eddf22b6b855635
* | Fix CpePersistentData memory leak.Fraunhofer IIS FDK2019-10-101-1/+2
| | | | | | | | | | | | Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Iee5c93d61088bbda2328099ad20413adae3fa09b
* | Validate aacSampleRate after applying ELD downscale factor. Avoid division ↵Fraunhofer IIS FDK2019-10-101-0/+3
|/ | | | | | | | by zero. Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I3f7ece9451121d40fab2c97571c695c1ac62bd00
* Fix HE-AAC using MPEG-D DRC with implicit SBR signaling.Fraunhofer IIS FDK2019-05-131-0/+7
| | | | | | Bug: 132641988 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I97c5d3972528092f627153ad3127c7db977a0e5d