Commit graph

37 commits

Author SHA1 Message Date
akshayragir833
3dfa708b6e
Loudness leveling support for encoder and decoder (#99)
* Loudness leveling support for encoder and decoder

- Addition of loudness leveling support to encoder and
  decoder as per ISO/IEC 23003-4:2020/Amd.2:2023(E)

Testing:

Encoder: Smoke-test

Decoder: CTS and Conformance for x86, x86_64, armv7 and armv8 are
         passing

* Addressed review comments

* Addressed minor nits in documentation

---------

Co-authored-by: Akshay Ragir <100833@ittiam.com>
2025-07-28 17:40:45 +05:30
Sowmya Sree Reddy G
270720de5e ELDv2 support for EXHEAAC decoder 2022-10-10 10:15:43 +05:30
Rajat kumar
f2d380ca2e Fix to handle segv in impd_filter_banks_process
Added check to ensure array size of
buf_interpolation->lpcm_gains does not
exceed allotted size.

Bug: 161819862
Test: poc in bug

Change-Id: I7e554d70ada8d92ee3496c0fbdfc78cee55e4697
2020-09-12 01:21:42 +05:30
TreeHugger Robot
7862de4bd2 Merge "Fix for array out of bound in decoder/drc_src/impd_drc_eq.c" into rvc-dev 2020-03-19 19:07:47 +00:00
Sushanth Patil
40fb6f798f Fix for array out of bound in decoder/drc_src/impd_drc_eq.c
Error return check was missing, which caused an
unchecked value to propagate and lead to array OOB.

Bug: 151407605
Test: poc in bug

Change-Id: I0ab9ced7504314e0a31fbe7138c0b95ecbc8cd84
2020-03-18 20:56:48 +00:00
Rajat Kumar
ed2dbffd88 Fix for array out of bound for type 'ia_filt_cascade_td_struct[4]'
Value is read from the bit stream and used as index
before checking for bounds, added the same as fix here.

Bug: 151412914
Test: poc in bug

Change-Id: I2f484398d87bee0a525e4f31b4f0da4c1b13bb1d
2020-03-18 09:09:45 -07:00
Rajat Kumar
5426a0bf19 Fix for read buffer overflow in impd_filter_banks_process
str_node[k].time is used as index later, added a check
where its calculated.

Bug:146948608
Test:poc in bug

Change-Id: I35ca08ad19045deca44b5b5c55532a84f5a58ed3
2020-03-07 15:00:27 -08:00
TreeHugger Robot
1207285ca0 Merge "Fix for segv in impd_filter_banks_process function" 2020-01-29 20:41:46 +00:00
Rajat kumar
7d0a228c3e Fix for segv in impd_filter_banks_process function
str_node[k].time calculated here is used as an index
to access buf_interpolation->lpcm_gains array. Added a
check here so that the access does not go out of bound.

Bug:145043038
Test:poc in bug

Change-Id: I7620efcfb79e9a34b175b2cdf60c1674c279135d
2020-01-11 17:07:02 -08:00
Rajat Kumar
bdaf57013d Fix for array out of bound access in gain_set_param structure
Added check before accessing the index.

Bug:141289121
Test: poc in bug

Change-Id: Ifd7bfcb2e978317069efea43ba64f2fb60b9e644
2020-01-09 14:48:29 -08:00
TreeHugger Robot
e57f919f8a Merge "Fix to add few bound checks in DRC, based on code review" 2019-11-14 01:43:53 +00:00
Rajat Kumar
c2cb9c2424 Fix to add few bound checks in DRC, based on code review
Added few checks to avoid out of bound access and
and remove few redundant checks based on review.

Bug:130279444
Test: atest android.media.cts.DecoderTestXheAac
Test: atest android.media.cts.DecoderTestAacDrc

Change-Id: If9a7917eea5d68d4c484d02fca4c755ffa6a9123
2019-11-13 14:23:08 -08:00
Rajat Kumar
dc6af3edb4 Fix for array out of bound in drc dynamic payload.
str_spline_nodes->num_nodes was not checked for bound,
before using as index. Added bound check before access.

Bug:141215451
Test: poc in bug

Change-Id: I9cd78035521731a3f338dc52ebf0afc3a3e5d3ff
2019-11-13 14:12:14 -08:00
TreeHugger Robot
322278fed9 Merge "Fix for oobw in impd_manage_eq_complexity() due to eq_set_id" 2019-01-07 19:26:30 +00:00
Ramesh Katuri
56a2e1e9c6 Fix for oobw in impd_dec_slopes in DRC dynamic payload
Bug:118143575
Test: vendor
Change-Id: I35940099dc804a96a5790bf8e8b29df049838a17
2018-12-21 10:43:09 -08:00
Ramesh Katuri
cc2fdf7714 Fix for oobw in impd_manage_eq_complexity() due to eq_set_id
str_eq_instructions->eq_set_id is a 7 bit field read from bit stream,
whose value can be between 0 to 127.eq_set_id_valid_flag[] is an array
of size EQ_INSTRUCTIONS_COUNT_MAX(8).eq_set_id_valid_flag[] array is
accessed using eq_set_id as offset. str_eq_instructions->eq_set_id
value greater than EQ_INSTRUCTIONS_COUNT_MAX is causing OOB write

Bound check is added for str_eq_instructions->eq_set_id

Bug:119263248
Test: vendor
Change-Id: I3e10e4769fd8db130ffed8e5c703480e6a8c4312
2018-11-29 16:18:35 -08:00
Ray Essick
850b4ba6f3 Merge "Fix for OOB write in mpeg-d drc bit stream parsing by adding bound checks" into pi-dev 2018-11-21 17:21:38 +00:00
Ray Essick
1c63dd338e Merge "Fix for OOB write in td filter casecade parsing" into pi-dev 2018-11-20 04:23:25 +00:00
Ramesh Katuri
c9ecca9cd8 Fix for OOB write in equalizer instructions parsing.
Bound check was missing for eq_ch_group_count. Added
as fix.

Bug: 117216549
Test: vendor
Change-Id: Ie36446a3604ae1cb2471dad0a938a96f2b7fff64
2018-11-14 18:01:47 -08:00
Ramesh Katuri
589d21b8a3 Fix for OOB write in mpeg-d drc bit stream parsing by adding bound checks
Added bound checks for all the parameters which are
derived from bit stream.

Bug:116760188
Bug:116019594
Bug:116114402
Test: vendor
Change-Id: I126cd520e7faf2281ab731da559b11c74a9e30b5
2018-11-07 00:55:26 +00:00
Ramesh Katuri
ae206c1fa5 Fix for OOB write in td filter casecade parsing
Add bounds checks for values delivered as N-bits in the bitstream
but that have smaller allowed range in this implementation.

Bug:116617847
Test: vendor
Change-Id: Iad0c020ceacd2226d8e1af688a52a46179a39a2d
2018-11-06 16:46:03 -08:00
Ray Essick
69e7a92ab9 Merge "Fix for OOB write in loudness info set ext" into pi-dev 2018-10-30 21:54:50 +00:00
Ramesh Katuri
6bd9129c03 Fix for OOB write in parsing eq sub band gain vector in drc
bounds checking on subband information.

Bug:115908308
Test: vendor
Change-Id: I8cb2684c7f02b287065ef8b0b1a11c7dcf88e6d1
2018-10-29 16:17:55 -07:00
Ray Essick
e99fa1316d Merge "Fix for stack overflow in impd parse equalizer coefficients" into pi-dev 2018-10-29 21:28:05 +00:00
Ramesh Katuri
7e8303bbaa Fix for OOB in parsing loud equalizer instruction in drc
Bug:116117112
Test: vendor
Change-Id: I9d69d07dc36e8874d1784b4cf1f1a0a4fc99cee7
2018-10-27 13:23:13 -07:00
Ramesh Katuri
06296604c8 Fix for OOB write in loudness info set ext
Bug:117099943
Bug: 117100484
Test: Vendor
Change-Id: Id657372bde3b0218108c3d8aa7f9f898cde5b583
2018-10-27 10:38:12 -07:00
Ramesh Katuri
c14b25793c Fix for stack overflow in impd parse equalizer coefficients
Bug:115907334
Test: vendor
Change-Id: I031ba8064d24bec2db3ea68beea713387ea19762
2018-10-27 10:01:23 -07:00
TreeHugger Robot
3eaf99dd1d Merge "Fix for OOB write in parsing drc ext" into pi-dev 2018-10-08 19:59:34 +00:00
TreeHugger Robot
8630b598a9 Merge "Fix for heap buffer over flow in drc bit stream parsing" into pi-dev 2018-10-03 00:47:21 +00:00
TreeHugger Robot
c7c160e98c Merge "Fix for OOB loudness eq instruction parsing" into pi-dev 2018-10-03 00:38:36 +00:00
Ramesh Katuri
17825d4a75 Fix for OOB write in parsing drc ext
Validate drc coefficient counts as we parse them from the stream.

Bug: 116224432
Test: vendor
Change-Id: I5a78521b8acfcdc7af96b91e5687d4f02ce49e54
2018-10-02 17:00:13 -07:00
Ramesh Katuri
c90eeb6e61 Fix for heap buffer over flow in drc bit stream parsing
Bound values that we parse from the input stream.

Bug: 115375616
Test: vendor
Change-Id: I357d8e19e377fbe5156e5a639ed9ab99cbfeed52
2018-10-02 15:56:02 -07:00
Ramesh Katuri
69a69acbc9 Fix for OOB write in filter block parsing in drc
Bug: 116467350
Bug: 116469592
Test: vendor
Change-Id: I2f7bff1cec3d0d60e9d43217290392bf4e23d207
2018-10-02 15:51:13 -07:00
Ramesh Katuri
cd74db5553 Fix for OOB loudness eq instruction parsing
Bounds checking on value parsed from input stream.

Bug: 116020594
Test: vendor
Change-Id: I915f36ca27b982c8f1b11a533969e40fbff3b765
2018-10-02 15:29:07 -07:00
Ramesh Katuri
b3226ce6f8 Formatting changes
Formatting .c and .h files using clang-format
Formatting .s files

Bug: 80493357
Test: compare object sizes
Change-Id: I38296083c9d2d566a6a2564db2e391e4b2bd43a9
2018-06-07 16:52:19 -07:00
Ray Essick
4908247643 Sanitization fixes from new CTS tests
Updates from vendor to remedy issues exposed by new CTS tests

Bug: 77287124
Test: CTS DecoderTest, DecoderTest{AacDrc,XheAac}

@ Sanitizer fixes in libxaac

Fixes few integer overflow sanitizer errors
Progagate few errors
ENABLE_DRC macro is removed
AMMENDMENT1 macro is removed

Change-Id: Ic61163dfd6318bd4a00ed45e1295c819cb0f637b

@ Add support for audio pre-roll and DRC effect type

Also includes the following
MPEG-D DRC parameters related changes
USAC config switch changes
SBR config switch changes

Bug: 80133175
Change-Id: I0ab25641768cf523b66f7b0fcb4137429c1c4a77

@ Fixed trailing spaces

Change-Id: I32de0c9d3f7237e1fbf8dfef1cac485ef8458173

@ Replaced tabs

Change-Id: Ic741ee13d7b978b37edc27d087903caaa40b8d90
2018-05-25 11:35:52 -07:00
Ray Essick
51aa06e124 Bring xHE-AAC into pi-dev branch
bring the multi-commit integration from master to pi-dev

libxaac multi-arch cleanup

Change-Id: Ibcefa14f439e75f48a54955c9abf1a06c418e41e
Change-Id: Ia7a9b1e4de0add847c136f6f545b81dc8087521d
Change-Id: I12c3f8414dc9971017de223e88f292f8982a5c9b

Fix dependency error in Android.bp
Change-Id: Ic54f688736b3f2a70172676e4cee22aea4cbd705

Localized Android.bp
Change-Id: I68c4fc24fca279104c8ce2129fd4a3ed8d116b9b

Import xHE-AAC decoder from Ittiam
Change-Id: I3c8d124033f967b29d6e384cce5c843ee17a7bb1

Bug: 77287124
Test: build, cts DecoderTest
2018-05-17 14:36:48 -07:00