Commit graph

533 commits

Author SHA1 Message Date
Akshay Ragir
ee7ac593ae WIP: Loudness leveling support for decoder 2025-07-23 11:28:03 +05:30
ShashankPathmudi
2aea9e799e
Fix clang-16 (x86_64) build warnings and SBR range start frequency border for 4:1 system issue (#92)
Significance:
--------------
- Fixes all the the warnings observed for libxaac decoder library when compiled with clang-16 (x86_64).
- Adjusts the conditional check to validate the 4:1 system's SBR range start frequency border.

Testing:
---------
- All previous fuzzer crashes are tested. No crash observed.
- CTS and Conformance for x86, x86_64, armv7 and armv8 are passing.
2024-07-17 14:47:27 +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
12e2e71b24
Fix for Heap-buffer-overflow in Codec__decodeXAACStream (#85)
These changes fix the Heap-buffer-overflow in Codec__decodeXAACStream runtime error
caused due to unsupported frame length type configuration for LATM streams.

Bug: ossFuzz:67767
Test: poc in bug
2024-04-16 17:58:40 +05:30
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
ShashankPathmudi
59ab6ada33
Fix for global buffer overflow in MPS module (#74) 2023-12-29 17:16:17 +05:30
Shashank Pathmudi
0889ef458d Fix for potential divide-by-zero issue observed during code inspection 2023-12-22 19:25:42 +05:30
ShashankPathmudi
daf21a984e
Fix for divide-by-zero in ixheaacd_mps_frame_decode (#71)
These changes handle the divide-by-zero runtime error reported
while calculating the inverse of difference between consecutive
parameter time slot.

Bug: ossFuzz:65191
Test: poc in bug
2023-12-22 19:03:04 +05:30
Shashank Pathmudi
2624ae15b4 Fix for Heap-buffer-overflow WRITE 8 in ixheaacd_init_sbr
These changes handle the Heap-buffer-overflow WRITE 8 runtime error reported
due to unsupported channel configuration for USAC.

Bug: ossFuzz:64960
Test: poc in bug
2023-12-18 16:20:32 +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
Harish Mahendrakar
10a262f43c Android.bp: Fix riscv64 build for decoder
- Add appropriate entries in Android.bp for riscv64 for decoder
- Add missing function in function_selector_generic.c
2023-10-25 21:48:43 -07:00
Shashank Pathmudi
60b6534581 Fix for index-out-of-bounds in ixheaacd_smooth_m1m2
These changes handle the index-out-of-bounds runtime error reported
when the value of arbitrary downmix residual bands is greater than or equal
to the number of parameter bands.

Bug: ossFuzz:63564
Test: poc in bug
2023-10-26 10:17:24 +05:30
Shashank Pathmudi
947ad9f32b Fix for divide-by-zero in impd_parse_dwnmix_instructions
These changes handle the divide-by-zero runtime error reported
while calculating the downmix coefficients because
base channel count was coming zero.

Bug: ossFuzz:63420
Test: poc in bug
2023-10-26 10:17:24 +05:30
Shashank Pathmudi
b1a200212e Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error
reported while calculating energy tone.

Bug: ossFuzz:63248
Test: poc in bug
2023-10-20 11:21:05 +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
ShashankPathmudi
87abf1f1b0
Decoder bug fixes (#60)
* Fix for divide-by-zero in ixheaacd_sbr_env_calc

These changes handle the divide-by-zero runtime error reported
while calculating the energy because the consecutive frequency bands
were coming same.

Bug: ossFuzz:63038
Test: poc in bug

* Fix for divide-by-zero in ixheaacd_calc_stop_band

These changes handle the divide-by-zero runtime error reported
because sampling frequency comes out to be zero.

Bug: ossFuzz:63138
Test: poc in bug
2023-10-11 21:03:42 +05:30
Shashank Pathmudi
2d79f3ac59 Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error reported
while calculating energy gain.

Bug: ossFuzz:62903
Test: poc in bug
2023-10-05 16:01:11 +05:30
Shashank Pathmudi
0c86a5d8fa Fix for divide-by-zero in ixheaacd_lsf_weight_2st_flt
These changes handle the divide-by-zero runtime error reported
while calculating LSF weights.

Bug: ossFuzz:62778
Test: poc in bug
2023-10-05 16:01:11 +05:30
Shashank Pathmudi
f48c9bea64 Fix for divide-by-zero in ixheaacd_pre_processing
These changes handle the divide-by-zero runtime error reported
while calculating the energy because the start sample and end sample
were coming same.

Bug: ossFuzz:62766
Test: poc in bug
2023-09-29 18:08:43 +05:30
Shashank Pathmudi
3c8329953c Fix for index-out-of-bounds in ixheaacd_res_ctns_apply
These changes handle the index-out-of-bounds runtime error
reported when the value of residual sampling frequency index
is greater than max residual sampling frequency index.

Bug: ossFuzz:62707
Test: poc in bug
2023-09-29 18:08:43 +05:30
Shashank Pathmudi
11669841e3 Fix for divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the divide-by-zero runtime error
reported while calculating the border vector value because
the value read from bitstream was coming greater the expected value.

Bug: ossFuzz:62633
Test: poc in bug
2023-09-29 18:08:43 +05:30
Yash Patil
29692f1804 Fix for Divide-by-zero in ixheaacd_sbr_env_calc
These changes handle the Divide-by-zero runtime error reported
while calculating the energy estimation because the
consecutive border vectors were coming same.

Bug: ossFuzz:62282
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
f5edac2d5b Fix for Undefined-shift in ixheaacd_intensity_stereo_process
These changes handle the Undefined-shift runtime error reported
because the value of shift was coming greater than maximum expected value.

Bug: ossFuzz:62328
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
624669dfe1 Fix for Undefined-shift in ixheaacd_conv_ergtoamplitude_dec
These changes handle the Undefined-shift runtime error reported
because the value of shift was coming greater than maximum expected value.

Bug: ossFuzz:62339
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
5b0bee231b Fix for Use-of-uninitialized-value in impd_drc_set_preselection
These changes handles the runtime error reported when
one of the buffer was not initialized correctly.

Bug: ossFuzz:62388
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
d5356896ef Fix for Undefined-shift in ixheaacd_fd_frm_dec
These changes handle the Undefined-shift runtime error reported
when value of shift becomes negative.

Bug: ossFuzz:62332
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
9ecc713da9 Fix for Undefined-shift in ixheaacd_hcr_decoder
These changes handle the Undefined shift runtime error reported
when bit position in huffman codeword reordering operation becomes
negative.

Bug: ossFuzz:62408
Test: poc in bug
2023-09-22 19:04:19 +05:30
Yash Patil
8da251033e Fix for Index-out-of_bound in ixheaacd_parse_extension_frame
These changes handle Index-out-of_bound runtime error
reported when the value of param bands is greater
than max param bands. This is resolved by adding
condition check to see if the value is greater than supported value.

Bug: ossFuzz:62274
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
5d9ed17328 Fix for Undefined-shift in ixheaacd_fix_mant_exp_add
These changes handle the Undefined-shift runtime error
reported because the value of shift was coming greater than
maximum expected value.

Bug: ossFuzz:61705
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
d460d6f9fd Fix for Undefined-shift in ixheaacd_res_c_block_decode_huff_word2_2
These changes handle the runtime error reported because
the value of bit position was greater than maximum
expected value.

Bug: ossFuzz:62133
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
596d791059 Fix for Divide-by-zero in ixheaacd_lpc_to_td
This changes handle the Divide-by-zero runtime error
reported while calculating the gain because
imaginary and real data were zero.

Bug: ossFuzz:61788
Test: poc in bug
2023-09-15 19:17:37 +05:30
Yash Patil
632e575ee6 Fix for undefined shift in ixheaacd_gen_rand_vec
These changes handle the Undefined-shift runtime error
reported because the value of scale exponent was coming
less than -31.

Bug: ossFuzz:61684
Test: poc in bug
2023-09-11 18:49:39 +05:30
Yash Patil
bbb4630478 Fix for Undefined-shift in ixheaacd_windowing_short2
These changes handle the Undefined-shift runtime error
reported because the value of shift was coming
greater than 31.

Bug: ossFuzz:61678
Test: poc in bug
2023-09-11 18:49:02 +05:30
Yash Patil
b32c803df9 Fix for undefined shift in ixheaacd_read_scale_factor_data
These changes handle the Undefined-shift runtime error
reported because the value of read word was being shifted
by a value greater than 31.

Bug: ossFuzz:61676, 61679
Test: poc in bug
2023-09-11 18:48:11 +05:30
Yash Patil
6cd0c1410e Fix for undefined shift in ducker_apply_71
These changes handle the Undefined-shift
runtime error reported because value of Q factor
calculated was negative when denominator is zero in division operation.

Bug: ossFuzz:61986
Test: poc in bug
2023-09-11 18:47:36 +05:30
Yash Patil
e0a0eabeae Fix for divide by zero in ixheaacd_sbr_env_calc
These changes handle the Divide-by-zero runtime error
reported while calculating the energy with two consecutive
border values equal.

Bug: ossFuzz:61696
Test: poc in bug
2023-09-11 18:47:02 +05:30
Yash Patil
29d968bd4c Fix for undefined shift in ducker_apply
These changes handle the Undefined-shift
runtime error reported because value of Q factor
calculated was negative when denominator is zero in division operation.

Bug: ossFuzz:61698
Test: poc in bug
2023-09-01 16:38:08 +05:30
Yash Patil
91dbf5577d Fix for divide by zero in ixheaacd_mps_frame_decode
These changes handle the Divide-by-zero
runtime error by appropriately initializing the parameter slots.

Bug: ossFuzz:61694
Test: poc in bug
2023-09-01 16:38:08 +05:30
Yash Patil
3479c64b90 Fix for Global-buffer-overflow READ 2 in ixheaacd_res_ctns_apply
These changes handle the Global-buffer-overflow
runtime error reported because tns data filter was getting initialised
inappropriately and was returning an error which was not propagated up.

Bug: ossFuzz:61816
Test: poc in bug
2023-09-01 16:38:08 +05:30
Yash Patil
89310eebc8 Fix for index out of bounds in ixheaacd_calc_m1m2_7272
These changes handle the Index-out-of-bounds
runtime error reported when there is invalid access for some buffers.
It is prevented by propagating error appropriately.

Bug: ossFuzz:61789
Test: poc in bug
2023-09-01 16:38:08 +05:30
Yash Patil
e3f38372d0 Fix for use of uninitialized value in ixheaacd_cos_sin_mod
These changes handle the Use-of-uninitialized-value
runtime error reported because local buffer was not initialized
in complex analysis QMF filter block leading to uninitialized access.

Bug: ossFuzz:61691
Test: poc in bug
2023-09-01 16:38:08 +05:30
Nikhil Bhavikatti
797de4d1e9
USAC along with DRC support for libxaac encoder (#37) 2023-07-14 13:04:15 +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
Harish Mahendrakar
0233db3f5e cleanup cmake files 2023-04-28 09:34:42 +05:30
Nikhil Bhavikatti
18930ce001 Fix for OOB issue in MPS module 2023-04-26 09:37:56 +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