* 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>
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
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
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 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
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
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
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
str_node[k].time is used as index later, added a check
where its calculated.
Bug:146948608
Test:poc in bug
Change-Id: I35ca08ad19045deca44b5b5c55532a84f5a58ed3
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
target_channel_count read from bit stream is being
used as index without bound check. Hence the check
has been added.
Bug:142693847
Test: poc in bug
Change-Id: I9d6c832e75b9cb78fe4989516d13707f1ecf7f91
Max value of
str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus
is used as index without checking for upper bound.
Hence added a check here.
Bug:144665190
Test:poc in bug
Change-Id: Ibd8dfe91910eb4d7548cf3236065eb38121b60c8
pstr_gain_modifiers->shape_filter_idx is read from
bitstream and used as an index before been checked
for bound. Hence added a check.
Bug:145043907
Test:poc in bug
Change-Id: I9a46c4227017328f2c3aa6e7d911889c01efef91
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
drc_config->drc_instructions_uni_drc_count
+ drc_config->dwnmix_instructions_count is
used as index in the function
impd_drc_gen_instructions_for_drc_off,
without checked for bounds.
Hence the check has been added here.
Bug:143517852
Test: poc in bug
Change-Id: I1134236b421d97097a5deb25dbf889f25e7a29ef
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
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
channel_layout->base_channel_count was not checked
for bounds after it is read from bit stream.
Corresponding check has been added here.
Bug:140979418
Test: poc in bug
Change-Id: I57e6a4ea9a39c64e82c3add0d20a85716ad20cc1
libxaac had few tables which were not declared as constants.
Added const and did corresponding changes to build and
execute.
Bug:128433649
Test: Manual Review
Change-Id: I1babf22a45fbd595c5a9c67804ecdc0317ebb96c
MPEG-D DRC integrated with USAC does work only in
time domain.
Hence removed the above related code in this patch.
Bug:130262151
Test: atest android.media.cts.DecoderTestXheAac
Test: atest android.media.cts.DecoderTestAacDrc
Change-Id: Ib51ef29fb7a1fe7a09718d48e2c9e7cda268ae7b
* changes:
Initialize all allocated memory blocks to zero
Update cfi blacklist to include few more assembly functions
LDR changed to MOV instruction in armv8 and armv7 assemblies