Commit graph

84 commits

Author SHA1 Message Date
wrapper
1feae4f6e0 again
Some checks failed
CMake / build (push) Has been cancelled
2025-08-15 14:18:49 +07:00
wrapper
90c8770efe fix aot detect
Some checks are pending
CMake / build (push) Waiting to run
2025-08-15 14:13:18 +07:00
wrapper
f398a98363 correct aot
Some checks are pending
CMake / build (push) Waiting to run
2025-08-15 13:13:14 +07:00
wrapper
07e7c9dde8 floating
Some checks failed
CMake / build (push) Has been cancelled
2025-08-06 19:24:37 +07:00
ShashankPathmudi
1f798f1cc5
Fix for UBSAN issue observed with libxaac decoder (#98)
* Fix for UBSAN issue observed with libxaac decoder

Significance:
- This change propogates the error returned from ixheaacd_heaac_mps_apply
to ixheaacd_dec_execute.

Testing:
- All previous fuzzer crashes are tested. No crash observed.
- CTS and Conformance for x86, x86_64, armv7 and armv8 are passing.

* Fix for UBSAN issue observed with libxaac Decoder

Significance:
- Comparison is made against IA_NO_ERROR using 'not equal to', instead of checking for equality with IA_FATAL_ERROR

Testing:
- All previous fuzzer crashes are tested. No crash observed.
- CTS and Conformance for x86, x86_64, armv7 and armv8 are passing.
2025-07-30 12:13:09 +05:30
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
ShashankPathmudi
9b16033d61
Initialize local scratch structure before first use in non-USAC control paths (#89)
Significance:
--------------
- Possibility of accessing uninitialized access to structure members of a local scratch structure uncovered with fuzzer testing.
- The changes in this commit handle such cases.

Bug: ossFuzz:68464
Test: poc in bug
2024-05-16 09:28:38 +05:30
ShashankPathmudi
f17df34651
Fix for Use-of-uninitialized-value in ixheaacd_aacdec_decodeframe (#87)
These changes fix the Use-of-uninitialized-value in ixheaacd_aacdec_decodeframe runtime error
caused due to uninitialized structure members of aac scratch structure.

Bug: ossFuzz:68464
Test: poc in bug
2024-05-10 14:13:17 +02:00
ShashankPathmudi
d880b2f9ee
Decoder Enhancements (#82)
Significance:
========
[x] Aligned buffer access for scratch memory and scratch memory optimization.

Testing:
=====
[x] MSVS Conformance and CTS are passing.
[x] All previous fuzzer crashes are tested. No crash observed.
[x] For platforms, Conformance tested with different combinations.
[x] Tested Conformance with gcc builds for x86, x86_64, armv7 and armv8.
[x] Tested Conformance with clang builds with address and memory sanitizer flags for x86_64 and armv8.
2024-03-29 09:49:01 +05:30
ShashankPathmudi
e6fd2784fc
Decoder Enhancements (#77)
[x] Aligned buffer access for persistent memory.
2024-01-16 21:38:46 +05:30
Shashank Pathmudi
cc7ce80ec3 Fix for write access violation and divide by zero in MPS module 2023-11-27 13:56:59 +05:30
Shashank Pathmudi
2fb847d5e3 Fix for Nested bug in the same thread, aborting
These changes handle the nested bug in the same thread, aborting issue
reported by disabling some code checks which are related to EC.

Bug: ossFuzz:62003
Test: poc in bug
2023-10-20 11:21:05 +05:30
bmdivya100655
088122e748
Combined Workspace for Encoder and Decoder (#33)
* Combined Workspace for Encoder and Decoder

* Addressed review comments and some minor edits

---------

Co-authored-by: Divya B M <100655@ittiam.com>
2023-05-22 20:11:52 +05:30
Nikhil Bhavikatti
2a43ff9ac7 ESBR command line switch support for xHEAAC decoder 2023-05-17 11:27:24 +05:30
Nikhil Bhavikatti
ae104f0711 Restructuring of Decoder 2023-05-15 17:23:01 +05:30
Nikhil Bhavikatti
6a21d80d2d
Fix for crash observed with MSVS x64 build (#28)
* Fixes for runtime errors in error concealment module

* Fix for crash observed with MSVS x64 build

---------

Co-authored-by: Nikhil Bhavikatti <nikhilbhavikatti19@gmail.com>
2023-03-24 13:38:02 +05:30
Shashank Pathmudi
6ce7dc469c Error concealment support for xHEAAC decoder 2023-02-28 11:54:07 +05:30
Nikhil Bhavikatti
b765b0324b Bug fix in ELDv2 module 2023-02-08 08:56:35 +05:30
Nikhil Bhavikatti
db8836921b Fix for signed integer overflow and read access violation in MPS module 2023-02-01 17:00:51 +05:30
Shashank Pathmudi
b9e8ada604 MPS support for xHEAAC decoder 2023-01-23 14:46:59 +05:30
Nikhil Bhavikatti
adf57641aa Fix for Read access memory violation 2022-12-28 16:20:58 +05:30
Shashank Pathmudi
1a52942898 ESBR support for xHEAAC decoder 2022-12-27 09:59:42 +05:30
Nikhil Bhavikatti
be3d58490b Fix for global buffer overflow 2022-12-08 17:56:08 +05:30
Nikhil Bhavikatti
3accfa6001 Error robustness tool addition for xHEAAC decoder 2022-11-29 11:48:54 +05:30
Nikhil Bhavikatti
42a0d6d68c Transform length 960 support for xHEAAC decoder 2022-11-29 11:47:23 +05:30
Nikhil Bhavikatti
c2f16ab1d5 Fix for read access memory violation for extension element pointer 2022-11-02 14:36:33 +05:30
Shashank Pathmudi
b7f88cbb46 DRC configuration updates for xHEAAC decoder 2022-11-02 14:35:50 +05:30
Nikhil Bhavikatti
0e0d0131d2 Fix for read access memory violation in LD MPS process call
Flag added to prevent entering LD MPS process call until MPS
initialization is complete
2022-10-10 10:20:01 +05:30
Nikhil Bhavikatti
c26a26d247 Fix for write access memory violation in USAC process call
Sanity check added to prevent reinitialization when initialization was
complete in previous call
2022-10-10 10:18:27 +05:30
Sowmya Sree Reddy G
270720de5e ELDv2 support for EXHEAAC decoder 2022-10-10 10:15:43 +05:30
Nikhil Bhavikatti
49b1b8f081 Fix for write access memory violation in USAC process call
When there is failure during the init call, decoder_create_done flag
should be reset before calling initialization again.
2022-09-09 13:17:27 +05:30
Nikhil Bhavikatti
dbedfafd12 Fix for write access memory violation in AAC init call
When there is failure during the init call, header_decode_done flag
should be reset before calling initialization again.
2022-09-09 13:12:00 +05:30
Sachin
4c72471cdb Changes to move output sample path from 16bit to 32 bit
AAC Core coder changes to take the output samples as 32 bit
and subject to peak limiter to avoid any clipping , at the
same time maintaining precision.

Bug: 175435457
Test: atest CtsMediaTestCases:DecoderTest
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Test: atest CtsMediaTestCases:DecoderTestXheAac
Test: atest CtsMediaTestCases:DecoderTestAacFormat
Test: atest CtsMediaV2TestCases:CodecDecoderTest
2022-01-20 11:54:35 +05:30
Sachin
e8771b7d14 Update configuration parameter's based on change in values.
Check configuration data obtained after audio Pre-Roll
parsing against current configuration. Update only when
configurations are different.

Bug: 175435457
Test: atest CtsMediaTestCases:DecoderTest
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Test: atest CtsMediaTestCases:DecoderTestXheAac
Test: atest CtsMediaTestCases:DecoderTestAacFormat
Test: atest CtsMediaV2TestCases:CodecDecoderTest
2022-01-20 11:53:05 +05:30
Sachin
a281ecf0cd Update Boost and attenuation values for MPEG-D DRC
Extend API Support to change MPEG-D DRC values for boost
and attenuation from plugin.

Bug: 175435457
Test: atest CtsMediaTestCases:DecoderTest
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Test: atest CtsMediaTestCases:DecoderTestXheAac
Test: atest CtsMediaTestCases:DecoderTestAacFormat
Test: atest CtsMediaV2TestCases:CodecDecoderTest
2022-01-20 11:52:31 +05:30
Sachin
f7ec92a2c9 Obtain Loudness Info from MPEG-4/MPEG-D DRC stream
Extend API support to query loudness Info
obtained from MPEG-4/MPEG-D DRC stream.

Bug: 175435457
Test: atest CtsMediaTestCases:DecoderTest
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Test: atest CtsMediaTestCases:DecoderTestXheAac
Test: atest CtsMediaTestCases:DecoderTestAacFormat
Test: atest CtsMediaV2TestCases:CodecDecoderTest
2022-01-20 11:50:10 +05:30
Rajat Kumar
2f905017d6 Fix for NPD in ixheaacd_init_sbr
Added check for AOT(read from bit stream) mismatch,
between two consecutive execute calls while decoding
LATM header.

Bug: 168429291
Test: poc in bug

Change-Id: I64b3e38c97499b1103c9cc5594742b804e0a3965
2020-09-29 18:11:57 +05:30
Rajat Kumar
bcbd383251 Fix to handle missing checks on error returned
Added missing return checks and converted
functions to void which doesn't return anything
other than zero.

Test: Review
Test: atest android.media.cts.DecoderTest
Bug:131183694

Change-Id: Iea7bb9959fffd7a0e4f345f86581a1328e04a38e
Merged-In: Iea7bb9959fffd7a0e4f345f86581a1328e04a38e
2020-09-10 12:48:42 -07:00
Rajat Kumar
57b4f3eac4 Fix for OOB in external libxaac
Codec initialization is done with AOT 2 (AAC-LC profile),
but AOT changes abruptly to 42 (USAC profile) in execution
leading to access of uninitialized tables. Hence Added a
check for mismatch in AOT during initialization and
AOT during execution.

Bug:150400335
Test: poc in bug

Change-Id: I73ca2bf0f963df7982c1a8371a8fc0c2e3c7cd82
2020-03-29 17:16:45 -07:00
Tripti Tiwari
f034dda6d2 Fix for SEGV in ixheaacd_aacdec_decodeframe function.
For erroneous stream, coupling channel initialization memory
was overlapping with SBR scratch memory usage, causing unwanted
reset of the some of the pointers.
All initialization should take place in persistent memory.
As a fix, replaced scratch with persistent memory for initialization.

Bug:145264510
Test:poc in bug

Change-Id: Iaa757d0e87fd3a0b2f75c5288cfe662f556c871f
2020-03-07 15:07:54 -08:00
Rajat Kumar
0d2d1af703 Fix for heap buffer overflow in set sbr persistent buffer
Maximum CC CHANNEL element supported in xaac decoder
is only two, but we are getting more for this
error stream, leading to heap buffer overflow.
Hence a check is added.

Bug:141344322
Test: poc in bug

Change-Id: Ib63b4c74e66d9e37c85153c87341de0601044bec
2019-11-02 06:55:04 -07:00
Rajat Kumar
8d9d3d1d58 Fix for non-handling of fatal error returned during init.
Fatal error returned from previous init call was not handled
during subsequent init calls. This check has been added here.

Bug:140984035
Bug:140988475
Bug:140986175
Test: poc in bug

Change-Id: I37599ba304bbf137b1a590c1fec7e0da236f7308
2019-10-12 16:28:30 -07:00
TreeHugger Robot
7c44e0aac5 Merge "Adding bound checks in USAC config bit stream parsing" 2019-08-27 20:13:53 +00:00
Ramesh Katuri
ce7b4e93ce Fix for correcting #include delimiters
This CL contains changes to make #include delimiters stying
consistent. For all system files inclusion we will use <> and
all user files we will use ""

Bug: 125443111
Test: compilation
Change-Id: Ie5f609b9bef8357877affb7f48d46df7c387d142
2019-08-26 13:35:44 -07:00
Sushanth Patil
e765682ee7 Fix for heap-buffer-overflow in ixheaacd_samples_sat
Output memory size initialised was not sufficient for the
case when audio preroll is 3 and core_sbr_framelength = 4.

Hence, it has been increased to accomodate for the same.

Bug: 136441188
Test: poc in bug

Change-Id: I4e21395f46f4b16c538bf5522b92ad0836ece67f
2019-07-31 14:04:45 -07:00
Ramesh Katuri
5775ff7635 Adding bound checks in USAC config bit stream parsing
These were added based on code review

Bug:130111727
Bug:131212731

Test: poc in bug

Change-Id: Ibe55885956e12ffacc54d809f67c466e20f0eb4d
2019-07-16 15:21:25 -07:00
TreeHugger Robot
fc905bc6c3 Merge "Fix for stack buffer overflow in ixheaacd_esbr_chirp_fac_calc." 2019-07-08 18:46:41 +00:00
Rajat Kumar
f6b2d77787 Fixes to incorporate latest conformance criteria
Bug:128648229
Test: atest android.media.cts.DecoderTestXheAac
Test: atest android.media.cts.DecoderTestAacDrc
Change-Id: Ic85bacc660c91096e29cd0cbe24323f4a6109c9a
2019-07-03 10:23:20 -07:00
Rajat Kumar
e34ec6918e Fix for stack buffer overflow in ixheaacd_esbr_chirp_fac_calc.
We found that error return was not being handled properly
in ixheaacd_applysbr() function. This led to a wrong value
being propagated which led to a stack buffer overflow.

Also, a flag for checking if any previous frames encountered
a fatal error has been added to ensure that further processing
of frames doesn't happen after encountering a fatal error.

Bug:130219994
Bug:131307285
Test: vendor
Change-Id: If7b3887afcb375dda292082438f61d156027b60e
2019-06-11 15:29:57 -07:00
Sushanth Patil
08225b931e Fix for memcpy param overlap in ixheaacd_applysbr
In ixheaacd_applysbr(), down_samp_sbr was coming as 1 during init
and 0 during execute, which lead to a down sampled(smaller array)
being intialised but memcpy at line 633 in ixheaacd_sbrdecoder.c
tried to do it for a non down sampled array(larger array) causing
a memcpy param overlap.
As a fix a check has been added in ixheaacd_dec_execute() for
down_spamp_sbr flag which should be 0 for AOT 42(USAC).

Bug:130273553
Bug:131278612
Test: vendor
Change-Id: Ide3af2da26fdceb8fa51b2e976ff96a0dba9b7a5
2019-06-11 15:19:11 -07:00