Commit Graph

163 Commits

Author SHA1 Message Date
Fraunhofer IIS FDK 4c41b05b6c Remove obsolete uni drc precedence handling
Bug: 241391733
Test: see bug
Change-Id: I0ddc479626fb6a89d04bc989256ad1d8ec4275a3
2023-04-21 18:23:24 -07:00
Jean-Michel Trivi 2f4c595c4a Disable MPEG-D DRC for legacy AOTs
Disable MPEG-D DRC metadata for legacy AOTs 2 (AAC-LC), 5 (HE-AAC),
and 29 (HE-AAC v2).

Bug: 241391733
Test: see bug
Change-Id: Ie84badaa24bb4169adfdb1d3243525c32b44d3e9
2023-04-21 17:14:34 -07:00
Martin Storsjo 7cb7d8c181 Update the version numbers in the public installed headers
Bug: 261048742
Test: atest android.media.encoder.cts.EncoderTest
Change-Id: I44537c067e6ef34e77a67d02d8e9a8e9dfffab92
2022-12-09 04:19:16 +00:00
Fraunhofer IIS FDK 09cf32a6c7 Refine aacDecoder_DecodeFrame() output buffer parameter type description.
Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I83a460d03c7cde3e4f74011a7c3556c4cfd08cdd
2021-05-07 12:44:36 -07:00
Fraunhofer IIS FDK 92dd536642 Pass flushing flag to SBR module for stereo config index 3 as for stereo config index 1 and 2.
Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: Ifed0885abdbbfb2e2d4d94bc482e5e1e30794049
2021-05-07 10:56:20 -07:00
TreeHugger Robot 8d746cfdb4 Merge "Validate whether all PCE listed element instance tags are present in raw_data_block." into sc-dev 2021-05-06 20:52:44 +00:00
TreeHugger Robot 826719dee4 Merge changes I42956a9f,I92f7c559,I5af62590 into sc-dev
* 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().
2021-05-05 00:48:05 +00:00
TreeHugger Robot 2a3cde8157 Merge changes Ic767aeb6,I2aef40ef into sc-dev
* 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.
2021-05-05 00:41:58 +00:00
Fraunhofer IIS FDK 22e70729b4 Fix stack buffer overflow in Pred_lt4().
Bug: 186706541
Bug: 160187491
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I3b8d9326319cca21145cc246588b01c5bf29a9a0
2021-04-30 17:56:52 +00:00
Fraunhofer IIS FDK 9a9d260375 Validate whether all PCE listed element instance tags are present in raw_data_block.
Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I299d3c11ffa65a7c09c437cd114d62b8d3013e2f
2021-04-29 17:55:41 -07:00
Fraunhofer IIS FDK 27c3a2bd1c Check the number of available escapes in rvlcDecodeBackward() to avoid out-of-bounds access.
Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I42956a9fd7a8e78c3c0f4f553370ac5a9f1ac2ca
2021-04-29 13:04:17 -07:00
Fraunhofer IIS FDK e15d049ded Use local variables for sbr and mps state in CAacDecoder_Init() to avoid 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
2021-04-29 12:59:09 -07:00
Fraunhofer IIS FDK 0527875be6 Follow-up on: Improve decoder robustness by storing flags and elFlags temporarily.
Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I2aef40ef1868832cd00e4d761b060aa41b1b7efa
2021-04-29 12:57:20 -07:00
Jean-Michel Trivi cc9b0a4702 Merge "Solve issue regarding config changes between Loudness-only vs. Loudness+DRC." 2021-01-19 16:41:26 +00:00
Fraunhofer IIS FDK af0c91e7b8 Solve issue regarding config changes between Loudness-only vs. Loudness+DRC.
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
2021-01-14 15:41:58 -08:00
Fraunhofer IIS FDK 3495808c83 Fix USAC time domain limiter latency at config change.
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
2021-01-14 15:26:24 -08:00
Fraunhofer IIS FDK 9a48d47998 Consider TNS headroom for complex prediction.
Bug: 176246647
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: I8261106b98d7e7c5a8a2af38585c726285ea8623
2021-01-14 15:13:58 -08:00
Fraunhofer IIS FDK 5eb9ed1b1f Check number of core channels and SAC decoder input channels to avoid a channel mismatch.
Bug: 176246647
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: Ib8b6973e9c29e13b8ef33d7736be2b977928face
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK bfd912da32 Improve decoder robustness by storing flags and elFlags temporarily.
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I6aaeef87e1f2ce5d5031f088b8c57e6f5806929d
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK 9f2d1a18d4 ELD downscale factor 3 is only allowed for framesize 480.
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I9681942ba39761e4f1d66236ad80c2420ca5abe9
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK b1136d1c34 Check transportDec_OutOfBandConfig() input buffer size parameter.
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I60ac86f09a5652c820d60dfdc12212637f888164
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK 8f2e68d5c4 Introduce aacDecoder_drcDisable() and always disable legacy DRC for USAC.
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I75edf24b18e1f5392b6eb179d5574cb93fcbc7c2
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK 293ccc7fbc Fix unsigned integer overflow in Hcr_State_BODY_SIGN_ESC__ESC_WORD().
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I5eb0f88a55e856c427f9e4647332070f66e673c5
2020-12-28 09:21:16 -08:00
Fraunhofer IIS FDK 883c114399 Validate DRC compression factor and DRC boost factor value range in aacDecoder_SetParam().
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I1d8534145bcf400c5da58d64d3b7e73a87cb43be
2020-12-23 15:08:03 -08:00
Kris Alder 0f130d51b8 Merge changes Iad37ae76,I4870251b,Icd937cad am: 662d974400 am: 0b8c6e731f
Change-Id: Ie5c84f6923184c564793de5e5f0007bc197415e7
2020-04-09 16:47:26 +00:00
Anuj Joshi 7f7bbce892 Stop using __DATE__/__TIME__ on all builds
Test: mmma external/libaac
Bug: 151595970

