Code changes to replace sections that work on pointer
arithmetic logic to avoid undefined behavior.
Bug:Based on manual review
Test:xaacdec
Change-Id: I02bcb356d76b11cd2912478c4263d5918c37e1a6
DRC should not permit the configurations that
exceed the total supported complexity.
Bug: 167279883
Test: poc in bug
Change-Id: Icffa42cdcd9184d434b7a0bfa1b11ebd5ec4af71
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
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
Add necessary checks to avoid any possible array
out of bounds operation in the impd_drc_get_gain
function.
Bug: 161820233
Test: poc in bug
Change-Id: Ie55fbbc18c76f224983d1032641de4df4dce3fb3
Header decode is done with AOT 2 (AAC-LC profile),
but due to corrupted nature of input file AOT is read
as 42 (USAC profile) after few memory/table initializations.
As fix, modified the check to prevent an attempt
to change AOT in mid file.
Bug: 160389683
Test: poc in bug
Change-Id: Id95aa74b0833321b29b602d97b14c5a5580ef7fc
These functions may be called by either ARM or Thumb, and LLD has gotten
more strict. The global symbols must be marked with the proper type
annotations in order for the relocations to be correct.
ld.lld: error: external/libxaac/decoder/armv7/ixheaacd_qmf_dec_armv7.c:353:(.text.ixheaacd_esbr_cos_sin_mod+0x3A0): branch and link relocation: R_ARM_THM_CALL to non STT_FUNC symbol: ixheaacd_esbr_cos_sin_mod_loop2 interworking not performed; consider using directive '.type ixheaacd_esbr_cos_sin_mod_loop2, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required
Bug: 155835175
Test: mm for ARM based build
Change-Id: I063cd9716402aaaebbd4273776eadb70314bf5f9
For loop was redundant as the execution
was being done for once. Hence removed in the
present fix.
Bug: 156359506
Test: Build with -Wunreachable-code-loop-increment flag added
Test: xaacdec
Change-Id: I252551cff09fa9b033ef715127ee153645e3055f
Changed 64-bit operations used for saturating the
output pcm to 32 bit operations targeted towards
32-bit/armv7 architecture.
Bug: 154143053
Test: xaacdec
Change-Id: I3914f5a92feee592626fb53ca7e24b60dda59db4
Some computation were not required when mps and sbr are present.
Added a check to remove them.
Bug: 154143053
Test: xaacdec
Change-Id: I5f7722b6e045031df0f37279441946f014953443
Enough size was not allocated for DRC payload.
Added appropriate size to persistence memory to accommodate maximum
length of DRC payload data. Also added reset for bit-handler elements
after execute call.
Bug:141290162
Test: poc in bug
Change-Id: I61176076056899310a3306818cd5ad4624a4bab0
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
if (iEnd == iStart) is true until end line of loop,
and (drc_gain_last == shape_filter_block[g].drc_gain_last)
is also true, this make iEnd unchanged for ever
and the while loop will go into infinite iterations.
Hence added a check to break for the same.
Bug:148433653
Bug:151817831
Test:poc in bug
Change-Id: I2a59cde98abee0f28510a5b50ef44b3efd02c079
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
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
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
str_node[k].time is used as index later, added a check
where its calculated.
Bug:146948608
Test:poc in bug
Change-Id: I35ca08ad19045deca44b5b5c55532a84f5a58ed3
Value of bs_decorr_config = 3 is not supported.
A check has been added for the same.
Bug: 136063852
Test: manual review
Change-Id: Idd2309e9d0f6d346fb5c9227bed1124d622e6f7e
When ixheaacd_drc_offset comes negative, we read
backward in bitbuffer. There was no bound check to
make sure it did not go beyond the start of bitbuffer.
This caused a SEGV.
As a fix, bound check has been added.
Bug:144134845
Test: poc in bug
Change-Id: I94c4362f26fdb463eb07f5006d0f36860aad8128
Variable num_gain_max_values was used as index in
impd_init_table function without checked
for bounds. Added check to prevent out of bound array
access.
Bug:141524702
Test: poc in bug
Change-Id: Ia902153ef614db6dbd002572cdbdb62421580588
(cherry picked from commit 566b69f066)
Index k is incremented and used as an index of
selection_candidate_info_step_2 array. k can be
max (str_drc_instruction_str->dwnmix_id_count *
selection_candidate_step_2_count), this can be
more than max size of selection_candidate_info_step_2
array.
Hence added a check before assignment as fix.
Bug:147331996
Test:poc in bug
Change-Id: I1ffa88eddfcef93ab15a08599270924d54cdf1de
ptr_sbr_qmf->filter_states memory is initialized based on
down_sample_flag. But it's used irrespective of
down_sample_flag values for few testcases.
Therefore assigned maximum memory to
ptr_sbr_qmf->filter_states as a fix in the current CL.
Bug: 147028944
Test: poc in bug
Change-Id: I84f9976645a53e09d638d214730801af4156962e