Audio Object type(AOT) should be same across init and
execute calls. This check was missing when AOT is
not SBR and PS and hence added as fix for this bug.
For AOTs, SBR and PS since this value is re-read at
a later point, check already present would be fine.
Bug: 196308693
Test: poc in bug
ixheaacd_mps_subbandtp() was not required for all mps
configurations. Hence, added checks so its called only
when required.
Also, reduced loop counts when res_bands are present.
Added changes to remove redundant computation
loops in ixheaacd_mps_synt_calc,mps hybrid
analysis & synthesis functions based on number
of non-zero qmf bands.
Converted the mps hybrid filt module to float
and reduced the number of multiplications in
ixheaacd_mps_hybrid_filt_type1 & type2 functions
using mathematical rearrangement and look-up table
symmetries.
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
Changes to switch to Expert Panel as measurement system
and Anchor Loudness as measurement method depending on stream.
Bug: 175435457
Test: atest CtsMediaTestCases:DecoderTest
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Test: atest CtsMediaTestCases:DecoderTestXheAac
Test: atest CtsMediaTestCases:DecoderTestAacFormat
Test: atest CtsMediaV2TestCases:CodecDecoderTest
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
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