Change-Id: Icd937cad3e4e2f70a5486cca424544eb410be26f
2020-03-27 10:43:38 +05:30
Fraunhofer IIS FDK 261fadc3a2 Remove outdated apply_normalization parameter from legacy DRC module.
Bug: 149514474
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I9b894007fc9d80da6aaee09d84c2b356f2c06ff7
2020-02-14 10:56:10 -08:00
Fraunhofer IIS FDK e016635f0d Avoid decoder internal clipping by converting the whole audio sample data path from 16 to 32 bit data width (FDKdec v3.2.0).
Bug: 149514474
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I8a504ab709e42e27a61fe29840212953742283a5
2020-02-14 10:53:51 -08:00
Fraunhofer IIS FDK 57c9355de0 Create new applyDrcLevelNormalization() function for subsequent usage.
Bug: 149514474
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I23cc3081ff71830bc96766a31131594499dbdd04
2020-02-14 10:47:19 -08:00
Fraunhofer IIS FDK 90c29e0808 Revise memory overlay usage and remove deprecated buffers and overlay tags.
Bug: 149514474
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I7aea2898a3c49e06209fae89d734939c100e1184
2020-02-14 10:44:10 -08:00
Fraunhofer IIS FDK 1d451971ca Revise and straighten out useless references from decoder documentation.
Bug: 149481606
Test: doc update in header, so just make
Change-Id: I656e76762ee336931d4f1938e5c39c8ad7f65954
2020-02-13 08:59:36 -08:00
Fraunhofer IIS FDK 31f66f6d3f Extend decoder API with audio output loudness info (FDKdec v3.1.3).
Bug: 148385721
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I68b09883def21baef259c9ab914922567ab8cee3
2020-02-11 16:02:32 -08:00
Fraunhofer IIS FDK 00285819a2 Fix AACDEC_INTR handling for USAC configuration with multiple pre-roll AUs
Bug: 148384920
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I88cd6da0b18c73f7b521ea58ba8b8f364278b64f
2020-01-27 09:21:21 -08:00
Fraunhofer IIS FDK 7388c0732d Reject HE-AAC SBR with a ratio greater than 2:1 and reject USAC streams containing legacy DRC info.
Bug: 146937553
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I1a23d986160c1de07a7159ac026f57d821d3ff1d
2020-01-22 14:13:51 -08:00
Fraunhofer IIS FDK cee316ab3e Fix too large shift exponent in CConcealment_InterpolateBuffer().
Bug: 146938361
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Idb0a4e2c87962e453a991f0a573155ace6e9bf40
2020-01-16 12:15:04 -08:00
Fraunhofer IIS FDK 9ab63ce151 Prevent negation of INT_MIN in CConcealment_ApplyRandomSign().
Bug: 146937601
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I9747110eca96b37604df996ef5e86ea58e2d8932
2020-01-14 14:53:43 -08:00
Fraunhofer IIS FDK 2334454bc8 Add sanity check for huffman escape sequences in HCR tool.
Bug: 145669389
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Iaa624f3040269b5c84883bc3ee38cad7cd88e54d
2019-12-27 10:22:23 -08:00
Fraunhofer IIS FDK 089d368ddb Prevent signed integer overflows in ELD filterbank, multE2_DinvF_fdk().
Bug: 145669388
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Iaba69b58666833c90e05b296c502ba6509a087a9
2019-12-27 09:01:22 -08:00
Fraunhofer IIS FDK 07b5fd9941 Use one additional bit headroom to prevent signed integer overflow in BuildAdaptiveExcitation().
Bug: 145666984
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I5c881238562c3d9f7cd8d77a8c52f7231126587f
2019-12-27 08:51:59 -08:00
Jean-Michel Trivi fc8faa38d9 FDK: USAC CLpd_Reset uses rate constants
Use constants defined in libAACdec/src/usacdec_const.h

Test: atest DecoderTestXheAac
Change-Id: Idf1aa9fefb92b1abf64f50b044b2490b0d31b426
2019-10-21 15:20:42 -07:00
Fraunhofer IIS FDK ade11a1d6f Prevent signed integer overflows in CLpd_FAC_Mdct2Acelp().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I348fe4be577ac39f961352902d138a8e07982096
2019-10-18 10:58:26 -07:00
Fraunhofer IIS FDK 920ecc7487 Prevent signed integer overflows in CLpd_FAC_Acelp2Mdct().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I216f97b0c75a9076f3963036b098af37b390c5bb
2019-10-18 10:58:01 -07:00
Fraunhofer IIS FDK 3634955ca5 Fix integer overflow in complex multiplication called from CLpd_FAC_Acelp2Mdct().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I7cd234698821cf13b163d323cfd90fdccaaec3c1
2019-10-18 10:57:37 -07:00
Fraunhofer IIS FDK f22eb9c1fa Avoid signed integer overflow in bass_pf_1sf_delay().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I67bfab71987b31601a4666c8cf292f71bcb6799a
2019-10-18 10:57:23 -07:00
Fraunhofer IIS FDK ea9d3a049b Prevent signed integer overflow in filtLP().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I8da32f4794274e2955936ccd42c009485fbe1972
2019-10-18 10:57:05 -07:00
Fraunhofer IIS FDK 2152ae1a5e Suppress integer overflow in lsf_weight_2st() by using 64 bit multiplication with explicit 32 bit integer result.
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I82ce4858688e90abee0c44c4ada34a9a7b08342f
2019-10-15 15:50:10 -07:00
Fraunhofer IIS FDK 3c377e3305 Prevent signed integer overflow in RE8_PPV().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Ic66ac4742d8e466431c5cf09d02b0d9c7f842df2
2019-10-15 15:49:37 -07:00
Fraunhofer IIS FDK 4db9f39f6d Avoid signed integer overflow in E_LPC_f_lsp_a_conversion().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: If2110ad246bb5b57ef76c9cd251874ecd4b05109
2019-10-15 15:49:23 -07:00
Fraunhofer IIS FDK 2d292e9b2d Use SATURATE_LEFT_SHIFT in get_lsppol() to prevent integer overflow.
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Ie9ec52485a52b076a900b111b035289110c004f8
2019-10-15 15:49:00 -07:00
Fraunhofer IIS FDK 4c839c6a90 Fix integer overflow in E_UTIL_preemph().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Iaaa0630e59d8e83e58b25168a3db04304485429b
2019-10-15 15:48:46 -07:00