aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2023-03-16 23:29:52 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-16 23:29:52 +0000
commit3355bf892865778b2bd2844fcc69f5b9a9e7d6cc (patch)
tree55e84d53fc672eb0fd5466a65d898ce8e743e60e
parentce8128df74ce9927c4fd174445c6f3f4197e0c2b (diff)
parent36037cfe23bd1866963fcd5ea74879ca5cfec986 (diff)
downloadlibxaac-3355bf892865778b2bd2844fcc69f5b9a9e7d6cc.tar.gz
Update to v0.1.5 from upstream project am: 249fac62d7 am: 36037cfe23
Original change: https://android-review.googlesource.com/c/platform/external/libxaac/+/2483138 Change-Id: Ib407a809e455275844aa8dbe549fbba86b3c434d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp142
-rw-r--r--CMakeLists.txt177
-rw-r--r--LICENSE14
-rw-r--r--METADATA8
-rw-r--r--README.md116
-rw-r--r--cmake/toolchains/aarch32_toolchain.cmake11
-rw-r--r--cmake/toolchains/aarch64_toolchain.cmake19
-rw-r--r--cmake/utils.cmake54
-rw-r--r--decoder/CMakeLists.txt145
-rw-r--r--decoder/armv7/CMakeLists.txt66
-rw-r--r--decoder/armv7/ixheaacd_function_selector_armv7.c4
-rw-r--r--decoder/armv7/ixheaacd_qmf_dec_armv7.c45
-rw-r--r--decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s10
-rw-r--r--decoder/armv8/CMakeLists.txt27
-rw-r--r--decoder/armv8/ixheaacd_function_selector_armv8.c4
-rw-r--r--decoder/armv8/ixheaacd_qmf_dec_armv8.c55
-rw-r--r--decoder/drc_src/CMakeLists.txt30
-rw-r--r--decoder/generic/ixheaacd_function_selector_generic.c3
-rw-r--r--decoder/generic/ixheaacd_qmf_dec_generic.c45
-rw-r--r--decoder/ixheaacd_Windowing.c14
-rw-r--r--decoder/ixheaacd_aac_config.h111
-rw-r--r--decoder/ixheaacd_aac_ec.c457
-rw-r--r--decoder/ixheaacd_aac_imdct.c168
-rw-r--r--decoder/ixheaacd_aac_imdct.h2
-rw-r--r--decoder/ixheaacd_aac_rom.c229
-rw-r--r--decoder/ixheaacd_aac_rom.h1
-rw-r--r--decoder/ixheaacd_aac_tns.c4
-rw-r--r--decoder/ixheaacd_aacdec.h9
-rw-r--r--decoder/ixheaacd_aacdecoder.c1010
-rw-r--r--decoder/ixheaacd_aacpluscheck.c124
-rw-r--r--decoder/ixheaacd_acelp_bitparse.c324
-rw-r--r--decoder/ixheaacd_acelp_decode.c126
-rw-r--r--decoder/ixheaacd_acelp_info.h4
-rw-r--r--decoder/ixheaacd_acelp_mdct.c23
-rw-r--r--decoder/ixheaacd_acelp_tools.c2
-rw-r--r--decoder/ixheaacd_adts_crc_check.c20
-rw-r--r--decoder/ixheaacd_api.c1129
-rw-r--r--decoder/ixheaacd_arith_dec.c65
-rw-r--r--decoder/ixheaacd_arith_dec.h2
-rw-r--r--decoder/ixheaacd_basic_op.h52
-rw-r--r--decoder/ixheaacd_basic_ops16.h102
-rw-r--r--decoder/ixheaacd_basic_ops32.h100
-rw-r--r--decoder/ixheaacd_basic_ops40.h179
-rw-r--r--decoder/ixheaacd_basic_ops_arr.h10
-rw-r--r--decoder/ixheaacd_bit_extract.h8
-rw-r--r--decoder/ixheaacd_bitbuffer.c10
-rw-r--r--decoder/ixheaacd_bitbuffer.h2
-rw-r--r--decoder/ixheaacd_block.c69
-rw-r--r--decoder/ixheaacd_channel.c57
-rw-r--r--decoder/ixheaacd_channel.h4
-rw-r--r--decoder/ixheaacd_channelinfo.h2
-rw-r--r--decoder/ixheaacd_cnst.h1
-rw-r--r--decoder/ixheaacd_common_initfuncs.c9
-rw-r--r--decoder/ixheaacd_common_lpfuncs.c55
-rw-r--r--decoder/ixheaacd_common_rom.c3
-rw-r--r--decoder/ixheaacd_config.h6
-rw-r--r--decoder/ixheaacd_constants.h12
-rw-r--r--decoder/ixheaacd_create.c77
-rw-r--r--decoder/ixheaacd_create.h1
-rw-r--r--decoder/ixheaacd_decode_main.c288
-rw-r--r--decoder/ixheaacd_defines.h1
-rw-r--r--decoder/ixheaacd_definitions.h10
-rw-r--r--decoder/ixheaacd_drc_data_struct.h1
-rw-r--r--decoder/ixheaacd_drc_dec.h5
-rw-r--r--decoder/ixheaacd_drc_freq_dec.c107
-rw-r--r--decoder/ixheaacd_dsp_fft32x32s.h12
-rw-r--r--decoder/ixheaacd_ec.h45
-rw-r--r--decoder/ixheaacd_ec_defines.h47
-rw-r--r--decoder/ixheaacd_ec_rom.c32
-rw-r--r--decoder/ixheaacd_ec_rom.h28
-rw-r--r--decoder/ixheaacd_ec_struct_def.h55
-rw-r--r--decoder/ixheaacd_env_calc.c48
-rw-r--r--decoder/ixheaacd_env_dec.c202
-rw-r--r--decoder/ixheaacd_env_dec.h31
-rw-r--r--decoder/ixheaacd_env_extr.c260
-rw-r--r--decoder/ixheaacd_env_extr.h21
-rw-r--r--decoder/ixheaacd_env_extr_part.h5
-rw-r--r--decoder/ixheaacd_error_codes.h176
-rw-r--r--decoder/ixheaacd_esbr_envcal.c160
-rw-r--r--decoder/ixheaacd_esbr_polyphase.c96
-rw-r--r--decoder/ixheaacd_esbr_rom.c2757
-rw-r--r--decoder/ixheaacd_esbr_rom.h38
-rw-r--r--decoder/ixheaacd_ext_ch_ele.c563
-rw-r--r--decoder/ixheaacd_fft.c204
-rw-r--r--decoder/ixheaacd_fft_ifft_32x32.c1587
-rw-r--r--decoder/ixheaacd_fft_ifft_32x32_rom.c1210
-rw-r--r--decoder/ixheaacd_fft_ifft_rom.h31
-rw-r--r--decoder/ixheaacd_freq_sca.c11
-rw-r--r--decoder/ixheaacd_func_def.h9
-rw-r--r--decoder/ixheaacd_function_selector.h20
-rw-r--r--decoder/ixheaacd_fwd_alias_cnx.c31
-rw-r--r--decoder/ixheaacd_hbe_dft_trans.c941
-rw-r--r--decoder/ixheaacd_hbe_trans.c14
-rw-r--r--decoder/ixheaacd_hcr.h12
-rw-r--r--decoder/ixheaacd_headerdecode.c435
-rw-r--r--decoder/ixheaacd_headerdecode.h7
-rw-r--r--decoder/ixheaacd_huff_code_reorder.c9
-rw-r--r--decoder/ixheaacd_hybrid.h21
-rw-r--r--decoder/ixheaacd_imdct.c134
-rw-r--r--decoder/ixheaacd_info.h2
-rw-r--r--decoder/ixheaacd_init_config.c178
-rw-r--r--decoder/ixheaacd_initfuncs.c22
-rw-r--r--decoder/ixheaacd_interface.h4
-rw-r--r--decoder/ixheaacd_latmdemux.c22
-rw-r--r--decoder/ixheaacd_latmdemux.h6
-rw-r--r--decoder/ixheaacd_ld_mps_config.c19
-rw-r--r--decoder/ixheaacd_ld_mps_dec.c25
-rw-r--r--decoder/ixheaacd_ld_mps_dec.h10
-rw-r--r--decoder/ixheaacd_longblock.c16
-rw-r--r--decoder/ixheaacd_lpc.c213
-rw-r--r--decoder/ixheaacd_lpc_dec.c62
-rw-r--r--decoder/ixheaacd_lpfuncs.c32
-rw-r--r--decoder/ixheaacd_lpp_tran.c30
-rw-r--r--decoder/ixheaacd_lt_predict.c8
-rw-r--r--decoder/ixheaacd_lt_predict.h9
-rw-r--r--decoder/ixheaacd_main.h74
-rw-r--r--decoder/ixheaacd_memory_standards.h7
-rw-r--r--decoder/ixheaacd_mps_aac_struct.h94
-rw-r--r--decoder/ixheaacd_mps_apply_common.c112
-rw-r--r--decoder/ixheaacd_mps_apply_common.h28
-rw-r--r--decoder/ixheaacd_mps_apply_m1.c258
-rw-r--r--decoder/ixheaacd_mps_apply_m2.c497
-rw-r--r--decoder/ixheaacd_mps_basic_op.h393
-rw-r--r--decoder/ixheaacd_mps_bitdec.c2482
-rw-r--r--decoder/ixheaacd_mps_bitdec.h80
-rw-r--r--decoder/ixheaacd_mps_blind.c427
-rw-r--r--decoder/ixheaacd_mps_blind.h29
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_common.c930
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_common.h52
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_emm.c189
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_515x.c463
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c324
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c620
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_727x.c833
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_757x.c212
-rw-r--r--decoder/ixheaacd_mps_calc_m1m2_tree_config.h35
-rw-r--r--decoder/ixheaacd_mps_dec.c788
-rw-r--r--decoder/ixheaacd_mps_dec.h697
-rw-r--r--decoder/ixheaacd_mps_decor.h52
-rw-r--r--decoder/ixheaacd_mps_decorr.c723
-rw-r--r--decoder/ixheaacd_mps_defines.h33
-rw-r--r--decoder/ixheaacd_mps_get_index.c61
-rw-r--r--decoder/ixheaacd_mps_get_index.h27
-rw-r--r--decoder/ixheaacd_mps_huff_tab.h60
-rw-r--r--decoder/ixheaacd_mps_hybfilter.h36
-rw-r--r--decoder/ixheaacd_mps_hybrid_filt.c924
-rw-r--r--decoder/ixheaacd_mps_initfuncs.c1272
-rw-r--r--decoder/ixheaacd_mps_interface.h16
-rw-r--r--decoder/ixheaacd_mps_m1m2.h33
-rw-r--r--decoder/ixheaacd_mps_m1m2_common.c281
-rw-r--r--decoder/ixheaacd_mps_macro_def.h216
-rw-r--r--decoder/ixheaacd_mps_mdct_2_qmf.c1848
-rw-r--r--decoder/ixheaacd_mps_mdct_2_qmf.h65
-rw-r--r--decoder/ixheaacd_mps_nlc_dec.h19
-rw-r--r--decoder/ixheaacd_mps_parse.c305
-rw-r--r--decoder/ixheaacd_mps_poly_filt.c33
-rw-r--r--decoder/ixheaacd_mps_polyphase.c1182
-rw-r--r--decoder/ixheaacd_mps_polyphase.h20
-rw-r--r--decoder/ixheaacd_mps_pre_mix.c257
-rw-r--r--decoder/ixheaacd_mps_process.c379
-rw-r--r--decoder/ixheaacd_mps_process.h25
-rw-r--r--decoder/ixheaacd_mps_res.h34
-rw-r--r--decoder/ixheaacd_mps_res_block.c1064
-rw-r--r--decoder/ixheaacd_mps_res_block.h56
-rw-r--r--decoder/ixheaacd_mps_res_channel.c393
-rw-r--r--decoder/ixheaacd_mps_res_channel.h30
-rw-r--r--decoder/ixheaacd_mps_res_channel_info.c97
-rw-r--r--decoder/ixheaacd_mps_res_channelinfo.h33
-rw-r--r--decoder/ixheaacd_mps_res_huffman.h59
-rw-r--r--decoder/ixheaacd_mps_res_longblock.c233
-rw-r--r--decoder/ixheaacd_mps_res_pns_js_thumb.c175
-rw-r--r--decoder/ixheaacd_mps_res_pulsedata.c54
-rw-r--r--decoder/ixheaacd_mps_res_pulsedata.h27
-rw-r--r--decoder/ixheaacd_mps_res_rom.h89
-rw-r--r--decoder/ixheaacd_mps_res_tns.c152
-rw-r--r--decoder/ixheaacd_mps_res_tns.h39
-rw-r--r--decoder/ixheaacd_mps_reshape_bb_env.c587
-rw-r--r--decoder/ixheaacd_mps_reshape_bb_env.h40
-rw-r--r--decoder/ixheaacd_mps_rom.c13983
-rw-r--r--decoder/ixheaacd_mps_smoothing.c545
-rw-r--r--decoder/ixheaacd_mps_smoothing.h30
-rw-r--r--decoder/ixheaacd_mps_struct_def.h397
-rw-r--r--decoder/ixheaacd_mps_tables.h36
-rw-r--r--decoder/ixheaacd_mps_temp_process.c1187
-rw-r--r--decoder/ixheaacd_mps_temp_reshape.c15
-rw-r--r--decoder/ixheaacd_mps_tonality.c432
-rw-r--r--decoder/ixheaacd_mps_tonality.h27
-rw-r--r--decoder/ixheaacd_mps_tp_process.h38
-rw-r--r--decoder/ixheaacd_multichannel.c54
-rw-r--r--decoder/ixheaacd_multichannel.h8
-rw-r--r--decoder/ixheaacd_peak_limiter.c134
-rw-r--r--decoder/ixheaacd_peak_limiter_struct_def.h10
-rw-r--r--decoder/ixheaacd_pns_js_thumb.c11
-rw-r--r--decoder/ixheaacd_process.c406
-rw-r--r--decoder/ixheaacd_ps_bitdec.h7
-rw-r--r--decoder/ixheaacd_ps_dec.c3
-rw-r--r--decoder/ixheaacd_ps_dec.h186
-rw-r--r--decoder/ixheaacd_ps_dec_flt.c1224
-rw-r--r--decoder/ixheaacd_qmf_dec.c31
-rw-r--r--decoder/ixheaacd_qmf_dec.h20
-rw-r--r--decoder/ixheaacd_qmf_poly.h4
-rw-r--r--decoder/ixheaacd_rev_vlc.c31
-rw-r--r--decoder/ixheaacd_rom.c44
-rw-r--r--decoder/ixheaacd_sbr_const.h9
-rw-r--r--decoder/ixheaacd_sbr_dec.c457
-rw-r--r--decoder/ixheaacd_sbr_dec.h145
-rw-r--r--decoder/ixheaacd_sbr_payload.h4
-rw-r--r--decoder/ixheaacd_sbr_rom.c1127
-rw-r--r--decoder/ixheaacd_sbr_rom.h69
-rw-r--r--decoder/ixheaacd_sbrdec_initfuncs.c163
-rw-r--r--decoder/ixheaacd_sbrdec_lpfuncs.c252
-rw-r--r--decoder/ixheaacd_sbrdecoder.c1377
-rw-r--r--decoder/ixheaacd_sbrdecoder.h30
-rw-r--r--decoder/ixheaacd_sbrqmftrans.h16
-rw-r--r--decoder/ixheaacd_spectrum_dec.c16
-rw-r--r--decoder/ixheaacd_stereo.c17
-rw-r--r--decoder/ixheaacd_struct_def.h52
-rw-r--r--decoder/ixheaacd_tcx_fwd_alcnx.c105
-rw-r--r--decoder/ixheaacd_tcx_fwd_mdct.c10
-rw-r--r--decoder/ixheaacd_td_mdct.h4
-rw-r--r--decoder/ixheaacd_thumb_ps_dec.c3
-rw-r--r--decoder/ixheaacd_tns.c2
-rw-r--r--decoder/ixheaacd_usac_ec.c642
-rw-r--r--decoder/ixheaacd_vec_baisc_ops.h2
-rw-r--r--decoder/ixheaacd_windows.h5
-rw-r--r--decoder/x86/CMakeLists.txt5
-rw-r--r--decoder/x86/ixheaacd_function_selector_x86.c4
-rw-r--r--decoder/x86_64/CMakeLists.txt5
-rw-r--r--decoder/x86_64/ixheaacd_function_selector_x86_64.c4
-rw-r--r--fuzzer/CMakeLists.txt21
-rw-r--r--fuzzer/README.md15
-rw-r--r--test/CMakeLists.txt24
-rw-r--r--test/ixheaacd_error.c104
-rw-r--r--test/ixheaacd_main.c465
-rw-r--r--test/ixheaacd_metadata_read.c2
235 files changed, 48876 insertions, 11676 deletions
diff --git a/Android.bp b/Android.bp
index 162b162..4558978 100644
--- a/Android.bp
+++ b/Android.bp
@@ -38,6 +38,7 @@ cc_library_static {
srcs: [
"decoder/ixheaacd_aacdecoder.c",
"decoder/ixheaacd_aacpluscheck.c",
+ "decoder/ixheaacd_aac_ec.c",
"decoder/ixheaacd_aac_imdct.c",
"decoder/ixheaacd_aac_rom.c",
"decoder/ixheaacd_aac_tns.c",
@@ -50,6 +51,7 @@ cc_library_static {
"decoder/ixheaacd_arith_dec.c",
"decoder/ixheaacd_avq_dec.c",
"decoder/ixheaacd_avq_rom.c",
+ "decoder/ixheaacd_basic_funcs.c",
"decoder/ixheaacd_basic_ops.c",
"decoder/ixheaacd_bitbuffer.c",
"decoder/ixheaacd_block.c",
@@ -59,48 +61,89 @@ cc_library_static {
"decoder/ixheaacd_common_rom.c",
"decoder/ixheaacd_create.c",
"decoder/ixheaacd_decode_main.c",
+ "decoder/ixheaacd_drc_freq_dec.c",
"decoder/ixheaacd_dsp_fft32x32s.c",
+ "decoder/ixheaacd_ec_rom.c",
"decoder/ixheaacd_env_calc.c",
"decoder/ixheaacd_env_dec.c",
"decoder/ixheaacd_env_extr.c",
"decoder/ixheaacd_esbr_envcal.c",
+ "decoder/ixheaacd_esbr_fft.c",
"decoder/ixheaacd_esbr_polyphase.c",
"decoder/ixheaacd_esbr_rom.c",
- "decoder/ixheaacd_esbr_fft.c",
"decoder/ixheaacd_ext_ch_ele.c",
"decoder/ixheaacd_fft.c",
+ "decoder/ixheaacd_fft_ifft_32x32.c",
+ "decoder/ixheaacd_fft_ifft_32x32_rom.c",
"decoder/ixheaacd_freq_sca.c",
"decoder/ixheaacd_fwd_alias_cnx.c",
+ "decoder/ixheaacd_hbe_dft_trans.c",
"decoder/ixheaacd_hbe_trans.c",
"decoder/ixheaacd_headerdecode.c",
"decoder/ixheaacd_hufftables.c",
+ "decoder/ixheaacd_huff_code_reorder.c",
"decoder/ixheaacd_huff_tools.c",
"decoder/ixheaacd_hybrid.c",
"decoder/ixheaacd_imdct.c",
"decoder/ixheaacd_initfuncs.c",
"decoder/ixheaacd_init_config.c",
+ "decoder/ixheaacd_latmdemux.c",
+ "decoder/ixheaacd_ld_mps_config.c",
+ "decoder/ixheaacd_ld_mps_dec.c",
"decoder/ixheaacd_longblock.c",
"decoder/ixheaacd_lpc.c",
"decoder/ixheaacd_lpc_dec.c",
"decoder/ixheaacd_lpfuncs.c",
"decoder/ixheaacd_lpp_tran.c",
"decoder/ixheaacd_lt_predict.c",
+ "decoder/ixheaacd_mps_apply_common.c",
+ "decoder/ixheaacd_mps_apply_m1.c",
+ "decoder/ixheaacd_mps_apply_m2.c",
+ "decoder/ixheaacd_mps_bitdec.c",
+ "decoder/ixheaacd_mps_blind.c",
+ "decoder/ixheaacd_mps_calc_m1m2_common.c",
+ "decoder/ixheaacd_mps_calc_m1m2_emm.c",
+ "decoder/ixheaacd_mps_calc_m1m2_tree_515x.c",
+ "decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c",
+ "decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c",
+ "decoder/ixheaacd_mps_calc_m1m2_tree_727x.c",
+ "decoder/ixheaacd_mps_calc_m1m2_tree_757x.c",
"decoder/ixheaacd_mps_dec.c",
"decoder/ixheaacd_mps_decorr.c",
+ "decoder/ixheaacd_mps_get_index.c",
"decoder/ixheaacd_mps_hybrid_filt.c",
+ "decoder/ixheaacd_mps_initfuncs.c",
+ "decoder/ixheaacd_mps_m1m2_common.c",
+ "decoder/ixheaacd_mps_mdct_2_qmf.c",
"decoder/ixheaacd_mps_parse.c",
+ "decoder/ixheaacd_mps_polyphase.c",
+ "decoder/ixheaacd_mps_poly_filt.c",
"decoder/ixheaacd_mps_pre_mix.c",
+ "decoder/ixheaacd_mps_process.c",
+ "decoder/ixheaacd_mps_reshape_bb_env.c",
+ "decoder/ixheaacd_mps_res_block.c",
+ "decoder/ixheaacd_mps_res_channel.c",
+ "decoder/ixheaacd_mps_res_channel_info.c",
+ "decoder/ixheaacd_mps_res_longblock.c",
+ "decoder/ixheaacd_mps_res_pns_js_thumb.c",
+ "decoder/ixheaacd_mps_res_pulsedata.c",
+ "decoder/ixheaacd_mps_res_tns.c",
"decoder/ixheaacd_mps_rom.c",
"decoder/ixheaacd_mps_smoothing.c",
"decoder/ixheaacd_mps_temp_process.c",
"decoder/ixheaacd_mps_temp_reshape.c",
- "decoder/ixheaacd_pns_js_thumb.c",
+ "decoder/ixheaacd_mps_tonality.c",
+ "decoder/ixheaacd_multichannel.c",
"decoder/ixheaacd_peak_limiter.c",
+ "decoder/ixheaacd_pns_js_thumb.c",
"decoder/ixheaacd_pred_vec_block.c",
"decoder/ixheaacd_process.c",
"decoder/ixheaacd_ps_bitdec.c",
"decoder/ixheaacd_ps_dec.c",
+ "decoder/ixheaacd_ps_dec_flt.c",
"decoder/ixheaacd_pvc_rom.c",
+ "decoder/ixheaacd_qmf_dec.c",
+ "decoder/ixheaacd_rev_vlc.c",
"decoder/ixheaacd_rom.c",
"decoder/ixheaacd_sbrdecoder.c",
"decoder/ixheaacd_sbrdec_initfuncs.c",
@@ -114,17 +157,8 @@ cc_library_static {
"decoder/ixheaacd_tcx_fwd_mdct.c",
"decoder/ixheaacd_thumb_ps_dec.c",
"decoder/ixheaacd_tns.c",
- "decoder/ixheaacd_basic_funcs.c",
+ "decoder/ixheaacd_usac_ec.c",
"decoder/ixheaacd_Windowing.c",
- "decoder/ixheaacd_latmdemux.c",
- "decoder/ixheaacd_multichannel.c",
- "decoder/ixheaacd_drc_freq_dec.c",
- "decoder/ixheaacd_mps_poly_filt.c",
- "decoder/ixheaacd_huff_code_reorder.c",
- "decoder/ixheaacd_rev_vlc.c",
- "decoder/ixheaacd_qmf_dec.c",
- "decoder/ixheaacd_ld_mps_config.c",
- "decoder/ixheaacd_ld_mps_dec.c",
"decoder/drc_src/impd_drc_api.c",
"decoder/drc_src/impd_drc_bitbuffer.c",
"decoder/drc_src/impd_drc_dec.c",
@@ -180,67 +214,67 @@ cc_library_static {
],
srcs: [
- "decoder/armv7/ixheaacd_qmf_dec_armv7.c",
"decoder/armv7/ixheaacd_fft_armv7.c",
"decoder/armv7/ixheaacd_function_selector_armv7.c",
- "decoder/armv7/ixheaacd_overlap_add1.s",
- "decoder/armv7/ixheaacd_overlap_add2.s",
- "decoder/armv7/ixheaacd_lap1.s",
- "decoder/armv7/ixheaacd_dec_DCT2_64_asm.s",
+ "decoder/armv7/ixheaacd_qmf_dec_armv7.c",
+ "decoder/armv7/ixheaacd_aac_ld_dec_rearrange.s",
"decoder/armv7/ixheaacd_apply_rot.s",
+ "decoder/armv7/ixheaacd_apply_scale_fac.s",
"decoder/armv7/ixheaacd_autocorr_st2.s",
"decoder/armv7/ixheaacd_auto_corr.s",
"decoder/armv7/ixheaacd_calcmaxspectralline.s",
+ "decoder/armv7/ixheaacd_calc_post_twid.s",
+ "decoder/armv7/ixheaacd_calc_pre_twid.s",
+ "decoder/armv7/ixheaacd_complex_fft_p2.s",
+ "decoder/armv7/ixheaacd_complex_ifft_p2.s",
"decoder/armv7/ixheaacd_conv_ergtoamplitude.s",
"decoder/armv7/ixheaacd_conv_ergtoamplitudelp.s",
"decoder/armv7/ixheaacd_cos_sin_mod.s",
"decoder/armv7/ixheaacd_dct3_32.s",
"decoder/armv7/ixheaacd_decorr_filter2.s",
+ "decoder/armv7/ixheaacd_dec_DCT2_64_asm.s",
+ "decoder/armv7/ixheaacd_eld_decoder_sbr_pre_twiddle.s",
"decoder/armv7/ixheaacd_enery_calc_per_subband.s",
+ "decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop1.s",
+ "decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s",
+ "decoder/armv7/ixheaacd_esbr_fwd_modulation.s",
+ "decoder/armv7/ixheaacd_esbr_qmfsyn64_winadd.s",
+ "decoder/armv7/ixheaacd_esbr_radix4bfly.s",
"decoder/armv7/ixheaacd_expsubbandsamples.s",
"decoder/armv7/ixheaacd_ffr_divide16.s",
+ "decoder/armv7/ixheaacd_fft32x32_ld2_armv7.s",
+ "decoder/armv7/ixheaacd_fft_15_ld.s",
"decoder/armv7/ixheaacd_fwd_modulation.s",
"decoder/armv7/ixheaacd_harm_idx_zerotwolp.s",
"decoder/armv7/ixheaacd_imdct_using_fft.s",
"decoder/armv7/ixheaacd_inv_dit_fft_8pt.s",
+ "decoder/armv7/ixheaacd_lap1.s",
+ "decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s",
+ "decoder/armv7/ixheaacd_mps_synt_out_calc.s",
+ "decoder/armv7/ixheaacd_mps_synt_post_fft_twiddle.s",
+ "decoder/armv7/ixheaacd_mps_synt_post_twiddle.s",
+ "decoder/armv7/ixheaacd_mps_synt_pre_twiddle.s",
"decoder/armv7/ixheaacd_no_lap1.s",
+ "decoder/armv7/ixheaacd_overlap_add1.s",
+ "decoder/armv7/ixheaacd_overlap_add2.s",
"decoder/armv7/ixheaacd_post_radix_compute2.s",
"decoder/armv7/ixheaacd_post_radix_compute4.s",
"decoder/armv7/ixheaacd_post_twiddle.s",
- "decoder/armv7/ixheaacd_pre_twiddle_compute.s",
"decoder/armv7/ixheaacd_post_twiddle_overlap.s",
+ "decoder/armv7/ixheaacd_pre_twiddle_compute.s",
"decoder/armv7/ixheaacd_radix4_bfly.s",
"decoder/armv7/ixheaacd_rescale_subbandsamples.s",
"decoder/armv7/ixheaacd_sbr_imdct_using_fft.s",
"decoder/armv7/ixheaacd_sbr_qmfanal32_winadds.s",
+ "decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s",
"decoder/armv7/ixheaacd_sbr_qmfsyn64_winadd.s",
"decoder/armv7/ixheaacd_shiftrountine.s",
+ "decoder/armv7/ixheaacd_shiftrountine_with_rnd_eld.s",
"decoder/armv7/ixheaacd_shiftrountine_with_round.s",
- "decoder/armv7/ixheaacd_tns_ar_filter_fixed_32x16.s",
- "decoder/armv7/ixheaacd_tns_parcor2lpc_32x16.s",
- "decoder/armv7/ixheaacd_esbr_radix4bfly.s",
- "decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop1.s",
- "decoder/armv7/ixheaacd_esbr_qmfsyn64_winadd.s",
- "decoder/armv7/ixheaacd_complex_ifft_p2.s",
- "decoder/armv7/ixheaacd_complex_fft_p2.s",
- "decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s",
"decoder/armv7/ixheaacd_shiftrountine_with_round_hq.s",
- "decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s",
- "decoder/armv7/ixheaacd_esbr_fwd_modulation.s",
- "decoder/armv7/ixheaacd_mps_synt_pre_twiddle.s",
- "decoder/armv7/ixheaacd_mps_synt_post_twiddle.s",
- "decoder/armv7/ixheaacd_calc_pre_twid.s",
- "decoder/armv7/ixheaacd_calc_post_twid.s",
- "decoder/armv7/ixheaacd_mps_synt_out_calc.s",
- "decoder/armv7/ixheaacd_mps_synt_post_fft_twiddle.s",
- "decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s",
- "decoder/armv7/ixheaacd_shiftrountine_with_rnd_eld.s",
- "decoder/armv7/ixheaacd_eld_decoder_sbr_pre_twiddle.s",
- "decoder/armv7/ixheaacd_fft_15_ld.s",
- "decoder/armv7/ixheaacd_aac_ld_dec_rearrange.s",
- "decoder/armv7/ixheaacd_fft32x32_ld2_armv7.s",
- "decoder/armv7/ixheaacd_apply_scale_fac.s",
"decoder/armv7/ixheaacd_tns_ar_filter_fixed.s",
+ "decoder/armv7/ixheaacd_tns_ar_filter_fixed_32x16.s",
+ "decoder/armv7/ixheaacd_tns_parcor2lpc_32x16.s",
],
},
},
@@ -254,27 +288,27 @@ cc_library_static {
],
srcs: [
- "decoder/armv8/ixheaacd_qmf_dec_armv8.c",
"decoder/armv8/ixheaacd_function_selector_armv8.c",
+ "decoder/armv8/ixheaacd_qmf_dec_armv8.c",
+ "decoder/armv8/ixheaacd_apply_scale_factors.s",
"decoder/armv8/ixheaacd_calcmaxspectralline.s",
- "decoder/armv8/ixheaacd_sbr_imdct_using_fft.s",
+ "decoder/armv8/ixheaacd_cos_sin_mod_loop1.s",
+ "decoder/armv8/ixheaacd_cos_sin_mod_loop2.s",
+ "decoder/armv8/ixheaacd_fft32x32_ld2_armv8.s",
"decoder/armv8/ixheaacd_imdct_using_fft.s",
+ "decoder/armv8/ixheaacd_inv_dit_fft_8pt.s",
"decoder/armv8/ixheaacd_no_lap1.s",
- "decoder/armv8/ixheaacd_post_twiddle.s",
- "decoder/armv8/ixheaacd_pre_twiddle.s",
- "decoder/armv8/ixheaacd_sbr_qmfsyn64_winadd.s",
"decoder/armv8/ixheaacd_overlap_add1.s",
"decoder/armv8/ixheaacd_overlap_add2.s",
- "decoder/armv8/ixheaacd_shiftrountine_with_round_eld.s",
- "decoder/armv8/ixheaacd_fft32x32_ld2_armv8.s",
- "decoder/armv8/ixheaacd_inv_dit_fft_8pt.s",
- "decoder/armv8/ixheaacd_shiftrountine_with_round.s",
- "decoder/armv8/ixheaacd_sbr_qmf_analysis32_neon.s",
"decoder/armv8/ixheaacd_postradixcompute4.s",
- "decoder/armv8/ixheaacd_apply_scale_factors.s",
- "decoder/armv8/ixheaacd_cos_sin_mod_loop1.s",
- "decoder/armv8/ixheaacd_cos_sin_mod_loop2.s",
+ "decoder/armv8/ixheaacd_post_twiddle.s",
"decoder/armv8/ixheaacd_post_twiddle_overlap.s",
+ "decoder/armv8/ixheaacd_pre_twiddle.s",
+ "decoder/armv8/ixheaacd_sbr_imdct_using_fft.s",
+ "decoder/armv8/ixheaacd_sbr_qmfsyn64_winadd.s",
+ "decoder/armv8/ixheaacd_sbr_qmf_analysis32_neon.s",
+ "decoder/armv8/ixheaacd_shiftrountine_with_round.s",
+ "decoder/armv8/ixheaacd_shiftrountine_with_round_eld.s",
],
},
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 573aadb..a06195d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,174 +1,29 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.5.1)
+project(libxaac C CXX)
+enable_language(ASM)
set(XAAC_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(XAAC_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
-
-if("${XAAC_ROOT}" STREQUAL "${XAAC_CONFIG_DIR}")
- message(
- FATAL_ERROR
- "Building from within the libxaac source tree is not supported.\n"
- "Hint: Run these commands\n"
- "$ rm -rf CMakeCache.txt CMakeFiles\n"
- "$ mkdir -p ./build\n"
- "$ cd ./build\n"
- "And re-run CMake from the build directory.")
-endif()
+find_package(Threads REQUIRED)
set(CMAKE_STATIC_LIBRARY_PREFIX "")
-if(SANITIZE)
- string(TOLOWER ${SANITIZE} SANITIZE)
-
- set(CMAKE_SANITIZER_C_FLAGS "-fno-omit-frame-pointer -fsanitize=${SANITIZE}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_SANITIZER_C_FLAGS}")
-endif()
-
-list(
- APPEND
- LIBXAACDEC_SRCS
- "${XAAC_ROOT}/decoder/ixheaacd_aacdecoder.c"
- "${XAAC_ROOT}/decoder/ixheaacd_aacpluscheck.c"
- "${XAAC_ROOT}/decoder/ixheaacd_aac_imdct.c"
- "${XAAC_ROOT}/decoder/ixheaacd_aac_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_aac_tns.c"
- "${XAAC_ROOT}/decoder/ixheaacd_acelp_bitparse.c"
- "${XAAC_ROOT}/decoder/ixheaacd_acelp_decode.c"
- "${XAAC_ROOT}/decoder/ixheaacd_acelp_mdct.c"
- "${XAAC_ROOT}/decoder/ixheaacd_acelp_tools.c"
- "${XAAC_ROOT}/decoder/ixheaacd_adts_crc_check.c"
- "${XAAC_ROOT}/decoder/ixheaacd_api.c"
- "${XAAC_ROOT}/decoder/ixheaacd_arith_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_avq_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_avq_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_basic_ops.c"
- "${XAAC_ROOT}/decoder/ixheaacd_bitbuffer.c"
- "${XAAC_ROOT}/decoder/ixheaacd_block.c"
- "${XAAC_ROOT}/decoder/ixheaacd_channel.c"
- "${XAAC_ROOT}/decoder/ixheaacd_common_initfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_common_lpfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_common_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_create.c"
- "${XAAC_ROOT}/decoder/ixheaacd_decode_main.c"
- "${XAAC_ROOT}/decoder/ixheaacd_dsp_fft32x32s.c"
- "${XAAC_ROOT}/decoder/ixheaacd_env_calc.c"
- "${XAAC_ROOT}/decoder/ixheaacd_env_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_env_extr.c"
- "${XAAC_ROOT}/decoder/ixheaacd_esbr_envcal.c"
- "${XAAC_ROOT}/decoder/ixheaacd_esbr_polyphase.c"
- "${XAAC_ROOT}/decoder/ixheaacd_esbr_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_esbr_fft.c"
- "${XAAC_ROOT}/decoder/ixheaacd_ext_ch_ele.c"
- "${XAAC_ROOT}/decoder/ixheaacd_fft.c"
- "${XAAC_ROOT}/decoder/ixheaacd_freq_sca.c"
- "${XAAC_ROOT}/decoder/ixheaacd_fwd_alias_cnx.c"
- "${XAAC_ROOT}/decoder/ixheaacd_hbe_trans.c"
- "${XAAC_ROOT}/decoder/ixheaacd_headerdecode.c"
- "${XAAC_ROOT}/decoder/ixheaacd_hufftables.c"
- "${XAAC_ROOT}/decoder/ixheaacd_huff_tools.c"
- "${XAAC_ROOT}/decoder/ixheaacd_hybrid.c"
- "${XAAC_ROOT}/decoder/ixheaacd_imdct.c"
- "${XAAC_ROOT}/decoder/ixheaacd_initfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_init_config.c"
- "${XAAC_ROOT}/decoder/ixheaacd_longblock.c"
- "${XAAC_ROOT}/decoder/ixheaacd_lpc.c"
- "${XAAC_ROOT}/decoder/ixheaacd_lpc_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_lpfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_lpp_tran.c"
- "${XAAC_ROOT}/decoder/ixheaacd_lt_predict.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_decorr.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_hybrid_filt.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_parse.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_pre_mix.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_smoothing.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_temp_process.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_temp_reshape.c"
- "${XAAC_ROOT}/decoder/ixheaacd_pns_js_thumb.c"
- "${XAAC_ROOT}/decoder/ixheaacd_peak_limiter.c"
- "${XAAC_ROOT}/decoder/ixheaacd_pred_vec_block.c"
- "${XAAC_ROOT}/decoder/ixheaacd_process.c"
- "${XAAC_ROOT}/decoder/ixheaacd_ps_bitdec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_ps_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_pvc_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbrdecoder.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbrdec_initfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbrdec_lpfuncs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbr_crc.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbr_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_sbr_rom.c"
- "${XAAC_ROOT}/decoder/ixheaacd_spectrum_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_stereo.c"
- "${XAAC_ROOT}/decoder/ixheaacd_tcx_fwd_alcnx.c"
- "${XAAC_ROOT}/decoder/ixheaacd_tcx_fwd_mdct.c"
- "${XAAC_ROOT}/decoder/ixheaacd_thumb_ps_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_tns.c"
- "${XAAC_ROOT}/decoder/ixheaacd_basic_funcs.c"
- "${XAAC_ROOT}/decoder/ixheaacd_Windowing.c"
- "${XAAC_ROOT}/decoder/ixheaacd_latmdemux.c"
- "${XAAC_ROOT}/decoder/ixheaacd_multichannel.c"
- "${XAAC_ROOT}/decoder/ixheaacd_drc_freq_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_mps_poly_filt.c"
- "${XAAC_ROOT}/decoder/ixheaacd_huff_code_reorder.c"
- "${XAAC_ROOT}/decoder/ixheaacd_rev_vlc.c"
- "${XAAC_ROOT}/decoder/ixheaacd_qmf_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_ld_mps_dec.c"
- "${XAAC_ROOT}/decoder/ixheaacd_ld_mps_config.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_api.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_bitbuffer.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_dec.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_dynamic_payload.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_eq.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_extr_delta_coded_info.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_filter_bank.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_gain_dec.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_gain_decoder.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_init.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_interface_decoder.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_loudness_control.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_main_td_process.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_multiband.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_parametric_dec.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_peak_limiter.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_process.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_rom.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process_drcset_selection.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process_init.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_shape_filter.c"
- "${XAAC_ROOT}/decoder/drc_src/impd_drc_static_payload.c")
+include("${XAAC_ROOT}/cmake/utils.cmake")
-list(APPEND LIBXAACDEC_X86_SRCS
- "${XAAC_ROOT}/decoder/generic/ixheaacd_qmf_dec_generic.c"
- "${XAAC_ROOT}/decoder/x86/ixheaacd_function_selector_x86.c")
+libxaac_add_compile_options()
+libxaac_add_definitions()
-set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/decoder/drc_src)
-
-set(LIBXAACDEC_C_FLAGS "${LIBXAACDEC_X86_C_FLAGS}")
-
-include_directories(${LIBXAACDEC_INCLUDES} ${LIBXAACDEC_X86_INCLUDES})
-add_library(libxaacdec ${LIBXAACDEC_SRCS} ${LIBXAACDEC_X86_SRCS})
-set_target_properties(libxaacdec
- PROPERTIES COMPILE_FLAGS "${LIBXAACDEC_C_FLAGS}")
-
-list(APPEND XAACDEC_SRCS
- "${XAAC_ROOT}/test/ixheaacd_error.c"
- "${XAAC_ROOT}/test/ixheaacd_fileifc.c"
- "${XAAC_ROOT}/test/ixheaacd_main.c"
- "${XAAC_ROOT}/test/ixheaacd_metadata_read.c")
+if(NOT COMPILER_HAS_SANITIZER)
+ libxaac_set_link_libraries()
+else()
+ libxaac_fuzzer_set_link_libraries()
+endif()
-add_executable(xaacdec ${XAACDEC_SRCS})
+add_subdirectory(decoder)
-if(MSVC)
- target_link_libraries(xaacdec libxaacdec)
+if(NOT COMPILER_HAS_SANITIZER)
+ add_subdirectory(test)
else()
- target_link_libraries(xaacdec libxaacdec m)
+ add_subdirectory(fuzzer)
endif()
-set_target_properties(
- xaacdec
- PROPERTIES
- COMPILE_FLAGS
- "-UARM_PROFILE_HW -UARM_PROFILE_BOARD -DECLIPSE -DDRC_ENABLE -DMULTICHANNEL_ENABLE -DENABLE_DRC"
- )
diff --git a/LICENSE b/LICENSE
index 6245b2d..edcd8c2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -176,18 +176,7 @@
END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
+ Copyright (c) 2018, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -200,4 +189,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-Create Short LinkX \ No newline at end of file
diff --git a/METADATA b/METADATA
index c055ca0..8a913f8 100644
--- a/METADATA
+++ b/METADATA
@@ -5,11 +5,11 @@ third_party {
type: GIT
value: "https://github.com/ittiam-systems/libxaac.git"
}
- version: "9d57cec9725da0a4246f31779629e68630ac005c"
+ version: "v0.1.5"
license_type: NOTICE
last_upgrade_date {
- year: 2022
- month: 12
- day: 02
+ year: 2023
+ month: 3
+ day: 13
}
}
diff --git a/README.md b/README.md
index b890e83..75069a5 100644
--- a/README.md
+++ b/README.md
@@ -113,8 +113,8 @@ $ mm
## Using CMake
Users can also use cmake to build for `x86`, `x86_64`, and Windows (MSVS project) platforms.
-### Building for native platforms
-Run the following commands to build the Ex-HEAAC Decoder for native platform:
+### Creating MSVS project files
+To create MSVS project files for the Ex-HEAAC decoder from cmake, run the following commands:
```
Go to the root directory(libxaac/) of the Ex-HEAAC Decoder.
Create a new folder in the project root directory and move to the newly created folder.
@@ -122,12 +122,14 @@ Create a new folder in the project root directory and move to the newly created
$ cd <path to libxaac>
$ mkdir bin
$ cd bin
-$ cmake ..
-$ cmake --build .
+$ cmake -G "Visual Studio 15 2017" ..
```
-### Creating MSVS project files
-To create MSVS project files for the Ex-HEAAC decoder from cmake, run the following commands:
+The above command creates MSVS 2017 project files. If the version is different, modify the generator name accordingly.
+The Ex-HEAAC decoder can be built using these project files.
+
+### Building for native platforms
+Run the following commands to build the Ex-HEAAC Decoder for native platform:
```
Go to the root directory(libxaac/) of the Ex-HEAAC Decoder.
Create a new folder in the project root directory and move to the newly created folder.
@@ -135,11 +137,39 @@ Create a new folder in the project root directory and move to the newly created
$ cd <path to libxaac>
$ mkdir bin
$ cd bin
-$ cmake -G "Visual Studio 15 2017" ..
+$ cmake ..
+$ cmake --build .
```
-The above command creates MSVS 2017 project files. If the version is different, modify the generator name accordingly.
-The Ex-HEAAC decoder can be built using these project files.
+### Cross-compiler based builds
+### Building for x86_32 on a x86_64 Linux machine
+```
+$ cd <path to libxaac>
+$ mkdir build
+$ cd build
+$ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake ..
+$ make
+```
+
+### Building for aarch32/aarch64
+Update 'CMAKE_C_COMPILER', 'CMAKE_CXX_COMPILER', 'CMAKE_C_COMPILER_AR', and 'CMAKE_CXX_COMPILER_AR' in CMAKE_TOOLCHAIN_FILE passed below
+```
+$ cd <path to libxaac>
+$ mkdir build
+$ cd build
+```
+
+### For aarch64
+```
+$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake
+$ make
+```
+
+### For aarch32
+```
+$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
+$ make
+```
# Running the Ex-HEAAC Decoder
@@ -147,38 +177,68 @@ The Ex-HEAAC Decoder can be run by providing command-line parameters(CLI options
Command line usage :
```
-<exceutable> -ifile:<input_file> -imeta:<meta_data_file> -ofile:<out_file> [options]
+<executable> -ifile:<input_file> -imeta:<meta_data_file> -ofile:<output_file> [options]
[options] can be,
+[-mp4:<mp4_flag>]
[-pcmsz:<pcmwordsize>]
[-dmix:<down_mix>]
+[-esbr_hq:<esbr_hq_flag>]
+[-esbr_ps:<esbr_ps_flag>]
[-tostereo:<interleave_to_stereo>]
[-dsample:<down_sample_sbr>]
-[-fs:<RAW_sample_rate>]
+[-drc_cut_fac:<drc_cut_factor>]
+[-drc_boost_fac:<drc_boost_factor>]
+[-drc_target_level:<drc_target_level>]
+[-drc_heavy_comp:<drc_heavy_compression>]
+[-effect:<effect_type>]
+[-target_loudness:<target_loudness>]
[-nosync:<disable_sync>]
[-sbrup:<auto_sbr_upsample>]
+[-flflag:<framelength_flag>}
+[-fs:<RAW_sample_rate>]
[-maxchannel:<maximum_num_channels>]
-[-mp4:<mp4_flag>]
+[-coupchannel:<coupling_channel>]
+[-downmix:<down_mix_stereo>]
+[-fs480:<ld_frame_size>]
+[-ld_testing:<ld_testing_flag>]
+[-peak_limiter_off:<peak_limiter_off_flag>]
+[-err_conceal:<error_concealment_flag>]
where,
- <inputfile> is the input AAC file name.
- <meta_data_file> is a text file which contains metadata for USAC files with an MP4 container.
- <outputfile> is the output file name.
- <pcmwordsize> is the bits per sample info. Only 16 is valid
- <down_mix> is to enable/disable always mono output. Default 0.
- <interleave_to_stereo> is to enable/disable always interleaved to stereo output. Default 1.
- <down_sample_sbr> is to enable/disable down-sampled SBR output. Default auto identification from header.
- <RAW_sample_rate> is to indicate the core AAC sample rate for a RAW stream. If this is specified no other file format headers are searched for.
- <disable_sync> is to disable the ADTS/ADIF sync search i.e when enabled the decoder expects the header to be at the start of input buffer. Default 0.
- <auto_sbr_upsample> is to enable(1) or disable(0) auto SBR upsample in case of stream changing from SBR present to SBR not present. Default 1.
- <maximum_num_channels> is the number of maxiumum channels the input may have. Default is 6 (5.1).
- <mp4_flag> is a flag that should be set to 1 when passing raw stream along with meta data text file.
-
-```
-
+ <input_file> is the input AAC/HEAACv1/HEAACv2/USAC file name.
+ <meta_data_file> is a text file which contains metadata. To be given when -mp4:1 is enabled.
+ <output_file> is the output file name.
+ <mp4_flag> is a flag that should be set to 1 when passing raw stream along with meta data text file.
+ <pcmwordsize> is the bits per sample info. value can be 16 or 24.
+ <down_mix> is to enable/disable always mono output. Default 1.
+ <esbr_hq_flag> is to enable/disable high quality eSBR. Default 0.
+ <esbr_ps_flag> is to indicate eSBR with PS. Default 0.
+ <interleave_to_stereo> is to enable/disable always interleaved to stereo output. Default 1.
+ <down_sample_sbr> is to enable/disable down-sampled SBR output. Default auto identification from header.
+ <drc_cut_factor> is to set DRC cut factor value. Default value is 0.
+ <drc_boost_factor> is to set DRC boost factor. Default value is 0.
+ <drc_target_level> is to set DRC target reference level. Default value is 108.
+ <drc_heavy_compression> is to enable/disable DRC heavy compression. Default value is 0.
+ <effect_type> is to set DRC effect type. Default value is 0.
+ <target_loudness> is to set target loudness level. Default value is -24.
+ <disable_sync> is to disable the ADTS/ADIF sync search i.e when enabled the decoder expects the header to be at the start of input buffer. Default 0.
+ <auto_sbr_upsample> is to enable(1) or disable(0) auto SBR upsample in case of stream changing from SBR present to SBR not present. Default 1.
+ <framelength_flag> is flag for decoding framelength of 1024 or 960. 1 to decode 960 frame length, 0 to decode 1024 frame length.
+ Frame length value in the GA header will override this option. Default 0.
+ <RAW_sample_rate> is to indicate the core AAC sample rate for a RAW stream. If this is specified no other file format headers are searched for.
+ <maximum_num_channels> is the number of maxiumum channels the input may have. Default is 6 for multichannel libraries and 2 for stereo libraries.
+ <coupling_channel> is element instance tag of independent coupling channel to be mixed. Default is 0.
+ <down_mix_stereo> is flag for Downmix. Give 1 to get stereo (downmix) output. Default is 0.
+ <ld_frame_size> is to indicate ld frame size. 0 is for 512 frame length, 1 is for 480 frame length. Default value is 512 (0).
+ <ld_testing_flag> is to enable/disable ld decoder testing. Default value is 0.
+ <peak_limiter_off_flag> is to enable/disable peak limiter. Default value is 0.
+ <error_concealment_flag> is to enable/disable error concealment. Default value is 0.
+
+```
Sample CLI:
```
-<xaac_dec_exe> -ifile:in_file.aac -ofile:out_file.wav -pcmsz:16
+<xaac_dec_exe> -ifile:in_file.aac -ofile:out_file.wav -pcmsz:16
```
# Validating the Ex-HEAAC Decoder
diff --git a/cmake/toolchains/aarch32_toolchain.cmake b/cmake/toolchains/aarch32_toolchain.cmake
new file mode 100644
index 0000000..69c4c36
--- /dev/null
+++ b/cmake/toolchains/aarch32_toolchain.cmake
@@ -0,0 +1,11 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR aarch32)
+
+# Modify these variables with paths to appropriate compilers that can produce
+# armv7 targets
+
+# Specify the cross compiler
+set(CMAKE_C_COMPILER arm-none-linux-gnueabi-gcc)
+set(CMAKE_CXX_COMPILER arm-none-linux-gnueabi-g++)
+set(CMAKE_C_COMPILER_AR arm-none-linux-gnueabi-ar)
+set(CMAKE_CXX_COMPILER_AR arm-none-linux-gnueabi-ar)
diff --git a/cmake/toolchains/aarch64_toolchain.cmake b/cmake/toolchains/aarch64_toolchain.cmake
new file mode 100644
index 0000000..ddeb998
--- /dev/null
+++ b/cmake/toolchains/aarch64_toolchain.cmake
@@ -0,0 +1,19 @@
+SET(CMAKE_SYSTEM_NAME Linux)
+SET(CMAKE_SYSTEM_PROCESSOR aarch64)
+
+# Modify these variables with paths to appropriate compilers that can produce
+# armv7 targets
+
+# Specify the cross compiler
+SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
+SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
+
+# Where is the target environment
+SET(CMAKE_FIND_ROOT_PATH aarch64-linux-gnu-gnueabihf)
+
+# Search for programs in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+
+# For libraries and headers in the target directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/cmake/utils.cmake b/cmake/utils.cmake
new file mode 100644
index 0000000..6edf2f6
--- /dev/null
+++ b/cmake/utils.cmake
@@ -0,0 +1,54 @@
+include(CheckCXXCompilerFlag)
+set(CMAKE_C_STANDARD 99)
+# Adds compiler options for all targets
+function(libxaac_add_compile_options)
+ if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
+ add_compile_options(-std=gnu99 -march=armv8-a)
+ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch32")
+ add_compile_options(-O3 -Wall -std=c99 -mcpu=cortex-a8 -march=armv7-a -mfloat-abi=softfp -mfpu=neon)
+ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+ add_compile_options(-O3 -Wall -Wsequence-point -fwrapv)
+ endif()
+
+ set(CMAKE_REQUIRED_FLAGS -fsanitize=fuzzer-no-link)
+ check_cxx_compiler_flag(-fsanitize=fuzzer-no-link
+ COMPILER_HAS_SANITIZE_FUZZER)
+ unset(CMAKE_REQUIRED_FLAGS)
+
+ if(DEFINED SANITIZE)
+ set(CMAKE_REQUIRED_FLAGS -fsanitize=${SANITIZE})
+ check_cxx_compiler_flag(-fsanitize=${SANITIZE} COMPILER_HAS_SANITIZER)
+ unset(CMAKE_REQUIRED_FLAGS)
+
+ if(NOT COMPILER_HAS_SANITIZER)
+ message(
+ FATAL_ERROR "ERROR: Compiler doesn't support -fsanitize=${SANITIZE}")
+ return()
+ endif()
+ add_compile_options(-fno-omit-frame-pointer -fsanitize=${SANITIZE})
+ endif()
+
+endfunction()
+
+# Adds defintions for all targets
+function(libxaac_add_definitions)
+ if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
+ add_definitions(-DARMV8 -DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC)
+ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch32")
+ add_definitions(-DARMV7 -DDEFAULT_ARCH=D_ARCH_ARM_A9Q)
+ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
+ add_definitions(-DX86 -DX86_LINUX=1 -DDISABLE_AVX2 -DDEFAULT_ARCH=D_ARCH_X86_SSE42)
+ endif()
+endfunction()
+
+# Adds libraries needed for executables
+function(libxaac_set_link_libraries)
+ if(NOT MSVC)
+ link_libraries(Threads::Threads --static)
+ endif()
+endfunction()
+
+#Adds libraries for fuzzer
+function(libxaac_fuzzer_set_link_libraries)
+ link_libraries(Threads::Threads m)
+endfunction() \ No newline at end of file
diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt
new file mode 100644
index 0000000..dca2bff
--- /dev/null
+++ b/decoder/CMakeLists.txt
@@ -0,0 +1,145 @@
+#src files
+add_library(libxaacdec "")
+
+if(ARG_FUZZER)
+ target_link_libraries(libxaacdec PRIVATE -fsanitize=address)
+endif()
+
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/ixheaacd_aacdecoder.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_aacpluscheck.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_aac_ec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_aac_imdct.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_aac_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_aac_tns.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_acelp_bitparse.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_acelp_decode.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_acelp_mdct.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_acelp_tools.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_adts_crc_check.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_api.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_arith_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_avq_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_avq_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_basic_funcs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_basic_ops.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_bitbuffer.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_block.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_channel.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_common_initfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_common_lpfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_common_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_create.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_decode_main.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_drc_freq_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_dsp_fft32x32s.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ec_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_env_calc.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_env_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_env_extr.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_esbr_envcal.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_esbr_fft.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_esbr_polyphase.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_esbr_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ext_ch_ele.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_fft.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_fft_ifft_32x32.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_fft_ifft_32x32_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_freq_sca.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_fwd_alias_cnx.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_hbe_dft_trans.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_hbe_trans.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_headerdecode.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_hufftables.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_huff_code_reorder.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_huff_tools.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_hybrid.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_imdct.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_initfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_init_config.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_latmdemux.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ld_mps_config.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ld_mps_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_longblock.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_lpc.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_lpc_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_lpfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_lpp_tran.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_lt_predict.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_apply_common.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_apply_m1.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_apply_m2.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_bitdec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_blind.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_common.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_emm.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_decorr.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_get_index.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_hybrid_filt.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_initfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_m1m2_common.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_mdct_2_qmf.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_parse.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_polyphase.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_poly_filt.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_pre_mix.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_process.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_reshape_bb_env.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_block.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_channel.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_channel_info.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_longblock.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_pns_js_thumb.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_pulsedata.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_res_tns.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_smoothing.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_temp_process.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_temp_reshape.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_mps_tonality.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_multichannel.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_peak_limiter.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_pns_js_thumb.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_pred_vec_block.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_process.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ps_bitdec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ps_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_ps_dec_flt.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_pvc_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_qmf_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_rev_vlc.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbrdecoder.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbrdec_initfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbrdec_lpfuncs.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbr_crc.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbr_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_sbr_rom.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_spectrum_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_stereo.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_tcx_fwd_alcnx.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_tcx_fwd_mdct.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_thumb_ps_dec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_tns.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_usac_ec.c"
+ "${XAAC_ROOT}/decoder/ixheaacd_Windowing.c")
+
+set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/decoder/drc_src)
+include_directories(${LIBXAACDEC_INCLUDES})
+
+add_subdirectory(drc_src)
+
+if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch32")
+ add_subdirectory(armv7)
+elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
+ add_subdirectory(armv8)
+else()
+ add_subdirectory(x86)
+endif()
diff --git a/decoder/armv7/CMakeLists.txt b/decoder/armv7/CMakeLists.txt
new file mode 100644
index 0000000..148cfc2
--- /dev/null
+++ b/decoder/armv7/CMakeLists.txt
@@ -0,0 +1,66 @@
+#src files
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_fft_armv7.c"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_function_selector_armv7.c"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_qmf_dec_armv7.c"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_aac_ld_dec_rearrange.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_auto_corr.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_autocorr_st2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_apply_rot.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_apply_scale_fac.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_calcmaxspectralline.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_conv_ergtoamplitude.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_conv_ergtoamplitudelp.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_cos_sin_mod.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_calc_pre_twid.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_calc_post_twid.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_complex_ifft_p2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_complex_fft_p2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_dct3_32.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_decorr_filter2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_dec_DCT2_64_asm.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_enery_calc_per_subband.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_expsubbandsamples.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop1.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_esbr_fwd_modulation.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_esbr_radix4bfly.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_esbr_qmfsyn64_winadd.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_eld_decoder_sbr_pre_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_ffr_divide16.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_fft_15_ld.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_fft32x32_ld2_armv7.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_fwd_modulation.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_harm_idx_zerotwolp.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_imdct_using_fft.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_inv_dit_fft_8pt.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_lap1.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_mps_synt_pre_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_mps_synt_post_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_mps_synt_out_calc.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_mps_synt_post_fft_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_no_lap1.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_overlap_add1.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_overlap_add2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_post_radix_compute2.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_post_radix_compute4.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_post_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_pre_twiddle_compute.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_post_twiddle_overlap.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_radix4_bfly.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_rescale_subbandsamples.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_sbr_imdct_using_fft.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_sbr_qmfsyn64_winadd.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_shiftrountine.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_shiftrountine_with_rnd_eld.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_shiftrountine_with_round.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_shiftrountine_with_round_hq.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_tns_ar_filter_fixed_32x16.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_tns_parcor2lpc_32x16.s"
+ "${XAAC_ROOT}/decoder/armv7/ixheaacd_tns_ar_filter_fixed.s")
+
+include_directories(${XAAC_ROOT}/decoder/armv7)
diff --git a/decoder/armv7/ixheaacd_function_selector_armv7.c b/decoder/armv7/ixheaacd_function_selector_armv7.c
index 230594b..08691ab 100644
--- a/decoder/armv7/ixheaacd_function_selector_armv7.c
+++ b/decoder/armv7/ixheaacd_function_selector_armv7.c
@@ -45,6 +45,10 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/decoder/armv7/ixheaacd_qmf_dec_armv7.c b/decoder/armv7/ixheaacd_qmf_dec_armv7.c
index 54e1fb9..d249fd7 100644
--- a/decoder/armv7/ixheaacd_qmf_dec_armv7.c
+++ b/decoder/armv7/ixheaacd_qmf_dec_armv7.c
@@ -49,14 +49,6 @@
#include "ixheaacd_function_selector.h"
#include "ixheaacd_audioobjtypes.h"
-#define mult16x16_16(a, b) ixheaacd_mult16((a), (b))
-#define mac16x16(a, b, c) ixheaacd_mac16x16in32_sat((a), (b), (c))
-#define mpy_32x16(a, b) fixmuldiv2_32x16b((a), (b))
-#define mpy_16x16(a, b) ixheaacd_mult16x16in32((a), (b))
-#define mpy_32x32(a, b) ixheaacd_mult32((a), (b))
-#define mpy_32x16H_n(a, b) ixheaacd_mult32x16hin32((a), (b))
-#define msu16x16(a, b, c) msu16x16in32((a), (b), (c))
-
#define DCT3_LEN (32)
#define DCT2_LEN (64)
@@ -92,7 +84,7 @@ VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
ia_sbr_qmf_filter_bank_struct *qmf_bank,
ia_qmf_dec_tables_struct *qmf_dec_tables_ptr,
WORD32 ch_fac, WORD32 low_pow_flag,
- WORD audio_object_type, WORD32 ldmps_present) {
+ WORD audio_object_type) {
WORD32 i, k;
WORD32 num_time_slots = qmf_bank->num_time_slots;
@@ -208,7 +200,7 @@ VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
if (!low_pow_flag) {
ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i],
- qmf_bank, qmf_dec_tables_ptr, ldmps_present);
+ qmf_bank, qmf_dec_tables_ptr, 0);
} else {
ixheaacd_dct3_32(
(WORD32 *)analysis_buffer, qmf_real[i], qmf_dec_tables_ptr->dct23_tw,
@@ -463,3 +455,36 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
p_sin = qmf_bank->esbr_alt_sin_twiddle;
ixheaacd_esbr_cos_sin_mod_loop2(subband, p_sin, M);
}
+
+VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
+ WORD32 *sample_buffer, WORD32 ch_fac) {
+ WORD32 k;
+
+ for (k = 0; k < 32; k++) {
+ WORD64 syn_out = 0;
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
+
+ sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
+ }
+}
diff --git a/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s b/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s
index 78686c3..4f53f59 100644
--- a/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s
+++ b/decoder/armv7/ixheaacd_sbr_qmfanal32_winadds_eld.s
@@ -6,10 +6,9 @@
ixheaacd_sbr_qmfanal32_winadds_eld:
STMFD sp!, {R4-R12, R14}
- VPUSH {D8 - D15}
- LDR R5, [SP, #108] @filterStates
- LDR R6, [SP, #112] @timeIn
- LDR R7, [SP, #116] @stride
+ LDR R5, [SP, #44] @filterStates
+ LDR R6, [SP, #48] @timeIn
+ LDR R7, [SP, #52] @stride
MOV R9, R7, LSL #1
@@ -44,7 +43,7 @@ LOOP:
BPL LOOP
- LDR R4, [SP, #104] @winAdd
+ LDR R4, [SP, #40] @winAdd
MOV R5, #8
VLD1.16 D0, [R0]! @tmpQ1[n + 0] load and incremented R0 by 8
@@ -243,5 +242,4 @@ LOOP_1:
VMLAL.S16 Q15, D18, D19
VST1.32 {Q15}, [R11]!
- VPOP {D8 - D15}
LDMFD sp!, {R4-R12, R15}
diff --git a/decoder/armv8/CMakeLists.txt b/decoder/armv8/CMakeLists.txt
new file mode 100644
index 0000000..6216c4c
--- /dev/null
+++ b/decoder/armv8/CMakeLists.txt
@@ -0,0 +1,27 @@
+#src files
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_function_selector_armv8.c"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_qmf_dec_armv8.c"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_apply_scale_factors.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_calcmaxspectralline.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_cos_sin_mod_loop1.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_cos_sin_mod_loop2.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_fft32x32_ld2_armv8.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_inv_dit_fft_8pt.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_imdct_using_fft.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_no_lap1.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_overlap_add1.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_overlap_add2.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_post_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_post_twiddle_overlap.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_postradixcompute4.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_pre_twiddle.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_postradixcompute4.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_sbr_imdct_using_fft.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_sbr_qmf_analysis32_neon.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_sbr_qmfsyn64_winadd.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_shiftrountine_with_round.s"
+ "${XAAC_ROOT}/decoder/armv8/ixheaacd_shiftrountine_with_round_eld.s")
+
+include_directories(${XAAC_ROOT}/decoder/armv8}) \ No newline at end of file
diff --git a/decoder/armv8/ixheaacd_function_selector_armv8.c b/decoder/armv8/ixheaacd_function_selector_armv8.c
index ce1b3fb..4454579 100644
--- a/decoder/armv8/ixheaacd_function_selector_armv8.c
+++ b/decoder/armv8/ixheaacd_function_selector_armv8.c
@@ -45,6 +45,10 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/decoder/armv8/ixheaacd_qmf_dec_armv8.c b/decoder/armv8/ixheaacd_qmf_dec_armv8.c
index 1970ec0..16c19da 100644
--- a/decoder/armv8/ixheaacd_qmf_dec_armv8.c
+++ b/decoder/armv8/ixheaacd_qmf_dec_armv8.c
@@ -47,14 +47,6 @@
#include "ixheaacd_function_selector.h"
#include "ixheaacd_audioobjtypes.h"
-#define mult16x16_16(a, b) ixheaacd_mult16((a), (b))
-#define mac16x16(a, b, c) ixheaacd_mac16x16in32_sat((a), (b), (c))
-#define mpy_32x16(a, b) fixmuldiv2_32x16b((a), (b))
-#define mpy_16x16(a, b) ixheaacd_mult16x16in32((a), (b))
-#define mpy_32x32(a, b) ixheaacd_mult32((a), (b))
-#define mpy_32x16H_n(a, b) ixheaacd_mult32x16hin32((a), (b))
-#define msu16x16(a, b, c) msu16x16in32((a), (b), (c))
-
#define DCT3_LEN (32)
#define DCT2_LEN (64)
@@ -360,12 +352,10 @@ VOID ixheaacd_fwd_modulation(const WORD32 *p_time_in1, WORD32 *real_subband,
}
VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
- ia_sbr_scale_fact_struct *sbr_scale_factor,
- WORD32 **qmf_real, WORD32 **qmf_imag,
- ia_sbr_qmf_filter_bank_struct *qmf_bank,
- ia_qmf_dec_tables_struct *qmf_dec_tables_ptr,
- WORD32 ch_fac, WORD32 low_pow_flag,
- WORD audio_object_type, WORD32 ldmps_present) {
+ ia_sbr_scale_fact_struct *sbr_scale_factor, WORD32 **qmf_real,
+ WORD32 **qmf_imag, ia_sbr_qmf_filter_bank_struct *qmf_bank,
+ ia_qmf_dec_tables_struct *qmf_dec_tables_ptr, WORD32 ch_fac,
+ WORD32 low_pow_flag, WORD audio_object_type) {
WORD32 i, k;
WORD32 num_time_slots = qmf_bank->num_time_slots;
@@ -481,8 +471,8 @@ VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
}
if (!low_pow_flag) {
- ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i],
- qmf_bank, qmf_dec_tables_ptr, ldmps_present);
+ ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i], qmf_bank,
+ qmf_dec_tables_ptr, 0);
} else {
ixheaacd_dct3_32(
(WORD32 *)analysis_buffer, qmf_real[i], qmf_dec_tables_ptr->dct23_tw,
@@ -1304,6 +1294,39 @@ VOID ixheaacd_esbr_qmfsyn64_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
}
}
+VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
+ WORD32 *sample_buffer, WORD32 ch_fac) {
+ WORD32 k;
+
+ for (k = 0; k < 32; k++) {
+ WORD64 syn_out = 0;
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
+
+ sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
+ }
+}
+
VOID ixheaacd_shiftrountine(WORD32 *qmf_real, WORD32 *qmf_imag, WORD32 len,
WORD32 common_shift) {
WORD32 treal, timag;
diff --git a/decoder/drc_src/CMakeLists.txt b/decoder/drc_src/CMakeLists.txt
new file mode 100644
index 0000000..7d0d702
--- /dev/null
+++ b/decoder/drc_src/CMakeLists.txt
@@ -0,0 +1,30 @@
+#src files
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_api.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_bitbuffer.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_dec.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_dynamic_payload.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_eq.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_extr_delta_coded_info.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_filter_bank.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_gain_dec.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_gain_decoder.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_init.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_interface_decoder.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_loudness_control.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_main_td_process.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_multiband.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_parametric_dec.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_peak_limiter.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_process.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_rom.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process_drcset_selection.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_selection_process_init.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_shape_filter.c"
+ "${XAAC_ROOT}/decoder/drc_src/impd_drc_static_payload.c")
+
+set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder/drc_src)
+
+include_directories(${LIBXAACDEC_INCLUDES})
diff --git a/decoder/generic/ixheaacd_function_selector_generic.c b/decoder/generic/ixheaacd_function_selector_generic.c
index 9ceab86..4a57944 100644
--- a/decoder/generic/ixheaacd_function_selector_generic.c
+++ b/decoder/generic/ixheaacd_function_selector_generic.c
@@ -45,6 +45,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/decoder/generic/ixheaacd_qmf_dec_generic.c b/decoder/generic/ixheaacd_qmf_dec_generic.c
index 0497bec..a92aad9 100644
--- a/decoder/generic/ixheaacd_qmf_dec_generic.c
+++ b/decoder/generic/ixheaacd_qmf_dec_generic.c
@@ -392,7 +392,7 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband,
*psubband = *psubband >> 1;
psubband++;
- *psubband1 = ixheaacd_negate32(*psubband >> 1);
+ *psubband1 = ixheaacd_negate32_sat(*psubband >> 1);
psubband1--;
p_sin = &qmf_bank->alt_sin_twiddle[0];
@@ -593,7 +593,7 @@ VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
ia_sbr_qmf_filter_bank_struct *qmf_bank,
ia_qmf_dec_tables_struct *qmf_dec_tables_ptr,
WORD32 ch_fac, WORD32 low_pow_flag,
- WORD audio_object_type, WORD32 ldmps_present) {
+ WORD audio_object_type) {
WORD32 i, k;
WORD32 num_time_slots = qmf_bank->num_time_slots;
@@ -719,7 +719,7 @@ VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_sample_buf,
if (!low_pow_flag) {
ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i],
- qmf_bank, qmf_dec_tables_ptr, ldmps_present);
+ qmf_bank, qmf_dec_tables_ptr, 0);
} else {
ixheaacd_dct3_32(
(WORD32 *)analysis_buffer, qmf_real[i], qmf_dec_tables_ptr->dct23_tw,
@@ -1374,7 +1374,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
*psubband = *psubband >> 1;
psubband++;
- *psubband1 = ixheaacd_negate32(*psubband >> 1);
+ *psubband1 = ixheaacd_negate32_sat(*psubband >> 1);
psubband1--;
p_sin = qmf_bank->esbr_alt_sin_twiddle;
@@ -1574,6 +1574,39 @@ VOID ixheaacd_esbr_qmfsyn64_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
}
}
+VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
+ WORD32 *sample_buffer, WORD32 ch_fac) {
+ WORD32 k;
+
+ for (k = 0; k < 32; k++) {
+ WORD64 syn_out = 0;
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
+
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
+ syn_out =
+ ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
+
+ sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
+ }
+}
+
VOID ixheaacd_shiftrountine(WORD32 *qmf_real, WORD32 *qmf_imag, WORD32 len,
WORD32 common_shift) {
WORD32 treal, timag;
@@ -1650,7 +1683,7 @@ VOID ixheaacd_shiftrountine_with_rnd_eld(WORD32 *qmf_real, WORD32 *qmf_imag,
r1 = *qmf_real++;
i1 = *qmf_imag++;
- timag = ixheaacd_negate32(ixheaacd_add32_sat(i1, r1));
+ timag = ixheaacd_negate32_sat(ixheaacd_add32_sat(i1, r1));
timag = (ixheaacd_shl32_sat(timag, shift));
filter_states_rev[j] = ixheaacd_round16(timag);
@@ -1662,7 +1695,7 @@ VOID ixheaacd_shiftrountine_with_rnd_eld(WORD32 *qmf_real, WORD32 *qmf_imag,
treal = (ixheaacd_shl32_sat(treal, shift));
*filter_states++ = ixheaacd_round16(treal);
- timag = ixheaacd_negate32(ixheaacd_add32_sat(i2, r2));
+ timag = ixheaacd_negate32_sat(ixheaacd_add32_sat(i2, r2));
timag = (ixheaacd_shl32_sat(timag, shift));
*filter_states_rev++ = ixheaacd_round16(timag);
}
diff --git a/decoder/ixheaacd_Windowing.c b/decoder/ixheaacd_Windowing.c
index bf384b4..806d93f 100644
--- a/decoder/ixheaacd_Windowing.c
+++ b/decoder/ixheaacd_Windowing.c
@@ -26,7 +26,7 @@
#include "ixheaacd_windows.h"
-WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel) {
+WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel, WORD32 ec_flag) {
switch (win_sel) {
case WIN_SEL_0:
switch (win_sz) {
@@ -51,7 +51,12 @@ WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel) {
case WIN_LEN_256:
*win = (WORD32 *)ixheaacd_sine_win_256;
break;
- default:;
+ default:
+ if (ec_flag)
+ *win = (WORD32 *)ixheaacd_sine_win_1024;
+ else
+ return -1;
+ break;
}
break;
@@ -91,7 +96,10 @@ WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel) {
*win = (WORD32 *)ixheaacd_kbd_win48;
break;
default:
- return -1;
+ if (ec_flag)
+ *win = (WORD32 *)ixheaacd_kbd_win1024;
+ else
+ return -1;
break;
}
break;
diff --git a/decoder/ixheaacd_aac_config.h b/decoder/ixheaacd_aac_config.h
index 6b10e7c..fd307cc 100644
--- a/decoder/ixheaacd_aac_config.h
+++ b/decoder/ixheaacd_aac_config.h
@@ -20,49 +20,88 @@
#ifndef IXHEAACD_AAC_CONFIG_H
#define IXHEAACD_AAC_CONFIG_H
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MASK 0x0003
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MODE 0x0004
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE 0x0005
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_LOUD_NORM 0x0008
-
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX 0x0009
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_OUT08KHZ 0x000A
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_OUT16KHZ 0x000B
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_TOSTEREO 0x000C
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DSAMPLE 0x000D
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMEOK 0x000E
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4 0x000F
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_MAX_CHANNEL 0x0010
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_COUP_CHANNEL 0x0011
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX_STEREO 0x0012
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DISABLE_SYNC 0x0013
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE 0x0014
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISLOAS 0x0015
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_ENABLE 0x0016
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT 0x0017
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST 0x0018
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL 0x0019
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP 0x001A
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMESIZE 0x001B
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_LD_TESTING 0x001D
+#define IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
+#define IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
+#define IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
+#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK 0x0003
+#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MODE 0x0004
+#define IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE 0x0005
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUD_NORM 0x0008
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX 0x0009
+#define IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO 0x000A
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE 0x000B
+#define IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG 0x000C
+#define IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL 0x000D
+#define IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL 0x000E
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO 0x000F
+#define IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC 0x0010
+#define IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE 0x0011
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT 0x0012
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST 0x0013
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL 0x0014
+#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP 0x0015
+#define IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE 0x0016
+#define IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING 0x0017
+#define IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR 0x0018
+#define IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE 0x0019
+#define IA_XHEAAC_DEC_CONFIG_PARAM_AOT 0x001A
+#define IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER 0x001B
+#define IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG 0x001C
+#define IA_XHEAAC_DEC_CONFIG_ERROR_CONCEALMENT 0x001D
#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR 0x001E
#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES 0x001F
#define IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE 0x0020
#define IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT 0x0021
#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN 0x0022
#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF 0x0023
-#define IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE 0x0024
-#define IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS 0x0025
-#define IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES 0x0026
-#define IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED 0x0027
-#define IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE 0x0028
-#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG 0x0030
+#define IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES 0x0024
+
+#define IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED 0x0025
+#define IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE 0x0026
+
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_NUM_CHANNELS IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MASK IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MODE IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MODE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE \
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS \
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_LOUD_NORM IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUD_NORM
+
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_TOSTEREO IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DSAMPLE IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4 IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_MAX_CHANNEL IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_COUP_CHANNEL IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX_STEREO IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO
+#define IA_ENHAACPLUS_DEC_CONFIG_DISABLE_SYNC IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE \
+ IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL \
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMESIZE IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_LD_TESTING IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_HQ_ESBR IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_PS_ENABLE IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_AOT IA_XHEAAC_DEC_CONFIG_PARAM_AOT
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_PEAK_LIMITER IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG \
+ IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG
+
+#define IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE
+#define IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS
+
+#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_ENABLE 0x0027
#endif /* IXHEAACD_AAC_CONFIG_H */
diff --git a/decoder/ixheaacd_aac_ec.c b/decoder/ixheaacd_aac_ec.c
new file mode 100644
index 0000000..469d062
--- /dev/null
+++ b/decoder/ixheaacd_aac_ec.c
@@ -0,0 +1,457 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_basic_ops.h"
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_error_standards.h"
+
+#include <ixheaacd_cnst.h>
+#include "ixheaacd_constants.h"
+#include "ixheaacd_intrinsics.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_defines.h"
+
+#include "ixheaacd_pns.h"
+
+#include <ixheaacd_aac_rom.h>
+#include "ixheaacd_pulsedata.h"
+
+#include "ixheaacd_drc_data_struct.h"
+
+#include "ixheaacd_interface.h"
+#include "ixheaacd_info.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_rom.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_error_standards.h"
+
+#include "ixheaacd_aac_rom.h"
+
+static WORD32 ixheaacd_aac_ec_get_win_seq(WORD32 prev_win_seq) {
+ WORD32 new_win_seq = ONLY_LONG_SEQUENCE;
+
+ if (prev_win_seq == LONG_START_SEQUENCE || prev_win_seq == EIGHT_SHORT_SEQUENCE) {
+ new_win_seq = LONG_STOP_SEQUENCE;
+ }
+
+ return new_win_seq;
+}
+
+static VOID ixheaacd_aac_ec_flip_spec_sign(WORD32 *ptr_spec_coeff, WORD32 num_samples) {
+ WORD32 idx;
+ WORD32 random_value;
+
+ for (idx = 0; idx < num_samples; idx++) {
+ random_value = ptr_spec_coeff[idx] ^ idx;
+ if ((random_value & 1) == 0) {
+ ptr_spec_coeff[idx] = ixheaacd_negate32_sat(ptr_spec_coeff[idx]);
+ }
+ }
+}
+
+static VOID ixheaacd_aac_ec_store(ia_ec_state_str *pstr_ec_state,
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info,
+ ia_ics_info_struct *pstr_ics_info) {
+ WORD32 *ptr_spec_coeff = pstr_aac_dec_channel_info->ptr_spec_coeff;
+ WORD16 *ptr_spec_scale = pstr_aac_dec_channel_info->ptr_scale_factor;
+ UWORD8 win_shape = pstr_ec_state->win_shape;
+ WORD32 win_seq = pstr_ec_state->win_seq;
+ WORD16 q_spec_scale[MAX_SPEC_SCALE_LEN];
+ WORD32 *ptr_temp_spec_coeff = &pstr_ec_state->str_ec_scratch.spec_coeff[0];
+
+ memcpy(q_spec_scale, pstr_ec_state->q_spec_coeff, sizeof(q_spec_scale));
+
+ pstr_ec_state->win_seq = pstr_ics_info->window_sequence;
+ pstr_ec_state->win_shape = (UWORD8)pstr_ics_info->window_shape;
+ pstr_ec_state->prev_win_group_len =
+ *(pstr_ics_info->window_group_length + pstr_ics_info->num_window_groups - 1);
+
+ memcpy(pstr_ec_state->q_spec_coeff, ptr_spec_scale, sizeof(pstr_ec_state->q_spec_coeff));
+
+ memcpy(ptr_temp_spec_coeff, ptr_spec_coeff, LEN_SUPERFRAME * sizeof(ptr_temp_spec_coeff[0]));
+ memcpy(ptr_spec_coeff, pstr_ec_state->spectral_coeff,
+ LEN_SUPERFRAME * sizeof(ptr_spec_coeff[0]));
+ memcpy(pstr_ec_state->spectral_coeff, ptr_temp_spec_coeff,
+ sizeof(pstr_ec_state->spectral_coeff));
+ pstr_ics_info->window_sequence = win_seq;
+ pstr_ics_info->window_shape = win_shape;
+
+ memcpy(ptr_spec_scale, q_spec_scale, MAX_SPEC_SCALE_LEN * sizeof(ptr_spec_scale[0]));
+}
+
+static VOID ixheaacd_aac_ec_calc_sfb_nrg(WORD32 *ptr_spec_coeff,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info,
+ const WORD32 win_seq, WORD32 win_trans,
+ WORD32 *ptr_sfb_energy) {
+ const WORD16 *ptr_sfb_offset;
+ WORD32 line = 0, sfb, total_scale_factor_bands = 0;
+
+ switch (win_seq) {
+ case EIGHT_SHORT_SEQUENCE:
+
+ if (win_trans == NO_TRANSITION) {
+ total_scale_factor_bands = pstr_samp_rate_info->num_sfb_128 - 1;
+ ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_128;
+
+ for (sfb = 0; sfb < total_scale_factor_bands; sfb++) {
+ WORD32 accu = 1;
+ WORD32 q_nrg;
+ if (sfb == 0) {
+ q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
+ for (; line < ptr_sfb_offset[sfb]; line++) {
+ accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; line < ptr_sfb_offset[sfb + 1]; line++) {
+ accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ } else {
+ total_scale_factor_bands = pstr_samp_rate_info->num_sfb_1024 - 1;
+ ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_1024;
+
+ for (sfb = 0; sfb < total_scale_factor_bands; sfb++) {
+ WORD32 accu = 1;
+ WORD32 q_nrg;
+ if (sfb == 0) {
+ q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
+ for (; line < ptr_sfb_offset[sfb]; line++) {
+ accu +=
+ ixheaacd_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; line < ptr_sfb_offset[sfb + 1]; line++) {
+ accu +=
+ ixheaacd_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ }
+ break;
+
+ case ONLY_LONG_SEQUENCE:
+ case LONG_START_SEQUENCE:
+ case LONG_STOP_SEQUENCE:
+
+ if (win_trans == NO_TRANSITION) {
+ total_scale_factor_bands = pstr_samp_rate_info->num_sfb_1024 - 1;
+ ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_1024;
+
+ for (sfb = 0; sfb < total_scale_factor_bands; sfb++) {
+ WORD32 accu = 1;
+ WORD32 q_nrg;
+ if (sfb == 0) {
+ q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
+ for (; line < ptr_sfb_offset[sfb]; line++) {
+ accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; line < ptr_sfb_offset[sfb + 1]; line++) {
+ accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ } else {
+ total_scale_factor_bands = pstr_samp_rate_info->num_sfb_128 - 1;
+ ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_128;
+
+ for (sfb = 0; sfb < total_scale_factor_bands; sfb++) {
+ WORD32 accu = 1;
+ WORD32 q_nrg;
+ if (sfb == 0) {
+ q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
+ for (; line < ptr_sfb_offset[sfb] << 3; line++) {
+ accu += (accu +
+ (ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
+ 3;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; line < ptr_sfb_offset[sfb + 1] << 3; line++) {
+ accu +=
+ (accu + (ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
+ 3;
+ }
+ ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
+ }
+ }
+ break;
+ }
+}
+
+static VOID ixheaacd_aac_ec_interpolate(WORD32 *ptr_spec_coeff, WORD16 *ptr_spec_scale_prev,
+ WORD16 *ptr_spec_scale_act, WORD16 *ptr_spec_scale_out,
+ WORD32 *nrg_prev, WORD32 *nrg_act, WORD32 num_sfb,
+ const WORD16 *ptr_sfb_offset) {
+ WORD32 sfb, line = 0;
+ WORD32 fac_shift;
+ WORD32 fac_mod;
+
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ fac_shift =
+ nrg_prev[sfb] - nrg_act[sfb] + ((*ptr_spec_scale_act - *ptr_spec_scale_prev) << 1);
+ fac_mod = fac_shift & 3;
+ fac_shift = (fac_shift >> 2) + 1;
+ fac_shift += *ptr_spec_scale_prev - max(*ptr_spec_scale_prev, *ptr_spec_scale_act);
+ fac_shift = max(min(fac_shift, INT_BITS - 1), -(INT_BITS - 1));
+
+ for (; line < ptr_sfb_offset[sfb]; line++) {
+ WORD32 accu =
+ ixheaacd_mult32x16in32_shl(ptr_spec_coeff[line], ia_ec_interpolation_fac[fac_mod]);
+ ptr_spec_coeff[line] = ixheaacd_shl32_dir_sat(accu, fac_shift);
+ }
+ }
+ *ptr_spec_scale_out = max(*ptr_spec_scale_prev, *ptr_spec_scale_act);
+}
+
+static VOID ixheaacd_aac_ec_state(ia_ec_state_str *pstr_ec_state, WORD32 frame_status) {
+ WORD32 ec_state_val = (pstr_ec_state->prev_frame_ok[0] << 2) +
+ (pstr_ec_state->prev_frame_ok[1] << 1) + (frame_status);
+
+ switch (ec_state_val) {
+ case 0:
+ case 4:
+ if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx++;
+ }
+ pstr_ec_state->conceal_state = FRAME_CONCEAL_SINGLE;
+ break;
+ case 1:
+ case 2:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_FADE;
+ break;
+ case 5:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ break;
+ break;
+ case 3:
+ case 6:
+ case 7:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ break;
+ default:
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ }
+ if (pstr_ec_state->fade_idx > MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx = MAX_FADE_FRAMES;
+ }
+ if (pstr_ec_state->fade_idx == MAX_FADE_FRAMES) {
+ pstr_ec_state->conceal_state = FRAME_MUTE;
+ }
+ if (pstr_ec_state->fade_idx < 0) {
+ pstr_ec_state->fade_idx = 0;
+ }
+}
+
+static VOID ixheaacd_aac_ec_interpolate_frame(
+ ia_ec_state_str *pstr_ec_state, ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info, const WORD32 num_samples,
+ const WORD32 frame_status, ia_ics_info_struct *pstr_ics_info) {
+ WORD32 *ptr_spec_coeff = pstr_aac_dec_channel_info->ptr_spec_coeff;
+ WORD16 *ptr_spec_scale = pstr_aac_dec_channel_info->ptr_scale_factor;
+
+ WORD32 sfb_nrg_prev[WIN_LEN_64];
+ WORD32 sfb_nrg_act[WIN_LEN_64];
+
+ WORD32 idx;
+
+ memset(sfb_nrg_prev, 0, sizeof(sfb_nrg_prev));
+ memset(sfb_nrg_act, 0, sizeof(sfb_nrg_act));
+
+ if (!frame_status) {
+ pstr_ics_info->window_shape = pstr_ec_state->win_shape;
+ pstr_ics_info->window_sequence = pstr_ec_state->win_seq;
+
+ for (idx = 0; idx < num_samples; idx++) {
+ ptr_spec_coeff[idx] = pstr_ec_state->spectral_coeff[idx];
+ }
+
+ memcpy(ptr_spec_scale, pstr_ec_state->q_spec_coeff, 8 * sizeof(ptr_spec_scale[0]));
+ }
+
+ if (!pstr_ec_state->prev_frame_ok[1]) {
+ if (frame_status && pstr_ec_state->prev_frame_ok[0]) {
+ if (pstr_ics_info->window_sequence == EIGHT_SHORT_SEQUENCE) {
+ WORD32 window;
+ if (pstr_ec_state->win_seq == EIGHT_SHORT_SEQUENCE) {
+ WORD32 total_scale_factor_bands = pstr_samp_rate_info->num_sfb_128 - 1;
+ const WORD16 *ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_128;
+ pstr_ics_info->window_shape = 1;
+ pstr_ics_info->window_sequence = EIGHT_SHORT_SEQUENCE;
+
+ for (window = 0; window < 8; window++) {
+ ixheaacd_aac_ec_calc_sfb_nrg(&ptr_spec_coeff[window * (num_samples / 8)],
+ pstr_samp_rate_info, EIGHT_SHORT_SEQUENCE, NO_TRANSITION,
+ sfb_nrg_prev);
+
+ ixheaacd_aac_ec_calc_sfb_nrg(
+ &pstr_ec_state->spectral_coeff[window * (num_samples / 8)], pstr_samp_rate_info,
+ EIGHT_SHORT_SEQUENCE, NO_TRANSITION, sfb_nrg_act);
+
+ ixheaacd_aac_ec_interpolate(
+ &ptr_spec_coeff[window * (num_samples / 8)], &ptr_spec_scale[window],
+ &pstr_ec_state->q_spec_coeff[window], &ptr_spec_scale[window], sfb_nrg_prev,
+ sfb_nrg_act, total_scale_factor_bands, ptr_sfb_offset);
+ }
+ } else {
+ WORD32 total_scale_factor_bands = pstr_samp_rate_info->num_sfb_1024 - 1;
+ const WORD16 *ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_1024;
+ WORD16 spec_scale_out;
+
+ ixheaacd_aac_ec_calc_sfb_nrg(&ptr_spec_coeff[num_samples - (num_samples / 8)],
+ pstr_samp_rate_info, EIGHT_SHORT_SEQUENCE,
+ TRANS_SHORT_LONG, sfb_nrg_act);
+
+ ixheaacd_aac_ec_calc_sfb_nrg(pstr_ec_state->spectral_coeff, pstr_samp_rate_info,
+ ONLY_LONG_SEQUENCE, NO_TRANSITION, sfb_nrg_prev);
+
+ pstr_ics_info->window_shape = 0;
+ pstr_ics_info->window_sequence = LONG_STOP_SEQUENCE;
+
+ for (idx = 0; idx < num_samples; idx++) {
+ ptr_spec_coeff[idx] = pstr_ec_state->spectral_coeff[idx];
+ }
+
+ for (idx = 0; idx < 8; idx++) {
+ if (ptr_spec_scale[idx] > ptr_spec_scale[0]) {
+ ptr_spec_scale[0] = ptr_spec_scale[idx];
+ }
+ }
+
+ ixheaacd_aac_ec_interpolate(ptr_spec_coeff, &pstr_ec_state->q_spec_coeff[0],
+ &ptr_spec_scale[0], &spec_scale_out, sfb_nrg_prev,
+ sfb_nrg_act, total_scale_factor_bands, ptr_sfb_offset);
+
+ ptr_spec_scale[0] = spec_scale_out;
+ }
+ } else {
+ WORD32 total_scale_factor_bands = pstr_samp_rate_info->num_sfb_1024 - 1;
+ const WORD16 *ptr_sfb_offset = pstr_samp_rate_info->ptr_sfb_1024;
+ WORD16 spec_scale_act = pstr_ec_state->q_spec_coeff[0];
+
+ ixheaacd_aac_ec_calc_sfb_nrg(ptr_spec_coeff, pstr_samp_rate_info, ONLY_LONG_SEQUENCE,
+ NO_TRANSITION, sfb_nrg_prev);
+
+ if (pstr_ec_state->win_seq == EIGHT_SHORT_SEQUENCE) {
+ pstr_ics_info->window_shape = 1;
+ pstr_ics_info->window_sequence = LONG_START_SEQUENCE;
+
+ for (idx = 1; idx < 8; idx++) {
+ if (pstr_ec_state->q_spec_coeff[idx] > spec_scale_act) {
+ spec_scale_act = pstr_ec_state->q_spec_coeff[idx];
+ }
+ }
+
+ ixheaacd_aac_ec_calc_sfb_nrg(pstr_ec_state->spectral_coeff, pstr_samp_rate_info,
+ EIGHT_SHORT_SEQUENCE, TRANS_SHORT_LONG, sfb_nrg_act);
+ } else {
+ pstr_ics_info->window_shape = 0;
+ pstr_ics_info->window_sequence = ONLY_LONG_SEQUENCE;
+
+ ixheaacd_aac_ec_calc_sfb_nrg(pstr_ec_state->spectral_coeff, pstr_samp_rate_info,
+ ONLY_LONG_SEQUENCE, NO_TRANSITION, sfb_nrg_act);
+ }
+
+ ixheaacd_aac_ec_interpolate(ptr_spec_coeff, &ptr_spec_scale[0], &spec_scale_act,
+ &ptr_spec_scale[0], sfb_nrg_prev, sfb_nrg_act,
+ total_scale_factor_bands, ptr_sfb_offset);
+ }
+ }
+
+ ixheaacd_aac_ec_flip_spec_sign(ptr_spec_coeff, num_samples);
+ }
+
+ if (FRAME_MUTE == pstr_ec_state->conceal_state) {
+ pstr_ics_info->window_shape = pstr_ec_state->win_shape;
+ pstr_ics_info->window_sequence = ixheaacd_aac_ec_get_win_seq(pstr_ec_state->win_seq);
+ pstr_ec_state->win_seq = pstr_ics_info->window_sequence;
+ memset(ptr_spec_coeff, 0, num_samples * sizeof(ptr_spec_coeff[0]));
+ }
+}
+
+VOID ixheaacd_aac_ec_init(ia_ec_state_str *pstr_ec_state) {
+ pstr_ec_state->win_shape = CONCEAL_NOT_DEFINED;
+ pstr_ec_state->win_seq = ONLY_LONG_SEQUENCE;
+ pstr_ec_state->prev_win_group_len = 1;
+
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+
+ memset(pstr_ec_state->spectral_coeff, 0, sizeof(pstr_ec_state->spectral_coeff));
+ memset(pstr_ec_state->q_spec_coeff, 0, sizeof(pstr_ec_state->q_spec_coeff));
+
+ pstr_ec_state->prev_frame_ok[0] = 1;
+ pstr_ec_state->prev_frame_ok[1] = 1;
+ pstr_ec_state->fade_idx = 0;
+}
+
+VOID ixheaacd_aac_apply_ec(ia_ec_state_str *pstr_ec_state,
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info,
+ const WORD32 num_samples, ia_ics_info_struct *pstr_ics_info,
+ const WORD32 frame_status) {
+ if (pstr_ec_state->win_shape == CONCEAL_NOT_DEFINED) {
+ pstr_ec_state->win_shape = (UWORD8)pstr_ics_info->window_shape;
+ }
+
+ if (frame_status && pstr_ec_state->prev_frame_ok[1]) {
+ ixheaacd_aac_ec_store(pstr_ec_state, pstr_aac_dec_channel_info, pstr_ics_info);
+ }
+
+ ixheaacd_aac_ec_state(pstr_ec_state, frame_status);
+
+ ixheaacd_aac_ec_interpolate_frame(pstr_ec_state, pstr_aac_dec_channel_info, pstr_samp_rate_info,
+ num_samples, frame_status, pstr_ics_info);
+
+ pstr_ec_state->prev_frame_ok[0] = pstr_ec_state->prev_frame_ok[1];
+ pstr_ec_state->prev_frame_ok[1] = frame_status;
+}
diff --git a/decoder/ixheaacd_aac_imdct.c b/decoder/ixheaacd_aac_imdct.c
index dc810e4..b52e8c5 100644
--- a/decoder/ixheaacd_aac_imdct.c
+++ b/decoder/ixheaacd_aac_imdct.c
@@ -77,31 +77,6 @@ WORD32 rev_dig[] = { 0, 8, 2, 10 };
WORD32 ixheaacd_fft5out[FFT15X2];
-static PLATFORM_INLINE WORD32 ixheaacd_shr32_drc(WORD32 a, WORD32 b) {
- WORD32 out_val;
-
- b = ((UWORD32)(b << 24) >> 24);
- if (b >= 31) {
- if (a < 0)
- out_val = -1;
- else
- out_val = 0;
- } else {
- a = ixheaacd_add32_sat(a, (1 << (b - 1)));
- out_val = (WORD32)a >> b;
- }
-
- return out_val;
-}
-
-static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32_drc(WORD32 a, WORD32 b) {
- WORD32 result;
- WORD64 temp_result;
- temp_result = (WORD64)a * (WORD64)(b >> 16);
- result = (WORD32)(temp_result >> 16);
- return (result);
-}
-
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16lin32(WORD32 a, WORD32 b) {
WORD32 result;
WORD64 temp_result;
@@ -117,7 +92,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32x16lin32(WORD32 a, WORD32 b,
return (result);
}
-static PLATFORM_INLINE WORD32 ixheaacd_mult32x16lin32_drc(WORD32 a, WORD32 b) {
+static PLATFORM_INLINE WORD32 ixheaacd_mult32x16lin32_sat(WORD32 a, WORD32 b) {
WORD32 result;
WORD64 temp_result;
temp_result = (WORD64)a * (WORD64)(((b & 0xFFFF) << 16) >> 16);
@@ -566,21 +541,21 @@ VOID ixheaacd_post_twid_overlap_add_dec(
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outr, 16 - q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 - q_shift);
win1 = *((WORD32 *)window + size - 1);
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outi), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
*pcmout1 = accu;
@@ -606,20 +581,20 @@ VOID ixheaacd_post_twid_overlap_add_dec(
overlap_data = *ptr_overlap_buf;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outi, 16 - q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 - q_shift);
win1 = *((WORD32 *)window + i);
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outr), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)win1));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
*pcmout1 = accu;
pcmout1 += ch_fac;
@@ -643,20 +618,20 @@ VOID ixheaacd_post_twid_overlap_add_dec(
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outr, 16 - q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 - q_shift);
win1 = *((WORD32 *)window + i + 1);
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outi), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
*pcmout1 = accu;
pcmout1 += ch_fac;
}
@@ -680,19 +655,19 @@ VOID ixheaacd_post_twid_overlap_add_dec(
overlap_data = *ptr_overlap_buf;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outi, 16 - q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 - q_shift);
win1 = *((WORD32 *)window + i);
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_sat(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outr), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)win1));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
*pcmout1 = accu;
pcmout1 += ch_fac;
@@ -723,21 +698,21 @@ VOID ixheaacd_post_twid_overlap_add_dec(
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outr, 16 + q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 + q_shift);
win1 = *((WORD32 *)window + size - 1);
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outi), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
*pcmout1 = accu;
pcmout1 += ch_fac;
@@ -761,21 +736,21 @@ VOID ixheaacd_post_twid_overlap_add_dec(
temp2 = ixheaacd_mult32x16in32(outr, adjust);
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outi, 16 + q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 + q_shift);
win1 = *((WORD32 *)window + i);
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outr), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)win1));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
*pcmout1 = accu;
pcmout1 += ch_fac;
@@ -797,21 +772,21 @@ VOID ixheaacd_post_twid_overlap_add_dec(
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outr, 16 + q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 + q_shift);
win1 = *((WORD32 *)window + i + 1);
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outi), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
*pcmout1 = accu;
pcmout1 += ch_fac;
@@ -836,20 +811,20 @@ VOID ixheaacd_post_twid_overlap_add_dec(
outr = outr + temp1;
outi = outi + temp2;
- *ptr_overlap_buf++ = ixheaacd_shr32_drc(outi, 16 + q_shift);
+ *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 + q_shift);
win1 = *((WORD32 *)window + i);
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)(win1 >> 16)));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
*pcm_out = accu;
pcm_out -= ch_fac;
accu = ixheaacd_sub32_sat(
ixheaacd_shr32(
- ixheaacd_mult32x16hin32_drc(ixheaacd_negate32(outr), win1),
+ ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1),
q_shift),
- ixheaacd_mult32x16lin32_drc(overlap_data, (WORD16)win1));
+ ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
*pcmout1 = accu;
pcmout1 += ch_fac;
}
@@ -1202,9 +1177,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x2i, twiddle_val));
+ ixheaacd_mult32x16hin32(x2i, twiddle_val));
x2i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x2r, twiddle_val), x2i,
+ ixheaacd_mult32x16hin32(x2r, twiddle_val), x2i,
twiddle_val))
<< 1;
x2r = tmp << 1;
@@ -1213,9 +1188,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x4i, twiddle_val));
+ ixheaacd_mult32x16hin32(x4i, twiddle_val));
x4i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x4r, twiddle_val), x4i,
+ ixheaacd_mult32x16hin32(x4r, twiddle_val), x4i,
twiddle_val))
<< 1;
x4r = tmp << 1;
@@ -1224,9 +1199,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x6i, twiddle_val));
+ ixheaacd_mult32x16hin32(x6i, twiddle_val));
x6i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x6r, twiddle_val), x6i,
+ ixheaacd_mult32x16hin32(x6r, twiddle_val), x6i,
twiddle_val))
<< 1;
x6r = tmp << 1;
@@ -1264,9 +1239,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x1i, twiddle_val));
+ ixheaacd_mult32x16hin32(x1i, twiddle_val));
x1i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x1r, twiddle_val), x1i,
+ ixheaacd_mult32x16hin32(x1r, twiddle_val), x1i,
twiddle_val))
<< 1;
x1r = tmp << 1;
@@ -1279,9 +1254,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x3i, twiddle_val));
+ ixheaacd_mult32x16hin32(x3i, twiddle_val));
x3i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x3r, twiddle_val), x3i, twiddle_val));
+ ixheaacd_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val));
x3r = tmp;
x5r = *data;
@@ -1292,9 +1267,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x5i, twiddle_val));
+ ixheaacd_mult32x16hin32(x5i, twiddle_val));
x5i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x5r, twiddle_val), x5i, twiddle_val));
+ ixheaacd_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val));
x5r = tmp;
x7r = *data;
@@ -1306,9 +1281,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddles -= 7 * (j >> 3);
tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x7i, twiddle_val));
+ ixheaacd_mult32x16hin32(x7i, twiddle_val));
x7i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x7r, twiddle_val), x7i, twiddle_val));
+ ixheaacd_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val));
x7r = tmp;
x1r = x1r + (x5r << 1);
@@ -1438,9 +1413,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x2i, twiddle_val));
+ ixheaacd_mult32x16hin32(x2i, twiddle_val));
x2i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x2r, twiddle_val), x2i,
+ ixheaacd_mult32x16hin32(x2r, twiddle_val), x2i,
twiddle_val))
<< 1;
x2r = tmp << 1;
@@ -1449,9 +1424,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x4i, twiddle_val));
+ ixheaacd_mult32x16hin32(x4i, twiddle_val));
x4i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x4r, twiddle_val), x4i,
+ ixheaacd_mult32x16hin32(x4r, twiddle_val), x4i,
twiddle_val))
<< 1;
x4r = tmp << 1;
@@ -1460,9 +1435,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x6i, twiddle_val));
+ ixheaacd_mult32x16hin32(x6i, twiddle_val));
x6i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x6r, twiddle_val), x6i,
+ ixheaacd_mult32x16hin32(x6r, twiddle_val), x6i,
twiddle_val))
<< 1;
x6r = tmp << 1;
@@ -1500,9 +1475,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x1i, twiddle_val));
+ ixheaacd_mult32x16hin32(x1i, twiddle_val));
x1i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x1r, twiddle_val), x1i,
+ ixheaacd_mult32x16hin32(x1r, twiddle_val), x1i,
twiddle_val))
<< 1;
x1r = tmp << 1;
@@ -1515,9 +1490,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x3i, twiddle_val));
+ ixheaacd_mult32x16hin32(x3i, twiddle_val));
x3i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x3r, twiddle_val), x3i, twiddle_val));
+ ixheaacd_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val));
x3r = tmp;
x5r = *data;
@@ -1528,9 +1503,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddle_val = *(twiddles);
tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x5i, twiddle_val));
+ ixheaacd_mult32x16hin32(x5i, twiddle_val));
x5i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x5r, twiddle_val), x5i, twiddle_val));
+ ixheaacd_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val));
x5r = tmp;
x7r = *data;
@@ -1542,9 +1517,9 @@ VOID ixheaacd_imdct_using_fft_dec(
twiddles -= 7 * (j >> 3);
tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) -
- ixheaacd_mult32x16hin32_drc(x7i, twiddle_val));
+ ixheaacd_mult32x16hin32(x7i, twiddle_val));
x7i = (ixheaacd_mac32x16lin32(
- ixheaacd_mult32x16hin32_drc(x7r, twiddle_val), x7i, twiddle_val));
+ ixheaacd_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val));
x7r = tmp;
x1r = x1r + (x5r << 1);
@@ -1987,11 +1962,10 @@ VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints,
}
}
-VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 N,
- WORD16 *re_arr_tab) {
+VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2, WORD16 *re_arr_tab) {
WORD32 n, i = 0;
- for (n = 0; n < N; n++) {
+ for (n = 0; n < mdct_len_2; n++) {
WORD32 idx = re_arr_tab[n] << 1;
op[i++] = ip[idx];
op[i++] = ip[idx + 1];
@@ -2534,11 +2508,11 @@ VOID ixheaacd_pre_twiddle_960(WORD32 *xptr, WORD32 *data, WORD32 n,
temp = -ixheaacd_add32(ixheaacd_mult32x32in32(tempr, c),
ixheaacd_mult32x32in32(tempi, s));
- *xptr++ = shr32_dir_sat(temp, neg_expo);
+ *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo);
temp = -ixheaacd_sub32(ixheaacd_mult32x32in32(tempi, c),
ixheaacd_mult32x32in32(tempr, s));
- *xptr++ = shr32_dir_sat(temp, neg_expo);
+ *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo);
c1 = *cos_sin_ptr++;
s1 = *cos_sin_ptr++;
@@ -2548,11 +2522,11 @@ VOID ixheaacd_pre_twiddle_960(WORD32 *xptr, WORD32 *data, WORD32 n,
temp = -ixheaacd_sub32(ixheaacd_mult32x32in32(tempi, c1),
ixheaacd_mult32x32in32(tempr, s1));
- *xprt1-- = shr32_dir_sat(temp, neg_expo);
+ *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo);
temp = -ixheaacd_add32(ixheaacd_mult32x32in32(tempr, c1),
ixheaacd_mult32x32in32(tempi, s1));
- *xprt1-- = shr32_dir_sat(temp, neg_expo);
+ *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo);
}
}
@@ -2578,11 +2552,11 @@ VOID ixheaacd_pre_twiddle_120(WORD32 *xptr, WORD32 *data, WORD32 n,
temp = -ixheaacd_add32(ixheaacd_mult32x16in32(tempr, c),
ixheaacd_mult32x16in32(tempi, s));
- *xptr++ = shr32_dir_sat(temp, neg_expo);
+ *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo);
temp = -ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c),
ixheaacd_mult32x16in32(tempr, s));
- *xptr++ = shr32_dir_sat(temp, neg_expo);
+ *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo);
c1 = *cos_sin_ptr++;
s1 = *cos_sin_ptr++;
@@ -2592,11 +2566,11 @@ VOID ixheaacd_pre_twiddle_120(WORD32 *xptr, WORD32 *data, WORD32 n,
temp = -ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c1),
ixheaacd_mult32x16in32(tempr, s1));
- *xprt1-- = shr32_dir_sat(temp, neg_expo);
+ *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo);
temp = -ixheaacd_add32(ixheaacd_mult32x16in32(tempr, c1),
ixheaacd_mult32x16in32(tempi, s1));
- *xprt1-- = shr32_dir_sat(temp, neg_expo);
+ *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo);
}
}
diff --git a/decoder/ixheaacd_aac_imdct.h b/decoder/ixheaacd_aac_imdct.h
index ddba1a8..f88322d 100644
--- a/decoder/ixheaacd_aac_imdct.h
+++ b/decoder/ixheaacd_aac_imdct.h
@@ -114,7 +114,7 @@ VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints,
VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out,
WORD16 *re_arr_tab_sml_240_ptr);
-VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 n,
+VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2,
WORD16 *re_arr_tab);
VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n,
diff --git a/decoder/ixheaacd_aac_rom.c b/decoder/ixheaacd_aac_rom.c
index 9e07777..4a3cc19 100644
--- a/decoder/ixheaacd_aac_rom.c
+++ b/decoder/ixheaacd_aac_rom.c
@@ -396,121 +396,120 @@ const ia_aac_dec_huffman_tables_struct ixheaacd_aac_huffmann_tables = {
},
// static const WORD16 sfb_96_960[41] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4,
- 4, 4, 8, 8, 8, 8,
- 8, 12, 12, 12, 12, 12,
- 16, 16, 24, 28, 36, 44,
- 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, -1
-},
-
-/* 13 scfbands */
-
-// static const WORD16 sfb_96_120[13] =
-{
- 4, 4, 4, 4, 4, 4,
- 8, 8, 8, 16, 28, 28,
- -1
-},
-
-/* 47 scfbands*/
-// static const WORD16 sfb_64_960[47] =
-{
- 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4,
- 8, 8, 8, 8, 12, 12, 12,
- 16, 16, 16, 20, 24, 24, 28,
- 36, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 16, -1
-},
-
-/* 49 scfbands */
-// static const WORD16 sfb_48_960[50] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 8, 8,
- 8, 8, 8, 8, 8, 12,
- 12, 12, 12, 16, 16, 20,
- 20, 24, 24, 28, 28, 32,
- 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32,
- 32, -1
-},
-
-/* 14 scfbands */
-// static const WORD16 sfb_48_120[15] =
-{
- 4, 4, 4, 4, 4, 8,
- 8, 8, 12, 12, 12, 16,
- 16, 8, -1
-},
-
-
-/* 47 scfbands */
-// static const WORD16 sfb_24_960[47] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 8,
- 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 12, 12, 12,
- 12, 16, 16, 16, 20, 20,
- 24, 24, 28, 28, 32, 36,
- 36, 40, 44, 48, 52, 52,
- 64, 64, 64, 64, -1
-},
-
-/* 15 scfbands */
-// static const WORD16 sfb_24_120[16] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 8, 8, 8, 12, 12,
- 16, 16, 12, -1
-},
-
-/* 43 scfbands */
-// static const WORD16 sfb_16_960[43] =
-{
- 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 12,
- 12, 12, 12, 12, 12, 12,
- 12, 12, 16, 16, 16, 16,
- 20, 20, 20, 24, 24, 28,
- 28, 32, 36, 40, 40, 44,
- 48, 52, 56, 60, 64, 64,
- -1
-},
-
-/* 15 scfbands */
-// static const WORD16 sfb_16_120[16] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 4, 8, 8, 12, 12,
- 16, 20, 12, -1
-},
-
-/* 40 scfbands */
-// static const WORD16 sfb_8_960[41] =
-{
- 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12,
- 12, 16, 16, 16, 16, 16,
- 16, 16, 20, 20, 20, 20,
- 24, 24, 24, 28, 28, 32,
- 36, 36, 40, 44, 48, 52,
- 56, 60, 64, 16, -1
-},
-
-/* 15 scfbands */
-// static const WORD16 sfb_8_120[16] =
-{
- 4, 4, 4, 4, 4, 4,
- 4, 8, 8, 8, 8, 12,
- 16, 20, 12, -1
-},
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4,
+ 4, 4, 8, 8, 8, 8,
+ 8, 12, 12, 12, 12, 12,
+ 16, 16, 24, 28, 36, 44,
+ 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, -1
+ },
+
+ /* 13 scfbands */
+ // static const WORD16 sfb_96_120[13] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 8, 8, 8, 16, 28, 28,
+ -1
+ },
+
+ /* 47 scfbands*/
+ // static const WORD16 sfb_64_960[47] =
+ {
+ 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4,
+ 8, 8, 8, 8, 12, 12, 12,
+ 16, 16, 16, 20, 24, 24, 28,
+ 36, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 16, -1
+ },
+
+ /* 49 scfbands */
+ // static const WORD16 sfb_48_960[50] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 12,
+ 12, 12, 12, 16, 16, 20,
+ 20, 24, 24, 28, 28, 32,
+ 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,
+ 32, -1
+ },
+
+ /* 14 scfbands */
+ // static const WORD16 sfb_48_120[15] =
+ {
+ 4, 4, 4, 4, 4, 8,
+ 8, 8, 12, 12, 12, 16,
+ 16, 8, -1
+ },
+
+
+ /* 47 scfbands */
+ // static const WORD16 sfb_24_960[47] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 8,
+ 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 12, 12, 12,
+ 12, 16, 16, 16, 20, 20,
+ 24, 24, 28, 28, 32, 36,
+ 36, 40, 44, 48, 52, 52,
+ 64, 64, 64, 64, -1
+ },
+
+ /* 15 scfbands */
+ // static const WORD16 sfb_24_120[16] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 8, 8, 8, 12, 12,
+ 16, 16, 12, -1
+ },
+
+ /* 43 scfbands */
+ // static const WORD16 sfb_16_960[43] =
+ {
+ 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 12,
+ 12, 12, 12, 12, 12, 12,
+ 12, 12, 16, 16, 16, 16,
+ 20, 20, 20, 24, 24, 28,
+ 28, 32, 36, 40, 40, 44,
+ 48, 52, 56, 60, 64, 64,
+ -1
+ },
+
+ /* 15 scfbands */
+ // static const WORD16 sfb_16_120[16] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 4, 8, 8, 12, 12,
+ 16, 20, 12, -1
+ },
+
+ /* 40 scfbands */
+ // static const WORD16 sfb_8_960[41] =
+ {
+ 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12,
+ 12, 16, 16, 16, 16, 16,
+ 16, 16, 20, 20, 20, 20,
+ 24, 24, 24, 28, 28, 32,
+ 36, 36, 40, 44, 48, 52,
+ 56, 60, 64, 16, -1
+ },
+
+ /* 15 scfbands */
+ // static const WORD16 sfb_8_120[16] =
+ {
+ 4, 4, 4, 4, 4, 4,
+ 4, 8, 8, 8, 8, 12,
+ 16, 20, 12, -1
+ },
}; // end of ia_aac_dec_huffman_tables_struct
const ia_aac_dec_block_tables_struct ixheaacd_aac_block_tables = {
diff --git a/decoder/ixheaacd_aac_rom.h b/decoder/ixheaacd_aac_rom.h
index d4afbaa..5891a0e 100644
--- a/decoder/ixheaacd_aac_rom.h
+++ b/decoder/ixheaacd_aac_rom.h
@@ -20,7 +20,6 @@
#ifndef IXHEAACD_AAC_ROM_H
#define IXHEAACD_AAC_ROM_H
-#define AAC_NF_NO_RANDOM_VAL 512
#define MAX_CB_SIZE 13
typedef struct {
diff --git a/decoder/ixheaacd_aac_tns.c b/decoder/ixheaacd_aac_tns.c
index 646e009..34aad73 100644
--- a/decoder/ixheaacd_aac_tns.c
+++ b/decoder/ixheaacd_aac_tns.c
@@ -38,6 +38,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -213,6 +216,7 @@ VOID ixheaacd_tns_ar_filter_fixed_dec(WORD32 *spectrum, WORD32 size, WORD32 inc,
}
lpc[i] = 0;
order = ((order & 0xfffffffc) + 4);
+ order = order & 31;
}
{
for (i = 0; i < order; i++) {
diff --git a/decoder/ixheaacd_aacdec.h b/decoder/ixheaacd_aacdec.h
index 8f161eb..07b6957 100644
--- a/decoder/ixheaacd_aacdec.h
+++ b/decoder/ixheaacd_aacdec.h
@@ -20,11 +20,10 @@
#ifndef IXHEAACD_AACDEC_H
#define IXHEAACD_AACDEC_H
-#define AAC_DEC_OK IA_ENHAACPLUS_DEC_API_NONFATAL_NO_ERROR
-
-#define IA_ENHAACPDEC_NUM_MEMTABS (4)
+#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
#define FRAME_SIZE 1024
+#define FRAME_SIZE_SMALL 960
#define ADTS_BSFORMAT 2
#define LOAS_BSFORMAT 3
@@ -48,6 +47,9 @@ typedef struct ia_aac_decoder_struct {
WORD8 num_swb_window[2];
ia_aac_dec_tables_struct *pstr_aac_tables;
ixheaacd_misc_tables *pstr_common_tables;
+ WORD32 is_first;
+ WORD32 conceal_count;
+ WORD16 sbr_num_elements;
} ia_aac_decoder_struct;
struct ia_aac_persistent_struct {
@@ -59,6 +61,7 @@ struct ia_aac_persistent_struct {
ia_aac_dec_channel_info *ptr_aac_dec_static_channel_info[CHANNELS];
WORD16 *ltp_buf[CHANNELS];
+ WORD8 *prev_sbr_payload_buffer;
};
typedef struct {
diff --git a/decoder/ixheaacd_aacdecoder.c b/decoder/ixheaacd_aacdecoder.c
index 3ecc037..e3e16dd 100644
--- a/decoder/ixheaacd_aacdecoder.c
+++ b/decoder/ixheaacd_aacdecoder.c
@@ -29,15 +29,10 @@
#include "ixheaacd_basic_ops.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_basic_op.h"
-#include "ixheaacd_intrinsics.h"
-
#include "ixheaacd_defines.h"
#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_definitions.h"
-
#include "ixheaacd_error_codes.h"
#include "ixheaacd_pulsedata.h"
@@ -45,35 +40,45 @@
#include "ixheaacd_pns.h"
#include "ixheaacd_drc_data_struct.h"
-#include "ixheaacd_lt_predict.h"
-
-#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_interface.h"
+#include "ixheaacd_info.h"
#include "ixheaacd_cnst.h"
-#include "ixheaacd_drc_dec.h"
-#include "ixheaacd_sbrdecoder.h"
-#include "ixheaacd_block.h"
-#include "ixheaacd_channel.h"
-
-#include "ixheaacd_sbr_payload.h"
-#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_common_rom.h"
#include "ixheaacd_env_extr_part.h"
#include "ixheaacd_sbr_rom.h"
-#include "ixheaacd_stereo.h"
-#include "ixheaacd_lpp_tran.h"
#include "ixheaacd_hybrid.h"
#include "ixheaacd_ps_dec.h"
-#include "ixheaacd_env_extr.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_acelp_info.h"
+#include "ixheaacd_tns_usac.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_rom.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_main.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_ec.h"
+#include "ixheaacd_drc_dec.h"
+
+#include "ixheaacd_block.h"
+#include "ixheaacd_channel.h"
+#include "ixheaacd_sbr_payload.h"
+#include "ixheaacd_stereo.h"
#include "ixheaacd_adts.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_memory_standards.h"
#include "ixheaacd_latmdemux.h"
#include "ixheaacd_aacdec.h"
-#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_config.h"
-#include "ixheaacd_qmf_dec.h"
-#include "ixheaacd_mps_dec.h"
+
#include "ixheaacd_struct_def.h"
#include "ixheaacd_headerdecode.h"
#include "ixheaacd_multichannel.h"
@@ -81,6 +86,7 @@
#include "ixheaacd_ld_mps_dec.h"
#include "ixheaacd_hcr.h"
+#include "ixheaacd_struct.h"
#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
@@ -91,6 +97,8 @@
#define MIN(x, y) ((x) > (y) ? (y) : (x))
+extern const ia_usac_samp_rate_info ixheaacd_samp_rate_info[];
+
WORD32 ixheaacd_aacdec_decodeframe(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
ia_aac_dec_scratch_struct *aac_scratch_ptrs, VOID *time_data_tmp,
@@ -100,9 +108,8 @@ WORD32 ixheaacd_aacdec_decodeframe(
WORD32 frame_length, WORD32 frame_size, ia_drc_dec_struct *pstr_drc_dec,
WORD32 object_type, WORD32 ch_config,
ia_eld_specific_config_struct eld_specific_config, WORD16 adtsheader,
- ia_drc_dec_struct *drc_dummy, WORD32 ldmps_present, UWORD8 *slot_pos)
-
-{
+ ia_drc_dec_struct *drc_dummy, WORD32 ldmps_present, UWORD8 *slot_pos, UWORD8 *mps_buffer,
+ WORD32 *mps_header, WORD32 *mps_bytes, WORD32 is_init, WORD32 first_frame) {
WORD ch, ele_type;
ia_aac_dec_state_struct *p_state_enhaacplus_dec;
ia_aac_decoder_struct *aac_dec_handle;
@@ -221,11 +228,9 @@ WORD32 ixheaacd_aacdec_decodeframe(
pstr_imdct_tables->only_short_window_kbd_120;
}
+ aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.frame_length = frame_length;
if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
object_type == AOT_AAC_LTP) {
- aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.frame_length =
- frame_length;
-
if (512 == aac_dec_handle->samples_per_frame) {
if (object_type != AOT_ER_AAC_ELD) {
aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
@@ -299,7 +304,7 @@ WORD32 ixheaacd_aacdec_decodeframe(
memset(ptr_pns_info, 0, sizeof(ia_pns_info_struct));
}
- {
+ if (channel > 0) {
ia_pns_correlation_info_struct *ptr_corr_info =
aac_dec_handle->pstr_aac_dec_ch_info[0]->pstr_pns_corr_info;
memset(ptr_corr_info->correlated, 0, sizeof(UWORD8) * PNS_BAND_FLAGS_SIZE);
@@ -334,490 +339,546 @@ WORD32 ixheaacd_aacdec_decodeframe(
cnt_bits = it_bit_buff->cnt_bits;
- if (((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD) &&
- (object_type != AOT_ER_AAC_LC)) || (object_type < ER_OBJECT_START)) {
- while (ele_type != ID_END && aac_dec_handle->frame_status) {
- ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
- ixheaacd_read_bidirection(it_bit_buff, -3);
-
- if (it_bit_buff->cnt_bits < 3) {
- it_bit_buff->cnt_bits = -1;
- error_code = (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- break;
- }
+ WORD32 err = 0;
+ jmp_buf local;
- if ((ele_type == ID_FIL) || (ele_type == ID_DSE) || (new_element == 0)) {
- ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
- new_element = 1;
- } else if ((ele_type != ID_END)) {
- ele_type = -1;
- break;
- } else {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ err = setjmp(local);
+ }
+
+ if (!err && frame_status) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+
+ if (((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD) &&
+ (object_type != AOT_ER_AAC_LC)) ||
+ (object_type < ER_OBJECT_START)) {
+ while (ele_type != ID_END && aac_dec_handle->frame_status) {
ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
- }
+ ixheaacd_read_bidirection(it_bit_buff, -3);
- if (it_bit_buff->cnt_bits < 0) {
- aac_dec_handle->frame_status = 0;
- }
+ if (it_bit_buff->cnt_bits < 3) {
+ it_bit_buff->cnt_bits = -1;
+ error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ break;
+ }
- switch (ele_type) {
- case ID_SCE:
- case ID_CPE:
- case ID_LFE:
+ if ((ele_type == ID_FIL) || (ele_type == ID_DSE) || (new_element == 0)) {
+ ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
+ new_element = 1;
+ } else if ((ele_type != ID_END)) {
+ ele_type = -1;
+ break;
+ } else {
+ ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
+ }
- if (aac_dec_handle->frame_status) {
- ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
- aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
- ia_ics_info_struct *ptr_ics_info =
- &pstr_aac_dec_ch_info->str_ics_info;
- ele_ch = 1;
- if (ele_type == ID_CPE) {
- ele_ch = 2;
- } else {
+ if (it_bit_buff->cnt_bits < 0) {
+ aac_dec_handle->frame_status = 0;
+ }
+
+ switch (ele_type) {
+ case ID_SCE:
+ case ID_CPE:
+ case ID_LFE:
+
+ if (aac_dec_handle->frame_status) {
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
+ aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
+ ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
ele_ch = 1;
- }
+ if (ele_type == ID_CPE) {
+ ele_ch = 2;
+ } else {
+ ele_ch = 1;
+ }
- prev_data_ele_present = 1;
+ prev_data_ele_present = 1;
- if (ptr_adts_crc_info->crc_active == 1 &&
- ptr_adts_crc_info->no_reg < 7) {
- crc_reg = ixheaacd_adts_crc_start_reg(
- ptr_adts_crc_info, it_bit_buff, CRC_ADTS_RAW_DATA_BLK_LEN);
- }
+ if (ptr_adts_crc_info->crc_active == 1 && ptr_adts_crc_info->no_reg < 7) {
+ crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
+ CRC_ADTS_RAW_DATA_BLK_LEN);
+ }
- pstr_aac_dec_ch_info->element_instance_tag =
- (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
-
- element_index_order[*ch_idx] =
- pstr_aac_dec_ch_info->element_instance_tag;
- pstr_aac_dec_ch_info->common_window = 0;
-
- ptr_ics_info->num_swb_window = 0;
- ptr_ics_info->sampling_rate_index =
- aac_dec_handle->sampling_rate_index;
- if ((object_type == AOT_ER_AAC_LD) ||
- (object_type == AOT_AAC_LTP)) {
- ptr_ics_info->ltp.data_present = 0;
- ptr_ics_info->ltp2.data_present = 0;
- ptr_ics_info->predictor_data_present = 0;
- }
+ pstr_aac_dec_ch_info->element_instance_tag =
+ (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
- if (ele_ch > 1) {
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]
- ->str_ics_info.num_swb_window = 0;
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]
- ->str_ics_info.sampling_rate_index =
- aac_dec_handle->sampling_rate_index;
-
- pstr_aac_dec_ch_info->common_window =
- (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
-
- if (pstr_aac_dec_ch_info->common_window) {
- error_code = ixheaacd_ics_read(
- it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window,
- object_type, pstr_aac_dec_ch_info->common_window,
- aac_dec_handle->samples_per_frame);
- if (error_code) {
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)(
- (WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
+ pstr_aac_dec_ch_info->common_window = 0;
+
+ ptr_ics_info->num_swb_window = 0;
+ ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
+ if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
+ ptr_ics_info->ltp.data_present = 0;
+ ptr_ics_info->ltp2.data_present = 0;
+ ptr_ics_info->predictor_data_present = 0;
+ }
+
+ if (ele_ch > 1) {
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
+ aac_dec_handle->sampling_rate_index;
+
+ pstr_aac_dec_ch_info->common_window =
+ (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ if (pstr_aac_dec_ch_info->common_window) {
+ error_code = ixheaacd_ics_read(
+ it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
+ pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
+ if (error_code) {
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
+ aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code =
+ (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
+
+ goto _ia_handle_error;
}
- goto _ia_handle_error;
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
+ pstr_aac_dec_ch_info->str_ics_info;
+
+ ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
}
+ }
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
- pstr_aac_dec_ch_info->str_ics_info;
+ error_code = ixheaacd_individual_ch_stream(
+ it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
+ eld_specific_config, ele_type);
- ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
}
- }
- error_code = ixheaacd_individual_ch_stream(
- it_bit_buff, aac_dec_handle, ele_ch, frame_length,
- total_channels, object_type, eld_specific_config, ele_type);
- if (error_code) return error_code;
-
- if (ptr_adts_crc_info->crc_active == 1) {
- ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff,
- crc_reg);
- }
+ if (ptr_adts_crc_info->crc_active == 1) {
+ ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
+ }
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)(
- (WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- }
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code =
+ (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
- if (error_code) {
- goto _ia_handle_error;
- }
+ if (error_code) {
+ goto _ia_handle_error;
+ }
- _ia_handle_error:
- if (error_code) {
- aac_dec_handle->frame_status = 0;
- if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE))
+ _ia_handle_error:
+ if (error_code) {
+ aac_dec_handle->frame_status = 0;
+ if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) num_ch = num_ch + ele_ch;
+ break;
+ } else {
+ error_code = ixheaacd_channel_pair_process(
+ aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
+ total_channels, object_type, aac_spect_data_resil_flag,
+ eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
+ aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
num_ch = num_ch + ele_ch;
- break;
- } else {
- error_code = ixheaacd_channel_pair_process(
- aac_dec_handle->pstr_aac_dec_ch_info, ele_ch,
- aac_dec_handle->pstr_aac_tables, total_channels, object_type,
- aac_spect_data_resil_flag,
- eld_specific_config.aac_sf_data_resil_flag,
- aac_scratch_ptrs->in_data, aac_scratch_ptrs->out_data,
- (void *)aac_dec_handle);
- if (error_code) return error_code;
- num_ch = num_ch + ele_ch;
+ }
}
- }
-
- break;
- case ID_CCE:
- if (max_channels > 2) {
- prev_data_ele_present = 1;
- error_code = ixheaacd_dec_coupling_channel_element(
- it_bit_buff, aac_dec_handle,
- aac_dec_handle->sampling_rate_index,
- aac_dec_handle->pstr_aac_tables,
- aac_dec_handle->pstr_common_tables,
- &element_index_order[*ch_idx],
- (ia_enhaacplus_dec_ind_cc *)aac_dec_handle->p_ind_channel_info,
- total_channels, frame_length, object_type, eld_specific_config,
- ele_type);
-
- num_ch = num_ch + 1;
- if (error_code) {
- aac_dec_handle->frame_status = 0;
- return error_code;
+ break;
+ case ID_CCE:
+ if (max_channels > 2) {
+ prev_data_ele_present = 1;
+ error_code = ixheaacd_dec_coupling_channel_element(
+ it_bit_buff, aac_dec_handle, aac_dec_handle->sampling_rate_index,
+ aac_dec_handle->pstr_aac_tables, aac_dec_handle->pstr_common_tables,
+ &element_index_order[*ch_idx],
+ (ia_enhaacplus_dec_ind_cc *)aac_dec_handle->p_ind_channel_info, total_channels,
+ frame_length, object_type, eld_specific_config, ele_type);
+
+ num_ch = num_ch + 1;
+
+ if (error_code) {
+ aac_dec_handle->frame_status = 0;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ } else {
+ error_code = ixheaacd_channel_pair_process(
+ aac_dec_handle->pstr_aac_dec_ch_info, 1, aac_dec_handle->pstr_aac_tables,
+ total_channels, object_type, aac_spect_data_resil_flag,
+ eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
+ aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
+ }
} else {
- error_code = ixheaacd_channel_pair_process(
- aac_dec_handle->pstr_aac_dec_ch_info, 1,
- aac_dec_handle->pstr_aac_tables, total_channels, object_type,
- aac_spect_data_resil_flag,
- eld_specific_config.aac_sf_data_resil_flag,
- aac_scratch_ptrs->in_data, aac_scratch_ptrs->out_data,
- (void *)aac_dec_handle);
- if (error_code) return error_code;
+ error_code = (WORD32)((WORD32)IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE);
}
- } else {
- error_code =
- (WORD32)((WORD32)IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE);
- }
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)((
- WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- goto _ia_handle_error;
- }
- break;
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ goto _ia_handle_error;
+ }
+ break;
- case ID_DSE:
- case ID_PCE:
- case ID_FIL:
+ case ID_DSE:
+ case ID_PCE:
+ case ID_FIL:
- {
- WORD32 flag = 1;
+ {
+ WORD32 flag = 1;
- if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1) &&
- (ptr_adts_crc_info->no_reg < 7)) {
- crc_reg =
- ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff, 0);
- }
- if (ele_type == ID_DSE) {
- ixheaacd_read_data_stream_element(
- it_bit_buff, &aac_dec_handle->byte_align_bits,
- p_obj_exhaacplus_dec->p_state_aac->pstr_drc_dec);
- }
+ if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1) &&
+ (ptr_adts_crc_info->no_reg < 7)) {
+ crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff, 0);
+ }
+ if (ele_type == ID_DSE) {
+ ixheaacd_read_data_stream_element(it_bit_buff, &aac_dec_handle->byte_align_bits,
+ p_obj_exhaacplus_dec->p_state_aac->pstr_drc_dec);
+ }
- else if (ele_type == ID_PCE) {
- error_code = ixheaacd_decode_pce(
- it_bit_buff,
- &p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr,
- &p_obj_exhaacplus_dec->aac_config.str_prog_config);
- if (error_code != 0) {
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)(
- (WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- goto _ia_handle_error;
- }
- aac_dec_handle->frame_status = 0;
- if (error_code > 0) {
- error_code = IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
- return error_code;
- } else {
- return error_code;
+ else if (ele_type == ID_PCE) {
+ error_code = ixheaacd_decode_pce(
+ it_bit_buff, &p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr,
+ &p_obj_exhaacplus_dec->aac_config.str_prog_config);
+ if (error_code != 0) {
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code =
+ (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ goto _ia_handle_error;
+ }
+ aac_dec_handle->frame_status = 0;
+ if (error_code > 0) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ }
+ } else {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
}
}
- }
- else if (ele_type == ID_FIL) {
- WORD32 bits_decoded = 0;
- if (object_type == AOT_ER_AAC_ELD) {
- bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
- cnt_bits = (frame_size * 8 - bits_decoded);
- if (adtsheader == 1) {
- if (cnt_bits > it_bit_buff->cnt_bits)
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ else if (ele_type == ID_FIL) {
+ WORD32 bits_decoded = 0;
+ if (object_type == AOT_ER_AAC_ELD) {
+ bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
+ cnt_bits = (frame_size * 8 - bits_decoded);
+ if (adtsheader == 1) {
+ if (cnt_bits > it_bit_buff->cnt_bits) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ }
+ }
+ }
+ }
+
+ if (ixheaacd_check_for_sbr_payload(
+ it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)previous_element,
+ pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
+ mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal)) {
+ flag = 0;
}
}
- if (ixheaacd_check_for_sbr_payload(
- it_bit_buff, aac_dec_handle->pstr_sbr_bitstream,
- (WORD16)previous_element, pstr_drc_dec, object_type,
- adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy)) {
- flag = 0;
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ goto _ia_handle_error;
}
- }
-
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)((
- WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- goto _ia_handle_error;
- }
- if (flag) {
- if (prev_data_ele_present == 0) {
- new_element = 0;
+ if (flag) {
+ if (prev_data_ele_present == 0) {
+ new_element = 0;
+ }
+ }
+ if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1)) {
+ ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
}
- }
- if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1)) {
- ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
- }
- if (ele_type == ID_PCE) {
- if (ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt) {
- ptr_adts_crc_info->str_crc_reg_data[crc_reg].max_bits =
- ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt;
+ if (ele_type == ID_PCE) {
+ if (ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt) {
+ ptr_adts_crc_info->str_crc_reg_data[crc_reg].max_bits =
+ ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt;
+ }
}
}
- }
- break;
-
- case ID_END:
- error_code = 0;
break;
- }
- previous_element = ele_type;
+ case ID_END:
+ error_code = 0;
+ break;
+ }
+
+ previous_element = ele_type;
- if (init_flag) {
- if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) {
- p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_type;
+ if (init_flag) {
+ if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) {
+ p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_type;
+ }
}
}
- }
- } else {
- {
- switch (ch_config) {
- default:
- if (aac_dec_handle->frame_status) {
- ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
- aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
- ia_ics_info_struct *ptr_ics_info =
- &pstr_aac_dec_ch_info->str_ics_info;
+ } else {
+ {
+ switch (ch_config) {
+ default:
+ if (aac_dec_handle->frame_status) {
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
+ aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
+ ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
+
+ if (ch_config == 2)
+ ele_ch = 2, ele_type = 1;
+ else
+ ele_ch = 1, ele_type = 0;
- if (ch_config == 2)
- ele_ch = 2, ele_type = 1;
- else
- ele_ch = 1, ele_type = 0;
+ prev_data_ele_present = 1;
- prev_data_ele_present = 1;
+ if ((ptr_adts_crc_info->crc_active == 1) && (ptr_adts_crc_info->no_reg < 7)) {
+ crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
+ CRC_ADTS_RAW_DATA_BLK_LEN);
+ }
- if ((ptr_adts_crc_info->crc_active == 1) &&
- (ptr_adts_crc_info->no_reg < 7)) {
- crc_reg = ixheaacd_adts_crc_start_reg(
- ptr_adts_crc_info, it_bit_buff, CRC_ADTS_RAW_DATA_BLK_LEN);
- }
+ if (object_type != AOT_ER_AAC_ELD)
+ pstr_aac_dec_ch_info->element_instance_tag =
+ (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
- if (object_type != AOT_ER_AAC_ELD)
- pstr_aac_dec_ch_info->element_instance_tag =
- (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
+ element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
+ pstr_aac_dec_ch_info->common_window = 0;
- element_index_order[*ch_idx] =
- pstr_aac_dec_ch_info->element_instance_tag;
- pstr_aac_dec_ch_info->common_window = 0;
+ ptr_ics_info->num_swb_window = 0;
+ ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
- ptr_ics_info->num_swb_window = 0;
- ptr_ics_info->sampling_rate_index =
- aac_dec_handle->sampling_rate_index;
+ if (object_type == AOT_ER_AAC_LD) {
+ ptr_ics_info->ltp.data_present = 0;
+ ptr_ics_info->ltp2.data_present = 0;
+ ptr_ics_info->predictor_data_present = 0;
+ }
+ if (ele_ch > 1) {
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
+ aac_dec_handle->sampling_rate_index;
+
+ if (object_type != 39)
+ pstr_aac_dec_ch_info->common_window =
+ (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
+ else
+ pstr_aac_dec_ch_info->common_window = 1;
+
+ if (pstr_aac_dec_ch_info->common_window) {
+ error_code = ixheaacd_ics_read(
+ it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
+ pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
+ if (error_code) {
+ aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
+ aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code =
+ (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
- if (object_type == AOT_ER_AAC_LD) {
- ptr_ics_info->ltp.data_present = 0;
- ptr_ics_info->ltp2.data_present = 0;
- ptr_ics_info->predictor_data_present = 0;
- }
- if (ele_ch > 1) {
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]
- ->str_ics_info.num_swb_window = 0;
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]
- ->str_ics_info.sampling_rate_index =
- aac_dec_handle->sampling_rate_index;
-
- if (object_type != 39)
- pstr_aac_dec_ch_info->common_window =
- (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
- else
- pstr_aac_dec_ch_info->common_window = 1;
+ goto _ia_handle_error1;
+ }
- if (pstr_aac_dec_ch_info->common_window) {
- error_code = ixheaacd_ics_read(
- it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window,
- object_type, pstr_aac_dec_ch_info->common_window,
- aac_dec_handle->samples_per_frame);
- if (error_code) {
aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
- aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
-
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)(
- (WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ pstr_aac_dec_ch_info->str_ics_info;
+
+ ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
+
+ {
+ if (object_type == AOT_ER_AAC_LD) {
+ IA_ERRORCODE temp =
+ ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
+ aac_dec_handle->samples_per_frame, LEFT);
+
+ if (temp != 0) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return temp;
+ }
+ }
+ }
}
+ }
+ }
- goto _ia_handle_error1;
+ error_code = ixheaacd_individual_ch_stream(
+ it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
+ eld_specific_config, ele_type);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
}
+ }
- aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
- pstr_aac_dec_ch_info->str_ics_info;
+ if (ptr_adts_crc_info->crc_active == 1) {
+ ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
+ }
- ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
+ if (it_bit_buff->cnt_bits < 0) {
+ error_code =
+ (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
- {
- if (object_type == AOT_ER_AAC_LD) {
- IA_ERRORCODE temp = ixheaacd_ltp_decode(
- it_bit_buff, ptr_ics_info, object_type,
- aac_dec_handle->samples_per_frame, LEFT);
+ if (error_code) {
+ goto _ia_handle_error1;
+ }
- if (temp != 0) {
- return temp;
- }
+ _ia_handle_error1:
+ if (error_code) {
+ aac_dec_handle->frame_status = 0;
+ if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) num_ch = num_ch + ele_ch;
+ break;
+ } else {
+ error_code = ixheaacd_channel_pair_process(
+ aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
+ total_channels, object_type, aac_spect_data_resil_flag,
+ eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
+ aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
}
}
+ num_ch = num_ch + ele_ch;
}
}
- error_code = ixheaacd_individual_ch_stream(
- it_bit_buff, aac_dec_handle, ele_ch, frame_length,
- total_channels, object_type, eld_specific_config, ele_type);
- if (error_code) return error_code;
-
- if (ptr_adts_crc_info->crc_active == 1) {
- ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff,
- crc_reg);
- }
-
- if (it_bit_buff->cnt_bits < 0) {
- error_code = (WORD16)(
- (WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
- }
+ p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_ch - 1;
+ break;
+ }
- if (error_code) {
- goto _ia_handle_error1;
- }
+ if ((object_type == AOT_ER_AAC_LC) || (!eld_sbr_flag)) {
+ WORD32 cnt_bits;
+ cnt_bits = it_bit_buff->cnt_bits;
+ p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
- _ia_handle_error1:
+ if (cnt_bits >= 8) {
+ error_code = ixheaacd_extension_payload(
+ it_bit_buff, &cnt_bits, &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
if (error_code) {
- aac_dec_handle->frame_status = 0;
- if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE))
- num_ch = num_ch + ele_ch;
- break;
- } else {
- error_code = ixheaacd_channel_pair_process(
- aac_dec_handle->pstr_aac_dec_ch_info, ele_ch,
- aac_dec_handle->pstr_aac_tables, total_channels, object_type,
- aac_spect_data_resil_flag,
- eld_specific_config.aac_sf_data_resil_flag,
- aac_scratch_ptrs->in_data, aac_scratch_ptrs->out_data,
- (void *)aac_dec_handle);
- if (error_code) return error_code;
- num_ch = num_ch + ele_ch;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
}
}
- p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_ch - 1;
- break;
- }
-
- if ((object_type == AOT_ER_AAC_LC) || (!eld_sbr_flag)) {
- WORD32 cnt_bits;
- cnt_bits = it_bit_buff->cnt_bits;
- p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
-
- if (cnt_bits >= 8) {
- error_code = ixheaacd_extension_payload(
- it_bit_buff, &cnt_bits,
- &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
- if (error_code) return error_code;
- }
-
- if (it_bit_buff->cnt_bits) {
- WORD32 alignment = it_bit_buff->bit_pos & 0x07;
- it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
- it_bit_buff->bit_pos = 7;
- it_bit_buff->ptr_read_next++;
+ if (it_bit_buff->cnt_bits) {
+ WORD32 alignment = it_bit_buff->bit_pos & 0x07;
+ it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
+ it_bit_buff->bit_pos = 7;
+ it_bit_buff->ptr_read_next++;
+ }
}
- }
- else if ((object_type != AOT_ER_AAC_ELD) || (!eld_sbr_flag)) {
- WORD32 bits_decoded, cnt_bits;
- bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
+ else if ((object_type != AOT_ER_AAC_ELD) || (!eld_sbr_flag)) {
+ WORD32 bits_decoded, cnt_bits;
+ bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
- cnt_bits = (frame_size * 8 - bits_decoded);
+ cnt_bits = (frame_size * 8 - bits_decoded);
- if (object_type == AOT_ER_AAC_LC)
- cnt_bits = it_bit_buff->cnt_bits;
+ if (object_type == AOT_ER_AAC_LC) cnt_bits = it_bit_buff->cnt_bits;
- p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config
- .no_ldsbr_present = 1;
+ p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
- if (cnt_bits >= 8) {
- error_code = ixheaacd_extension_payload(
- it_bit_buff, &cnt_bits,
- &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
- if (error_code) return error_code;
- }
+ if (cnt_bits >= 8) {
+ error_code = ixheaacd_extension_payload(
+ it_bit_buff, &cnt_bits, &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
+ }
- if (((object_type == AOT_ER_AAC_ELD) ||
- (object_type == AOT_ER_AAC_LD)) &&
- (p_obj_exhaacplus_dec->aac_config.ld_decoder != 1)) {
- if (it_bit_buff->cnt_bits) {
- WORD32 alignment = it_bit_buff->bit_pos & 0x07;
- it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
- it_bit_buff->bit_pos = 7;
- it_bit_buff->ptr_read_next++;
+ if (((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)) &&
+ (p_obj_exhaacplus_dec->aac_config.ld_decoder != 1)) {
+ if (it_bit_buff->cnt_bits) {
+ WORD32 alignment = it_bit_buff->bit_pos & 0x07;
+ it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
+ it_bit_buff->bit_pos = 7;
+ it_bit_buff->ptr_read_next++;
+ }
+ } else {
+ if (it_bit_buff->bit_pos != 7) {
+ WORD32 alignment = it_bit_buff->bit_pos & 0x07;
+ it_bit_buff->cnt_bits -= alignment + 1;
+ it_bit_buff->bit_pos += 7 - alignment;
+ it_bit_buff->ptr_read_next++;
+ }
}
} else {
- if (it_bit_buff->bit_pos != 7) {
- WORD32 alignment = it_bit_buff->bit_pos & 0x07;
- it_bit_buff->cnt_bits -= alignment + 1;
- it_bit_buff->bit_pos += 7 - alignment;
- it_bit_buff->ptr_read_next++;
+ WORD32 bits_decoded, cnt_bits;
+ bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
+ cnt_bits = (frame_size * 8 - bits_decoded);
+ if (adtsheader == 1) {
+ if (cnt_bits > it_bit_buff->cnt_bits) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ }
+ }
}
+ ixheaacd_check_for_sbr_payload(
+ it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)(ch_config - 1),
+ pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
+ mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal);
}
- } else {
- WORD32 bits_decoded, cnt_bits;
- bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
- cnt_bits = (frame_size * 8 - bits_decoded);
- if (adtsheader == 1) {
- if (cnt_bits > it_bit_buff->cnt_bits)
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
- }
- ixheaacd_check_for_sbr_payload(
- it_bit_buff, aac_dec_handle->pstr_sbr_bitstream,
- (WORD16)(ch_config - 1), pstr_drc_dec, object_type, adtsheader,
- cnt_bits, ld_sbr_crc_flag, drc_dummy);
}
}
}
+ if ((err || (aac_dec_handle->frame_status == 0) || (frame_status == 0)) && (!is_init)) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ aac_dec_handle->frame_status = 0;
+ error_code = 0;
+ num_ch = channel;
+ ele_type = ID_END;
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ it_bit_buff->cnt_bits = 0;
+ } else {
+ return err;
+ }
+ }
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && aac_dec_handle->conceal_count == 0) {
+ for (ch = 0; ch < channel; ch++) {
+ ixheaacd_aac_ec_init(&aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->str_ec_state);
+ }
+ }
- if (ele_type == ID_END &&
- p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
+ if (ele_type == ID_END && p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
WORD32 tmp;
tmp = ((WORD32)latm_element->layer_info[0][0].frame_len_bits) -
(it_bit_buff->initial_cnt_bits - it_bit_buff->cnt_bits);
@@ -847,10 +908,8 @@ WORD32 ixheaacd_aacdec_decodeframe(
WORD32 *scratch[2];
for (ch = 0; ch < channel; ch++) {
- str_ics_info[ch] =
- aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info;
- spec_coef[ch] =
- aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff;
+ str_ics_info[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info;
+ spec_coef[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff;
}
scratch[0] = (WORD32 *)aac_scratch_ptrs->extra_scr_4k[2];
@@ -859,21 +918,62 @@ WORD32 ixheaacd_aacdec_decodeframe(
error_code = ixheaacd_drc_map_channels(
pstr_drc_dec, aac_dec_handle->channels,
aac_dec_handle->pstr_aac_dec_ch_info[0]->str_ics_info.frame_length);
- if (error_code) return error_code;
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ error_code = 0;
+ aac_dec_handle->frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
for (ch = 0; ch < aac_dec_handle->channels; ch++) {
- WORD32 *overlap1 = aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
- ->overlap_add_data.ptr_overlap_buf;
+ WORD32 *overlap1 =
+ aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->overlap_add_data.ptr_overlap_buf;
const WORD16 *ptr_long_window_next =
aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
->ptr_long_window[(int)str_ics_info[ch].window_shape];
const WORD16 *ptr_short_window_next =
aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
->ptr_short_window[(int)str_ics_info[ch].window_shape];
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info =
+ aac_dec_handle->pstr_aac_dec_ch_info[ch];
+ ia_aac_dec_channel_info *pstr_aac_dec_static_channel_info =
+ aac_dec_handle->ptr_aac_dec_static_channel_info[ch];
+
+ ia_aac_dec_channel_info_struct **ppstr_aac_dec_channel_info =
+ &pstr_aac_dec_channel_info;
+ ia_aac_dec_channel_info **ppstr_aac_dec_static_channel_info =
+ &pstr_aac_dec_static_channel_info;
+ ia_audio_specific_config_struct *pstr_audio_specific_config;
+ pstr_audio_specific_config = p_state_enhaacplus_dec->ia_audio_specific_config;
+
+ if (str_ics_info[ch].max_sfb > str_ics_info[ch].num_swb_window) {
+ aac_dec_handle->frame_status = 0;
+ }
+
+ ixheaacd_aac_apply_ec(
+ &(*ppstr_aac_dec_static_channel_info)->str_ec_state, *ppstr_aac_dec_channel_info,
+ &ixheaacd_samp_rate_info[pstr_audio_specific_config->samp_frequency_index],
+ aac_dec_handle->samples_per_frame, &str_ics_info[ch], aac_dec_handle->frame_status);
+
+ aac_dec_handle->conceal_count = aac_dec_handle->conceal_count + 1;
+ if (aac_dec_handle->frame_status) {
+ aac_dec_handle->sbr_num_elements = aac_dec_handle->pstr_sbr_bitstream->no_elements;
+ } else {
+ aac_dec_handle->pstr_sbr_bitstream->no_elements = aac_dec_handle->sbr_num_elements;
+ }
+ if (first_frame == 1)
+ skip_full_decode = 1;
+ else
+ skip_full_decode = 0;
+ }
if (pstr_drc_dec->drc_on) {
ixheaacd_drc_apply(pstr_drc_dec, spec_coef[ch],
str_ics_info[ch].window_sequence, ch,
- str_ics_info[ch].frame_length);
+ str_ics_info[ch].frame_length,
+ object_type);
}
if (skip_full_decode == 0) {
ixheaacd_imdct_process(aac_dec_handle->pstr_aac_dec_overlap_info[ch],
@@ -883,8 +983,7 @@ WORD32 ixheaacd_aacdec_decodeframe(
ldmps_present, slot_element);
if (slot_pos != NULL) *slot_pos = slot_element;
- if (p_obj_exhaacplus_dec->p_state_aac->qshift_cnt > 15)
- {
+ if (p_obj_exhaacplus_dec->p_state_aac->qshift_cnt > 15) {
return IA_FATAL_ERROR;
}
@@ -918,22 +1017,53 @@ WORD32 ixheaacd_aacdec_decodeframe(
}
}
}
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ ia_aac_dec_channel_info *pstr_aac_dec_static_channel_info =
+ aac_dec_handle->ptr_aac_dec_static_channel_info[ch];
+ ia_ec_state_str *pstr_ec_state = &pstr_aac_dec_static_channel_info->str_ec_state;
+ WORD32 k;
+
+ if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
+ WORD32 fade_fac = ia_ec_fade_factors_fix[pstr_ec_state->fade_idx];
+ for (k = 0; k < str_ics_info[ch].frame_length; k++) {
+ time_data[k] = ixheaacd_mul32_sh(time_data[k], fade_fac, 30);
+ }
+ } else {
+ memset(time_data, 0, str_ics_info[ch].frame_length * sizeof(time_data[0]));
+ }
+ }
slot_element++;
}
}
}
if (ele_type == ID_END) {
- ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
- if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
- ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ if (err && !is_init) {
+ aac_dec_handle->frame_status = 0;
+ } else {
+ ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
+ if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
+ ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
+ }
+ }
+ } else {
+ ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
+ if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
+ ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
+ }
}
}
*type = ele_type;
aac_dec_handle->block_number =
ixheaacd_add32(aac_dec_handle->block_number, 1);
- return error_code;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = aac_dec_handle->frame_status;
+ return IA_NO_ERROR;
+ } else {
+ return error_code;
+ }
}
WORD32 ixheaacd_extension_payload(ia_bit_buf_struct *it_bit_buff, WORD32 *cnt,
@@ -953,7 +1083,7 @@ WORD32 ixheaacd_extension_payload(ia_bit_buf_struct *it_bit_buff, WORD32 *cnt,
if (fill_nibble == 0) {
for (i = 0; i < (*cnt >> 3) - 1; i++) {
if (it_bit_buff->cnt_bits >= 8)
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ ixheaacd_read_bits_buf(it_bit_buff, 8);
else
ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
}
@@ -965,7 +1095,7 @@ WORD32 ixheaacd_extension_payload(ia_bit_buf_struct *it_bit_buff, WORD32 *cnt,
case EXT_DATA_LENGTH:
- len = (WORD32)ixheaacd_read_bits_buf(it_bit_buff, 4);
+ len = ixheaacd_read_bits_buf(it_bit_buff, 4);
if (len == 15) {
add_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
diff --git a/decoder/ixheaacd_aacpluscheck.c b/decoder/ixheaacd_aacpluscheck.c
index 8c7266e..821790e 100644
--- a/decoder/ixheaacd_aacpluscheck.c
+++ b/decoder/ixheaacd_aacpluscheck.c
@@ -40,6 +40,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -53,11 +56,13 @@
#define SBR_EXTENSION_CRC_MPEG SBR_EXTENSION_CRC
-FLAG ixheaacd_check_for_sbr_payload(
- ia_bit_buf_struct *it_bit_buff,
- ia_aac_dec_sbr_bitstream_struct *pstr_stream_sbr, WORD16 prev_element,
- ia_drc_dec_struct *pstr_drc_dec, WORD32 object_type, WORD32 adtsheader,
- WORD32 cnt_bits, WORD32 ld_sbr_crc_flag, ia_drc_dec_struct *drc_dummy) {
+FLAG ixheaacd_check_for_sbr_payload(ia_bit_buf_struct *it_bit_buff,
+ ia_aac_dec_sbr_bitstream_struct *pstr_stream_sbr,
+ WORD16 prev_element, ia_drc_dec_struct *pstr_drc_dec,
+ WORD32 object_type, WORD32 adtsheader, WORD32 cnt_bits,
+ WORD32 ld_sbr_crc_flag, ia_drc_dec_struct *drc_dummy,
+ UWORD8 *mps_buffer, WORD32 *mps_header, WORD32 *mps_bytes,
+ WORD32 is_init, WORD32 *is_first, WORD32 ec_flag) {
FLAG ret = 0;
WORD32 count;
@@ -82,8 +87,8 @@ FLAG ixheaacd_check_for_sbr_payload(
else
extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
- if (((count < MAXSBRBYTES)) && (((extension_type == SBR_EXTENSION)) ||
- ((extension_type == SBR_EXTENSION_CRC))) &&
+ if (((count < MAXSBRBYTES)) &&
+ (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
((prev_element == SBR_ID_SCE) || (prev_element == SBR_ID_CPE) ||
sub_d(prev_element, SBR_ID_CCE) == 0)
@@ -95,24 +100,52 @@ FLAG ixheaacd_check_for_sbr_payload(
ret = 1;
ptr_stream_sbr = &pstr_stream_sbr->str_sbr_ele[no_elements];
- ptr_stream_sbr->size_payload = count;
- byte_count = ptr_stream_sbr->size_payload;
- ptr_stream_sbr->extension_type = extension_type;
- ptr_stream_sbr->sbr_ele_id = prev_element;
+
+ if (ec_flag) {
+ ptr_stream_sbr->size_payload = ptr_stream_sbr->size_payload_old;
+ byte_count = ptr_stream_sbr->size_payload;
+ ptr_stream_sbr->extension_type = ptr_stream_sbr->prev_extension_type;
+ ptr_stream_sbr->sbr_ele_id = ptr_stream_sbr->prev_sbr_ele_id;
+ }
+
+ if (ec_flag) {
+ ptr_stream_sbr->size_payload_old = count;
+ byte_count = ptr_stream_sbr->size_payload_old;
+ ptr_stream_sbr->prev_extension_type = extension_type;
+ ptr_stream_sbr->prev_sbr_ele_id = prev_element;
+ } else {
+ ptr_stream_sbr->size_payload = count;
+ byte_count = ptr_stream_sbr->size_payload;
+ ptr_stream_sbr->extension_type = extension_type;
+ ptr_stream_sbr->sbr_ele_id = prev_element;
+ }
pstr_stream_sbr->no_elements = no_elements + 1;
if (pstr_drc_dec) pstr_drc_dec->sbr_found = 1;
+ if (ec_flag) {
+ memcpy(ptr_stream_sbr->ptr_sbr_data, ptr_stream_sbr->sbr_prev_data,
+ sizeof(ptr_stream_sbr->sbr_prev_data));
+ }
+
if (byte_count > 0 && sub_d(byte_count, MAXSBRBYTES) <= 0) {
WORD32 i;
WORD8 *ptr_sbr_data;
if (object_type != AOT_ER_AAC_ELD) {
- ptr_sbr_data = &ptr_stream_sbr->ptr_sbr_data[1];
- ptr_stream_sbr->ptr_sbr_data[0] =
- (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
- } else
- ptr_sbr_data = ptr_stream_sbr->ptr_sbr_data;
-
+ if (ec_flag) {
+ ptr_sbr_data = &ptr_stream_sbr->sbr_prev_data[1];
+ ptr_stream_sbr->sbr_prev_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
+ } else {
+ ptr_sbr_data = &ptr_stream_sbr->ptr_sbr_data[1];
+ ptr_stream_sbr->ptr_sbr_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
+ }
+ } else {
+ if (ec_flag) {
+ ptr_sbr_data = ptr_stream_sbr->sbr_prev_data;
+ } else {
+ ptr_sbr_data = ptr_stream_sbr->ptr_sbr_data;
+ }
+ }
for (i = byte_count - 2; i >= 0; i--) {
*ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
if (object_type == AOT_ER_AAC_ELD) {
@@ -128,18 +161,22 @@ FLAG ixheaacd_check_for_sbr_payload(
cnt_bits = cnt_bits - 8;
if (cnt_bits > 0) {
WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
- *ptr_sbr_data =
- (WORD8)ixheaacd_read_bits_buf(it_bit_buff, cnt_bits);
+ *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, cnt_bits);
*ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
- ptr_stream_sbr->size_payload++;
+ if (!ec_flag)
+ ptr_stream_sbr->size_payload++;
+ else
+ ptr_stream_sbr->size_payload_old++;
}
} else {
if (it_bit_buff->cnt_bits > 0) {
WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
- *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(
- it_bit_buff, it_bit_buff->cnt_bits);
+ *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
*ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
- ptr_stream_sbr->size_payload++;
+ if (!ec_flag)
+ ptr_stream_sbr->size_payload++;
+ else
+ ptr_stream_sbr->size_payload_old++;
}
}
}
@@ -147,14 +184,49 @@ FLAG ixheaacd_check_for_sbr_payload(
} else if (extension_type == EXT_DYNAMIC_RANGE) {
pstr_drc_dec->drc_element_found = 1;
- count -=
- ixheaacd_dec_drc_read_element(pstr_drc_dec, drc_dummy, it_bit_buff);
+ count -= ixheaacd_dec_drc_read_element(pstr_drc_dec, drc_dummy, it_bit_buff);
+ } else if (extension_type == EXT_SAC_DATA) {
+ WORD32 anc_type, anc_start, i, len = 0;
+ anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
+ *mps_header = anc_type;
+
+ anc_start = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (anc_start == 1) {
+ *mps_bytes = 0;
+ }
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ if (anc_type == 1 && is_init == 0 && *is_first == 1) {
+ len = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ len = ixheaacd_read_bits_buf(it_bit_buff, 7) + 1;
+ ixheaacd_read_bidirection(it_bit_buff, -8);
+ }
+
+ for (i = 0; i < count - 1; i++) {
+ mps_buffer[i + *mps_bytes] = ixheaacd_read_bits_buf(it_bit_buff, 8);
+ }
+
+ *mps_bytes += (count - 1);
+ if (anc_type == 1 && is_init == 0 && *is_first == 1) {
+ if (*mps_bytes < len) {
+ if (ec_flag) {
+ *mps_bytes = 0;
+ }
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
+ for (i = 0; i < count - 1; i++) {
+ mps_buffer[i] = mps_buffer[i + len];
+ }
+ *mps_bytes = *mps_bytes - len;
+ }
+ *is_first = 1;
} else {
ixheaacd_read_bits_buf(it_bit_buff, 4);
if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->ptr_read_next += count - 1;
it_bit_buff->cnt_bits -= ((count - 1) << 3);
diff --git a/decoder/ixheaacd_acelp_bitparse.c b/decoder/ixheaacd_acelp_bitparse.c
index c5afc8c..b71ac7f 100644
--- a/decoder/ixheaacd_acelp_bitparse.c
+++ b/decoder/ixheaacd_acelp_bitparse.c
@@ -17,43 +17,40 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <math.h>
-#include <stdio.h>
#include <string.h>
#include "ixheaacd_type_def.h"
#include "ixheaacd_acelp_com.h"
-#include "ixheaacd_windows.h"
-#include "ixheaacd_vec_baisc_ops.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_interface.h"
-
-#include "ixheaacd_tns_usac.h"
#include "ixheaacd_cnst.h"
-
-#include "ixheaacd_acelp_info.h"
-
-#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_info.h"
#include "ixheaacd_sbr_common.h"
#include "ixheaacd_drc_data_struct.h"
-#include "ixheaacd_drc_dec.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_pns.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbrdecoder.h"
-#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_acelp_info.h"
+#include "ixheaacd_tns_usac.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_ec.h"
#include "ixheaacd_arith_dec.h"
-#include "ixheaacd_bit_extract.h"
-#include "ixheaacd_main.h"
#include "ixheaacd_func_def.h"
-#include "ixheaacd_constants.h"
#include "ixheaacd_basic_ops32.h"
-#include "ixheaacd_basic_ops40.h"
#include "ixheaacd_error_standards.h"
+#include "ixheaacd_error_codes.h"
-WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff,
- WORD32 *nk_mode) {
+extern const ia_usac_samp_rate_info ixheaacd_samp_rate_info[];
+
+WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff, WORD32 *nk_mode) {
WORD32 mode_lpc = 0;
switch (lpc_set) {
case 4:
@@ -93,8 +90,7 @@ WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff,
return mode_lpc;
}
-VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn,
- ia_bit_buf_struct *it_bit_buff) {
+VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn, ia_bit_buf_struct *it_bit_buff) {
WORD32 k;
switch (nk_mode) {
case 1:
@@ -108,8 +104,7 @@ VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn,
case 0:
case 2:
case 3:
- for (k = 0; k < 2; k++)
- qn[k] = 2 + ixheaacd_read_bits_buf(it_bit_buff, 2);
+ for (k = 0; k < 2; k++) qn[k] = 2 + ixheaacd_read_bits_buf(it_bit_buff, 2);
if (nk_mode == 2) {
for (k = 0; k < 2; k++) {
@@ -149,9 +144,8 @@ VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn,
return;
}
-VOID ixheaacd_code_book_indices(ia_td_frame_data_struct *pstr_td_frame_data,
- WORD32 nk_mode, WORD32 *pos,
- ia_bit_buf_struct *it_bit_buff) {
+VOID ixheaacd_code_book_indices(ia_td_frame_data_struct *pstr_td_frame_data, WORD32 nk_mode,
+ WORD32 *pos, ia_bit_buf_struct *it_bit_buff) {
WORD32 k, qn[2] = {0, 0}, nk, n, i;
ixheaacd_qn_data(nk_mode, &qn[0], it_bit_buff);
@@ -186,8 +180,7 @@ VOID ixheaacd_lpc_data(WORD32 first_lpd_flag, WORD32 mod[],
mode_lpc = ixheaacd_get_mode_lpc(4, it_bit_buff, &nk_mode);
- pstr_td_frame_data->lpc_first_approx_idx[j++] =
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
if (first_lpd_flag) {
@@ -195,8 +188,7 @@ VOID ixheaacd_lpc_data(WORD32 first_lpd_flag, WORD32 mod[],
pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
if (mode_lpc == 0)
- pstr_td_frame_data->lpc_first_approx_idx[j++] =
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
}
@@ -205,8 +197,7 @@ VOID ixheaacd_lpc_data(WORD32 first_lpd_flag, WORD32 mod[],
pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
if (mode_lpc == 0)
- pstr_td_frame_data->lpc_first_approx_idx[j++] =
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
}
@@ -215,19 +206,16 @@ VOID ixheaacd_lpc_data(WORD32 first_lpd_flag, WORD32 mod[],
pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
if (mode_lpc == 0)
- pstr_td_frame_data->lpc_first_approx_idx[j++] =
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
- if (mode_lpc != 1)
- ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
+ if (mode_lpc != 1) ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
}
if (mod[2] < 2) {
mode_lpc = ixheaacd_get_mode_lpc(3, it_bit_buff, &nk_mode);
pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
if (mode_lpc == 0)
- pstr_td_frame_data->lpc_first_approx_idx[j++] =
- ixheaacd_read_bits_buf(it_bit_buff, 8);
+ pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
}
@@ -259,8 +247,7 @@ VOID ixheaacd_fac_decoding(WORD32 fac_length, WORD32 k, WORD32 *fac_prm,
kv[j] = ixheaacd_read_bits_buf(it_bit_buff, nk);
}
- ixheaacd_rotated_gosset_mtx_dec(qn, code_book_index, kv,
- &fac_prm[k * FAC_LENGTH + i]);
+ ixheaacd_rotated_gosset_mtx_dec(qn, code_book_index, kv, &fac_prm[k * FAC_LENGTH + i]);
}
}
@@ -283,15 +270,12 @@ VOID ixheaacd_acelp_decoding(WORD32 k, ia_usac_data_struct *usac_data,
kk = k * 4 + sfr;
if ((sfr == 0) || ((nb_subfr == 4) && (sfr == 2)))
- pstr_td_frame_data->acb_index[kk] =
- ixheaacd_read_bits_buf(it_bit_buff, 9);
+ pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 9);
else
- pstr_td_frame_data->acb_index[kk] =
- ixheaacd_read_bits_buf(it_bit_buff, 6);
+ pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 6);
- pstr_td_frame_data->ltp_filtering_flag[kk] =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pstr_td_frame_data->ltp_filtering_flag[kk] = ixheaacd_read_bits_buf(it_bit_buff, 1);
if (pstr_td_frame_data->acelp_core_mode == 5) {
pstr_td_frame_data->icb_index[kk][0] =
@@ -325,14 +309,9 @@ VOID ixheaacd_acelp_decoding(WORD32 k, ia_usac_data_struct *usac_data,
}
}
-IA_ERRORCODE ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, pWORD32 quant,
- WORD32 k, WORD32 first_tcx_flag,
- ia_td_frame_data_struct *pstr_td_frame_data,
- ia_bit_buf_struct *it_bit_buff
-
- ) {
- IA_ERRORCODE err = IA_NO_ERROR;
-
+VOID ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, pWORD32 quant, WORD32 k,
+ WORD32 first_tcx_flag, ia_td_frame_data_struct *pstr_td_frame_data,
+ ia_bit_buf_struct *it_bit_buff) {
pstr_td_frame_data->noise_factor[k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
pstr_td_frame_data->global_gain[k] = ixheaacd_read_bits_buf(it_bit_buff, 7);
@@ -353,130 +332,178 @@ IA_ERRORCODE ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, pWORD32 quant,
if (usac_data->usac_independency_flg) {
pstr_td_frame_data->arith_reset_flag = 1;
} else {
- pstr_td_frame_data->arith_reset_flag =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pstr_td_frame_data->arith_reset_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
}
}
- err = ixheaacd_arith_data(pstr_td_frame_data, quant, usac_data, it_bit_buff,
- (first_tcx_flag), k);
- if (err) return err;
+ ixheaacd_arith_data(pstr_td_frame_data, quant, usac_data, it_bit_buff, (first_tcx_flag), k);
- return IA_NO_ERROR;
+ return;
}
WORD32 ixheaacd_lpd_channel_stream(ia_usac_data_struct *usac_data,
ia_td_frame_data_struct *pstr_td_frame_data,
- ia_bit_buf_struct *it_bit_buff,
- FLOAT32 *synth
-
- )
-
-{
+ ia_bit_buf_struct *it_bit_buff, FLOAT32 *synth) {
WORD32 lpd_mode, k, cnt, ii;
WORD32 first_tcx_flag;
WORD32 *quant;
- WORD32 core_mode_last, fac_data_present;
+ WORD32 core_mode_last = 0, fac_data_present;
WORD32 *fac_data;
- WORD32 first_lpd_flag;
+ WORD32 first_lpd_flag = 0;
WORD32 short_fac_flag;
- WORD32 bpf_control_info;
+ WORD32 bpf_control_info = 0;
WORD32 chan = usac_data->present_chan;
WORD32 last_lpd_mode = usac_data->str_tddec[chan]->mode_prev;
WORD32 err = 0;
short_fac_flag = 0;
- pstr_td_frame_data->acelp_core_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
-
- lpd_mode = ixheaacd_read_bits_buf(it_bit_buff, 5);
+ jmp_buf local;
- if (lpd_mode == 25) {
- pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] =
- pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 3;
- } else if (lpd_mode == 24) {
- pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] =
- pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
- } else {
- if (lpd_mode >= 20) {
- pstr_td_frame_data->mod[0] = lpd_mode & 1;
- pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
- pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
- } else if (lpd_mode >= 16) {
- pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = 2;
- pstr_td_frame_data->mod[2] = lpd_mode & 1;
- pstr_td_frame_data->mod[3] = (lpd_mode >> 1) & 1;
- } else {
- pstr_td_frame_data->mod[0] = lpd_mode & 1;
- pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
- pstr_td_frame_data->mod[2] = (lpd_mode >> 2) & 1;
- pstr_td_frame_data->mod[3] = (lpd_mode >> 3) & 1;
- }
+ if (usac_data->ec_flag) {
+ err = setjmp(local);
}
- bpf_control_info = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (usac_data->sampling_rate_idx <= 5 && usac_data->ec_flag) {
+ usac_data->frame_ok = 0;
+ }
- core_mode_last = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (err == 0 && usac_data->frame_ok == 1) {
+ if (usac_data->ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ pstr_td_frame_data->acelp_core_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
- fac_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ lpd_mode = ixheaacd_read_bits_buf(it_bit_buff, 5);
- first_lpd_flag = (core_mode_last == 0) ? 1 : 0;
+ if ((lpd_mode > 25 || lpd_mode < 0)) {
+ if (usac_data->ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
- quant = pstr_td_frame_data->x_tcx_invquant;
- first_tcx_flag = 1;
- k = 0;
- while (k < 4) {
- if (k == 0) {
- if ((core_mode_last == 1) && (fac_data_present == 1))
- ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k,
- pstr_td_frame_data->fac, it_bit_buff);
+ if (lpd_mode == 25) {
+ pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
+ pstr_td_frame_data->mod[3] = 3;
+ } else if (lpd_mode == 24) {
+ pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
+ pstr_td_frame_data->mod[3] = 2;
} else {
- if (((last_lpd_mode == 0) && (pstr_td_frame_data->mod[k] > 0)) ||
- ((last_lpd_mode > 0) && (pstr_td_frame_data->mod[k] == 0)))
- ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k,
- pstr_td_frame_data->fac, it_bit_buff);
+ if (lpd_mode >= 20) {
+ pstr_td_frame_data->mod[0] = lpd_mode & 1;
+ pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
+ pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
+ } else if (lpd_mode >= 16) {
+ pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = 2;
+ pstr_td_frame_data->mod[2] = lpd_mode & 1;
+ pstr_td_frame_data->mod[3] = (lpd_mode >> 1) & 1;
+ } else {
+ pstr_td_frame_data->mod[0] = lpd_mode & 1;
+ pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
+ pstr_td_frame_data->mod[2] = (lpd_mode >> 2) & 1;
+ pstr_td_frame_data->mod[3] = (lpd_mode >> 3) & 1;
+ }
}
- if (pstr_td_frame_data->mod[k] == 0) {
- ixheaacd_acelp_decoding(k, usac_data, pstr_td_frame_data, it_bit_buff,
- chan);
- last_lpd_mode = 0;
- pstr_td_frame_data->tcx_lg[k] = 0;
- k += 1;
- } else {
- err = ixheaacd_tcx_coding(usac_data, quant, k, first_tcx_flag,
- pstr_td_frame_data, it_bit_buff);
- if (err) return err;
- last_lpd_mode = pstr_td_frame_data->mod[k];
- quant += pstr_td_frame_data->tcx_lg[k];
+ bpf_control_info = ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ core_mode_last = ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ fac_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ first_lpd_flag = (core_mode_last == 0) ? 1 : 0;
+
+ quant = pstr_td_frame_data->x_tcx_invquant;
+ first_tcx_flag = 1;
+ k = 0;
+ while (k < 4) {
+ if (k == 0) {
+ if ((core_mode_last == 1) && (fac_data_present == 1))
+ ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
+ it_bit_buff);
+ } else {
+ if (((last_lpd_mode == 0) && (pstr_td_frame_data->mod[k] > 0)) ||
+ ((last_lpd_mode > 0) && (pstr_td_frame_data->mod[k] == 0)))
+ ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
+ it_bit_buff);
+ }
+
+ if (pstr_td_frame_data->mod[k] == 0) {
+ ixheaacd_acelp_decoding(k, usac_data, pstr_td_frame_data, it_bit_buff, chan);
+ last_lpd_mode = 0;
+ pstr_td_frame_data->tcx_lg[k] = 0;
+ k += 1;
+ } else {
+ ixheaacd_tcx_coding(usac_data, quant, k, first_tcx_flag, pstr_td_frame_data, it_bit_buff);
+ last_lpd_mode = pstr_td_frame_data->mod[k];
+ quant += pstr_td_frame_data->tcx_lg[k];
- cnt = 1 << (pstr_td_frame_data->mod[k] - 1);
+ cnt = 1 << (pstr_td_frame_data->mod[k] - 1);
- for (ii = 0; ii < cnt - 1; ii++)
- pstr_td_frame_data->tcx_lg[k + 1 + ii] = 0;
+ for (ii = 0; ii < cnt - 1; ii++) pstr_td_frame_data->tcx_lg[k + 1 + ii] = 0;
- k += cnt;
- first_tcx_flag = 0;
+ k += cnt;
+ first_tcx_flag = 0;
+ }
}
- }
- ixheaacd_lpc_data(first_lpd_flag, pstr_td_frame_data->mod, pstr_td_frame_data,
- it_bit_buff);
+ ixheaacd_lpc_data(first_lpd_flag, pstr_td_frame_data->mod, pstr_td_frame_data, it_bit_buff);
- if ((core_mode_last == 0) && (fac_data_present == 1)) {
- WORD32 fac_length;
- short_fac_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if ((core_mode_last == 0) && (fac_data_present == 1)) {
+ WORD32 fac_length;
+ short_fac_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
- fac_length =
- (short_fac_flag) ? ((usac_data->ccfl) / 16) : ((usac_data->ccfl) / 8);
+ fac_length = (short_fac_flag) ? ((usac_data->ccfl) / 16) : ((usac_data->ccfl) / 8);
- fac_data = pstr_td_frame_data->fac_data;
- fac_data[0] = ixheaacd_read_bits_buf(it_bit_buff, 7);
- ixheaacd_fac_decoding(fac_length, 0, &fac_data[1], it_bit_buff);
+ fac_data = pstr_td_frame_data->fac_data;
+ fac_data[0] = ixheaacd_read_bits_buf(it_bit_buff, 7);
+ if ((pstr_td_frame_data->fac_data[0] < 0) || (pstr_td_frame_data->fac_data[0] > 128)) {
+ if (usac_data->ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
+ ixheaacd_fac_decoding(fac_length, 0, &fac_data[1], it_bit_buff);
+ }
+ if (fac_data_present == 0) {
+ memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
+ }
+ if (usac_data->ec_flag && usac_data->frame_ok) {
+ usac_data->bpf_control_info = bpf_control_info;
+ usac_data->core_mode_last = core_mode_last;
+ usac_data->first_lpd_flag = first_lpd_flag;
+ }
+ } else {
+ usac_data->frame_ok = 0;
}
- err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan],
- pstr_td_frame_data, synth, first_lpd_flag,
- short_fac_flag, bpf_control_info);
+ if (usac_data->ec_flag) {
+ usac_data->str_error_concealment[chan].pstr_ec_scratch =
+ (ia_ec_scratch_str *)&usac_data->str_error_concealment[chan].str_ec_scratch;
+
+ ixheaacd_usac_apply_ec(usac_data, &ixheaacd_samp_rate_info[0], chan);
+
+ if (usac_data->frame_ok == 0) {
+ bpf_control_info = usac_data->bpf_control_info;
+ core_mode_last = usac_data->core_mode_last;
+ first_lpd_flag = usac_data->first_lpd_flag;
+ }
+ }
+ if (usac_data->frame_ok) {
+ err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan], pstr_td_frame_data, synth,
+ first_lpd_flag, short_fac_flag, bpf_control_info);
+ } else {
+ if (usac_data->ec_flag) {
+ usac_data->fac_data_present[chan] = 0;
+ err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan],
+ &usac_data->td_frame_data_prev[chan], synth, first_lpd_flag,
+ short_fac_flag, bpf_control_info);
+ }
+ }
return (err);
}
@@ -490,18 +517,20 @@ WORD32 ixheaacd_tw_buff_update(ia_usac_data_struct *usac_data, WORD32 i,
if (!td_frame_prev) {
if (tw_mdct) {
- return -1;
+ if (usac_data->ec_flag == 0) {
+ return -1;
+ } else {
+ tw_mdct = 0;
+ }
} else {
- ixheaacd_reset_acelp_data_fix(
- usac_data, st, p_ioverlap,
- (window_sequence_last == EIGHT_SHORT_SEQUENCE), 0);
+ ixheaacd_reset_acelp_data_fix(usac_data, st, p_ioverlap,
+ (window_sequence_last == EIGHT_SHORT_SEQUENCE), 0);
}
}
return 0;
}
-VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k,
- WORD32 mod0) {
+VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0) {
WORD32 i;
WORD32 lfac = 0;
@@ -542,8 +571,7 @@ VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k,
p_out_idata[i] = p_ioverlap[i] << 1;
p_out_idata[i + nlong / 2] =
ixheaacd_add32_sat(p_ioverlap[i + nlong / 2] << 1, p_in_idata[i]);
- p_ioverlap[i] = ixheaacd_add32_sat(p_in_idata[i + (nlong / 2)] >> 1,
- p_ioverlap[i + nlong]);
+ p_ioverlap[i] = ixheaacd_add32_sat(p_in_idata[i + (nlong / 2)] >> 1, p_ioverlap[i + nlong]);
p_ioverlap[i + (nlong / 2)] = 0;
p_ioverlap[i + nlong] = 0;
p_ioverlap[i + nlong + (nlong / 2)] = 0;
diff --git a/decoder/ixheaacd_acelp_decode.c b/decoder/ixheaacd_acelp_decode.c
index e209a33..0d656ff 100644
--- a/decoder/ixheaacd_acelp_decode.c
+++ b/decoder/ixheaacd_acelp_decode.c
@@ -44,6 +44,8 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_func_def.h"
@@ -313,6 +315,57 @@ static void ixheaacd_acelp_decode_gains(WORD32 index, FLOAT32 code_vec[],
return;
}
+static VOID ixheaacd_acelp_decode_gains_with_ec(WORD32 index, FLOAT32 code_vec[],
+ FLOAT32 *pitch_gain, FLOAT32 *codebook_gain,
+ FLOAT32 mean_exc_energy, FLOAT32 *energy,
+ FLOAT32 *past_pitch_gain, FLOAT32 *past_gain_code,
+ WORD32 bfi) {
+ WORD32 i;
+ FLOAT32 avg_innov_energy, est_gain, gain_inov;
+ const FLOAT32 *gain_table = ixheaacd_int_leave_gain_table;
+
+ avg_innov_energy = 0.01f;
+ for (i = 0; i < LEN_SUBFR; i++) {
+ avg_innov_energy += code_vec[i] * code_vec[i];
+ }
+ *energy = avg_innov_energy;
+ gain_inov = (FLOAT32)(1 / sqrt(avg_innov_energy / LEN_SUBFR));
+
+ if (bfi) {
+ FLOAT32 tgpit = (*past_pitch_gain);
+
+ if (tgpit > 0.95f) {
+ tgpit = 0.95f;
+ } else if (tgpit < 0.5f) {
+ tgpit = 0.5f;
+ }
+ *pitch_gain = (FLOAT32)tgpit;
+ tgpit = tgpit * 0.95f;
+ *past_pitch_gain = (FLOAT32)tgpit;
+
+ tgpit = 1.4f - tgpit;
+ tgpit = *past_gain_code * tgpit;
+ *codebook_gain = tgpit * gain_inov;
+
+ *past_gain_code = tgpit;
+ return;
+ }
+
+ avg_innov_energy = (FLOAT32)(10.0 * log10(avg_innov_energy / (FLOAT32)LEN_SUBFR));
+ est_gain = mean_exc_energy - avg_innov_energy;
+
+ est_gain = (FLOAT32)pow(10.0, 0.05 * est_gain);
+ if (!bfi) {
+ *pitch_gain = gain_table[index * 2];
+ *past_pitch_gain = *pitch_gain;
+ }
+
+ *codebook_gain = gain_table[index * 2 + 1] * est_gain;
+ *past_gain_code = (*codebook_gain) / gain_inov;
+
+ return;
+}
+
static VOID ixheaacd_cb_exc_calc(FLOAT32 xcitation_curr[], WORD32 pitch_lag,
WORD32 frac) {
WORD32 i, j;
@@ -339,13 +392,12 @@ static VOID ixheaacd_cb_exc_calc(FLOAT32 xcitation_curr[], WORD32 pitch_lag,
return;
}
-WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
- ia_td_frame_data_struct *pstr_td_frame_data,
- WORD32 k, FLOAT32 lp_filt_coeff[],
- FLOAT32 stability_factor,
- ia_usac_lpd_decoder_handle st) {
+VOID ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
+ ia_td_frame_data_struct *pstr_td_frame_data, WORD32 k,
+ FLOAT32 lp_filt_coeff[], FLOAT32 stability_factor,
+ ia_usac_lpd_decoder_handle st) {
WORD32 i, subfr_idx;
- WORD32 pitch_lag, pitch_lag_frac, index, pitch_flag, pitch_lag_max;
+ WORD32 pitch_lag = 0, pitch_lag_frac = 0, index, pitch_flag, pitch_lag_max;
WORD32 pitch_lag_min = 0;
FLOAT32 tmp, pitch_gain, gain_code, voicing_factor, r_v, innov_energy,
pitch_energy, mean_ener_code;
@@ -359,7 +411,7 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
WORD32 pitch_fr1;
WORD32 pitch_max;
WORD32 subfr_nb = 0;
- static const WORD16 num_codebits_table[8] = {20, 28, 36, 44, 52, 64, 12, 16};
+ const WORD16 num_codebits_table[8] = {20, 28, 36, 44, 52, 64, 12, 16};
FLOAT32 x[FAC_LENGTH] = {0}, xn2[2 * FAC_LENGTH + 16] = {0};
WORD32 int_x[FAC_LENGTH] = {0};
WORD32 TTT;
@@ -383,9 +435,16 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
WORD32 *ptr_pitch =
&usac_data->pitch[k * usac_data->num_subfrm +
(((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1)];
- WORD32 err = 0;
fac_length = len_subfr / 2;
+ WORD32 bfi = (usac_data->num_lost_lpd_frames[usac_data->present_chan] > 0) ? 1 : 0;
+ WORD32 i_offset =
+ (usac_data->str_tddec[usac_data->present_chan]->fscale * TMIN + (FSCALE_DENOM / 2)) /
+ FSCALE_DENOM -
+ TMIN;
+ const WORD32 pitch_max_val = TMAX + (6 * i_offset);
+ WORD16 code_t[LEN_SUBFR];
+
if (st->mode_prev > 0) {
for (i = 0; i < fac_length / 2; i++) {
x[i] = st->fac_gain * pstr_td_frame_data->fac[k * FAC_LENGTH + 2 * i];
@@ -401,9 +460,8 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
preshift = 0;
shiftp = ixheaacd_float2fix(x, int_x, fac_length);
- err =
- ixheaacd_acelp_mdct(int_x, int_xn2, &preshift, fac_length, ptr_scratch);
- if (err == -1) return err;
+ ixheaacd_acelp_mdct(int_x, int_xn2, &preshift, fac_length, ptr_scratch);
+
ixheaacd_fix2float(int_xn2, xn2 + fac_length, fac_length, &shiftp,
&preshift);
@@ -485,6 +543,15 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
pitch_lag_frac = index - (pitch_lag - pitch_lag_min) * 4;
}
+ if (usac_data->ec_flag) {
+ if (bfi) {
+ if (usac_data->pitch_lag_old >= pitch_max_val) {
+ usac_data->pitch_lag_old = (pitch_max_val - 5);
+ }
+ pitch_lag = usac_data->pitch_lag_old;
+ pitch_lag_frac = usac_data->pitch_lag_frac_old;
+ }
+ }
ixheaacd_cb_exc_calc(&xcitation_curr[subfr_idx], pitch_lag, pitch_lag_frac);
mean_ener_code =
@@ -498,10 +565,22 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
ixheaacd_mem_cpy(code, &xcitation_curr[subfr_idx], LEN_SUBFR);
}
-
- ixheaacd_acelp_decode_pulses_per_track(
- &(pstr_td_frame_data->icb_index[k * 4 + subfr_nb][0]),
- num_codebits_table[core_mode], code);
+ if (usac_data->frame_ok == 1) {
+ ixheaacd_acelp_decode_pulses_per_track(
+ &(pstr_td_frame_data->icb_index[k * 4 + subfr_nb][0]), num_codebits_table[core_mode],
+ code);
+ } else {
+ if (usac_data->ec_flag) {
+ WORD32 idx;
+ if (bfi) {
+ for (idx = 0; idx < LEN_SUBFR; idx++) {
+ usac_data->seed_ace = ((((WORD32)usac_data->seed_ace * 31821) >> 1) + 13849);
+ code_t[idx] = (WORD16)((usac_data->seed_ace) >> 4);
+ code[idx] = ((FLOAT32)code_t[idx] / 512);
+ }
+ }
+ }
+ }
tmp = 0.0;
ixheaacd_preemphsis_tool_float(code, TILT_CODE, LEN_SUBFR, tmp);
@@ -510,9 +589,14 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
if (i >= 0) ixheaacd_acelp_pitch_sharpening(code, i);
index = pstr_td_frame_data->gains[k * 4 + subfr_nb];
-
- ixheaacd_acelp_decode_gains(index, code, &pitch_gain, &gain_code,
- mean_ener_code, &innov_energy);
+ if (usac_data->ec_flag) {
+ ixheaacd_acelp_decode_gains_with_ec(index, code, &pitch_gain, &gain_code, mean_ener_code,
+ &innov_energy, &usac_data->past_pitch_gain,
+ &usac_data->past_gain_code, bfi);
+ } else {
+ ixheaacd_acelp_decode_gains(index, code, &pitch_gain, &gain_code, mean_ener_code,
+ &innov_energy);
+ }
pitch_energy = 0.0;
for (i = 0; i < LEN_SUBFR; i++)
@@ -593,5 +677,9 @@ WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
ixheaacd_deemphsis_tool(st->exc_prev + 1 + fac_length, fac_length,
synth_signal[len_subfr - 1]);
- return err;
+ if (usac_data->ec_flag) {
+ usac_data->pitch_lag_old = pitch_lag;
+ usac_data->pitch_lag_frac_old = pitch_lag_frac;
+ }
+ return;
}
diff --git a/decoder/ixheaacd_acelp_info.h b/decoder/ixheaacd_acelp_info.h
index b6b45e4..d12977d 100644
--- a/decoder/ixheaacd_acelp_info.h
+++ b/decoder/ixheaacd_acelp_info.h
@@ -38,6 +38,10 @@ typedef struct {
WORD32 gains[NUM_SUBFR_SUPERFRAME];
WORD32 mode_lpc[NUM_FRAMES];
WORD32 lpc_first_approx_idx[110];
+ FLOAT32 lsp_coeff[5][ORDER];
+ FLOAT32 lsf_adaptive_mean_cand[ORDER];
+ FLOAT32 lsf_adaptive_mean[ORDER];
+ FLOAT32 lpc4_lsf[ORDER];
} ia_td_frame_data_struct;
typedef struct {
diff --git a/decoder/ixheaacd_acelp_mdct.c b/decoder/ixheaacd_acelp_mdct.c
index e6de7e6..d92ed25 100644
--- a/decoder/ixheaacd_acelp_mdct.c
+++ b/decoder/ixheaacd_acelp_mdct.c
@@ -41,6 +41,8 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
@@ -161,12 +163,11 @@ static void ixheaacd_post_twid(WORD32 *data_re, WORD32 *data_im, WORD32 *out,
}
}
-WORD32 ixheaacd_acelp_mdct(WORD32 *ptr_in, WORD32 *ptr_out, WORD32 *preshift,
- WORD32 length, WORD32 *ptr_scratch) {
+VOID ixheaacd_acelp_mdct(WORD32 *ptr_in, WORD32 *ptr_out, WORD32 *preshift, WORD32 length,
+ WORD32 *ptr_scratch) {
WORD32 *ptr_data_r = ptr_scratch;
WORD32 *ptr_data_i = ptr_scratch + 512;
const WORD32 *ptr_pre_post_twid;
- WORD32 err = 0;
switch (length) {
case 1024:
@@ -207,26 +208,22 @@ WORD32 ixheaacd_acelp_mdct(WORD32 *ptr_in, WORD32 *ptr_out, WORD32 *preshift,
ixheaacd_pre_twid(ptr_in, ptr_data_r, ptr_data_i, length / 2,
ptr_pre_post_twid);
- err = ixheaacd_complex_fft(ptr_data_r, ptr_data_i, length / 2, -1, preshift);
- if (err) return err;
+ ixheaacd_complex_fft(ptr_data_r, ptr_data_i, length / 2, -1, preshift);
*preshift += 1;
ixheaacd_post_twid(ptr_data_r, ptr_data_i, ptr_out, length / 2,
ptr_pre_post_twid);
*preshift += 1;
- return err;
+ return;
}
-WORD32 ixheaacd_acelp_mdct_main(ia_usac_data_struct *usac_data, WORD32 *in,
- WORD32 *out, WORD32 l, WORD32 m,
- WORD32 *preshift) {
+VOID ixheaacd_acelp_mdct_main(ia_usac_data_struct *usac_data, WORD32 *in, WORD32 *out, WORD32 l,
+ WORD32 m, WORD32 *preshift) {
WORD32 i;
WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
WORD32 *output_buffer = &usac_data->x_ac_dec[0];
- WORD32 err = 0;
- err = ixheaacd_acelp_mdct(in, output_buffer, preshift, l + m, ptr_scratch);
- if (err == -1) return err;
+ ixheaacd_acelp_mdct(in, output_buffer, preshift, l + m, ptr_scratch);
for (i = 0; i < m / 2; i++) {
out[l + m / 2 - 1 - i] = -output_buffer[m / 2 + l / 2 + i];
@@ -242,5 +239,5 @@ WORD32 ixheaacd_acelp_mdct_main(ia_usac_data_struct *usac_data, WORD32 *in,
out[l + m + i] = -output_buffer[l / 2 - 1 - i];
out[2 * l + m - 1 - i] = -output_buffer[l / 2 - 1 - i];
}
- return err;
+ return;
}
diff --git a/decoder/ixheaacd_acelp_tools.c b/decoder/ixheaacd_acelp_tools.c
index daa7259..a7cf83e 100644
--- a/decoder/ixheaacd_acelp_tools.c
+++ b/decoder/ixheaacd_acelp_tools.c
@@ -26,7 +26,7 @@
#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_basic_ops40.h"
-static const FLOAT32 ixheaacd_gamma_table[17] = {
+const FLOAT32 ixheaacd_gamma_table[17] = {
1.0f, 0.92f, 0.8464f, 0.778688f, 0.716393f, 0.659082f,
0.606355f, 0.557847f, 0.513219f, 0.472161f, 0.434389f, 0.399637f,
0.367666f, 0.338253f, 0.311193f, 0.286298f, 0.263394f};
diff --git a/decoder/ixheaacd_adts_crc_check.c b/decoder/ixheaacd_adts_crc_check.c
index bcb82c0..5799d37 100644
--- a/decoder/ixheaacd_adts_crc_check.c
+++ b/decoder/ixheaacd_adts_crc_check.c
@@ -18,6 +18,13 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_memory_standards.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_mps_aac_struct.h"
+
#include "ixheaacd_sbr_common.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_defines.h"
@@ -35,6 +42,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -161,7 +171,7 @@ WORD32 ixheaacd_adts_crc_check_crc(ia_adts_crc_info_struct *ptr_adts_crc_info) {
for (reg = 0; reg < ptr_adts_crc_info->no_reg; reg++) {
UWORD8 bits;
- UWORD32 bits_remaining;
+ WORD32 bits_remaining;
ptr_reg_data = &ptr_adts_crc_info->str_crc_reg_data[reg];
@@ -176,6 +186,9 @@ WORD32 ixheaacd_adts_crc_check_crc(ia_adts_crc_info_struct *ptr_adts_crc_info) {
}
while (bits_remaining >= 8) {
+ if (ptr_reg_data->str_bit_buf.cnt_bits < 8) {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ }
bits = (UWORD8)ixheaacd_read_bits_buf(
(ia_bit_buf_struct *)(&ptr_adts_crc_info->str_crc_reg_data[reg]
.str_bit_buf),
@@ -184,6 +197,9 @@ WORD32 ixheaacd_adts_crc_check_crc(ia_adts_crc_info_struct *ptr_adts_crc_info) {
bits_remaining -= 8;
}
+ if (ptr_reg_data->str_bit_buf.cnt_bits < bits_remaining) {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ }
bits = (UWORD8)ixheaacd_read_bits_buf(
(ia_bit_buf_struct *)(&ptr_adts_crc_info->str_crc_reg_data[reg]
.str_bit_buf),
@@ -207,7 +223,7 @@ WORD32 ixheaacd_adts_crc_check_crc(ia_adts_crc_info_struct *ptr_adts_crc_info) {
ptr_adts_crc_info->no_reg = 0;
if (crc != ptr_adts_crc_info->file_value) {
- return (IA_ENHAACPLUS_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL);
+ return (IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL);
}
return (error_code);
diff --git a/decoder/ixheaacd_api.c b/decoder/ixheaacd_api.c
index 71e3982..d586c54 100644
--- a/decoder/ixheaacd_api.c
+++ b/decoder/ixheaacd_api.c
@@ -20,9 +20,12 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <assert.h>
#include "ixheaacd_sbr_common.h"
#include "ixheaacd_type_def.h"
+#include "ixheaacd_memory_standards.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_constants.h"
#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_basic_ops16.h"
@@ -45,7 +48,10 @@
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_adts.h"
#include "ixheaacd_defines.h"
+#include "ixheaacd_cnst.h"
#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_sbr_scale.h"
#include "ixheaacd_lpp_tran.h"
@@ -98,7 +104,6 @@
#include "ixheaacd_config.h"
#include "ixheaacd_struct.h"
-#include "ixheaacd_cnst.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_tns_usac.h"
#include "ixheaacd_acelp_info.h"
@@ -108,7 +113,7 @@
#include "ixheaacd_create.h"
#include "ixheaacd_function_selector.h"
#include "ixheaacd_ld_mps_dec.h"
-
+#include "ixheaacd_mps_tables.h"
#define MAX_TRACKS_PER_LAYER 50
#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
@@ -124,30 +129,21 @@
#define MIN(x, y) ((x) > (y) ? (y) : (x))
-WORD32 ixheaacd_peak_limiter_init(ia_peak_limiter_struct *peak_limiter,
- UWORD32 num_channels, UWORD32 sample_rate,
- FLOAT32 *buffer, UWORD32 *delay_in_samples);
-
-VOID ixheaacd_peak_limiter_process(ia_peak_limiter_struct *peak_limiter,
- VOID *samples, UWORD32 frame_len,
- WORD8 *qshift_adj);
-
-IA_ERRORCODE ixheaacd_dec_mem_api(
- ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD32 i_cmd,
- WORD32 i_idx, VOID *pv_value) {
+IA_ERRORCODE ixheaacd_dec_mem_api(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
+ WORD32 i_cmd, WORD32 i_idx, VOID *pv_value) {
pUWORD32 pui_value = pv_value;
if (i_idx < 0 || i_idx >= IA_ENHAACPDEC_NUM_MEMTABS) {
- return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_MEMTAB_INDEX;
+ return IA_XHEAAC_DEC_API_FATAL_INVALID_MEMTAB_INDEX;
}
if (i_cmd == IA_API_CMD_SET_MEM_PTR) {
if (pv_value == 0) {
- return (IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALLOC);
+ return (IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC);
}
if (((SIZE_T)pv_value %
p_obj_exhaacplus_dec->p_mem_info_aac[i_idx].ui_alignment) != 0) {
- return (IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALIGN);
+ return (IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN);
}
p_obj_exhaacplus_dec->pp_mem_aac[i_idx] = pv_value;
memset(p_obj_exhaacplus_dec->pp_mem_aac[i_idx], 0,
@@ -162,7 +158,8 @@ IA_ERRORCODE ixheaacd_dec_mem_api(
(sizeof(ia_dec_data_struct) +
sizeof(ia_audio_specific_config_struct) + (8300));
p_obj_exhaacplus_dec->p_state_aac = pv_value;
-
+ memset(p_obj_exhaacplus_dec->p_state_aac, 0,
+ sizeof(ia_aac_dec_state_struct));
p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data = p_temp;
p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config =
p_temp + sizeof(ia_dec_data_struct);
@@ -196,7 +193,7 @@ VOID ixheaacd_updatebytesconsumed(
ia_aac_dec_state_struct *p_state_enhaacplus_dec,
struct ia_bit_buf_struct *it_bit_buff) {
p_state_enhaacplus_dec->i_bytes_consumed =
- (it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
+ (WORD32)(it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
if ((p_state_enhaacplus_dec->i_bytes_consumed == 0) &&
(it_bit_buff->cnt_bits == 0)) {
p_state_enhaacplus_dec->i_bytes_consumed =
@@ -205,6 +202,7 @@ VOID ixheaacd_updatebytesconsumed(
if (it_bit_buff->cnt_bits < 0) {
p_state_enhaacplus_dec->i_bytes_consumed = 0;
p_state_enhaacplus_dec->ui_out_bytes = 0;
+ p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
}
}
@@ -234,7 +232,7 @@ WORD32 ixheaacd_readifadts(ia_aac_dec_state_struct *p_state_enhaacplus_dec,
if ((error = ixheaacd_find_syncword(adts, it_bit_buff)) != 0) {
ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
}
if ((error = ixheaacd_check_if_adts(
adts, it_bit_buff,
@@ -244,10 +242,11 @@ WORD32 ixheaacd_readifadts(ia_aac_dec_state_struct *p_state_enhaacplus_dec,
if (it_bit_buff->cnt_bits < 0) {
p_state_enhaacplus_dec->i_bytes_consumed = 0;
p_state_enhaacplus_dec->ui_out_bytes = 0;
- error = IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
+ error = IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
return error;
}
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
}
p_state_enhaacplus_dec->b_n_raw_data_blk =
(WORD8)(adts->no_raw_data_blocks + 1);
@@ -373,9 +372,18 @@ VOID ixheaacd_allocate_sbr_scr(ia_sbr_scr_struct *sbr_scratch_struct,
}
}
-IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
+VOID ixheaacd_get_lib_id_strings(pVOID pv_output) {
+ ia_lib_info_struct *pstr_lib_info = (ia_lib_info_struct *)pv_output;
+
+ pstr_lib_info->p_lib_name = (WORD8 *)LIBNAME;
+ pstr_lib_info->p_version_num = (WORD8 *)xHE_AAC_DEC_ITTIAM_VER;
+
+ return;
+}
+
+IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_xheaac_dec_obj, WORD32 i_cmd,
WORD32 i_idx, pVOID pv_value) {
- ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec = p_ia_enhaacplus_dec_obj;
+ ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec = p_ia_xheaac_dec_obj;
pUWORD32 pui_value = pv_value;
pWORD32 pui_value_signed = pv_value;
pWORD8 pb_value = pv_value;
@@ -384,11 +392,11 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
if ((i_cmd != IA_API_CMD_GET_API_SIZE) &&
(i_cmd != IA_API_CMD_GET_LIB_ID_STRINGS)) {
- if (p_ia_enhaacplus_dec_obj == 0) {
- return (IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALLOC);
+ if (p_ia_xheaac_dec_obj == 0) {
+ return (IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC);
}
- if (((SIZE_T)p_ia_enhaacplus_dec_obj & 3) != 0) {
- return (IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALIGN);
+ if (((SIZE_T)p_ia_xheaac_dec_obj & 3) != 0) {
+ return (IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN);
}
}
@@ -397,7 +405,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
case IA_API_CMD_GET_MEM_INFO_ALIGNMENT:
case IA_API_CMD_GET_MEM_INFO_TYPE:
case IA_API_CMD_SET_MEM_PTR: {
- return ixheaacd_dec_mem_api(p_ia_enhaacplus_dec_obj, i_cmd, i_idx,
+ return ixheaacd_dec_mem_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
pv_value);
}
@@ -405,7 +413,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
case IA_API_CMD_GET_TABLE_INFO_ALIGNMENT:
case IA_API_CMD_SET_TABLE_PTR:
case IA_API_CMD_GET_TABLE_PTR: {
- return ixheaacd_dec_table_api(p_ia_enhaacplus_dec_obj, i_cmd, i_idx,
+ return ixheaacd_dec_table_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
pv_value);
}
};
@@ -420,7 +428,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
else if (i_idx == IA_CMD_TYPE_LIB_VERSION)
i1_ver = (WORD8 *)xHE_AAC_DEC_ITTIAM_VER;
else
- return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX;
+ return IA_XHEAAC_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX;
ver_char = *i1_ver++;
@@ -455,15 +463,20 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = 1;
p_obj_exhaacplus_dec->aac_config.ui_samp_freq = 0;
p_obj_exhaacplus_dec->aac_config.ui_frame_size = 0;
+
+ p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
+ p_obj_exhaacplus_dec->aac_config.i_channel_mask = 3;
p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 3;
p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
p_obj_exhaacplus_dec->aac_config.ui_effect_type = 0;
p_obj_exhaacplus_dec->aac_config.ui_target_loudness = -24;
p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 0;
+ p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = 0;
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr = 1;
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = 0;
p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr = 0;
p_obj_exhaacplus_dec->aac_config.loas_present = 0;
p_obj_exhaacplus_dec->aac_config.ld_decoder = 0;
- p_obj_exhaacplus_dec->aac_config.ui_drc_enable = 1;
p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
@@ -475,8 +488,8 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = 0;
p_obj_exhaacplus_dec->aac_config.downmix = 0;
- p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
- p_obj_exhaacplus_dec->aac_config.i_channel_mask = 3;
+
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal = 0;
{
ia_aac_dec_tables_struct *pstr_aac_tables =
@@ -508,6 +521,13 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
err_code = IA_FATAL_ERROR;
} else {
err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && err_code) {
+ if (err_code & IA_FATAL_ERROR) {
+ err_code = IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL;
+ } else {
+ err_code = IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL;
+ }
+ }
}
if (err_code != 0) {
if (err_code < 0)
@@ -538,226 +558,233 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
}
default: {
- return IA_ENHAACPLUS_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED;
+ return IA_XHEAAC_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED;
}
};
break;
}
case IA_API_CMD_SET_CONFIG_PARAM: {
switch (i_idx) {
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ: {
if ((*pui_value < 8000) || (*pui_value > 96000)) {
- return (IA_ENHAACPLUS_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE);
+ return (IA_XHEAAC_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE);
}
p_obj_exhaacplus_dec->aac_config.ui_samp_freq = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG: {
if ((*pui_value != 1) && (*pui_value != 0)) {
- return(IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG);
}
p_obj_exhaacplus_dec->aac_config.ui_frame_size = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ: {
if ((*pui_value != 16) && (*pui_value != 24)) {
p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = 16;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ);
}
p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.flag_downmix = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX);
}
p_obj_exhaacplus_dec->aac_config.flag_downmix = *pui_value;
p_obj_exhaacplus_dec->aac_config.downmix = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_TOSTEREO: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO);
}
p_obj_exhaacplus_dec->aac_config.flag_to_stereo = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DSAMPLE: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.down_sample_flag = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE);
}
p_obj_exhaacplus_dec->aac_config.down_sample_flag = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMEOK: {
- if ((*pui_value != 1) && (*pui_value != 0)) {
- p_obj_exhaacplus_dec->aac_config.frame_status = 1;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMEOK);
- }
- p_obj_exhaacplus_dec->aac_config.frame_status = *pui_value;
- break;
- }
-
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG);
}
p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISLOAS: {
- if ((*pui_value != 1) && (*pui_value != 0)) {
- p_obj_exhaacplus_dec->aac_config.loas_present = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_LOASFLAG);
- }
- p_obj_exhaacplus_dec->aac_config.loas_present = *pui_value;
- break;
- }
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_ENABLE: {
- if ((*pui_value != 1) && (*pui_value != 0)) {
- p_obj_exhaacplus_dec->aac_config.ui_drc_enable = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG);
- }
- p_obj_exhaacplus_dec->aac_config.ui_drc_enable = *pui_value;
- break;
- }
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT: {
p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
if (*pf_value > 1) {
p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT);
}
p_obj_exhaacplus_dec->aac_config.ui_drc_cut =
(WORD32)((*pf_value) * 100);
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST: {
p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
if (*pf_value > 1) {
p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST);
}
p_obj_exhaacplus_dec->aac_config.ui_drc_boost =
(WORD32)((*pf_value) * 100);
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL: {
p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
p_obj_exhaacplus_dec->aac_config.i_loud_ref_level = *pui_value_signed;
if (*pui_value > 127) {
p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET);
}
p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP: {
p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG);
}
p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DISABLE_SYNC: {
+ case IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.ui_disable_sync = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG);
}
p_obj_exhaacplus_dec->aac_config.ui_disable_sync = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG);
}
p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_MAX_CHANNEL: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL: {
if (*pui_value > 8) {
p_obj_exhaacplus_dec->aac_config.ui_max_channels = 8;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
}
if (*pui_value < 2) {
p_obj_exhaacplus_dec->aac_config.ui_max_channels = 2;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
}
p_obj_exhaacplus_dec->aac_config.ui_max_channels = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMESIZE: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE: {
if (*pui_value == 1) {
p_obj_exhaacplus_dec->aac_config.framesize_480 = 1;
} else if (*pui_value == 0) {
p_obj_exhaacplus_dec->aac_config.framesize_480 = 0;
} else {
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ);
}
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_LD_TESTING: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING: {
if (*pui_value == 1) {
p_obj_exhaacplus_dec->aac_config.ld_decoder = 1;
} else if (*pui_value == 0) {
p_obj_exhaacplus_dec->aac_config.ld_decoder = 0;
} else {
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG);
}
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_COUP_CHANNEL: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL: {
if (*pui_value > 16) {
p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = 1;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL);
}
p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX_STEREO: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO: {
if ((*pui_value != 1) && (*pui_value != 0)) {
p_obj_exhaacplus_dec->aac_config.downmix = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX_STEREO);
}
p_obj_exhaacplus_dec->aac_config.downmix = *pui_value;
break;
}
- case IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE: {
if (((*pui_value_signed) > 8) || ((*pui_value_signed) < -1)) {
p_obj_exhaacplus_dec->aac_config.ui_effect_type = -1;
- return (IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_EFFECT_TYPE);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE);
}
p_obj_exhaacplus_dec->aac_config.ui_effect_type = *pui_value_signed;
break;
}
- case IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS: {
+ case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS: {
if (*pui_value_signed >= 0) {
p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 1;
}
*pui_value_signed = -(*pui_value_signed >> 2);
if (((*pui_value_signed) > 0) || ((*pui_value_signed) < -63)) {
p_obj_exhaacplus_dec->aac_config.ui_target_loudness = 0;
- return (IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS);
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS);
}
p_obj_exhaacplus_dec->aac_config.ui_target_loudness =
*pui_value_signed;
break;
}
- default: { return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_CONFIG_PARAM; }
+ case IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR: {
+ if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
+ p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = 0;
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_HQ_FLAG);
+ }
+ p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = *pui_value_signed;
+ break;
+ }
+ case IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE: {
+ if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = 0;
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_PS_FLAG);
+ }
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = *pui_value_signed;
+ break;
+ }
+ case IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER: {
+ if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
+ p_obj_exhaacplus_dec->aac_config.peak_limiter_off = 0;
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PEAK_LIM_FLAG_TYPE);
+ }
+ p_obj_exhaacplus_dec->aac_config.peak_limiter_off = *pui_value_signed;
+ break;
+ }
+ case IA_XHEAAC_DEC_CONFIG_ERROR_CONCEALMENT: {
+ if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal = 0;
+ return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ERR_CONCEAL_FLAG_TYPE);
+ }
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal = *pui_value_signed;
+ break;
+ }
+ default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM; }
}
break;
}
@@ -766,7 +793,25 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
UWORD32 i;
WORD32 *pvalue =
(WORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz);
-
+ if (IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS == i_idx) {
+ if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
+ .heaac_mps_present == 1) {
+ *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
+ .num_output_channels_at;
+ } else {
+ *pui_value = pvalue[i_idx];
+ }
+ } else if (IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK == i_idx) {
+ if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
+ .heaac_mps_present == 1) {
+ *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
+ .bs_config.ui_channel_mask;
+ } else {
+ *pui_value = pvalue[i_idx];
+ }
+ } else
if (i_idx >= 0 && i_idx <= 8) {
*pui_value = pvalue[i_idx];
} else if (IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES == i_idx) {
@@ -868,10 +913,21 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
*pp_value = ptr_audio_specific_config->str_usac_config
.str_usac_dec_config.usac_ext_gain_payload_buf +
payload_buffer_offeset;
- }
-
- else {
- return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_CONFIG_PARAM;
+ } else if (IA_XHEAAC_DEC_CONFIG_PARAM_AOT == i_idx) {
+ if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag == 1) {
+ ia_audio_specific_config_struct *ptr_audio_specific_config =
+ ((ia_audio_specific_config_struct *)
+ p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
+ *pui_value = ptr_audio_specific_config->audio_object_type;
+ } else {
+ *pui_value = p_obj_exhaacplus_dec->p_state_aac->audio_object_type;
+ }
+ } else {
+ *pui_value = AOT_AAC_LC;
+ }
+ } else {
+ return IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM;
}
break;
}
@@ -886,7 +942,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
break;
}
case IA_API_CMD_SET_MEMTABS_PTR: {
- if (pv_value == NULL) return IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALLOC;
+ if (pv_value == NULL) return IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC;
memset(pv_value, 0, (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) *
(IA_ENHAACPDEC_NUM_MEMTABS));
@@ -903,7 +959,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
}
case IA_API_CMD_GET_N_TABLES: {
- *pui_value = NUM_AAC_TABLES;
+ *pui_value = NUM_AAC_TABLES + NUM_MPS_TABLES;
break;
}
case IA_API_CMD_EXECUTE: {
@@ -920,8 +976,9 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
err_code = ixheaacd_dec_execute(p_obj_exhaacplus_dec);
}
if (err_code != IA_NO_ERROR) {
- if (err_code < 0)
+ if (err_code < 0) {
p_obj_exhaacplus_dec->p_state_aac->fatal_err_present = 1;
+ }
p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
}
@@ -937,7 +994,7 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
break;
}
- default: { return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_EXECUTE_TYPE; }
+ default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_EXECUTE_TYPE; }
};
break;
}
@@ -950,6 +1007,11 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
break;
}
case IA_API_CMD_GET_OUTPUT_BYTES: {
+ if (1 == i_idx) {
+ *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes;
+ } else {
+ *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes;
+ }
if (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_USAC) {
ia_audio_specific_config_struct *ptr_audio_specific_config =
((ia_audio_specific_config_struct *)
@@ -965,8 +1027,6 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
ptr_audio_specific_config->str_usac_config.str_usac_dec_config
.preroll_counter = preroll_counter;
- } else {
- *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes;
}
break;
}
@@ -974,13 +1034,13 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_enhaacplus_dec_obj, WORD32 i_cmd,
p_obj_exhaacplus_dec->p_state_aac->ui_input_over = 1;
break;
}
- default: { return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_CMD; }
+ default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_CMD; }
};
return IA_NO_ERROR;
}
-IA_ERRORCODE ixheaacd_decoder_2_ga_hdr(
- ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
+IA_ERRORCODE ixheaacd_decoder_2_ga_hdr(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = 16;
p_obj_exhaacplus_dec->aac_config.flag_downmix = 0;
@@ -998,8 +1058,6 @@ IA_ERRORCODE ixheaacd_decoder_2_ga_hdr(
p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 2;
p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr = 0;
p_obj_exhaacplus_dec->aac_config.loas_present = 0;
-
- p_obj_exhaacplus_dec->aac_config.ui_drc_enable = 1;
p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
@@ -1029,15 +1087,24 @@ IA_ERRORCODE ixheaacd_decoder_2_ga_hdr(
p_obj_exhaacplus_dec->aac_config.ui_qmf_bands = 64;
p_obj_exhaacplus_dec->p_state_aac->ui_init_done = 0;
- return ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
} else {
p_obj_exhaacplus_dec->aac_config.ui_flush_cmd = 0;
- return ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ }
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && err_code) {
+ if (err_code & IA_FATAL_ERROR) {
+ return IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL;
+ } else {
+ return IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL;
+ }
+ } else {
+ return err_code;
}
}
-IA_ERRORCODE ixheaacd_decoder_flush_api(
- ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
+IA_ERRORCODE ixheaacd_decoder_flush_api(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
UWORD8 *header_temp_ptr;
WORD32 header_length;
if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
@@ -1079,8 +1146,6 @@ IA_ERRORCODE ixheaacd_decoder_flush_api(
p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 2;
p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr = 0;
p_obj_exhaacplus_dec->aac_config.loas_present = 0;
-
- p_obj_exhaacplus_dec->aac_config.ui_drc_enable = 1;
p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 0;
p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
@@ -1113,11 +1178,19 @@ IA_ERRORCODE ixheaacd_decoder_flush_api(
p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes = header_length;
p_obj_exhaacplus_dec->p_state_aac->header_length = header_length;
- return ixheaacd_dec_init(p_obj_exhaacplus_dec);
-
+ err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
} else {
p_obj_exhaacplus_dec->aac_config.ui_flush_cmd = 0;
- return ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
+ }
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && err_code) {
+ if (err_code & IA_FATAL_ERROR) {
+ return IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL;
+ } else {
+ return IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL;
+ }
+ } else {
+ return err_code;
}
}
@@ -1132,6 +1205,8 @@ ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
size_buffers += (ltp_buffer_size * num_channel * sizeof(WORD16));
+ size_buffers += num_channel * sizeof(ia_aac_dec_channel_info);
+
if (num_channel > 2) {
max_channels = MAX_BS_ELEMENT;
} else {
@@ -1142,6 +1217,8 @@ ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
size_buffers += ALIGN_SIZE64(MAXSBRBYTES) * num_channel * sizeof(WORD8);
+ size_buffers += ALIGN_SIZE64(MAXSBRBYTES) * num_channel * sizeof(WORD8);
+
size_buffers += 2 * num_channel *
(QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) *
sizeof(WORD16);
@@ -1158,21 +1235,16 @@ ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
(QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) *
sizeof(WORD32);
- if (num_channel <= 2) {
- size_buffers +=
- num_channel * 2 * MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32);
- } else {
- size_buffers +=
- num_channel * MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32);
- }
+ size_buffers +=
+ num_channel * 2 * MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32);
size_buffers +=
- LPC_ORDER * num_channel * NO_ANALYSIS_CHANNELS * sizeof(WORD32);
+ 2 * LPC_ORDER * num_channel * NO_ANALYSIS_CHANNELS * sizeof(WORD32);
- if (num_channel <= 2) {
- size_buffers +=
- LPC_ORDER * num_channel * NO_ANALYSIS_CHANNELS * sizeof(WORD32);
- }
+ size_buffers += LPC_ORDER * 2 * sizeof(WORD32 *);
+
+ size_buffers +=
+ 2 * LPC_ORDER * num_channel * NO_ANALYSIS_CHANNELS * sizeof(WORD32);
size_buffers += num_channel * 3 * 2 * MAX_FREQ_COEFFS * sizeof(WORD16);
@@ -1183,15 +1255,13 @@ ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
size_buffers += MAX_BS_ELEMENT * sizeof(ixheaac_drc_bs_data_struct *);
- if (num_channel <= 2) {
- size_buffers += sizeof(ia_ps_dec_struct);
- }
+ size_buffers += num_channel * sizeof(ia_ps_dec_struct);
{
WORD32 temp_size = 0;
size_buffers +=
- MAXNRSBRCHANNELS * (sizeof(ia_sbr_frame_info_data_struct) +
- MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8);
+ (num_channel * (sizeof(ia_sbr_frame_info_data_struct) +
+ MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8) * 2);
temp_size += sizeof(ia_pvc_data_struct);
temp_size += sizeof(ia_esbr_hbe_txposer_struct) * 2;
temp_size += (MAX_HBE_PERSISTENT_SIZE * 2);
@@ -1228,10 +1298,8 @@ VOID ixheaacd_fill_aac_mem_tables(
p_mem_info_aac->ui_size =
sizeof(ia_aac_dec_state_struct) +
channels * sizeof(struct ia_aac_persistent_struct) +
-
buffer_size + channels * ixheaacd_getsize_sbr_persistent() +
- channels * 16;
-
+ channels * 16 + ixheaacd_mps_persistent_buffer_sizes();
p_mem_info_aac->ui_size += sizeof(ia_dec_data_struct);
p_mem_info_aac->ui_size += sizeof(ia_audio_specific_config_struct);
p_mem_info_aac->ui_size += 8300;
@@ -1294,7 +1362,7 @@ VOID ixheaacd_fill_aac_mem_tables(
p_mem_info_aac =
&p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
- p_mem_info_aac->ui_size = 8 * 1024 + 11;
+ p_mem_info_aac->ui_size = IA_MAX_INP_BUFFER_SIZE;
p_mem_info_aac->ui_alignment = 8;
p_mem_info_aac->ui_type = IA_MEMTYPE_INPUT;
@@ -1312,20 +1380,35 @@ VOID ixheaacd_fill_aac_mem_tables(
IA_ERRORCODE ixheaacd_dec_table_api(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD32 i_cmd,
WORD32 i_idx, pVOID pv_value) {
+ ia_heaac_mps_state_struct *pstr_mps_state =
+ &p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle;
pUWORD32 pui_value = pv_value;
pUWORD32 *p_pui_value = pv_value;
SIZE_T ui_get_vals[5];
- pVOID *table_ptrs[8];
- UWORD32 table_sizes[8] = {sizeof(ixheaacd_aac_huffmann_tables),
- sizeof(ixheaacd_aac_block_tables),
- sizeof(ixheaacd_imdct_tables),
- sizeof(ixheaacd_str_fft_n_transcendent_tables),
- sizeof(ixheaacd_aac_dec_env_calc_tables),
- sizeof(ixheaacd_aac_qmf_dec_tables),
- sizeof(ixheaacd_aac_dec_env_extr_tables),
- sizeof(ixheaacd_aac_dec_ps_tables)};
-
+ pVOID *table_ptrs[8 + NUM_MPS_TABLES];
+ UWORD32 table_sizes[8 + NUM_MPS_TABLES] = {
+ sizeof(ixheaacd_aac_huffmann_tables),
+ sizeof(ixheaacd_aac_block_tables),
+ sizeof(ixheaacd_imdct_tables),
+ sizeof(ixheaacd_str_fft_n_transcendent_tables),
+ sizeof(ixheaacd_aac_dec_env_calc_tables),
+ sizeof(ixheaacd_aac_qmf_dec_tables),
+ sizeof(ixheaacd_aac_dec_env_extr_tables),
+ sizeof(ixheaacd_aac_dec_ps_tables),
+ sizeof(ixheaacd_mps_dec_qmf_tables),
+ sizeof(ixheaacd_mps_dec_common_tables),
+ sizeof(ixheaacd_mps_dec_hybrid_tables),
+ sizeof(ixheaacd_mps_dec_m1_m2_tables),
+ sizeof(ixheaacd_mps_dec_decorr_tables),
+ sizeof(ixheaacd_mps_dec_tp_process_tables),
+ sizeof(ixheaacd_mps_dec_mdct2qmf_table),
+ sizeof(ixheaacd_mps_dec_tonality_tables),
+ sizeof(ixheaacd_mps_dec_bitdec_tables),
+ sizeof(ixheaacd_mps_dec_blind_tables),
+ sizeof(ixheaacd_mps_dec_mdct2qmf_tables),
+ sizeof(ia_mps_dec_mdct2qmf_cos_table_struct),
+ sizeof(ia_mps_dec_residual_aac_tables_struct)};
table_ptrs[0] =
(pVOID *)&(p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables);
table_ptrs[1] =
@@ -1340,9 +1423,22 @@ IA_ERRORCODE ixheaacd_dec_table_api(
table_ptrs[6] =
(pVOID *)&p_obj_exhaacplus_dec->str_sbr_tables.env_extr_tables_ptr;
table_ptrs[7] = (pVOID *)&p_obj_exhaacplus_dec->str_sbr_tables.ps_tables_ptr;
-
- if (i_idx < 0 || i_idx >= NUM_AAC_TABLES) {
- return IA_ENHAACPLUS_DEC_API_FATAL_INVALID_MEMTAB_INDEX;
+ table_ptrs[8] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr);
+ table_ptrs[9] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr);
+ table_ptrs[10] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.hybrid_table_ptr);
+ table_ptrs[11] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr);
+ table_ptrs[12] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.decor_table_ptr);
+ table_ptrs[13] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr);
+ table_ptrs[14] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.mdct2qmf_table_ptr);
+ table_ptrs[15] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr);
+ table_ptrs[16] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ table_ptrs[17] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.blind_table_ptr);
+ table_ptrs[18] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr);
+ table_ptrs[19] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_tab_ptr);
+ table_ptrs[20] = (pVOID *)&(pstr_mps_state->ia_mps_dec_mps_table.aac_tab);
+
+ if (i_idx < 0 || i_idx >= (NUM_AAC_TABLES + NUM_MPS_TABLES)) {
+ return IA_XHEAAC_DEC_API_FATAL_INVALID_MEMTAB_INDEX;
}
ui_get_vals[0] = table_sizes[i_idx];
@@ -1351,10 +1447,10 @@ IA_ERRORCODE ixheaacd_dec_table_api(
if (i_cmd == IA_API_CMD_SET_TABLE_PTR) {
if (pv_value == 0) {
- return (IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALLOC);
+ return (IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC);
}
if (((SIZE_T)pv_value) & 3) {
- return IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALIGN;
+ return IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN;
}
*table_ptrs[i_idx] = pv_value;
@@ -1410,6 +1506,7 @@ IA_ERRORCODE ixheaacd_dec_init(
WORD16 *time_data;
WORD ch_idx;
WORD sbr_present_flag = 0;
+ UWORD8 *mps_buffer;
ia_aac_dec_state_struct *p_state_enhaacplus_dec;
WORD32 error_code = IA_NO_ERROR;
@@ -1455,6 +1552,8 @@ IA_ERRORCODE ixheaacd_dec_init(
p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl =
p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
->huffman_code_book_scl;
+ mps_buffer = p_obj_exhaacplus_dec->p_state_aac->mps_buffer;
+ p_state_enhaacplus_dec->mps_header = -1;
p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl_index =
p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
->huffman_code_book_scl_index;
@@ -1463,6 +1562,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0)
{
p_obj_exhaacplus_dec->aac_config.header_dec_done = 0;
+ p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.ldmps_present_flag = 0;
}
if (p_obj_exhaacplus_dec->aac_config.header_dec_done == 0) {
WORD32 channels;
@@ -1509,6 +1609,17 @@ IA_ERRORCODE ixheaacd_dec_init(
p_state_enhaacplus_dec->sbr_persistent_mem_v, &persistent_used,
channels, 1);
+ p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v =
+ (pVOID)((SIZE_T)((pWORD8)p_state_enhaacplus_dec->sbr_persistent_mem_v +
+ persistent_used + sizeof(SIZE_T) - 1) &
+ (SIZE_T)(~(sizeof(SIZE_T) - 1)));
+
+ persistent_used = ixheaacd_getsize_mps_persistent();
+
+ ixheaacd_set_mps_persistent_buffers(
+ &p_state_enhaacplus_dec->heaac_mps_handle, &persistent_used, channels,
+ p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v);
+
aac_persistent_mem = (struct ia_aac_persistent_struct *)
p_state_enhaacplus_dec->aac_persistent_mem_v;
if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
@@ -1520,6 +1631,7 @@ IA_ERRORCODE ixheaacd_dec_init(
aac_persistent_mem->overlap_buffer;
p_state_enhaacplus_dec->bit_count = 0;
+ p_state_enhaacplus_dec->ec_enable = p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
p_state_enhaacplus_dec->sync_status = 0;
p_state_enhaacplus_dec->bs_format = ADTS_BSFORMAT;
p_state_enhaacplus_dec->latm_initialized = 0;
@@ -1556,10 +1668,13 @@ IA_ERRORCODE ixheaacd_dec_init(
p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_v,
&p_obj_exhaacplus_dec->str_sbr_tables,
p_obj_exhaacplus_dec->common_tables);
+ ixheaacd_set_scratch_buffers(
+ &p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle,
+ p_state_enhaacplus_dec->aac_scratch_mem_v);
}
if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 1) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_EO_INPUT_REACHED;
+ return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
}
if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0) {
@@ -1572,6 +1687,9 @@ IA_ERRORCODE ixheaacd_dec_init(
p_state_enhaacplus_dec->aac_persistent_mem_v;
sbr_persistent_mem = (struct ia_sbr_pers_struct *)
p_state_enhaacplus_dec->sbr_persistent_mem_v;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->p_state_aac->first_frame = 1;
+ }
if (p_obj_exhaacplus_dec->aac_config.ui_samp_freq == 0) {
WORD32 header_bytes_consumed, return_val;
@@ -1610,7 +1728,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (return_val < 0) {
if (return_val ==
- (WORD32)IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX) {
+ (WORD32)IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX) {
p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
return return_val;
}
@@ -1620,7 +1738,7 @@ IA_ERRORCODE ixheaacd_dec_init(
}
if (return_val ==
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) {
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) {
p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
return return_val;
}
@@ -1668,7 +1786,7 @@ IA_ERRORCODE ixheaacd_dec_init(
}
if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done != 1)
- return IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
+ return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
if (p_state_enhaacplus_dec->dwnsmp_signal == 1 &&
p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
@@ -1705,7 +1823,7 @@ IA_ERRORCODE ixheaacd_dec_init(
p_state_enhaacplus_dec->ptr_bit_stream =
p_state_enhaacplus_dec->pstr_bit_buf;
- if (p_state_enhaacplus_dec->s_adts_hdr_present) { // rajat
+ if (p_state_enhaacplus_dec->s_adts_hdr_present) {
if (p_obj_exhaacplus_dec->aac_config.ld_decoder == 1)
p_state_enhaacplus_dec->audio_object_type = 23;
}
@@ -1743,7 +1861,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
}
@@ -1805,7 +1923,7 @@ IA_ERRORCODE ixheaacd_dec_init(
p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
-
+ p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
p_state_enhaacplus_dec->i_bytes_consumed = 0;
return IA_NO_ERROR;
@@ -1874,7 +1992,7 @@ IA_ERRORCODE ixheaacd_dec_init(
sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
cnt_bits = it_bit_buff->cnt_bits;
if (it_bit_buff->cnt_bits <= 24) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ return IA_XHEAAC_DEC_INIT_NONFATAL_INSUFFICIENT_INPUT_BYTES;
}
while (sync != 0x2b7) {
@@ -1883,7 +2001,7 @@ IA_ERRORCODE ixheaacd_dec_init(
ixheaacd_read_bidirection(it_bit_buff, -11);
p_state_enhaacplus_dec->i_bytes_consumed =
(cnt_bits - it_bit_buff->cnt_bits) / 8;
- return (IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
+ return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
}
}
@@ -1913,7 +2031,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (ch_idx >= elements_number) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
+ return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
}
ixheaacd_allocate_aac_scr(
@@ -1923,22 +2041,22 @@ IA_ERRORCODE ixheaacd_dec_init(
p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
&p_state_enhaacplus_dec->ind_cc_info;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.first_frame = 1;
+ }
error_code = ixheaacd_aacdec_decodeframe(
- p_obj_exhaacplus_dec, &aac_scratch_struct, time_data, frame_status,
- &type, &ch_idx, 1, 2,
- p_obj_exhaacplus_dec->aac_config.element_instance_order, 0, 1, 0,
+ p_obj_exhaacplus_dec, &aac_scratch_struct, time_data, frame_status, &type, &ch_idx, 1,
+ 2, p_obj_exhaacplus_dec->aac_config.element_instance_order, 0, 1, 0,
p_obj_exhaacplus_dec->aac_config.ui_max_channels, 2,
p_obj_exhaacplus_dec->p_state_aac->frame_length,
- p_obj_exhaacplus_dec->p_state_aac->frame_size,
- p_state_enhaacplus_dec->pstr_drc_dec,
- p_state_enhaacplus_dec->audio_object_type,
- p_state_enhaacplus_dec->ch_config,
- p_state_enhaacplus_dec->eld_specific_config,
- p_state_enhaacplus_dec->s_adts_hdr_present,
- &p_state_enhaacplus_dec->drc_dummy,
- p_state_enhaacplus_dec->ldmps_present,
- &p_state_enhaacplus_dec->slot_pos);
+ p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
+ p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
+ p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
+ &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
+ &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
+ &p_state_enhaacplus_dec->ui_mps_out_bytes, 1,
+ p_obj_exhaacplus_dec->aac_config.first_frame);
if (p_state_enhaacplus_dec->pstr_drc_dec->drc_element_found == 1) {
if (p_obj_exhaacplus_dec->aac_config.i_loud_ref_level < 0) {
@@ -1979,7 +2097,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if ((p_obj_exhaacplus_dec->aac_config.ui_max_channels <= 2) &&
(p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 2)) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
+ return IA_XHEAAC_DEC_INIT_FATAL_UNIMPLEMENTED_CCE;
}
if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
@@ -1989,7 +2107,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (error_code) {
if (p_state_enhaacplus_dec->ui_input_over) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_EO_INPUT_REACHED;
+ return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
}
ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
@@ -1998,7 +2116,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (p_state_enhaacplus_dec->s_adts_hdr_present) {
if (adts.no_raw_data_blocks != 0) {
- if (adts.protection_absent == 0) {
+ if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
}
}
@@ -2010,6 +2128,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
+ WORD32 harmonic_sbr_flag = 0;
if ((p_obj_exhaacplus_dec->aac_config.flag_16khz_out == 1) &&
(sample_rate_1 == 8000)) {
p_obj_exhaacplus_dec->aac_config.flag_16khz_out = 0;
@@ -2020,7 +2139,7 @@ IA_ERRORCODE ixheaacd_dec_init(
(FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
p_state_enhaacplus_dec->sbr_persistent_mem_v,
p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, (WORD)1,
- 1, frame_size_1 * 2, NULL, NULL,
+ 1, frame_size_1 * 2, &harmonic_sbr_flag, NULL,
p_state_enhaacplus_dec->str_sbr_config,
p_state_enhaacplus_dec->audio_object_type,
p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
@@ -2042,33 +2161,93 @@ IA_ERRORCODE ixheaacd_dec_init(
&sbr_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
time_data, 1, 1, p_state_enhaacplus_dec->audio_object_type, 0, NULL,
0, 0);
+ {
+ WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
+
+ if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
+ WORD32 i = 0;
+ ia_dec_data_struct *pstr_dec_data =
+ (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
+ if (num_channels_1 == 1) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ ((FLOAT32)time_data[i]);
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
+
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
+ } else if (num_channels_1 == 2) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ ((FLOAT32)time_data[2 * i + 0]);
+ pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
+ ((FLOAT32)time_data[2 * i + 1]);
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
- if (ixheaacd_applysbr(
- p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
- &p_state_enhaacplus_dec->pstr_stream_sbr[0][0], time_data,
- &num_channels_1, frame_status,
- p_obj_exhaacplus_dec->aac_config.down_sample_flag, 0,
- &sbr_scratch_struct, 1, 1, 0, NULL, NULL,
- p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
- p_state_enhaacplus_dec->audio_object_type, 1,
- p_state_enhaacplus_dec->ldmps_present, frame_size_1) != SBRDEC_OK) {
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
+ }
+ }
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->ec_flag =
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
+ p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
+
+ if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
+ &(p_state_enhaacplus_dec->xaac_jmp_buf);
+ }
+
+ if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
+ &p_state_enhaacplus_dec->pstr_stream_sbr[0][0], time_data,
+ &num_channels_1, frame_status,
+ p_obj_exhaacplus_dec->aac_config.down_sample_flag, 0,
+ &sbr_scratch_struct, 1, 1, 0, NULL, NULL,
+ p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
+ p_state_enhaacplus_dec->audio_object_type, 1,
+ p_state_enhaacplus_dec->ldmps_present, frame_size_1,
+ p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
+ p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
return -1;
} else {
if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
sample_rate_1 *= 2;
}
- if (p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present ==
- 1)
+ if (p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present == 1) {
+ p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.pre_mix_req = 1;
ixheaacd_mps_payload(
- p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
- p_obj_exhaacplus_dec);
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
+ p_obj_exhaacplus_dec);
+ }
+ }
+ {
+ WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
+
+ if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
+ WORD32 out_bytes = 0;
+ ia_dec_data_struct *pstr_dec_data =
+ (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
+ ixheaacd_samples_sat((WORD8 *)time_data, 2048, 16,
+ pstr_dec_data->str_usac_data.time_sample_vector, &out_bytes, 1);
+ }
}
-
if (p_obj_exhaacplus_dec->aac_config.flag_downmix) {
num_channels_1 = 1;
}
if (num_channels_1_t == 1 && num_channels_1 == 2) ps_detected = 1;
+ } else {
+ p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
}
p_state_enhaacplus_dec->i_bytes_consumed = 0;
@@ -2084,16 +2263,17 @@ IA_ERRORCODE ixheaacd_dec_init(
if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
+ WORD32 harmonic_sbr_flag = 0;
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
sample_rate_2, frame_size_2,
(FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
p_state_enhaacplus_dec->sbr_persistent_mem_v,
p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, 1, 1,
- frame_size_2 * 2, NULL, NULL,
+ frame_size_2 * 2, &harmonic_sbr_flag, NULL,
p_state_enhaacplus_dec->str_sbr_config,
p_state_enhaacplus_dec->audio_object_type,
p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
@@ -2138,6 +2318,7 @@ IA_ERRORCODE ixheaacd_dec_init(
WORD channel_check = 0;
WORD cc_channel_check = 0;
WORD max_ch_num = p_obj_exhaacplus_dec->aac_config.ui_max_channels;
+ WORD32 harmonic_sbr_flag = 0;
i = 0;
p_obj_exhaacplus_dec->aac_config.ui_n_channels = ch_idx;
@@ -2148,12 +2329,12 @@ IA_ERRORCODE ixheaacd_dec_init(
if (ch_idx_err == 0) {
p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
- p_state_enhaacplus_dec->i_bytes_consumed =
- it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
+ it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
+ return IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR;
}
- if (ch_idx == 1)
+ if (ch_idx_err == 1)
ps_enable = 1;
else
ps_enable = 0;
@@ -2184,11 +2365,11 @@ IA_ERRORCODE ixheaacd_dec_init(
cc_channel_check++;
break;
default:
- assert(0);
+ return -1;
}
if (cc_channel_check > MAX_CC_CHANNEL_NUM)
- return IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
+ return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
if (ps_enable == 1) {
channel = 2;
}
@@ -2199,7 +2380,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (channel_check > max_ch_num) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
+ return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
}
temp = p_state_enhaacplus_dec->aac_persistent_mem_v;
@@ -2231,7 +2412,7 @@ IA_ERRORCODE ixheaacd_dec_init(
if (!p_state_enhaacplus_dec->pstr_aac_dec_info[i]) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
p_state_enhaacplus_dec->str_sbr_dec_info[i] = ixheaacd_init_sbr(
@@ -2239,7 +2420,7 @@ IA_ERRORCODE ixheaacd_dec_init(
(FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
p_state_enhaacplus_dec->sbr_persistent_mem_v,
p_state_enhaacplus_dec->ptr_overlap_buf, channel, ps_enable, 1,
- frame_size_2 * 2, NULL, NULL,
+ frame_size_2 * 2, &harmonic_sbr_flag, NULL,
p_state_enhaacplus_dec->str_sbr_config,
p_state_enhaacplus_dec->audio_object_type,
p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
@@ -2261,12 +2442,33 @@ IA_ERRORCODE ixheaacd_dec_init(
.ldmps_present_flag == 1) &&
(p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
AOT_ER_AAC_ELD)))
- p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
+ p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
.ldmps_present_flag == 1) {
copy_qmf_to_ldmps(&p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle,
p_state_enhaacplus_dec->sbr_persistent_mem_v);
}
+ if (p_state_enhaacplus_dec->audio_object_type == AOT_AAC_LC &&
+ p_state_enhaacplus_dec->ui_mps_out_bytes != 0) {
+ p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
+ if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr = 1;
+ }
+ error_code =
+ ixheaacd_aac_mps_init(p_obj_exhaacplus_dec, mps_buffer,
+ p_state_enhaacplus_dec->ui_mps_out_bytes, sample_rate_1);
+ if (error_code) return error_code;
+ p_obj_exhaacplus_dec->aac_config.ui_n_channels =
+ p_state_enhaacplus_dec->heaac_mps_handle.num_output_channels_at;
+ if (p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr == 1) {
+ p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
+ }
+ if (p_obj_exhaacplus_dec->aac_config.element_type[i + 1] >= 0 &&
+ p_obj_exhaacplus_dec->aac_config.element_type[i + 1] <= 3) {
+ return IA_FATAL_ERROR;
+ }
+ break;
+ }
i++;
}
p_state_enhaacplus_dec->pers_mem_ptr =
@@ -2388,6 +2590,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
WORD32 sample_rate = 0;
WORD16 num_ch = 0;
struct ia_bit_buf_struct *it_bit_buff;
+ UWORD8 *mps_buffer;
WORD32 error_code = IA_NO_ERROR;
WORD ch_idx1;
WORD type;
@@ -2405,6 +2608,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
WORD32 mps_out_samples;
p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
+ p_obj_exhaacplus_dec->aac_config.frame_status = 1;
if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
ret_val = setjmp(p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf);
@@ -2412,6 +2616,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
return IA_NO_ERROR;
}
}
@@ -2422,7 +2627,8 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
p_state_enhaacplus_dec->aac_scratch_mem_v =
p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
-
+ p_state_enhaacplus_dec->mps_header = -1;
+ mps_buffer = p_state_enhaacplus_dec->mps_buffer;
it_bit_buff = p_state_enhaacplus_dec->pstr_bit_buf;
ch_idx1 = 0;
@@ -2473,17 +2679,52 @@ IA_ERRORCODE ixheaacd_dec_execute(
error_code = ixheaacd_dec_main(
p_obj_exhaacplus_dec, inbuffer, outbuffer, &out_bytes, frames_done,
pcm_size, &p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch);
- if (error_code == -1) return error_code;
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
p_obj_exhaacplus_dec->p_state_aac->frame_counter++;
} else {
out_bytes = 0;
}
- p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
- p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
+ if (pstr_dec_data->str_usac_data.ec_flag == 0) {
+ if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
+ p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
+ p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
+ }
+ } else {
+ if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
+ if (pstr_dec_data->str_usac_data.frame_ok == 0) {
+ p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
+ p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
+ pstr_dec_data->dec_bit_buf.cnt_bits = 0;
+ } else {
+ ia_dec_data_struct *pstr_dec_data =
+ (ia_dec_data_struct *)p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data;
+
+ if (pstr_dec_data->dec_bit_buf.cnt_bits & 7) {
+ pstr_dec_data->dec_bit_buf.cnt_bits -= (pstr_dec_data->dec_bit_buf.cnt_bits & 7);
+ }
+ if (pstr_dec_data->dec_bit_buf.cnt_bits == 0) {
+ p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
+ p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
+ } else {
+ p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
+ p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes -
+ (pstr_dec_data->dec_bit_buf.cnt_bits >> 3);
+ }
+ }
+ }
+ }
+
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = out_bytes;
p_obj_exhaacplus_dec->aac_config.ui_n_channels =
p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch;
+ pstr_dec_data->str_usac_data.sbr_parse_err_flag = 0;
return 0;
}
@@ -2504,6 +2745,12 @@ IA_ERRORCODE ixheaacd_dec_execute(
}
ch_idx1++;
+ if (ch_idx1 > MAX_BS_ELEMENT) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal)
+ break;
+ else
+ return IA_FATAL_ERROR;
+ }
}
if (ch_idx1 != 1) {
@@ -2528,7 +2775,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
}
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
-
+ p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes = 0;
if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
UWORD32 i;
WORD32 j;
@@ -2572,7 +2819,6 @@ IA_ERRORCODE ixheaacd_dec_execute(
time_data[2 * i + 1] = time_data[2 * i + 0];
}
}
- p_state_enhaacplus_dec->peak_lim_init = 0xFF;
} else {
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
}
@@ -2583,11 +2829,19 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (ch_idx1 == 0) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ }
}
if (total_channels > (WORD)p_obj_exhaacplus_dec->aac_config.ui_max_channels) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL;
+ }
}
if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
@@ -2617,15 +2871,27 @@ IA_ERRORCODE ixheaacd_dec_execute(
WORD32 error;
error = ixheaacd_readifadts(p_state_enhaacplus_dec, it_bit_buff, &adts);
-
- if (error) return error;
+ if (error) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ if (adts.samp_freq_index > 11) {
+ adts.samp_freq_index = 11;
+ }
+ } else {
+ return error;
+ }
+ }
if ((WORD32)p_state_enhaacplus_dec->sampling_rate !=
(WORD32)((p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
->str_sample_rate_info[adts.samp_freq_index]
.sampling_frequency))) {
p_state_enhaacplus_dec->i_bytes_consumed = 0;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
+ }
}
}
}
@@ -2652,8 +2918,11 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (p_state_enhaacplus_dec->i_bytes_consumed == 0)
p_state_enhaacplus_dec->i_bytes_consumed = 1;
-
- return (IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
+ }
}
}
@@ -2667,9 +2936,12 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (it_bit_buff->cnt_bits < (audio_mux_len_bytes_last << 3)) {
ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
- p_state_enhaacplus_dec->i_bytes_consumed =
- (cnt_bits - it_bit_buff->cnt_bits) / 8;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ p_state_enhaacplus_dec->i_bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ }
} else {
ixheaacd_read_bidirection(it_bit_buff, -(13));
}
@@ -2680,16 +2952,25 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_state_enhaacplus_dec,
(ia_sampling_rate_info_struct *)&p_obj_exhaacplus_dec->aac_tables
.pstr_huffmann_tables->str_sample_rate_info[0]);
- if (result) return result;
+ if (result < 0) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return result;
+ }
+ }
if (!p_state_enhaacplus_dec->latm_initialized) {
p_state_enhaacplus_dec->sampling_rate =
- p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0]
- .asc.sampling_freq;
+ p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0].asc.sampling_freq;
p_state_enhaacplus_dec->latm_initialized = 1;
} else {
if (p_state_enhaacplus_dec->sampling_rate != curr_samp_rate) {
p_state_enhaacplus_dec->i_bytes_consumed = 0;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
+ }
}
}
}
@@ -2707,8 +2988,11 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (it_bit_buff->cnt_bits <= 0) {
it_bit_buff->cnt_bits = -1;
ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
- return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
}
{ it_bit_buff->initial_cnt_bits = it_bit_buff->cnt_bits; }
@@ -2728,6 +3012,11 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_state_enhaacplus_dec->pstr_drc_dec->state = 1;
}
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ if (total_elements > MAX_BS_ELEMENT) {
+ total_elements = MAX_BS_ELEMENT;
+ }
+ }
WORD16 *intermediate_scr =
(WORD16 *)(WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v +
@@ -2736,25 +3025,43 @@ IA_ERRORCODE ixheaacd_dec_execute(
for (ch_idx1 = 0; ch_idx1 < total_elements; ch_idx1++) {
WORD32 skip_full_decode = 0;
WORD32 ch_idx = ch_idx1;
- WORD32 channel;
+ WORD32 channel = 0;
WORD ch_fac, slot_ele;
if (p_state_enhaacplus_dec->audio_object_type < ER_OBJECT_START ||
(p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LD &&
p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_ELD &&
p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LC)) {
- error_code = ixheaacd_get_element_index_tag(
- p_obj_exhaacplus_dec, ch_idx1, &ch_idx, &channel,
- p_obj_exhaacplus_dec->aac_config.element_instance_order,
- total_elements, element_used, total_channels,
- p_state_enhaacplus_dec->pstr_drc_dec,
- &p_state_enhaacplus_dec->drc_dummy);
-
- if (error_code) {
+ jmp_buf local;
+ ret_val = setjmp(local);
+ if (ret_val == 0) {
+ p_obj_exhaacplus_dec->p_state_aac->ptr_bit_stream->xaac_jmp_buf = &local;
+ error_code = ixheaacd_get_element_index_tag(
+ p_obj_exhaacplus_dec, ch_idx1, &ch_idx, &channel,
+ p_obj_exhaacplus_dec->aac_config.element_instance_order, total_elements, element_used,
+ total_channels, p_state_enhaacplus_dec->pstr_drc_dec,
+ &p_state_enhaacplus_dec->drc_dummy, mps_buffer, &p_state_enhaacplus_dec->mps_header,
+ &p_state_enhaacplus_dec->ui_mps_out_bytes);
+ }
+
+ if (error_code || ret_val) {
ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
+ if (it_bit_buff->cnt_bits < 0) {
+ p_state_enhaacplus_dec->ui_out_bytes = 0;
+ p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
+ p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
+ }
p_state_enhaacplus_dec->i_bytes_consumed = 1;
p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
- return error_code;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ if (p_obj_exhaacplus_dec->aac_config.element_type[0] == ID_SCE)
+ channel = 1;
+ else
+ channel = 2;
+ } else {
+ return error_code;
+ }
}
} else {
if (p_obj_exhaacplus_dec->aac_config.element_type[0] == ID_SCE)
@@ -2763,6 +3070,35 @@ IA_ERRORCODE ixheaacd_dec_execute(
channel = 2;
}
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && (error_code || ret_val)) {
+ if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 0 ||
+ p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 3) {
+ if (channel > 1) {
+ channel = 1;
+ }
+ }
+ if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 1) {
+ if (channel > 2) {
+ channel = 2;
+ }
+ }
+ if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 2) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
+ if (!(p_obj_exhaacplus_dec->aac_config.element_instance_order[ch_idx1] !=
+ p_obj_exhaacplus_dec->aac_config.ui_coupling_channel)) {
+ if (channel > 1) {
+ channel = 1;
+ }
+ }
+ }
+ }
+ if (ps_enable == 1) {
+ if (channel > 2) {
+ channel = 2;
+ }
+ }
+ }
+
ch_fac = total_channels;
slot_ele = p_obj_exhaacplus_dec->aac_config.slot_element[ch_idx];
actual_out_buffer = time_data;
@@ -2802,7 +3138,11 @@ IA_ERRORCODE ixheaacd_dec_execute(
);
if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
p_state_enhaacplus_dec->i_bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ }
}
p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
(WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v + (8 * 1024) +
@@ -2829,24 +3169,27 @@ IA_ERRORCODE ixheaacd_dec_execute(
time_data, channel, p_obj_exhaacplus_dec->aac_config.ui_max_channels,
p_state_enhaacplus_dec->audio_object_type);
- if (p_state_enhaacplus_dec->ch_config == 2 && channel == 1)
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ if (p_state_enhaacplus_dec->ch_config == 2 && channel == 1) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ }
+ }
error_code = ixheaacd_aacdec_decodeframe(
p_obj_exhaacplus_dec, &aac_scratch_struct, actual_out_buffer,
- p_obj_exhaacplus_dec->aac_config.frame_status, &type, &ch_idx, 0,
- channel, element_index_order1, skip_full_decode, ch_fac, slot_ele,
+ p_obj_exhaacplus_dec->aac_config.frame_status, &type, &ch_idx, 0, channel,
+ element_index_order1, skip_full_decode, ch_fac, slot_ele,
p_obj_exhaacplus_dec->aac_config.ui_max_channels, total_channels,
p_obj_exhaacplus_dec->p_state_aac->frame_length,
- p_obj_exhaacplus_dec->p_state_aac->frame_size,
- p_state_enhaacplus_dec->pstr_drc_dec,
- p_state_enhaacplus_dec->audio_object_type,
- p_state_enhaacplus_dec->ch_config,
- p_state_enhaacplus_dec->eld_specific_config,
- p_state_enhaacplus_dec->s_adts_hdr_present,
- &p_state_enhaacplus_dec->drc_dummy,
- p_state_enhaacplus_dec->ldmps_present,
- &p_state_enhaacplus_dec->slot_pos);
+ p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
+ p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
+ p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
+ &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
+ &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
+ &p_state_enhaacplus_dec->ui_mps_out_bytes, 0,
+ p_obj_exhaacplus_dec->aac_config.first_frame);
p_state_enhaacplus_dec->slot_pos -= (channel - 1);
p_state_enhaacplus_dec->sbr_present = 0;
@@ -2868,10 +3211,14 @@ IA_ERRORCODE ixheaacd_dec_execute(
if ((error_code == 0) && ((ch_idx1 + 1) == total_elements) &&
(type != ID_END)) {
{
- p_state_enhaacplus_dec->i_bytes_consumed =
- it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base;
+ p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
+ it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
+ }
}
}
}
@@ -2900,12 +3247,22 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (error_code) {
if (p_state_enhaacplus_dec->ui_input_over) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_EO_INPUT_REACHED;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
+ }
}
ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
- return error_code;
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
}
error_code = IA_NO_ERROR;
@@ -2914,19 +3271,19 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements == 0 &&
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
- error_code = IA_ENHAACPLUS_DEC_EXE_NONFATAL_SBR_TURNED_OFF;
+ error_code = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_OFF;
}
}
if ((!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) &&
p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements) {
- error_code = IA_ENHAACPLUS_DEC_EXE_NONFATAL_SBR_TURNED_ON;
-
+ WORD32 harmonic_sbr_flag = 0;
+ error_code = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON;
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
sample_rate_dec, frame_size,
(FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
p_state_enhaacplus_dec->sbr_persistent_mem_v,
p_state_enhaacplus_dec->ptr_overlap_buf, ps_enable ? 2 : channel,
- ps_enable, 1, frame_size * 2, NULL, NULL,
+ ps_enable, 1, frame_size * 2, &harmonic_sbr_flag, NULL,
p_state_enhaacplus_dec->str_sbr_config,
p_state_enhaacplus_dec->audio_object_type,
p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
@@ -2951,20 +3308,90 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_state_enhaacplus_dec->sbr_present = 1;
p_state_enhaacplus_dec->peak_lim_init = 0;
+ {
+ WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
+
+ if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
+ WORD32 i = 0;
+ ia_dec_data_struct* pstr_dec_data =
+ (ia_dec_data_struct*)p_state_enhaacplus_dec->pstr_dec_data;
+ if (ch_fac == 1) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ (FLOAT32)time_data[i];
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
+
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
+ } else if (ch_fac == 2) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ (FLOAT32)time_data[2 * i + 0];
+ pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
+ (FLOAT32)time_data[2 * i + 1];
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
+
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
+ } else if (ch_fac > 2) {
+ if (channel == 1) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ (FLOAT32)(time_data + slot_ele)[i* ch_fac];
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
+ } else if (channel == 2) {
+ for (; i < 1024; i++) {
+ pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
+ (FLOAT32)(time_data + slot_ele)[ch_fac * i + 0];
+ pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
+ (FLOAT32)(time_data + slot_ele)[ch_fac * i + 1];
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
+
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
+ &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
+ }
+ }
+ }
+ }
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
+ p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
+ p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
- if (ixheaacd_applysbr(
- p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
- &p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0],
- actual_out_buffer, &num_ch,
- p_obj_exhaacplus_dec->aac_config.frame_status,
- p_obj_exhaacplus_dec->aac_config.down_sample_flag,
- esbr_mono_downmix, &sbr_scratch_struct, ps_enable, ch_fac,
- slot_ele, NULL, &p_state_enhaacplus_dec->str_drc_dec_info,
- p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
- p_state_enhaacplus_dec->audio_object_type, 0,
- p_state_enhaacplus_dec->ldmps_present, frame_size) != SBRDEC_OK) {
+ if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
+ p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
+ &(p_state_enhaacplus_dec->xaac_jmp_buf);
+ }
+
+ if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
+ &p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0],
+ actual_out_buffer, &num_ch,
+ p_obj_exhaacplus_dec->aac_config.frame_status,
+ p_obj_exhaacplus_dec->aac_config.down_sample_flag,
+ esbr_mono_downmix, &sbr_scratch_struct, ps_enable, ch_fac, slot_ele,
+ NULL, &p_state_enhaacplus_dec->str_drc_dec_info,
+ p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
+ p_state_enhaacplus_dec->audio_object_type, 0,
+ p_state_enhaacplus_dec->ldmps_present, frame_size,
+ p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
+ p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
- return -1;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return -1;
+ }
} else {
if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
frame_size = (WORD16)(frame_size * 2);
@@ -2977,18 +3404,49 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_obj_exhaacplus_dec);
}
}
+ {
+ WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
+
+ if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
+ WORD32 out_bytes = 0;
+ ia_dec_data_struct *pstr_dec_data =
+ (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
+ if (ch_fac <= 2) {
+ ixheaacd_samples_sat((WORD8*)time_data, 2048, 16,
+ pstr_dec_data->str_usac_data.time_sample_vector,
+ &out_bytes, ch_fac);
+ } else {
+ ixheaacd_samples_sat_mc((WORD8*)(time_data + slot_ele), 2048,
+ pstr_dec_data->str_usac_data.time_sample_vector,
+ &out_bytes, channel, ch_fac);
+ }
+ }
+ }
p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present =
0;
- } else
- p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present =
- 1;
+ if (p_state_enhaacplus_dec->ui_mps_out_bytes > 0) {
+ p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
+ }
+ } else {
+ p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
}
+ }
if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
.ldmps_present_flag == 1 &&
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1) {
- ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
+ if (p_state_enhaacplus_dec->ec_enable) {
+ if (!p_obj_exhaacplus_dec->aac_config.first_frame) {
+ error_code = ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
+ if (error_code) p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ }
+ } else {
+ error_code = ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
+
+ if (error_code)
+ return error_code;
+ }
}
if (sample_rate < sample_rate_dec) {
sample_rate = sample_rate_dec;
@@ -3004,6 +3462,13 @@ IA_ERRORCODE ixheaacd_dec_execute(
MIN((WORD16)p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, frame_size);
}
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
+ p_obj_exhaacplus_dec->aac_config.first_frame &&
+ (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_ER_AAC_ELD ||
+ p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_ER_AAC_LD)) {
+ num_of_out_samples = frame_size;
+ }
+
p_obj_exhaacplus_dec->aac_config.ui_samp_freq = sample_rate;
p_state_enhaacplus_dec->num_channel_last = num_ch;
@@ -3013,19 +3478,24 @@ IA_ERRORCODE ixheaacd_dec_execute(
.ldmps_present_flag == 1 &&
p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1 &&
p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
- ixheaacd_samples_sat(
- (WORD8 *)actual_out_buffer, num_of_out_samples,
- p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz,
- p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer,
- &mps_out_samples, 2);
+ if (p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer) {
+ ixheaacd_samples_sat((WORD8 *)actual_out_buffer, num_of_out_samples,
+ p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz,
+ p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer,
+ &mps_out_samples, 2);
+ p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = mps_out_samples;
+ }
num_ch = p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.out_ch_count;
- p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = mps_out_samples;
+ if (p_state_enhaacplus_dec->ec_enable) {
+ if (p_obj_exhaacplus_dec->aac_config.first_frame) {
+ p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
+ p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
+ }
+ }
} else {
if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] != 2) {
if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1 &&
- channel == 1 && total_elements == 1 && num_ch == 1 &&
- (!p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
- .ldmps_present_flag)) {
+ channel == 1 && total_elements == 1 && num_ch == 1) {
num_ch = 2;
p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 1;
@@ -3033,7 +3503,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 0;
}
- p_obj_exhaacplus_dec->aac_config.ui_n_channels = num_ch;
+ p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
@@ -3044,8 +3514,8 @@ IA_ERRORCODE ixheaacd_dec_execute(
}
if (p_state_enhaacplus_dec->sbr_present && total_channels > 2) {
- for (int j = 0; j < channel; j++) {
- for (int i = 0; i < frame_size; i++) {
+ for (WORD32 j = 0; j < channel; j++) {
+ for (WORD32 i = 0; i < frame_size; i++) {
intermediate_scr[total_channels * i + j +
p_state_enhaacplus_dec->slot_pos] =
actual_out_buffer[total_channels * i + j +
@@ -3065,7 +3535,13 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_state_enhaacplus_dec->ptr_bit_stream->pstr_adts_crc_info;
if (ptr_adts_crc_info->crc_active == 1) {
if ((error_code = ixheaacd_adts_crc_check_crc(ptr_adts_crc_info))) {
- return error_code;
+ if (error_code) {
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ p_obj_exhaacplus_dec->aac_config.frame_status = 0;
+ } else {
+ return error_code;
+ }
+ }
}
}
}
@@ -3109,9 +3585,15 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (!p_state_enhaacplus_dec->sbr_present &&
p_obj_exhaacplus_dec->p_state_aac->peak_lim_init == 1 &&
p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ) {
- ixheaacd_peak_limiter_process(
- &p_state_enhaacplus_dec->peak_limiter, time_data, frame_size,
- p_obj_exhaacplus_dec->p_state_aac->qshift_adj);
+ if (!p_obj_exhaacplus_dec->aac_config.peak_limiter_off) {
+ ixheaacd_peak_limiter_process(
+ &p_state_enhaacplus_dec->peak_limiter, time_data, frame_size,
+ p_obj_exhaacplus_dec->p_state_aac->qshift_adj);
+ } else {
+ ixheaacd_scale_adjust(time_data, frame_size,
+ p_obj_exhaacplus_dec->p_state_aac->qshift_adj,
+ total_channels);
+ }
for (i = 0; i < frame_size * 2; i++) {
for (j = 0; j < total_channels; j++) {
@@ -3130,7 +3612,32 @@ IA_ERRORCODE ixheaacd_dec_execute(
p_obj_exhaacplus_dec->p_state_aac->delay_in_samples -
MIN(p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, (UWORD16)frame_size);
}
+ if (p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present == 1) {
+ ia_heaac_mps_state_struct *pstr_mps_state =
+ &p_state_enhaacplus_dec->heaac_mps_handle;
+ if (p_state_enhaacplus_dec->sbr_present == 0) {
+ p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
+ } else {
+ p_state_enhaacplus_dec->heaac_mps_handle.mps_with_sbr = 1;
+ }
+ if (p_state_enhaacplus_dec->heaac_mps_handle.mps_init_done == 1) {
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.frame_ok =
+ p_obj_exhaacplus_dec->aac_config.frame_status;
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.ec_flag =
+ p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
+ ixheaacd_heaac_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer,
+ mps_buffer,
+ p_state_enhaacplus_dec->ui_mps_out_bytes);
+
+ p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
+ p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
+ (pstr_mps_state->num_output_channels_at *
+ pstr_mps_state->frame_length *
+ (p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz >> 3));
+ p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.first_frame = 0;
+ }
+ }
if ((total_channels > 2) && (1 == p_obj_exhaacplus_dec->aac_config.downmix)) {
ixheaacd_dec_downmix_to_stereo(p_obj_exhaacplus_dec, num_of_out_samples,
total_elements, time_data, total_channels);
@@ -3167,7 +3674,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (p_state_enhaacplus_dec->s_adts_hdr_present) {
if (adts.no_raw_data_blocks != 0) {
- if (adts.protection_absent == 0) {
+ if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
}
}
@@ -3178,7 +3685,19 @@ IA_ERRORCODE ixheaacd_dec_execute(
if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT)
p_state_enhaacplus_dec->i_bytes_consumed =
- (audio_mux_length_bytes_last + (SIZE_T)bytes_for_sync);
+ (WORD32)(audio_mux_length_bytes_last + bytes_for_sync);
+
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
+ p_obj_exhaacplus_dec->aac_config.first_frame) {
+ p_obj_exhaacplus_dec->aac_config.first_frame = 0;
+ }
- return error_code;
+ if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
+ if (p_obj_exhaacplus_dec->aac_config.frame_status != 1) {
+ p_state_enhaacplus_dec->i_bytes_consumed = p_state_enhaacplus_dec->ui_in_bytes;
+ }
+ return IA_NO_ERROR;
+ } else {
+ return error_code;
+ }
}
diff --git a/decoder/ixheaacd_arith_dec.c b/decoder/ixheaacd_arith_dec.c
index 6c6069c..b44ab64 100644
--- a/decoder/ixheaacd_arith_dec.c
+++ b/decoder/ixheaacd_arith_dec.c
@@ -40,6 +40,8 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
@@ -1742,8 +1744,9 @@ static WORD32 ixheaacd_arith_decode(ia_bit_buf_struct *it_bit_buff,
cumulative = ((((WORD32)(value - low + 1)) << 14) - ((WORD32)1)) / ((WORD32)range);
if (it_bit_buff->cnt_bits == 0)
- if (cumulative <= 0) return -1;
-
+ if (cumulative <= 0) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
p = cum_freq - 1;
do {
@@ -1756,7 +1759,7 @@ static WORD32 ixheaacd_arith_decode(ia_bit_buf_struct *it_bit_buff,
cfl >>= 1;
} while (cfl > 1);
- symbol = p - cum_freq + 1;
+ symbol = (WORD32)(p - cum_freq + 1);
if (symbol) high = low + ((range * cum_freq[symbol - 1]) >> 14) - 1;
@@ -1795,9 +1798,8 @@ static WORD32 ixheaacd_arith_decode(ia_bit_buf_struct *it_bit_buff,
return bit_count;
}
-WORD32 ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff,
- WORD8 *c_prev, WORD8 *c_pres, WORD32 n,
- WORD32 pres_n, WORD32 *quant) {
+VOID ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff, WORD8 *c_prev, WORD8 *c_pres,
+ WORD32 n, WORD32 pres_n, WORD32 *quant) {
state_arith as;
WORD32 a, b;
WORD32 i, j, lev, pki, esc_nb;
@@ -1828,7 +1830,8 @@ WORD32 ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff,
bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
ixheaacd_ari_cf_m[pki], 17);
if (bit_count == -1) {
- return -1;
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
if (m < ARITH_ESCAPE) {
@@ -1858,13 +1861,20 @@ WORD32 ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff,
bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
ixheaacd_ari_cf_r[lsbidx], 4);
if (bit_count == -1) {
- return -1;
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
a = (a << 1) | (m & 1);
b = (b << 1) | ((m >> 1) & 1);
}
- if ((a > (8183)) || (b > (8183))) return -1;
- if ((a < (-8183)) || (b < (-8183))) return -1;
+ if ((a > (8183)) || (b > (8183))) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
+ if ((a < (-8183)) || (b < (-8183))) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
quant[2 * i + 0] = a;
quant[2 * i + 1] = b;
temp = a + b + 1;
@@ -1876,8 +1886,9 @@ WORD32 ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff,
}
bit_count -= 16 - 2;
- if (bit_count > it_bit_buff->cnt_bits)
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ if (bit_count > it_bit_buff->cnt_bits) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
if (bit_count > 0) {
bit_count_5 = bit_count >> 5;
@@ -1903,12 +1914,16 @@ WORD32 ixheaacd_arth_decoding_level2(ia_bit_buf_struct *it_bit_buff,
m = (m << 1) * temp1;
temp1 = m - (temp1);
}
- if ((temp0 > (8183)) || (temp1 > (8183))) return -1;
- if ((temp0 < (-8183)) || (temp1 < (-8183))) return -1;
+ if ((temp0 > (8183)) || (temp1 > (8183))) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
+ if ((temp0 < (-8183)) || (temp1 < (-8183))) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
*quant++ = temp0;
*quant++ = temp1;
}
- return 0;
+ return;
}
static WORD32 ixheaacd_randomsign_fix(UWORD32 *seed) {
@@ -2075,7 +2090,6 @@ WORD32 ixheaacd_ac_spectral_data(ia_usac_data_struct *usac_data,
WORD32 *x_ac_dec = usac_data->x_ac_dec;
WORD32 sbk;
- WORD32 err_code = 0;
const WORD32 max_win_len = usac_data->pstr_sfb_info[ch]->max_win_len;
WORD8 *c_prev = &usac_data->c_prev[ch][0];
@@ -2092,12 +2106,9 @@ WORD32 ixheaacd_ac_spectral_data(ia_usac_data_struct *usac_data,
if (max_spec_coefficients > 0) {
for (sbk = 0; sbk < max_win_len; sbk++) {
- err_code = ixheaacd_arth_decoding_level2(
- it_bit_buff, c_prev + 2, c_pres + 2, max_spec_coefficients / 2,
- arith_pres_n / 2, &x_ac_dec[sbk * arith_pres_n]);
- if (err_code != 0) {
- return err_code;
- }
+ ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2,
+ max_spec_coefficients / 2, arith_pres_n / 2,
+ &x_ac_dec[sbk * arith_pres_n]);
for (i = max_spec_coefficients / 2; i < arith_pres_n / 2; i++) {
x_ac_dec[sbk * arith_pres_n + 2 * i + 0] = 0;
@@ -2116,14 +2127,13 @@ WORD32 ixheaacd_ac_spectral_data(ia_usac_data_struct *usac_data,
return 0;
}
-WORD32 ixheaacd_arith_data(ia_td_frame_data_struct *pstr_td_frame_data,
+VOID ixheaacd_arith_data(ia_td_frame_data_struct *pstr_td_frame_data,
WORD32 *x_ac_dec, ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 first_tcx_flag, WORD32 k) {
WORD32 *arith_prev_n = &usac_data->arith_prev_n[usac_data->present_chan];
WORD32 arith_reset_flag =
first_tcx_flag && pstr_td_frame_data->arith_reset_flag;
- WORD32 err_code = 0;
WORD32 tcx_size = pstr_td_frame_data->tcx_lg[k];
WORD8 *c_prev = usac_data->c_prev[usac_data->present_chan];
WORD8 *c_pres = usac_data->c[usac_data->present_chan];
@@ -2137,9 +2147,8 @@ WORD32 ixheaacd_arith_data(ia_td_frame_data_struct *pstr_td_frame_data,
*arith_prev_n = tcx_size;
- err_code =
- ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2,
- tcx_size / 2, tcx_size / 2, x_ac_dec);
+ ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2, tcx_size / 2, tcx_size / 2,
+ x_ac_dec);
- return err_code;
+ return;
}
diff --git a/decoder/ixheaacd_arith_dec.h b/decoder/ixheaacd_arith_dec.h
index 9c58b06..36b01c8 100644
--- a/decoder/ixheaacd_arith_dec.h
+++ b/decoder/ixheaacd_arith_dec.h
@@ -27,7 +27,7 @@ WORD32 ixheaacd_ac_spectral_data(ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff, UWORD8 max_sfb,
WORD32 reset, WORD32 noise_filling, WORD32 ch);
-WORD32 ixheaacd_arith_data(ia_td_frame_data_struct *pstr_td_frame_data,
+VOID ixheaacd_arith_data(ia_td_frame_data_struct *pstr_td_frame_data,
WORD32 *quant, ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 first_tcx_flag, WORD32 k);
diff --git a/decoder/ixheaacd_basic_op.h b/decoder/ixheaacd_basic_op.h
index d0e4720..7a6f0ff 100644
--- a/decoder/ixheaacd_basic_op.h
+++ b/decoder/ixheaacd_basic_op.h
@@ -24,56 +24,4 @@
#define sub_d(a, b) ((a) - (b))
#define ixheaacd_cbrt_calc(a) cbrt(1.0f / a)
-static PLATFORM_INLINE WORD32 msu32x16in32_dual(WORD32 a, WORD16 c1, WORD32 b,
- WORD16 c2) {
- WORD32 result;
- WORD32 temp_result;
- UWORD32 a_lsb;
- WORD32 a_msb;
- UWORD32 b_lsb;
- WORD32 b_msb;
-
- a_lsb = a & 65535;
- a_msb = a >> 16;
-
- b_lsb = b & 65535;
- b_msb = b >> 16;
- temp_result = ((UWORD32)a_lsb * (UWORD32)c1);
- temp_result = temp_result - (UWORD32)b_lsb * (UWORD32)c2;
- temp_result = ((WORD32)temp_result) >> 16;
- result = temp_result + ((a_msb * (WORD32)c1) - (b_msb * (WORD32)c2));
-
- return (result);
-}
-
-static PLATFORM_INLINE WORD32 mac32x16in32_dual(WORD32 a, WORD16 c1, WORD32 b,
- WORD16 c2) {
- WORD32 result;
- WORD32 temp_result;
- UWORD32 a_lsb;
- WORD32 a_msb;
- UWORD32 b_lsb;
- WORD32 b_msb;
-
- a_lsb = a & 65535;
- a_msb = a >> 16;
-
- b_lsb = b & 65535;
- b_msb = b >> 16;
- temp_result = (UWORD32)a_lsb * (UWORD32)c1;
- temp_result = temp_result + (UWORD32)b_lsb * (UWORD32)c2;
- temp_result = ((UWORD32)temp_result) >> 16;
- result = temp_result + ((a_msb * (WORD32)c1)) + ((b_msb * (WORD32)c2));
- return (result);
-}
-
-static PLATFORM_INLINE WORD64 mac32x32in64_dual(WORD32 a, WORD32 b, WORD64 c) {
- WORD64 result;
- WORD64 temp_result;
-
- temp_result = (WORD64)a * (WORD64)b;
- result = c + (temp_result);
- return (result);
-}
-
#endif
diff --git a/decoder/ixheaacd_basic_ops16.h b/decoder/ixheaacd_basic_ops16.h
index 4ccc336..1503d31 100644
--- a/decoder/ixheaacd_basic_ops16.h
+++ b/decoder/ixheaacd_basic_ops16.h
@@ -114,7 +114,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_shr16(WORD16 op1, WORD16 shift) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 shl16_dir(WORD16 op1, WORD16 shift) {
+static PLATFORM_INLINE WORD16 ixheaacd_shl16_dir(WORD16 op1, WORD16 shift) {
WORD16 var_out;
if (shift > 0) {
var_out = ixheaacd_shl16(op1, shift);
@@ -124,7 +124,7 @@ static PLATFORM_INLINE WORD16 shl16_dir(WORD16 op1, WORD16 shift) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 shr16_dir(WORD16 op1, WORD16 shift) {
+static PLATFORM_INLINE WORD16 ixheaacd_shr16_dir(WORD16 op1, WORD16 shift) {
WORD16 var_out;
if (shift < 0) {
@@ -135,7 +135,7 @@ static PLATFORM_INLINE WORD16 shr16_dir(WORD16 op1, WORD16 shift) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 shl16_dir_sat(WORD16 op1, WORD16 shift) {
+static PLATFORM_INLINE WORD16 ixheaacd_shl16_dir_sat(WORD16 op1, WORD16 shift) {
WORD16 var_out;
if (shift > 0) {
var_out = ixheaacd_shl16_sat(op1, shift);
@@ -156,7 +156,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_shr16_dir_sat(WORD16 op1, WORD16 shift) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 norm16(WORD16 op1) {
+static PLATFORM_INLINE WORD16 ixheaacd_norm16(WORD16 op1) {
WORD16 var_out;
if (0 == op1) {
@@ -177,13 +177,6 @@ static PLATFORM_INLINE WORD16 norm16(WORD16 op1) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 bin_expo16(WORD16 op1) {
- WORD16 var_out;
-
- var_out = ((WORD16)(15 - norm16(op1)));
- return (var_out);
-}
-
static PLATFORM_INLINE WORD16 ixheaacd_abs16(WORD16 op1) {
WORD16 var_out;
@@ -235,93 +228,6 @@ static PLATFORM_INLINE WORD16 ixheaacd_max16(WORD16 op1, WORD16 op2) {
return (var_out);
}
-static PLATFORM_INLINE WORD16 div16(WORD16 op1, WORD16 op2, WORD16 *q_format) {
- WORD32 quotient;
- UWORD16 mantissa_nr, mantissa_dr;
- WORD16 sign = 0;
-
- LOOPIDX i;
- WORD16 q_nr, q_dr;
-
- mantissa_nr = op1;
- mantissa_dr = op2;
- quotient = 0;
-
- if (op1 < 0 && op2 != 0) {
- op1 = -op1;
- sign = (WORD16)(sign ^ -1);
- }
-
- if (op2 < 0) {
- op2 = -op2;
- sign = (WORD16)(sign ^ -1);
- }
-
- if (op2 == 0) {
- *q_format = 0;
- return (op1);
- }
-
- quotient = 0;
-
- q_nr = norm16(op1);
- mantissa_nr = (UWORD16)op1 << (q_nr);
- q_dr = norm16(op2);
- mantissa_dr = (UWORD16)op2 << (q_dr);
- *q_format = (WORD16)(14 + q_nr - q_dr);
-
- for (i = 0; i < 15; i++) {
- quotient = quotient << 1;
-
- if (mantissa_nr >= mantissa_dr) {
- mantissa_nr = mantissa_nr - mantissa_dr;
- quotient += 1;
- }
-
- mantissa_nr = (UWORD32)mantissa_nr << 1;
- }
-
- if (sign < 0) {
- quotient = -quotient;
- }
-
- return (WORD16)quotient;
-}
-
-static PLATFORM_INLINE WORD16 mac16(WORD16 c, WORD16 op1, WORD16 op2) {
- WORD16 var_out;
-
- var_out = ixheaacd_mult16(op1, op2);
- var_out = ixheaacd_add16(c, var_out);
- return (var_out);
-}
-
-static PLATFORM_INLINE WORD16 mac16_sat(WORD16 c, WORD16 op1, WORD16 op2) {
- WORD16 var_out;
-
- var_out = ixheaacd_mult16(op1, op2);
- var_out = ixheaacd_add16_sat(c, var_out);
- return (var_out);
-}
-
-static PLATFORM_INLINE WORD16 mac16_shl(WORD16 c, WORD16 op1, WORD16 op2) {
- WORD16 var_out;
-
- var_out = ixheaacd_mult16_shl(op1, op2);
- var_out = ixheaacd_add16(c, var_out);
- return (var_out);
-}
-
-static PLATFORM_INLINE WORD16 mac16_shl_sat(WORD16 c, WORD16 op1, WORD16 op2) {
- WORD16 var_out;
- WORD32 temp;
-
- temp = ((WORD32)op1 * (WORD32)op2) >> 15;
- temp += c;
- var_out = ixheaacd_sat16(temp);
- return (var_out);
-}
-
static PLATFORM_INLINE WORD16 ixheaacd_round16(WORD32 op1) {
WORD16 var_out;
diff --git a/decoder/ixheaacd_basic_ops32.h b/decoder/ixheaacd_basic_ops32.h
index f6b0de0..af605f4 100644
--- a/decoder/ixheaacd_basic_ops32.h
+++ b/decoder/ixheaacd_basic_ops32.h
@@ -111,7 +111,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_shr32_dir(WORD32 a, WORD b) {
return out_val;
}
-static PLATFORM_INLINE WORD32 shr32_dir_sat(WORD32 a, WORD b) {
+static PLATFORM_INLINE WORD32 ixheaacd_shr32_dir_sat(WORD32 a, WORD b) {
WORD32 out_val;
if (b < 0) {
@@ -131,6 +131,16 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult16x16in32(WORD16 a, WORD16 b) {
return product;
}
+static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+
+ temp_result = (WORD64)(a) * (WORD64)(b >> 16);
+ result = (WORD32)(temp_result >> 16);
+
+ return (result);
+}
+
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_sat(WORD32 a, WORD16 b) {
WORD32 result;
WORD64 temp_result;
@@ -260,14 +270,6 @@ static PLATFORM_INLINE WORD ixheaacd_pnorm32(WORD32 a) {
return norm_val;
}
-static PLATFORM_INLINE WORD bin_expo32(WORD32 a) {
- WORD bin_expo_val;
-
- bin_expo_val = 31 - ixheaacd_norm32(a);
-
- return bin_expo_val;
-}
-
static PLATFORM_INLINE WORD32 ixheaacd_abs32(WORD32 a) {
WORD32 abs_val;
@@ -325,7 +327,8 @@ static PLATFORM_INLINE WORD32 ixheaacd_negate32_sat(WORD32 a) {
return neg_val;
}
-static PLATFORM_INLINE WORD32 div32(WORD32 a, WORD32 b, WORD *q_format) {
+static PLATFORM_INLINE WORD32 ixheaacd_div32(WORD32 a, WORD32 b,
+ WORD *q_format) {
WORD32 quotient;
UWORD32 mantissa_nr, mantissa_dr;
WORD16 sign = 0;
@@ -378,23 +381,34 @@ static PLATFORM_INLINE WORD32 div32(WORD32 a, WORD32 b, WORD *q_format) {
return quotient;
}
-static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_sat(WORD32 a, WORD16 b,
- WORD16 c) {
- WORD32 acc;
-
- acc = ixheaacd_mult16x16in32(b, c);
+static PLATFORM_INLINE WORD32 ixheaacd_shr32_sat(WORD32 a, WORD32 b) {
+ WORD32 out_val;
- acc = ixheaacd_add32_sat(a, acc);
+ b = ((UWORD32)(b << 24) >> 24);
+ if (b >= 31) {
+ if (a < 0)
+ out_val = -1;
+ else
+ out_val = 0;
+ }
+ else if (b <= 0) {
+ return a;
+ }
+ else {
+ a = ixheaacd_add32_sat(a, (1 << (b - 1)));
+ out_val = (WORD32)a >> b;
+ }
- return acc;
+ return out_val;
}
-static PLATFORM_INLINE WORD32 mac16x16hin32(WORD32 a, WORD32 b, WORD32 c) {
+static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_sat(WORD32 a, WORD16 b,
+ WORD16 c) {
WORD32 acc;
- acc = ixheaacd_mult16x16in32((WORD16)b, (WORD16)(c >> 16));
+ acc = ixheaacd_mult16x16in32(b, c);
- acc = ixheaacd_add32(a, acc);
+ acc = ixheaacd_add32_sat(a, acc);
return acc;
}
@@ -421,7 +435,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_shl_sat(WORD32 a, WORD16 b,
return acc;
}
-static PLATFORM_INLINE WORD32 msu16x16in32(WORD32 a, WORD16 b, WORD16 c) {
+static PLATFORM_INLINE WORD32 ixheaacd_msu16x16in32(WORD32 a, WORD16 b, WORD16 c) {
WORD32 acc;
acc = ixheaacd_mult16x16in32(b, c);
@@ -431,46 +445,4 @@ static PLATFORM_INLINE WORD32 msu16x16in32(WORD32 a, WORD16 b, WORD16 c) {
return acc;
}
-static PLATFORM_INLINE WORD32 msu16x16in32_shl(WORD32 a, WORD16 b, WORD16 c) {
- WORD32 acc;
-
- acc = ixheaacd_mult16x16in32_shl(b, c);
-
- acc = ixheaacd_sub32(a, acc);
-
- return acc;
-}
-
-static PLATFORM_INLINE WORD32 msu16x16in32_shl_sat(WORD32 a, WORD16 b,
- WORD16 c) {
- WORD32 acc;
-
- acc = ixheaacd_mult16x16in32_shl_sat(b, c);
-
- acc = ixheaacd_sub32_sat(a, acc);
-
- return acc;
-}
-
-static PLATFORM_INLINE WORD32 add32_shr(WORD32 a, WORD32 b) {
- WORD32 sum;
-
- a = ixheaacd_shr32(a, 1);
- b = ixheaacd_shr32(b, 1);
-
- sum = ixheaacd_add32(a, b);
-
- return sum;
-}
-
-static PLATFORM_INLINE WORD32 sub32_shr(WORD32 a, WORD32 b) {
- WORD32 diff;
-
- a = ixheaacd_shr32(a, 1);
- b = ixheaacd_shr32(b, 1);
-
- diff = ixheaacd_sub32(a, b);
-
- return diff;
-}
-#endif \ No newline at end of file
+#endif
diff --git a/decoder/ixheaacd_basic_ops40.h b/decoder/ixheaacd_basic_ops40.h
index ae684fb..e78b8e1 100644
--- a/decoder/ixheaacd_basic_ops40.h
+++ b/decoder/ixheaacd_basic_ops40.h
@@ -19,47 +19,6 @@
*/
#ifndef IXHEAACD_BASIC_OPS40_H
#define IXHEAACD_BASIC_OPS40_H
-#define lo64(a) (((unsigned *)&a)[0])
-#define hi64(a) (((WORD32 *)&a)[1])
-
-static PLATFORM_INLINE WORD16 norm40(WORD40 *in) {
- WORD16 expo;
- WORD32 tempo;
-
- if (0 == (*in)) return 31;
-
- if (((*in) <= 0x7fffffff) && ((WORD40)(*in) >= (WORD40)0xFFFFFFFF80000000)) {
- tempo = (WORD32)(*in);
- expo = ixheaacd_norm32(tempo);
- *in = tempo << expo;
-
- return (expo);
- }
-
- tempo = (WORD32)((*in) >> 31);
- expo = 31 - (ixheaacd_norm32(tempo));
- *in = (*in) >> expo;
-
- return (-expo);
-}
-
-static PLATFORM_INLINE WORD32 add32_shr40(WORD32 a, WORD32 b) {
- WORD40 sum;
-
- sum = (WORD40)a + (WORD40)b;
- sum = sum >> 1;
-
- return ((WORD32)sum);
-}
-
-static PLATFORM_INLINE WORD32 sub32_shr40(WORD32 a, WORD32 b) {
- WORD40 sum;
-
- sum = (WORD40)a - (WORD40)b;
- sum = sum >> 1;
-
- return ((WORD32)sum);
-}
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_shl(WORD32 a, WORD16 b) {
WORD32 result;
@@ -72,16 +31,6 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_shl(WORD32 a, WORD16 b) {
return (result << 1);
}
-static PLATFORM_INLINE WORD32 mult32x32hin32_shl(WORD32 a, WORD32 b) {
- WORD32 product;
- WORD64 temp_product;
-
- temp_product = (WORD64)a * (WORD64)(b >> 16);
- product = (WORD32)(temp_product >> 16);
-
- return (product << 1);
-}
-
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32(WORD32 a, WORD16 b) {
WORD32 result;
WORD64 temp_result;
@@ -167,128 +116,22 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl(WORD32 a, WORD32 b,
return (result);
}
-static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl_sat(WORD32 a, WORD32 b,
- WORD16 c) {
- return (ixheaacd_add32_sat(a, ixheaacd_mult32x16in32_shl_sat(b, c)));
-}
-
-static PLATFORM_INLINE WORD32 ixheaacd_mac32(WORD32 a, WORD32 b, WORD32 c) {
- WORD32 result;
-
- result = a + ixheaacd_mult32(b, c);
-
- return (result);
-}
-
-static PLATFORM_INLINE WORD32 mac32_shl(WORD32 a, WORD32 b, WORD32 c) {
- WORD32 result;
-
- result = a + ixheaacd_mult32_shl(b, c);
-
- return (result);
-}
-
-static PLATFORM_INLINE WORD32 mac32_shl_sat(WORD32 a, WORD32 b, WORD32 c) {
- return (ixheaacd_add32_sat(a, ixheaacd_mult32_shl_sat(b, c)));
-}
-
-static PLATFORM_INLINE WORD32 msu32x16in32(WORD32 a, WORD32 b, WORD16 c) {
- WORD32 result;
-
- result = a - ixheaacd_mult32x16in32(b, c);
-
- return (result);
-}
-
-static PLATFORM_INLINE WORD32 msu32x16in32_shl(WORD32 a, WORD32 b, WORD16 c) {
+static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
WORD32 result;
- result = a - ixheaacd_mult32x16in32_shl(b, c);
+ result = ixheaacd_add32_sat(a, ixheaacd_mult32x16in32_shl_sat(b, c));
return (result);
}
-static PLATFORM_INLINE WORD32 msu32x16in32_shl_sat(WORD32 a, WORD32 b,
- WORD16 c) {
- return (ixheaacd_sub32_sat(a, ixheaacd_mult32x16in32_shl_sat(b, c)));
-}
-
-static PLATFORM_INLINE WORD32 msu32(WORD32 a, WORD32 b, WORD32 c) {
- WORD32 result;
-
- result = a - ixheaacd_mult32(b, c);
-
- return (result);
-}
-
-static PLATFORM_INLINE WORD32 msu32_shl(WORD32 a, WORD32 b, WORD32 c) {
+static PLATFORM_INLINE WORD32 ixheaacd_mac32(WORD32 a, WORD32 b, WORD32 c) {
WORD32 result;
- result = a - ixheaacd_mult32_shl(b, c);
+ result = a + ixheaacd_mult32(b, c);
return (result);
}
-static PLATFORM_INLINE WORD32 msu32_shl_sat(WORD32 a, WORD32 b, WORD32 c) {
- return (ixheaacd_sub32_sat(a, ixheaacd_mult32_shl_sat(b, c)));
-}
-
-static PLATFORM_INLINE WORD32 mac3216_arr40(WORD32 *x, WORD16 *y,
- LOOPINDEX length, WORD16 *q_val) {
- LOOPINDEX i;
- WORD40 sum = 0;
-
- for (i = 0; i < length; i++) {
- sum += (WORD40)(ixheaacd_mult32x16in32(x[i], y[i]));
- }
-
- *q_val = norm40(&sum);
-
- return (WORD32)sum;
-}
-
-static PLATFORM_INLINE WORD32 mac32_arr40(WORD32 *x, WORD32 *y,
- LOOPINDEX length, WORD16 *q_val) {
- LOOPINDEX i;
- WORD40 sum = 0;
-
- for (i = 0; i < length; i++) {
- sum += (WORD40)(ixheaacd_mult32(x[i], y[i]));
- }
-
- *q_val = norm40(&sum);
-
- return ((WORD32)sum);
-}
-
-static PLATFORM_INLINE WORD32 mac16_arr40(WORD16 *x, WORD16 *y,
- LOOPINDEX length, WORD16 *q_val) {
- LOOPINDEX i;
- WORD40 sum = 0;
-
- for (i = 0; i < length; i++) {
- sum += (WORD40)((WORD32)x[i] * (WORD32)y[i]);
- }
-
- *q_val = norm40(&sum);
-
- return ((WORD32)sum);
-}
-
-static PLATFORM_INLINE WORD32 add32_arr40(WORD32 *in_arr, LOOPINDEX length,
- WORD16 *q_val) {
- LOOPINDEX i;
- WORD40 sum = 0;
-
- for (i = 0; i < length; i++) {
- sum += (WORD40)in_arr[i];
- }
-
- *q_val = norm40(&sum);
-
- return ((WORD32)sum);
-}
-
static PLATFORM_INLINE WORD64 ixheaacd_mult32x32in64(WORD32 a, WORD32 b) {
WORD64 result;
@@ -362,9 +205,9 @@ static PLATFORM_INLINE WORD32 ixheaacd_sat64_32(WORD64 a) {
result = MAX_32;
} else if (a <= MIN_32) {
result = MIN_32;
- } else
+ } else {
result = (WORD32)a;
-
+ }
return (result);
}
@@ -407,4 +250,14 @@ static PLATFORM_INLINE WORD32 ixheaacd_mul32_sh(WORD32 a, WORD32 b,
return (result);
}
+static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32_shl(WORD32 a, WORD32 b) {
+ WORD32 product;
+ WORD64 temp_product;
+
+ temp_product = (WORD64)a * (WORD64)(b >> 16);
+ product = (WORD32)(temp_product >> 16);
+
+ return (product << 1);
+}
+
#endif
diff --git a/decoder/ixheaacd_basic_ops_arr.h b/decoder/ixheaacd_basic_ops_arr.h
index 2002501..69108a8 100644
--- a/decoder/ixheaacd_basic_ops_arr.h
+++ b/decoder/ixheaacd_basic_ops_arr.h
@@ -39,7 +39,7 @@ static PLATFORM_INLINE WORD16 norm16_arr(WORD16 *word16_arr, WORD32 n) {
max_bits = max_bits | ixheaacd_abs16_sat(word16_arr[i]);
}
- return (norm16(max_bits));
+ return (ixheaacd_norm16(max_bits));
}
static PLATFORM_INLINE VOID shl32_arr(WORD32 *word32_arr, WORD16 shift,
@@ -103,7 +103,7 @@ static PLATFORM_INLINE VOID shr32_arr_dir_sat(WORD32 *word32_arr, WORD16 shift,
WORD32 i;
for (i = 0; i < n; i++) {
- word32_arr[i] = shr32_dir_sat(word32_arr[i], shift);
+ word32_arr[i] = ixheaacd_shr32_dir_sat(word32_arr[i], shift);
}
return;
@@ -149,7 +149,7 @@ static PLATFORM_INLINE VOID shl16_arr_dir(WORD16 *word16_arr, WORD16 shift,
WORD32 i;
for (i = 0; i < n; i++) {
- word16_arr[i] = shl16_dir(word16_arr[i], shift);
+ word16_arr[i] = ixheaacd_shl16_dir(word16_arr[i], shift);
}
return;
@@ -160,7 +160,7 @@ static PLATFORM_INLINE VOID shr16_arr_dir(WORD16 *word16_arr, WORD16 shift,
WORD32 i;
for (i = 0; i < n; i++) {
- word16_arr[i] = shr16_dir(word16_arr[i], shift);
+ word16_arr[i] = ixheaacd_shr16_dir(word16_arr[i], shift);
}
return;
@@ -171,7 +171,7 @@ static PLATFORM_INLINE VOID shl16_arr_dir_sat(WORD16 *word16_arr, WORD16 shift,
WORD32 i;
for (i = 0; i < n; i++) {
- word16_arr[i] = shl16_dir_sat(word16_arr[i], shift);
+ word16_arr[i] = ixheaacd_shl16_dir_sat(word16_arr[i], shift);
}
return;
diff --git a/decoder/ixheaacd_bit_extract.h b/decoder/ixheaacd_bit_extract.h
index 44fb4d2..7a7fd6e 100644
--- a/decoder/ixheaacd_bit_extract.h
+++ b/decoder/ixheaacd_bit_extract.h
@@ -54,12 +54,6 @@ WORD32 ixheaacd_core_coder_data(WORD32 id, ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 nr_core_coder_channels);
-VOID usac_past_tw(ia_usac_data_struct *usac_data, WORD32 mod0, WORD32 i,
- ia_usac_lpd_decoder_handle st);
-
-VOID usac_td2buffer(FLOAT32 p_in_data[], ia_usac_data_struct *usac_data,
- WORD32 k, WORD32 mod0);
-
WORD32 ixheaacd_lpd_channel_stream(ia_usac_data_struct *usac_data,
ia_td_frame_data_struct *pstr_td_frame_data,
ia_bit_buf_struct *it_bit_buff,
@@ -69,7 +63,7 @@ VOID ixheaacd_acelp_decoding(WORD32 k, ia_usac_data_struct *usac_data,
ia_td_frame_data_struct *pstr_td_frame_data,
ia_bit_buf_struct *it_bit_buff, WORD32 chan);
-IA_ERRORCODE ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, WORD32 *quant,
+VOID ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, WORD32 *quant,
WORD32 k, WORD32 first_tcx_flag,
ia_td_frame_data_struct *pstr_td_frame_data,
ia_bit_buf_struct *it_bit_buff);
diff --git a/decoder/ixheaacd_bitbuffer.c b/decoder/ixheaacd_bitbuffer.c
index 8b203d4..d76317f 100644
--- a/decoder/ixheaacd_bitbuffer.c
+++ b/decoder/ixheaacd_bitbuffer.c
@@ -53,7 +53,7 @@ WORD32 ixheaacd_skip_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0)
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
it_bit_buff->cnt_bits -= no_of_bits;
ptr_read_next += no_of_bits / 8;
@@ -81,7 +81,7 @@ WORD32 ixheaacd_show_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
no_of_bits > 25) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
ret_val = (UWORD32)*ptr_read_next;
@@ -119,7 +119,7 @@ WORD32 ixheaacd_read_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
no_of_bits > 25) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->cnt_bits -= no_of_bits;
@@ -217,7 +217,7 @@ WORD32 ixheaacd_aac_read_bit(ia_bit_buf_struct *it_bit_buff) {
if (ptr_read_next < it_bit_buff->ptr_bit_buf_base) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->cnt_bits += no_of_bits;
@@ -240,7 +240,7 @@ WORD32 ixheaacd_aac_read_bit_rev(ia_bit_buf_struct *it_bit_buff) {
if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
if (bit_pos >= 8) {
diff --git a/decoder/ixheaacd_bitbuffer.h b/decoder/ixheaacd_bitbuffer.h
index f3a23b6..089bed0 100644
--- a/decoder/ixheaacd_bitbuffer.h
+++ b/decoder/ixheaacd_bitbuffer.h
@@ -89,8 +89,6 @@ typedef struct ia_bit_buf_struct {
} ia_bit_buf_struct;
-typedef struct ia_bit_buf_struct *ia_handle_bit_buf_struct;
-
typedef struct ia_crc_bit_buf_struct *ia_crc_bit_buf_struct_handle;
VOID ixheaacd_byte_align(ia_bit_buf_struct *it_bit_buff,
diff --git a/decoder/ixheaacd_block.c b/decoder/ixheaacd_block.c
index 18df3ce..07aec63 100644
--- a/decoder/ixheaacd_block.c
+++ b/decoder/ixheaacd_block.c
@@ -39,6 +39,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -56,25 +59,6 @@
#include "ixheaacd_aacdec.h"
-static PLATFORM_INLINE WORD32 ixheaacd_shr32_drc(WORD32 a, WORD32 b) {
- WORD32 out_val;
-
- b = ((UWORD32)(b << 24) >> 24);
- if (b == 0) {
- out_val = a;
- } else if (b >= 31) {
- if (a < 0)
- out_val = -1;
- else
- out_val = 0;
- } else {
- a += (1 << (b - 1));
- out_val = (WORD32)a >> b;
- }
-
- return out_val;
-}
-
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_sat(WORD32 a, WORD32 b,
WORD16 c) {
WORD32 acc;
@@ -301,12 +285,9 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word1(
idx -= 2;
} while (idx != 0);
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
spec_coef += (maximum_bins_short - offsets[1]);
- }
- else
- {
+ } else {
spec_coef += (MAX_BINS_SHORT - offsets[1]);
}
@@ -315,12 +296,9 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word1(
offsets++;
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
spec_coef -= (maximum_bins_short * group_len);
- }
- else
- {
+ } else {
spec_coef -= (MAX_BINS_SHORT * group_len);
}
@@ -625,12 +603,9 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_quad(
idx -= 4;
} while (idx != 0);
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
spec_coef += (maximum_bins_short - offsets[1]);
- }
- else
- {
+ } else {
spec_coef += (MAX_BINS_SHORT - offsets[1]);
}
@@ -816,9 +791,7 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_pair(
ia_bit_buf_struct *it_bit_buff, WORD32 *spec_coef, WORD16 *offsets,
WORD no_bands, WORD group_len, const UWORD16 *code_book_tbl,
WORD32 *ixheaacd_pow_table_Q13, WORD32 tbl_sign, const UWORD32 *idx_table,
- WORD32 huff_mode, WORD32 maximum_bins_short)
-
-{
+ WORD32 huff_mode, WORD32 maximum_bins_short) {
WORD idx, grp_idx;
WORD len_idx;
WORD16 index, length;
@@ -1076,8 +1049,8 @@ WORD ixheaacd_decode_huffman(ia_bit_buf_struct *it_bit_buff, WORD32 cb_no,
{
WORD bits_cons;
- bits_cons = ((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
- (it_bit_buff->bit_pos - start_bit_pos);
+ bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
+ (it_bit_buff->bit_pos - start_bit_pos));
it_bit_buff->cnt_bits -= bits_cons;
}
return ret_val;
@@ -1131,11 +1104,11 @@ WORD ixheaacd_huffman_dec_word2(ia_bit_buf_struct *it_bit_buff, WORD32 cb_no,
{
WORD bits_cons;
if (it_bit_buff->bit_pos <= 7) {
- bits_cons = ((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
- (it_bit_buff->bit_pos - start_bit_pos);
+ bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
+ (it_bit_buff->bit_pos - start_bit_pos));
if (bits_cons > cnt_bits)
{
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
}
it_bit_buff->cnt_bits = cnt_bits - bits_cons;
} else {
@@ -1144,11 +1117,11 @@ WORD ixheaacd_huffman_dec_word2(ia_bit_buf_struct *it_bit_buff, WORD32 cb_no,
if ((SIZE_T)(it_bit_buff->ptr_read_next) > (SIZE_T)(it_bit_buff->ptr_bit_buf_end + 1))
{
it_bit_buff->ptr_read_next = it_bit_buff->ptr_bit_buf_end + 1;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
}
- bits_cons = ((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
- ((it_bit_buff->bit_pos - start_bit_pos));
+ bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
+ (it_bit_buff->bit_pos - start_bit_pos));
it_bit_buff->cnt_bits = cnt_bits - bits_cons;
}
}
@@ -1206,7 +1179,7 @@ VOID ixheaacd_lap1_512_480(WORD32 *coef, WORD32 *prev, VOID *out_tmp,
accu = ixheaacd_sub32_sat(
ixheaacd_shl32_dir_sat_limit(
- ixheaacd_mult32_shl(ixheaacd_negate32(coeff), win2), q_shift),
+ ixheaacd_mult32_shl(ixheaacd_negate32_sat(coeff), win2), q_shift),
ixheaacd_mac32x16in32_shl(rounding_fac, win1, (WORD16)(prev_data)));
accu = ixheaacd_add32_sat(accu, accu);
@@ -1254,7 +1227,7 @@ VOID ixheaacd_over_lap_add2_dec(WORD32 *coef, WORD32 *prev, WORD32 *out,
accu = ixheaacd_sub32_sat(
ixheaacd_mult32x16in32(coef[size + i], window[2 * i]),
ixheaacd_mult32x16in32(prev[size - 1 - i], window[2 * i + 1]));
- out[ch_fac * i] = ixheaacd_shr32_drc(accu, 16 - (q_shift + 1));
+ out[ch_fac * i] = ixheaacd_shr32_sat(accu, 16 - (q_shift + 1));
}
for (i = 0; i < size; i++) {
@@ -1262,7 +1235,7 @@ VOID ixheaacd_over_lap_add2_dec(WORD32 *coef, WORD32 *prev, WORD32 *out,
ixheaacd_mult32x16in32(ixheaacd_negate32_sat(coef[size * 2 - 1 - i]),
window[2 * size - 2 * i - 1]),
ixheaacd_mult32x16in32(prev[i], window[2 * size - 2 * i - 2]));
- out[ch_fac * (i + size)] = ixheaacd_shr32_drc(accu, 16 - (q_shift + 1));
+ out[ch_fac * (i + size)] = ixheaacd_shr32_sat(accu, 16 - (q_shift + 1));
}
}
diff --git a/decoder/ixheaacd_channel.c b/decoder/ixheaacd_channel.c
index 10e9a1b..6f0a8df 100644
--- a/decoder/ixheaacd_channel.c
+++ b/decoder/ixheaacd_channel.c
@@ -37,9 +37,10 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -76,6 +77,10 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_adts_crc_check.h"
@@ -167,7 +172,7 @@ void ixheaacd_cblock_scale_spect_data(
(*ixheaacd_scale_factor_process)(
&ptr_spect_coeff[0], &ptr_scale_fac[0], tot_bands,
(WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
- object_type, aac_sf_data_resil_flag);
+ object_type, aac_sf_data_resil_flag);
ptr_spect_coeff += MAX_BINS_SHORT;
}
@@ -186,7 +191,7 @@ WORD32 ixheaacd_read_pulse_data(ia_bit_buf_struct *it_bit_buff,
ptr_pulse_info->pulse_start_band = value & 0x3F;
if (ptr_pulse_info->pulse_start_band >= 52) {
- return (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
+ return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
}
total_offset = ptr_aac_tables->str_aac_sfb_info[0]
@@ -199,7 +204,7 @@ WORD32 ixheaacd_read_pulse_data(ia_bit_buf_struct *it_bit_buff,
total_offset += ptr_pulse_info->pulse_offset[i];
if (total_offset >= 1024) {
- error_code = (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
+ error_code = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
}
}
@@ -273,7 +278,7 @@ static IA_ERRORCODE ixheaacd_read_block_data(
if (gain_control_data_present) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT);
}
}
@@ -389,7 +394,7 @@ WORD16 ixheaacd_ics_read(ia_bit_buf_struct *it_bit_buff,
if ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)) {
if (value & 1) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT);
}
} else {
@@ -467,7 +472,7 @@ WORD16 ixheaacd_ics_read(ia_bit_buf_struct *it_bit_buff,
}
if (ptr_ics_info->max_sfb > ptr_ics_info->num_swb_window) {
- return (WORD16)IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
+ return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
}
return AAC_DEC_OK;
@@ -510,7 +515,7 @@ WORD16 ixheaacd_individual_ch_stream(
if (error_code) {
if (it_bit_buff->cnt_bits < 0) {
error_code = (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
return error_code;
}
@@ -526,7 +531,7 @@ WORD16 ixheaacd_individual_ch_stream(
if (error_code) {
if (it_bit_buff->cnt_bits < 0) {
error_code = (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
return error_code;
@@ -809,7 +814,7 @@ IA_ERRORCODE ixheaacd_read_spectral_data(
if (ret_val != 0) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
}
}
@@ -872,7 +877,7 @@ IA_ERRORCODE ixheaacd_read_spectral_data(
if (ret_val != 0) {
return (WORD16)(
(WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
+ IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
}
}
}
@@ -921,7 +926,7 @@ IA_ERRORCODE ixheaacd_read_spectral_data(
pstr_hcr_info, ptr_aac_dec_channel_info, ptr_aac_tables, it_bit_buff);
if (error != 0) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
}
error = ixheaacd_hcr_decoder(pstr_hcr_info, ptr_aac_dec_channel_info,
ptr_aac_tables, it_bit_buff);
@@ -933,7 +938,7 @@ IA_ERRORCODE ixheaacd_read_spectral_data(
if (it_bit_buff->cnt_bits <
ptr_aac_dec_channel_info->reorder_spect_data_len) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->cnt_bits +=
@@ -1010,14 +1015,14 @@ WORD16 ixheaacd_read_tns_data(
if (filter->start_band < 0) {
filter->order = -1;
- return (WORD16)((WORD32)IA_ENHAACPLUS_DEC_EXE_FATAL_TNS_RANGE_ERROR);
+ return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR);
}
filter->order = order = ixheaacd_read_bits_buf(it_bit_buff, order_bits);
if ((order - MAX_ORDER_LONG) > 0) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_TNS_ORDER_ERROR);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR);
}
if (order) {
@@ -1060,7 +1065,7 @@ WORD32 ixheaacd_inv_quant(WORD32 *px_quant, WORD32 *ixheaacd_pow_table_Q13)
q_abs = *px_quant;
if (q_abs > (8191 + 32))
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
if (q_abs < 1024) {
shift = 3;
@@ -1173,30 +1178,30 @@ void ixheaacd_init_ltp_object(ltp_info *ltp) {
}
WORD32 ixheaacd_ltp_data(WORD32 object_type, ia_ics_info_struct *ics,
- ltp_info *ltp, ia_handle_bit_buf_struct bs,
+ ltp_info *ltp, ia_bit_buf_struct *it_bit_buf,
WORD32 frame_len) {
UWORD8 sfb, w;
if (object_type == AOT_ER_AAC_LD) {
- ltp->lag_update = ixheaacd_read_bits_buf(bs, 1);
+ ltp->lag_update = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (ltp->lag_update) {
- ltp->lag = (UWORD16)ixheaacd_read_bits_buf(bs, 10);
+ ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 10);
}
} else {
- ltp->lag = (UWORD16)ixheaacd_read_bits_buf(bs, 11);
+ ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 11);
}
if (ltp->lag > (frame_len << 1)) return -1;
- ltp->coef = (UWORD8)ixheaacd_read_bits_buf(bs, 3);
+ ltp->coef = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 3);
if (ics->window_sequence == EIGHT_SHORT_SEQUENCE) {
for (w = 0; w < 8; w++) {
- if ((ltp->short_used[w] = ixheaacd_read_bits_buf(bs, 1)) & 1) {
- ltp->short_lag_present[w] = ixheaacd_read_bits_buf(bs, 1);
+ if ((ltp->short_used[w] = ixheaacd_read_bits_buf(it_bit_buf, 1)) & 1) {
+ ltp->short_lag_present[w] = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (ltp->short_lag_present[w]) {
- ltp->short_lag[w] = (UWORD8)ixheaacd_read_bits_buf(bs, 4);
+ ltp->short_lag[w] = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 4);
}
}
}
@@ -1204,7 +1209,7 @@ WORD32 ixheaacd_ltp_data(WORD32 object_type, ia_ics_info_struct *ics,
ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
for (sfb = 0; sfb < ltp->last_band; sfb++) {
- ltp->long_used[sfb] = ixheaacd_read_bits_buf(bs, 1);
+ ltp->long_used[sfb] = ixheaacd_read_bits_buf(it_bit_buf, 1);
}
}
if (ics->frame_length == 480) {
diff --git a/decoder/ixheaacd_channel.h b/decoder/ixheaacd_channel.h
index 47b740a..d223e09 100644
--- a/decoder/ixheaacd_channel.h
+++ b/decoder/ixheaacd_channel.h
@@ -52,7 +52,9 @@ VOID ixheaacd_map_ms_mask_pns(
VOID ixheaacd_read_fill_element(ia_bit_buf_struct *it_bit_buff,
ia_drc_dec_struct *drc_dummy,
- ia_drc_dec_struct *pstr_drc_dec);
+ ia_drc_dec_struct *pstr_drc_dec,
+ UWORD8 *mps_buffer, WORD32 *mps_header,
+ WORD32 *mps_bytes);
VOID ixheaacd_read_data_stream_element(ia_bit_buf_struct *it_bit_buff,
WORD32 *byte_align_bits,
diff --git a/decoder/ixheaacd_channelinfo.h b/decoder/ixheaacd_channelinfo.h
index 4cf1216..f17d26a 100644
--- a/decoder/ixheaacd_channelinfo.h
+++ b/decoder/ixheaacd_channelinfo.h
@@ -293,7 +293,7 @@ typedef struct {
WORD16 *ltp_buf;
UWORD16 ltp_lag;
-
+ ia_ec_state_str str_ec_state;
} ia_aac_dec_channel_info;
typedef struct {
diff --git a/decoder/ixheaacd_cnst.h b/decoder/ixheaacd_cnst.h
index cee0a58..a83f48e 100644
--- a/decoder/ixheaacd_cnst.h
+++ b/decoder/ixheaacd_cnst.h
@@ -95,6 +95,7 @@
#define NUM_TW_NODES 16
#define CORE_MODE_FD 0
+#define CORE_MODE_LPD 1
#define ONLY_LONG_SEQUENCE 0
#define LONG_START_SEQUENCE 1
diff --git a/decoder/ixheaacd_common_initfuncs.c b/decoder/ixheaacd_common_initfuncs.c
index a10783d..f3d2ae6 100644
--- a/decoder/ixheaacd_common_initfuncs.c
+++ b/decoder/ixheaacd_common_initfuncs.c
@@ -35,6 +35,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -71,6 +74,10 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_headerdecode.h"
@@ -165,7 +172,7 @@ VOID ixheaacd_read_bidirection(ia_bit_buf_struct *it_bit_buff,
(it_bit_buff->cnt_bits - ixheaacd_drc_offset < 0) ||
(it_bit_buff->cnt_bits - ixheaacd_drc_offset > it_bit_buff->size)) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->cnt_bits = it_bit_buff->cnt_bits - ixheaacd_drc_offset;
it_bit_buff->bit_pos = it_bit_buff->bit_pos - ixheaacd_drc_offset;
diff --git a/decoder/ixheaacd_common_lpfuncs.c b/decoder/ixheaacd_common_lpfuncs.c
index 1059cf6..80196b9 100644
--- a/decoder/ixheaacd_common_lpfuncs.c
+++ b/decoder/ixheaacd_common_lpfuncs.c
@@ -34,6 +34,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -73,6 +76,10 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_headerdecode.h"
@@ -215,15 +222,16 @@ VOID ixheaacd_read_data_stream_element(ia_bit_buf_struct *it_bit_buff,
if (it_bit_buff->cnt_bits < (cnt << 3)) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->ptr_read_next += cnt;
it_bit_buff->cnt_bits -= ((cnt) << 3);
}
-VOID ixheaacd_read_fill_element(ia_bit_buf_struct *it_bit_buff,
- ia_drc_dec_struct *drc_dummy,
- ia_drc_dec_struct *ptr_drc_dec) {
+VOID ixheaacd_read_fill_element(
+ ia_bit_buf_struct *it_bit_buff, ia_drc_dec_struct *drc_dummy,
+ ia_drc_dec_struct *ptr_drc_dec, UWORD8 *mps_buffer, WORD32 *mps_header,
+ WORD32 *mps_bytes) {
WORD32 count;
count = ixheaacd_read_bits_buf(it_bit_buff, 4);
@@ -241,13 +249,28 @@ VOID ixheaacd_read_fill_element(ia_bit_buf_struct *it_bit_buff,
ptr_drc_dec->drc_element_found = 1;
count -=
ixheaacd_dec_drc_read_element(ptr_drc_dec, drc_dummy, it_bit_buff);
+ }
+ if (EXT_SAC_DATA == extension_type) {
+ WORD32 anc_type, i;
+ anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
+ *mps_header = anc_type;
+
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
- } else {
+ for (i = 0; i < count - 1; i++) {
+ mps_buffer[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
+ }
+
+ *mps_bytes = count - 1;
+ }
+ else {
ixheaacd_read_bits_buf(it_bit_buff, 4);
if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->ptr_read_next += count - 1;
it_bit_buff->cnt_bits -= ((count - 1) << 3);
@@ -259,7 +282,10 @@ WORD32 ixheaacd_get_element_index_tag(
ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec, WORD ch_idx1,
WORD *ch_idx, WORD *channel, WORD *ele_idx_order, WORD total_elements,
WORD8 *element_used, WORD total_channels, ia_drc_dec_struct *pstr_drc_dec,
- ia_drc_dec_struct *drc_dummy) {
+ ia_drc_dec_struct *drc_dummy
+ ,
+ UWORD8 *mps_buffer, WORD32 *mps_header, WORD32 *mps_bytes
+) {
WORD element_tag, j;
ia_aac_dec_state_struct *p_state_enhaacplus_dec =
p_obj_enhaacplus_dec->p_state_aac;
@@ -287,7 +313,7 @@ WORD32 ixheaacd_get_element_index_tag(
if (it_bit_buff->cnt_bits < 3) {
it_bit_buff->cnt_bits = -1;
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
element_tag = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 7);
@@ -305,7 +331,7 @@ WORD32 ixheaacd_get_element_index_tag(
if (it_bit_buff->cnt_bits < 3) {
it_bit_buff->cnt_bits = -1;
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
if (type == 4) {
@@ -319,17 +345,18 @@ WORD32 ixheaacd_get_element_index_tag(
&p_obj_enhaacplus_dec->aac_config.str_prog_config);
if (error_code != 0) {
if (error_code < 0) return error_code;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
}
}
if (type == 6) {
- ixheaacd_read_fill_element(it_bit_buff, drc_dummy, pstr_drc_dec);
+ ixheaacd_read_fill_element(it_bit_buff, drc_dummy, pstr_drc_dec,
+ mps_buffer, mps_header, mps_bytes);
}
if (it_bit_buff->cnt_bits < 7) {
it_bit_buff->cnt_bits = -1;
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
element_tag = (WORD)ixheaacd_aac_showbits_7(it_bit_buff);
@@ -360,12 +387,12 @@ WORD32 ixheaacd_get_element_index_tag(
if (j == total_elements) {
if (it_bit_buff->cnt_bits < 0) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
ixheaacd_read_bidirection(
it_bit_buff, (WORD16)(it_bit_buff->cnt_bits - it_bit_buff->size));
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
} else
return 0;
}
diff --git a/decoder/ixheaacd_common_rom.c b/decoder/ixheaacd_common_rom.c
index 819d6f2..667b28a 100644
--- a/decoder/ixheaacd_common_rom.c
+++ b/decoder/ixheaacd_common_rom.c
@@ -35,6 +35,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecsettings.h"
diff --git a/decoder/ixheaacd_config.h b/decoder/ixheaacd_config.h
index 29a6a90..59bacf0 100644
--- a/decoder/ixheaacd_config.h
+++ b/decoder/ixheaacd_config.h
@@ -41,6 +41,7 @@
#define USAC_OUT_FRAMELENGTH_4096 4096
#define MAX_CORE_SBR_FRAME_LEN_IDX (4)
+#define IA_MAX_INP_BUFFER_SIZE (8 * 1024 + 11)
#define ID_EXT_ELE_FILL 0
#define ID_EXT_ELE_MPEGS 1
@@ -51,8 +52,7 @@
#define ID_CONFIG_EXT_FILL 0
#define ID_CONFIG_EXT_LOUDNESS_INFO (2)
-#define MAX_PARAMETER_BANDS (40)
-#define MAX_PARAMETER_BANDS_MPS (28)
+#define MAX_PARAMETER_BANDS (28)
#define MAX_NUM_OTT (5)
#define MAX_NUM_TTT (1)
#define MAX_INPUT_CHANNELS (2)
@@ -711,6 +711,6 @@ UWORD32 ixheaacd_sbr_params(UWORD32 core_sbr_frame_len_idx,
UWORD32 *sample_freq_indx);
WORD32 ixheaacd_config(ia_bit_buf_struct *bit_buff,
- ia_usac_config_struct *pstr_usac_conf, UINT32 *chan);
+ ia_usac_config_struct *pstr_usac_conf, UINT32 *chan, WORD32 ec_flag);
#endif /* IXHEAACD_CONFIG_H */
diff --git a/decoder/ixheaacd_constants.h b/decoder/ixheaacd_constants.h
index 3ac0065..931fb61 100644
--- a/decoder/ixheaacd_constants.h
+++ b/decoder/ixheaacd_constants.h
@@ -63,9 +63,6 @@
#define MAX_16 (WORD16)0x7fff
#define MIN_16 (WORD16)0x8000
-#define MAX_24 (WORD32)0x007fffff
-#define MIN_24 (WORD32)0xff800000
-
#define NULLPTR ((VOID *)0)
#define IT_NULL ((VOID *)0)
@@ -77,4 +74,13 @@
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
+#define C70 (-0.1666667014f) //(cos(u) + cos(2 * u) + cos(3 * u)) / 3;
+#define C71 (0.7901564837f) //(2 * cos(u) - cos(2 * u) - cos(3 * u)) / 3;
+#define C72 (0.0558542535f) //(cos(u) - 2 * cos(2 * u) + cos(3 * u)) / 3;
+#define C73 (0.7343022227f) //(cos(u) + cos(2 * u) - 2 * cos(3 * u)) / 3;
+#define C74 (-0.4409585893f) //(sin(u) + sin(2 * u) - sin(3 * u)) / 3;
+#define C75 (-0.3408728838f) //(2 * sin(u) - sin(2 * u) + sin(3 * u)) / 3;
+#define C76 (0.5339693427f) //(sin(u) - 2 * sin(2 * u) - sin(3 * u)) / 3;
+#define C77 (-0.8748422265f) //(sin(u) + sin(2 * u) + 2 * sin(3 * u)) / 3;
+
#endif /* IXHEAACD_CONSTANTS_H */
diff --git a/decoder/ixheaacd_create.c b/decoder/ixheaacd_create.c
index 7ac27e7..0aef571 100644
--- a/decoder/ixheaacd_create.c
+++ b/decoder/ixheaacd_create.c
@@ -23,7 +23,7 @@
#include <assert.h>
#include "ixheaacd_type_def.h"
-
+#include "ixheaacd_constants.h"
#include "ixheaacd_cnst.h"
#include "ixheaacd_bitbuffer.h"
@@ -54,49 +54,33 @@
#include "ixheaacd_pvc_dec.h"
#include "ixheaacd_sbr_dec.h"
#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_sbr_const.h"
-
-#include "ixheaacd_main.h"
-
-#include "ixheaacd_arith_dec.h"
#include "ixheaacd_memory_standards.h"
-#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_defines.h"
#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_common_rom.h"
-#include "ixheaacd_sbr_rom.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_pulsedata.h"
#include "ixheaacd_pns.h"
-#include "ixheaacd_lt_predict.h"
-
-#include "ixheaacd_channelinfo.h"
-#include "ixheaacd_channel.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_main.h"
#include "ixheaacd_channelinfo.h"
-#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_ec.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_latmdemux.h"
#include "ixheaacd_aacdec.h"
-#include "ixheaacd_sbr_common.h"
-
-#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_config.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_create.h"
-#include "ixheaacd_process.h"
-
-#include "ixheaacd_sbrdecoder.h"
-
#include "ixheaacd_mps_interface.h"
-#include "ixheaacd_bit_extract.h"
#include "ixheaacd_func_def.h"
-#include "ixheaacd_interface.h"
extern const ia_huff_code_word_struct ixheaacd_huff_book_scl[];
@@ -231,6 +215,7 @@ WORD32 ixheaacd_decode_init(
WORD32 num_elements = ptr_usac_dec_config->num_elements;
WORD32 chan = 0;
+ usac_data->ec_flag = codec_handle->aac_config.ui_err_conceal;
usac_data->huffman_code_book_scl = aac_dec_handle->huffman_code_book_scl;
usac_data->huffman_code_book_scl_index =
aac_dec_handle->huffman_code_book_scl_index;
@@ -242,6 +227,10 @@ WORD32 ixheaacd_decode_init(
usac_data->tns_max_bands_tbl_usac =
&aac_dec_handle->pstr_aac_tables->pstr_block_tables
->tns_max_bands_tbl_usac;
+ for (WORD32 ch = 0; ch < MAX_NUM_CHANNELS; ch++) {
+ ixheaacd_usac_ec_init(&usac_data->str_error_concealment[ch], usac_data->core_mode);
+ memset(&usac_data->overlap_data_ptr[ch][0], 0, sizeof(usac_data->overlap_data_ptr[ch]));
+ }
for (i = 0; i < 11; i++) {
if (ixheaacd_sampling_boundaries[i] <= sample_rate) break;
@@ -284,6 +273,16 @@ WORD32 ixheaacd_decode_init(
usac_data->str_tddec[i]->fscale =
((fscale)*usac_data->ccfl) / LEN_SUPERFRAME;
usac_data->len_subfrm = usac_data->ccfl / 4;
+
+ {
+ WORD32 fac_length = usac_data->len_subfrm / 4;
+ if (fac_length & (fac_length - 1)) {
+ if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
+ (fac_length != 384) && (fac_length != 768)) {
+ return -1;
+ }
+ }
+ }
usac_data->num_subfrm = (MAX_NUM_SUBFR * usac_data->ccfl) / LEN_SUPERFRAME;
ixheaacd_init_acelp_data(usac_data, usac_data->str_tddec[i]);
@@ -301,11 +300,13 @@ WORD32 ixheaacd_decode_init(
if (ptr_usac_ele_config) {
if (usac_data->tw_mdct[ele_id]) {
- return -1;
+ if (usac_data->ec_flag) {
+ usac_data->tw_mdct[ele_id] = 0;
+ } else
+ return -1;
}
- usac_data->noise_filling_config[ele_id] =
- ptr_usac_ele_config->noise_filling;
+ usac_data->noise_filling_config[ele_id] = ptr_usac_ele_config->noise_filling;
}
ele_type = ptr_usac_config->str_usac_dec_config.usac_element_type[ele_id];
@@ -342,6 +343,7 @@ WORD32 ixheaacd_decode_init(
&(ptr_usac_config->str_usac_dec_config
.str_usac_element_config[ele_id]
.str_usac_mps212_config);
+ aac_dec_handle->mps_dec_handle.ec_flag = aac_dec_handle->ec_enable;
if (ixheaacd_mps_create(&aac_dec_handle->mps_dec_handle,
bs_frame_length, bs_residual_coding,
@@ -377,6 +379,8 @@ WORD32 ixheaacd_dec_data_init(VOID *handle,
ia_usac_config_struct *ptr_usac_config =
&(pstr_frame_data->str_audio_specific_config.str_usac_config);
+ usac_data->last_frame_ok = 1;
+ usac_data->frame_ok = 1;
usac_data->window_shape_prev[0] = WIN_SEL_0;
usac_data->window_shape_prev[1] = WIN_SEL_0;
@@ -554,7 +558,14 @@ WORD32 ixheaacd_decode_create(ia_exhaacplus_dec_api_struct *handle,
err = ixheaacd_dec_data_init(handle, pstr_frame_data,
&(pstr_dec_data->str_usac_data));
- if (err != 0) return err;
+ if (err != 0) {
+ if (handle->aac_config.ui_err_conceal) {
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ } else
+ return err;
+ }
+
+ pstr_dec_data->str_usac_data.sampling_rate = pstr_frame_data->str_layer.sample_rate_layer;
switch (pstr_dec_data->str_usac_data.sbr_ratio_idx) {
case 0:
@@ -574,6 +585,16 @@ WORD32 ixheaacd_decode_create(ia_exhaacplus_dec_api_struct *handle,
handle->aac_config.ui_sbr_mode = 0;
}
+ if (!aac_dec_handle->peak_lim_init && !handle->aac_config.peak_limiter_off &&
+ handle->aac_config.ui_err_conceal) {
+ memset(&aac_dec_handle->peak_limiter, 0, sizeof(ia_peak_limiter_struct));
+ ixheaacd_peak_limiter_init(&aac_dec_handle->peak_limiter, MAX_NUM_CHANNELS,
+ pstr_dec_data->str_usac_data.sampling_rate,
+ &aac_dec_handle->peak_limiter.buffer[0],
+ &aac_dec_handle->delay_in_samples);
+ aac_dec_handle->peak_lim_init++;
+ }
+
break;
default:
diff --git a/decoder/ixheaacd_create.h b/decoder/ixheaacd_create.h
index 9bd7e6b..2a4ba5f 100644
--- a/decoder/ixheaacd_create.h
+++ b/decoder/ixheaacd_create.h
@@ -24,6 +24,7 @@ typedef struct {
struct ia_bit_buf_struct dec_bit_buf;
ia_frame_data_struct str_frame_data;
ia_usac_data_struct str_usac_data;
+ jmp_buf *xaac_jmp_buf;
} ia_dec_data_struct;
WORD32 ixheaacd_frm_data_init(ia_audio_specific_config_struct *pstr_audio_conf,
diff --git a/decoder/ixheaacd_decode_main.c b/decoder/ixheaacd_decode_main.c
index 60b61b4..802f7fa 100644
--- a/decoder/ixheaacd_decode_main.c
+++ b/decoder/ixheaacd_decode_main.c
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <string.h>
#include "ixheaacd_type_def.h"
-#include "ixheaacd_constants.h"
#include "ixheaacd_error_standards.h"
#include "ixheaacd_memory_standards.h"
#include "ixheaacd_sbrdecsettings.h"
@@ -33,29 +32,38 @@
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_pulsedata.h"
#include "ixheaacd_pns.h"
+#include "ixheaacd_interface.h"
+#include "ixheaacd_info.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_sbr_common.h"
-#include "ixheaacd_hybrid.h"
-#include "ixheaacd_ps_dec.h"
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_channel.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_latmdemux.h"
#include "ixheaacd_aacdec.h"
#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_interface.h"
#include "ixheaacd_tns_usac.h"
-#include "ixheaacd_cnst.h"
+
#include "ixheaacd_acelp_info.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_info.h"
@@ -69,7 +77,8 @@
#include "ixheaacd_create.h"
#include "ixheaacd_dec_main.h"
#include "ixheaacd_error_standards.h"
-#include "ixheaacd_struct_def.h"
+#include "ixheaacd_headerdecode.h"
+#include "ixheaacd_error_codes.h"
VOID ixheaacd_samples_sat(WORD8 *outbuffer, WORD32 num_samples_out,
WORD32 pcmsize, FLOAT32 (*out_samples)[4096],
WORD32 *out_bytes, WORD32 num_channel_out) {
@@ -118,6 +127,54 @@ VOID ixheaacd_samples_sat(WORD8 *outbuffer, WORD32 num_samples_out,
}
}
+VOID ixheaacd_samples_sat_mc(WORD8* outbuffer, WORD32 num_samples_out,
+ FLOAT32(*out_samples)[4096], WORD32* out_bytes,
+ WORD32 num_channel_out, WORD32 ch_fac) {
+ WORD32 num;
+ WORD32 i;
+ FLOAT32 write_local_float;
+
+ WORD16* out_buf = (WORD16*)outbuffer;
+
+ num = num_channel_out * num_samples_out;
+ if (num_channel_out == 1) {
+ for (i = 0; i < num; i++) {
+ write_local_float =
+ (out_samples[i % num_channel_out][i / num_channel_out]);
+
+ if (write_local_float > 32767.0f) {
+ write_local_float = 32767.0f;
+ } else if (write_local_float < -32768.0f) {
+ write_local_float = -32768.0f;
+ }
+ out_buf[i * ch_fac] = (WORD16)write_local_float;
+ }
+ } else if (num_channel_out == 2) {
+ for (i = 0; i < num_samples_out; i++) {
+ write_local_float =
+ (out_samples[(2*i) % num_channel_out][(2 * i) / num_channel_out]);
+
+ if (write_local_float > 32767.0f) {
+ write_local_float = 32767.0f;
+ } else if (write_local_float < -32768.0f) {
+ write_local_float = -32768.0f;
+ }
+ out_buf[i * ch_fac] = (WORD16)write_local_float;
+
+ write_local_float =
+ (out_samples[((2 * i) + 1) % num_channel_out][((2 * i) + 1) / num_channel_out]);
+
+ if (write_local_float > 32767.0f) {
+ write_local_float = 32767.0f;
+ } else if (write_local_float < -32768.0f) {
+ write_local_float = -32768.0f;
+ }
+ out_buf[i * ch_fac + 1] = (WORD16)write_local_float;
+ }
+ }
+ *out_bytes = num * sizeof(WORD16);
+}
+
/* audio pre roll frame parsing*/
static WORD32 ixheaacd_audio_preroll_parsing(
ia_dec_data_struct *pstr_dec_data, UWORD8 *conf_buf, WORD32 *preroll_units,
@@ -198,7 +255,15 @@ static WORD32 ixheaacd_audio_preroll_parsing(
num_pre_roll_frames += val_add;
}
- if (num_pre_roll_frames > MAX_AUDIO_PREROLLS) return IA_FATAL_ERROR;
+ if (num_pre_roll_frames > MAX_AUDIO_PREROLLS) {
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ num_pre_roll_frames = 0;
+ longjmp(*(pstr_dec_data->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
for (frame_idx = 0; frame_idx < num_pre_roll_frames; frame_idx++) {
WORD32 au_len = 0;
@@ -213,6 +278,15 @@ static WORD32 ixheaacd_audio_preroll_parsing(
}
temp_buff->ptr_read_next += au_len;
temp_buff->cnt_bits -= au_len * 8;
+ if (temp_buff->cnt_bits < 0) {
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ temp_buff->cnt_bits = 0;
+ longjmp(*(pstr_dec_data->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
}
}
}
@@ -245,6 +319,7 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
WORD preroll_frame_offset[MAX_PREROLL_FRAME_OFFSET] = {0};
WORD preroll_units = -1;
WORD32 access_units = 0;
+ WORD32 bits_consumed = 0;
if (frames_done == 0) {
if ((pstr_audio_specific_config->channel_configuration > 2) ||
@@ -268,10 +343,30 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
{
WORD32 tot_out_bytes = 0;
+ jmp_buf local;
pstr_dec_data = (ia_dec_data_struct *)aac_dec_handle->pstr_dec_data;
+ pstr_dec_data->str_usac_data.frame_ok = 1;
+ pstr_dec_data->str_usac_data.ec_flag = aac_dec_handle->p_config->ui_err_conceal;
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ err = setjmp(local);
+ }
+
+ if (aac_dec_handle->p_config->ui_err_conceal) {
+ if (err == 0) {
+ if (pstr_dec_data->dec_bit_buf.cnt_bits) {
+ aac_dec_handle->ui_in_bytes += (pstr_dec_data->dec_bit_buf.cnt_bits >> 3);
+ if (aac_dec_handle->ui_in_bytes > IA_MAX_INP_BUFFER_SIZE) {
+ aac_dec_handle->ui_in_bytes = 0;
+ }
+ }
+ } else {
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ }
+ }
if (frames_done == 0) {
WORD32 delay;
+ pstr_dec_data->str_usac_data.first_frame = 1;
if (aac_dec_handle->decode_create_done == 0) {
delay = ixheaacd_decode_create(
handle, pstr_dec_data,
@@ -292,59 +387,102 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
pstr_dec_data->dec_bit_buf.bit_pos = 7;
pstr_dec_data->dec_bit_buf.cnt_bits = pstr_dec_data->dec_bit_buf.size;
pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ pstr_dec_data->xaac_jmp_buf = &local;
+ }
pstr_dec_data->str_usac_data.usac_flag = aac_dec_handle->usac_flag;
+ pstr_dec_data->str_usac_data.esbr_hq = handle->aac_config.ui_hq_esbr;
+ pstr_dec_data->str_usac_data.enh_sbr = handle->aac_config.ui_enh_sbr;
+ pstr_dec_data->str_usac_data.enh_sbr_ps = handle->aac_config.ui_enh_sbr_ps;
if (pstr_dec_data->dec_bit_buf.size > pstr_dec_data->dec_bit_buf.max_size)
pstr_dec_data->dec_bit_buf.max_size = pstr_dec_data->dec_bit_buf.size;
/* audio pre roll frame parsing*/
+ if (aac_dec_handle->bs_format == LOAS_BSFORMAT && pstr_dec_data->str_usac_data.frame_ok) {
+ WORD32 sync = ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 11);
+ if (sync == 0x2b7) {
+ WORD32 result = ixheaacd_latm_audio_mux_element(
+ &pstr_dec_data->dec_bit_buf, &aac_dec_handle->latm_struct_element,
+ aac_dec_handle,
+ (ia_sampling_rate_info_struct *)&handle->aac_tables
+ .pstr_huffmann_tables->str_sample_rate_info[0]);
+ if (result < 0) {
+ if (aac_dec_handle->p_config->ui_err_conceal)
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ else
+ return result;
+ }
+ }
+ bits_consumed = pstr_dec_data->dec_bit_buf.size - pstr_dec_data->dec_bit_buf.cnt_bits;
+ }
+
do {
config_len = 0;
- if (access_units == 0 &&
- pstr_audio_specific_config->str_usac_config.str_usac_dec_config
- .preroll_flag) {
- config_len = ixheaacd_audio_preroll_parsing(
- pstr_dec_data, &config[0], &preroll_units, &preroll_frame_offset[0],
- aac_dec_handle, &aac_dec_handle->drc_config_changed,
- &aac_dec_handle->apply_crossfade);
-
- if (config_len == IA_FATAL_ERROR) return IA_FATAL_ERROR;
- }
+ if (err == 0 || aac_dec_handle->p_config->ui_err_conceal == 0) {
+ if (access_units == 0 &&
+ pstr_audio_specific_config->str_usac_config.str_usac_dec_config.preroll_flag) {
+ config_len = ixheaacd_audio_preroll_parsing(
+ pstr_dec_data, &config[0], &preroll_units, &preroll_frame_offset[0], aac_dec_handle,
+ &aac_dec_handle->drc_config_changed, &aac_dec_handle->apply_crossfade);
+
+ if (config_len == IA_FATAL_ERROR) return IA_FATAL_ERROR;
+ }
- if (config_len != 0) {
- /* updating the config parameters*/
- ia_bit_buf_struct config_bit_buf = {0};
-
- config_bit_buf.ptr_bit_buf_base = config;
- config_bit_buf.size = config_len << 3;
- config_bit_buf.ptr_read_next = config_bit_buf.ptr_bit_buf_base;
- config_bit_buf.ptr_bit_buf_end = (UWORD8 *)config + config_len;
- config_bit_buf.bit_pos = 7;
- config_bit_buf.cnt_bits = config_bit_buf.size;
- config_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
-
- suitable_tracks =
- ixheaacd_frm_data_init(pstr_audio_specific_config, pstr_dec_data);
-
- if (suitable_tracks <= 0) return -1;
-
- /* call codec re-configure*/
- aac_dec_handle->decode_create_done = 0;
- err = ixheaacd_config(
- &config_bit_buf, &(pstr_dec_data->str_frame_data
- .str_audio_specific_config.str_usac_config),
- &(pstr_audio_specific_config
- ->channel_configuration) /*&pstr_audio_specific_config->str_usac_config*/);
- if (err != 0) return -1;
-
- pstr_dec_data->str_frame_data.str_audio_specific_config
- .sampling_frequency =
- pstr_dec_data->str_frame_data.str_audio_specific_config
- .str_usac_config.usac_sampling_frequency;
- delay = ixheaacd_decode_create(
- handle, pstr_dec_data,
- pstr_dec_data->str_frame_data.scal_out_select + 1);
- if (delay == -1) return -1;
- *num_channel_out = pstr_dec_data->str_frame_data.scal_out_num_channels;
+ if (config_len != 0) {
+ ia_bit_buf_struct config_bit_buf = {0};
+
+ config_bit_buf.ptr_bit_buf_base = config;
+ config_bit_buf.size = config_len << 3;
+ config_bit_buf.ptr_read_next = config_bit_buf.ptr_bit_buf_base;
+ config_bit_buf.ptr_bit_buf_end = (UWORD8 *)config + config_len;
+ config_bit_buf.bit_pos = 7;
+ config_bit_buf.cnt_bits = config_bit_buf.size;
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ config_bit_buf.xaac_jmp_buf = &local;
+ } else {
+ config_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
+ }
+
+ suitable_tracks = ixheaacd_frm_data_init(pstr_audio_specific_config, pstr_dec_data);
+
+ if (suitable_tracks <= 0) return -1;
+
+ aac_dec_handle->decode_create_done = 0;
+ if (aac_dec_handle->p_config->ui_err_conceal) {
+ if (pstr_dec_data->str_usac_data.frame_ok == 1 && err == 0) {
+ err = ixheaacd_config(
+ &config_bit_buf,
+ &(pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config),
+ &(pstr_audio_specific_config->channel_configuration),
+ aac_dec_handle->p_config->ui_err_conceal);
+ if (err != 0) {
+ if (frames_done == 0)
+ return -1;
+ else
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ }
+ }
+ } else {
+ err = ixheaacd_config(
+ &config_bit_buf,
+ &(pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config),
+ &(pstr_audio_specific_config->channel_configuration),
+ aac_dec_handle->p_config->ui_err_conceal);
+ if (err != 0) {
+ return err;
+ }
+ }
+
+ pstr_dec_data->str_frame_data.str_audio_specific_config.sampling_frequency =
+ pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config
+ .usac_sampling_frequency;
+ delay = ixheaacd_decode_create(handle, pstr_dec_data,
+ pstr_dec_data->str_frame_data.scal_out_select + 1);
+ if (delay == -1) return -1;
+ *num_channel_out = pstr_dec_data->str_frame_data.scal_out_num_channels;
+ }
+ } else {
+ pstr_dec_data->str_usac_data.frame_ok = 0;
}
pstr_dec_data->dec_bit_buf.ptr_bit_buf_base = (UWORD8 *)inbuffer;
@@ -357,8 +495,13 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
pstr_dec_data->str_usac_data.usac_flag = aac_dec_handle->usac_flag;
+ pstr_dec_data->str_usac_data.esbr_hq = handle->aac_config.ui_hq_esbr;
+ pstr_dec_data->str_usac_data.enh_sbr = handle->aac_config.ui_enh_sbr;
+ pstr_dec_data->str_usac_data.enh_sbr_ps = handle->aac_config.ui_enh_sbr_ps;
- if (preroll_frame_offset[access_units]) {
+ if (preroll_frame_offset[access_units] &&
+ ((pstr_dec_data->str_usac_data.ec_flag && pstr_dec_data->str_usac_data.frame_ok == 1) ||
+ pstr_dec_data->str_usac_data.ec_flag == 0)) {
pstr_dec_data->dec_bit_buf.cnt_bits =
pstr_dec_data->dec_bit_buf.size -
preroll_frame_offset[access_units];
@@ -367,9 +510,24 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
pstr_dec_data->dec_bit_buf.ptr_read_next =
pstr_dec_data->dec_bit_buf.ptr_read_next +
(preroll_frame_offset[access_units] / 8);
+ } else {
+ pstr_dec_data->dec_bit_buf.cnt_bits =
+ pstr_dec_data->dec_bit_buf.size -
+ (bits_consumed);
+ pstr_dec_data->dec_bit_buf.bit_pos =
+ 7 - (bits_consumed) % 8;
+ pstr_dec_data->dec_bit_buf.ptr_read_next =
+ pstr_dec_data->dec_bit_buf.ptr_read_next +
+ (bits_consumed / 8);
}
- if (!aac_dec_handle->decode_create_done) return IA_FATAL_ERROR;
+ if (pstr_dec_data->str_usac_data.ec_flag) {
+ if (!aac_dec_handle->decode_create_done && pstr_dec_data->str_usac_data.frame_ok == 1 &&
+ config_len != 0)
+ return IA_FATAL_ERROR;
+ } else {
+ if (!aac_dec_handle->decode_create_done) return IA_FATAL_ERROR;
+ }
err =
ixheaacd_usac_process(pstr_dec_data, num_channel_out, aac_dec_handle);
@@ -395,6 +553,13 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
if (err == -1) return err;
num_samples_out = pstr_dec_data->str_usac_data.output_samples;
+ if (!handle->aac_config.peak_limiter_off && pstr_dec_data->str_usac_data.ec_flag) {
+ aac_dec_handle->peak_limiter.num_channels = *num_channel_out;
+
+ ixheaacd_peak_limiter_process_float(&aac_dec_handle->peak_limiter,
+ pstr_dec_data->str_usac_data.time_sample_vector,
+ num_samples_out);
+ }
ixheaacd_samples_sat((WORD8 *)outbuffer + tot_out_bytes, num_samples_out,
pcmsize,
@@ -472,5 +637,20 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer,
*out_bytes = tot_out_bytes;
}
+ if (aac_dec_handle->bs_format == LOAS_BSFORMAT) {
+ pstr_dec_data->dec_bit_buf.ptr_bit_buf_base = (UWORD8 *)inbuffer;
+ pstr_dec_data->dec_bit_buf.size = aac_dec_handle->ui_in_bytes << 3;
+ pstr_dec_data->dec_bit_buf.ptr_bit_buf_end =
+ (UWORD8 *)inbuffer + aac_dec_handle->ui_in_bytes - 1;
+ pstr_dec_data->dec_bit_buf.ptr_read_next = (UWORD8 *)inbuffer;
+ pstr_dec_data->dec_bit_buf.bit_pos = 7;
+ pstr_dec_data->dec_bit_buf.cnt_bits = pstr_dec_data->dec_bit_buf.size;
+ pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
+
+ ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 11);
+ aac_dec_handle->i_bytes_consumed =
+ ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 13) + 3;
+ }
+
return err;
}
diff --git a/decoder/ixheaacd_defines.h b/decoder/ixheaacd_defines.h
index 99d0753..2849ec5 100644
--- a/decoder/ixheaacd_defines.h
+++ b/decoder/ixheaacd_defines.h
@@ -38,6 +38,7 @@
#define NOISE_HCB 13
#define INTENSITY_HCB2 14
#define INTENSITY_HCB 15
+#define BOOKSCL 12
#define CHANNELS 2
diff --git a/decoder/ixheaacd_definitions.h b/decoder/ixheaacd_definitions.h
index 78b9af0..f1b4570 100644
--- a/decoder/ixheaacd_definitions.h
+++ b/decoder/ixheaacd_definitions.h
@@ -34,11 +34,6 @@
#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
-#define IA_MPS_DEC_PERSIST_IDX (0)
-#define IA_MPS_DEC_SCRATCH_IDX (1)
-#define IA_MPS_DEC_INPUT_IDX (2)
-#define IA_MPS_DEC_MPS_INPUT_IDX (3)
-#define IA_MPS_DEC_OUTPUT_IDX (4)
#define IA_MAX_PREROLL_FRAMES (4)
#define IA_MAX_OUTPUT_PCM_SIZE (3)
#define IA_MAX_USAC_CH (2)
@@ -52,10 +47,7 @@
(IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
IA_MAX_OUTPUT_PCM_SIZE)
-#define IA_MPS_DEC_INP_BUF_SIZE (0)
-#define IA_MPS_DEC_OUT_BUF_SIZE (0)
-
#define IA_ENHAACPLUS_DEC_MAX_CHANNEL (2)
#define IA_ENHAACPLUS_DEC_FRAME_LENGTH (1024)
-#endif /* __DEFINITIONS_H__ */
+#endif /* IXHEAACD_DEFINITIONS_H */
diff --git a/decoder/ixheaacd_drc_data_struct.h b/decoder/ixheaacd_drc_data_struct.h
index faf9775..104104b 100644
--- a/decoder/ixheaacd_drc_data_struct.h
+++ b/decoder/ixheaacd_drc_data_struct.h
@@ -49,6 +49,7 @@ typedef struct {
UWORD8 new_drc_fac;
UWORD8 prev_interp_scheme;
WORD32 drc_factors_sbr[SBR_QMF_SUB_SAMPLES][SBR_QMF_SUB_BANDS];
+ WORD32 drc_factors_sbr_lat[SBR_QMF_SUB_SAMPLES][SBR_QMF_SUB_BANDS];
} ixheaac_drc_data_struct;
typedef struct {
diff --git a/decoder/ixheaacd_drc_dec.h b/decoder/ixheaacd_drc_dec.h
index 9990f3a..1d3393c 100644
--- a/decoder/ixheaacd_drc_dec.h
+++ b/decoder/ixheaacd_drc_dec.h
@@ -32,12 +32,13 @@ VOID ixheaacd_drc_dec_create(ia_drc_dec_struct *pstr_hdrc_dec,
WORD32 ixheaacd_dec_drc_read_element(ia_drc_dec_struct *pstr_drc_dec,
ia_drc_dec_struct *drc_dummy,
- ia_handle_bit_buf_struct bs);
+ ia_bit_buf_struct *it_bit_buf);
WORD32 ixheaacd_drc_map_channels(ia_drc_dec_struct *drc_dec, WORD32 num_ch,
WORD32 frame_size);
VOID ixheaacd_drc_apply(ia_drc_dec_struct *pstr_drc_dec,
WORD32 *ptr_spectral_coef, WORD32 win_seq,
- WORD32 channel, WORD32 frame_size);
+ WORD32 channel, WORD32 frame_size,
+ WORD32 audio_object_type);
#endif
diff --git a/decoder/ixheaacd_drc_freq_dec.c b/decoder/ixheaacd_drc_freq_dec.c
index e94861c..5525678 100644
--- a/decoder/ixheaacd_drc_freq_dec.c
+++ b/decoder/ixheaacd_drc_freq_dec.c
@@ -48,6 +48,8 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -77,6 +79,10 @@
#include "ixheaacd_config.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
@@ -500,7 +506,7 @@ WORD32 ixheaacd_drc_map_channels(ia_drc_dec_struct *pstr_drc_dec,
}
if (drc_on > 1) {
- return IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_DRC_DATA;
+ return IA_XHEAAC_DEC_EXE_FATAL_INVALID_DRC_DATA;
}
}
}
@@ -553,9 +559,12 @@ VOID ixheaacd_drc_dec_create(ia_drc_dec_struct *pstr_drc_dec,
pstr_drc_dec->drc_channel_next_index[ch] = 0;
pstr_drc_dec->state = 0;
- for (j = 0; j < 64; j++)
- for (k = 0; k < 64; k++)
+ for (j = 0; j < 64; j++) {
+ for (k = 0; k < 64; k++) {
pstr_drc_data->drc_factors_sbr[j][k] = DRC_SBR_ONE_Q25;
+ pstr_drc_data->drc_factors_sbr_lat[j][k] = DRC_SBR_ONE_Q25;
+ }
+ }
for (j = 0; j < MAX_DRC_BANDS; j++) pstr_drc_data->drc_fac[j] = 0;
pstr_drc_data->n_mdct_bands[0] = FRAME_SIZE;
@@ -568,7 +577,7 @@ VOID ixheaacd_drc_dec_create(ia_drc_dec_struct *pstr_drc_dec,
}
}
-static WORD32 ixheaacd_drc_excluded_channels(ia_handle_bit_buf_struct bs,
+static WORD32 ixheaacd_drc_excluded_channels(ia_bit_buf_struct *it_bit_buf,
WORD32 nch, UWORD8 *b_channel_on) {
WORD32 ich, nbyte = 0;
WORD32 num_excl_chan;
@@ -576,16 +585,16 @@ static WORD32 ixheaacd_drc_excluded_channels(ia_handle_bit_buf_struct bs,
num_excl_chan = 7;
for (ich = 0; ich < 7; ich++) {
- exclude_mask = ixheaacd_read_bits_buf(bs, 1);
+ exclude_mask = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (ich < nch) {
b_channel_on[ich] = !exclude_mask;
}
}
nbyte++;
- while (ixheaacd_read_bits_buf(bs, 1)) {
+ while (ixheaacd_read_bits_buf(it_bit_buf, 1)) {
for (ich = num_excl_chan; ich < num_excl_chan + 7; ich++) {
- exclude_mask = ixheaacd_read_bits_buf(bs, 1);
+ exclude_mask = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (ich < nch) {
b_channel_on[ich] = !exclude_mask;
}
@@ -598,7 +607,7 @@ static WORD32 ixheaacd_drc_excluded_channels(ia_handle_bit_buf_struct bs,
}
static WORD32 ixheaacd_drc_element_read(
- ia_handle_bit_buf_struct bs, ixheaac_drc_bs_data_struct *pstr_bs_data) {
+ ia_bit_buf_struct *it_bit_buf, ixheaac_drc_bs_data_struct *pstr_bs_data) {
WORD32 ich, idrc, nbyte = 1;
WORD32 pce_tag_present, drc_bands_present;
WORD32 excluded_chns_present;
@@ -607,10 +616,10 @@ static WORD32 ixheaacd_drc_element_read(
pstr_bs_data->drc_num_bands = 1;
- pce_tag_present = ixheaacd_read_bits_buf(bs, 1);
+ pce_tag_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (pce_tag_present) {
- ixheaacd_read_bits_buf(bs, 4);/*pce_instance_tag*/
- ixheaacd_read_bits_buf(bs, 4);/*drc_tag_reserved_bits*/
+ ixheaacd_read_bits_buf(it_bit_buf, 4);/*pce_instance_tag*/
+ ixheaacd_read_bits_buf(it_bit_buf, 4);/*drc_tag_reserved_bits*/
nbyte++;
}
@@ -618,21 +627,21 @@ static WORD32 ixheaacd_drc_element_read(
pstr_bs_data->b_channel_on[ich] = 1;
}
- excluded_chns_present = ixheaacd_read_bits_buf(bs, 1);
+ excluded_chns_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (excluded_chns_present) {
- nbyte += ixheaacd_drc_excluded_channels(bs, MAX_AUDIO_CHANNELS,
+ nbyte += ixheaacd_drc_excluded_channels(it_bit_buf, MAX_AUDIO_CHANNELS,
pstr_bs_data->b_channel_on);
}
- drc_bands_present = ixheaacd_read_bits_buf(bs, 1);
+ drc_bands_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (drc_bands_present) {
- drc_band_incr = ixheaacd_read_bits_buf(bs, 4);
- pstr_bs_data->drc_interpolation_scheme = ixheaacd_read_bits_buf(bs, 4);
+ drc_band_incr = ixheaacd_read_bits_buf(it_bit_buf, 4);
+ pstr_bs_data->drc_interpolation_scheme = ixheaacd_read_bits_buf(it_bit_buf, 4);
nbyte++;
pstr_bs_data->drc_num_bands += drc_band_incr;
for (idrc = 0; idrc < pstr_bs_data->drc_num_bands; idrc++) {
- pstr_bs_data->drc_band_top[idrc] = ixheaacd_read_bits_buf(bs, 8);
+ pstr_bs_data->drc_band_top[idrc] = ixheaacd_read_bits_buf(it_bit_buf, 8);
nbyte++;
}
} else {
@@ -640,17 +649,17 @@ static WORD32 ixheaacd_drc_element_read(
pstr_bs_data->drc_interpolation_scheme = 0;
}
- pstr_bs_data->prog_ref_level_present = ixheaacd_read_bits_buf(bs, 1);
+ pstr_bs_data->prog_ref_level_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (pstr_bs_data->prog_ref_level_present) {
- pstr_bs_data->prog_ref_level = ixheaacd_read_bits_buf(bs, 7);
+ pstr_bs_data->prog_ref_level = ixheaacd_read_bits_buf(it_bit_buf, 7);
- ixheaacd_read_bits_buf(bs, 1);/*prog_ref_level_reserved_bits*/
+ ixheaacd_read_bits_buf(it_bit_buf, 1);/*prog_ref_level_reserved_bits*/
nbyte++;
}
for (idrc = 0; idrc < pstr_bs_data->drc_num_bands; idrc++) {
- WORD32 sign = ixheaacd_read_bits_buf(bs, 1);
- pstr_bs_data->dyn_rng_dlbl[idrc] = ixheaacd_read_bits_buf(bs, 7);
+ WORD32 sign = ixheaacd_read_bits_buf(it_bit_buf, 1);
+ pstr_bs_data->dyn_rng_dlbl[idrc] = ixheaacd_read_bits_buf(it_bit_buf, 7);
if (sign)
pstr_bs_data->dyn_rng_dlbl[idrc] = -pstr_bs_data->dyn_rng_dlbl[idrc];
max_dyn_rng_dlbl = max(max_dyn_rng_dlbl, pstr_bs_data->dyn_rng_dlbl[idrc]);
@@ -662,20 +671,20 @@ static WORD32 ixheaacd_drc_element_read(
return nbyte;
}
-static int ixheaacd_drc_read_compression(ia_handle_bit_buf_struct bs,
+static WORD32 ixheaacd_drc_read_compression(ia_bit_buf_struct *it_bit_buf,
ia_drc_dec_struct *pstr_drc_dec,
WORD32 bs_pos) {
- int bit_count = 0;
- int dmx_lvl_present, ext_present, compression_present;
- int coarse_gain_present, fine_grain_present;
+ WORD32 bit_count = 0;
+ WORD32 dmx_lvl_present, ext_present, compression_present;
+ WORD32 coarse_gain_present, fine_grain_present;
ia_bit_buf_struct local_bs = {0};
WORD32 bytes = 0, bits = 0;
- memcpy(&local_bs, bs, sizeof(ia_bit_buf_struct));
+ memcpy(&local_bs, it_bit_buf, sizeof(ia_bit_buf_struct));
if (local_bs.size < bs_pos) {
longjmp(*(local_bs.xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
bytes = (local_bs.size - bs_pos) >> 3;
bits = (local_bs.size - bs_pos) % 8;
@@ -745,7 +754,7 @@ static int ixheaacd_drc_read_compression(ia_handle_bit_buf_struct bs,
}
if (ext_present) {
- int ext_bits = 8;
+ WORD32 ext_bits = 8;
ixheaacd_read_bits_buf(&local_bs, 1);
if (ixheaacd_read_bits_buf(&local_bs, 1)) ext_bits += 8;
@@ -761,25 +770,25 @@ static int ixheaacd_drc_read_compression(ia_handle_bit_buf_struct bs,
WORD32 ixheaacd_dec_drc_read_element(ia_drc_dec_struct *pstr_drc_dec,
ia_drc_dec_struct *drc_dummy,
- ia_handle_bit_buf_struct bs) {
+ ia_bit_buf_struct *it_bit_buf) {
WORD32 bits_read = 0;
if (pstr_drc_dec->num_drc_elements < pstr_drc_dec->max_audio_channels) {
bits_read = ixheaacd_drc_element_read(
- bs, &pstr_drc_dec->str_drc_bs_data[pstr_drc_dec->num_drc_elements]);
+ it_bit_buf, &pstr_drc_dec->str_drc_bs_data[pstr_drc_dec->num_drc_elements]);
if (pstr_drc_dec->dvb_anc_data_present) {
ixheaacd_drc_read_compression(
- bs, pstr_drc_dec, pstr_drc_dec->dvb_anc_data_pos);
+ it_bit_buf, pstr_drc_dec, pstr_drc_dec->dvb_anc_data_pos);
}
pstr_drc_dec->num_drc_elements++;
} else {
ixheaac_drc_bs_data_struct drc_ele_dummy;
- bits_read = ixheaacd_drc_element_read(bs, &drc_ele_dummy);
+ bits_read = ixheaacd_drc_element_read(it_bit_buf, &drc_ele_dummy);
if (pstr_drc_dec->dvb_anc_data_present) {
ixheaacd_drc_read_compression(
- bs, drc_dummy, pstr_drc_dec->dvb_anc_data_pos);
+ it_bit_buf, drc_dummy, pstr_drc_dec->dvb_anc_data_pos);
}
}
@@ -869,7 +878,7 @@ static WORD32 ixheaacd_drc_get_bottom_qmf(WORD32 bottom, WORD32 frame_size) {
VOID ixheaacd_drc_apply(ia_drc_dec_struct *pstr_drc_dec,
WORD32 *ptr_spectral_coef, WORD32 win_seq,
- WORD32 channel, WORD32 frame_size) {
+ WORD32 channel, WORD32 frame_size, WORD32 audio_object_type) {
WORD32 drc_band, spec_pos, start_pos, end_pos;
WORD32 low_hi, drc_norm, drc_freq_fac;
WORD32 drc_fac, div_val, mod_val, ret_val, offset_value;
@@ -883,9 +892,29 @@ VOID ixheaacd_drc_apply(ia_drc_dec_struct *pstr_drc_dec,
WORD32 qmf_start_pos, qmf_stop_pos, qmf_start, i, j;
WORD32 prev_frame_drc_sbr_factors[64];
WORD32 *ptr_drc_fac;
- ptr_drc_fac =
- &pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr[0][0];
+ if ((audio_object_type != AOT_ER_AAC_ELD) && (audio_object_type != AOT_ER_AAC_LD))
+ {
+ for (i = 0; i < SBR_QMF_SUB_SAMPLES; i++)
+ {
+ for (j = 0; j < SBR_QMF_SUB_BANDS; j++)
+ {
+ pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr[i][j] =
+ pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[i][j];
+ }
+ }
+ for (j = 0; j < 32; j++)
+ {
+ memcpy(pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[j],
+ pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[j + 32],
+ SBR_QMF_SUB_BANDS * sizeof(WORD32));
+ }
+ ptr_drc_fac =
+ &pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[0][0];
+ } else {
+ ptr_drc_fac =
+ &pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr[0][0];
+ }
for (i = 0; i < 64; i++) {
drc_sbr_factors[i] = ptr_drc_fac;
ptr_drc_fac += 64;
@@ -927,7 +956,7 @@ VOID ixheaacd_drc_apply(ia_drc_dec_struct *pstr_drc_dec,
for (drc_band = 0; drc_band < pstr_drc_data->n_drc_bands; drc_band++) {
if ((pstr_drc_dec->str_drc_bs_data[0].drc_data_type == DVB_DRC_ANC_DATA) &&
(pstr_drc_dec->heavy_mode)) {
- int val_x, val_y;
+ WORD32 val_x, val_y;
float compression_factor;
float temp;
val_x = ((UWORD8)pstr_drc_data->drc_fac_dvb[drc_band]) >> 4;
@@ -936,7 +965,7 @@ VOID ixheaacd_drc_apply(ia_drc_dec_struct *pstr_drc_dec,
compression_factor = (FLOAT32)(48.164 - 6.0206 * val_x - 0.4014 * val_y);
temp = (FLOAT32)(pow(10, (float)compression_factor / 20.0));
- drc_freq_fac = (WORD32)(temp * 33554431);
+ drc_freq_fac = (WORD32)(temp * 33554431.0f);
} else {
if (pstr_drc_data->drc_fac[drc_band] < 0) {
diff --git a/decoder/ixheaacd_dsp_fft32x32s.h b/decoder/ixheaacd_dsp_fft32x32s.h
index 7e6fdc3..3dbd5b3 100644
--- a/decoder/ixheaacd_dsp_fft32x32s.h
+++ b/decoder/ixheaacd_dsp_fft32x32s.h
@@ -26,4 +26,16 @@ VOID ixheaacd_inv_dit_fft_8pt_armv7(WORD32 *x, WORD32 *real, WORD32 *imag);
VOID ixheaacd_inv_dit_fft_8pt_armv8(WORD32 *x, WORD32 *real, WORD32 *imag);
+#define CPLX_MPY_FFT(re, im, a, b, c, d) \
+ do { \
+ re = ((a * c) - (b * d)); \
+ im = ((a * d) + (b * c)); \
+ } while (0)
+
+#define CPLX_MPY_IFFT(re, im, a, b, c, d) \
+ do { \
+ re = ((a * c) + (b * d)); \
+ im = (-(a * d) + (b * c)); \
+ } while (0)
+
#endif
diff --git a/decoder/ixheaacd_ec.h b/decoder/ixheaacd_ec.h
new file mode 100644
index 0000000..bc625af
--- /dev/null
+++ b/decoder/ixheaacd_ec.h
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_EC_H
+#define IXHEAACD_EC_H
+
+VOID ixheaacd_aac_ec_init(ia_ec_state_str *pstr_ec_state);
+
+VOID ixheaacd_aac_apply_ec(ia_ec_state_str *pstr_ec_state,
+ ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info,
+ const WORD32 num_samples, ia_ics_info_struct *pstr_ics_info,
+ const WORD32 frame_status);
+
+VOID ixheaacd_usac_ec_init(ia_ec_state_str *pstr_ec_state, WORD32 core_coder_mode);
+
+VOID ixheaacd_usac_ec_save_states(ia_ec_state_str *pstr_ec_state,
+ ia_usac_data_struct *pstr_usac_data, WORD32 ch);
+
+VOID ixheaacd_usac_apply_ec(ia_usac_data_struct *pstr_usac_data,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info, WORD32 ch);
+
+VOID ixheaacd_usac_lpc_ec(FLOAT32 lsp[][ORDER], FLOAT32 *lpc4_lsf, FLOAT32 *lsf_adaptive_mean,
+ const WORD32 first_lpd_flag);
+
+VOID ixheaacd_usac_tcx_ec(ia_usac_data_struct *pstr_usac_data, ia_usac_lpd_decoder_handle st,
+ FLOAT32 *ptr_lsp_curr, WORD32 frame_idx, FLOAT32 *lp_flt_coff_a);
+
+#endif /* IXHEAACD_EC_H */
diff --git a/decoder/ixheaacd_ec_defines.h b/decoder/ixheaacd_ec_defines.h
new file mode 100644
index 0000000..cc8692a
--- /dev/null
+++ b/decoder/ixheaacd_ec_defines.h
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_EC_DEFINES_H
+#define IXHEAACD_EC_DEFINES_H
+
+#define NO_TRANSITION (0)
+#define TRANS_SHORT_LONG (1)
+
+#define FRAME_OKAY (0)
+#define FRAME_CONCEAL_SINGLE (1)
+#define FRAME_FADE (2)
+#define FRAME_MUTE (3)
+#define MAX_FADE_FRAMES (8)
+
+#define MAX_SFB_EC (51)
+#define MAX_SPEC_SCALE_LEN (8)
+#define MAX_SPEC_SCALE_LEN_EC (128)
+
+#define BETA (0.25f)
+#define ONE_BETA (0.75f)
+#define BFI_FAC (0.90f)
+#define ONE_BFI_FAC (0.10f)
+
+#define FRAME_OK (0)
+#define FRAME_ERROR (1)
+#define FRAME_ERROR_ALLSLOTS (2)
+
+#define CONCEAL_NOT_DEFINED ((UWORD8)-1)
+
+#endif /* IXHEAACD_EC_DEFINES_H */
diff --git a/decoder/ixheaacd_ec_rom.c b/decoder/ixheaacd_ec_rom.c
new file mode 100644
index 0000000..cb95464
--- /dev/null
+++ b/decoder/ixheaacd_ec_rom.c
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+
+#include <ixheaacd_type_def.h>
+#include "ixheaacd_ec_defines.h"
+
+const WORD16 ia_ec_interpolation_fac[4] = {(0x4000), (0x4c1b), (0x5a82), (0x6ba2)};
+
+const FLOAT32 ia_ec_fade_factors[MAX_FADE_FRAMES + 1] = {
+ 1.00000f, 0.875f, 0.750f, 0.625f, 0.500f, 0.375f, 0.250f, 0.125f, 0.00000f};
+
+const WORD32 ia_ec_fade_factors_fix[MAX_FADE_FRAMES + 1] = {
+ 1073741824, 939524096, 805306368, 671088640, 536870912, 402653184, 268435456, 134217728, 0};
+
+const FLOAT32 ixheaacd_exc_fade_fac[8] = { 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f };
diff --git a/decoder/ixheaacd_ec_rom.h b/decoder/ixheaacd_ec_rom.h
new file mode 100644
index 0000000..db2dc44
--- /dev/null
+++ b/decoder/ixheaacd_ec_rom.h
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_EC_ROM_H
+#define IXHEAACD_EC_ROM_H
+extern const WORD16 ia_ec_interpolation_fac[4];
+extern const FLOAT32 ia_ec_fade_factors[MAX_FADE_FRAMES + 1];
+extern const WORD32 ia_ec_fade_factors_fix[MAX_FADE_FRAMES + 1];
+extern const FLOAT32 ixheaacd_exc_fade_fac[8];
+extern const FLOAT32 lsf_init[ORDER];
+extern const FLOAT32 ixheaacd_gamma_table[17];
+#endif /* IXHEAACD_EC_ROM_H */
diff --git a/decoder/ixheaacd_ec_struct_def.h b/decoder/ixheaacd_ec_struct_def.h
new file mode 100644
index 0000000..065fd93
--- /dev/null
+++ b/decoder/ixheaacd_ec_struct_def.h
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_EC_STRUCT_DEF_H
+#define IXHEAACD_EC_STRUCT_DEF_H
+
+typedef struct {
+ WORD32 num_sfb_long;
+ WORD32 num_sfb_short;
+ WORD16 *ptr_sfb_long;
+ WORD16 *ptr_sfb_short;
+} ia_ec_sfb_str;
+
+typedef struct {
+ WORD32 prev_sfb_nrg[MAX_SFB_EC];
+ WORD32 pres_sfb_nrg[MAX_SFB_EC];
+ WORD32 spec_coeff[BLOCK_LEN_LONG];
+} ia_ec_scratch_str;
+
+typedef struct {
+ WORD32 spectral_coeff[BLOCK_LEN_LONG];
+ WORD16 q_spec_coeff[MAX_SPEC_SCALE_LEN_EC];
+ WORD32 prev_frame_ok[2];
+ UWORD8 win_shape;
+ UWORD8 win_shape_prev;
+ WORD32 win_seq;
+ WORD32 td_frame_prev;
+ WORD32 fac_data_present;
+ UWORD8 prev_win_group_len;
+ WORD32 conceal_state;
+ WORD32 prev_core_mode;
+ WORD32 fade_idx;
+ FLOAT32 lsf4[ORDER];
+ ia_ec_sfb_str str_ec_sfb;
+ ia_ec_scratch_str *pstr_ec_scratch;
+ ia_ec_scratch_str str_ec_scratch;
+} ia_ec_state_str;
+
+#endif /* IXHEAACD_EC_STRUCT_DEF_H */
diff --git a/decoder/ixheaacd_env_calc.c b/decoder/ixheaacd_env_calc.c
index c132476..d1b23dd 100644
--- a/decoder/ixheaacd_env_calc.c
+++ b/decoder/ixheaacd_env_calc.c
@@ -39,6 +39,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -507,12 +510,10 @@ static PLATFORM_INLINE VOID ixheaacd_adapt_noise_gain_calc(
for (l = start_pos; l < end_pos; l++) {
- if (max_cols != 30)
- {
+ if (max_cols != 30) {
if ((l < MAX_COLS)) {
scale_change = (adj_e - input_e);
- }
- else {
+ } else {
scale_change = (final_e - input_e);
if (((l == MAX_COLS)) && ((start_pos < MAX_COLS))) {
@@ -521,13 +522,10 @@ static PLATFORM_INLINE VOID ixheaacd_adapt_noise_gain_calc(
ixheaacd_noise_level_rescaling(noise_level_mant, diff, bands, 2);
}
}
- }
- else
- {
+ } else {
if ((l < max_cols)) {
scale_change = (adj_e - input_e);
- }
- else {
+ } else {
scale_change = (final_e - input_e);
if (((l == max_cols)) && ((start_pos < max_cols))) {
@@ -807,8 +805,7 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
temp_val = ((max_sfb_nrg_exp + 13) >> 1);
- if (num_timeslots != 15)
- {
+ if (num_timeslots != 15) {
if ((ptr_border_vec[i] < SBR_TIME_SLOTS)) {
if ((temp_val > adj_e)) {
adj_e = (WORD16)temp_val;
@@ -820,9 +817,7 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
final_e = (WORD16)temp_val;
}
}
- }
- else
- {
+ } else {
if ((ptr_border_vec[i] < num_timeslots)) {
if ((temp_val > adj_e)) {
adj_e = (WORD16)temp_val;
@@ -886,6 +881,11 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
ptr_sbr_tables);
}
+ if (pstr_freq_band_data->freq_band_table[freq_res][0] < pstr_freq_band_data->sub_band_start) {
+ pstr_freq_band_data->sub_band_start = pstr_freq_band_data->freq_band_table[freq_res][0];
+ return IA_FATAL_ERROR;
+ }
+
ixheaacd_calc_subband_gains(
pstr_freq_band_data, ptr_frame_data, freq_res, ptr_noise_floor,
num_sf_bands[freq_res], m, i, sine_mapped_matrix, alias_red_buf,
@@ -908,21 +908,16 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
pstr_common_tables);
}
- if (max_cols != 30)
- {
+ if (max_cols != 30) {
if ((start_pos < MAX_COLS)) {
noise_e = adj_e;
- }
- else {
+ } else {
noise_e = final_e;
}
- }
- else
- {
+ } else {
if ((start_pos < max_cols)) {
noise_e = adj_e;
- }
- else {
+ } else {
noise_e = final_e;
}
}
@@ -964,15 +959,12 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
ptr_frame_data->max_qmf_subband_aac, sub_band_end, 0, first_start,
low_pow_flag);
- if (max_cols != 30)
- {
+ if (max_cols != 30) {
reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
anal_buf_real_mant, anal_buf_imag_mant,
ptr_frame_data->max_qmf_subband_aac, sub_band_end, first_start,
MAX_COLS, low_pow_flag);
- }
- else
- {
+ } else {
reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
anal_buf_real_mant, anal_buf_imag_mant,
ptr_frame_data->max_qmf_subband_aac, sub_band_end, first_start,
diff --git a/decoder/ixheaacd_env_dec.c b/decoder/ixheaacd_env_dec.c
index c53ec8f..3249c79 100644
--- a/decoder/ixheaacd_env_dec.c
+++ b/decoder/ixheaacd_env_dec.c
@@ -42,6 +42,7 @@
#include "ixheaacd_env_dec.h"
#include "ixheaacd_sbr_const.h"
#include "ixheaacd_basic_funcs.h"
+#include "ixheaacd_audioobjtypes.h"
#define add16_m(a, b) ((a) + (b))
#define sub16_m(a, b) ((a) - (b))
@@ -53,7 +54,7 @@ static VOID ixheaacd_dequant_esbr_env_data(FLOAT32 *ptr_env_sf,
WORD32 num_noise_fac, WORD32 amp_res,
FLOAT32 *ptr_noise_floor) {
WORD32 i;
- static const FLOAT32 array[2] = {0.5f, 1.0f};
+ const FLOAT32 array[2] = {0.5f, 1.0f};
FLOAT32 a_flt = array[amp_res];
for (i = 0; i < num_env_sf; i++) {
@@ -275,6 +276,8 @@ ixheaacd_wrong_timing_compensate(ia_sbr_header_data_struct *ptr_header_data,
for (i = 0; i < num_env_sf; i++) {
ptr_sbr_data->int_env_sf_arr[i] =
add16_m(ptr_sbr_data->int_env_sf_arr[i], delta_exp);
+ ptr_sbr_data->flt_env_sf_arr[i] =
+ (FLOAT32)(ptr_sbr_data->int_env_sf_arr[i]);
}
}
@@ -285,6 +288,7 @@ WORD16 ixheaacd_check_env_data(ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_sbr_data,
ia_sbr_prev_frame_data_struct *ptr_prev_data) {
WORD16 *ptr_evn_sf = ptr_sbr_data->int_env_sf_arr;
+ FLOAT32 *ptr_evn_sf_float = ptr_sbr_data->flt_env_sf_arr;
WORD16 *ptr_prev_evn_sf = ptr_prev_data->sfb_nrg_prev;
WORD32 i;
FLAG error_code = 0;
@@ -299,6 +303,7 @@ WORD16 ixheaacd_check_env_data(ia_sbr_header_data_struct *ptr_header_data,
}
if (ptr_evn_sf[i] < 0) {
ptr_evn_sf[i] = 0;
+ ptr_evn_sf_float[i] = 0;
}
}
@@ -323,7 +328,7 @@ VOID ixheaacd_dequant_env_data(ia_sbr_frame_info_data_struct *ptr_sbr_data,
WORD32 exponent;
WORD32 exp_add = (7 + NRG_EXP_OFFSET);
WORD16 *ptr_env_sf = ptr_sbr_data->int_env_sf_arr;
- static const WORD32 mant_arr[2] = {0x4000, 0x5a80};
+ const WORD32 mant_arr[2] = {0x4000, 0x5a80};
amp_res_1 = (1 - amp_res);
@@ -343,6 +348,7 @@ ixheaacd_limit_noise_floor_fac(ia_sbr_header_data_struct *ptr_header_data,
WORD32 value;
WORD32 num_nf_bands;
WORD16 *ptr_noise_floor;
+ FLOAT32 *ptr_noise_floor_flt;
num_nf_bands = ptr_header_data->pstr_freq_band_data->num_nf_bands;
@@ -351,16 +357,21 @@ ixheaacd_limit_noise_floor_fac(ia_sbr_header_data_struct *ptr_header_data,
ptr_noise_floor = ptr_sbr_data->int_noise_floor;
+ ptr_noise_floor_flt = &ptr_sbr_data->flt_noise_floor[0];
+
for (i = tot_nf_bands - 1; i >= 0; i--) {
value = *ptr_noise_floor;
if (value > MAX_NOISE_FLOOR_FAC_VAL) {
*ptr_noise_floor = MAX_NOISE_FLOOR_FAC_VAL;
+ *ptr_noise_floor_flt = MAX_NOISE_FLOOR_FAC_VAL;
} else {
if (value < MIN_NOISE_FLOOR_FAC_VAL) {
*ptr_noise_floor = MIN_NOISE_FLOOR_FAC_VAL;
+ *ptr_noise_floor_flt = MIN_NOISE_FLOOR_FAC_VAL;
}
}
ptr_noise_floor++;
+ ptr_noise_floor_flt++;
}
}
@@ -373,10 +384,20 @@ VOID ixheaacd_add_arr(WORD16 *ptr1, WORD16 *ptr2, WORD32 num) {
}
}
+VOID ixheaacd_add_farr(FLOAT32 *ptr1, FLOAT32 *ptr2, WORD32 num) {
+ WORD32 i;
+ for (i = num - 1; i >= 0; i--) {
+ *ptr2 = (*ptr2 + *ptr1);
+ ptr2++;
+ ptr1++;
+ }
+}
+
IA_ERRORCODE ixheaacd_calc_noise_floor(
ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_sbr_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data) {
+ ia_sbr_prev_frame_data_struct *ptr_prev_data,
+ WORD32 audio_object_type) {
WORD32 i;
WORD32 num_nf_bands;
WORD32 num_noise_env;
@@ -385,6 +406,7 @@ IA_ERRORCODE ixheaacd_calc_noise_floor(
WORD16 *ptr_prev_noise_floor = ptr_prev_data->prev_noise_level;
WORD16 *ptr1, *ptr2;
+ FLOAT32 *f_ptr1, *f_ptr2;
WORD32 num;
FLOAT32 *ptr_noise_floor_float = ptr_sbr_data->flt_noise_floor;
@@ -395,27 +417,35 @@ IA_ERRORCODE ixheaacd_calc_noise_floor(
ptr1 = ptr_noise_floor++;
ptr2 = ptr_noise_floor;
num = num_nf_bands - 1;
+ f_ptr1 = &ptr_noise_floor_float[0];
+ f_ptr2 = &ptr_noise_floor_float[1];
} else {
ptr1 = ptr_prev_noise_floor;
ptr2 = ptr_sbr_data->int_noise_floor;
+ f_ptr1 = &ptr_sbr_data->prev_noise_level[0];
+ f_ptr2 = &ptr_noise_floor_float[0];
num = num_nf_bands;
}
ixheaacd_add_arr(ptr1, ptr2, num);
+ ixheaacd_add_farr(f_ptr1, f_ptr2, num);
if (num_noise_env > 1) {
if (ptr_sbr_data->del_cod_dir_noise_arr[1] == DTDF_DIR_FREQ) {
ptr1 = &ptr_sbr_data->int_noise_floor[num_nf_bands];
ptr2 = &ptr_sbr_data->int_noise_floor[(num_nf_bands + 1)];
-
+ f_ptr1 = &ptr_sbr_data->flt_noise_floor[num_nf_bands];
+ f_ptr2 = &ptr_sbr_data->flt_noise_floor[(num_nf_bands + 1)];
num = num_nf_bands - 1;
} else {
ptr1 = &ptr_sbr_data->int_noise_floor[0];
ptr2 = &ptr_sbr_data->int_noise_floor[num_nf_bands];
-
+ f_ptr1 = &ptr_sbr_data->flt_noise_floor[0];
+ f_ptr2 = &ptr_sbr_data->flt_noise_floor[num_nf_bands];
num = num_nf_bands;
}
ixheaacd_add_arr(ptr1, ptr2, num);
+ ixheaacd_add_farr(f_ptr1, f_ptr2, num);
}
ixheaacd_limit_noise_floor_fac(ptr_header_data, ptr_sbr_data);
@@ -427,9 +457,12 @@ IA_ERRORCODE ixheaacd_calc_noise_floor(
ptr2 = ptr_prev_noise_floor;
memcpy(ptr2, ptr1, sizeof(WORD16) * (num_nf_bands));
-
- if ((ptr_sbr_data->coupling_mode != COUPLING_BAL) ||
- (ptr_header_data->usac_flag)) {
+ if (!ptr_header_data->usac_flag) {
+ for (i = 0; i < num_nf_bands; i++) {
+ ptr_sbr_data->prev_noise_level[i] = ptr_prev_noise_floor[i];
+ }
+ }
+ if (audio_object_type != AOT_ER_AAC_ELD) {
WORD32 noise_floor_exp, tot_nf_bands;
tot_nf_bands = (num_nf_bands * num_noise_env);
@@ -442,6 +475,20 @@ IA_ERRORCODE ixheaacd_calc_noise_floor(
*ptr_noise_floor_float++ = *ptr_noise_floor;
*ptr_noise_floor++ = (WORD16)(0x4000 + (noise_floor_exp & MASK_FOR_EXP));
}
+ } else {
+ if (ptr_sbr_data->coupling_mode != COUPLING_BAL) {
+ WORD32 noise_floor_exp, tot_nf_bands;
+
+ tot_nf_bands = (num_nf_bands * num_noise_env);
+ ptr_noise_floor = &ptr_sbr_data->int_noise_floor[0];
+
+ for (i = 0; i < tot_nf_bands; i++) {
+ noise_floor_exp =
+ (NOISE_FLOOR_OFFSET_INT + 1 + NOISE_EXP_OFFSET - *ptr_noise_floor);
+ *ptr_noise_floor_float++ = *ptr_noise_floor;
+ *ptr_noise_floor++ = (WORD16)(0x4000 + (noise_floor_exp & MASK_FOR_EXP));
+ }
+ }
}
return IA_NO_ERROR;
}
@@ -449,9 +496,11 @@ IA_ERRORCODE ixheaacd_calc_noise_floor(
IA_ERRORCODE ixheaacd_dec_sbrdata_for_pvc(
ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_sbr_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data) {
+ ia_sbr_prev_frame_data_struct *ptr_prev_data,
+ WORD32 audio_object_type) {
WORD32 err = 0;
- err = ixheaacd_calc_noise_floor(ptr_header_data, ptr_sbr_data, ptr_prev_data);
+ err = ixheaacd_calc_noise_floor(ptr_header_data, ptr_sbr_data, ptr_prev_data,
+ audio_object_type);
if (err) return err;
if (!ptr_sbr_data->coupling_mode) {
@@ -547,8 +596,8 @@ VOID ixheaacd_sbr_env_dequant_coup(
WORD32 i;
FLOAT32 temp_l, temp_r;
- static const FLOAT32 pan_offset[2] = {24.0f, 12.0f};
- static const FLOAT32 a_arr[2] = {0.5f, 1.0f};
+ const FLOAT32 pan_offset[2] = {24.0f, 12.0f};
+ const FLOAT32 a_arr[2] = {0.5f, 1.0f};
FLOAT32 a = a_arr[amp_res];
@@ -576,28 +625,34 @@ VOID ixheaacd_sbr_env_dequant_coup(
(1 + pow(2, temp_r - pan_offset[1])));
}
}
-IA_ERRORCODE ixheaacd_dec_sbrdata(
- ia_sbr_header_data_struct *ptr_header_data_ch_0,
- ia_sbr_header_data_struct *ptr_header_data_ch_1,
- ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_0,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
- ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_1,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
- ixheaacd_misc_tables *ptr_common_tables, WORD32 ldmps_present) {
+IA_ERRORCODE ixheaacd_dec_sbrdata(ia_sbr_header_data_struct *ptr_header_data_ch_0,
+ ia_sbr_header_data_struct *ptr_header_data_ch_1,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_0,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_1,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
+ ixheaacd_misc_tables *ptr_common_tables, WORD32 ldmps_present,
+ WORD32 audio_object_type, WORD32 ec_flag) {
FLAG error_code;
WORD32 err = 0;
- WORD32 usac_flag = ptr_header_data_ch_0->usac_flag;
+ WORD16 temp_sfb_nrg_prev[MAX_FREQ_COEFFS];
+ WORD32 usac_flag = ptr_header_data_ch_0->usac_flag |
+ ptr_header_data_ch_0->enh_sbr;
- err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0,
- ptr_prev_data_ch_0, ptr_prev_data_ch_1,
- ptr_common_tables);
+ if (ec_flag) {
+ memcpy(temp_sfb_nrg_prev, ptr_prev_data_ch_0->sfb_nrg_prev, MAX_FREQ_COEFFS * sizeof(WORD16));
+ }
+
+ err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
+ ptr_prev_data_ch_1, ptr_common_tables, audio_object_type, ec_flag);
if (err) return err;
err = ixheaacd_calc_noise_floor(ptr_header_data_ch_0, ptr_sbr_data_ch_0,
- ptr_prev_data_ch_0);
+ ptr_prev_data_ch_0, audio_object_type);
if (err) return err;
- if ((!ptr_sbr_data_ch_0->coupling_mode && usac_flag) || ldmps_present) {
+ if ((!ptr_sbr_data_ch_0->coupling_mode &&
+ ((usac_flag) && (audio_object_type != AOT_ER_AAC_ELD))) || ldmps_present) {
ptr_sbr_data_ch_0->num_noise_sfac =
ptr_header_data_ch_0->pstr_freq_band_data->num_nf_bands *
ptr_sbr_data_ch_0->str_frame_info_details.num_noise_env;
@@ -610,18 +665,19 @@ IA_ERRORCODE ixheaacd_dec_sbrdata(
if (ptr_sbr_data_ch_1 != NULL) {
error_code = ptr_header_data_ch_0->err_flag;
- err = ixheaacd_dec_envelope(ptr_header_data_ch_1, ptr_sbr_data_ch_1,
- ptr_prev_data_ch_1, ptr_prev_data_ch_0,
- ptr_common_tables);
+ err =
+ ixheaacd_dec_envelope(ptr_header_data_ch_1, ptr_sbr_data_ch_1, ptr_prev_data_ch_1,
+ ptr_prev_data_ch_0, ptr_common_tables, audio_object_type, ec_flag);
if (err) return err;
err = ixheaacd_calc_noise_floor(ptr_header_data_ch_1, ptr_sbr_data_ch_1,
- ptr_prev_data_ch_1);
+ ptr_prev_data_ch_1, audio_object_type);
if (err) return err;
- if (!ptr_sbr_data_ch_1->coupling_mode && usac_flag) {
+ if (!ptr_sbr_data_ch_1->coupling_mode &&
+ ((usac_flag) && (audio_object_type != AOT_ER_AAC_ELD))) {
ptr_sbr_data_ch_1->num_noise_sfac =
ptr_header_data_ch_1->pstr_freq_band_data->num_nf_bands *
ptr_sbr_data_ch_1->str_frame_info_details.num_noise_env;
@@ -631,14 +687,27 @@ IA_ERRORCODE ixheaacd_dec_sbrdata(
ptr_sbr_data_ch_1->num_noise_sfac, ptr_sbr_data_ch_1->amp_res,
ptr_sbr_data_ch_1->flt_noise_floor);
}
+ if (ec_flag) {
+ if ((!ptr_header_data_ch_0->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
+ if (!error_code && ptr_header_data_ch_0->err_flag) {
+ memcpy(ptr_prev_data_ch_0->sfb_nrg_prev, temp_sfb_nrg_prev,
+ MAX_FREQ_COEFFS * sizeof(WORD16));
+ err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
+ ptr_prev_data_ch_1, ptr_common_tables, audio_object_type,
+ ec_flag);
+
+ if (err) return err;
+ }
+ }
+ } else {
+ if ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
+ if (!error_code && ptr_header_data_ch_0->err_flag) {
+ err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
+ ptr_prev_data_ch_1, ptr_common_tables, audio_object_type,
+ ec_flag);
- if (!usac_flag) {
- if (!error_code && ptr_header_data_ch_0->err_flag) {
- err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0,
- ptr_prev_data_ch_0, ptr_prev_data_ch_1,
- ptr_common_tables);
-
- if (err) return err;
+ if (err) return err;
+ }
}
}
@@ -655,16 +724,17 @@ IA_ERRORCODE ixheaacd_dec_sbrdata(
return 0;
}
-IA_ERRORCODE ixheaacd_dec_envelope(
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_sbr_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
- ixheaacd_misc_tables *pstr_common_tables) {
+IA_ERRORCODE ixheaacd_dec_envelope(ia_sbr_header_data_struct *ptr_header_data,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
+ ixheaacd_misc_tables *pstr_common_tables,
+ WORD32 audio_object_type, WORD32 ec_flag) {
FLAG error_code;
WORD32 err;
WORD16 env_sf_local_arr[MAX_FREQ_COEFFS];
- WORD32 usac_flag = ptr_header_data->usac_flag;
+ WORD32 enh_sbr = ptr_header_data->enh_sbr;
+ WORD32 usac_flag = enh_sbr | ptr_header_data->usac_flag;
WORD32 temp_1 =
ptr_prev_data_ch_0->end_position - ptr_header_data->num_time_slots;
@@ -679,16 +749,27 @@ IA_ERRORCODE ixheaacd_dec_envelope(
ptr_header_data->err_flag_prev = 1;
}
}
+ if (ec_flag) {
+ if (ptr_header_data->err_flag_prev && (!ptr_header_data->err_flag)) {
+ if (ptr_sbr_data->del_cod_dir_arr[0] != 0) {
+ ptr_header_data->err_flag = 1;
+ }
+ }
+ }
+ if (ec_flag && ptr_header_data->err_flag &&
+ ((!ptr_header_data->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD))) {
+ ixheaacd_lean_sbrconcealment(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
- if (ptr_header_data->err_flag && !usac_flag) {
- ixheaacd_lean_sbrconcealment(ptr_header_data, ptr_sbr_data,
- ptr_prev_data_ch_0);
+ ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
+ } else if (ptr_header_data->err_flag &&
+ ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD))) {
+ ixheaacd_lean_sbrconcealment(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
- ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data,
- ptr_prev_data_ch_0);
+ ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
} else {
WORD32 num = ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH];
- if (ptr_header_data->err_flag_prev && !usac_flag) {
+ if (ptr_header_data->err_flag_prev && ((!usac_flag) ||
+ (audio_object_type == AOT_ER_AAC_ELD))) {
WORD16 *ptr1, *ptr2;
WORD32 i;
@@ -729,7 +810,7 @@ IA_ERRORCODE ixheaacd_dec_envelope(
ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data,
ptr_prev_data_ch_0);
- if (!usac_flag) {
+ if ((!usac_flag)||(audio_object_type == AOT_ER_AAC_ELD)) {
error_code = ixheaacd_check_env_data(ptr_header_data, ptr_sbr_data,
ptr_prev_data_ch_0);
@@ -739,17 +820,24 @@ IA_ERRORCODE ixheaacd_dec_envelope(
memcpy(ptr_prev_data_ch_0->sfb_nrg_prev, env_sf_local_arr,
sizeof(WORD16) * MAX_FREQ_COEFFS);
- err = ixheaacd_dec_envelope(ptr_header_data, ptr_sbr_data,
- ptr_prev_data_ch_0, ptr_prev_data_ch_1,
- pstr_common_tables);
+ err = ixheaacd_dec_envelope(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0,
+ ptr_prev_data_ch_1, pstr_common_tables, audio_object_type,
+ ec_flag);
if (err) return err;
return 0;
}
}
}
- if (!usac_flag)
- ixheaacd_dequant_env_data(ptr_sbr_data, ptr_sbr_data->amp_res);
+ if (ec_flag) {
+ if ((!ptr_header_data->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
+ ixheaacd_dequant_env_data(ptr_sbr_data, ptr_sbr_data->amp_res);
+ }
+ } else {
+ if ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
+ ixheaacd_dequant_env_data(ptr_sbr_data, ptr_sbr_data->amp_res);
+ }
+ }
return 0;
}
diff --git a/decoder/ixheaacd_env_dec.h b/decoder/ixheaacd_env_dec.h
index 2e9ad26..eee877a 100644
--- a/decoder/ixheaacd_env_dec.h
+++ b/decoder/ixheaacd_env_dec.h
@@ -20,19 +20,20 @@
#ifndef IXHEAACD_ENV_DEC_H
#define IXHEAACD_ENV_DEC_H
-IA_ERRORCODE ixheaacd_dec_sbrdata(
- ia_sbr_header_data_struct *ptr_header_data_ch_0,
- ia_sbr_header_data_struct *ptr_header_data_ch_1,
- ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_0,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
- ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_1,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
- ixheaacd_misc_tables *ptr_common_tables, WORD32 ldmps_present);
+IA_ERRORCODE ixheaacd_dec_sbrdata(ia_sbr_header_data_struct *ptr_header_data_ch_0,
+ ia_sbr_header_data_struct *ptr_header_data_ch_1,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_0,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_0,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data_ch_1,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
+ ixheaacd_misc_tables *ptr_common_tables, WORD32 ldmps_present,
+ WORD32 audio_object_type, WORD32 ec_flag);
IA_ERRORCODE ixheaacd_dec_sbrdata_for_pvc(
ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_sbr_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data);
+ ia_sbr_prev_frame_data_struct *ptr_prev_data,
+ WORD32 audio_object_type);
VOID ixheaacd_harm_idx_onethreelp(WORD32 *ptr_real_buf, WORD16 *ptr_gain_buf,
WORD scale_change, WORD16 *ptr_sine_level_buf,
@@ -57,12 +58,12 @@ VOID ixheaacd_harm_idx_onethree(FLAG noise_absc_flag, WORD16 num_subband,
WORD16 *ptr_sine_level_buf, WORD16 noise_e,
WORD freq_inv_flag, WORD32 harm_index);
-IA_ERRORCODE ixheaacd_dec_envelope(
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_sbr_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data,
- ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
- ixheaacd_misc_tables *pstr_common_tables);
+IA_ERRORCODE ixheaacd_dec_envelope(ia_sbr_header_data_struct *ptr_header_data,
+ ia_sbr_frame_info_data_struct *ptr_sbr_data,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data,
+ ia_sbr_prev_frame_data_struct *ptr_prev_data_ch_1,
+ ixheaacd_misc_tables *pstr_common_tables,
+ WORD32 audio_object_type, WORD32 ec_flag);
VOID ixheaacd_lean_sbrconcealment(ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_sbr_data,
diff --git a/decoder/ixheaacd_env_extr.c b/decoder/ixheaacd_env_extr.c
index 5c0e3db..642a18d 100644
--- a/decoder/ixheaacd_env_extr.c
+++ b/decoder/ixheaacd_env_extr.c
@@ -305,7 +305,7 @@ static VOID ixheaacd_read_sbr_addi_data(
}
WORD32 ixheaacd_ssc_huff_dec(ia_huffman_data_type t_huff,
- ia_handle_bit_buf_struct it_bit_buff) {
+ ia_bit_buf_struct *it_bit_buff) {
WORD32 index;
WORD32 value, bit;
WORD16 cw;
@@ -538,24 +538,18 @@ static WORD16 ixheaacd_validate_frame_info(
if (start_pos > SBR_OV_SLOTS) return 0;
if (audio_object_type != AOT_ER_AAC_ELD &&
audio_object_type != AOT_ER_AAC_LD) {
- if (num_time_slots != 15)
- {
+ if (num_time_slots != 15) {
if (end_pos < SBR_TIME_SLOTS) return 0;
- }
- else
- {
+ } else {
if (end_pos < num_time_slots) return 0;
}
} else {
if (end_pos < num_time_slots) return 0;
}
- if (num_time_slots != 15)
- {
+ if (num_time_slots != 15) {
if (end_pos > add_d(SBR_TIME_SLOTS, SBR_OV_SLOTS)) return 0;
- }
- else
- {
+ } else {
if (end_pos > add_d(num_time_slots, SBR_OV_SLOTS)) return 0;
}
@@ -580,10 +574,132 @@ static WORD16 ixheaacd_validate_frame_info(
return 1;
}
-static VOID ixheaacd_read_extn_data(ia_sbr_header_data_struct *ptr_header_data,
- ia_ps_dec_struct *ptr_ps_dec,
- ia_bit_buf_struct *it_bit_buff,
- ia_ps_tables_struct *ps_tables_ptr) {
+static WORD16 ixheaacd_read_enh_sbr_data(
+ ia_sbr_header_data_struct *ptr_header_data,
+ ia_bit_buf_struct *it_bit_buff,
+ VOID *p_frame_data,
+ WORD32 ele_id) {
+ WORD32 tmp = 0;
+ WORD16 num_bits_read = 0;
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PRE_FLAT_BITS);
+ ptr_header_data->pre_proc_flag = tmp;
+ num_bits_read += ESBR_PRE_FLAT_BITS;
+
+ if (ele_id == SBR_ID_SCE) {
+ ia_sbr_frame_info_data_struct *ptr_frame_data =
+ (ia_sbr_frame_info_data_struct *)p_frame_data;
+
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
+ ptr_frame_data->sbr_patching_mode = tmp;
+ num_bits_read += ESBR_PATCHING_MODE_BITS;
+
+ if (tmp == 0) {
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
+ ptr_frame_data->over_sampling_flag = tmp;
+ num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
+
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS);
+ num_bits_read += ESBR_PITCHIN_FLAG_BITS;
+
+ if (tmp) {
+ tmp =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
+ ptr_frame_data->pitch_in_bins = tmp;
+ num_bits_read += ESBR_PITCHIN_BINS_BITS;
+ } else {
+ ptr_frame_data->pitch_in_bins = 0;
+ }
+ } else {
+ ptr_frame_data->over_sampling_flag = 0;
+ ptr_frame_data->pitch_in_bins = 0;
+ }
+ } else if (ele_id == SBR_ID_CPE) {
+ ia_sbr_frame_info_data_struct **ptr_frame_data =
+ (ia_sbr_frame_info_data_struct **)p_frame_data;
+ if (ptr_frame_data[0]->coupling_mode) {
+ ptr_frame_data[0]->sbr_patching_mode =
+ ptr_frame_data[1]->sbr_patching_mode =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
+ num_bits_read += ESBR_PATCHING_MODE_BITS;
+
+ if (ptr_frame_data[0]->sbr_patching_mode == 0) {
+ ptr_frame_data[0]->over_sampling_flag =
+ ptr_frame_data[1]->over_sampling_flag =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
+ num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
+ num_bits_read += ESBR_PITCHIN_FLAG_BITS;
+ if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
+ ptr_frame_data[0]->pitch_in_bins =
+ ptr_frame_data[1]->pitch_in_bins =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
+ num_bits_read += ESBR_PITCHIN_BINS_BITS;
+ } else {
+ ptr_frame_data[0]->pitch_in_bins = 0;
+ ptr_frame_data[1]->pitch_in_bins = 0;
+ }
+ } else {
+ ptr_frame_data[0]->over_sampling_flag = 0;
+ ptr_frame_data[0]->pitch_in_bins = 0;
+
+ ptr_frame_data[1]->over_sampling_flag = 0;
+ ptr_frame_data[1]->pitch_in_bins = 0;
+ }
+ } else {
+ ptr_frame_data[0]->sbr_patching_mode =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
+ num_bits_read += ESBR_PATCHING_MODE_BITS;
+
+ if (ptr_frame_data[0]->sbr_patching_mode == 0) {
+ ptr_frame_data[0]->over_sampling_flag =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
+ num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
+ num_bits_read += ESBR_PITCHIN_FLAG_BITS;
+ if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
+ ptr_frame_data[0]->pitch_in_bins =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
+ num_bits_read += ESBR_PITCHIN_BINS_BITS;
+ } else {
+ ptr_frame_data[0]->pitch_in_bins = 0;
+ }
+ } else {
+ ptr_frame_data[0]->over_sampling_flag = 0;
+ ptr_frame_data[0]->pitch_in_bins = 0;
+ }
+
+ ptr_frame_data[1]->sbr_patching_mode =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
+ num_bits_read += ESBR_PATCHING_MODE_BITS;
+
+ if (ptr_frame_data[1]->sbr_patching_mode == 0) {
+ ptr_frame_data[1]->over_sampling_flag =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
+ num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
+ num_bits_read += ESBR_PITCHIN_FLAG_BITS;
+ if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
+ ptr_frame_data[1]->pitch_in_bins =
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
+ num_bits_read += ESBR_PITCHIN_BINS_BITS;
+ } else {
+ ptr_frame_data[1]->pitch_in_bins = 0;
+ }
+ } else {
+ ptr_frame_data[1]->over_sampling_flag =
+ ptr_frame_data[1]->pitch_in_bins = 0;
+ }
+ }
+ }
+ if (num_bits_read < 6) {
+ ixheaacd_read_bits_buf(it_bit_buff, 6 - num_bits_read);
+ num_bits_read = 6;
+ }
+ return num_bits_read;
+}
+
+static IA_ERRORCODE ixheaacd_read_extn_data(ia_sbr_header_data_struct *ptr_header_data,
+ ia_ps_dec_struct *ptr_ps_dec,
+ ia_bit_buf_struct *it_bit_buff,
+ ia_ps_tables_struct *ps_tables_ptr,
+ VOID *p_frame_data, WORD32 ele_id) {
WORD i;
WORD extended_data;
WORD no_bits_left;
@@ -604,6 +720,9 @@ static VOID ixheaacd_read_extn_data(ia_sbr_header_data_struct *ptr_header_data,
no_bits_left = (cnt << 3);
+ ptr_header_data->hbe_flag = !ptr_header_data->usac_flag;
+ ptr_header_data->sbr_ratio_idx = SBR_UPSAMPLE_IDX_2_1;
+
while (no_bits_left > 7) {
WORD extension_id = ixheaacd_read_bits_buf(it_bit_buff, SBR_CONT_ID_BITS);
@@ -613,22 +732,33 @@ static VOID ixheaacd_read_extn_data(ia_sbr_header_data_struct *ptr_header_data,
case EXTENSION_ID_PS_CODING:
if (ptr_ps_dec == NULL) {
- return;
+ return 0;
}
if (!(ptr_ps_dec->force_mono || ps_read)) {
- no_bits_left =
- (no_bits_left - ixheaacd_read_ps_data(ptr_ps_dec, it_bit_buff,
- (WORD16)no_bits_left,
- ps_tables_ptr));
-
- if (no_bits_left < 0) return;
+ IA_ERRORCODE ret_val = ixheaacd_read_ps_data(ptr_ps_dec, it_bit_buff,
+ (WORD16)no_bits_left, ps_tables_ptr);
+ if (ret_val == IA_FATAL_ERROR) {
+ return ret_val;
+ } else {
+ no_bits_left = no_bits_left - ret_val;
+ }
+ if (no_bits_left < 0) return 0;
ptr_header_data->channel_mode = PS_STEREO;
ps_read = 1;
break;
}
-
+ case EXTENSION_ID_ENHSBR_CODING: {
+ ptr_header_data->enh_sbr = 1;
+ no_bits_left =
+ (no_bits_left - ixheaacd_read_enh_sbr_data(ptr_header_data, it_bit_buff,
+ p_frame_data, ele_id));
+
+ ptr_header_data->hbe_flag = 1;
+ ptr_header_data->sbr_ratio_idx = SBR_UPSAMPLE_IDX_2_1;
+ break;
+ }
default:
cnt = (no_bits_left >> 3);
for (i = cnt - 1; i >= 0; i--) ixheaacd_read_bits_buf(it_bit_buff, 8);
@@ -637,11 +767,10 @@ static VOID ixheaacd_read_extn_data(ia_sbr_header_data_struct *ptr_header_data,
}
}
- if (no_bits_left < 0) return;
-
+ if (no_bits_left < 0) return 0;
ixheaacd_read_bits_buf(it_bit_buff, no_bits_left);
}
- return;
+ return 0;
}
WORD32 ixheaacd_sbr_read_pvc_sce(ia_sbr_frame_info_data_struct *ptr_frame_data,
@@ -683,7 +812,7 @@ WORD32 ixheaacd_sbr_read_pvc_sce(ia_sbr_frame_info_data_struct *ptr_frame_data,
for (i = 0; i < ptr_header_data->pstr_freq_band_data->num_nf_bands; i++) {
ptr_frame_data->sbr_invf_mode_prev[i] = ptr_frame_data->sbr_invf_mode[i];
ptr_frame_data->sbr_invf_mode[i] =
- (WORD32)ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
}
ptr_pvc_data->pvc_mode = ptr_header_data->pvc_mode;
@@ -707,11 +836,11 @@ WORD32 ixheaacd_sbr_read_pvc_sce(ia_sbr_frame_info_data_struct *ptr_frame_data,
return err_code;
}
-IA_ERRORCODE ixheaacd_sbr_read_sce(
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_frame_data, ia_ps_dec_struct *ptr_ps_dec,
- ia_bit_buf_struct *it_bit_buff, ia_sbr_tables_struct *ptr_sbr_tables,
- WORD audio_object_type) {
+IA_ERRORCODE ixheaacd_sbr_read_sce(ia_sbr_header_data_struct *ptr_header_data,
+ ia_sbr_frame_info_data_struct *ptr_frame_data,
+ ia_ps_dec_struct *ptr_ps_dec, ia_bit_buf_struct *it_bit_buff,
+ ia_sbr_tables_struct *ptr_sbr_tables, WORD audio_object_type,
+ WORD32 ec_flag) {
WORD32 bit;
WORD32 i;
WORD32 hbe_flag = ptr_header_data->hbe_flag;
@@ -785,7 +914,7 @@ IA_ERRORCODE ixheaacd_sbr_read_sce(
for (i = 0; i < num_if_bands; i++) {
ptr_frame_data->sbr_invf_mode_prev[i] = ptr_frame_data->sbr_invf_mode[i];
ptr_frame_data->sbr_invf_mode[i] =
- (WORD32)ixheaacd_read_bits_buf(it_bit_buff, SBR_INVERSE_FILT_MODE_BITS);
+ ixheaacd_read_bits_buf(it_bit_buff, SBR_INVERSE_FILT_MODE_BITS);
}
if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data, it_bit_buff,
@@ -810,8 +939,15 @@ IA_ERRORCODE ixheaacd_sbr_read_sce(
}
if (!usac_flag) {
- ixheaacd_read_extn_data(ptr_header_data, ptr_ps_dec, it_bit_buff,
- ptr_sbr_tables->ps_tables_ptr);
+ IA_ERRORCODE err =
+ ixheaacd_read_extn_data(ptr_header_data, ptr_ps_dec, it_bit_buff,
+ ptr_sbr_tables->ps_tables_ptr, ptr_frame_data, SBR_ID_SCE);
+ if (err == IA_FATAL_ERROR) {
+ if (ec_flag)
+ return 0;
+ else
+ return err;
+ }
}
return 1;
@@ -959,7 +1095,7 @@ IA_ERRORCODE ixheaacd_sbr_read_cpe(
ptr_frame_data[1]->sbr_invf_mode[i];
ptr_frame_data[0]->sbr_invf_mode[i] =
- (WORD32)ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
+ ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
ptr_frame_data[1]->sbr_invf_mode[i] = ptr_frame_data[0]->sbr_invf_mode[i];
}
@@ -1001,12 +1137,14 @@ IA_ERRORCODE ixheaacd_sbr_read_cpe(
for (i = 0; i < num_if_bands; i++) {
ptr_frame_data[k]->sbr_invf_mode_prev[i] =
ptr_frame_data[k]->sbr_invf_mode[i];
- ptr_frame_data[k]->sbr_invf_mode[i] = (WORD32)ixheaacd_read_bits_buf(
+ ptr_frame_data[k]->sbr_invf_mode[i] = ixheaacd_read_bits_buf(
it_bit_buff, SBR_INVERSE_FILT_MODE_BITS);
}
}
if (ptr_frame_data[0]->coupling_mode) {
+ memcpy(ptr_frame_data[1]->sbr_invf_mode_prev, ptr_frame_data[1]->sbr_invf_mode,
+ sizeof(ptr_frame_data[1]->sbr_invf_mode_prev[0]) * num_if_bands);
memcpy(ptr_frame_data[1]->sbr_invf_mode, ptr_frame_data[0]->sbr_invf_mode,
sizeof(WORD32) * num_if_bands);
@@ -1059,8 +1197,12 @@ IA_ERRORCODE ixheaacd_sbr_read_cpe(
}
if (!usac_flag) {
- ixheaacd_read_extn_data(ptr_header_data, NULL, it_bit_buff,
- ptr_sbr_tables->ps_tables_ptr);
+ IA_ERRORCODE err =
+ ixheaacd_read_extn_data(ptr_header_data, NULL, it_bit_buff, ptr_sbr_tables->ps_tables_ptr,
+ (VOID *)ptr_frame_data, SBR_ID_CPE);
+ if (err == IA_FATAL_ERROR) {
+ return err;
+ }
}
return 1;
}
@@ -1184,10 +1326,10 @@ VOID ixheaacd_read_env_data(ia_sbr_frame_info_data_struct *ptr_frame_data,
if (usac_flag && (num_noise_env == 0)) {
ptr_frame_data->inter_temp_shape_mode[j] = 0;
if (ptr_frame_data->inter_tes_flag) {
- WORD32 flag = (WORD32)ixheaacd_read_bits_buf(it_bit_buff, 1);
+ WORD32 flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
if (flag) {
ptr_frame_data->inter_temp_shape_mode[j] =
- (WORD32)ixheaacd_read_bits_buf(it_bit_buff, 2);
+ ixheaacd_read_bits_buf(it_bit_buff, 2);
}
}
}
@@ -1589,12 +1731,10 @@ WORD16 ixheaacd_sbr_time_freq_grid_info(
ixheaacd_read_bits_buf(it_bit_buff, SBR_ENV_BITS + SBR_FRQ_RES_BITS);
bs_num_env = (temp & 0x6) >> SBR_FRQ_RES_BITS;
- if (number_of_time_slots != 15)
- {
+ if (number_of_time_slots != 15) {
p_fixfix_tab = &env_extr_tables_ptr->sbr_frame_info1_2_4_16[bs_num_env];
- }
- else
- {
+ } else {
+ if (bs_num_env > 2) return 0;
p_fixfix_tab = &env_extr_tables_ptr->sbr_frame_info1_2_4_16[bs_num_env + 4];
}
@@ -1614,12 +1754,9 @@ WORD16 ixheaacd_sbr_time_freq_grid_info(
bs_num_env = bs_num_rel + 1;
p_frame_info->border_vec[0] = 0;
- if (number_of_time_slots != 15)
- {
+ if (number_of_time_slots != 15) {
border = bs_var_bord + SBR_TIME_SLOTS;
- }
- else
- {
+ } else {
border = bs_var_bord + number_of_time_slots;
}
@@ -1667,24 +1804,18 @@ WORD16 ixheaacd_sbr_time_freq_grid_info(
temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_REL_BITS);
border = border + ((temp << 1) + 2);
- if (number_of_time_slots != 15)
- {
+ if (number_of_time_slots != 15) {
if (border > SBR_TIME_SLOTS) border = SBR_TIME_SLOTS;
- }
- else
- {
+ } else {
if (border > number_of_time_slots) border = number_of_time_slots;
}
p_frame_info->border_vec[k] = border;
}
- if (number_of_time_slots != 15)
- {
+ if (number_of_time_slots != 15) {
p_frame_info->border_vec[k] = SBR_TIME_SLOTS;
- }
- else
- {
+ } else {
p_frame_info->border_vec[k] = number_of_time_slots;
}
@@ -1725,13 +1856,10 @@ WORD16 ixheaacd_sbr_time_freq_grid_info(
abs_bord_lead = ixheaacd_read_bits_buf(
it_bit_buff, 2 * SBR_VAR_BORD_BITS + 2 * SBR_NUM_BITS);
- if (number_of_time_slots != 15)
- {
+ if (number_of_time_slots != 15) {
abs_bord_trail =
(((abs_bord_lead & 0x30) >> (2 * SBR_NUM_BITS)) + SBR_TIME_SLOTS);
- }
- else
- {
+ } else {
abs_bord_trail =
(((abs_bord_lead & 0x30) >> (2 * SBR_NUM_BITS)) + number_of_time_slots);
}
diff --git a/decoder/ixheaacd_env_extr.h b/decoder/ixheaacd_env_extr.h
index b6eea96..b7b98f6 100644
--- a/decoder/ixheaacd_env_extr.h
+++ b/decoder/ixheaacd_env_extr.h
@@ -119,11 +119,11 @@ typedef struct {
} ia_sbr_frame_info_data_struct;
-IA_ERRORCODE ixheaacd_sbr_read_sce(
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_frame_data, ia_ps_dec_struct *ptr_ps_dec,
- ia_bit_buf_struct *it_bit_buff, ia_sbr_tables_struct *ptr_sbr_tables,
- WORD audio_object_type);
+IA_ERRORCODE ixheaacd_sbr_read_sce(ia_sbr_header_data_struct *ptr_header_data,
+ ia_sbr_frame_info_data_struct *ptr_frame_data,
+ ia_ps_dec_struct *ptr_ps_dec, ia_bit_buf_struct *it_bit_buff,
+ ia_sbr_tables_struct *ptr_sbr_tables, WORD audio_object_type,
+ WORD32 ec_flag);
IA_ERRORCODE ixheaacd_sbr_read_cpe(
ia_sbr_header_data_struct *ptr_header_data,
@@ -171,11 +171,12 @@ VOID ixheaacd_huffman_decode(WORD32 it_bit_buff, WORD16 *h_index, WORD16 *len,
const UWORD16 *input_table,
const UWORD32 *idx_table);
-IA_ERRORCODE ixheaacd_createlimiterbands(
- WORD32 lim_table[4][12 + 1], WORD32 gate_mode[4], WORD16 *freq_band_tbl,
- WORD32 ixheaacd_num_bands, WORD32 x_over_qmf[MAX_NUM_PATCHES],
- WORD32 b_patching_mode, WORD32 upsamp_4_flag,
- struct ixheaacd_lpp_trans_patch *patch_param);
+IA_ERRORCODE ixheaacd_createlimiterbands(WORD32 lim_table[4][12 + 1], WORD32 gate_mode[4],
+ WORD16 *freq_band_tbl, WORD32 ixheaacd_num_bands,
+ WORD32 x_over_qmf[MAX_NUM_PATCHES],
+ WORD32 b_patching_mode, WORD32 upsamp_4_flag,
+ struct ixheaacd_lpp_trans_patch *patch_param,
+ WORD32 ec_flag);
WORD32 ixheaacd_apply_inter_tes(FLOAT32 *qmf_real1, FLOAT32 *qmf_imag1,
FLOAT32 *qmf_real, FLOAT32 *qmf_imag,
diff --git a/decoder/ixheaacd_env_extr_part.h b/decoder/ixheaacd_env_extr_part.h
index fc38546..13d9605 100644
--- a/decoder/ixheaacd_env_extr_part.h
+++ b/decoder/ixheaacd_env_extr_part.h
@@ -92,6 +92,11 @@ typedef struct {
WORD32 usac_flag;
UWORD8 pvc_mode;
+ FLAG enh_sbr;
+ FLAG esbr_hq;
+ FLAG enh_sbr_ps;
+ FLAG eld_sbr;
+
} ia_sbr_header_data_struct;
typedef struct {
diff --git a/decoder/ixheaacd_error_codes.h b/decoder/ixheaacd_error_codes.h
index 4794b96..930db15 100644
--- a/decoder/ixheaacd_error_codes.h
+++ b/decoder/ixheaacd_error_codes.h
@@ -24,92 +24,112 @@
/* Class 0: API Errors */
/*****************************************************************************/
/* Non Fatal Errors */
-#define IA_ENHAACPLUS_DEC_API_NONFATAL_NO_ERROR 0x00000000
-#define IA_ENHAACPLUS_DEC_API_NONFATAL_CMD_NOT_SUPPORTED 0x00000001
-#define IA_ENHAACPLUS_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED 0x00000002
+#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
+#define IA_XHEAAC_DEC_API_NONFATAL_CMD_NOT_SUPPORTED 0x00000001
+#define IA_XHEAAC_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED 0x00000002
/* Fatal Errors */
-#define IA_ENHAACPLUS_DEC_API_FATAL_INVALID_MEMTAB_INDEX 0xFFFF8000
-#define IA_ENHAACPLUS_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX 0xFFFF8001
-#define IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
-#define IA_ENHAACPLUS_DEC_API_FATAL_INVALID_CONFIG_PARAM 0xFFFF8003
-#define IA_ENHAACPLUS_DEC_API_FATAL_INVALID_EXECUTE_TYPE 0xFFFF8004
-#define IA_ENHAACPLUS_DEC_API_FATAL_INVALID_CMD 0xFFFF8005
-#define IA_ENHAACPLUS_DEC_API_FATAL_MEM_ALIGN 0xFFFF8006
+#define IA_XHEAAC_DEC_API_FATAL_INVALID_MEMTAB_INDEX 0xFFFF8000
+#define IA_XHEAAC_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX 0xFFFF8001
+#define IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
+#define IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM 0xFFFF8003
+#define IA_XHEAAC_DEC_API_FATAL_INVALID_EXECUTE_TYPE 0xFFFF8004
+#define IA_XHEAAC_DEC_API_FATAL_INVALID_CMD 0xFFFF8005
+#define IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN 0xFFFF8006
/*****************************************************************************/
/* Class 1: Configuration Errors */
/*****************************************************************************/
/* Non Fatal Errors */
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ 0x00000800
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX 0x00000801
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO 0x00000802
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE 0x00000803
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMEOK 0x00000804
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG 0x00000805
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000806
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL 0x00000807
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_FEATURE_NOT_SUPPORTED 0x00000808
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG 0x00000809
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG 0x0000080A
-
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_LOASFLAG 0x0000080B
-
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG 0x0000080C
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT 0x0000080D
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST 0x0000080E
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET 0x0000080F
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ 0x00000810
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG 0x00000811
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_DELAY_MODE 0x00000812
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_DECODE_TYPE 0x00000813
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_PEAK_LIM_FLAG 0x00000814
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_CTRL_PARAM_IDX 0x00000815
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_GAIN_DELAY 0x00000816
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_CONST_DELAY_MODE 0x00000817
-#define IA_ENHAACPLUS_DEC_CONFIG_NON_FATAL_INVALID_EFFECT_TYPE 0x00000818
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS 0x00000819
-#define IA_ENHAACPLUS_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG 0x0000081A
-
-// Fatal Errors
-#define IA_ENHAACPLUS_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE 0xFFFF8800
-
-// Class 2: Initialization Errors
-
-// Non Fatal Errors
-#define IA_ENHAACPLUS_DEC_INIT_NONFATAL_BOTH_16AND08OUT 0x00001000
-#define IA_ENHAACPLUS_DEC_INIT_NONFATAL_NO_UPSAMPLING 0x00001001
-#define IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001002
-
-// Fatal Errors
-#define IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
-#define IA_ENHAACPLUS_DEC_INIT_FATAL_EO_INPUT_REACHED 0xFFFF9001
-#define IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
-#define IA_ENHAACPLUS_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ 0x00000800
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX 0x00000801
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_PS_FLAG 0x00000802
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX_STEREO 0x00000803
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO 0x00000804
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE 0x00000805
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PEAK_LIM_FLAG_TYPE 0x00000806
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG 0x00000807
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000808
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL 0x00000809
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ERR_CONCEAL_FLAG_TYPE 0x0000080A
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG 0x0000080B
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG 0x0000080C
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG 0x0000080D
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT 0x0000080E
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST 0x0000080F
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET 0x00000810
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ 0x00000811
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG 0x00000812
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE 0x00000813
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS 0x00000814
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_HQ_FLAG 0x00000815
+#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG 0x00000816
+/* Fatal Errors */
+#define IA_XHEAAC_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE 0xFFFF8800
-// Class 3: Execution Errors
+/*****************************************************************************/
+/* Class 2: Initialization Errors */
+/*****************************************************************************/
+/* Non Fatal Errors */
+#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
+#define IA_XHEAAC_MPS_DEC_INIT_NONFATAL_INVALID_QMF_BAND 0x00001001
+#define IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL 0x00001002
+#define IA_XHEAAC_DEC_INIT_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001003
+#define IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR 0x00001004
-// Non Fatal Errors
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_SBR_TURNED_OFF 0x00001801
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_SBR_TURNED_ON 0x00001802
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL 0x00001803
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
+/* Fatal Errors */
+#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
+#define IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED 0xFFFF9001
+#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
+#define IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
+#define IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL 0xFFFF9004
+#define IA_XHEAAC_DEC_INIT_FATAL_UNIMPLEMENTED_CCE 0xFFFF9005
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
-#define IA_ENHAACPLUS_DEC_EXE_NONFATAL_INVALID_CODE_BOOK 0x0000180E
+/*****************************************************************************/
+/* Class 3: Execution Errors */
+/*****************************************************************************/
+/* Non Fatal Errors */
+#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
+#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_OFF 0x00001801
+#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON 0x00001802
+#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL 0x00001803
+#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
-// Fatal Errors
-#define IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
-#define IA_ENHAACPLUS_DEC_EXE_FATAL_TNS_RANGE_ERROR 0xFFFF9801
-#define IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
-#define IA_AACLD_DEC_EXE_FATAL_ER_PROFILE_UNSUPPORTED 0xFFFF9803
-#define IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_DRC_DATA 0xFFFF9804
+#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
+#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
+#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
+#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
+#define IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
+#define IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
+#define IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
+#define IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
+#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
+#define IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK 0x0000180E
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_CHANNEL_INDEX 0x0000180F
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SMOOTH_MODE 0x00001810
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SMGTIME 0x00001811
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE 0x00001812
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE 0x00001813
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_WINDOW_TYPE 0x00001814
+#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SIN_PARAM 0x00001815
+#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_PARSE_ERROR 0x00001816
+/* Fatal Errors */
+#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
+#define IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR 0xFFFF9801
+#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
+#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_DRC_DATA 0xFFFF9803
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_RESHAPE_INPUT 0xFFFF9804
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG 0xFFFF9805
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS 0xFFFF9806
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM 0xFFFF9807
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE 0xFFFF9808
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_INPUT_CHANNEL 0xFFFF9809
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT 0xFFFF980A
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE 0xFFFF980B
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TEMPORAL_SHAPING_CONFIG 0xFFFF980C
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET 0xFFFF980D
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE 0xFFFF980E
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_OTT_BOXES 0xFFFF980F
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS 0xFFFF9810
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM 0xFFFF9811
+#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS 0xFFFF9812
#endif /* IXHEAACD_ERROR_CODES_H */
diff --git a/decoder/ixheaacd_esbr_envcal.c b/decoder/ixheaacd_esbr_envcal.c
index da6aa2f..7b9c2c2 100644
--- a/decoder/ixheaacd_esbr_envcal.c
+++ b/decoder/ixheaacd_esbr_envcal.c
@@ -68,14 +68,12 @@ VOID ixheaacd_shellsort(WORD32 *in, WORD32 n) {
} while (inc > 1);
}
-WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
- FLOAT32 input_real[][64], FLOAT32 input_imag[][64],
- FLOAT32 input_real1[][64],
- FLOAT32 input_imag1[][64],
- WORD32 x_over_qmf[MAX_NUM_PATCHES],
- FLOAT32 *scratch_buff, FLOAT32 *env_out,
- WORD32 ldmps_present) {
- WORD32 error_code = 0;
+WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32 input_real[][64],
+ FLOAT32 input_imag[][64], FLOAT32 input_real1[][64],
+ FLOAT32 input_imag1[][64], WORD32 x_over_qmf[MAX_NUM_PATCHES],
+ FLOAT32 *scratch_buff, FLOAT32 *env_out, WORD32 ldmps_present,
+ WORD32 ec_flag) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
WORD8 harmonics[64];
FLOAT32(*env_tmp)[48];
FLOAT32(*noise_level_pvc)[48];
@@ -173,18 +171,18 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
if (reset) phase_index = 0;
if (ixheaacd_createlimiterbands(
(*lim_table), (*gate_mode),
- frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo,
- num_sf_bands[LOW], x_over_qmf, frame_data->sbr_patching_mode,
- upsamp_4_flag, &frame_data->patch_param))
+ frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
+ x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
+ ec_flag))
return IA_FATAL_ERROR;
}
if (frame_data->sbr_patching_mode != frame_data->prev_sbr_patching_mode) {
if (ixheaacd_createlimiterbands(
(*lim_table), (*gate_mode),
- frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo,
- num_sf_bands[LOW], x_over_qmf, frame_data->sbr_patching_mode,
- upsamp_4_flag, &frame_data->patch_param))
+ frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
+ x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
+ ec_flag))
return IA_FATAL_ERROR;
frame_data->prev_sbr_patching_mode = frame_data->sbr_patching_mode;
@@ -199,7 +197,13 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
ui = frame_data->pstr_sbr_header->pstr_freq_band_data
->freq_band_tbl_hi[i + 1];
tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
- if ((tmp >= 64) || (tmp < 0)) return -1;
+
+ if ((tmp >= 64) || (tmp < 0)) {
+ if (ec_flag)
+ tmp = 0;
+ else
+ return -1;
+ }
harmonics[tmp] = add_harmonics[i];
}
@@ -211,14 +215,24 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
}
for (i = 0; i < bs_num_env; i++) {
- if (kk > MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR;
- if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
- kk++, next++;
+ if (kk > MAX_NOISE_ENVELOPES) {
+ if (ec_flag)
+ kk = MAX_NOISE_ENVELOPES;
+ else
+ return IA_FATAL_ERROR;
+ }
+ if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
start_pos = p_frame_info->border_vec[i];
end_pos = p_frame_info->border_vec[i + 1];
- if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR))
- return IA_FATAL_ERROR;
+ if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
+ if (ec_flag) {
+ start_pos = 0;
+ end_pos = MAX_FREQ_COEFFS_SBR;
+ } else
+ return IA_FATAL_ERROR;
+ }
+
for (t = start_pos; t < end_pos; t++) {
band_loop_end = num_sf_bands[p_frame_info->freq_res[i]];
@@ -230,7 +244,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
for (k = 0; k < ui - li; k++) {
o = (k + li >= ui2) ? o + 1 : o;
- if (o >= MAX_NOISE_COEFFS) return IA_FATAL_ERROR;
+ if (o >= MAX_NOISE_COEFFS) {
+ if (ec_flag)
+ o = MAX_NOISE_COEFFS - 1;
+ else
+ return IA_FATAL_ERROR;
+ }
ui2 = freq_band_table_noise[o + 1];
frame_data->qmapped_pvc[c][t] =
@@ -245,14 +264,23 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
next = -1;
for (i = 0; i < bs_num_env; i++) {
- if (kk > MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR;
- if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
- kk++, next++;
+ if (kk > MAX_NOISE_ENVELOPES) {
+ if (ec_flag)
+ kk = MAX_NOISE_ENVELOPES;
+ else
+ return IA_FATAL_ERROR;
+ }
+ if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
start_pos = pvc_frame_info->border_vec[i];
end_pos = pvc_frame_info->border_vec[i + 1];
- if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR))
- return IA_FATAL_ERROR;
+ if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
+ if (ec_flag) {
+ start_pos = 0;
+ end_pos = MAX_FREQ_COEFFS_SBR;
+ } else
+ return IA_FATAL_ERROR;
+ }
for (t = start_pos; t < end_pos; t++) {
for (c = 0; c < 64; c++) {
env_tmp[c][t] = env_out[64 * t + c];
@@ -310,7 +338,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
for (k = 0; k < ui - li; k++) {
o = (k + li >= ui2) ? o + 1 : o;
- if (o >= MAX_NOISE_COEFFS) return IA_FATAL_ERROR;
+ if (o >= MAX_NOISE_COEFFS) {
+ if (ec_flag)
+ o = MAX_NOISE_COEFFS - 1;
+ else
+ return IA_FATAL_ERROR;
+ }
ui2 = freq_band_table_noise[o + 1];
nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
nrg_tone_pvc[c][t] = 0.0f;
@@ -429,7 +462,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
for (k = 0; k < ui - li; k++) {
o = (k + li >= ui2) ? o + 1 : o;
- if (o >= MAX_NOISE_COEFFS) return IA_FATAL_ERROR;
+ if (o >= MAX_NOISE_COEFFS) {
+ if (ec_flag)
+ o = MAX_NOISE_COEFFS - 1;
+ else
+ return IA_FATAL_ERROR;
+ }
ui2 = freq_band_table_noise[o + 1];
nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
nrg_tone_pvc[c][t] = 0.0f;
@@ -523,6 +561,8 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
slot_idx = (WORD32)l / rate;
if (sub_band_start & 1) {
freq_inv = -1;
+ } else {
+ freq_inv = 1;
}
for (k = 0; k < num_subbands; k++) {
@@ -580,7 +620,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
}
for (i = 0; i < bs_num_env; i++) {
- if (kk > MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR;
+ if (kk > MAX_NOISE_ENVELOPES) {
+ if (ec_flag)
+ kk = MAX_NOISE_ENVELOPES;
+ else
+ return IA_FATAL_ERROR;
+ }
if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
kk++, next++;
@@ -623,7 +668,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
for (k = 0; k < ui - li; k++) {
FLOAT64 guard = 1e-17;
o = (k + li >= ui2) ? o + 1 : o;
- if (o >= MAX_NOISE_COEFFS) return IA_FATAL_ERROR;
+ if (o >= MAX_NOISE_COEFFS) {
+ if (ec_flag)
+ o = MAX_NOISE_COEFFS - 1;
+ else
+ return IA_FATAL_ERROR;
+ }
ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
->freq_band_tbl_noise[o + 1];
nrg_ref[c] = sfb_nrg[m];
@@ -753,18 +803,16 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
}
if (ldmps_present != 1) {
- error_code = ixheaacd_apply_inter_tes(
- *(input_real1 + rate * p_frame_info->border_vec[i]),
- *(input_imag1 + rate * p_frame_info->border_vec[i]),
- *(input_real + rate * p_frame_info->border_vec[i]),
- *(input_imag + rate * p_frame_info->border_vec[i]),
- rate * p_frame_info->border_vec[i + 1] -
- rate * p_frame_info->border_vec[i],
- sub_band_start, num_subbands, frame_data->inter_temp_shape_mode[i]);
- if (error_code != 0)
- {
- return error_code;
- }
+ err_code = ixheaacd_apply_inter_tes(
+ *(input_real1 + rate * p_frame_info->border_vec[i]),
+ *(input_imag1 + rate * p_frame_info->border_vec[i]),
+ *(input_real + rate * p_frame_info->border_vec[i]),
+ *(input_imag + rate * p_frame_info->border_vec[i]),
+ rate * p_frame_info->border_vec[i + 1] - rate * p_frame_info->border_vec[i],
+ sub_band_start, num_subbands, frame_data->inter_temp_shape_mode[i]);
+ if (err_code != 0) {
+ return err_code;
+ }
for (l = rate * p_frame_info->border_vec[i];
l < rate * p_frame_info->border_vec[i + 1]; l++) {
@@ -772,6 +820,8 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
ptr_imag_buf = *(input_imag + l) + sub_band_start;
if (sub_band_start & 1) {
freq_inv = -1;
+ } else {
+ freq_inv = 1;
}
for (k = 0; k < num_subbands; k++) {
*ptr_real_buf += nrg_tone[k] * ixheaacd_hphase_tbl[0][harm_index];
@@ -815,8 +865,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
}
if ((frame_data->str_frame_info_details.num_noise_env < 1) ||
- (frame_data->str_frame_info_details.num_noise_env > 2))
- return IA_FATAL_ERROR;
+ (frame_data->str_frame_info_details.num_noise_env > 2)) {
+ if (ec_flag)
+ frame_data->str_frame_info_details.num_noise_env = 1;
+ else
+ return IA_FATAL_ERROR;
+ }
for (i = 0; i < num_nf_bands; i++) {
prev_env_noise_level[i] =
@@ -834,11 +888,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
return 0;
}
-IA_ERRORCODE ixheaacd_createlimiterbands(
- WORD32 lim_table[4][12 + 1], WORD32 gate_mode[4], WORD16 *freq_band_tbl,
- WORD32 ixheaacd_num_bands, WORD32 x_over_qmf[MAX_NUM_PATCHES],
- WORD32 b_patching_mode, WORD32 upsamp_4_flag,
- struct ixheaacd_lpp_trans_patch *patch_param) {
+IA_ERRORCODE ixheaacd_createlimiterbands(WORD32 lim_table[4][12 + 1], WORD32 gate_mode[4],
+ WORD16 *freq_band_tbl, WORD32 ixheaacd_num_bands,
+ WORD32 x_over_qmf[MAX_NUM_PATCHES],
+ WORD32 b_patching_mode, WORD32 upsamp_4_flag,
+ struct ixheaacd_lpp_trans_patch *patch_param,
+ WORD32 ec_flag) {
WORD32 i, j, k, is_patch_border[2];
WORD32 patch_borders[MAX_NUM_PATCHES + 1];
WORD32 temp_limiter_band_calc[32 + MAX_NUM_PATCHES + 1];
@@ -931,7 +986,12 @@ IA_ERRORCODE ixheaacd_createlimiterbands(
}
}
}
- if (gate_mode[i] > 12) return IA_FATAL_ERROR;
+ if (gate_mode[i] > 12) {
+ if (ec_flag)
+ gate_mode[i] = 12;
+ else
+ return IA_FATAL_ERROR;
+ }
for (k = 0; k <= gate_mode[i]; k++) {
lim_table[i][k] = temp_limiter_band_calc[k];
}
diff --git a/decoder/ixheaacd_esbr_polyphase.c b/decoder/ixheaacd_esbr_polyphase.c
index 8da3c57..8a37ca7 100644
--- a/decoder/ixheaacd_esbr_polyphase.c
+++ b/decoder/ixheaacd_esbr_polyphase.c
@@ -49,8 +49,14 @@ WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
WORD32 idx;
WORD32 anal_size = 2 * ptr_hbe_txposer->synth_size;
WORD32 N = (10 * anal_size);
+ WORD32 no_bins = ptr_hbe_txposer->no_bins >> 1;
- for (idx = 0; idx < (ptr_hbe_txposer->no_bins >> 1); idx++) {
+ if (ptr_hbe_txposer->esbr_hq != 0) {
+ anal_size = 2 * ptr_hbe_txposer->analy_size;
+ no_bins = ptr_hbe_txposer->no_bins;
+ }
+
+ for (idx = 0; idx < no_bins; idx++) {
WORD32 i, j, k, l;
FLOAT32 window_output[640];
FLOAT32 u[128], u_in[256], u_out[256];
@@ -61,7 +67,14 @@ WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
FLOAT32 *analy_cos_sin_tab = ptr_hbe_txposer->analy_cos_sin_tab;
const FLOAT32 *interp_window_coeff = ptr_hbe_txposer->analy_wind_coeff;
FLOAT32 *x = ptr_hbe_txposer->analy_buf;
-
+ if (ptr_hbe_txposer->esbr_hq != 0) {
+ memset(ptr_hbe_txposer->qmf_in_buf[idx], 0,
+ TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
+ inp_signal = ptr_hbe_txposer->ptr_output_buf +
+ idx * ptr_hbe_txposer->analy_size + 1;
+ anal_buf = &ptr_hbe_txposer->qmf_in_buf[idx]
+ [4 * ptr_hbe_txposer->a_start];
+ } else {
memset(ptr_hbe_txposer->qmf_in_buf[idx + HBE_OPER_WIN_LEN - 1], 0,
TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
@@ -69,6 +82,7 @@ WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
idx * 2 * ptr_hbe_txposer->synth_size + 1;
anal_buf = &ptr_hbe_txposer->qmf_in_buf[idx + HBE_OPER_WIN_LEN - 1]
[4 * ptr_hbe_txposer->k_start];
+ }
for (i = N - 1; i >= anal_size; i--) {
x[i] = x[i - anal_size];
@@ -89,8 +103,7 @@ WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
}
u[i] = accu_r;
}
-
- if (anal_size == 40) {
+ if (anal_size == 40 || anal_size == 56) {
for (i = 1; i < anal_size; i++) {
FLOAT32 temp1 = u[i] + u[2 * anal_size - i];
FLOAT32 temp2 = u[i] - u[2 * anal_size - i];
@@ -154,12 +167,19 @@ WORD32 ixheaacd_real_synth_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
(FLOAT32 *)&ixheaacd_cos_table_trans_qmf[0][0] +
ptr_hbe_txposer->k_start * 32;
FLOAT32 *buffer = ptr_hbe_txposer->synth_buf;
+ FLOAT32 *ptr_inp_buf = ptr_hbe_txposer->ptr_input_buf + ptr_hbe_txposer->ana_fft_size[0];
for (idx = 0; idx < num_columns; idx++) {
FLOAT32 loc_qmf_buf[64];
FLOAT32 *synth_buf_r = loc_qmf_buf;
- FLOAT32 *out_buf = ptr_hbe_txposer->ptr_input_buf +
+ FLOAT32 *out_buf;
+ if (ptr_hbe_txposer->esbr_hq == 1) {
+ out_buf = ptr_inp_buf +
+ (idx - 1) * ptr_hbe_txposer->synth_size;
+ } else {
+ out_buf = ptr_hbe_txposer->ptr_input_buf +
(idx + 1) * ptr_hbe_txposer->synth_size;
+ }
FLOAT32 *synth_cos_tab = ptr_hbe_txposer->synth_cos_tab;
const FLOAT32 *interp_window_coeff = ptr_hbe_txposer->synth_wind_coeff;
if (ptr_hbe_txposer->k_start < 0) return -1;
@@ -251,4 +271,68 @@ WORD32 ixheaacd_real_synth_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
}
}
return 0;
-} \ No newline at end of file
+}
+
+WORD32 ixheaacd_dft_hbe_cplx_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ FLOAT32 qmf_buf_real[][64],
+ FLOAT32 qmf_buf_imag[][64]) {
+ WORD32 idx;
+
+ WORD32 anal_size = ptr_hbe_txposer->analy_size;
+
+ WORD32 N = (10 * ptr_hbe_txposer->analy_size);
+
+ for (idx = 0; idx < ptr_hbe_txposer->no_bins; idx++) {
+ WORD32 i, j, k, l;
+ FLOAT32 window_output[640];
+ FLOAT32 u[128];
+ FLOAT32 accu_r, accu_i;
+ const FLOAT32 *inp_signal;
+ FLOAT32 *qmf_buf_r = &qmf_buf_real[idx][ptr_hbe_txposer->a_start];
+ FLOAT32 *qmf_buf_i = &qmf_buf_imag[idx][ptr_hbe_txposer->a_start];
+
+ const FLOAT32 *interp_window_coeff = ptr_hbe_txposer->analy_wind_coeff;
+ FLOAT32 *x = ptr_hbe_txposer->analy_buf;
+
+ memset(&qmf_buf_real[idx][ptr_hbe_txposer->a_start], 0,
+ (NO_QMF_SYNTH_CHANNELS - ptr_hbe_txposer->a_start) *
+ sizeof(qmf_buf_real[idx][ptr_hbe_txposer->a_start]));
+ memset(&qmf_buf_imag[idx][ptr_hbe_txposer->a_start], 0,
+ TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(qmf_buf_imag[idx][ptr_hbe_txposer->a_start]));
+
+ inp_signal = ptr_hbe_txposer->ptr_output_buf +
+ idx * ptr_hbe_txposer->analy_size + 1;
+
+ for (i = N - 1; i >= anal_size; i--) {
+ x[i] = x[i - anal_size];
+ }
+
+ for (i = anal_size - 1; i >= 0; i--) {
+ x[i] = inp_signal[anal_size - 1 - i];
+ }
+
+ for (i = 0; i < N; i++) {
+ window_output[i] = x[i] * interp_window_coeff[i];
+ }
+
+ for (i = 0; i < 2 * anal_size; i++) {
+ accu_r = 0.0;
+ for (j = 0; j < 5; j++) {
+ accu_r = accu_r + window_output[i + j * 2 * anal_size];
+ }
+ u[i] = accu_r;
+ }
+
+ for (k = 0; k < anal_size; k++) {
+ accu_r = 0;
+ accu_i = 0;
+ for (l = 0; l < 2 * anal_size; l++) {
+ accu_r = accu_r + u[l] * ptr_hbe_txposer->str_dft_hbe_anal_coeff.real[k][l];
+ accu_i = accu_i + u[l] * ptr_hbe_txposer->str_dft_hbe_anal_coeff.imag[k][l];
+ }
+ qmf_buf_r[k] = (FLOAT32)accu_r;
+ qmf_buf_i[k] = (FLOAT32)accu_i;
+ }
+ }
+ return 0;
+}
diff --git a/decoder/ixheaacd_esbr_rom.c b/decoder/ixheaacd_esbr_rom.c
index 9a65972..fc0748e 100644
--- a/decoder/ixheaacd_esbr_rom.c
+++ b/decoder/ixheaacd_esbr_rom.c
@@ -22,7 +22,7 @@
#include "ixheaacd_esbr_rom.h"
const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 + 200 +
- 240 + 320 + 400] = {
+ 240 + 320 + 400 + 440] = {
0.000000000000f, -0.000715773669f, -0.000665041502f, 0.000402654026f,
0.002620175947f, 0.005039302167f, 0.005271575879f, 0.000027604519f,
0.013271821663f, 0.034462094307f, 0.058591566980f, 0.075313732028f,
@@ -421,6 +421,117 @@ const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 + 200 +
-0.000649476249f, -0.000616869889f, -0.000579367450f, -0.000546656549f,
-0.000511504768f, -0.000489007856f, -0.000493305910f, -0.000558072818f,
+ 0.000000000000f, -0.000556728919f, -0.000500844268f, -0.000488197809f,
+ -0.000501400093f, -0.000529201934f, -0.000562019297f, -0.000591853342f,
+ -0.000624713139f, -0.000656191143f, -0.000686710351f, -0.000715773669f,
+ -0.000733954250f, -0.000748608378f, -0.000769718143f, -0.000781442621f,
+ -0.000778635906f, -0.000780205359f, -0.000773485284f, -0.000756665308f,
+ -0.000730990549f, -0.000705314334f, -0.000665041502f, -0.000616183213f,
+ -0.000559926149f, -0.000494948297f, -0.000418806652f, -0.000333639531f,
+ -0.000231614991f, -0.000129564374f, -0.000013860786f, 0.000118062519f,
+ 0.000253748061f, 0.000402654026f, 0.000562193105f, 0.000734724104f,
+ 0.000907300971f, 0.001100212801f, 0.001293914276f, 0.001502302708f,
+ 0.001713720965f, 0.001929827733f, 0.002160301199f, 0.002389454516f,
+ 0.002620175947f, 0.002859727247f, 0.003097488545f, 0.003335026093f,
+ 0.003571928944f, 0.003804124426f, 0.004038002808f, 0.004253090825f,
+ 0.004467199557f, 0.004672701936f, 0.004858986009f, 0.005039302167f,
+ 0.005188636016f, 0.005337981973f, 0.005444378592f, 0.005536668468f,
+ 0.005601509940f, 0.005639122799f, 0.005636681803f, 0.005604403093f,
+ 0.005534522235f, 0.005425479729f, 0.005271575879f, 0.005068108905f,
+ 0.004826675169f, 0.004522582516f, 0.004171531182f, 0.003762318054f,
+ 0.003299441654f, 0.002773069544f, 0.002181392629f, 0.001534081879f,
+ 0.000813683204f, 0.000027604519f, -0.000823879847f, -0.001745120040f,
+ -0.002741113305f, -0.003804343985f, -0.004943567794f, -0.006148642395f,
+ -0.007428539917f, -0.008786097169f, -0.010207436979f, -0.011706162244f,
+ 0.013271821663f, 0.014913232997f, 0.016624111682f, 0.018395680934f,
+ 0.020223021507f, 0.022107109427f, 0.024048449472f, 0.026041839272f,
+ 0.028090396896f, 0.030182225630f, 0.032305572182f, 0.034462094307f,
+ 0.036656811833f, 0.038866810501f, 0.041091293097f, 0.043328888714f,
+ 0.045567616820f, 0.047798689455f, 0.050014410168f, 0.052214913070f,
+ 0.054379109293f, 0.056505154818f, 0.058591566980f, 0.060602732003f,
+ 0.062563933432f, 0.064427278936f, 0.066216394305f, 0.067906729877f,
+ 0.069474309683f, 0.070933312178f, 0.072252631187f, 0.073429144919f,
+ 0.074452124536f, 0.075313732028f, 0.075981929898f, 0.076471947134f,
+ 0.076748646796f, 0.076821982861f, 0.076661735773f, 0.076264895499f,
+ 0.075626403093f, 0.074717774987f, 0.073553040624f, 0.072080284357f,
+ 0.070353306830f, 0.068278267980f, 0.065922088921f, 0.063222929835f,
+ 0.060206387192f, 0.056841813028f, 0.053128439933f, 0.049058299512f,
+ 0.044623576105f, 0.039827272296f, 0.034632667899f, 0.029082400724f,
+ 0.023107493296f, 0.016772758216f, 0.010017349385f, 0.002883261768f,
+ -0.004671230447f, -0.012613182887f, -0.020963322371f, -0.029723916203f,
+ -0.038868859410f, -0.048435091972f, -0.058370534331f, -0.068738058209f,
+ -0.079460747540f, -0.090590693057f, -0.102082192898f, -0.113953240216f,
+ -0.126184210181f, -0.138759121299f, -0.151693820953f, -0.164939984679f,
+ -0.178527981043f, -0.192396670580f, -0.206601783633f, -0.221057057381f,
+ -0.235790148377f, -0.250766962767f, -0.265984892845f, -0.281414777040f,
+ -0.297042310238f, -0.312857747078f, -0.328816920519f, -0.344937264919f,
+ 0.361158996820f, 0.377495825291f, 0.393895149231f, 0.410354763269f,
+ 0.426849693060f, 0.443349361420f, 0.459840744734f, 0.476296275854f,
+ 0.492681771517f, 0.508994698524f, 0.525178551674f, 0.541255354881f,
+ 0.557147920132f, 0.572872996330f, 0.588384807110f, 0.603675365448f,
+ 0.618696510792f, 0.633450806141f, 0.647904217243f, 0.662018775940f,
+ 0.675809025764f, 0.689195275307f, 0.702238857746f, 0.714807152748f,
+ 0.726990461349f, 0.738680064678f, 0.749926269054f, 0.760660707951f,
+ 0.770893514156f, 0.780593633652f, 0.789741635323f, 0.798355877399f,
+ 0.806351006031f, 0.813819110394f, 0.820606887341f, 0.826847016811f,
+ 0.832409322262f, 0.837375700474f, 0.841682255268f, 0.845338821411f,
+ 0.848349571228f, 0.850682020187f, 0.852377176285f, 0.853358447552f,
+ 0.853738546371f, 0.853358447552f, 0.852377176285f, 0.850681960583f,
+ 0.848349571228f, 0.845338702202f, 0.841682136059f, 0.837375700474f,
+ 0.832409203053f, 0.826847016811f, 0.820606768131f, 0.813819110394f,
+ 0.806350827217f, 0.798355877399f, 0.789741396904f, 0.780593454838f,
+ 0.770893335342f, 0.760660469532f, 0.749926269054f, 0.738679826260f,
+ 0.726990461349f, 0.714806914330f, 0.702238857746f, 0.689194977283f,
+ 0.675809025764f, 0.662018477917f, 0.647903919220f, 0.633450508118f,
+ 0.618696212769f, 0.603675365448f, 0.588384449482f, 0.572872996330f,
+ 0.557147622108f, 0.541255354881f, 0.525178194046f, 0.508994698524f,
+ 0.492681413889f, 0.476295948029f, 0.459840387106f, 0.443349003792f,
+ 0.426849693060f, 0.410354435444f, 0.393895149231f, 0.377495467663f,
+ -0.361158996820f, -0.344937115908f, -0.328816920519f, -0.312857568264f,
+ -0.297041982412f, -0.281414598227f, -0.265984565020f, -0.250766813755f,
+ -0.235789835453f, -0.221056908369f, -0.206601470709f, -0.192396670580f,
+ -0.178527832031f, -0.164939984679f, -0.151693671942f, -0.138758853078f,
+ -0.126184076071f, -0.113952986896f, -0.102082073689f, -0.090590454638f,
+ -0.079460635781f, -0.068737842143f, -0.058370534331f, -0.048434991390f,
+ -0.038868658245f, -0.029723823071f, -0.020963139832f, -0.012613098137f,
+ -0.004671066534f, 0.002883337904f, 0.010017495602f, 0.016772827134f,
+ 0.023107623681f, 0.029082400724f, 0.034632723778f, 0.039827380329f,
+ 0.044623624533f, 0.049058388919f, 0.053128480911f, 0.056841887534f,
+ 0.060206420720f, 0.063222989440f, 0.065922111273f, 0.068278290331f,
+ 0.070353306830f, 0.072080299258f, 0.073553070426f, 0.074717789888f,
+ 0.075626417994f, 0.076264902949f, 0.076661743224f, 0.076821982861f,
+ 0.076748639345f, 0.076471947134f, 0.075981922448f, 0.075313732028f,
+ 0.074452117085f, 0.073429122567f, 0.072252616286f, 0.070933282375f,
+ 0.069474294782f, 0.067906692624f, 0.066216371953f, 0.064427241683f,
+ 0.062563933432f, 0.060602713376f, 0.058591566980f, 0.056505132467f,
+ 0.054379064590f, 0.052214890718f, 0.050014361739f, 0.047798667103f,
+ 0.045567568392f, 0.043328862637f, 0.041091248393f, 0.038866810501f,
+ 0.036656789482f, 0.034462094307f, 0.032305549830f, 0.030182180926f,
+ 0.028090374544f, 0.026041796431f, 0.024048428982f, 0.022107070312f,
+ 0.020223002881f, 0.018395643681f, 0.016624111682f, 0.014913215302f,
+ -0.013271821663f, -0.011706114747f, -0.010207405314f, -0.008786082268f,
+ -0.007428539917f, -0.006148603279f, -0.004943549167f, -0.003804338397f,
+ -0.002741118660f, -0.001745095360f, -0.000823865877f, 0.000027604519f,
+ 0.000813706429f, 0.001534096780f, 0.002181399148f, 0.002773069544f,
+ 0.003299456788f, 0.003762325039f, 0.004171533510f, 0.004522580653f,
+ 0.004826682154f, 0.005068112630f, 0.005271575879f, 0.005425483920f,
+ 0.005534524098f, 0.005604403559f, 0.005636681803f, 0.005639121868f,
+ 0.005601509474f, 0.005536668003f, 0.005444379058f, 0.005337978248f,
+ 0.005188634153f, 0.005039302167f, 0.004858980421f, 0.004672697745f,
+ 0.004467197228f, 0.004253090825f, 0.004037996754f, 0.003804120934f,
+ 0.003571927780f, 0.003335027257f, 0.003097482258f, 0.002859724686f,
+ 0.002620175947f, 0.002389447298f, 0.002160296543f, 0.001929825987f,
+ 0.001713721547f, 0.001502296189f, 0.001293911249f, 0.001100211754f,
+ 0.000907301903f, 0.000734719913f, 0.000562190951f, 0.000402654026f,
+ 0.000253743900f, 0.000118059623f, -0.000013861647f, -0.000129564054f,
+ -0.000231618033f, -0.000333640899f, -0.000418807031f, -0.000494947657f,
+ -0.000559927430f, -0.000616183970f, -0.000665041502f, -0.000705315731f,
+ -0.000730990898f, -0.000756665424f, -0.000773485284f, -0.000780205359f,
+ -0.000778635847f, -0.000781442563f, -0.000769718201f, -0.000748608203f,
+ -0.000733953959f, -0.000715773669f, -0.000686709653f, -0.000656190445f,
+ -0.000624712906f, -0.000591853517f, -0.000562018424f, -0.000529201352f,
+ -0.000501400034f, -0.000488197838f, -0.000500846538f, -0.000556728744f,
+
};
const FLOAT32 ixheaacd_random_phase[512][2] = {
@@ -942,16 +1053,16 @@ const FLOAT32 ixheaacd_hphase_tbl[2][8] = {{1.0f, 0.0f, -1.0f, 0.0f},
const FLOAT32 ixheaacd_g_lim_gains[4] = {0.70795f, 1.0f, 1.41254f, 1e10f};
-const FIR_FILTER ixheaacd_fir_0 = {1.0f};
-const FIR_FILTER ixheaacd_fir_1 = {0.33333333333333f, 0.66666666666666f};
-const FIR_FILTER ixheaacd_fir_2 = {0.12500000000000f, 0.37500000000000f,
+const ia_fir_table_struct ixheaacd_fir_0 = {1.0f};
+const ia_fir_table_struct ixheaacd_fir_1 = {0.33333333333333f, 0.66666666666666f};
+const ia_fir_table_struct ixheaacd_fir_2 = {0.12500000000000f, 0.37500000000000f,
0.50000000000000f};
-const FIR_FILTER ixheaacd_fir_3 = {0.05857864376269f, 0.20000000000000f,
+const ia_fir_table_struct ixheaacd_fir_3 = {0.05857864376269f, 0.20000000000000f,
0.34142135623731f, 0.40000000000000f};
-const FIR_FILTER ixheaacd_fir_4 = {0.03183050093751f, 0.11516383427084f,
+const ia_fir_table_struct ixheaacd_fir_4 = {0.03183050093751f, 0.11516383427084f,
0.21816949906249f, 0.30150283239582f,
0.33333333333333f};
-const FIR_FILTER* const ixheaacd_fir_table[5] = {
+const ia_fir_table_struct* ixheaacd_fir_table[5] = {
&ixheaacd_fir_0, &ixheaacd_fir_1, &ixheaacd_fir_2, &ixheaacd_fir_3,
&ixheaacd_fir_4};
const FLOAT32 ixheaacd_q_gamma_table[4] = {0.0f, 1.0f, 2.0f, 4.0f};
@@ -2315,6 +2426,1055 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_40[40 * 40 * 2] = {
-0.999229f, -0.039260f,
};
+const FLOAT32 ixheaacd_analy_cos_sin_table_kl_56[56 * 56 * 2] = {
+ 0.000000000f, -1.000000000f, 0.028046256f, -0.999606609f, 0.056070447f, -0.998426795f,
+ 0.084050521f, -0.996461511f, 0.111964479f, -0.993712187f, 0.139790341f, -0.990181148f,
+ 0.167506218f, -0.985871017f, 0.195090324f, -0.980785251f, 0.222520933f, -0.974927902f,
+ 0.249776483f, -0.968303502f, 0.276835501f, -0.960917294f, 0.303676754f, -0.952775121f,
+ 0.330279052f, -0.943883359f, 0.356621534f, -0.934248924f, 0.382683426f, -0.923879504f,
+ 0.408444256f, -0.912783265f, 0.433883727f, -0.900968850f, 0.458981872f, -0.888445616f,
+ 0.483718902f, -0.875223398f, 0.508075356f, -0.861312628f, 0.532032073f, -0.846724212f,
+ 0.555570245f, -0.831469595f, 0.578671277f, -0.815560877f, 0.601317108f, -0.799010456f,
+ 0.623489797f, -0.781831503f, 0.645172000f, -0.764037371f, 0.666346550f, -0.745642185f,
+ 0.686996937f, -0.726660311f, 0.707106769f, -0.707106769f, 0.726660311f, -0.686996937f,
+ 0.745642185f, -0.666346550f, 0.764037371f, -0.645172000f, 0.781831503f, -0.623489797f,
+ 0.799010456f, -0.601317108f, 0.815560877f, -0.578671277f, 0.831469595f, -0.555570245f,
+ 0.846724212f, -0.532032073f, 0.861312628f, -0.508075356f, 0.875223398f, -0.483718902f,
+ 0.888445616f, -0.458981872f, 0.900968850f, -0.433883727f, 0.912783265f, -0.408444256f,
+ 0.923879504f, -0.382683426f, 0.934248924f, -0.356621534f, 0.943883359f, -0.330279052f,
+ 0.952775121f, -0.303676754f, 0.960917294f, -0.276835501f, 0.968303502f, -0.249776483f,
+ 0.974927902f, -0.222520933f, 0.980785251f, -0.195090324f, 0.985871017f, -0.167506218f,
+ 0.990181148f, -0.139790341f, 0.993712187f, -0.111964479f, 0.996461511f, -0.084050521f,
+ 0.998426795f, -0.056070447f, 0.999606609f, -0.028046256f, -0.000000000f, 1.000000000f,
+ -0.084050521f, 0.996461511f, -0.167506218f, 0.985871017f, -0.249776483f, 0.968303502f,
+ -0.330279052f, 0.943883359f, -0.408444256f, 0.912783265f, -0.483718902f, 0.875223398f,
+ -0.555570245f, 0.831469595f, -0.623489797f, 0.781831503f, -0.686996937f, 0.726660311f,
+ -0.745642185f, 0.666346550f, -0.799010456f, 0.601317108f, -0.846724212f, 0.532032073f,
+ -0.888445616f, 0.458981872f, -0.923879504f, 0.382683426f, -0.952775121f, 0.303676754f,
+ -0.974927902f, 0.222520933f, -0.990181148f, 0.139790341f, -0.998426795f, 0.056070447f,
+ -0.999606609f, -0.028046256f, -0.993712187f, -0.111964479f, -0.980785251f, -0.195090324f,
+ -0.960917294f, -0.276835501f, -0.934248924f, -0.356621534f, -0.900968850f, -0.433883727f,
+ -0.861312628f, -0.508075356f, -0.815560877f, -0.578671277f, -0.764037371f, -0.645172000f,
+ -0.707106769f, -0.707106769f, -0.645172000f, -0.764037371f, -0.578671277f, -0.815560877f,
+ -0.508075356f, -0.861312628f, -0.433883727f, -0.900968850f, -0.356621534f, -0.934248924f,
+ -0.276835501f, -0.960917294f, -0.195090324f, -0.980785251f, -0.111964479f, -0.993712187f,
+ -0.028046256f, -0.999606609f, 0.056070447f, -0.998426795f, 0.139790341f, -0.990181148f,
+ 0.222520933f, -0.974927902f, 0.303676754f, -0.952775121f, 0.382683426f, -0.923879504f,
+ 0.458981872f, -0.888445616f, 0.532032073f, -0.846724212f, 0.601317108f, -0.799010456f,
+ 0.666346550f, -0.745642185f, 0.726660311f, -0.686996937f, 0.781831503f, -0.623489797f,
+ 0.831469595f, -0.555570245f, 0.875223398f, -0.483718902f, 0.912783265f, -0.408444256f,
+ 0.943883359f, -0.330279052f, 0.968303502f, -0.249776483f, 0.985871017f, -0.167506218f,
+ 0.996461511f, -0.084050521f, 0.000000000f, -1.000000000f, 0.139790341f, -0.990181148f,
+ 0.276835501f, -0.960917294f, 0.408444256f, -0.912783265f, 0.532032073f, -0.846724212f,
+ 0.645172000f, -0.764037371f, 0.745642185f, -0.666346550f, 0.831469595f, -0.555570245f,
+ 0.900968850f, -0.433883727f, 0.952775121f, -0.303676754f, 0.985871017f, -0.167506218f,
+ 0.999606609f, -0.028046256f, 0.993712187f, 0.111964479f, 0.968303502f, 0.249776483f,
+ 0.923879504f, 0.382683426f, 0.861312628f, 0.508075356f, 0.781831503f, 0.623489797f,
+ 0.686996937f, 0.726660311f, 0.578671277f, 0.815560877f, 0.458981872f, 0.888445616f,
+ 0.330279052f, 0.943883359f, 0.195090324f, 0.980785251f, 0.056070447f, 0.998426795f,
+ -0.084050521f, 0.996461511f, -0.222520933f, 0.974927902f, -0.356621534f, 0.934248924f,
+ -0.483718902f, 0.875223398f, -0.601317108f, 0.799010456f, -0.707106769f, 0.707106769f,
+ -0.799010456f, 0.601317108f, -0.875223398f, 0.483718902f, -0.934248924f, 0.356621534f,
+ -0.974927902f, 0.222520933f, -0.996461511f, 0.084050521f, -0.998426795f, -0.056070447f,
+ -0.980785251f, -0.195090324f, -0.943883359f, -0.330279052f, -0.888445616f, -0.458981872f,
+ -0.815560877f, -0.578671277f, -0.726660311f, -0.686996937f, -0.623489797f, -0.781831503f,
+ -0.508075356f, -0.861312628f, -0.382683426f, -0.923879504f, -0.249776483f, -0.968303502f,
+ -0.111964479f, -0.993712187f, 0.028046256f, -0.999606609f, 0.167506218f, -0.985871017f,
+ 0.303676754f, -0.952775121f, 0.433883727f, -0.900968850f, 0.555570245f, -0.831469595f,
+ 0.666346550f, -0.745642185f, 0.764037371f, -0.645172000f, 0.846724212f, -0.532032073f,
+ 0.912783265f, -0.408444256f, 0.960917294f, -0.276835501f, 0.990181148f, -0.139790341f,
+ -0.000000000f, 1.000000000f, -0.195090324f, 0.980785251f, -0.382683426f, 0.923879504f,
+ -0.555570245f, 0.831469595f, -0.707106769f, 0.707106769f, -0.831469595f, 0.555570245f,
+ -0.923879504f, 0.382683426f, -0.980785251f, 0.195090324f, -1.000000000f, -0.000000000f,
+ -0.980785251f, -0.195090324f, -0.923879504f, -0.382683426f, -0.831469595f, -0.555570245f,
+ -0.707106769f, -0.707106769f, -0.555570245f, -0.831469595f, -0.382683426f, -0.923879504f,
+ -0.195090324f, -0.980785251f, 0.000000000f, -1.000000000f, 0.195090324f, -0.980785251f,
+ 0.382683426f, -0.923879504f, 0.555570245f, -0.831469595f, 0.707106769f, -0.707106769f,
+ 0.831469595f, -0.555570245f, 0.923879504f, -0.382683426f, 0.980785251f, -0.195090324f,
+ 1.000000000f, 0.000000000f, 0.980785251f, 0.195090324f, 0.923879504f, 0.382683426f,
+ 0.831469595f, 0.555570245f, 0.707106769f, 0.707106769f, 0.555570245f, 0.831469595f,
+ 0.382683426f, 0.923879504f, 0.195090324f, 0.980785251f, -0.000000000f, 1.000000000f,
+ -0.195090324f, 0.980785251f, -0.382683426f, 0.923879504f, -0.555570245f, 0.831469595f,
+ -0.707106769f, 0.707106769f, -0.831469595f, 0.555570245f, -0.923879504f, 0.382683426f,
+ -0.980785251f, 0.195090324f, -1.000000000f, -0.000000000f, -0.980785251f, -0.195090324f,
+ -0.923879504f, -0.382683426f, -0.831469595f, -0.555570245f, -0.707106769f, -0.707106769f,
+ -0.555570245f, -0.831469595f, -0.382683426f, -0.923879504f, -0.195090324f, -0.980785251f,
+ 0.000000000f, -1.000000000f, 0.195090324f, -0.980785251f, 0.382683426f, -0.923879504f,
+ 0.555570245f, -0.831469595f, 0.707106769f, -0.707106769f, 0.831469595f, -0.555570245f,
+ 0.923879504f, -0.382683426f, 0.980785251f, -0.195090324f, 0.000000000f, -1.000000000f,
+ 0.249776483f, -0.968303502f, 0.483718902f, -0.875223398f, 0.686996937f, -0.726660311f,
+ 0.846724212f, -0.532032073f, 0.952775121f, -0.303676754f, 0.998426795f, -0.056070447f,
+ 0.980785251f, 0.195090324f, 0.900968850f, 0.433883727f, 0.764037371f, 0.645172000f,
+ 0.578671277f, 0.815560877f, 0.356621534f, 0.934248924f, 0.111964479f, 0.993712187f,
+ -0.139790341f, 0.990181148f, -0.382683426f, 0.923879504f, -0.601317108f, 0.799010456f,
+ -0.781831503f, 0.623489797f, -0.912783265f, 0.408444256f, -0.985871017f, 0.167506218f,
+ -0.996461511f, -0.084050521f, -0.943883359f, -0.330279052f, -0.831469595f, -0.555570245f,
+ -0.666346550f, -0.745642185f, -0.458981872f, -0.888445616f, -0.222520933f, -0.974927902f,
+ 0.028046256f, -0.999606609f, 0.276835501f, -0.960917294f, 0.508075356f, -0.861312628f,
+ 0.707106769f, -0.707106769f, 0.861312628f, -0.508075356f, 0.960917294f, -0.276835501f,
+ 0.999606609f, -0.028046256f, 0.974927902f, 0.222520933f, 0.888445616f, 0.458981872f,
+ 0.745642185f, 0.666346550f, 0.555570245f, 0.831469595f, 0.330279052f, 0.943883359f,
+ 0.084050521f, 0.996461511f, -0.167506218f, 0.985871017f, -0.408444256f, 0.912783265f,
+ -0.623489797f, 0.781831503f, -0.799010456f, 0.601317108f, -0.923879504f, 0.382683426f,
+ -0.990181148f, 0.139790341f, -0.993712187f, -0.111964479f, -0.934248924f, -0.356621534f,
+ -0.815560877f, -0.578671277f, -0.645172000f, -0.764037371f, -0.433883727f, -0.900968850f,
+ -0.195090324f, -0.980785251f, 0.056070447f, -0.998426795f, 0.303676754f, -0.952775121f,
+ 0.532032073f, -0.846724212f, 0.726660311f, -0.686996937f, 0.875223398f, -0.483718902f,
+ 0.968303502f, -0.249776483f, -0.000000000f, 1.000000000f, -0.303676754f, 0.952775121f,
+ -0.578671277f, 0.815560877f, -0.799010456f, 0.601317108f, -0.943883359f, 0.330279052f,
+ -0.999606609f, 0.028046256f, -0.960917294f, -0.276835501f, -0.831469595f, -0.555570245f,
+ -0.623489797f, -0.781831503f, -0.356621534f, -0.934248924f, -0.056070447f, -0.998426795f,
+ 0.249776483f, -0.968303502f, 0.532032073f, -0.846724212f, 0.764037371f, -0.645172000f,
+ 0.923879504f, -0.382683426f, 0.996461511f, -0.084050521f, 0.974927902f, 0.222520933f,
+ 0.861312628f, 0.508075356f, 0.666346550f, 0.745642185f, 0.408444256f, 0.912783265f,
+ 0.111964479f, 0.993712187f, -0.195090324f, 0.980785251f, -0.483718902f, 0.875223398f,
+ -0.726660311f, 0.686996937f, -0.900968850f, 0.433883727f, -0.990181148f, 0.139790341f,
+ -0.985871017f, -0.167506218f, -0.888445616f, -0.458981872f, -0.707106769f, -0.707106769f,
+ -0.458981872f, -0.888445616f, -0.167506218f, -0.985871017f, 0.139790341f, -0.990181148f,
+ 0.433883727f, -0.900968850f, 0.686996937f, -0.726660311f, 0.875223398f, -0.483718902f,
+ 0.980785251f, -0.195090324f, 0.993712187f, 0.111964479f, 0.912783265f, 0.408444256f,
+ 0.745642185f, 0.666346550f, 0.508075356f, 0.861312628f, 0.222520933f, 0.974927902f,
+ -0.084050521f, 0.996461511f, -0.382683426f, 0.923879504f, -0.645172000f, 0.764037371f,
+ -0.846724212f, 0.532032073f, -0.968303502f, 0.249776483f, -0.998426795f, -0.056070447f,
+ -0.934248924f, -0.356621534f, -0.781831503f, -0.623489797f, -0.555570245f, -0.831469595f,
+ -0.276835501f, -0.960917294f, 0.028046256f, -0.999606609f, 0.330279052f, -0.943883359f,
+ 0.601317108f, -0.799010456f, 0.815560877f, -0.578671277f, 0.952775121f, -0.303676754f,
+ -0.000000000f, -1.000000000f, 0.356621534f, -0.934248924f, 0.666346550f, -0.745642185f,
+ 0.888445616f, -0.458981872f, 0.993712187f, -0.111964479f, 0.968303502f, 0.249776483f,
+ 0.815560877f, 0.578671277f, 0.555570245f, 0.831469595f, 0.222520933f, 0.974927902f,
+ -0.139790341f, 0.990181148f, -0.483718902f, 0.875223398f, -0.764037371f, 0.645172000f,
+ -0.943883359f, 0.330279052f, -0.999606609f, -0.028046256f, -0.923879504f, -0.382683426f,
+ -0.726660311f, -0.686996937f, -0.433883727f, -0.900968850f, -0.084050521f, -0.996461511f,
+ 0.276835501f, -0.960917294f, 0.601317108f, -0.799010456f, 0.846724212f, -0.532032073f,
+ 0.980785251f, -0.195090324f, 0.985871017f, 0.167506218f, 0.861312628f, 0.508075356f,
+ 0.623489797f, 0.781831503f, 0.303676754f, 0.952775121f, -0.056070447f, 0.998426795f,
+ -0.408444256f, 0.912783265f, -0.707106769f, 0.707106769f, -0.912783265f, 0.408444256f,
+ -0.998426795f, 0.056070447f, -0.952775121f, -0.303676754f, -0.781831503f, -0.623489797f,
+ -0.508075356f, -0.861312628f, -0.167506218f, -0.985871017f, 0.195090324f, -0.980785251f,
+ 0.532032073f, -0.846724212f, 0.799010456f, -0.601317108f, 0.960917294f, -0.276835501f,
+ 0.996461511f, 0.084050521f, 0.900968850f, 0.433883727f, 0.686996937f, 0.726660311f,
+ 0.382683426f, 0.923879504f, 0.028046256f, 0.999606609f, -0.330279052f, 0.943883359f,
+ -0.645172000f, 0.764037371f, -0.875223398f, 0.483718902f, -0.990181148f, 0.139790341f,
+ -0.974927902f, -0.222520933f, -0.831469595f, -0.555570245f, -0.578671277f, -0.815560877f,
+ -0.249776483f, -0.968303502f, 0.111964479f, -0.993712187f, 0.458981872f, -0.888445616f,
+ 0.745642185f, -0.666346550f, 0.934248924f, -0.356621534f, -0.000000000f, 1.000000000f,
+ -0.408444256f, 0.912783265f, -0.745642185f, 0.666346550f, -0.952775121f, 0.303676754f,
+ -0.993712187f, -0.111964479f, -0.861312628f, -0.508075356f, -0.578671277f, -0.815560877f,
+ -0.195090324f, -0.980785251f, 0.222520933f, -0.974927902f, 0.601317108f, -0.799010456f,
+ 0.875223398f, -0.483718902f, 0.996461511f, -0.084050521f, 0.943883359f, 0.330279052f,
+ 0.726660311f, 0.686996937f, 0.382683426f, 0.923879504f, -0.028046256f, 0.999606609f,
+ -0.433883727f, 0.900968850f, -0.764037371f, 0.645172000f, -0.960917294f, 0.276835501f,
+ -0.990181148f, -0.139790341f, -0.846724212f, -0.532032073f, -0.555570245f, -0.831469595f,
+ -0.167506218f, -0.985871017f, 0.249776483f, -0.968303502f, 0.623489797f, -0.781831503f,
+ 0.888445616f, -0.458981872f, 0.998426795f, -0.056070447f, 0.934248924f, 0.356621534f,
+ 0.707106769f, 0.707106769f, 0.356621534f, 0.934248924f, -0.056070447f, 0.998426795f,
+ -0.458981872f, 0.888445616f, -0.781831503f, 0.623489797f, -0.968303502f, 0.249776483f,
+ -0.985871017f, -0.167506218f, -0.831469595f, -0.555570245f, -0.532032073f, -0.846724212f,
+ -0.139790341f, -0.990181148f, 0.276835501f, -0.960917294f, 0.645172000f, -0.764037371f,
+ 0.900968850f, -0.433883727f, 0.999606609f, -0.028046256f, 0.923879504f, 0.382683426f,
+ 0.686996937f, 0.726660311f, 0.330279052f, 0.943883359f, -0.084050521f, 0.996461511f,
+ -0.483718902f, 0.875223398f, -0.799010456f, 0.601317108f, -0.974927902f, 0.222520933f,
+ -0.980785251f, -0.195090324f, -0.815560877f, -0.578671277f, -0.508075356f, -0.861312628f,
+ -0.111964479f, -0.993712187f, 0.303676754f, -0.952775121f, 0.666346550f, -0.745642185f,
+ 0.912783265f, -0.408444256f, -0.000000000f, -1.000000000f, 0.458981872f, -0.888445616f,
+ 0.815560877f, -0.578671277f, 0.990181148f, -0.139790341f, 0.943883359f, 0.330279052f,
+ 0.686996937f, 0.726660311f, 0.276835501f, 0.960917294f, -0.195090324f, 0.980785251f,
+ -0.623489797f, 0.781831503f, -0.912783265f, 0.408444256f, -0.998426795f, -0.056070447f,
+ -0.861312628f, -0.508075356f, -0.532032073f, -0.846724212f, -0.084050521f, -0.996461511f,
+ 0.382683426f, -0.923879504f, 0.764037371f, -0.645172000f, 0.974927902f, -0.222520933f,
+ 0.968303502f, 0.249776483f, 0.745642185f, 0.666346550f, 0.356621534f, 0.934248924f,
+ -0.111964479f, 0.993712187f, -0.555570245f, 0.831469595f, -0.875223398f, 0.483718902f,
+ -0.999606609f, 0.028046256f, -0.900968850f, -0.433883727f, -0.601317108f, -0.799010456f,
+ -0.167506218f, -0.985871017f, 0.303676754f, -0.952775121f, 0.707106769f, -0.707106769f,
+ 0.952775121f, -0.303676754f, 0.985871017f, 0.167506218f, 0.799010456f, 0.601317108f,
+ 0.433883727f, 0.900968850f, -0.028046256f, 0.999606609f, -0.483718902f, 0.875223398f,
+ -0.831469595f, 0.555570245f, -0.993712187f, 0.111964479f, -0.934248924f, -0.356621534f,
+ -0.666346550f, -0.745642185f, -0.249776483f, -0.968303502f, 0.222520933f, -0.974927902f,
+ 0.645172000f, -0.764037371f, 0.923879504f, -0.382683426f, 0.996461511f, 0.084050521f,
+ 0.846724212f, 0.532032073f, 0.508075356f, 0.861312628f, 0.056070447f, 0.998426795f,
+ -0.408444256f, 0.912783265f, -0.781831503f, 0.623489797f, -0.980785251f, 0.195090324f,
+ -0.960917294f, -0.276835501f, -0.726660311f, -0.686996937f, -0.330279052f, -0.943883359f,
+ 0.139790341f, -0.990181148f, 0.578671277f, -0.815560877f, 0.888445616f, -0.458981872f,
+ -0.000000000f, 1.000000000f, -0.508075356f, 0.861312628f, -0.875223398f, 0.483718902f,
+ -0.999606609f, -0.028046256f, -0.846724212f, -0.532032073f, -0.458981872f, -0.888445616f,
+ 0.056070447f, -0.998426795f, 0.555570245f, -0.831469595f, 0.900968850f, -0.433883727f,
+ 0.996461511f, 0.084050521f, 0.815560877f, 0.578671277f, 0.408444256f, 0.912783265f,
+ -0.111964479f, 0.993712187f, -0.601317108f, 0.799010456f, -0.923879504f, 0.382683426f,
+ -0.990181148f, -0.139790341f, -0.781831503f, -0.623489797f, -0.356621534f, -0.934248924f,
+ 0.167506218f, -0.985871017f, 0.645172000f, -0.764037371f, 0.943883359f, -0.330279052f,
+ 0.980785251f, 0.195090324f, 0.745642185f, 0.666346550f, 0.303676754f, 0.952775121f,
+ -0.222520933f, 0.974927902f, -0.686996937f, 0.726660311f, -0.960917294f, 0.276835501f,
+ -0.968303502f, -0.249776483f, -0.707106769f, -0.707106769f, -0.249776483f, -0.968303502f,
+ 0.276835501f, -0.960917294f, 0.726660311f, -0.686996937f, 0.974927902f, -0.222520933f,
+ 0.952775121f, 0.303676754f, 0.666346550f, 0.745642185f, 0.195090324f, 0.980785251f,
+ -0.330279052f, 0.943883359f, -0.764037371f, 0.645172000f, -0.985871017f, 0.167506218f,
+ -0.934248924f, -0.356621534f, -0.623489797f, -0.781831503f, -0.139790341f, -0.990181148f,
+ 0.382683426f, -0.923879504f, 0.799010456f, -0.601317108f, 0.993712187f, -0.111964479f,
+ 0.912783265f, 0.408444256f, 0.578671277f, 0.815560877f, 0.084050521f, 0.996461511f,
+ -0.433883727f, 0.900968850f, -0.831469595f, 0.555570245f, -0.998426795f, 0.056070447f,
+ -0.888445616f, -0.458981872f, -0.532032073f, -0.846724212f, -0.028046256f, -0.999606609f,
+ 0.483718902f, -0.875223398f, 0.861312628f, -0.508075356f, -0.000000000f, -1.000000000f,
+ 0.555570245f, -0.831469595f, 0.923879504f, -0.382683426f, 0.980785251f, 0.195090324f,
+ 0.707106769f, 0.707106769f, 0.195090324f, 0.980785251f, -0.382683426f, 0.923879504f,
+ -0.831469595f, 0.555570245f, -1.000000000f, -0.000000000f, -0.831469595f, -0.555570245f,
+ -0.382683426f, -0.923879504f, 0.195090324f, -0.980785251f, 0.707106769f, -0.707106769f,
+ 0.980785251f, -0.195090324f, 0.923879504f, 0.382683426f, 0.555570245f, 0.831469595f,
+ -0.000000000f, 1.000000000f, -0.555570245f, 0.831469595f, -0.923879504f, 0.382683426f,
+ -0.980785251f, -0.195090324f, -0.707106769f, -0.707106769f, -0.195090324f, -0.980785251f,
+ 0.382683426f, -0.923879504f, 0.831469595f, -0.555570245f, 1.000000000f, 0.000000000f,
+ 0.831469595f, 0.555570245f, 0.382683426f, 0.923879504f, -0.195090324f, 0.980785251f,
+ -0.707106769f, 0.707106769f, -0.980785251f, 0.195090324f, -0.923879504f, -0.382683426f,
+ -0.555570245f, -0.831469595f, 0.000000000f, -1.000000000f, 0.555570245f, -0.831469595f,
+ 0.923879504f, -0.382683426f, 0.980785251f, 0.195090324f, 0.707106769f, 0.707106769f,
+ 0.195090324f, 0.980785251f, -0.382683426f, 0.923879504f, -0.831469595f, 0.555570245f,
+ -1.000000000f, -0.000000000f, -0.831469595f, -0.555570245f, -0.382683426f, -0.923879504f,
+ 0.195090324f, -0.980785251f, 0.707106769f, -0.707106769f, 0.980785251f, -0.195090324f,
+ 0.923879504f, 0.382683426f, 0.555570245f, 0.831469595f, -0.000000000f, 1.000000000f,
+ -0.555570245f, 0.831469595f, -0.923879504f, 0.382683426f, -0.980785251f, -0.195090324f,
+ -0.707106769f, -0.707106769f, -0.195090324f, -0.980785251f, 0.382683426f, -0.923879504f,
+ 0.831469595f, -0.555570245f, -0.000000000f, 1.000000000f, -0.601317108f, 0.799010456f,
+ -0.960917294f, 0.276835501f, -0.934248924f, -0.356621534f, -0.532032073f, -0.846724212f,
+ 0.084050521f, -0.996461511f, 0.666346550f, -0.745642185f, 0.980785251f, -0.195090324f,
+ 0.900968850f, 0.433883727f, 0.458981872f, 0.888445616f, -0.167506218f, 0.985871017f,
+ -0.726660311f, 0.686996937f, -0.993712187f, 0.111964479f, -0.861312628f, -0.508075356f,
+ -0.382683426f, -0.923879504f, 0.249776483f, -0.968303502f, 0.781831503f, -0.623489797f,
+ 0.999606609f, -0.028046256f, 0.815560877f, 0.578671277f, 0.303676754f, 0.952775121f,
+ -0.330279052f, 0.943883359f, -0.831469595f, 0.555570245f, -0.998426795f, -0.056070447f,
+ -0.764037371f, -0.645172000f, -0.222520933f, -0.974927902f, 0.408444256f, -0.912783265f,
+ 0.875223398f, -0.483718902f, 0.990181148f, 0.139790341f, 0.707106769f, 0.707106769f,
+ 0.139790341f, 0.990181148f, -0.483718902f, 0.875223398f, -0.912783265f, 0.408444256f,
+ -0.974927902f, -0.222520933f, -0.645172000f, -0.764037371f, -0.056070447f, -0.998426795f,
+ 0.555570245f, -0.831469595f, 0.943883359f, -0.330279052f, 0.952775121f, 0.303676754f,
+ 0.578671277f, 0.815560877f, -0.028046256f, 0.999606609f, -0.623489797f, 0.781831503f,
+ -0.968303502f, 0.249776483f, -0.923879504f, -0.382683426f, -0.508075356f, -0.861312628f,
+ 0.111964479f, -0.993712187f, 0.686996937f, -0.726660311f, 0.985871017f, -0.167506218f,
+ 0.888445616f, 0.458981872f, 0.433883727f, 0.900968850f, -0.195090324f, 0.980785251f,
+ -0.745642185f, 0.666346550f, -0.996461511f, 0.084050521f, -0.846724212f, -0.532032073f,
+ -0.356621534f, -0.934248924f, 0.276835501f, -0.960917294f, 0.799010456f, -0.601317108f,
+ -0.000000000f, -1.000000000f, 0.645172000f, -0.764037371f, 0.985871017f, -0.167506218f,
+ 0.861312628f, 0.508075356f, 0.330279052f, 0.943883359f, -0.356621534f, 0.934248924f,
+ -0.875223398f, 0.483718902f, -0.980785251f, -0.195090324f, -0.623489797f, -0.781831503f,
+ 0.028046256f, -0.999606609f, 0.666346550f, -0.745642185f, 0.990181148f, -0.139790341f,
+ 0.846724212f, 0.532032073f, 0.303676754f, 0.952775121f, -0.382683426f, 0.923879504f,
+ -0.888445616f, 0.458981872f, -0.974927902f, -0.222520933f, -0.601317108f, -0.799010456f,
+ 0.056070447f, -0.998426795f, 0.686996937f, -0.726660311f, 0.993712187f, -0.111964479f,
+ 0.831469595f, 0.555570245f, 0.276835501f, 0.960917294f, -0.408444256f, 0.912783265f,
+ -0.900968850f, 0.433883727f, -0.968303502f, -0.249776483f, -0.578671277f, -0.815560877f,
+ 0.084050521f, -0.996461511f, 0.707106769f, -0.707106769f, 0.996461511f, -0.084050521f,
+ 0.815560877f, 0.578671277f, 0.249776483f, 0.968303502f, -0.433883727f, 0.900968850f,
+ -0.912783265f, 0.408444256f, -0.960917294f, -0.276835501f, -0.555570245f, -0.831469595f,
+ 0.111964479f, -0.993712187f, 0.726660311f, -0.686996937f, 0.998426795f, -0.056070447f,
+ 0.799010456f, 0.601317108f, 0.222520933f, 0.974927902f, -0.458981872f, 0.888445616f,
+ -0.923879504f, 0.382683426f, -0.952775121f, -0.303676754f, -0.532032073f, -0.846724212f,
+ 0.139790341f, -0.990181148f, 0.745642185f, -0.666346550f, 0.999606609f, -0.028046256f,
+ 0.781831503f, 0.623489797f, 0.195090324f, 0.980785251f, -0.483718902f, 0.875223398f,
+ -0.934248924f, 0.356621534f, -0.943883359f, -0.330279052f, -0.508075356f, -0.861312628f,
+ 0.167506218f, -0.985871017f, 0.764037371f, -0.645172000f, -0.000000000f, 1.000000000f,
+ -0.686996937f, 0.726660311f, -0.998426795f, 0.056070447f, -0.764037371f, -0.645172000f,
+ -0.111964479f, -0.993712187f, 0.601317108f, -0.799010456f, 0.985871017f, -0.167506218f,
+ 0.831469595f, 0.555570245f, 0.222520933f, 0.974927902f, -0.508075356f, 0.861312628f,
+ -0.960917294f, 0.276835501f, -0.888445616f, -0.458981872f, -0.330279052f, -0.943883359f,
+ 0.408444256f, -0.912783265f, 0.923879504f, -0.382683426f, 0.934248924f, 0.356621534f,
+ 0.433883727f, 0.900968850f, -0.303676754f, 0.952775121f, -0.875223398f, 0.483718902f,
+ -0.968303502f, -0.249776483f, -0.532032073f, -0.846724212f, 0.195090324f, -0.980785251f,
+ 0.815560877f, -0.578671277f, 0.990181148f, 0.139790341f, 0.623489797f, 0.781831503f,
+ -0.084050521f, 0.996461511f, -0.745642185f, 0.666346550f, -0.999606609f, -0.028046256f,
+ -0.707106769f, -0.707106769f, -0.028046256f, -0.999606609f, 0.666346550f, -0.745642185f,
+ 0.996461511f, -0.084050521f, 0.781831503f, 0.623489797f, 0.139790341f, 0.990181148f,
+ -0.578671277f, 0.815560877f, -0.980785251f, 0.195090324f, -0.846724212f, -0.532032073f,
+ -0.249776483f, -0.968303502f, 0.483718902f, -0.875223398f, 0.952775121f, -0.303676754f,
+ 0.900968850f, 0.433883727f, 0.356621534f, 0.934248924f, -0.382683426f, 0.923879504f,
+ -0.912783265f, 0.408444256f, -0.943883359f, -0.330279052f, -0.458981872f, -0.888445616f,
+ 0.276835501f, -0.960917294f, 0.861312628f, -0.508075356f, 0.974927902f, 0.222520933f,
+ 0.555570245f, 0.831469595f, -0.167506218f, 0.985871017f, -0.799010456f, 0.601317108f,
+ -0.993712187f, -0.111964479f, -0.645172000f, -0.764037371f, 0.056070447f, -0.998426795f,
+ 0.726660311f, -0.686996937f, -0.000000000f, -1.000000000f, 0.726660311f, -0.686996937f,
+ 0.998426795f, 0.056070447f, 0.645172000f, 0.764037371f, -0.111964479f, 0.993712187f,
+ -0.799010456f, 0.601317108f, -0.985871017f, -0.167506218f, -0.555570245f, -0.831469595f,
+ 0.222520933f, -0.974927902f, 0.861312628f, -0.508075356f, 0.960917294f, 0.276835501f,
+ 0.458981872f, 0.888445616f, -0.330279052f, 0.943883359f, -0.912783265f, 0.408444256f,
+ -0.923879504f, -0.382683426f, -0.356621534f, -0.934248924f, 0.433883727f, -0.900968850f,
+ 0.952775121f, -0.303676754f, 0.875223398f, 0.483718902f, 0.249776483f, 0.968303502f,
+ -0.532032073f, 0.846724212f, -0.980785251f, 0.195090324f, -0.815560877f, -0.578671277f,
+ -0.139790341f, -0.990181148f, 0.623489797f, -0.781831503f, 0.996461511f, -0.084050521f,
+ 0.745642185f, 0.666346550f, 0.028046256f, 0.999606609f, -0.707106769f, 0.707106769f,
+ -0.999606609f, -0.028046256f, -0.666346550f, -0.745642185f, 0.084050521f, -0.996461511f,
+ 0.781831503f, -0.623489797f, 0.990181148f, 0.139790341f, 0.578671277f, 0.815560877f,
+ -0.195090324f, 0.980785251f, -0.846724212f, 0.532032073f, -0.968303502f, -0.249776483f,
+ -0.483718902f, -0.875223398f, 0.303676754f, -0.952775121f, 0.900968850f, -0.433883727f,
+ 0.934248924f, 0.356621534f, 0.382683426f, 0.923879504f, -0.408444256f, 0.912783265f,
+ -0.943883359f, 0.330279052f, -0.888445616f, -0.458981872f, -0.276835501f, -0.960917294f,
+ 0.508075356f, -0.861312628f, 0.974927902f, -0.222520933f, 0.831469595f, 0.555570245f,
+ 0.167506218f, 0.985871017f, -0.601317108f, 0.799010456f, -0.993712187f, 0.111964479f,
+ -0.764037371f, -0.645172000f, -0.056070447f, -0.998426795f, 0.686996937f, -0.726660311f,
+ -0.000000000f, 1.000000000f, -0.764037371f, 0.645172000f, -0.985871017f, -0.167506218f,
+ -0.508075356f, -0.861312628f, 0.330279052f, -0.943883359f, 0.934248924f, -0.356621534f,
+ 0.875223398f, 0.483718902f, 0.195090324f, 0.980785251f, -0.623489797f, 0.781831503f,
+ -0.999606609f, 0.028046256f, -0.666346550f, -0.745642185f, 0.139790341f, -0.990181148f,
+ 0.846724212f, -0.532032073f, 0.952775121f, 0.303676754f, 0.382683426f, 0.923879504f,
+ -0.458981872f, 0.888445616f, -0.974927902f, 0.222520933f, -0.799010456f, -0.601317108f,
+ -0.056070447f, -0.998426795f, 0.726660311f, -0.686996937f, 0.993712187f, 0.111964479f,
+ 0.555570245f, 0.831469595f, -0.276835501f, 0.960917294f, -0.912783265f, 0.408444256f,
+ -0.900968850f, -0.433883727f, -0.249776483f, -0.968303502f, 0.578671277f, -0.815560877f,
+ 0.996461511f, -0.084050521f, 0.707106769f, 0.707106769f, -0.084050521f, 0.996461511f,
+ -0.815560877f, 0.578671277f, -0.968303502f, -0.249776483f, -0.433883727f, -0.900968850f,
+ 0.408444256f, -0.912783265f, 0.960917294f, -0.276835501f, 0.831469595f, 0.555570245f,
+ 0.111964479f, 0.993712187f, -0.686996937f, 0.726660311f, -0.998426795f, -0.056070447f,
+ -0.601317108f, -0.799010456f, 0.222520933f, -0.974927902f, 0.888445616f, -0.458981872f,
+ 0.923879504f, 0.382683426f, 0.303676754f, 0.952775121f, -0.532032073f, 0.846724212f,
+ -0.990181148f, 0.139790341f, -0.745642185f, -0.666346550f, 0.028046256f, -0.999606609f,
+ 0.781831503f, -0.623489797f, 0.980785251f, 0.195090324f, 0.483718902f, 0.875223398f,
+ -0.356621534f, 0.934248924f, -0.943883359f, 0.330279052f, -0.861312628f, -0.508075356f,
+ -0.167506218f, -0.985871017f, 0.645172000f, -0.764037371f, 0.000000000f, -1.000000000f,
+ 0.799010456f, -0.601317108f, 0.960917294f, 0.276835501f, 0.356621534f, 0.934248924f,
+ -0.532032073f, 0.846724212f, -0.996461511f, 0.084050521f, -0.666346550f, -0.745642185f,
+ 0.195090324f, -0.980785251f, 0.900968850f, -0.433883727f, 0.888445616f, 0.458981872f,
+ 0.167506218f, 0.985871017f, -0.686996937f, 0.726660311f, -0.993712187f, -0.111964479f,
+ -0.508075356f, -0.861312628f, 0.382683426f, -0.923879504f, 0.968303502f, -0.249776483f,
+ 0.781831503f, 0.623489797f, -0.028046256f, 0.999606609f, -0.815560877f, 0.578671277f,
+ -0.952775121f, -0.303676754f, -0.330279052f, -0.943883359f, 0.555570245f, -0.831469595f,
+ 0.998426795f, -0.056070447f, 0.645172000f, 0.764037371f, -0.222520933f, 0.974927902f,
+ -0.912783265f, 0.408444256f, -0.875223398f, -0.483718902f, -0.139790341f, -0.990181148f,
+ 0.707106769f, -0.707106769f, 0.990181148f, 0.139790341f, 0.483718902f, 0.875223398f,
+ -0.408444256f, 0.912783265f, -0.974927902f, 0.222520933f, -0.764037371f, -0.645172000f,
+ 0.056070447f, -0.998426795f, 0.831469595f, -0.555570245f, 0.943883359f, 0.330279052f,
+ 0.303676754f, 0.952775121f, -0.578671277f, 0.815560877f, -0.999606609f, 0.028046256f,
+ -0.623489797f, -0.781831503f, 0.249776483f, -0.968303502f, 0.923879504f, -0.382683426f,
+ 0.861312628f, 0.508075356f, 0.111964479f, 0.993712187f, -0.726660311f, 0.686996937f,
+ -0.985871017f, -0.167506218f, -0.458981872f, -0.888445616f, 0.433883727f, -0.900968850f,
+ 0.980785251f, -0.195090324f, 0.745642185f, 0.666346550f, -0.084050521f, 0.996461511f,
+ -0.846724212f, 0.532032073f, -0.934248924f, -0.356621534f, -0.276835501f, -0.960917294f,
+ 0.601317108f, -0.799010456f, -0.000000000f, 1.000000000f, -0.831469595f, 0.555570245f,
+ -0.923879504f, -0.382683426f, -0.195090324f, -0.980785251f, 0.707106769f, -0.707106769f,
+ 0.980785251f, 0.195090324f, 0.382683426f, 0.923879504f, -0.555570245f, 0.831469595f,
+ -1.000000000f, -0.000000000f, -0.555570245f, -0.831469595f, 0.382683426f, -0.923879504f,
+ 0.980785251f, -0.195090324f, 0.707106769f, 0.707106769f, -0.195090324f, 0.980785251f,
+ -0.923879504f, 0.382683426f, -0.831469595f, -0.555570245f, -0.000000000f, -1.000000000f,
+ 0.831469595f, -0.555570245f, 0.923879504f, 0.382683426f, 0.195090324f, 0.980785251f,
+ -0.707106769f, 0.707106769f, -0.980785251f, -0.195090324f, -0.382683426f, -0.923879504f,
+ 0.555570245f, -0.831469595f, 1.000000000f, 0.000000000f, 0.555570245f, 0.831469595f,
+ -0.382683426f, 0.923879504f, -0.980785251f, 0.195090324f, -0.707106769f, -0.707106769f,
+ 0.195090324f, -0.980785251f, 0.923879504f, -0.382683426f, 0.831469595f, 0.555570245f,
+ -0.000000000f, 1.000000000f, -0.831469595f, 0.555570245f, -0.923879504f, -0.382683426f,
+ -0.195090324f, -0.980785251f, 0.707106769f, -0.707106769f, 0.980785251f, 0.195090324f,
+ 0.382683426f, 0.923879504f, -0.555570245f, 0.831469595f, -1.000000000f, -0.000000000f,
+ -0.555570245f, -0.831469595f, 0.382683426f, -0.923879504f, 0.980785251f, -0.195090324f,
+ 0.707106769f, 0.707106769f, -0.195090324f, 0.980785251f, -0.923879504f, 0.382683426f,
+ -0.831469595f, -0.555570245f, 0.000000000f, -1.000000000f, 0.831469595f, -0.555570245f,
+ 0.923879504f, 0.382683426f, 0.195090324f, 0.980785251f, -0.707106769f, 0.707106769f,
+ -0.980785251f, -0.195090324f, -0.382683426f, -0.923879504f, 0.555570245f, -0.831469595f,
+ 0.000000000f, -1.000000000f, 0.861312628f, -0.508075356f, 0.875223398f, 0.483718902f,
+ 0.028046256f, 0.999606609f, -0.846724212f, 0.532032073f, -0.888445616f, -0.458981872f,
+ -0.056070447f, -0.998426795f, 0.831469595f, -0.555570245f, 0.900968850f, 0.433883727f,
+ 0.084050521f, 0.996461511f, -0.815560877f, 0.578671277f, -0.912783265f, -0.408444256f,
+ -0.111964479f, -0.993712187f, 0.799010456f, -0.601317108f, 0.923879504f, 0.382683426f,
+ 0.139790341f, 0.990181148f, -0.781831503f, 0.623489797f, -0.934248924f, -0.356621534f,
+ -0.167506218f, -0.985871017f, 0.764037371f, -0.645172000f, 0.943883359f, 0.330279052f,
+ 0.195090324f, 0.980785251f, -0.745642185f, 0.666346550f, -0.952775121f, -0.303676754f,
+ -0.222520933f, -0.974927902f, 0.726660311f, -0.686996937f, 0.960917294f, 0.276835501f,
+ 0.249776483f, 0.968303502f, -0.707106769f, 0.707106769f, -0.968303502f, -0.249776483f,
+ -0.276835501f, -0.960917294f, 0.686996937f, -0.726660311f, 0.974927902f, 0.222520933f,
+ 0.303676754f, 0.952775121f, -0.666346550f, 0.745642185f, -0.980785251f, -0.195090324f,
+ -0.330279052f, -0.943883359f, 0.645172000f, -0.764037371f, 0.985871017f, 0.167506218f,
+ 0.356621534f, 0.934248924f, -0.623489797f, 0.781831503f, -0.990181148f, -0.139790341f,
+ -0.382683426f, -0.923879504f, 0.601317108f, -0.799010456f, 0.993712187f, 0.111964479f,
+ 0.408444256f, 0.912783265f, -0.578671277f, 0.815560877f, -0.996461511f, -0.084050521f,
+ -0.433883727f, -0.900968850f, 0.555570245f, -0.831469595f, 0.998426795f, 0.056070447f,
+ 0.458981872f, 0.888445616f, -0.532032073f, 0.846724212f, -0.999606609f, -0.028046256f,
+ -0.483718902f, -0.875223398f, 0.508075356f, -0.861312628f, -0.000000000f, 1.000000000f,
+ -0.888445616f, 0.458981872f, -0.815560877f, -0.578671277f, 0.139790341f, -0.990181148f,
+ 0.943883359f, -0.330279052f, 0.726660311f, 0.686996937f, -0.276835501f, 0.960917294f,
+ -0.980785251f, 0.195090324f, -0.623489797f, -0.781831503f, 0.408444256f, -0.912783265f,
+ 0.998426795f, -0.056070447f, 0.508075356f, 0.861312628f, -0.532032073f, 0.846724212f,
+ -0.996461511f, -0.084050521f, -0.382683426f, -0.923879504f, 0.645172000f, -0.764037371f,
+ 0.974927902f, 0.222520933f, 0.249776483f, 0.968303502f, -0.745642185f, 0.666346550f,
+ -0.934248924f, -0.356621534f, -0.111964479f, -0.993712187f, 0.831469595f, -0.555570245f,
+ 0.875223398f, 0.483718902f, -0.028046256f, 0.999606609f, -0.900968850f, 0.433883727f,
+ -0.799010456f, -0.601317108f, 0.167506218f, -0.985871017f, 0.952775121f, -0.303676754f,
+ 0.707106769f, 0.707106769f, -0.303676754f, 0.952775121f, -0.985871017f, 0.167506218f,
+ -0.601317108f, -0.799010456f, 0.433883727f, -0.900968850f, 0.999606609f, -0.028046256f,
+ 0.483718902f, 0.875223398f, -0.555570245f, 0.831469595f, -0.993712187f, -0.111964479f,
+ -0.356621534f, -0.934248924f, 0.666346550f, -0.745642185f, 0.968303502f, 0.249776483f,
+ 0.222520933f, 0.974927902f, -0.764037371f, 0.645172000f, -0.923879504f, -0.382683426f,
+ -0.084050521f, -0.996461511f, 0.846724212f, -0.532032073f, 0.861312628f, 0.508075356f,
+ -0.056070447f, 0.998426795f, -0.912783265f, 0.408444256f, -0.781831503f, -0.623489797f,
+ 0.195090324f, -0.980785251f, 0.960917294f, -0.276835501f, 0.686996937f, 0.726660311f,
+ -0.330279052f, 0.943883359f, -0.990181148f, 0.139790341f, -0.578671277f, -0.815560877f,
+ 0.458981872f, -0.888445616f, 0.000000000f, -1.000000000f, 0.912783265f, -0.408444256f,
+ 0.745642185f, 0.666346550f, -0.303676754f, 0.952775121f, -0.993712187f, 0.111964479f,
+ -0.508075356f, -0.861312628f, 0.578671277f, -0.815560877f, 0.980785251f, 0.195090324f,
+ 0.222520933f, 0.974927902f, -0.799010456f, 0.601317108f, -0.875223398f, -0.483718902f,
+ 0.084050521f, -0.996461511f, 0.943883359f, -0.330279052f, 0.686996937f, 0.726660311f,
+ -0.382683426f, 0.923879504f, -0.999606609f, 0.028046256f, -0.433883727f, -0.900968850f,
+ 0.645172000f, -0.764037371f, 0.960917294f, 0.276835501f, 0.139790341f, 0.990181148f,
+ -0.846724212f, 0.532032073f, -0.831469595f, -0.555570245f, 0.167506218f, -0.985871017f,
+ 0.968303502f, -0.249776483f, 0.623489797f, 0.781831503f, -0.458981872f, 0.888445616f,
+ -0.998426795f, -0.056070447f, -0.356621534f, -0.934248924f, 0.707106769f, -0.707106769f,
+ 0.934248924f, 0.356621534f, 0.056070447f, 0.998426795f, -0.888445616f, 0.458981872f,
+ -0.781831503f, -0.623489797f, 0.249776483f, -0.968303502f, 0.985871017f, -0.167506218f,
+ 0.555570245f, 0.831469595f, -0.532032073f, 0.846724212f, -0.990181148f, -0.139790341f,
+ -0.276835501f, -0.960917294f, 0.764037371f, -0.645172000f, 0.900968850f, 0.433883727f,
+ -0.028046256f, 0.999606609f, -0.923879504f, 0.382683426f, -0.726660311f, -0.686996937f,
+ 0.330279052f, -0.943883359f, 0.996461511f, -0.084050521f, 0.483718902f, 0.875223398f,
+ -0.601317108f, 0.799010456f, -0.974927902f, -0.222520933f, -0.195090324f, -0.980785251f,
+ 0.815560877f, -0.578671277f, 0.861312628f, 0.508075356f, -0.111964479f, 0.993712187f,
+ -0.952775121f, 0.303676754f, -0.666346550f, -0.745642185f, 0.408444256f, -0.912783265f,
+ -0.000000000f, 1.000000000f, -0.934248924f, 0.356621534f, -0.666346550f, -0.745642185f,
+ 0.458981872f, -0.888445616f, 0.993712187f, 0.111964479f, 0.249776483f, 0.968303502f,
+ -0.815560877f, 0.578671277f, -0.831469595f, -0.555570245f, 0.222520933f, -0.974927902f,
+ 0.990181148f, -0.139790341f, 0.483718902f, 0.875223398f, -0.645172000f, 0.764037371f,
+ -0.943883359f, -0.330279052f, -0.028046256f, -0.999606609f, 0.923879504f, -0.382683426f,
+ 0.686996937f, 0.726660311f, -0.433883727f, 0.900968850f, -0.996461511f, -0.084050521f,
+ -0.276835501f, -0.960917294f, 0.799010456f, -0.601317108f, 0.846724212f, 0.532032073f,
+ -0.195090324f, 0.980785251f, -0.985871017f, 0.167506218f, -0.508075356f, -0.861312628f,
+ 0.623489797f, -0.781831503f, 0.952775121f, 0.303676754f, 0.056070447f, 0.998426795f,
+ -0.912783265f, 0.408444256f, -0.707106769f, -0.707106769f, 0.408444256f, -0.912783265f,
+ 0.998426795f, 0.056070447f, 0.303676754f, 0.952775121f, -0.781831503f, 0.623489797f,
+ -0.861312628f, -0.508075356f, 0.167506218f, -0.985871017f, 0.980785251f, -0.195090324f,
+ 0.532032073f, 0.846724212f, -0.601317108f, 0.799010456f, -0.960917294f, -0.276835501f,
+ -0.084050521f, -0.996461511f, 0.900968850f, -0.433883727f, 0.726660311f, 0.686996937f,
+ -0.382683426f, 0.923879504f, -0.999606609f, -0.028046256f, -0.330279052f, -0.943883359f,
+ 0.764037371f, -0.645172000f, 0.875223398f, 0.483718902f, -0.139790341f, 0.990181148f,
+ -0.974927902f, 0.222520933f, -0.555570245f, -0.831469595f, 0.578671277f, -0.815560877f,
+ 0.968303502f, 0.249776483f, 0.111964479f, 0.993712187f, -0.888445616f, 0.458981872f,
+ -0.745642185f, -0.666346550f, 0.356621534f, -0.934248924f, 0.000000000f, -1.000000000f,
+ 0.952775121f, -0.303676754f, 0.578671277f, 0.815560877f, -0.601317108f, 0.799010456f,
+ -0.943883359f, -0.330279052f, 0.028046256f, -0.999606609f, 0.960917294f, -0.276835501f,
+ 0.555570245f, 0.831469595f, -0.623489797f, 0.781831503f, -0.934248924f, -0.356621534f,
+ 0.056070447f, -0.998426795f, 0.968303502f, -0.249776483f, 0.532032073f, 0.846724212f,
+ -0.645172000f, 0.764037371f, -0.923879504f, -0.382683426f, 0.084050521f, -0.996461511f,
+ 0.974927902f, -0.222520933f, 0.508075356f, 0.861312628f, -0.666346550f, 0.745642185f,
+ -0.912783265f, -0.408444256f, 0.111964479f, -0.993712187f, 0.980785251f, -0.195090324f,
+ 0.483718902f, 0.875223398f, -0.686996937f, 0.726660311f, -0.900968850f, -0.433883727f,
+ 0.139790341f, -0.990181148f, 0.985871017f, -0.167506218f, 0.458981872f, 0.888445616f,
+ -0.707106769f, 0.707106769f, -0.888445616f, -0.458981872f, 0.167506218f, -0.985871017f,
+ 0.990181148f, -0.139790341f, 0.433883727f, 0.900968850f, -0.726660311f, 0.686996937f,
+ -0.875223398f, -0.483718902f, 0.195090324f, -0.980785251f, 0.993712187f, -0.111964479f,
+ 0.408444256f, 0.912783265f, -0.745642185f, 0.666346550f, -0.861312628f, -0.508075356f,
+ 0.222520933f, -0.974927902f, 0.996461511f, -0.084050521f, 0.382683426f, 0.923879504f,
+ -0.764037371f, 0.645172000f, -0.846724212f, -0.532032073f, 0.249776483f, -0.968303502f,
+ 0.998426795f, -0.056070447f, 0.356621534f, 0.934248924f, -0.781831503f, 0.623489797f,
+ -0.831469595f, -0.555570245f, 0.276835501f, -0.960917294f, 0.999606609f, -0.028046256f,
+ 0.330279052f, 0.943883359f, -0.799010456f, 0.601317108f, -0.815560877f, -0.578671277f,
+ 0.303676754f, -0.952775121f, 0.000000000f, 1.000000000f, -0.968303502f, 0.249776483f,
+ -0.483718902f, -0.875223398f, 0.726660311f, -0.686996937f, 0.846724212f, 0.532032073f,
+ -0.303676754f, 0.952775121f, -0.998426795f, -0.056070447f, -0.195090324f, -0.980785251f,
+ 0.900968850f, -0.433883727f, 0.645172000f, 0.764037371f, -0.578671277f, 0.815560877f,
+ -0.934248924f, -0.356621534f, 0.111964479f, -0.993712187f, 0.990181148f, -0.139790341f,
+ 0.382683426f, 0.923879504f, -0.799010456f, 0.601317108f, -0.781831503f, -0.623489797f,
+ 0.408444256f, -0.912783265f, 0.985871017f, 0.167506218f, 0.084050521f, 0.996461511f,
+ -0.943883359f, 0.330279052f, -0.555570245f, -0.831469595f, 0.666346550f, -0.745642185f,
+ 0.888445616f, 0.458981872f, -0.222520933f, 0.974927902f, -0.999606609f, 0.028046256f,
+ -0.276835501f, -0.960917294f, 0.861312628f, -0.508075356f, 0.707106769f, 0.707106769f,
+ -0.508075356f, 0.861312628f, -0.960917294f, -0.276835501f, 0.028046256f, -0.999606609f,
+ 0.974927902f, -0.222520933f, 0.458981872f, 0.888445616f, -0.745642185f, 0.666346550f,
+ -0.831469595f, -0.555570245f, 0.330279052f, -0.943883359f, 0.996461511f, 0.084050521f,
+ 0.167506218f, 0.985871017f, -0.912783265f, 0.408444256f, -0.623489797f, -0.781831503f,
+ 0.601317108f, -0.799010456f, 0.923879504f, 0.382683426f, -0.139790341f, 0.990181148f,
+ -0.993712187f, 0.111964479f, -0.356621534f, -0.934248924f, 0.815560877f, -0.578671277f,
+ 0.764037371f, 0.645172000f, -0.433883727f, 0.900968850f, -0.980785251f, -0.195090324f,
+ -0.056070447f, -0.998426795f, 0.952775121f, -0.303676754f, 0.532032073f, 0.846724212f,
+ -0.686996937f, 0.726660311f, -0.875223398f, -0.483718902f, 0.249776483f, -0.968303502f,
+ 0.000000000f, -1.000000000f, 0.980785251f, -0.195090324f, 0.382683426f, 0.923879504f,
+ -0.831469595f, 0.555570245f, -0.707106769f, -0.707106769f, 0.555570245f, -0.831469595f,
+ 0.923879504f, 0.382683426f, -0.195090324f, 0.980785251f, -1.000000000f, 0.000000000f,
+ -0.195090324f, -0.980785251f, 0.923879504f, -0.382683426f, 0.555570245f, 0.831469595f,
+ -0.707106769f, 0.707106769f, -0.831469595f, -0.555570245f, 0.382683426f, -0.923879504f,
+ 0.980785251f, 0.195090324f, -0.000000000f, 1.000000000f, -0.980785251f, 0.195090324f,
+ -0.382683426f, -0.923879504f, 0.831469595f, -0.555570245f, 0.707106769f, 0.707106769f,
+ -0.555570245f, 0.831469595f, -0.923879504f, -0.382683426f, 0.195090324f, -0.980785251f,
+ 1.000000000f, 0.000000000f, 0.195090324f, 0.980785251f, -0.923879504f, 0.382683426f,
+ -0.555570245f, -0.831469595f, 0.707106769f, -0.707106769f, 0.831469595f, 0.555570245f,
+ -0.382683426f, 0.923879504f, -0.980785251f, -0.195090324f, -0.000000000f, -1.000000000f,
+ 0.980785251f, -0.195090324f, 0.382683426f, 0.923879504f, -0.831469595f, 0.555570245f,
+ -0.707106769f, -0.707106769f, 0.555570245f, -0.831469595f, 0.923879504f, 0.382683426f,
+ -0.195090324f, 0.980785251f, -1.000000000f, -0.000000000f, -0.195090324f, -0.980785251f,
+ 0.923879504f, -0.382683426f, 0.555570245f, 0.831469595f, -0.707106769f, 0.707106769f,
+ -0.831469595f, -0.555570245f, 0.382683426f, -0.923879504f, 0.980785251f, 0.195090324f,
+ -0.000000000f, 1.000000000f, -0.980785251f, 0.195090324f, -0.382683426f, -0.923879504f,
+ 0.831469595f, -0.555570245f, 0.707106769f, 0.707106769f, -0.555570245f, 0.831469595f,
+ -0.923879504f, -0.382683426f, 0.195090324f, -0.980785251f, -0.000000000f, 1.000000000f,
+ -0.990181148f, 0.139790341f, -0.276835501f, -0.960917294f, 0.912783265f, -0.408444256f,
+ 0.532032073f, 0.846724212f, -0.764037371f, 0.645172000f, -0.745642185f, -0.666346550f,
+ 0.555570245f, -0.831469595f, 0.900968850f, 0.433883727f, -0.303676754f, 0.952775121f,
+ -0.985871017f, -0.167506218f, 0.028046256f, -0.999606609f, 0.993712187f, -0.111964479f,
+ 0.249776483f, 0.968303502f, -0.923879504f, 0.382683426f, -0.508075356f, -0.861312628f,
+ 0.781831503f, -0.623489797f, 0.726660311f, 0.686996937f, -0.578671277f, 0.815560877f,
+ -0.888445616f, -0.458981872f, 0.330279052f, -0.943883359f, 0.980785251f, 0.195090324f,
+ -0.056070447f, 0.998426795f, -0.996461511f, 0.084050521f, -0.222520933f, -0.974927902f,
+ 0.934248924f, -0.356621534f, 0.483718902f, 0.875223398f, -0.799010456f, 0.601317108f,
+ -0.707106769f, -0.707106769f, 0.601317108f, -0.799010456f, 0.875223398f, 0.483718902f,
+ -0.356621534f, 0.934248924f, -0.974927902f, -0.222520933f, 0.084050521f, -0.996461511f,
+ 0.998426795f, -0.056070447f, 0.195090324f, 0.980785251f, -0.943883359f, 0.330279052f,
+ -0.458981872f, -0.888445616f, 0.815560877f, -0.578671277f, 0.686996937f, 0.726660311f,
+ -0.623489797f, 0.781831503f, -0.861312628f, -0.508075356f, 0.382683426f, -0.923879504f,
+ 0.968303502f, 0.249776483f, -0.111964479f, 0.993712187f, -0.999606609f, 0.028046256f,
+ -0.167506218f, -0.985871017f, 0.952775121f, -0.303676754f, 0.433883727f, 0.900968850f,
+ -0.831469595f, 0.555570245f, -0.666346550f, -0.745642185f, 0.645172000f, -0.764037371f,
+ 0.846724212f, 0.532032073f, -0.408444256f, 0.912783265f, -0.960917294f, -0.276835501f,
+ 0.139790341f, -0.990181148f, 0.000000000f, -1.000000000f, 0.996461511f, -0.084050521f,
+ 0.167506218f, 0.985871017f, -0.968303502f, 0.249776483f, -0.330279052f, -0.943883359f,
+ 0.912783265f, -0.408444256f, 0.483718902f, 0.875223398f, -0.831469595f, 0.555570245f,
+ -0.623489797f, -0.781831503f, 0.726660311f, -0.686996937f, 0.745642185f, 0.666346550f,
+ -0.601317108f, 0.799010456f, -0.846724212f, -0.532032073f, 0.458981872f, -0.888445616f,
+ 0.923879504f, 0.382683426f, -0.303676754f, 0.952775121f, -0.974927902f, -0.222520933f,
+ 0.139790341f, -0.990181148f, 0.998426795f, 0.056070447f, 0.028046256f, 0.999606609f,
+ -0.993712187f, 0.111964479f, -0.195090324f, -0.980785251f, 0.960917294f, -0.276835501f,
+ 0.356621534f, 0.934248924f, -0.900968850f, 0.433883727f, -0.508075356f, -0.861312628f,
+ 0.815560877f, -0.578671277f, 0.645172000f, 0.764037371f, -0.707106769f, 0.707106769f,
+ -0.764037371f, -0.645172000f, 0.578671277f, -0.815560877f, 0.861312628f, 0.508075356f,
+ -0.433883727f, 0.900968850f, -0.934248924f, -0.356621534f, 0.276835501f, -0.960917294f,
+ 0.980785251f, 0.195090324f, -0.111964479f, 0.993712187f, -0.999606609f, -0.028046256f,
+ -0.056070447f, -0.998426795f, 0.990181148f, -0.139790341f, 0.222520933f, 0.974927902f,
+ -0.952775121f, 0.303676754f, -0.382683426f, -0.923879504f, 0.888445616f, -0.458981872f,
+ 0.532032073f, 0.846724212f, -0.799010456f, 0.601317108f, -0.666346550f, -0.745642185f,
+ 0.686996937f, -0.726660311f, 0.781831503f, 0.623489797f, -0.555570245f, 0.831469595f,
+ -0.875223398f, -0.483718902f, 0.408444256f, -0.912783265f, 0.943883359f, 0.330279052f,
+ -0.249776483f, 0.968303502f, -0.985871017f, -0.167506218f, 0.084050521f, -0.996461511f,
+ 0.000000000f, 1.000000000f, -0.999606609f, 0.028046256f, -0.056070447f, -0.998426795f,
+ 0.996461511f, -0.084050521f, 0.111964479f, 0.993712187f, -0.990181148f, 0.139790341f,
+ -0.167506218f, -0.985871017f, 0.980785251f, -0.195090324f, 0.222520933f, 0.974927902f,
+ -0.968303502f, 0.249776483f, -0.276835501f, -0.960917294f, 0.952775121f, -0.303676754f,
+ 0.330279052f, 0.943883359f, -0.934248924f, 0.356621534f, -0.382683426f, -0.923879504f,
+ 0.912783265f, -0.408444256f, 0.433883727f, 0.900968850f, -0.888445616f, 0.458981872f,
+ -0.483718902f, -0.875223398f, 0.861312628f, -0.508075356f, 0.532032073f, 0.846724212f,
+ -0.831469595f, 0.555570245f, -0.578671277f, -0.815560877f, 0.799010456f, -0.601317108f,
+ 0.623489797f, 0.781831503f, -0.764037371f, 0.645172000f, -0.666346550f, -0.745642185f,
+ 0.726660311f, -0.686996937f, 0.707106769f, 0.707106769f, -0.686996937f, 0.726660311f,
+ -0.745642185f, -0.666346550f, 0.645172000f, -0.764037371f, 0.781831503f, 0.623489797f,
+ -0.601317108f, 0.799010456f, -0.815560877f, -0.578671277f, 0.555570245f, -0.831469595f,
+ 0.846724212f, 0.532032073f, -0.508075356f, 0.861312628f, -0.875223398f, -0.483718902f,
+ 0.458981872f, -0.888445616f, 0.900968850f, 0.433883727f, -0.408444256f, 0.912783265f,
+ -0.923879504f, -0.382683426f, 0.356621534f, -0.934248924f, 0.943883359f, 0.330279052f,
+ -0.303676754f, 0.952775121f, -0.960917294f, -0.276835501f, 0.249776483f, -0.968303502f,
+ 0.974927902f, 0.222520933f, -0.195090324f, 0.980785251f, -0.985871017f, -0.167506218f,
+ 0.139790341f, -0.990181148f, 0.993712187f, 0.111964479f, -0.084050521f, 0.996461511f,
+ -0.998426795f, -0.056070447f, 0.028046256f, -0.999606609f, 0.000000000f, -1.000000000f,
+ 0.999606609f, 0.028046256f, -0.056070447f, 0.998426795f, -0.996461511f, -0.084050521f,
+ 0.111964479f, -0.993712187f, 0.990181148f, 0.139790341f, -0.167506218f, 0.985871017f,
+ -0.980785251f, -0.195090324f, 0.222520933f, -0.974927902f, 0.968303502f, 0.249776483f,
+ -0.276835501f, 0.960917294f, -0.952775121f, -0.303676754f, 0.330279052f, -0.943883359f,
+ 0.934248924f, 0.356621534f, -0.382683426f, 0.923879504f, -0.912783265f, -0.408444256f,
+ 0.433883727f, -0.900968850f, 0.888445616f, 0.458981872f, -0.483718902f, 0.875223398f,
+ -0.861312628f, -0.508075356f, 0.532032073f, -0.846724212f, 0.831469595f, 0.555570245f,
+ -0.578671277f, 0.815560877f, -0.799010456f, -0.601317108f, 0.623489797f, -0.781831503f,
+ 0.764037371f, 0.645172000f, -0.666346550f, 0.745642185f, -0.726660311f, -0.686996937f,
+ 0.707106769f, -0.707106769f, 0.686996937f, 0.726660311f, -0.745642185f, 0.666346550f,
+ -0.645172000f, -0.764037371f, 0.781831503f, -0.623489797f, 0.601317108f, 0.799010456f,
+ -0.815560877f, 0.578671277f, -0.555570245f, -0.831469595f, 0.846724212f, -0.532032073f,
+ 0.508075356f, 0.861312628f, -0.875223398f, 0.483718902f, -0.458981872f, -0.888445616f,
+ 0.900968850f, -0.433883727f, 0.408444256f, 0.912783265f, -0.923879504f, 0.382683426f,
+ -0.356621534f, -0.934248924f, 0.943883359f, -0.330279052f, 0.303676754f, 0.952775121f,
+ -0.960917294f, 0.276835501f, -0.249776483f, -0.968303502f, 0.974927902f, -0.222520933f,
+ 0.195090324f, 0.980785251f, -0.985871017f, 0.167506218f, -0.139790341f, -0.990181148f,
+ 0.993712187f, -0.111964479f, 0.084050521f, 0.996461511f, -0.998426795f, 0.056070447f,
+ -0.028046256f, -0.999606609f, -0.000000000f, 1.000000000f, -0.996461511f, -0.084050521f,
+ 0.167506218f, -0.985871017f, 0.968303502f, 0.249776483f, -0.330279052f, 0.943883359f,
+ -0.912783265f, -0.408444256f, 0.483718902f, -0.875223398f, 0.831469595f, 0.555570245f,
+ -0.623489797f, 0.781831503f, -0.726660311f, -0.686996937f, 0.745642185f, -0.666346550f,
+ 0.601317108f, 0.799010456f, -0.846724212f, 0.532032073f, -0.458981872f, -0.888445616f,
+ 0.923879504f, -0.382683426f, 0.303676754f, 0.952775121f, -0.974927902f, 0.222520933f,
+ -0.139790341f, -0.990181148f, 0.998426795f, -0.056070447f, -0.028046256f, 0.999606609f,
+ -0.993712187f, -0.111964479f, 0.195090324f, -0.980785251f, 0.960917294f, 0.276835501f,
+ -0.356621534f, 0.934248924f, -0.900968850f, -0.433883727f, 0.508075356f, -0.861312628f,
+ 0.815560877f, 0.578671277f, -0.645172000f, 0.764037371f, -0.707106769f, -0.707106769f,
+ 0.764037371f, -0.645172000f, 0.578671277f, 0.815560877f, -0.861312628f, 0.508075356f,
+ -0.433883727f, -0.900968850f, 0.934248924f, -0.356621534f, 0.276835501f, 0.960917294f,
+ -0.980785251f, 0.195090324f, -0.111964479f, -0.993712187f, 0.999606609f, -0.028046256f,
+ -0.056070447f, 0.998426795f, -0.990181148f, -0.139790341f, 0.222520933f, -0.974927902f,
+ 0.952775121f, 0.303676754f, -0.382683426f, 0.923879504f, -0.888445616f, -0.458981872f,
+ 0.532032073f, -0.846724212f, 0.799010456f, 0.601317108f, -0.666346550f, 0.745642185f,
+ -0.686996937f, -0.726660311f, 0.781831503f, -0.623489797f, 0.555570245f, 0.831469595f,
+ -0.875223398f, 0.483718902f, -0.408444256f, -0.912783265f, 0.943883359f, -0.330279052f,
+ 0.249776483f, 0.968303502f, -0.985871017f, 0.167506218f, -0.084050521f, -0.996461511f,
+ 0.000000000f, -1.000000000f, 0.990181148f, 0.139790341f, -0.276835501f, 0.960917294f,
+ -0.912783265f, -0.408444256f, 0.532032073f, -0.846724212f, 0.764037371f, 0.645172000f,
+ -0.745642185f, 0.666346550f, -0.555570245f, -0.831469595f, 0.900968850f, -0.433883727f,
+ 0.303676754f, 0.952775121f, -0.985871017f, 0.167506218f, -0.028046256f, -0.999606609f,
+ 0.993712187f, 0.111964479f, -0.249776483f, 0.968303502f, -0.923879504f, -0.382683426f,
+ 0.508075356f, -0.861312628f, 0.781831503f, 0.623489797f, -0.726660311f, 0.686996937f,
+ -0.578671277f, -0.815560877f, 0.888445616f, -0.458981872f, 0.330279052f, 0.943883359f,
+ -0.980785251f, 0.195090324f, -0.056070447f, -0.998426795f, 0.996461511f, 0.084050521f,
+ -0.222520933f, 0.974927902f, -0.934248924f, -0.356621534f, 0.483718902f, -0.875223398f,
+ 0.799010456f, 0.601317108f, -0.707106769f, 0.707106769f, -0.601317108f, -0.799010456f,
+ 0.875223398f, -0.483718902f, 0.356621534f, 0.934248924f, -0.974927902f, 0.222520933f,
+ -0.084050521f, -0.996461511f, 0.998426795f, 0.056070447f, -0.195090324f, 0.980785251f,
+ -0.943883359f, -0.330279052f, 0.458981872f, -0.888445616f, 0.815560877f, 0.578671277f,
+ -0.686996937f, 0.726660311f, -0.623489797f, -0.781831503f, 0.861312628f, -0.508075356f,
+ 0.382683426f, 0.923879504f, -0.968303502f, 0.249776483f, -0.111964479f, -0.993712187f,
+ 0.999606609f, 0.028046256f, -0.167506218f, 0.985871017f, -0.952775121f, -0.303676754f,
+ 0.433883727f, -0.900968850f, 0.831469595f, 0.555570245f, -0.666346550f, 0.745642185f,
+ -0.645172000f, -0.764037371f, 0.846724212f, -0.532032073f, 0.408444256f, 0.912783265f,
+ -0.960917294f, 0.276835501f, -0.139790341f, -0.990181148f, 0.000000000f, 1.000000000f,
+ -0.980785251f, -0.195090324f, 0.382683426f, -0.923879504f, 0.831469595f, 0.555570245f,
+ -0.707106769f, 0.707106769f, -0.555570245f, -0.831469595f, 0.923879504f, -0.382683426f,
+ 0.195090324f, 0.980785251f, -1.000000000f, -0.000000000f, 0.195090324f, -0.980785251f,
+ 0.923879504f, 0.382683426f, -0.555570245f, 0.831469595f, -0.707106769f, -0.707106769f,
+ 0.831469595f, -0.555570245f, 0.382683426f, 0.923879504f, -0.980785251f, 0.195090324f,
+ 0.000000000f, -1.000000000f, 0.980785251f, 0.195090324f, -0.382683426f, 0.923879504f,
+ -0.831469595f, -0.555570245f, 0.707106769f, -0.707106769f, 0.555570245f, 0.831469595f,
+ -0.923879504f, 0.382683426f, -0.195090324f, -0.980785251f, 1.000000000f, 0.000000000f,
+ -0.195090324f, 0.980785251f, -0.923879504f, -0.382683426f, 0.555570245f, -0.831469595f,
+ 0.707106769f, 0.707106769f, -0.831469595f, 0.555570245f, -0.382683426f, -0.923879504f,
+ 0.980785251f, -0.195090324f, -0.000000000f, 1.000000000f, -0.980785251f, -0.195090324f,
+ 0.382683426f, -0.923879504f, 0.831469595f, 0.555570245f, -0.707106769f, 0.707106769f,
+ -0.555570245f, -0.831469595f, 0.923879504f, -0.382683426f, 0.195090324f, 0.980785251f,
+ -1.000000000f, -0.000000000f, 0.195090324f, -0.980785251f, 0.923879504f, 0.382683426f,
+ -0.555570245f, 0.831469595f, -0.707106769f, -0.707106769f, 0.831469595f, -0.555570245f,
+ 0.382683426f, 0.923879504f, -0.980785251f, 0.195090324f, 0.000000000f, -1.000000000f,
+ 0.980785251f, 0.195090324f, -0.382683426f, 0.923879504f, -0.831469595f, -0.555570245f,
+ 0.707106769f, -0.707106769f, 0.555570245f, 0.831469595f, -0.923879504f, 0.382683426f,
+ -0.195090324f, -0.980785251f, 0.000000000f, -1.000000000f, 0.968303502f, 0.249776483f,
+ -0.483718902f, 0.875223398f, -0.726660311f, -0.686996937f, 0.846724212f, -0.532032073f,
+ 0.303676754f, 0.952775121f, -0.998426795f, 0.056070447f, 0.195090324f, -0.980785251f,
+ 0.900968850f, 0.433883727f, -0.645172000f, 0.764037371f, -0.578671277f, -0.815560877f,
+ 0.934248924f, -0.356621534f, 0.111964479f, 0.993712187f, -0.990181148f, -0.139790341f,
+ 0.382683426f, -0.923879504f, 0.799010456f, 0.601317108f, -0.781831503f, 0.623489797f,
+ -0.408444256f, -0.912783265f, 0.985871017f, -0.167506218f, -0.084050521f, 0.996461511f,
+ -0.943883359f, -0.330279052f, 0.555570245f, -0.831469595f, 0.666346550f, 0.745642185f,
+ -0.888445616f, 0.458981872f, -0.222520933f, -0.974927902f, 0.999606609f, 0.028046256f,
+ -0.276835501f, 0.960917294f, -0.861312628f, -0.508075356f, 0.707106769f, -0.707106769f,
+ 0.508075356f, 0.861312628f, -0.960917294f, 0.276835501f, -0.028046256f, -0.999606609f,
+ 0.974927902f, 0.222520933f, -0.458981872f, 0.888445616f, -0.745642185f, -0.666346550f,
+ 0.831469595f, -0.555570245f, 0.330279052f, 0.943883359f, -0.996461511f, 0.084050521f,
+ 0.167506218f, -0.985871017f, 0.912783265f, 0.408444256f, -0.623489797f, 0.781831503f,
+ -0.601317108f, -0.799010456f, 0.923879504f, -0.382683426f, 0.139790341f, 0.990181148f,
+ -0.993712187f, -0.111964479f, 0.356621534f, -0.934248924f, 0.815560877f, 0.578671277f,
+ -0.764037371f, 0.645172000f, -0.433883727f, -0.900968850f, 0.980785251f, -0.195090324f,
+ -0.056070447f, 0.998426795f, -0.952775121f, -0.303676754f, 0.532032073f, -0.846724212f,
+ 0.686996937f, 0.726660311f, -0.875223398f, 0.483718902f, -0.249776483f, -0.968303502f,
+ -0.000000000f, 1.000000000f, -0.952775121f, -0.303676754f, 0.578671277f, -0.815560877f,
+ 0.601317108f, 0.799010456f, -0.943883359f, 0.330279052f, -0.028046256f, -0.999606609f,
+ 0.960917294f, 0.276835501f, -0.555570245f, 0.831469595f, -0.623489797f, -0.781831503f,
+ 0.934248924f, -0.356621534f, 0.056070447f, 0.998426795f, -0.968303502f, -0.249776483f,
+ 0.532032073f, -0.846724212f, 0.645172000f, 0.764037371f, -0.923879504f, 0.382683426f,
+ -0.084050521f, -0.996461511f, 0.974927902f, 0.222520933f, -0.508075356f, 0.861312628f,
+ -0.666346550f, -0.745642185f, 0.912783265f, -0.408444256f, 0.111964479f, 0.993712187f,
+ -0.980785251f, -0.195090324f, 0.483718902f, -0.875223398f, 0.686996937f, 0.726660311f,
+ -0.900968850f, 0.433883727f, -0.139790341f, -0.990181148f, 0.985871017f, 0.167506218f,
+ -0.458981872f, 0.888445616f, -0.707106769f, -0.707106769f, 0.888445616f, -0.458981872f,
+ 0.167506218f, 0.985871017f, -0.990181148f, -0.139790341f, 0.433883727f, -0.900968850f,
+ 0.726660311f, 0.686996937f, -0.875223398f, 0.483718902f, -0.195090324f, -0.980785251f,
+ 0.993712187f, 0.111964479f, -0.408444256f, 0.912783265f, -0.745642185f, -0.666346550f,
+ 0.861312628f, -0.508075356f, 0.222520933f, 0.974927902f, -0.996461511f, -0.084050521f,
+ 0.382683426f, -0.923879504f, 0.764037371f, 0.645172000f, -0.846724212f, 0.532032073f,
+ -0.249776483f, -0.968303502f, 0.998426795f, 0.056070447f, -0.356621534f, 0.934248924f,
+ -0.781831503f, -0.623489797f, 0.831469595f, -0.555570245f, 0.276835501f, 0.960917294f,
+ -0.999606609f, -0.028046256f, 0.330279052f, -0.943883359f, 0.799010456f, 0.601317108f,
+ -0.815560877f, 0.578671277f, -0.303676754f, -0.952775121f, 0.000000000f, -1.000000000f,
+ 0.934248924f, 0.356621534f, -0.666346550f, 0.745642185f, -0.458981872f, -0.888445616f,
+ 0.993712187f, -0.111964479f, -0.249776483f, 0.968303502f, -0.815560877f, -0.578671277f,
+ 0.831469595f, -0.555570245f, 0.222520933f, 0.974927902f, -0.990181148f, -0.139790341f,
+ 0.483718902f, -0.875223398f, 0.645172000f, 0.764037371f, -0.943883359f, 0.330279052f,
+ 0.028046256f, -0.999606609f, 0.923879504f, 0.382683426f, -0.686996937f, 0.726660311f,
+ -0.433883727f, -0.900968850f, 0.996461511f, -0.084050521f, -0.276835501f, 0.960917294f,
+ -0.799010456f, -0.601317108f, 0.846724212f, -0.532032073f, 0.195090324f, 0.980785251f,
+ -0.985871017f, -0.167506218f, 0.508075356f, -0.861312628f, 0.623489797f, 0.781831503f,
+ -0.952775121f, 0.303676754f, 0.056070447f, -0.998426795f, 0.912783265f, 0.408444256f,
+ -0.707106769f, 0.707106769f, -0.408444256f, -0.912783265f, 0.998426795f, -0.056070447f,
+ -0.303676754f, 0.952775121f, -0.781831503f, -0.623489797f, 0.861312628f, -0.508075356f,
+ 0.167506218f, 0.985871017f, -0.980785251f, -0.195090324f, 0.532032073f, -0.846724212f,
+ 0.601317108f, 0.799010456f, -0.960917294f, 0.276835501f, 0.084050521f, -0.996461511f,
+ 0.900968850f, 0.433883727f, -0.726660311f, 0.686996937f, -0.382683426f, -0.923879504f,
+ 0.999606609f, -0.028046256f, -0.330279052f, 0.943883359f, -0.764037371f, -0.645172000f,
+ 0.875223398f, -0.483718902f, 0.139790341f, 0.990181148f, -0.974927902f, -0.222520933f,
+ 0.555570245f, -0.831469595f, 0.578671277f, 0.815560877f, -0.968303502f, 0.249776483f,
+ 0.111964479f, -0.993712187f, 0.888445616f, 0.458981872f, -0.745642185f, 0.666346550f,
+ -0.356621534f, -0.934248924f, 0.000000000f, 1.000000000f, -0.912783265f, -0.408444256f,
+ 0.745642185f, -0.666346550f, 0.303676754f, 0.952775121f, -0.993712187f, -0.111964479f,
+ 0.508075356f, -0.861312628f, 0.578671277f, 0.815560877f, -0.980785251f, 0.195090324f,
+ 0.222520933f, -0.974927902f, 0.799010456f, 0.601317108f, -0.875223398f, 0.483718902f,
+ -0.084050521f, -0.996461511f, 0.943883359f, 0.330279052f, -0.686996937f, 0.726660311f,
+ -0.382683426f, -0.923879504f, 0.999606609f, 0.028046256f, -0.433883727f, 0.900968850f,
+ -0.645172000f, -0.764037371f, 0.960917294f, -0.276835501f, -0.139790341f, 0.990181148f,
+ -0.846724212f, -0.532032073f, 0.831469595f, -0.555570245f, 0.167506218f, 0.985871017f,
+ -0.968303502f, -0.249776483f, 0.623489797f, -0.781831503f, 0.458981872f, 0.888445616f,
+ -0.998426795f, 0.056070447f, 0.356621534f, -0.934248924f, 0.707106769f, 0.707106769f,
+ -0.934248924f, 0.356621534f, 0.056070447f, -0.998426795f, 0.888445616f, 0.458981872f,
+ -0.781831503f, 0.623489797f, -0.249776483f, -0.968303502f, 0.985871017f, 0.167506218f,
+ -0.555570245f, 0.831469595f, -0.532032073f, -0.846724212f, 0.990181148f, -0.139790341f,
+ -0.276835501f, 0.960917294f, -0.764037371f, -0.645172000f, 0.900968850f, -0.433883727f,
+ 0.028046256f, 0.999606609f, -0.923879504f, -0.382683426f, 0.726660311f, -0.686996937f,
+ 0.330279052f, 0.943883359f, -0.996461511f, -0.084050521f, 0.483718902f, -0.875223398f,
+ 0.601317108f, 0.799010456f, -0.974927902f, 0.222520933f, 0.195090324f, -0.980785251f,
+ 0.815560877f, 0.578671277f, -0.861312628f, 0.508075356f, -0.111964479f, -0.993712187f,
+ 0.952775121f, 0.303676754f, -0.666346550f, 0.745642185f, -0.408444256f, -0.912783265f,
+ 0.000000000f, -1.000000000f, 0.888445616f, 0.458981872f, -0.815560877f, 0.578671277f,
+ -0.139790341f, -0.990181148f, 0.943883359f, 0.330279052f, -0.726660311f, 0.686996937f,
+ -0.276835501f, -0.960917294f, 0.980785251f, 0.195090324f, -0.623489797f, 0.781831503f,
+ -0.408444256f, -0.912783265f, 0.998426795f, 0.056070447f, -0.508075356f, 0.861312628f,
+ -0.532032073f, -0.846724212f, 0.996461511f, -0.084050521f, -0.382683426f, 0.923879504f,
+ -0.645172000f, -0.764037371f, 0.974927902f, -0.222520933f, -0.249776483f, 0.968303502f,
+ -0.745642185f, -0.666346550f, 0.934248924f, -0.356621534f, -0.111964479f, 0.993712187f,
+ -0.831469595f, -0.555570245f, 0.875223398f, -0.483718902f, 0.028046256f, 0.999606609f,
+ -0.900968850f, -0.433883727f, 0.799010456f, -0.601317108f, 0.167506218f, 0.985871017f,
+ -0.952775121f, -0.303676754f, 0.707106769f, -0.707106769f, 0.303676754f, 0.952775121f,
+ -0.985871017f, -0.167506218f, 0.601317108f, -0.799010456f, 0.433883727f, 0.900968850f,
+ -0.999606609f, -0.028046256f, 0.483718902f, -0.875223398f, 0.555570245f, 0.831469595f,
+ -0.993712187f, 0.111964479f, 0.356621534f, -0.934248924f, 0.666346550f, 0.745642185f,
+ -0.968303502f, 0.249776483f, 0.222520933f, -0.974927902f, 0.764037371f, 0.645172000f,
+ -0.923879504f, 0.382683426f, 0.084050521f, -0.996461511f, 0.846724212f, 0.532032073f,
+ -0.861312628f, 0.508075356f, -0.056070447f, -0.998426795f, 0.912783265f, 0.408444256f,
+ -0.781831503f, 0.623489797f, -0.195090324f, -0.980785251f, 0.960917294f, 0.276835501f,
+ -0.686996937f, 0.726660311f, -0.330279052f, -0.943883359f, 0.990181148f, 0.139790341f,
+ -0.578671277f, 0.815560877f, -0.458981872f, -0.888445616f, -0.000000000f, 1.000000000f,
+ -0.861312628f, -0.508075356f, 0.875223398f, -0.483718902f, -0.028046256f, 0.999606609f,
+ -0.846724212f, -0.532032073f, 0.888445616f, -0.458981872f, -0.056070447f, 0.998426795f,
+ -0.831469595f, -0.555570245f, 0.900968850f, -0.433883727f, -0.084050521f, 0.996461511f,
+ -0.815560877f, -0.578671277f, 0.912783265f, -0.408444256f, -0.111964479f, 0.993712187f,
+ -0.799010456f, -0.601317108f, 0.923879504f, -0.382683426f, -0.139790341f, 0.990181148f,
+ -0.781831503f, -0.623489797f, 0.934248924f, -0.356621534f, -0.167506218f, 0.985871017f,
+ -0.764037371f, -0.645172000f, 0.943883359f, -0.330279052f, -0.195090324f, 0.980785251f,
+ -0.745642185f, -0.666346550f, 0.952775121f, -0.303676754f, -0.222520933f, 0.974927902f,
+ -0.726660311f, -0.686996937f, 0.960917294f, -0.276835501f, -0.249776483f, 0.968303502f,
+ -0.707106769f, -0.707106769f, 0.968303502f, -0.249776483f, -0.276835501f, 0.960917294f,
+ -0.686996937f, -0.726660311f, 0.974927902f, -0.222520933f, -0.303676754f, 0.952775121f,
+ -0.666346550f, -0.745642185f, 0.980785251f, -0.195090324f, -0.330279052f, 0.943883359f,
+ -0.645172000f, -0.764037371f, 0.985871017f, -0.167506218f, -0.356621534f, 0.934248924f,
+ -0.623489797f, -0.781831503f, 0.990181148f, -0.139790341f, -0.382683426f, 0.923879504f,
+ -0.601317108f, -0.799010456f, 0.993712187f, -0.111964479f, -0.408444256f, 0.912783265f,
+ -0.578671277f, -0.815560877f, 0.996461511f, -0.084050521f, -0.433883727f, 0.900968850f,
+ -0.555570245f, -0.831469595f, 0.998426795f, -0.056070447f, -0.458981872f, 0.888445616f,
+ -0.532032073f, -0.846724212f, 0.999606609f, -0.028046256f, -0.483718902f, 0.875223398f,
+ -0.508075356f, -0.861312628f, 0.000000000f, -1.000000000f, 0.831469595f, 0.555570245f,
+ -0.923879504f, 0.382683426f, 0.195090324f, -0.980785251f, 0.707106769f, 0.707106769f,
+ -0.980785251f, 0.195090324f, 0.382683426f, -0.923879504f, 0.555570245f, 0.831469595f,
+ -1.000000000f, -0.000000000f, 0.555570245f, -0.831469595f, 0.382683426f, 0.923879504f,
+ -0.980785251f, -0.195090324f, 0.707106769f, -0.707106769f, 0.195090324f, 0.980785251f,
+ -0.923879504f, -0.382683426f, 0.831469595f, -0.555570245f, 0.000000000f, 1.000000000f,
+ -0.831469595f, -0.555570245f, 0.923879504f, -0.382683426f, -0.195090324f, 0.980785251f,
+ -0.707106769f, -0.707106769f, 0.980785251f, -0.195090324f, -0.382683426f, 0.923879504f,
+ -0.555570245f, -0.831469595f, 1.000000000f, 0.000000000f, -0.555570245f, 0.831469595f,
+ -0.382683426f, -0.923879504f, 0.980785251f, 0.195090324f, -0.707106769f, 0.707106769f,
+ -0.195090324f, -0.980785251f, 0.923879504f, 0.382683426f, -0.831469595f, 0.555570245f,
+ 0.000000000f, -1.000000000f, 0.831469595f, 0.555570245f, -0.923879504f, 0.382683426f,
+ 0.195090324f, -0.980785251f, 0.707106769f, 0.707106769f, -0.980785251f, 0.195090324f,
+ 0.382683426f, -0.923879504f, 0.555570245f, 0.831469595f, -1.000000000f, -0.000000000f,
+ 0.555570245f, -0.831469595f, 0.382683426f, 0.923879504f, -0.980785251f, -0.195090324f,
+ 0.707106769f, -0.707106769f, 0.195090324f, 0.980785251f, -0.923879504f, -0.382683426f,
+ 0.831469595f, -0.555570245f, -0.000000000f, 1.000000000f, -0.831469595f, -0.555570245f,
+ 0.923879504f, -0.382683426f, -0.195090324f, 0.980785251f, -0.707106769f, -0.707106769f,
+ 0.980785251f, -0.195090324f, -0.382683426f, 0.923879504f, -0.555570245f, -0.831469595f,
+ 0.000000000f, 1.000000000f, -0.799010456f, -0.601317108f, 0.960917294f, -0.276835501f,
+ -0.356621534f, 0.934248924f, -0.532032073f, -0.846724212f, 0.996461511f, 0.084050521f,
+ -0.666346550f, 0.745642185f, -0.195090324f, -0.980785251f, 0.900968850f, 0.433883727f,
+ -0.888445616f, 0.458981872f, 0.167506218f, -0.985871017f, 0.686996937f, 0.726660311f,
+ -0.993712187f, 0.111964479f, 0.508075356f, -0.861312628f, 0.382683426f, 0.923879504f,
+ -0.968303502f, -0.249776483f, 0.781831503f, -0.623489797f, 0.028046256f, 0.999606609f,
+ -0.815560877f, -0.578671277f, 0.952775121f, -0.303676754f, -0.330279052f, 0.943883359f,
+ -0.555570245f, -0.831469595f, 0.998426795f, 0.056070447f, -0.645172000f, 0.764037371f,
+ -0.222520933f, -0.974927902f, 0.912783265f, 0.408444256f, -0.875223398f, 0.483718902f,
+ 0.139790341f, -0.990181148f, 0.707106769f, 0.707106769f, -0.990181148f, 0.139790341f,
+ 0.483718902f, -0.875223398f, 0.408444256f, 0.912783265f, -0.974927902f, -0.222520933f,
+ 0.764037371f, -0.645172000f, 0.056070447f, 0.998426795f, -0.831469595f, -0.555570245f,
+ 0.943883359f, -0.330279052f, -0.303676754f, 0.952775121f, -0.578671277f, -0.815560877f,
+ 0.999606609f, 0.028046256f, -0.623489797f, 0.781831503f, -0.249776483f, -0.968303502f,
+ 0.923879504f, 0.382683426f, -0.861312628f, 0.508075356f, 0.111964479f, -0.993712187f,
+ 0.726660311f, 0.686996937f, -0.985871017f, 0.167506218f, 0.458981872f, -0.888445616f,
+ 0.433883727f, 0.900968850f, -0.980785251f, -0.195090324f, 0.745642185f, -0.666346550f,
+ 0.084050521f, 0.996461511f, -0.846724212f, -0.532032073f, 0.934248924f, -0.356621534f,
+ -0.276835501f, 0.960917294f, -0.601317108f, -0.799010456f, 0.000000000f, -1.000000000f,
+ 0.764037371f, 0.645172000f, -0.985871017f, 0.167506218f, 0.508075356f, -0.861312628f,
+ 0.330279052f, 0.943883359f, -0.934248924f, -0.356621534f, 0.875223398f, -0.483718902f,
+ -0.195090324f, 0.980785251f, -0.623489797f, -0.781831503f, 0.999606609f, 0.028046256f,
+ -0.666346550f, 0.745642185f, -0.139790341f, -0.990181148f, 0.846724212f, 0.532032073f,
+ -0.952775121f, 0.303676754f, 0.382683426f, -0.923879504f, 0.458981872f, 0.888445616f,
+ -0.974927902f, -0.222520933f, 0.799010456f, -0.601317108f, -0.056070447f, 0.998426795f,
+ -0.726660311f, -0.686996937f, 0.993712187f, -0.111964479f, -0.555570245f, 0.831469595f,
+ -0.276835501f, -0.960917294f, 0.912783265f, 0.408444256f, -0.900968850f, 0.433883727f,
+ 0.249776483f, -0.968303502f, 0.578671277f, 0.815560877f, -0.996461511f, -0.084050521f,
+ 0.707106769f, -0.707106769f, 0.084050521f, 0.996461511f, -0.815560877f, -0.578671277f,
+ 0.968303502f, -0.249776483f, -0.433883727f, 0.900968850f, -0.408444256f, -0.912783265f,
+ 0.960917294f, 0.276835501f, -0.831469595f, 0.555570245f, 0.111964479f, -0.993712187f,
+ 0.686996937f, 0.726660311f, -0.998426795f, 0.056070447f, 0.601317108f, -0.799010456f,
+ 0.222520933f, 0.974927902f, -0.888445616f, -0.458981872f, 0.923879504f, -0.382683426f,
+ -0.303676754f, 0.952775121f, -0.532032073f, -0.846724212f, 0.990181148f, 0.139790341f,
+ -0.745642185f, 0.666346550f, -0.028046256f, -0.999606609f, 0.781831503f, 0.623489797f,
+ -0.980785251f, 0.195090324f, 0.483718902f, -0.875223398f, 0.356621534f, 0.934248924f,
+ -0.943883359f, -0.330279052f, 0.861312628f, -0.508075356f, -0.167506218f, 0.985871017f,
+ -0.645172000f, -0.764037371f, 0.000000000f, 1.000000000f, -0.726660311f, -0.686996937f,
+ 0.998426795f, -0.056070447f, -0.645172000f, 0.764037371f, -0.111964479f, -0.993712187f,
+ 0.799010456f, 0.601317108f, -0.985871017f, 0.167506218f, 0.555570245f, -0.831469595f,
+ 0.222520933f, 0.974927902f, -0.861312628f, -0.508075356f, 0.960917294f, -0.276835501f,
+ -0.458981872f, 0.888445616f, -0.330279052f, -0.943883359f, 0.912783265f, 0.408444256f,
+ -0.923879504f, 0.382683426f, 0.356621534f, -0.934248924f, 0.433883727f, 0.900968850f,
+ -0.952775121f, -0.303676754f, 0.875223398f, -0.483718902f, -0.249776483f, 0.968303502f,
+ -0.532032073f, -0.846724212f, 0.980785251f, 0.195090324f, -0.815560877f, 0.578671277f,
+ 0.139790341f, -0.990181148f, 0.623489797f, 0.781831503f, -0.996461511f, -0.084050521f,
+ 0.745642185f, -0.666346550f, -0.028046256f, 0.999606609f, -0.707106769f, -0.707106769f,
+ 0.999606609f, -0.028046256f, -0.666346550f, 0.745642185f, -0.084050521f, -0.996461511f,
+ 0.781831503f, 0.623489797f, -0.990181148f, 0.139790341f, 0.578671277f, -0.815560877f,
+ 0.195090324f, 0.980785251f, -0.846724212f, -0.532032073f, 0.968303502f, -0.249776483f,
+ -0.483718902f, 0.875223398f, -0.303676754f, -0.952775121f, 0.900968850f, 0.433883727f,
+ -0.934248924f, 0.356621534f, 0.382683426f, -0.923879504f, 0.408444256f, 0.912783265f,
+ -0.943883359f, -0.330279052f, 0.888445616f, -0.458981872f, -0.276835501f, 0.960917294f,
+ -0.508075356f, -0.861312628f, 0.974927902f, 0.222520933f, -0.831469595f, 0.555570245f,
+ 0.167506218f, -0.985871017f, 0.601317108f, 0.799010456f, -0.993712187f, -0.111964479f,
+ 0.764037371f, -0.645172000f, -0.056070447f, 0.998426795f, -0.686996937f, -0.726660311f,
+ 0.000000000f, -1.000000000f, 0.686996937f, 0.726660311f, -0.998426795f, -0.056070447f,
+ 0.764037371f, -0.645172000f, -0.111964479f, 0.993712187f, -0.601317108f, -0.799010456f,
+ 0.985871017f, 0.167506218f, -0.831469595f, 0.555570245f, 0.222520933f, -0.974927902f,
+ 0.508075356f, 0.861312628f, -0.960917294f, -0.276835501f, 0.888445616f, -0.458981872f,
+ -0.330279052f, 0.943883359f, -0.408444256f, -0.912783265f, 0.923879504f, 0.382683426f,
+ -0.934248924f, 0.356621534f, 0.433883727f, -0.900968850f, 0.303676754f, 0.952775121f,
+ -0.875223398f, -0.483718902f, 0.968303502f, -0.249776483f, -0.532032073f, 0.846724212f,
+ -0.195090324f, -0.980785251f, 0.815560877f, 0.578671277f, -0.990181148f, 0.139790341f,
+ 0.623489797f, -0.781831503f, 0.084050521f, 0.996461511f, -0.745642185f, -0.666346550f,
+ 0.999606609f, -0.028046256f, -0.707106769f, 0.707106769f, 0.028046256f, -0.999606609f,
+ 0.666346550f, 0.745642185f, -0.996461511f, -0.084050521f, 0.781831503f, -0.623489797f,
+ -0.139790341f, 0.990181148f, -0.578671277f, -0.815560877f, 0.980785251f, 0.195090324f,
+ -0.846724212f, 0.532032073f, 0.249776483f, -0.968303502f, 0.483718902f, 0.875223398f,
+ -0.952775121f, -0.303676754f, 0.900968850f, -0.433883727f, -0.356621534f, 0.934248924f,
+ -0.382683426f, -0.923879504f, 0.912783265f, 0.408444256f, -0.943883359f, 0.330279052f,
+ 0.458981872f, -0.888445616f, 0.276835501f, 0.960917294f, -0.861312628f, -0.508075356f,
+ 0.974927902f, -0.222520933f, -0.555570245f, 0.831469595f, -0.167506218f, -0.985871017f,
+ 0.799010456f, 0.601317108f, -0.993712187f, 0.111964479f, 0.645172000f, -0.764037371f,
+ 0.056070447f, 0.998426795f, -0.726660311f, -0.686996937f, -0.000000000f, 1.000000000f,
+ -0.645172000f, -0.764037371f, 0.985871017f, 0.167506218f, -0.861312628f, 0.508075356f,
+ 0.330279052f, -0.943883359f, 0.356621534f, 0.934248924f, -0.875223398f, -0.483718902f,
+ 0.980785251f, -0.195090324f, -0.623489797f, 0.781831503f, -0.028046256f, -0.999606609f,
+ 0.666346550f, 0.745642185f, -0.990181148f, -0.139790341f, 0.846724212f, -0.532032073f,
+ -0.303676754f, 0.952775121f, -0.382683426f, -0.923879504f, 0.888445616f, 0.458981872f,
+ -0.974927902f, 0.222520933f, 0.601317108f, -0.799010456f, 0.056070447f, 0.998426795f,
+ -0.686996937f, -0.726660311f, 0.993712187f, 0.111964479f, -0.831469595f, 0.555570245f,
+ 0.276835501f, -0.960917294f, 0.408444256f, 0.912783265f, -0.900968850f, -0.433883727f,
+ 0.968303502f, -0.249776483f, -0.578671277f, 0.815560877f, -0.084050521f, -0.996461511f,
+ 0.707106769f, 0.707106769f, -0.996461511f, -0.084050521f, 0.815560877f, -0.578671277f,
+ -0.249776483f, 0.968303502f, -0.433883727f, -0.900968850f, 0.912783265f, 0.408444256f,
+ -0.960917294f, 0.276835501f, 0.555570245f, -0.831469595f, 0.111964479f, 0.993712187f,
+ -0.726660311f, -0.686996937f, 0.998426795f, 0.056070447f, -0.799010456f, 0.601317108f,
+ 0.222520933f, -0.974927902f, 0.458981872f, 0.888445616f, -0.923879504f, -0.382683426f,
+ 0.952775121f, -0.303676754f, -0.532032073f, 0.846724212f, -0.139790341f, -0.990181148f,
+ 0.745642185f, 0.666346550f, -0.999606609f, -0.028046256f, 0.781831503f, -0.623489797f,
+ -0.195090324f, 0.980785251f, -0.483718902f, -0.875223398f, 0.934248924f, 0.356621534f,
+ -0.943883359f, 0.330279052f, 0.508075356f, -0.861312628f, 0.167506218f, 0.985871017f,
+ -0.764037371f, -0.645172000f, -0.000000000f, -1.000000000f, 0.601317108f, 0.799010456f,
+ -0.960917294f, -0.276835501f, 0.934248924f, -0.356621534f, -0.532032073f, 0.846724212f,
+ -0.084050521f, -0.996461511f, 0.666346550f, 0.745642185f, -0.980785251f, -0.195090324f,
+ 0.900968850f, -0.433883727f, -0.458981872f, 0.888445616f, -0.167506218f, -0.985871017f,
+ 0.726660311f, 0.686996937f, -0.993712187f, -0.111964479f, 0.861312628f, -0.508075356f,
+ -0.382683426f, 0.923879504f, -0.249776483f, -0.968303502f, 0.781831503f, 0.623489797f,
+ -0.999606609f, -0.028046256f, 0.815560877f, -0.578671277f, -0.303676754f, 0.952775121f,
+ -0.330279052f, -0.943883359f, 0.831469595f, 0.555570245f, -0.998426795f, 0.056070447f,
+ 0.764037371f, -0.645172000f, -0.222520933f, 0.974927902f, -0.408444256f, -0.912783265f,
+ 0.875223398f, 0.483718902f, -0.990181148f, 0.139790341f, 0.707106769f, -0.707106769f,
+ -0.139790341f, 0.990181148f, -0.483718902f, -0.875223398f, 0.912783265f, 0.408444256f,
+ -0.974927902f, 0.222520933f, 0.645172000f, -0.764037371f, -0.056070447f, 0.998426795f,
+ -0.555570245f, -0.831469595f, 0.943883359f, 0.330279052f, -0.952775121f, 0.303676754f,
+ 0.578671277f, -0.815560877f, 0.028046256f, 0.999606609f, -0.623489797f, -0.781831503f,
+ 0.968303502f, 0.249776483f, -0.923879504f, 0.382683426f, 0.508075356f, -0.861312628f,
+ 0.111964479f, 0.993712187f, -0.686996937f, -0.726660311f, 0.985871017f, 0.167506218f,
+ -0.888445616f, 0.458981872f, 0.433883727f, -0.900968850f, 0.195090324f, 0.980785251f,
+ -0.745642185f, -0.666346550f, 0.996461511f, 0.084050521f, -0.846724212f, 0.532032073f,
+ 0.356621534f, -0.934248924f, 0.276835501f, 0.960917294f, -0.799010456f, -0.601317108f,
+ -0.000000000f, 1.000000000f, -0.555570245f, -0.831469595f, 0.923879504f, 0.382683426f,
+ -0.980785251f, 0.195090324f, 0.707106769f, -0.707106769f, -0.195090324f, 0.980785251f,
+ -0.382683426f, -0.923879504f, 0.831469595f, 0.555570245f, -1.000000000f, -0.000000000f,
+ 0.831469595f, -0.555570245f, -0.382683426f, 0.923879504f, -0.195090324f, -0.980785251f,
+ 0.707106769f, 0.707106769f, -0.980785251f, -0.195090324f, 0.923879504f, -0.382683426f,
+ -0.555570245f, 0.831469595f, 0.000000000f, -1.000000000f, 0.555570245f, 0.831469595f,
+ -0.923879504f, -0.382683426f, 0.980785251f, -0.195090324f, -0.707106769f, 0.707106769f,
+ 0.195090324f, -0.980785251f, 0.382683426f, 0.923879504f, -0.831469595f, -0.555570245f,
+ 1.000000000f, -0.000000000f, -0.831469595f, 0.555570245f, 0.382683426f, -0.923879504f,
+ 0.195090324f, 0.980785251f, -0.707106769f, -0.707106769f, 0.980785251f, 0.195090324f,
+ -0.923879504f, 0.382683426f, 0.555570245f, -0.831469595f, -0.000000000f, 1.000000000f,
+ -0.555570245f, -0.831469595f, 0.923879504f, 0.382683426f, -0.980785251f, 0.195090324f,
+ 0.707106769f, -0.707106769f, -0.195090324f, 0.980785251f, -0.382683426f, -0.923879504f,
+ 0.831469595f, 0.555570245f, -1.000000000f, 0.000000000f, 0.831469595f, -0.555570245f,
+ -0.382683426f, 0.923879504f, -0.195090324f, -0.980785251f, 0.707106769f, 0.707106769f,
+ -0.980785251f, -0.195090324f, 0.923879504f, -0.382683426f, -0.555570245f, 0.831469595f,
+ -0.000000000f, -1.000000000f, 0.555570245f, 0.831469595f, -0.923879504f, -0.382683426f,
+ 0.980785251f, -0.195090324f, -0.707106769f, 0.707106769f, 0.195090324f, -0.980785251f,
+ 0.382683426f, 0.923879504f, -0.831469595f, -0.555570245f, 0.000000000f, -1.000000000f,
+ 0.508075356f, 0.861312628f, -0.875223398f, -0.483718902f, 0.999606609f, -0.028046256f,
+ -0.846724212f, 0.532032073f, 0.458981872f, -0.888445616f, 0.056070447f, 0.998426795f,
+ -0.555570245f, -0.831469595f, 0.900968850f, 0.433883727f, -0.996461511f, 0.084050521f,
+ 0.815560877f, -0.578671277f, -0.408444256f, 0.912783265f, -0.111964479f, -0.993712187f,
+ 0.601317108f, 0.799010456f, -0.923879504f, -0.382683426f, 0.990181148f, -0.139790341f,
+ -0.781831503f, 0.623489797f, 0.356621534f, -0.934248924f, 0.167506218f, 0.985871017f,
+ -0.645172000f, -0.764037371f, 0.943883359f, 0.330279052f, -0.980785251f, 0.195090324f,
+ 0.745642185f, -0.666346550f, -0.303676754f, 0.952775121f, -0.222520933f, -0.974927902f,
+ 0.686996937f, 0.726660311f, -0.960917294f, -0.276835501f, 0.968303502f, -0.249776483f,
+ -0.707106769f, 0.707106769f, 0.249776483f, -0.968303502f, 0.276835501f, 0.960917294f,
+ -0.726660311f, -0.686996937f, 0.974927902f, 0.222520933f, -0.952775121f, 0.303676754f,
+ 0.666346550f, -0.745642185f, -0.195090324f, 0.980785251f, -0.330279052f, -0.943883359f,
+ 0.764037371f, 0.645172000f, -0.985871017f, -0.167506218f, 0.934248924f, -0.356621534f,
+ -0.623489797f, 0.781831503f, 0.139790341f, -0.990181148f, 0.382683426f, 0.923879504f,
+ -0.799010456f, -0.601317108f, 0.993712187f, 0.111964479f, -0.912783265f, 0.408444256f,
+ 0.578671277f, -0.815560877f, -0.084050521f, 0.996461511f, -0.433883727f, -0.900968850f,
+ 0.831469595f, 0.555570245f, -0.998426795f, -0.056070447f, 0.888445616f, -0.458981872f,
+ -0.532032073f, 0.846724212f, 0.028046256f, -0.999606609f, 0.483718902f, 0.875223398f,
+ -0.861312628f, -0.508075356f, -0.000000000f, 1.000000000f, -0.458981872f, -0.888445616f,
+ 0.815560877f, 0.578671277f, -0.990181148f, -0.139790341f, 0.943883359f, -0.330279052f,
+ -0.686996937f, 0.726660311f, 0.276835501f, -0.960917294f, 0.195090324f, 0.980785251f,
+ -0.623489797f, -0.781831503f, 0.912783265f, 0.408444256f, -0.998426795f, 0.056070447f,
+ 0.861312628f, -0.508075356f, -0.532032073f, 0.846724212f, 0.084050521f, -0.996461511f,
+ 0.382683426f, 0.923879504f, -0.764037371f, -0.645172000f, 0.974927902f, 0.222520933f,
+ -0.968303502f, 0.249776483f, 0.745642185f, -0.666346550f, -0.356621534f, 0.934248924f,
+ -0.111964479f, -0.993712187f, 0.555570245f, 0.831469595f, -0.875223398f, -0.483718902f,
+ 0.999606609f, 0.028046256f, -0.900968850f, 0.433883727f, 0.601317108f, -0.799010456f,
+ -0.167506218f, 0.985871017f, -0.303676754f, -0.952775121f, 0.707106769f, 0.707106769f,
+ -0.952775121f, -0.303676754f, 0.985871017f, -0.167506218f, -0.799010456f, 0.601317108f,
+ 0.433883727f, -0.900968850f, 0.028046256f, 0.999606609f, -0.483718902f, -0.875223398f,
+ 0.831469595f, 0.555570245f, -0.993712187f, -0.111964479f, 0.934248924f, -0.356621534f,
+ -0.666346550f, 0.745642185f, 0.249776483f, -0.968303502f, 0.222520933f, 0.974927902f,
+ -0.645172000f, -0.764037371f, 0.923879504f, 0.382683426f, -0.996461511f, 0.084050521f,
+ 0.846724212f, -0.532032073f, -0.508075356f, 0.861312628f, 0.056070447f, -0.998426795f,
+ 0.408444256f, 0.912783265f, -0.781831503f, -0.623489797f, 0.980785251f, 0.195090324f,
+ -0.960917294f, 0.276835501f, 0.726660311f, -0.686996937f, -0.330279052f, 0.943883359f,
+ -0.139790341f, -0.990181148f, 0.578671277f, 0.815560877f, -0.888445616f, -0.458981872f,
+ 0.000000000f, -1.000000000f, 0.408444256f, 0.912783265f, -0.745642185f, -0.666346550f,
+ 0.952775121f, 0.303676754f, -0.993712187f, 0.111964479f, 0.861312628f, -0.508075356f,
+ -0.578671277f, 0.815560877f, 0.195090324f, -0.980785251f, 0.222520933f, 0.974927902f,
+ -0.601317108f, -0.799010456f, 0.875223398f, 0.483718902f, -0.996461511f, -0.084050521f,
+ 0.943883359f, -0.330279052f, -0.726660311f, 0.686996937f, 0.382683426f, -0.923879504f,
+ 0.028046256f, 0.999606609f, -0.433883727f, -0.900968850f, 0.764037371f, 0.645172000f,
+ -0.960917294f, -0.276835501f, 0.990181148f, -0.139790341f, -0.846724212f, 0.532032073f,
+ 0.555570245f, -0.831469595f, -0.167506218f, 0.985871017f, -0.249776483f, -0.968303502f,
+ 0.623489797f, 0.781831503f, -0.888445616f, -0.458981872f, 0.998426795f, 0.056070447f,
+ -0.934248924f, 0.356621534f, 0.707106769f, -0.707106769f, -0.356621534f, 0.934248924f,
+ -0.056070447f, -0.998426795f, 0.458981872f, 0.888445616f, -0.781831503f, -0.623489797f,
+ 0.968303502f, 0.249776483f, -0.985871017f, 0.167506218f, 0.831469595f, -0.555570245f,
+ -0.532032073f, 0.846724212f, 0.139790341f, -0.990181148f, 0.276835501f, 0.960917294f,
+ -0.645172000f, -0.764037371f, 0.900968850f, 0.433883727f, -0.999606609f, -0.028046256f,
+ 0.923879504f, -0.382683426f, -0.686996937f, 0.726660311f, 0.330279052f, -0.943883359f,
+ 0.084050521f, 0.996461511f, -0.483718902f, -0.875223398f, 0.799010456f, 0.601317108f,
+ -0.974927902f, -0.222520933f, 0.980785251f, -0.195090324f, -0.815560877f, 0.578671277f,
+ 0.508075356f, -0.861312628f, -0.111964479f, 0.993712187f, -0.303676754f, -0.952775121f,
+ 0.666346550f, 0.745642185f, -0.912783265f, -0.408444256f, 0.000000000f, 1.000000000f,
+ -0.356621534f, -0.934248924f, 0.666346550f, 0.745642185f, -0.888445616f, -0.458981872f,
+ 0.993712187f, 0.111964479f, -0.968303502f, 0.249776483f, 0.815560877f, -0.578671277f,
+ -0.555570245f, 0.831469595f, 0.222520933f, -0.974927902f, 0.139790341f, 0.990181148f,
+ -0.483718902f, -0.875223398f, 0.764037371f, 0.645172000f, -0.943883359f, -0.330279052f,
+ 0.999606609f, -0.028046256f, -0.923879504f, 0.382683426f, 0.726660311f, -0.686996937f,
+ -0.433883727f, 0.900968850f, 0.084050521f, -0.996461511f, 0.276835501f, 0.960917294f,
+ -0.601317108f, -0.799010456f, 0.846724212f, 0.532032073f, -0.980785251f, -0.195090324f,
+ 0.985871017f, -0.167506218f, -0.861312628f, 0.508075356f, 0.623489797f, -0.781831503f,
+ -0.303676754f, 0.952775121f, -0.056070447f, -0.998426795f, 0.408444256f, 0.912783265f,
+ -0.707106769f, -0.707106769f, 0.912783265f, 0.408444256f, -0.998426795f, -0.056070447f,
+ 0.952775121f, -0.303676754f, -0.781831503f, 0.623489797f, 0.508075356f, -0.861312628f,
+ -0.167506218f, 0.985871017f, -0.195090324f, -0.980785251f, 0.532032073f, 0.846724212f,
+ -0.799010456f, -0.601317108f, 0.960917294f, 0.276835501f, -0.996461511f, 0.084050521f,
+ 0.900968850f, -0.433883727f, -0.686996937f, 0.726660311f, 0.382683426f, -0.923879504f,
+ -0.028046256f, 0.999606609f, -0.330279052f, -0.943883359f, 0.645172000f, 0.764037371f,
+ -0.875223398f, -0.483718902f, 0.990181148f, 0.139790341f, -0.974927902f, 0.222520933f,
+ 0.831469595f, -0.555570245f, -0.578671277f, 0.815560877f, 0.249776483f, -0.968303502f,
+ 0.111964479f, 0.993712187f, -0.458981872f, -0.888445616f, 0.745642185f, 0.666346550f,
+ -0.934248924f, -0.356621534f, 0.000000000f, -1.000000000f, 0.303676754f, 0.952775121f,
+ -0.578671277f, -0.815560877f, 0.799010456f, 0.601317108f, -0.943883359f, -0.330279052f,
+ 0.999606609f, 0.028046256f, -0.960917294f, 0.276835501f, 0.831469595f, -0.555570245f,
+ -0.623489797f, 0.781831503f, 0.356621534f, -0.934248924f, -0.056070447f, 0.998426795f,
+ -0.249776483f, -0.968303502f, 0.532032073f, 0.846724212f, -0.764037371f, -0.645172000f,
+ 0.923879504f, 0.382683426f, -0.996461511f, -0.084050521f, 0.974927902f, -0.222520933f,
+ -0.861312628f, 0.508075356f, 0.666346550f, -0.745642185f, -0.408444256f, 0.912783265f,
+ 0.111964479f, -0.993712187f, 0.195090324f, 0.980785251f, -0.483718902f, -0.875223398f,
+ 0.726660311f, 0.686996937f, -0.900968850f, -0.433883727f, 0.990181148f, 0.139790341f,
+ -0.985871017f, 0.167506218f, 0.888445616f, -0.458981872f, -0.707106769f, 0.707106769f,
+ 0.458981872f, -0.888445616f, -0.167506218f, 0.985871017f, -0.139790341f, -0.990181148f,
+ 0.433883727f, 0.900968850f, -0.686996937f, -0.726660311f, 0.875223398f, 0.483718902f,
+ -0.980785251f, -0.195090324f, 0.993712187f, -0.111964479f, -0.912783265f, 0.408444256f,
+ 0.745642185f, -0.666346550f, -0.508075356f, 0.861312628f, 0.222520933f, -0.974927902f,
+ 0.084050521f, 0.996461511f, -0.382683426f, -0.923879504f, 0.645172000f, 0.764037371f,
+ -0.846724212f, -0.532032073f, 0.968303502f, 0.249776483f, -0.998426795f, 0.056070447f,
+ 0.934248924f, -0.356621534f, -0.781831503f, 0.623489797f, 0.555570245f, -0.831469595f,
+ -0.276835501f, 0.960917294f, -0.028046256f, -0.999606609f, 0.330279052f, 0.943883359f,
+ -0.601317108f, -0.799010456f, 0.815560877f, 0.578671277f, -0.952775121f, -0.303676754f,
+ -0.000000000f, 1.000000000f, -0.249776483f, -0.968303502f, 0.483718902f, 0.875223398f,
+ -0.686996937f, -0.726660311f, 0.846724212f, 0.532032073f, -0.952775121f, -0.303676754f,
+ 0.998426795f, 0.056070447f, -0.980785251f, 0.195090324f, 0.900968850f, -0.433883727f,
+ -0.764037371f, 0.645172000f, 0.578671277f, -0.815560877f, -0.356621534f, 0.934248924f,
+ 0.111964479f, -0.993712187f, 0.139790341f, 0.990181148f, -0.382683426f, -0.923879504f,
+ 0.601317108f, 0.799010456f, -0.781831503f, -0.623489797f, 0.912783265f, 0.408444256f,
+ -0.985871017f, -0.167506218f, 0.996461511f, -0.084050521f, -0.943883359f, 0.330279052f,
+ 0.831469595f, -0.555570245f, -0.666346550f, 0.745642185f, 0.458981872f, -0.888445616f,
+ -0.222520933f, 0.974927902f, -0.028046256f, -0.999606609f, 0.276835501f, 0.960917294f,
+ -0.508075356f, -0.861312628f, 0.707106769f, 0.707106769f, -0.861312628f, -0.508075356f,
+ 0.960917294f, 0.276835501f, -0.999606609f, -0.028046256f, 0.974927902f, -0.222520933f,
+ -0.888445616f, 0.458981872f, 0.745642185f, -0.666346550f, -0.555570245f, 0.831469595f,
+ 0.330279052f, -0.943883359f, -0.084050521f, 0.996461511f, -0.167506218f, -0.985871017f,
+ 0.408444256f, 0.912783265f, -0.623489797f, -0.781831503f, 0.799010456f, 0.601317108f,
+ -0.923879504f, -0.382683426f, 0.990181148f, 0.139790341f, -0.993712187f, 0.111964479f,
+ 0.934248924f, -0.356621534f, -0.815560877f, 0.578671277f, 0.645172000f, -0.764037371f,
+ -0.433883727f, 0.900968850f, 0.195090324f, -0.980785251f, 0.056070447f, 0.998426795f,
+ -0.303676754f, -0.952775121f, 0.532032073f, 0.846724212f, -0.726660311f, -0.686996937f,
+ 0.875223398f, 0.483718902f, -0.968303502f, -0.249776483f, -0.000000000f, -1.000000000f,
+ 0.195090324f, 0.980785251f, -0.382683426f, -0.923879504f, 0.555570245f, 0.831469595f,
+ -0.707106769f, -0.707106769f, 0.831469595f, 0.555570245f, -0.923879504f, -0.382683426f,
+ 0.980785251f, 0.195090324f, -1.000000000f, -0.000000000f, 0.980785251f, -0.195090324f,
+ -0.923879504f, 0.382683426f, 0.831469595f, -0.555570245f, -0.707106769f, 0.707106769f,
+ 0.555570245f, -0.831469595f, -0.382683426f, 0.923879504f, 0.195090324f, -0.980785251f,
+ -0.000000000f, 1.000000000f, -0.195090324f, -0.980785251f, 0.382683426f, 0.923879504f,
+ -0.555570245f, -0.831469595f, 0.707106769f, 0.707106769f, -0.831469595f, -0.555570245f,
+ 0.923879504f, 0.382683426f, -0.980785251f, -0.195090324f, 1.000000000f, 0.000000000f,
+ -0.980785251f, 0.195090324f, 0.923879504f, -0.382683426f, -0.831469595f, 0.555570245f,
+ 0.707106769f, -0.707106769f, -0.555570245f, 0.831469595f, 0.382683426f, -0.923879504f,
+ -0.195090324f, 0.980785251f, 0.000000000f, -1.000000000f, 0.195090324f, 0.980785251f,
+ -0.382683426f, -0.923879504f, 0.555570245f, 0.831469595f, -0.707106769f, -0.707106769f,
+ 0.831469595f, 0.555570245f, -0.923879504f, -0.382683426f, 0.980785251f, 0.195090324f,
+ -1.000000000f, -0.000000000f, 0.980785251f, -0.195090324f, -0.923879504f, 0.382683426f,
+ 0.831469595f, -0.555570245f, -0.707106769f, 0.707106769f, 0.555570245f, -0.831469595f,
+ -0.382683426f, 0.923879504f, 0.195090324f, -0.980785251f, -0.000000000f, 1.000000000f,
+ -0.195090324f, -0.980785251f, 0.382683426f, 0.923879504f, -0.555570245f, -0.831469595f,
+ 0.707106769f, 0.707106769f, -0.831469595f, -0.555570245f, 0.923879504f, 0.382683426f,
+ -0.980785251f, -0.195090324f, -0.000000000f, 1.000000000f, -0.139790341f, -0.990181148f,
+ 0.276835501f, 0.960917294f, -0.408444256f, -0.912783265f, 0.532032073f, 0.846724212f,
+ -0.645172000f, -0.764037371f, 0.745642185f, 0.666346550f, -0.831469595f, -0.555570245f,
+ 0.900968850f, 0.433883727f, -0.952775121f, -0.303676754f, 0.985871017f, 0.167506218f,
+ -0.999606609f, -0.028046256f, 0.993712187f, -0.111964479f, -0.968303502f, 0.249776483f,
+ 0.923879504f, -0.382683426f, -0.861312628f, 0.508075356f, 0.781831503f, -0.623489797f,
+ -0.686996937f, 0.726660311f, 0.578671277f, -0.815560877f, -0.458981872f, 0.888445616f,
+ 0.330279052f, -0.943883359f, -0.195090324f, 0.980785251f, 0.056070447f, -0.998426795f,
+ 0.084050521f, 0.996461511f, -0.222520933f, -0.974927902f, 0.356621534f, 0.934248924f,
+ -0.483718902f, -0.875223398f, 0.601317108f, 0.799010456f, -0.707106769f, -0.707106769f,
+ 0.799010456f, 0.601317108f, -0.875223398f, -0.483718902f, 0.934248924f, 0.356621534f,
+ -0.974927902f, -0.222520933f, 0.996461511f, 0.084050521f, -0.998426795f, 0.056070447f,
+ 0.980785251f, -0.195090324f, -0.943883359f, 0.330279052f, 0.888445616f, -0.458981872f,
+ -0.815560877f, 0.578671277f, 0.726660311f, -0.686996937f, -0.623489797f, 0.781831503f,
+ 0.508075356f, -0.861312628f, -0.382683426f, 0.923879504f, 0.249776483f, -0.968303502f,
+ -0.111964479f, 0.993712187f, -0.028046256f, -0.999606609f, 0.167506218f, 0.985871017f,
+ -0.303676754f, -0.952775121f, 0.433883727f, 0.900968850f, -0.555570245f, -0.831469595f,
+ 0.666346550f, 0.745642185f, -0.764037371f, -0.645172000f, 0.846724212f, 0.532032073f,
+ -0.912783265f, -0.408444256f, 0.960917294f, 0.276835501f, -0.990181148f, -0.139790341f,
+ 0.000000000f, -1.000000000f, 0.084050521f, 0.996461511f, -0.167506218f, -0.985871017f,
+ 0.249776483f, 0.968303502f, -0.330279052f, -0.943883359f, 0.408444256f, 0.912783265f,
+ -0.483718902f, -0.875223398f, 0.555570245f, 0.831469595f, -0.623489797f, -0.781831503f,
+ 0.686996937f, 0.726660311f, -0.745642185f, -0.666346550f, 0.799010456f, 0.601317108f,
+ -0.846724212f, -0.532032073f, 0.888445616f, 0.458981872f, -0.923879504f, -0.382683426f,
+ 0.952775121f, 0.303676754f, -0.974927902f, -0.222520933f, 0.990181148f, 0.139790341f,
+ -0.998426795f, -0.056070447f, 0.999606609f, -0.028046256f, -0.993712187f, 0.111964479f,
+ 0.980785251f, -0.195090324f, -0.960917294f, 0.276835501f, 0.934248924f, -0.356621534f,
+ -0.900968850f, 0.433883727f, 0.861312628f, -0.508075356f, -0.815560877f, 0.578671277f,
+ 0.764037371f, -0.645172000f, -0.707106769f, 0.707106769f, 0.645172000f, -0.764037371f,
+ -0.578671277f, 0.815560877f, 0.508075356f, -0.861312628f, -0.433883727f, 0.900968850f,
+ 0.356621534f, -0.934248924f, -0.276835501f, 0.960917294f, 0.195090324f, -0.980785251f,
+ -0.111964479f, 0.993712187f, 0.028046256f, -0.999606609f, 0.056070447f, 0.998426795f,
+ -0.139790341f, -0.990181148f, 0.222520933f, 0.974927902f, -0.303676754f, -0.952775121f,
+ 0.382683426f, 0.923879504f, -0.458981872f, -0.888445616f, 0.532032073f, 0.846724212f,
+ -0.601317108f, -0.799010456f, 0.666346550f, 0.745642185f, -0.726660311f, -0.686996937f,
+ 0.781831503f, 0.623489797f, -0.831469595f, -0.555570245f, 0.875223398f, 0.483718902f,
+ -0.912783265f, -0.408444256f, 0.943883359f, 0.330279052f, -0.968303502f, -0.249776483f,
+ 0.985871017f, 0.167506218f, -0.996461511f, -0.084050521f, -0.000000000f, 1.000000000f,
+ -0.028046256f, -0.999606609f, 0.056070447f, 0.998426795f, -0.084050521f, -0.996461511f,
+ 0.111964479f, 0.993712187f, -0.139790341f, -0.990181148f, 0.167506218f, 0.985871017f,
+ -0.195090324f, -0.980785251f, 0.222520933f, 0.974927902f, -0.249776483f, -0.968303502f,
+ 0.276835501f, 0.960917294f, -0.303676754f, -0.952775121f, 0.330279052f, 0.943883359f,
+ -0.356621534f, -0.934248924f, 0.382683426f, 0.923879504f, -0.408444256f, -0.912783265f,
+ 0.433883727f, 0.900968850f, -0.458981872f, -0.888445616f, 0.483718902f, 0.875223398f,
+ -0.508075356f, -0.861312628f, 0.532032073f, 0.846724212f, -0.555570245f, -0.831469595f,
+ 0.578671277f, 0.815560877f, -0.601317108f, -0.799010456f, 0.623489797f, 0.781831503f,
+ -0.645172000f, -0.764037371f, 0.666346550f, 0.745642185f, -0.686996937f, -0.726660311f,
+ 0.707106769f, 0.707106769f, -0.726660311f, -0.686996937f, 0.745642185f, 0.666346550f,
+ -0.764037371f, -0.645172000f, 0.781831503f, 0.623489797f, -0.799010456f, -0.601317108f,
+ 0.815560877f, 0.578671277f, -0.831469595f, -0.555570245f, 0.846724212f, 0.532032073f,
+ -0.861312628f, -0.508075356f, 0.875223398f, 0.483718902f, -0.888445616f, -0.458981872f,
+ 0.900968850f, 0.433883727f, -0.912783265f, -0.408444256f, 0.923879504f, 0.382683426f,
+ -0.934248924f, -0.356621534f, 0.943883359f, 0.330279052f, -0.952775121f, -0.303676754f,
+ 0.960917294f, 0.276835501f, -0.968303502f, -0.249776483f, 0.974927902f, 0.222520933f,
+ -0.980785251f, -0.195090324f, 0.985871017f, 0.167506218f, -0.990181148f, -0.139790341f,
+ 0.993712187f, 0.111964479f, -0.996461511f, -0.084050521f, 0.998426795f, 0.056070447f,
+ -0.999606609f, -0.028046256f,
+};
+
const FLOAT32 ixheaacd_twiddle_table_fft_float[514] = {
1.00000000000000000000f, 0.99998117528260111000f,
0.99992470183914450000f, 0.99983058179582340000f,
@@ -2606,4 +3766,1585 @@ const FLOAT32 ixheaacd_sel_case[5][8] = {{1, -1, 1, 1, 1, 1, -1, 1},
{1, 1, -1, 1, 1, -1, 1, 1},
{-1, 1, -1, -1, -1, -1, 1, -1},
{-1, -1, 1, -1, -1, 1, -1, -1},
- {1, -1, 1, 1, 1, 1, -1, 1}}; \ No newline at end of file
+ {1, -1, 1, 1, 1, 1, -1, 1}};
+
+const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff_28_36[280 + 360] = {
+ 0.000000000000f, -0.000542621361f, -0.000488583522f, -0.000520001457f, -0.000570539269f,
+ -0.000620978128f, -0.000670987472f, -0.000715773669f, -0.000745512953f, -0.000770621584f,
+ -0.000778765010f, -0.000779523922f, -0.000758759677f, -0.000724509649f, -0.000665041502f,
+ -0.000583710556f, -0.000483743032f, -0.000358602498f, -0.000200519848f, -0.000029492525f,
+ 0.000177197973f, 0.000402654434f, 0.000658756529f, 0.000933847099f, 0.001238821540f,
+ 0.001564677688f, 0.001898807241f, 0.002257277956f, 0.002620175947f, 0.002994259354f,
+ 0.003369919956f, 0.003737597959f, 0.004102611449f, 0.004436464049f, 0.004755367525f,
+ 0.005039302167f, 0.005274989177f, 0.005458493251f, 0.005587198306f, 0.005644576624f,
+ 0.005611654837f, 0.005493966397f, 0.005271574948f, 0.004934532568f, 0.004476084840f,
+ 0.003885571612f, 0.003157114144f, 0.002269380260f, 0.001229724381f, 0.000027600139f,
+ -0.001341713127f, -0.002888793591f, -0.004610527772f, -0.006505282596f, -0.008588129655f,
+ -0.010841125622f, 0.013271821663f, 0.015881109983f, 0.018654156476f, 0.021561963484f,
+ 0.024612039328f, 0.027795063332f, 0.031087061390f, 0.034462094307f, 0.037916749716f,
+ 0.041409216821f, 0.044928979129f, 0.048434015363f, 0.051901672035f, 0.055296782404f,
+ 0.058591566980f, 0.061728458852f, 0.064687669277f, 0.067440338433f, 0.069905869663f,
+ 0.072072267532f, 0.073889419436f, 0.075313739479f, 0.076284952462f, 0.076771095395f,
+ 0.076735138893f, 0.076111361384f, 0.074861399829f, 0.072952635586f, 0.070353284478f,
+ 0.066971510649f, 0.062810622156f, 0.057844031602f, 0.052007704973f, 0.045278843492f,
+ 0.037642929703f, 0.029082339257f, 0.019534083083f, 0.009020207450f, -0.002467962215f,
+ -0.014951020479f, -0.028450148180f, -0.042922731489f, -0.058370642364f, -0.074820943177f,
+ -0.092211194336f, -0.110518477857f, -0.129736796021f, -0.149827122688f, -0.170728057623f,
+ -0.192396819592f, -0.214828416705f, -0.237916424870f, -0.261611491442f, -0.285857290030f,
+ -0.310589224100f, -0.335712105036f, 0.361158996820f, 0.386859893799f, 0.412710726261f,
+ 0.438634932041f, 0.464547455311f, 0.490345001221f, 0.515940248966f, 0.541255354881f,
+ 0.566157341003f, 0.590581595898f, 0.614434957504f, 0.637616693974f, 0.660021364689f,
+ 0.681587100029f, 0.702238857746f, 0.721817433834f, 0.740313649178f, 0.757651746273f,
+ 0.773728370667f, 0.788466095924f, 0.801848053932f, 0.813819110394f, 0.824237942696f,
+ 0.833155274391f, 0.840528070927f, 0.846274733543f, 0.850387632847f, 0.852874279022f,
+ 0.853738546371f, 0.852874219418f, 0.850387632847f, 0.846274673939f, 0.840528011322f,
+ 0.833155155182f, 0.824237823486f, 0.813819110394f, 0.801847875118f, 0.788465917110f,
+ 0.773728191853f, 0.757651507854f, 0.740313410759f, 0.721817195415f, 0.702238559723f,
+ 0.681586861610f, 0.660021066666f, 0.637616395950f, 0.614434659481f, 0.590581297874f,
+ 0.566156983376f, 0.541254997253f, 0.515939891338f, 0.490344673395f, 0.464547097683f,
+ 0.438634604216f, 0.412710398436f, 0.386859536171f, -0.361158668995f, -0.335711777210f,
+ -0.310588866472f, -0.285857141018f, -0.261611163616f, -0.237916111946f, -0.214828267694f,
+ -0.192396372557f, -0.170727774501f, -0.149826839566f, -0.129736661911f, -0.110518231988f,
+ -0.092210955918f, -0.074820823967f, -0.058370325714f, -0.042922534049f, -0.028449961916f,
+ -0.014950932935f, -0.002467804123f, 0.009020354599f, 0.019534152001f, 0.029082519934f,
+ 0.037643034011f, 0.045278891921f, 0.052007835358f, 0.057844102383f, 0.062810681760f,
+ 0.066971540451f, 0.070353344083f, 0.072952665389f, 0.074861414731f, 0.076111383736f,
+ 0.076735138893f, 0.076771095395f, 0.076284952462f, 0.075313717127f, 0.073889397085f,
+ 0.072072252631f, 0.069905824959f, 0.067440301180f, 0.064687632024f, 0.061728436500f,
+ 0.058591522276f, 0.055296737701f, 0.051901649684f, 0.048433944583f, 0.044928930700f,
+ 0.041409172118f, 0.037916723639f, 0.034462049603f, 0.031087018549f, 0.027795042843f,
+ 0.024611977860f, 0.021561924368f, 0.018654119223f, 0.015881091356f, -0.013271821663f,
+ -0.010841063224f, -0.008588085882f, -0.006505249068f, -0.004610503558f, -0.002888777293f,
+ -0.001341703231f, 0.000027604519f, 0.001229754183f, 0.002269399818f, 0.003157128114f,
+ 0.003885580227f, 0.004476089962f, 0.004934535362f, 0.005271575879f, 0.005493969657f,
+ 0.005611656234f, 0.005644577090f, 0.005587196909f, 0.005458491389f, 0.005274987780f,
+ 0.005039302167f, 0.004755360540f, 0.004436457064f, 0.004102606326f, 0.003737593070f,
+ 0.003369916230f, 0.002994256793f, 0.002620175947f, 0.002257269574f, 0.001898800372f,
+ 0.001564672217f, 0.001238817465f, 0.000933844654f, 0.000658755132f, 0.000402654026f,
+ 0.000177192909f, -0.000029495970f, -0.000200522336f, -0.000358604098f, -0.000483744079f,
+ -0.000583711022f, -0.000665041502f, -0.000724510173f, -0.000758760143f, -0.000779524038f,
+ -0.000778765127f, -0.000770621467f, -0.000745512894f, -0.000715773669f, -0.000670986192f,
+ -0.000620977371f, -0.000570538570f, -0.000520000933f, -0.000488583522f, -0.000542622001f,
+
+ 0.000000000000f, -0.000559715787f, -0.000490735692f, -0.000494276523f, -0.000525323092f,
+ -0.000565433234f, -0.000604547502f, -0.000641375547f, -0.000681411824f, -0.000715773669f,
+ -0.000739963143f, -0.000759658345f, -0.000776134315f, -0.000778251328f, -0.000780169561f,
+ -0.000767318823f, -0.000743638200f, -0.000714929076f, -0.000665041502f, -0.000603400229f,
+ -0.000533179555f, -0.000443592493f, -0.000343404361f, -0.000218707515f, -0.000089368215f,
+ 0.000056136661f, 0.000224446383f, 0.000402654026f, 0.000598782441f, 0.000809714838f,
+ 0.001034070854f, 0.001272506313f, 0.001527202898f, 0.001785487286f, 0.002056134166f,
+ 0.002337466693f, 0.002620175947f, 0.002911411924f, 0.003202219727f, 0.003494867589f,
+ 0.003778209677f, 0.004064061213f, 0.004324190319f, 0.004583056550f, 0.004820034839f,
+ 0.005039302167f, 0.005222698674f, 0.005387451034f, 0.005507593509f, 0.005596942734f,
+ 0.005642913748f, 0.005630714353f, 0.005568923429f, 0.005455049220f, 0.005271575879f,
+ 0.005018248223f, 0.004695950076f, 0.004295178223f, 0.003811693750f, 0.003245957894f,
+ 0.002582128858f, 0.001827885280f, 0.000977565185f, 0.000027604519f, -0.001021172851f,
+ -0.002181018004f, -0.003442291170f, -0.004812424537f, -0.006285287905f, -0.007873740047f,
+ -0.009569193237f, -0.011365653016f, 0.013271821663f, 0.015284989960f, 0.017405176535f,
+ 0.019609216601f, 0.021893566474f, 0.024266306311f, 0.026719830930f, 0.029248571023f,
+ 0.031829249114f, 0.034462094307f, 0.037145402282f, 0.039855118841f, 0.042579848319f,
+ 0.045319452882f, 0.048046313226f, 0.050749942660f, 0.053421828896f, 0.056038323790f,
+ 0.058591566980f, 0.061042912304f, 0.063400119543f, 0.065628714859f, 0.067729465663f,
+ 0.069645397365f, 0.071387805045f, 0.072921045125f, 0.074243679643f, 0.075313732028f,
+ 0.076110713184f, 0.076615959406f, 0.076819270849f, 0.076696552336f, 0.076211526990f,
+ 0.075348608196f, 0.074099399149f, 0.072434164584f, 0.070353306830f, 0.067788913846f,
+ 0.064755402505f, 0.061245746911f, 0.057240899652f, 0.052702348679f, 0.047619495541f,
+ 0.041996419430f, 0.035823248327f, 0.029082400724f, 0.021739905700f, 0.013810261153f,
+ 0.005301336292f, -0.003804539563f, -0.013511340134f, -0.023842986673f, -0.034764017910f,
+ -0.046269558370f, -0.058370534331f, -0.071082539856f, -0.084369227290f, -0.098213173449f,
+ -0.112607732415f, -0.127556651831f, -0.143036201596f, -0.159020766616f, -0.175477877259f,
+ -0.192396670580f, -0.209785103798f, -0.227578520775f, -0.245750412345f, -0.264278501272f,
+ -0.283137172461f, -0.302297204733f, -0.321709424257f, -0.341343283653f, 0.361158996820f,
+ 0.381133735180f, 0.401205033064f, 0.421350568533f, 0.441515892744f, 0.461671739817f,
+ 0.481765180826f, 0.501753628254f, 0.521590352058f, 0.541255354881f, 0.560662448406f,
+ 0.579790294170f, 0.598601102829f, 0.617045819759f, 0.635078668594f, 0.652643322945f,
+ 0.669715166092f, 0.686256051064f, 0.702238857746f, 0.717556118965f, 0.732231855392f,
+ 0.746226549149f, 0.759503602982f, 0.772010207176f, 0.783699750900f, 0.794583916664f,
+ 0.804631054401f, 0.813819110394f, 0.822049856186f, 0.829381108284f, 0.835786461830f,
+ 0.841250777245f, 0.845719814301f, 0.849197506905f, 0.851689398289f, 0.853206515312f,
+ 0.853738546371f, 0.853206515312f, 0.851689338684f, 0.849197506905f, 0.845719814301f,
+ 0.841250777245f, 0.835786461830f, 0.829380989075f, 0.822049856186f, 0.813819110394f,
+ 0.804631054401f, 0.794583737850f, 0.783699750900f, 0.772010207176f, 0.759503602982f,
+ 0.746226549149f, 0.732231616974f, 0.717556118965f, 0.702238857746f, 0.686256051064f,
+ 0.669714868069f, 0.652643322945f, 0.635078668594f, 0.617045819759f, 0.598601102829f,
+ 0.579789996147f, 0.560662448406f, 0.541255354881f, 0.521590352058f, 0.501753270626f,
+ 0.481765180826f, 0.461671739817f, 0.441515892744f, 0.421350568533f, 0.401204675436f,
+ 0.381133735180f, -0.361158996820f, -0.341343283653f, -0.321709245443f, -0.302297025919f,
+ -0.283137172461f, -0.264278501272f, -0.245750576258f, -0.227578371763f, -0.209784954786f,
+ -0.192396670580f, -0.175477877259f, -0.159020632505f, -0.143036067486f, -0.127556651831f,
+ -0.112607732415f, -0.098213292658f, -0.084369115531f, -0.071082428098f, -0.058370534331f,
+ -0.046269558370f, -0.034763921052f, -0.023842897266f, -0.013511340134f, -0.003804539563f,
+ 0.005301259924f, 0.013810331002f, 0.021739969030f, 0.029082400724f, 0.035823248327f,
+ 0.041996467859f, 0.047619540244f, 0.052702348679f, 0.057240899652f, 0.061245713383f,
+ 0.064755432308f, 0.067788936198f, 0.070353306830f, 0.072434164584f, 0.074099414051f,
+ 0.075348615646f, 0.076211526990f, 0.076696552336f, 0.076819270849f, 0.076615959406f,
+ 0.076110713184f, 0.075313732028f, 0.074243679643f, 0.072921030223f, 0.071387790143f,
+ 0.069645397365f, 0.067729465663f, 0.065628737211f, 0.063400097191f, 0.061042893678f,
+ 0.058591566980f, 0.056038323790f, 0.053421806544f, 0.050749920309f, 0.048046313226f,
+ 0.045319452882f, 0.042579874396f, 0.039855096489f, 0.037145379931f, 0.034462094307f,
+ 0.031829249114f, 0.029248548672f, 0.026719808578f, 0.024266306311f, 0.021893566474f,
+ 0.019609235227f, 0.017405157909f, 0.015284972265f, -0.013271821663f, -0.011365660466f,
+ -0.009569208138f, -0.007873761468f, -0.006285255309f, -0.004812399857f, -0.003442274174f,
+ -0.002181007527f, -0.001021168195f, 0.000027604519f, 0.000977561343f, 0.001827878412f,
+ 0.002582120011f, 0.003245970467f, 0.003811703064f, 0.004295183811f, 0.004695953336f,
+ 0.005018249620f, 0.005271575879f, 0.005455048289f, 0.005568922963f, 0.005630713888f,
+ 0.005642912816f, 0.005596941803f, 0.005507592112f, 0.005387450103f, 0.005222697742f,
+ 0.005039302167f, 0.004820035771f, 0.004583058413f, 0.004324193578f, 0.004064055160f,
+ 0.003778204788f, 0.003494863864f, 0.003202217165f, 0.002911410527f, 0.002620175947f,
+ 0.002337468090f, 0.002056136029f, 0.001785490196f, 0.001527197659f, 0.001272502821f,
+ 0.001034068293f, 0.000809713092f, 0.000598781568f, 0.000402654026f, 0.000224447082f,
+ 0.000056137760f, -0.000089366637f, -0.000218710265f, -0.000343405962f, -0.000443593453f,
+ -0.000533180195f, -0.000603400520f, -0.000665041502f, -0.000714928901f, -0.000743637909f,
+ -0.000767318590f, -0.000780169561f, -0.000778251269f, -0.000776134082f, -0.000759658054f,
+ -0.000739962969f, -0.000715773669f, -0.000681411941f, -0.000641375838f, -0.000604548026f,
+ -0.000565432478f, -0.000525322452f, -0.000494276232f, -0.000490735809f, -0.000559715729f,
+};
+
+const FLOAT32 ixheaacd_dft_hbe_window_ts_12[13] = {
+ 0.000000000000000f, 0.017037086855466f, 0.066987298107781f, 0.146446609406726f,
+ 0.250000000000000f, 0.370590477448740f, 0.500000000000000f, 0.629409522551260f,
+ 0.750000000000000f, 0.853553390593274f, 0.933012701892219f, 0.982962913144534f,
+ 1.000000000000000f
+};
+
+const FLOAT32 ixheaacd_dft_hbe_window_ts_18[19] = {
+ 0.000000000000000f, 0.007596123493896f, 0.030153689607046f, 0.066987298107781f,
+ 0.116977778440511f, 0.178606195156730f, 0.250000000000000f, 0.328989928337166f,
+ 0.413175911166535f, 0.500000000000000f, 0.586824088833465f, 0.671010071662834f,
+ 0.750000000000000f, 0.821393804843270f, 0.883022221559489f, 0.933012701892219f,
+ 0.969846310392954f, 0.992403876506104f, 1.000000000000000f
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_1024[1024] = {
+ 0.0000000000f, 0.0030679568f, 0.0061358846f, 0.0092037548f, 0.0122715383f, 0.0153392063f,
+ 0.0184067299f, 0.0214740803f, 0.0245412285f, 0.0276081458f, 0.0306748032f, 0.0337411719f,
+ 0.0368072229f, 0.0398729276f, 0.0429382569f, 0.0460031821f, 0.0490676743f, 0.0521317047f,
+ 0.0551952443f, 0.0582582645f, 0.0613207363f, 0.0643826309f, 0.0674439196f, 0.0705045734f,
+ 0.0735645636f, 0.0766238614f, 0.0796824380f, 0.0827402645f, 0.0857973123f, 0.0888535526f,
+ 0.0919089565f, 0.0949634953f, 0.0980171403f, 0.1010698628f, 0.1041216339f, 0.1071724250f,
+ 0.1102222073f, 0.1132709522f, 0.1163186309f, 0.1193652148f, 0.1224106752f, 0.1254549834f,
+ 0.1284981108f, 0.1315400287f, 0.1345807085f, 0.1376201216f, 0.1406582393f, 0.1436950332f,
+ 0.1467304745f, 0.1497645347f, 0.1527971853f, 0.1558283977f, 0.1588581433f, 0.1618863938f,
+ 0.1649131205f, 0.1679382950f, 0.1709618888f, 0.1739838734f, 0.1770042204f, 0.1800229014f,
+ 0.1830398880f, 0.1860551517f, 0.1890686641f, 0.1920803970f, 0.1950903220f, 0.1980984107f,
+ 0.2011046348f, 0.2041089661f, 0.2071113762f, 0.2101118369f, 0.2131103199f, 0.2161067971f,
+ 0.2191012402f, 0.2220936210f, 0.2250839114f, 0.2280720832f, 0.2310581083f, 0.2340419586f,
+ 0.2370236060f, 0.2400030224f, 0.2429801799f, 0.2459550503f, 0.2489276057f, 0.2518978182f,
+ 0.2548656596f, 0.2578311022f, 0.2607941179f, 0.2637546790f, 0.2667127575f, 0.2696683256f,
+ 0.2726213554f, 0.2755718193f, 0.2785196894f, 0.2814649379f, 0.2844075372f, 0.2873474595f,
+ 0.2902846773f, 0.2932191627f, 0.2961508882f, 0.2990798263f, 0.3020059493f, 0.3049292297f,
+ 0.3078496400f, 0.3107671527f, 0.3136817404f, 0.3165933756f, 0.3195020308f, 0.3224076788f,
+ 0.3253102922f, 0.3282098436f, 0.3311063058f, 0.3339996514f, 0.3368898534f, 0.3397768844f,
+ 0.3426607173f, 0.3455413250f, 0.3484186802f, 0.3512927561f, 0.3541635254f, 0.3570309612f,
+ 0.3598950365f, 0.3627557244f, 0.3656129978f, 0.3684668300f, 0.3713171940f, 0.3741640630f,
+ 0.3770074102f, 0.3798472089f, 0.3826834324f, 0.3855160538f, 0.3883450467f, 0.3911703843f,
+ 0.3939920401f, 0.3968099874f, 0.3996241998f, 0.4024346509f, 0.4052413140f, 0.4080441629f,
+ 0.4108431711f, 0.4136383122f, 0.4164295601f, 0.4192168884f, 0.4220002708f, 0.4247796812f,
+ 0.4275550934f, 0.4303264813f, 0.4330938189f, 0.4358570799f, 0.4386162385f, 0.4413712687f,
+ 0.4441221446f, 0.4468688402f, 0.4496113297f, 0.4523495872f, 0.4550835871f, 0.4578133036f,
+ 0.4605387110f, 0.4632597836f, 0.4659764958f, 0.4686888220f, 0.4713967368f, 0.4741002147f,
+ 0.4767992301f, 0.4794937577f, 0.4821837721f, 0.4848692480f, 0.4875501601f, 0.4902264833f,
+ 0.4928981922f, 0.4955652618f, 0.4982276670f, 0.5008853826f, 0.5035383837f, 0.5061866453f,
+ 0.5088301425f, 0.5114688504f, 0.5141027442f, 0.5167317990f, 0.5193559902f, 0.5219752929f,
+ 0.5245896827f, 0.5271991348f, 0.5298036247f, 0.5324031279f, 0.5349976199f, 0.5375870763f,
+ 0.5401714727f, 0.5427507849f, 0.5453249884f, 0.5478940592f, 0.5504579729f, 0.5530167056f,
+ 0.5555702330f, 0.5581185312f, 0.5606615762f, 0.5631993440f, 0.5657318108f, 0.5682589527f,
+ 0.5707807459f, 0.5732971667f, 0.5758081914f, 0.5783137964f, 0.5808139581f, 0.5833086529f,
+ 0.5857978575f, 0.5882815482f, 0.5907597019f, 0.5932322950f, 0.5956993045f, 0.5981607070f,
+ 0.6006164794f, 0.6030665985f, 0.6055110414f, 0.6079497850f, 0.6103828063f, 0.6128100824f,
+ 0.6152315906f, 0.6176473079f, 0.6200572118f, 0.6224612794f, 0.6248594881f, 0.6272518155f,
+ 0.6296382389f, 0.6320187359f, 0.6343932842f, 0.6367618612f, 0.6391244449f, 0.6414810128f,
+ 0.6438315429f, 0.6461760130f, 0.6485144010f, 0.6508466850f, 0.6531728430f, 0.6554928530f,
+ 0.6578066933f, 0.6601143421f, 0.6624157776f, 0.6647109782f, 0.6669999223f, 0.6692825883f,
+ 0.6715589548f, 0.6738290004f, 0.6760927036f, 0.6783500431f, 0.6806009978f, 0.6828455464f,
+ 0.6850836678f, 0.6873153409f, 0.6895405447f, 0.6917592584f, 0.6939714609f, 0.6961771315f,
+ 0.6983762494f, 0.7005687939f, 0.7027547445f, 0.7049340804f, 0.7071067812f, 0.7092728264f,
+ 0.7114321957f, 0.7135848688f, 0.7157308253f, 0.7178700451f, 0.7200025080f, 0.7221281939f,
+ 0.7242470830f, 0.7263591551f, 0.7284643904f, 0.7305627692f, 0.7326542717f, 0.7347388781f,
+ 0.7368165689f, 0.7388873245f, 0.7409511254f, 0.7430079521f, 0.7450577854f, 0.7471006060f,
+ 0.7491363945f, 0.7511651319f, 0.7531867990f, 0.7552013769f, 0.7572088465f, 0.7592091890f,
+ 0.7612023855f, 0.7631884173f, 0.7651672656f, 0.7671389119f, 0.7691033376f, 0.7710605243f,
+ 0.7730104534f, 0.7749531066f, 0.7768884657f, 0.7788165124f, 0.7807372286f, 0.7826505962f,
+ 0.7845565972f, 0.7864552136f, 0.7883464276f, 0.7902302214f, 0.7921065773f, 0.7939754776f,
+ 0.7958369046f, 0.7976908409f, 0.7995372691f, 0.8013761717f, 0.8032075315f, 0.8050313311f,
+ 0.8068475535f, 0.8086561816f, 0.8104571983f, 0.8122505866f, 0.8140363297f, 0.8158144108f,
+ 0.8175848132f, 0.8193475201f, 0.8211025150f, 0.8228497814f, 0.8245893028f, 0.8263210628f,
+ 0.8280450453f, 0.8297612338f, 0.8314696123f, 0.8331701647f, 0.8348628750f, 0.8365477272f,
+ 0.8382247056f, 0.8398937942f, 0.8415549774f, 0.8432082396f, 0.8448535652f, 0.8464909388f,
+ 0.8481203448f, 0.8497417680f, 0.8513551931f, 0.8529606049f, 0.8545579884f, 0.8561473284f,
+ 0.8577286100f, 0.8593018184f, 0.8608669386f, 0.8624239561f, 0.8639728561f, 0.8655136241f,
+ 0.8670462455f, 0.8685707060f, 0.8700869911f, 0.8715950867f, 0.8730949784f, 0.8745866523f,
+ 0.8760700942f, 0.8775452902f, 0.8790122264f, 0.8804708891f, 0.8819212643f, 0.8833633387f,
+ 0.8847970984f, 0.8862225301f, 0.8876396204f, 0.8890483559f, 0.8904487232f, 0.8918407094f,
+ 0.8932243012f, 0.8945994856f, 0.8959662498f, 0.8973245807f, 0.8986744657f, 0.9000158920f,
+ 0.9013488470f, 0.9026733182f, 0.9039892931f, 0.9052967593f, 0.9065957045f, 0.9078861165f,
+ 0.9091679831f, 0.9104412923f, 0.9117060320f, 0.9129621904f, 0.9142097557f, 0.9154487161f,
+ 0.9166790599f, 0.9179007756f, 0.9191138517f, 0.9203182767f, 0.9215140393f, 0.9227011283f,
+ 0.9238795325f, 0.9250492408f, 0.9262102421f, 0.9273625257f, 0.9285060805f, 0.9296408958f,
+ 0.9307669611f, 0.9318842656f, 0.9329927988f, 0.9340925504f, 0.9351835099f, 0.9362656672f,
+ 0.9373390119f, 0.9384035341f, 0.9394592236f, 0.9405060706f, 0.9415440652f, 0.9425731976f,
+ 0.9435934582f, 0.9446048373f, 0.9456073254f, 0.9466009131f, 0.9475855910f, 0.9485613499f,
+ 0.9495281806f, 0.9504860739f, 0.9514350210f, 0.9523750127f, 0.9533060404f, 0.9542280951f,
+ 0.9551411683f, 0.9560452513f, 0.9569403357f, 0.9578264130f, 0.9587034749f, 0.9595715131f,
+ 0.9604305194f, 0.9612804858f, 0.9621214043f, 0.9629532669f, 0.9637760658f, 0.9645897933f,
+ 0.9653944417f, 0.9661900034f, 0.9669764710f, 0.9677538371f, 0.9685220943f, 0.9692812354f,
+ 0.9700312532f, 0.9707721407f, 0.9715038910f, 0.9722264971f, 0.9729399522f, 0.9736442497f,
+ 0.9743393828f, 0.9750253451f, 0.9757021300f, 0.9763697313f, 0.9770281427f, 0.9776773578f,
+ 0.9783173707f, 0.9789481753f, 0.9795697657f, 0.9801821360f, 0.9807852804f, 0.9813791933f,
+ 0.9819638691f, 0.9825393023f, 0.9831054874f, 0.9836624192f, 0.9842100924f, 0.9847485018f,
+ 0.9852776424f, 0.9857975092f, 0.9863080972f, 0.9868094018f, 0.9873014182f, 0.9877841416f,
+ 0.9882575677f, 0.9887216920f, 0.9891765100f, 0.9896220175f, 0.9900582103f, 0.9904850843f,
+ 0.9909026354f, 0.9913108598f, 0.9917097537f, 0.9920993131f, 0.9924795346f, 0.9928504145f,
+ 0.9932119492f, 0.9935641355f, 0.9939069700f, 0.9942404495f, 0.9945645707f, 0.9948793308f,
+ 0.9951847267f, 0.9954807555f, 0.9957674145f, 0.9960447009f, 0.9963126122f, 0.9965711458f,
+ 0.9968202993f, 0.9970600703f, 0.9972904567f, 0.9975114561f, 0.9977230666f, 0.9979252862f,
+ 0.9981181129f, 0.9983015449f, 0.9984755806f, 0.9986402182f, 0.9987954562f, 0.9989412932f,
+ 0.9990777278f, 0.9992047586f, 0.9993223846f, 0.9994306046f, 0.9995294175f, 0.9996188225f,
+ 0.9996988187f, 0.9997694054f, 0.9998305818f, 0.9998823475f, 0.9999247018f, 0.9999576446f,
+ 0.9999811753f, 0.9999952938f, 1.0000000000f, 0.9999952938f, 0.9999811753f, 0.9999576446f,
+ 0.9999247018f, 0.9998823475f, 0.9998305818f, 0.9997694054f, 0.9996988187f, 0.9996188225f,
+ 0.9995294175f, 0.9994306046f, 0.9993223846f, 0.9992047586f, 0.9990777278f, 0.9989412932f,
+ 0.9987954562f, 0.9986402182f, 0.9984755806f, 0.9983015449f, 0.9981181129f, 0.9979252862f,
+ 0.9977230666f, 0.9975114561f, 0.9972904567f, 0.9970600703f, 0.9968202993f, 0.9965711458f,
+ 0.9963126122f, 0.9960447009f, 0.9957674145f, 0.9954807555f, 0.9951847267f, 0.9948793308f,
+ 0.9945645707f, 0.9942404495f, 0.9939069700f, 0.9935641355f, 0.9932119492f, 0.9928504145f,
+ 0.9924795346f, 0.9920993131f, 0.9917097537f, 0.9913108598f, 0.9909026354f, 0.9904850843f,
+ 0.9900582103f, 0.9896220175f, 0.9891765100f, 0.9887216920f, 0.9882575677f, 0.9877841416f,
+ 0.9873014182f, 0.9868094018f, 0.9863080972f, 0.9857975092f, 0.9852776424f, 0.9847485018f,
+ 0.9842100924f, 0.9836624192f, 0.9831054874f, 0.9825393023f, 0.9819638691f, 0.9813791933f,
+ 0.9807852804f, 0.9801821360f, 0.9795697657f, 0.9789481753f, 0.9783173707f, 0.9776773578f,
+ 0.9770281427f, 0.9763697313f, 0.9757021300f, 0.9750253451f, 0.9743393828f, 0.9736442497f,
+ 0.9729399522f, 0.9722264971f, 0.9715038910f, 0.9707721407f, 0.9700312532f, 0.9692812354f,
+ 0.9685220943f, 0.9677538371f, 0.9669764710f, 0.9661900034f, 0.9653944417f, 0.9645897933f,
+ 0.9637760658f, 0.9629532669f, 0.9621214043f, 0.9612804858f, 0.9604305194f, 0.9595715131f,
+ 0.9587034749f, 0.9578264130f, 0.9569403357f, 0.9560452513f, 0.9551411683f, 0.9542280951f,
+ 0.9533060404f, 0.9523750127f, 0.9514350210f, 0.9504860739f, 0.9495281806f, 0.9485613499f,
+ 0.9475855910f, 0.9466009131f, 0.9456073254f, 0.9446048373f, 0.9435934582f, 0.9425731976f,
+ 0.9415440652f, 0.9405060706f, 0.9394592236f, 0.9384035341f, 0.9373390119f, 0.9362656672f,
+ 0.9351835099f, 0.9340925504f, 0.9329927988f, 0.9318842656f, 0.9307669611f, 0.9296408958f,
+ 0.9285060805f, 0.9273625257f, 0.9262102421f, 0.9250492408f, 0.9238795325f, 0.9227011283f,
+ 0.9215140393f, 0.9203182767f, 0.9191138517f, 0.9179007756f, 0.9166790599f, 0.9154487161f,
+ 0.9142097557f, 0.9129621904f, 0.9117060320f, 0.9104412923f, 0.9091679831f, 0.9078861165f,
+ 0.9065957045f, 0.9052967593f, 0.9039892931f, 0.9026733182f, 0.9013488470f, 0.9000158920f,
+ 0.8986744657f, 0.8973245807f, 0.8959662498f, 0.8945994856f, 0.8932243012f, 0.8918407094f,
+ 0.8904487232f, 0.8890483559f, 0.8876396204f, 0.8862225301f, 0.8847970984f, 0.8833633387f,
+ 0.8819212643f, 0.8804708891f, 0.8790122264f, 0.8775452902f, 0.8760700942f, 0.8745866523f,
+ 0.8730949784f, 0.8715950867f, 0.8700869911f, 0.8685707060f, 0.8670462455f, 0.8655136241f,
+ 0.8639728561f, 0.8624239561f, 0.8608669386f, 0.8593018184f, 0.8577286100f, 0.8561473284f,
+ 0.8545579884f, 0.8529606049f, 0.8513551931f, 0.8497417680f, 0.8481203448f, 0.8464909388f,
+ 0.8448535652f, 0.8432082396f, 0.8415549774f, 0.8398937942f, 0.8382247056f, 0.8365477272f,
+ 0.8348628750f, 0.8331701647f, 0.8314696123f, 0.8297612338f, 0.8280450453f, 0.8263210628f,
+ 0.8245893028f, 0.8228497814f, 0.8211025150f, 0.8193475201f, 0.8175848132f, 0.8158144108f,
+ 0.8140363297f, 0.8122505866f, 0.8104571983f, 0.8086561816f, 0.8068475535f, 0.8050313311f,
+ 0.8032075315f, 0.8013761717f, 0.7995372691f, 0.7976908409f, 0.7958369046f, 0.7939754776f,
+ 0.7921065773f, 0.7902302214f, 0.7883464276f, 0.7864552136f, 0.7845565972f, 0.7826505962f,
+ 0.7807372286f, 0.7788165124f, 0.7768884657f, 0.7749531066f, 0.7730104534f, 0.7710605243f,
+ 0.7691033376f, 0.7671389119f, 0.7651672656f, 0.7631884173f, 0.7612023855f, 0.7592091890f,
+ 0.7572088465f, 0.7552013769f, 0.7531867990f, 0.7511651319f, 0.7491363945f, 0.7471006060f,
+ 0.7450577854f, 0.7430079521f, 0.7409511254f, 0.7388873245f, 0.7368165689f, 0.7347388781f,
+ 0.7326542717f, 0.7305627692f, 0.7284643904f, 0.7263591551f, 0.7242470830f, 0.7221281939f,
+ 0.7200025080f, 0.7178700451f, 0.7157308253f, 0.7135848688f, 0.7114321957f, 0.7092728264f,
+ 0.7071067812f, 0.7049340804f, 0.7027547445f, 0.7005687939f, 0.6983762494f, 0.6961771315f,
+ 0.6939714609f, 0.6917592584f, 0.6895405447f, 0.6873153409f, 0.6850836678f, 0.6828455464f,
+ 0.6806009978f, 0.6783500431f, 0.6760927036f, 0.6738290004f, 0.6715589548f, 0.6692825883f,
+ 0.6669999223f, 0.6647109782f, 0.6624157776f, 0.6601143421f, 0.6578066933f, 0.6554928530f,
+ 0.6531728430f, 0.6508466850f, 0.6485144010f, 0.6461760130f, 0.6438315429f, 0.6414810128f,
+ 0.6391244449f, 0.6367618612f, 0.6343932842f, 0.6320187359f, 0.6296382389f, 0.6272518155f,
+ 0.6248594881f, 0.6224612794f, 0.6200572118f, 0.6176473079f, 0.6152315906f, 0.6128100824f,
+ 0.6103828063f, 0.6079497850f, 0.6055110414f, 0.6030665985f, 0.6006164794f, 0.5981607070f,
+ 0.5956993045f, 0.5932322950f, 0.5907597019f, 0.5882815482f, 0.5857978575f, 0.5833086529f,
+ 0.5808139581f, 0.5783137964f, 0.5758081914f, 0.5732971667f, 0.5707807459f, 0.5682589527f,
+ 0.5657318108f, 0.5631993440f, 0.5606615762f, 0.5581185312f, 0.5555702330f, 0.5530167056f,
+ 0.5504579729f, 0.5478940592f, 0.5453249884f, 0.5427507849f, 0.5401714727f, 0.5375870763f,
+ 0.5349976199f, 0.5324031279f, 0.5298036247f, 0.5271991348f, 0.5245896827f, 0.5219752929f,
+ 0.5193559902f, 0.5167317990f, 0.5141027442f, 0.5114688504f, 0.5088301425f, 0.5061866453f,
+ 0.5035383837f, 0.5008853826f, 0.4982276670f, 0.4955652618f, 0.4928981922f, 0.4902264833f,
+ 0.4875501601f, 0.4848692480f, 0.4821837721f, 0.4794937577f, 0.4767992301f, 0.4741002147f,
+ 0.4713967368f, 0.4686888220f, 0.4659764958f, 0.4632597836f, 0.4605387110f, 0.4578133036f,
+ 0.4550835871f, 0.4523495872f, 0.4496113297f, 0.4468688402f, 0.4441221446f, 0.4413712687f,
+ 0.4386162385f, 0.4358570799f, 0.4330938189f, 0.4303264813f, 0.4275550934f, 0.4247796812f,
+ 0.4220002708f, 0.4192168884f, 0.4164295601f, 0.4136383122f, 0.4108431711f, 0.4080441629f,
+ 0.4052413140f, 0.4024346509f, 0.3996241998f, 0.3968099874f, 0.3939920401f, 0.3911703843f,
+ 0.3883450467f, 0.3855160538f, 0.3826834324f, 0.3798472089f, 0.3770074102f, 0.3741640630f,
+ 0.3713171940f, 0.3684668300f, 0.3656129978f, 0.3627557244f, 0.3598950365f, 0.3570309612f,
+ 0.3541635254f, 0.3512927561f, 0.3484186802f, 0.3455413250f, 0.3426607173f, 0.3397768844f,
+ 0.3368898534f, 0.3339996514f, 0.3311063058f, 0.3282098436f, 0.3253102922f, 0.3224076788f,
+ 0.3195020308f, 0.3165933756f, 0.3136817404f, 0.3107671527f, 0.3078496400f, 0.3049292297f,
+ 0.3020059493f, 0.2990798263f, 0.2961508882f, 0.2932191627f, 0.2902846773f, 0.2873474595f,
+ 0.2844075372f, 0.2814649379f, 0.2785196894f, 0.2755718193f, 0.2726213554f, 0.2696683256f,
+ 0.2667127575f, 0.2637546790f, 0.2607941179f, 0.2578311022f, 0.2548656596f, 0.2518978182f,
+ 0.2489276057f, 0.2459550503f, 0.2429801799f, 0.2400030224f, 0.2370236060f, 0.2340419586f,
+ 0.2310581083f, 0.2280720832f, 0.2250839114f, 0.2220936210f, 0.2191012402f, 0.2161067971f,
+ 0.2131103199f, 0.2101118369f, 0.2071113762f, 0.2041089661f, 0.2011046348f, 0.1980984107f,
+ 0.1950903220f, 0.1920803970f, 0.1890686641f, 0.1860551517f, 0.1830398880f, 0.1800229014f,
+ 0.1770042204f, 0.1739838734f, 0.1709618888f, 0.1679382950f, 0.1649131205f, 0.1618863938f,
+ 0.1588581433f, 0.1558283977f, 0.1527971853f, 0.1497645347f, 0.1467304745f, 0.1436950332f,
+ 0.1406582393f, 0.1376201216f, 0.1345807085f, 0.1315400287f, 0.1284981108f, 0.1254549834f,
+ 0.1224106752f, 0.1193652148f, 0.1163186309f, 0.1132709522f, 0.1102222073f, 0.1071724250f,
+ 0.1041216339f, 0.1010698628f, 0.0980171403f, 0.0949634953f, 0.0919089565f, 0.0888535526f,
+ 0.0857973123f, 0.0827402645f, 0.0796824380f, 0.0766238614f, 0.0735645636f, 0.0705045734f,
+ 0.0674439196f, 0.0643826309f, 0.0613207363f, 0.0582582645f, 0.0551952443f, 0.0521317047f,
+ 0.0490676743f, 0.0460031821f, 0.0429382569f, 0.0398729276f, 0.0368072229f, 0.0337411719f,
+ 0.0306748032f, 0.0276081458f, 0.0245412285f, 0.0214740803f, 0.0184067299f, 0.0153392063f,
+ 0.0122715383f, 0.0092037548f, 0.0061358846f, 0.0030679568f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_960[960] = {
+ 0.0000000000f, 0.0032724865f, 0.0065449380f, 0.0098173193f, 0.0130895956f, 0.0163617316f,
+ 0.0196336925f, 0.0229054430f, 0.0261769483f, 0.0294481732f, 0.0327190828f, 0.0359896420f,
+ 0.0392598158f, 0.0425295691f, 0.0457988669f, 0.0490676743f, 0.0523359562f, 0.0556036777f,
+ 0.0588708037f, 0.0621372992f, 0.0654031292f, 0.0686682589f, 0.0719326532f, 0.0751962771f,
+ 0.0784590957f, 0.0817210741f, 0.0849821774f, 0.0882423705f, 0.0915016187f, 0.0947598869f,
+ 0.0980171403f, 0.1012733441f, 0.1045284633f, 0.1077824630f, 0.1110353086f, 0.1142869650f,
+ 0.1175373975f, 0.1207865712f, 0.1240344515f, 0.1272810034f, 0.1305261922f, 0.1337699832f,
+ 0.1370123417f, 0.1402532328f, 0.1434926220f, 0.1467304745f, 0.1499667556f, 0.1532014306f,
+ 0.1564344650f, 0.1596658242f, 0.1628954734f, 0.1661233781f, 0.1693495038f, 0.1725738160f,
+ 0.1757962799f, 0.1790168613f, 0.1822355255f, 0.1854522381f, 0.1886669647f, 0.1918796708f,
+ 0.1950903220f, 0.1982988840f, 0.2015053223f, 0.2047096027f, 0.2079116908f, 0.2111115524f,
+ 0.2143091531f, 0.2175044587f, 0.2206974350f, 0.2238880479f, 0.2270762630f, 0.2302620464f,
+ 0.2334453639f, 0.2366261813f, 0.2398044647f, 0.2429801799f, 0.2461532930f, 0.2493237701f,
+ 0.2524915770f, 0.2556566800f, 0.2588190451f, 0.2619786385f, 0.2651354262f, 0.2682893746f,
+ 0.2714404499f, 0.2745886182f, 0.2777338459f, 0.2808760993f, 0.2840153447f, 0.2871515486f,
+ 0.2902846773f, 0.2934146972f, 0.2965415750f, 0.2996652770f, 0.3027857698f, 0.3059030201f,
+ 0.3090169944f, 0.3121276593f, 0.3152349816f, 0.3183389281f, 0.3214394653f, 0.3245365602f,
+ 0.3276301796f, 0.3307202903f, 0.3338068592f, 0.3368898534f, 0.3399692397f, 0.3430449853f,
+ 0.3461170571f, 0.3491854222f, 0.3522500479f, 0.3553109013f, 0.3583679495f, 0.3614211600f,
+ 0.3644704999f, 0.3675159366f, 0.3705574375f, 0.3735949701f, 0.3766285017f, 0.3796579999f,
+ 0.3826834324f, 0.3857047666f, 0.3887219702f, 0.3917350109f, 0.3947438564f, 0.3977484745f,
+ 0.4007488331f, 0.4037449000f, 0.4067366431f, 0.4097240303f, 0.4127070298f, 0.4156856095f,
+ 0.4186597375f, 0.4216293821f, 0.4245945113f, 0.4275550934f, 0.4305110968f, 0.4334624898f,
+ 0.4364092407f, 0.4393513180f, 0.4422886902f, 0.4452213259f, 0.4481491936f, 0.4510722620f,
+ 0.4539904997f, 0.4569038756f, 0.4598123584f, 0.4627159170f, 0.4656145203f, 0.4685081372f,
+ 0.4713967368f, 0.4742802881f, 0.4771587603f, 0.4800321224f, 0.4829003438f, 0.4857633937f,
+ 0.4886212415f, 0.4914738565f, 0.4943212083f, 0.4971632663f, 0.5000000000f, 0.5028313791f,
+ 0.5056573734f, 0.5084779524f, 0.5112930861f, 0.5141027442f, 0.5169068967f, 0.5197055135f,
+ 0.5224985647f, 0.5252860204f, 0.5280678507f, 0.5308440257f, 0.5336145159f, 0.5363792915f,
+ 0.5391383229f, 0.5418915806f, 0.5446390350f, 0.5473806568f, 0.5501164166f, 0.5528462851f,
+ 0.5555702330f, 0.5582882313f, 0.5610002507f, 0.5637062622f, 0.5664062369f, 0.5691001459f,
+ 0.5717879602f, 0.5744696512f, 0.5771451900f, 0.5798145481f, 0.5824776969f, 0.5851346077f,
+ 0.5877852523f, 0.5904296021f, 0.5930676290f, 0.5956993045f, 0.5983246006f, 0.6009434891f,
+ 0.6035559420f, 0.6061619312f, 0.6087614290f, 0.6113544074f, 0.6139408388f, 0.6165206953f,
+ 0.6190939493f, 0.6216605734f, 0.6242205399f, 0.6267738216f, 0.6293203910f, 0.6318602210f,
+ 0.6343932842f, 0.6369195535f, 0.6394390020f, 0.6419516026f, 0.6444573284f, 0.6469561525f,
+ 0.6494480483f, 0.6519329891f, 0.6544109481f, 0.6568818989f, 0.6593458151f, 0.6618026702f,
+ 0.6642524379f, 0.6666950920f, 0.6691306064f, 0.6715589548f, 0.6739801115f, 0.6763940503f,
+ 0.6788007455f, 0.6812001713f, 0.6835923020f, 0.6859771120f, 0.6883545757f, 0.6907246677f,
+ 0.6930873625f, 0.6954426350f, 0.6977904598f, 0.7001308119f, 0.7024636661f, 0.7047889975f,
+ 0.7071067812f, 0.7094169923f, 0.7117196062f, 0.7140145981f, 0.7163019434f, 0.7185816178f,
+ 0.7208535967f, 0.7231178559f, 0.7253743710f, 0.7276231180f, 0.7298640727f, 0.7320972112f,
+ 0.7343225094f, 0.7365399437f, 0.7387494902f, 0.7409511254f, 0.7431448255f, 0.7453305671f,
+ 0.7475083269f, 0.7496780814f, 0.7518398075f, 0.7539934820f, 0.7561390818f, 0.7582765840f,
+ 0.7604059656f, 0.7625272039f, 0.7646402762f, 0.7667451597f, 0.7688418321f, 0.7709302707f,
+ 0.7730104534f, 0.7750823577f, 0.7771459615f, 0.7792012426f, 0.7812481792f, 0.7832867492f,
+ 0.7853169309f, 0.7873387024f, 0.7893520422f, 0.7913569286f, 0.7933533403f, 0.7953412558f,
+ 0.7973206538f, 0.7992915131f, 0.8012538127f, 0.8032075315f, 0.8051526486f, 0.8070891431f,
+ 0.8090169944f, 0.8109361817f, 0.8128466846f, 0.8147484825f, 0.8166415552f, 0.8185258822f,
+ 0.8204014435f, 0.8222682190f, 0.8241261886f, 0.8259753325f, 0.8278156309f, 0.8296470640f,
+ 0.8314696123f, 0.8332832562f, 0.8350879763f, 0.8368837533f, 0.8386705679f, 0.8404484011f,
+ 0.8422172337f, 0.8439770469f, 0.8457278217f, 0.8474695395f, 0.8492021815f, 0.8509257293f,
+ 0.8526401644f, 0.8543454683f, 0.8560416229f, 0.8577286100f, 0.8594064115f, 0.8610750095f,
+ 0.8627343860f, 0.8643845233f, 0.8660254038f, 0.8676570098f, 0.8692793239f, 0.8708923288f,
+ 0.8724960071f, 0.8740903416f, 0.8756753154f, 0.8772509113f, 0.8788171127f, 0.8803739026f,
+ 0.8819212643f, 0.8834591815f, 0.8849876375f, 0.8865066159f, 0.8880161007f, 0.8895160754f,
+ 0.8910065242f, 0.8924874310f, 0.8939587800f, 0.8954205554f, 0.8968727415f, 0.8983153229f,
+ 0.8997482841f, 0.9011716096f, 0.9025852843f, 0.9039892931f, 0.9053836209f, 0.9067682527f,
+ 0.9081431738f, 0.9095083694f, 0.9108638249f, 0.9122095258f, 0.9135454576f, 0.9148716061f,
+ 0.9161879571f, 0.9174944964f, 0.9187912101f, 0.9200780843f, 0.9213551052f, 0.9226222591f,
+ 0.9238795325f, 0.9251269119f, 0.9263643839f, 0.9275919353f, 0.9288095529f, 0.9300172237f,
+ 0.9312149348f, 0.9324026733f, 0.9335804265f, 0.9347481818f, 0.9359059268f, 0.9370536489f,
+ 0.9381913359f, 0.9393189757f, 0.9404365561f, 0.9415440652f, 0.9426414911f, 0.9437288221f,
+ 0.9448060465f, 0.9458731528f, 0.9469301295f, 0.9479769654f, 0.9490136492f, 0.9500401698f,
+ 0.9510565163f, 0.9520626777f, 0.9530586433f, 0.9540444024f, 0.9550199445f, 0.9559852590f,
+ 0.9569403357f, 0.9578851644f, 0.9588197349f, 0.9597440372f, 0.9606580614f, 0.9615617977f,
+ 0.9624552365f, 0.9633383681f, 0.9642111832f, 0.9650736723f, 0.9659258263f, 0.9667676360f,
+ 0.9675990924f, 0.9684201865f, 0.9692309097f, 0.9700312532f, 0.9708212084f, 0.9716007669f,
+ 0.9723699204f, 0.9731286606f, 0.9738769793f, 0.9746148686f, 0.9753423205f, 0.9760593273f,
+ 0.9767658813f, 0.9774619749f, 0.9781476007f, 0.9788227513f, 0.9794874196f, 0.9801415982f,
+ 0.9807852804f, 0.9814184591f, 0.9820411277f, 0.9826532793f, 0.9832549076f, 0.9838460059f,
+ 0.9844265681f, 0.9849965878f, 0.9855560591f, 0.9861049758f, 0.9866433321f, 0.9871711222f,
+ 0.9876883406f, 0.9881949816f, 0.9886910398f, 0.9891765100f, 0.9896513868f, 0.9901156653f,
+ 0.9905693404f, 0.9910124074f, 0.9914448614f, 0.9918666978f, 0.9922779121f, 0.9926784999f,
+ 0.9930684570f, 0.9934477790f, 0.9938164621f, 0.9941745021f, 0.9945218954f, 0.9948586381f,
+ 0.9951847267f, 0.9955001576f, 0.9958049276f, 0.9960990333f, 0.9963824715f, 0.9966552393f,
+ 0.9969173337f, 0.9971687520f, 0.9974094913f, 0.9976395492f, 0.9978589232f, 0.9980676110f,
+ 0.9982656102f, 0.9984529188f, 0.9986295348f, 0.9987954562f, 0.9989506814f, 0.9990952086f,
+ 0.9992290362f, 0.9993521630f, 0.9994645875f, 0.9995663085f, 0.9996573250f, 0.9997376359f,
+ 0.9998072405f, 0.9998661379f, 0.9999143276f, 0.9999518090f, 0.9999785817f, 0.9999946454f,
+ 1.0000000000f, 0.9999946454f, 0.9999785817f, 0.9999518090f, 0.9999143276f, 0.9998661379f,
+ 0.9998072405f, 0.9997376359f, 0.9996573250f, 0.9995663085f, 0.9994645875f, 0.9993521630f,
+ 0.9992290362f, 0.9990952086f, 0.9989506814f, 0.9987954562f, 0.9986295348f, 0.9984529188f,
+ 0.9982656102f, 0.9980676110f, 0.9978589232f, 0.9976395492f, 0.9974094913f, 0.9971687520f,
+ 0.9969173337f, 0.9966552393f, 0.9963824715f, 0.9960990333f, 0.9958049276f, 0.9955001576f,
+ 0.9951847267f, 0.9948586381f, 0.9945218954f, 0.9941745021f, 0.9938164621f, 0.9934477790f,
+ 0.9930684570f, 0.9926784999f, 0.9922779121f, 0.9918666978f, 0.9914448614f, 0.9910124074f,
+ 0.9905693404f, 0.9901156653f, 0.9896513868f, 0.9891765100f, 0.9886910398f, 0.9881949816f,
+ 0.9876883406f, 0.9871711222f, 0.9866433321f, 0.9861049758f, 0.9855560591f, 0.9849965878f,
+ 0.9844265681f, 0.9838460059f, 0.9832549076f, 0.9826532793f, 0.9820411277f, 0.9814184591f,
+ 0.9807852804f, 0.9801415982f, 0.9794874196f, 0.9788227513f, 0.9781476007f, 0.9774619749f,
+ 0.9767658813f, 0.9760593273f, 0.9753423205f, 0.9746148686f, 0.9738769793f, 0.9731286606f,
+ 0.9723699204f, 0.9716007669f, 0.9708212084f, 0.9700312532f, 0.9692309097f, 0.9684201865f,
+ 0.9675990924f, 0.9667676360f, 0.9659258263f, 0.9650736723f, 0.9642111832f, 0.9633383681f,
+ 0.9624552365f, 0.9615617977f, 0.9606580614f, 0.9597440372f, 0.9588197349f, 0.9578851644f,
+ 0.9569403357f, 0.9559852590f, 0.9550199445f, 0.9540444024f, 0.9530586433f, 0.9520626777f,
+ 0.9510565163f, 0.9500401698f, 0.9490136492f, 0.9479769654f, 0.9469301295f, 0.9458731528f,
+ 0.9448060465f, 0.9437288221f, 0.9426414911f, 0.9415440652f, 0.9404365561f, 0.9393189757f,
+ 0.9381913359f, 0.9370536489f, 0.9359059268f, 0.9347481818f, 0.9335804265f, 0.9324026733f,
+ 0.9312149348f, 0.9300172237f, 0.9288095529f, 0.9275919353f, 0.9263643839f, 0.9251269119f,
+ 0.9238795325f, 0.9226222591f, 0.9213551052f, 0.9200780843f, 0.9187912101f, 0.9174944964f,
+ 0.9161879571f, 0.9148716061f, 0.9135454576f, 0.9122095258f, 0.9108638249f, 0.9095083694f,
+ 0.9081431738f, 0.9067682527f, 0.9053836209f, 0.9039892931f, 0.9025852843f, 0.9011716096f,
+ 0.8997482841f, 0.8983153229f, 0.8968727415f, 0.8954205554f, 0.8939587800f, 0.8924874310f,
+ 0.8910065242f, 0.8895160754f, 0.8880161007f, 0.8865066159f, 0.8849876375f, 0.8834591815f,
+ 0.8819212643f, 0.8803739026f, 0.8788171127f, 0.8772509113f, 0.8756753154f, 0.8740903416f,
+ 0.8724960071f, 0.8708923288f, 0.8692793239f, 0.8676570098f, 0.8660254038f, 0.8643845233f,
+ 0.8627343860f, 0.8610750095f, 0.8594064115f, 0.8577286100f, 0.8560416229f, 0.8543454683f,
+ 0.8526401644f, 0.8509257293f, 0.8492021815f, 0.8474695395f, 0.8457278217f, 0.8439770469f,
+ 0.8422172337f, 0.8404484011f, 0.8386705679f, 0.8368837533f, 0.8350879763f, 0.8332832562f,
+ 0.8314696123f, 0.8296470640f, 0.8278156309f, 0.8259753325f, 0.8241261886f, 0.8222682190f,
+ 0.8204014435f, 0.8185258822f, 0.8166415552f, 0.8147484825f, 0.8128466846f, 0.8109361817f,
+ 0.8090169944f, 0.8070891431f, 0.8051526486f, 0.8032075315f, 0.8012538127f, 0.7992915131f,
+ 0.7973206538f, 0.7953412558f, 0.7933533403f, 0.7913569286f, 0.7893520422f, 0.7873387024f,
+ 0.7853169309f, 0.7832867492f, 0.7812481792f, 0.7792012426f, 0.7771459615f, 0.7750823577f,
+ 0.7730104534f, 0.7709302707f, 0.7688418321f, 0.7667451597f, 0.7646402762f, 0.7625272039f,
+ 0.7604059656f, 0.7582765840f, 0.7561390818f, 0.7539934820f, 0.7518398075f, 0.7496780814f,
+ 0.7475083269f, 0.7453305671f, 0.7431448255f, 0.7409511254f, 0.7387494902f, 0.7365399437f,
+ 0.7343225094f, 0.7320972112f, 0.7298640727f, 0.7276231180f, 0.7253743710f, 0.7231178559f,
+ 0.7208535967f, 0.7185816178f, 0.7163019434f, 0.7140145981f, 0.7117196062f, 0.7094169923f,
+ 0.7071067812f, 0.7047889975f, 0.7024636661f, 0.7001308119f, 0.6977904598f, 0.6954426350f,
+ 0.6930873625f, 0.6907246677f, 0.6883545757f, 0.6859771120f, 0.6835923020f, 0.6812001713f,
+ 0.6788007455f, 0.6763940503f, 0.6739801115f, 0.6715589548f, 0.6691306064f, 0.6666950920f,
+ 0.6642524379f, 0.6618026702f, 0.6593458151f, 0.6568818989f, 0.6544109481f, 0.6519329891f,
+ 0.6494480483f, 0.6469561525f, 0.6444573284f, 0.6419516026f, 0.6394390020f, 0.6369195535f,
+ 0.6343932842f, 0.6318602210f, 0.6293203910f, 0.6267738216f, 0.6242205399f, 0.6216605734f,
+ 0.6190939493f, 0.6165206953f, 0.6139408388f, 0.6113544074f, 0.6087614290f, 0.6061619312f,
+ 0.6035559420f, 0.6009434891f, 0.5983246006f, 0.5956993045f, 0.5930676290f, 0.5904296021f,
+ 0.5877852523f, 0.5851346077f, 0.5824776969f, 0.5798145481f, 0.5771451900f, 0.5744696512f,
+ 0.5717879602f, 0.5691001459f, 0.5664062369f, 0.5637062622f, 0.5610002507f, 0.5582882313f,
+ 0.5555702330f, 0.5528462851f, 0.5501164166f, 0.5473806568f, 0.5446390350f, 0.5418915806f,
+ 0.5391383229f, 0.5363792915f, 0.5336145159f, 0.5308440257f, 0.5280678507f, 0.5252860204f,
+ 0.5224985647f, 0.5197055135f, 0.5169068967f, 0.5141027442f, 0.5112930861f, 0.5084779524f,
+ 0.5056573734f, 0.5028313791f, 0.5000000000f, 0.4971632663f, 0.4943212083f, 0.4914738565f,
+ 0.4886212415f, 0.4857633937f, 0.4829003438f, 0.4800321224f, 0.4771587603f, 0.4742802881f,
+ 0.4713967368f, 0.4685081372f, 0.4656145203f, 0.4627159170f, 0.4598123584f, 0.4569038756f,
+ 0.4539904997f, 0.4510722620f, 0.4481491936f, 0.4452213259f, 0.4422886902f, 0.4393513180f,
+ 0.4364092407f, 0.4334624898f, 0.4305110968f, 0.4275550934f, 0.4245945113f, 0.4216293821f,
+ 0.4186597375f, 0.4156856095f, 0.4127070298f, 0.4097240303f, 0.4067366431f, 0.4037449000f,
+ 0.4007488331f, 0.3977484745f, 0.3947438564f, 0.3917350109f, 0.3887219702f, 0.3857047666f,
+ 0.3826834324f, 0.3796579999f, 0.3766285017f, 0.3735949701f, 0.3705574375f, 0.3675159366f,
+ 0.3644704999f, 0.3614211600f, 0.3583679495f, 0.3553109013f, 0.3522500479f, 0.3491854222f,
+ 0.3461170571f, 0.3430449853f, 0.3399692397f, 0.3368898534f, 0.3338068592f, 0.3307202903f,
+ 0.3276301796f, 0.3245365602f, 0.3214394653f, 0.3183389281f, 0.3152349816f, 0.3121276593f,
+ 0.3090169944f, 0.3059030201f, 0.3027857698f, 0.2996652770f, 0.2965415750f, 0.2934146972f,
+ 0.2902846773f, 0.2871515486f, 0.2840153447f, 0.2808760993f, 0.2777338459f, 0.2745886182f,
+ 0.2714404499f, 0.2682893746f, 0.2651354262f, 0.2619786385f, 0.2588190451f, 0.2556566800f,
+ 0.2524915770f, 0.2493237701f, 0.2461532930f, 0.2429801799f, 0.2398044647f, 0.2366261813f,
+ 0.2334453639f, 0.2302620464f, 0.2270762630f, 0.2238880479f, 0.2206974350f, 0.2175044587f,
+ 0.2143091531f, 0.2111115524f, 0.2079116908f, 0.2047096027f, 0.2015053223f, 0.1982988840f,
+ 0.1950903220f, 0.1918796708f, 0.1886669647f, 0.1854522381f, 0.1822355255f, 0.1790168613f,
+ 0.1757962799f, 0.1725738160f, 0.1693495038f, 0.1661233781f, 0.1628954734f, 0.1596658242f,
+ 0.1564344650f, 0.1532014306f, 0.1499667556f, 0.1467304745f, 0.1434926220f, 0.1402532328f,
+ 0.1370123417f, 0.1337699832f, 0.1305261922f, 0.1272810034f, 0.1240344515f, 0.1207865712f,
+ 0.1175373975f, 0.1142869650f, 0.1110353086f, 0.1077824630f, 0.1045284633f, 0.1012733441f,
+ 0.0980171403f, 0.0947598869f, 0.0915016187f, 0.0882423705f, 0.0849821774f, 0.0817210741f,
+ 0.0784590957f, 0.0751962771f, 0.0719326532f, 0.0686682589f, 0.0654031292f, 0.0621372992f,
+ 0.0588708037f, 0.0556036777f, 0.0523359562f, 0.0490676743f, 0.0457988669f, 0.0425295691f,
+ 0.0392598158f, 0.0359896420f, 0.0327190828f, 0.0294481732f, 0.0261769483f, 0.0229054430f,
+ 0.0196336925f, 0.0163617316f, 0.0130895956f, 0.0098173193f, 0.0065449380f, 0.0032724865f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_896[896] = {
+ 0.0000000000f, 0.0035062346f, 0.0070124261f, 0.0105185314f, 0.0140245074f, 0.0175303110f,
+ 0.0210358991f, 0.0245412285f, 0.0280462563f, 0.0315509392f, 0.0350552343f, 0.0385590984f,
+ 0.0420624885f, 0.0455653615f, 0.0490676743f, 0.0525693839f, 0.0560704472f, 0.0595708212f,
+ 0.0630704629f, 0.0665693292f, 0.0700673771f, 0.0735645636f, 0.0770608457f, 0.0805561805f,
+ 0.0840505249f, 0.0875438361f, 0.0910360710f, 0.0945271867f, 0.0980171403f, 0.1015058890f,
+ 0.1049933897f, 0.1084795997f, 0.1119644761f, 0.1154479760f, 0.1189300567f, 0.1224106752f,
+ 0.1258897889f, 0.1293673549f, 0.1328433305f, 0.1363176729f, 0.1397903395f, 0.1432612876f,
+ 0.1467304745f, 0.1501978574f, 0.1536633939f, 0.1571270413f, 0.1605887571f, 0.1640484986f,
+ 0.1675062233f, 0.1709618888f, 0.1744154525f, 0.1778668719f, 0.1813161048f, 0.1847631086f,
+ 0.1882078409f, 0.1916502595f, 0.1950903220f, 0.1985279861f, 0.2019632096f, 0.2053959502f,
+ 0.2088261657f, 0.2122538139f, 0.2156788528f, 0.2191012402f, 0.2225209340f, 0.2259378921f,
+ 0.2293520727f, 0.2327634337f, 0.2361719332f, 0.2395775292f, 0.2429801799f, 0.2463798435f,
+ 0.2497764782f, 0.2531700422f, 0.2565604937f, 0.2599477912f, 0.2633318930f, 0.2667127575f,
+ 0.2700903430f, 0.2734646082f, 0.2768355114f, 0.2802030113f, 0.2835670665f, 0.2869276356f,
+ 0.2902846773f, 0.2936381502f, 0.2969880133f, 0.3003342253f, 0.3036767451f, 0.3070155316f,
+ 0.3103505437f, 0.3136817404f, 0.3170090808f, 0.3203325240f, 0.3236520291f, 0.3269675554f,
+ 0.3302790620f, 0.3335865082f, 0.3368898534f, 0.3401890570f, 0.3434840784f, 0.3467748771f,
+ 0.3500614126f, 0.3533436446f, 0.3566215327f, 0.3598950365f, 0.3631641160f, 0.3664287307f,
+ 0.3696888408f, 0.3729444059f, 0.3761953862f, 0.3794417417f, 0.3826834324f, 0.3859204185f,
+ 0.3891526602f, 0.3923801177f, 0.3956027515f, 0.3988205218f, 0.4020333892f, 0.4052413140f,
+ 0.4084442569f, 0.4116421786f, 0.4148350396f, 0.4180228007f, 0.4212054228f, 0.4243828668f,
+ 0.4275550934f, 0.4307220639f, 0.4338837391f, 0.4370400803f, 0.4401910487f, 0.4433366055f,
+ 0.4464767120f, 0.4496113297f, 0.4527404199f, 0.4558639443f, 0.4589818645f, 0.4620941420f,
+ 0.4652007387f, 0.4683016164f, 0.4713967368f, 0.4744860621f, 0.4775695541f, 0.4806471751f,
+ 0.4837188871f, 0.4867846524f, 0.4898444333f, 0.4928981922f, 0.4959458916f, 0.4989874939f,
+ 0.5020229618f, 0.5050522580f, 0.5080753452f, 0.5110921863f, 0.5141027442f, 0.5171069818f,
+ 0.5201048623f, 0.5230963487f, 0.5260814044f, 0.5290599925f, 0.5320320765f, 0.5349976199f,
+ 0.5379565861f, 0.5409089389f, 0.5438546419f, 0.5467936589f, 0.5497259538f, 0.5526514905f,
+ 0.5555702330f, 0.5584821455f, 0.5613871922f, 0.5642853374f, 0.5671765454f, 0.5700607807f,
+ 0.5729380078f, 0.5758081914f, 0.5786712962f, 0.5815272869f, 0.5843761285f, 0.5872177860f,
+ 0.5900522243f, 0.5928794088f, 0.5956993045f, 0.5985118769f, 0.6013170913f, 0.6041149133f,
+ 0.6069053085f, 0.6096882426f, 0.6124636813f, 0.6152315906f, 0.6179919364f, 0.6207446847f,
+ 0.6234898019f, 0.6262272540f, 0.6289570074f, 0.6316790286f, 0.6343932842f, 0.6370997406f,
+ 0.6397983648f, 0.6424891235f, 0.6451719835f, 0.6478469121f, 0.6505138761f, 0.6531728430f,
+ 0.6558237799f, 0.6584666543f, 0.6611014336f, 0.6637280856f, 0.6663465780f, 0.6689568784f,
+ 0.6715589548f, 0.6741527754f, 0.6767383080f, 0.6793155210f, 0.6818843828f, 0.6844448616f,
+ 0.6869969260f, 0.6895405447f, 0.6920756864f, 0.6946023199f, 0.6971204142f, 0.6996299382f,
+ 0.7021308612f, 0.7046231524f, 0.7071067812f, 0.7095817170f, 0.7120479294f, 0.7145053880f,
+ 0.7169540628f, 0.7193939235f, 0.7218249402f, 0.7242470830f, 0.7266603220f, 0.7290646278f,
+ 0.7314599706f, 0.7338463210f, 0.7362236498f, 0.7385919276f, 0.7409511254f, 0.7433012141f,
+ 0.7456421649f, 0.7479739490f, 0.7502965377f, 0.7526099024f, 0.7549140148f, 0.7572088465f,
+ 0.7594943693f, 0.7617705550f, 0.7640373758f, 0.7662948037f, 0.7685428110f, 0.7707813701f,
+ 0.7730104534f, 0.7752300335f, 0.7774400831f, 0.7796405751f, 0.7818314825f, 0.7840127782f,
+ 0.7861844355f, 0.7883464276f, 0.7904987281f, 0.7926413103f, 0.7947741481f, 0.7968972152f,
+ 0.7990104854f, 0.8011139328f, 0.8032075315f, 0.8052912558f, 0.8073650801f, 0.8094289789f,
+ 0.8114829268f, 0.8135268985f, 0.8155608690f, 0.8175848132f, 0.8195987062f, 0.8216025233f,
+ 0.8235962399f, 0.8255798314f, 0.8275532734f, 0.8295165418f, 0.8314696123f, 0.8334124610f,
+ 0.8353450639f, 0.8372673973f, 0.8391794376f, 0.8410811612f, 0.8429725449f, 0.8448535652f,
+ 0.8467241992f, 0.8485844238f, 0.8504342161f, 0.8522735535f, 0.8541024132f, 0.8559207728f,
+ 0.8577286100f, 0.8595259025f, 0.8613126282f, 0.8630887652f, 0.8648542917f, 0.8666091858f,
+ 0.8683534261f, 0.8700869911f, 0.8718098595f, 0.8735220101f, 0.8752234219f, 0.8769140739f,
+ 0.8785939454f, 0.8802630157f, 0.8819212643f, 0.8835686709f, 0.8852052150f, 0.8868308767f,
+ 0.8884456360f, 0.8900494729f, 0.8916423679f, 0.8932243012f, 0.8947952535f, 0.8963552054f,
+ 0.8979041378f, 0.8994420316f, 0.9009688679f, 0.9024846280f, 0.9039892931f, 0.9054828449f,
+ 0.9069652649f, 0.9084365350f, 0.9098966369f, 0.9113455529f, 0.9127832651f, 0.9142097557f,
+ 0.9156250073f, 0.9170290025f, 0.9184217239f, 0.9198031546f, 0.9211732775f, 0.9225320757f,
+ 0.9238795325f, 0.9252156315f, 0.9265403561f, 0.9278536900f, 0.9291556172f, 0.9304461216f,
+ 0.9317251874f, 0.9329927988f, 0.9342489403f, 0.9354935964f, 0.9367267517f, 0.9379483912f,
+ 0.9391584999f, 0.9403570628f, 0.9415440652f, 0.9427194925f, 0.9438833303f, 0.9450355643f,
+ 0.9461761802f, 0.9473051642f, 0.9484225022f, 0.9495281806f, 0.9506221858f, 0.9517045042f,
+ 0.9527751227f, 0.9538340281f, 0.9548812072f, 0.9559166474f, 0.9569403357f, 0.9579522597f,
+ 0.9589524069f, 0.9599407651f, 0.9609173219f, 0.9618820656f, 0.9628349841f, 0.9637760658f,
+ 0.9647052991f, 0.9656226726f, 0.9665281750f, 0.9674217952f, 0.9683035221f, 0.9691733450f,
+ 0.9700312532f, 0.9708772361f, 0.9717112832f, 0.9725333845f, 0.9733435297f, 0.9741417088f,
+ 0.9749279122f, 0.9757021300f, 0.9764643529f, 0.9772145714f, 0.9779527762f, 0.9786789584f,
+ 0.9793931090f, 0.9800952192f, 0.9807852804f, 0.9814632841f, 0.9821292220f, 0.9827830858f,
+ 0.9834248676f, 0.9840545594f, 0.9846721535f, 0.9852776424f, 0.9858710185f, 0.9864522746f,
+ 0.9870214036f, 0.9875783983f, 0.9881232521f, 0.9886559582f, 0.9891765100f, 0.9896849011f,
+ 0.9901811253f, 0.9906651766f, 0.9911370488f, 0.9915967363f, 0.9920442334f, 0.9924795346f,
+ 0.9929026345f, 0.9933135280f, 0.9937122099f, 0.9940986754f, 0.9944729197f, 0.9948349383f,
+ 0.9951847267f, 0.9955222805f, 0.9958475957f, 0.9961606681f, 0.9964614941f, 0.9967500699f,
+ 0.9970263919f, 0.9972904567f, 0.9975422611f, 0.9977818020f, 0.9980090765f, 0.9982240817f,
+ 0.9984268150f, 0.9986172740f, 0.9987954562f, 0.9989613595f, 0.9991149819f, 0.9992563214f,
+ 0.9993853764f, 0.9995021452f, 0.9996066264f, 0.9996988187f, 0.9997787210f, 0.9998463323f,
+ 0.9999016518f, 0.9999446787f, 0.9999754126f, 0.9999938531f, 1.0000000000f, 0.9999938531f,
+ 0.9999754126f, 0.9999446787f, 0.9999016518f, 0.9998463323f, 0.9997787210f, 0.9996988187f,
+ 0.9996066264f, 0.9995021452f, 0.9993853764f, 0.9992563214f, 0.9991149819f, 0.9989613595f,
+ 0.9987954562f, 0.9986172740f, 0.9984268150f, 0.9982240817f, 0.9980090765f, 0.9977818020f,
+ 0.9975422611f, 0.9972904567f, 0.9970263919f, 0.9967500699f, 0.9964614941f, 0.9961606681f,
+ 0.9958475957f, 0.9955222805f, 0.9951847267f, 0.9948349383f, 0.9944729197f, 0.9940986754f,
+ 0.9937122099f, 0.9933135280f, 0.9929026345f, 0.9924795346f, 0.9920442334f, 0.9915967363f,
+ 0.9911370488f, 0.9906651766f, 0.9901811253f, 0.9896849011f, 0.9891765100f, 0.9886559582f,
+ 0.9881232521f, 0.9875783983f, 0.9870214036f, 0.9864522746f, 0.9858710185f, 0.9852776424f,
+ 0.9846721535f, 0.9840545594f, 0.9834248676f, 0.9827830858f, 0.9821292220f, 0.9814632841f,
+ 0.9807852804f, 0.9800952192f, 0.9793931090f, 0.9786789584f, 0.9779527762f, 0.9772145714f,
+ 0.9764643529f, 0.9757021300f, 0.9749279122f, 0.9741417088f, 0.9733435297f, 0.9725333845f,
+ 0.9717112832f, 0.9708772361f, 0.9700312532f, 0.9691733450f, 0.9683035221f, 0.9674217952f,
+ 0.9665281750f, 0.9656226726f, 0.9647052991f, 0.9637760658f, 0.9628349841f, 0.9618820656f,
+ 0.9609173219f, 0.9599407651f, 0.9589524069f, 0.9579522597f, 0.9569403357f, 0.9559166474f,
+ 0.9548812072f, 0.9538340281f, 0.9527751227f, 0.9517045042f, 0.9506221858f, 0.9495281806f,
+ 0.9484225022f, 0.9473051642f, 0.9461761802f, 0.9450355643f, 0.9438833303f, 0.9427194925f,
+ 0.9415440652f, 0.9403570628f, 0.9391584999f, 0.9379483912f, 0.9367267517f, 0.9354935964f,
+ 0.9342489403f, 0.9329927988f, 0.9317251874f, 0.9304461216f, 0.9291556172f, 0.9278536900f,
+ 0.9265403561f, 0.9252156315f, 0.9238795325f, 0.9225320757f, 0.9211732775f, 0.9198031546f,
+ 0.9184217239f, 0.9170290025f, 0.9156250073f, 0.9142097557f, 0.9127832651f, 0.9113455529f,
+ 0.9098966369f, 0.9084365350f, 0.9069652649f, 0.9054828449f, 0.9039892931f, 0.9024846280f,
+ 0.9009688679f, 0.8994420316f, 0.8979041378f, 0.8963552054f, 0.8947952535f, 0.8932243012f,
+ 0.8916423679f, 0.8900494729f, 0.8884456360f, 0.8868308767f, 0.8852052150f, 0.8835686709f,
+ 0.8819212643f, 0.8802630157f, 0.8785939454f, 0.8769140739f, 0.8752234219f, 0.8735220101f,
+ 0.8718098595f, 0.8700869911f, 0.8683534261f, 0.8666091858f, 0.8648542917f, 0.8630887652f,
+ 0.8613126282f, 0.8595259025f, 0.8577286100f, 0.8559207728f, 0.8541024132f, 0.8522735535f,
+ 0.8504342161f, 0.8485844238f, 0.8467241992f, 0.8448535652f, 0.8429725449f, 0.8410811612f,
+ 0.8391794376f, 0.8372673973f, 0.8353450639f, 0.8334124610f, 0.8314696123f, 0.8295165418f,
+ 0.8275532734f, 0.8255798314f, 0.8235962399f, 0.8216025233f, 0.8195987062f, 0.8175848132f,
+ 0.8155608690f, 0.8135268985f, 0.8114829268f, 0.8094289789f, 0.8073650801f, 0.8052912558f,
+ 0.8032075315f, 0.8011139328f, 0.7990104854f, 0.7968972152f, 0.7947741481f, 0.7926413103f,
+ 0.7904987281f, 0.7883464276f, 0.7861844355f, 0.7840127782f, 0.7818314825f, 0.7796405751f,
+ 0.7774400831f, 0.7752300335f, 0.7730104534f, 0.7707813701f, 0.7685428110f, 0.7662948037f,
+ 0.7640373758f, 0.7617705550f, 0.7594943693f, 0.7572088465f, 0.7549140148f, 0.7526099024f,
+ 0.7502965377f, 0.7479739490f, 0.7456421649f, 0.7433012141f, 0.7409511254f, 0.7385919276f,
+ 0.7362236498f, 0.7338463210f, 0.7314599706f, 0.7290646278f, 0.7266603220f, 0.7242470830f,
+ 0.7218249402f, 0.7193939235f, 0.7169540628f, 0.7145053880f, 0.7120479294f, 0.7095817170f,
+ 0.7071067812f, 0.7046231524f, 0.7021308612f, 0.6996299382f, 0.6971204142f, 0.6946023199f,
+ 0.6920756864f, 0.6895405447f, 0.6869969260f, 0.6844448616f, 0.6818843828f, 0.6793155210f,
+ 0.6767383080f, 0.6741527754f, 0.6715589548f, 0.6689568784f, 0.6663465780f, 0.6637280856f,
+ 0.6611014336f, 0.6584666543f, 0.6558237799f, 0.6531728430f, 0.6505138761f, 0.6478469121f,
+ 0.6451719835f, 0.6424891235f, 0.6397983648f, 0.6370997406f, 0.6343932842f, 0.6316790286f,
+ 0.6289570074f, 0.6262272540f, 0.6234898019f, 0.6207446847f, 0.6179919364f, 0.6152315906f,
+ 0.6124636813f, 0.6096882426f, 0.6069053085f, 0.6041149133f, 0.6013170913f, 0.5985118769f,
+ 0.5956993045f, 0.5928794088f, 0.5900522243f, 0.5872177860f, 0.5843761285f, 0.5815272869f,
+ 0.5786712962f, 0.5758081914f, 0.5729380078f, 0.5700607807f, 0.5671765454f, 0.5642853374f,
+ 0.5613871922f, 0.5584821455f, 0.5555702330f, 0.5526514905f, 0.5497259538f, 0.5467936589f,
+ 0.5438546419f, 0.5409089389f, 0.5379565861f, 0.5349976199f, 0.5320320765f, 0.5290599925f,
+ 0.5260814044f, 0.5230963487f, 0.5201048623f, 0.5171069818f, 0.5141027442f, 0.5110921863f,
+ 0.5080753452f, 0.5050522580f, 0.5020229618f, 0.4989874939f, 0.4959458916f, 0.4928981922f,
+ 0.4898444333f, 0.4867846524f, 0.4837188871f, 0.4806471751f, 0.4775695541f, 0.4744860621f,
+ 0.4713967368f, 0.4683016164f, 0.4652007387f, 0.4620941420f, 0.4589818645f, 0.4558639443f,
+ 0.4527404199f, 0.4496113297f, 0.4464767120f, 0.4433366055f, 0.4401910487f, 0.4370400803f,
+ 0.4338837391f, 0.4307220639f, 0.4275550934f, 0.4243828668f, 0.4212054228f, 0.4180228007f,
+ 0.4148350396f, 0.4116421786f, 0.4084442569f, 0.4052413140f, 0.4020333892f, 0.3988205218f,
+ 0.3956027515f, 0.3923801177f, 0.3891526602f, 0.3859204185f, 0.3826834324f, 0.3794417417f,
+ 0.3761953862f, 0.3729444059f, 0.3696888408f, 0.3664287307f, 0.3631641160f, 0.3598950365f,
+ 0.3566215327f, 0.3533436446f, 0.3500614126f, 0.3467748771f, 0.3434840784f, 0.3401890570f,
+ 0.3368898534f, 0.3335865082f, 0.3302790620f, 0.3269675554f, 0.3236520291f, 0.3203325240f,
+ 0.3170090808f, 0.3136817404f, 0.3103505437f, 0.3070155316f, 0.3036767451f, 0.3003342253f,
+ 0.2969880133f, 0.2936381502f, 0.2902846773f, 0.2869276356f, 0.2835670665f, 0.2802030113f,
+ 0.2768355114f, 0.2734646082f, 0.2700903430f, 0.2667127575f, 0.2633318930f, 0.2599477912f,
+ 0.2565604937f, 0.2531700422f, 0.2497764782f, 0.2463798435f, 0.2429801799f, 0.2395775292f,
+ 0.2361719332f, 0.2327634337f, 0.2293520727f, 0.2259378921f, 0.2225209340f, 0.2191012402f,
+ 0.2156788528f, 0.2122538139f, 0.2088261657f, 0.2053959502f, 0.2019632096f, 0.1985279861f,
+ 0.1950903220f, 0.1916502595f, 0.1882078409f, 0.1847631086f, 0.1813161048f, 0.1778668719f,
+ 0.1744154525f, 0.1709618888f, 0.1675062233f, 0.1640484986f, 0.1605887571f, 0.1571270413f,
+ 0.1536633939f, 0.1501978574f, 0.1467304745f, 0.1432612876f, 0.1397903395f, 0.1363176729f,
+ 0.1328433305f, 0.1293673549f, 0.1258897889f, 0.1224106752f, 0.1189300567f, 0.1154479760f,
+ 0.1119644761f, 0.1084795997f, 0.1049933897f, 0.1015058890f, 0.0980171403f, 0.0945271867f,
+ 0.0910360710f, 0.0875438361f, 0.0840505249f, 0.0805561805f, 0.0770608457f, 0.0735645636f,
+ 0.0700673771f, 0.0665693292f, 0.0630704629f, 0.0595708212f, 0.0560704472f, 0.0525693839f,
+ 0.0490676743f, 0.0455653615f, 0.0420624885f, 0.0385590984f, 0.0350552343f, 0.0315509392f,
+ 0.0280462563f, 0.0245412285f, 0.0210358991f, 0.0175303110f, 0.0140245074f, 0.0105185314f,
+ 0.0070124261f, 0.0035062346f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_832[832] = {
+ 0.0000000000f, 0.0037759437f, 0.0075518336f, 0.0113276159f, 0.0151032366f, 0.0188786420f,
+ 0.0226537782f, 0.0264285914f, 0.0302030278f, 0.0339770336f, 0.0377505549f, 0.0415235380f,
+ 0.0452959291f, 0.0490676743f, 0.0528387200f, 0.0566090123f, 0.0603784974f, 0.0641471217f,
+ 0.0679148314f, 0.0716815728f, 0.0754472922f, 0.0792119358f, 0.0829754501f, 0.0867377813f,
+ 0.0904988758f, 0.0942586800f, 0.0980171403f, 0.1017742031f, 0.1055298148f, 0.1092839219f,
+ 0.1130364708f, 0.1167874081f, 0.1205366803f, 0.1242842338f, 0.1280300154f, 0.1317739715f,
+ 0.1355160488f, 0.1392561939f, 0.1429943536f, 0.1467304745f, 0.1504645033f, 0.1541963868f,
+ 0.1579260718f, 0.1616535052f, 0.1653786337f, 0.1691014043f, 0.1728217639f, 0.1765396594f,
+ 0.1802550378f, 0.1839678462f, 0.1876780316f, 0.1913855412f, 0.1950903220f, 0.1987923213f,
+ 0.2024914862f, 0.2061877640f, 0.2098811021f, 0.2135714477f, 0.2172587482f, 0.2209429511f,
+ 0.2246240039f, 0.2283018540f, 0.2319764490f, 0.2356477366f, 0.2393156643f, 0.2429801799f,
+ 0.2466412312f, 0.2502987658f, 0.2539527318f, 0.2576030770f, 0.2612497493f, 0.2648926968f,
+ 0.2685318675f, 0.2721672095f, 0.2757986710f, 0.2794262002f, 0.2830497454f, 0.2866692550f,
+ 0.2902846773f, 0.2938959607f, 0.2975030539f, 0.3011059053f, 0.3047044636f, 0.3082986774f,
+ 0.3118884957f, 0.3154738670f, 0.3190547404f, 0.3226310648f, 0.3262027892f, 0.3297698627f,
+ 0.3333322343f, 0.3368898534f, 0.3404426692f, 0.3439906309f, 0.3475336882f, 0.3510717904f,
+ 0.3546048870f, 0.3581329278f, 0.3616558624f, 0.3651736406f, 0.3686862122f, 0.3721935271f,
+ 0.3756955354f, 0.3791921871f, 0.3826834324f, 0.3861692214f, 0.3896495045f, 0.3931242320f,
+ 0.3965933545f, 0.4000568224f, 0.4035145864f, 0.4069665971f, 0.4104128055f, 0.4138531622f,
+ 0.4172876183f, 0.4207161247f, 0.4241386327f, 0.4275550934f, 0.4309654581f, 0.4343696782f,
+ 0.4377677052f, 0.4411594905f, 0.4445449859f, 0.4479241430f, 0.4512969137f, 0.4546632499f,
+ 0.4580231036f, 0.4613764269f, 0.4647231720f, 0.4680632912f, 0.4713967368f, 0.4747234614f,
+ 0.4780434174f, 0.4813565576f, 0.4846628346f, 0.4879622015f, 0.4912546111f, 0.4945400165f,
+ 0.4978183708f, 0.5010896273f, 0.5043537394f, 0.5076106605f, 0.5108603442f, 0.5141027442f,
+ 0.5173378142f, 0.5205655081f, 0.5237857798f, 0.5269985836f, 0.5302038734f, 0.5334016038f,
+ 0.5365917290f, 0.5397742036f, 0.5429489822f, 0.5461160195f, 0.5492752705f, 0.5524266899f,
+ 0.5555702330f, 0.5587058549f, 0.5618335108f, 0.5649531563f, 0.5680647467f, 0.5711682378f,
+ 0.5742635853f, 0.5773507451f, 0.5804296731f, 0.5835003254f, 0.5865626583f, 0.5896166282f,
+ 0.5926621914f, 0.5956993045f, 0.5987279243f, 0.6017480075f, 0.6047595111f, 0.6077623922f,
+ 0.6107566079f, 0.6137421156f, 0.6167188726f, 0.6196868366f, 0.6226459653f, 0.6255962163f,
+ 0.6285375478f, 0.6314699177f, 0.6343932842f, 0.6373076056f, 0.6402128405f, 0.6431089473f,
+ 0.6459958848f, 0.6488736118f, 0.6517420873f, 0.6546012704f, 0.6574511203f, 0.6602915964f,
+ 0.6631226582f, 0.6659442654f, 0.6687563776f, 0.6715589548f, 0.6743519571f, 0.6771353446f,
+ 0.6799090777f, 0.6826731167f, 0.6854274223f, 0.6881719553f, 0.6909066764f, 0.6936315467f,
+ 0.6963465273f, 0.6990515796f, 0.7017466649f, 0.7044317449f, 0.7071067812f, 0.7097717357f,
+ 0.7124265705f, 0.7150712476f, 0.7177057293f, 0.7203299782f, 0.7229439567f, 0.7255476276f,
+ 0.7281409539f, 0.7307238984f, 0.7332964244f, 0.7358584953f, 0.7384100744f, 0.7409511254f,
+ 0.7434816120f, 0.7460014983f, 0.7485107482f, 0.7510093260f, 0.7534971960f, 0.7559743228f,
+ 0.7584406711f, 0.7608962057f, 0.7633408916f, 0.7657746940f, 0.7681975780f, 0.7706095093f,
+ 0.7730104534f, 0.7754003760f, 0.7777792431f, 0.7801470208f, 0.7825036754f, 0.7848491731f,
+ 0.7871834806f, 0.7895065646f, 0.7918183920f, 0.7941189298f, 0.7964081452f, 0.7986860056f,
+ 0.8009524784f, 0.8032075315f, 0.8054511326f, 0.8076832497f, 0.8099038510f, 0.8121129048f,
+ 0.8143103798f, 0.8164962444f, 0.8186704676f, 0.8208330184f, 0.8229838659f, 0.8251229794f,
+ 0.8272503286f, 0.8293658829f, 0.8314696123f, 0.8335614868f, 0.8356414765f, 0.8377095518f,
+ 0.8397656832f, 0.8418098414f, 0.8438419973f, 0.8458621218f, 0.8478701862f, 0.8498661618f,
+ 0.8518500202f, 0.8538217330f, 0.8557812723f, 0.8577286100f, 0.8596637184f, 0.8615865698f,
+ 0.8634971370f, 0.8653953925f, 0.8672813094f, 0.8691548608f, 0.8710160200f, 0.8728647604f,
+ 0.8747010556f, 0.8765248796f, 0.8783362062f, 0.8801350097f, 0.8819212643f, 0.8836949448f,
+ 0.8854560257f, 0.8872044819f, 0.8889402885f, 0.8906634208f, 0.8923738542f, 0.8940715643f,
+ 0.8957565269f, 0.8974287180f, 0.8990881138f, 0.9007346905f, 0.9023684247f, 0.9039892931f,
+ 0.9055972727f, 0.9071923404f, 0.9087744735f, 0.9103436495f, 0.9118998460f, 0.9134430408f,
+ 0.9149732119f, 0.9164903376f, 0.9179943960f, 0.9194853659f, 0.9209632260f, 0.9224279552f,
+ 0.9238795325f, 0.9253179374f, 0.9267431492f, 0.9281551478f, 0.9295539129f, 0.9309394246f,
+ 0.9323116631f, 0.9336706089f, 0.9350162427f, 0.9363485451f, 0.9376674973f, 0.9389730805f,
+ 0.9402652759f, 0.9415440652f, 0.9428094301f, 0.9440613527f, 0.9452998150f, 0.9465247995f,
+ 0.9477362885f, 0.9489342650f, 0.9501187117f, 0.9512896118f, 0.9524469486f, 0.9535907056f,
+ 0.9547208665f, 0.9558374152f, 0.9569403357f, 0.9580296124f, 0.9591052297f, 0.9601671722f,
+ 0.9612154249f, 0.9622499728f, 0.9632708010f, 0.9642778952f, 0.9652712409f, 0.9662508239f,
+ 0.9672166303f, 0.9681686464f, 0.9691068584f, 0.9700312532f, 0.9709418174f, 0.9718385382f,
+ 0.9727214026f, 0.9735903982f, 0.9744455125f, 0.9752867334f, 0.9761140488f, 0.9769274470f,
+ 0.9777269164f, 0.9785124455f, 0.9792840232f, 0.9800416384f, 0.9807852804f, 0.9815149386f,
+ 0.9822306025f, 0.9829322619f, 0.9836199069f, 0.9842935277f, 0.9849531146f, 0.9855986582f,
+ 0.9862301494f, 0.9868475790f, 0.9874509384f, 0.9880402190f, 0.9886154122f, 0.9891765100f,
+ 0.9897235042f, 0.9902563872f, 0.9907751513f, 0.9912797892f, 0.9917702935f, 0.9922466575f,
+ 0.9927088741f, 0.9931569369f, 0.9935908395f, 0.9940105756f, 0.9944161393f, 0.9948075249f,
+ 0.9951847267f, 0.9955477393f, 0.9958965576f, 0.9962311766f, 0.9965515916f, 0.9968577979f,
+ 0.9971497912f, 0.9974275674f, 0.9976911224f, 0.9979404525f, 0.9981755542f, 0.9983964241f,
+ 0.9986030591f, 0.9987954562f, 0.9989736127f, 0.9991375260f, 0.9992871938f, 0.9994226139f,
+ 0.9995437845f, 0.9996507038f, 0.9997433702f, 0.9998217826f, 0.9998859396f, 0.9999358405f,
+ 0.9999714845f, 0.9999928711f, 1.0000000000f, 0.9999928711f, 0.9999714845f, 0.9999358405f,
+ 0.9998859396f, 0.9998217826f, 0.9997433702f, 0.9996507038f, 0.9995437845f, 0.9994226139f,
+ 0.9992871938f, 0.9991375260f, 0.9989736127f, 0.9987954562f, 0.9986030591f, 0.9983964241f,
+ 0.9981755542f, 0.9979404525f, 0.9976911224f, 0.9974275674f, 0.9971497912f, 0.9968577979f,
+ 0.9965515916f, 0.9962311766f, 0.9958965576f, 0.9955477393f, 0.9951847267f, 0.9948075249f,
+ 0.9944161393f, 0.9940105756f, 0.9935908395f, 0.9931569369f, 0.9927088741f, 0.9922466575f,
+ 0.9917702935f, 0.9912797892f, 0.9907751513f, 0.9902563872f, 0.9897235042f, 0.9891765100f,
+ 0.9886154122f, 0.9880402190f, 0.9874509384f, 0.9868475790f, 0.9862301494f, 0.9855986582f,
+ 0.9849531146f, 0.9842935277f, 0.9836199069f, 0.9829322619f, 0.9822306025f, 0.9815149386f,
+ 0.9807852804f, 0.9800416384f, 0.9792840232f, 0.9785124455f, 0.9777269164f, 0.9769274470f,
+ 0.9761140488f, 0.9752867334f, 0.9744455125f, 0.9735903982f, 0.9727214026f, 0.9718385382f,
+ 0.9709418174f, 0.9700312532f, 0.9691068584f, 0.9681686464f, 0.9672166303f, 0.9662508239f,
+ 0.9652712409f, 0.9642778952f, 0.9632708010f, 0.9622499728f, 0.9612154249f, 0.9601671722f,
+ 0.9591052297f, 0.9580296124f, 0.9569403357f, 0.9558374152f, 0.9547208665f, 0.9535907056f,
+ 0.9524469486f, 0.9512896118f, 0.9501187117f, 0.9489342650f, 0.9477362885f, 0.9465247995f,
+ 0.9452998150f, 0.9440613527f, 0.9428094301f, 0.9415440652f, 0.9402652759f, 0.9389730805f,
+ 0.9376674973f, 0.9363485451f, 0.9350162427f, 0.9336706089f, 0.9323116631f, 0.9309394246f,
+ 0.9295539129f, 0.9281551478f, 0.9267431492f, 0.9253179374f, 0.9238795325f, 0.9224279552f,
+ 0.9209632260f, 0.9194853659f, 0.9179943960f, 0.9164903376f, 0.9149732119f, 0.9134430408f,
+ 0.9118998460f, 0.9103436495f, 0.9087744735f, 0.9071923404f, 0.9055972727f, 0.9039892931f,
+ 0.9023684247f, 0.9007346905f, 0.8990881138f, 0.8974287180f, 0.8957565269f, 0.8940715643f,
+ 0.8923738542f, 0.8906634208f, 0.8889402885f, 0.8872044819f, 0.8854560257f, 0.8836949448f,
+ 0.8819212643f, 0.8801350097f, 0.8783362062f, 0.8765248796f, 0.8747010556f, 0.8728647604f,
+ 0.8710160200f, 0.8691548608f, 0.8672813094f, 0.8653953925f, 0.8634971370f, 0.8615865698f,
+ 0.8596637184f, 0.8577286100f, 0.8557812723f, 0.8538217330f, 0.8518500202f, 0.8498661618f,
+ 0.8478701862f, 0.8458621218f, 0.8438419973f, 0.8418098414f, 0.8397656832f, 0.8377095518f,
+ 0.8356414765f, 0.8335614868f, 0.8314696123f, 0.8293658829f, 0.8272503286f, 0.8251229794f,
+ 0.8229838659f, 0.8208330184f, 0.8186704676f, 0.8164962444f, 0.8143103798f, 0.8121129048f,
+ 0.8099038510f, 0.8076832497f, 0.8054511326f, 0.8032075315f, 0.8009524784f, 0.7986860056f,
+ 0.7964081452f, 0.7941189298f, 0.7918183920f, 0.7895065646f, 0.7871834806f, 0.7848491731f,
+ 0.7825036754f, 0.7801470208f, 0.7777792431f, 0.7754003760f, 0.7730104534f, 0.7706095093f,
+ 0.7681975780f, 0.7657746940f, 0.7633408916f, 0.7608962057f, 0.7584406711f, 0.7559743228f,
+ 0.7534971960f, 0.7510093260f, 0.7485107482f, 0.7460014983f, 0.7434816120f, 0.7409511254f,
+ 0.7384100744f, 0.7358584953f, 0.7332964244f, 0.7307238984f, 0.7281409539f, 0.7255476276f,
+ 0.7229439567f, 0.7203299782f, 0.7177057293f, 0.7150712476f, 0.7124265705f, 0.7097717357f,
+ 0.7071067812f, 0.7044317449f, 0.7017466649f, 0.6990515796f, 0.6963465273f, 0.6936315467f,
+ 0.6909066764f, 0.6881719553f, 0.6854274223f, 0.6826731167f, 0.6799090777f, 0.6771353446f,
+ 0.6743519571f, 0.6715589548f, 0.6687563776f, 0.6659442654f, 0.6631226582f, 0.6602915964f,
+ 0.6574511203f, 0.6546012704f, 0.6517420873f, 0.6488736118f, 0.6459958848f, 0.6431089473f,
+ 0.6402128405f, 0.6373076056f, 0.6343932842f, 0.6314699177f, 0.6285375478f, 0.6255962163f,
+ 0.6226459653f, 0.6196868366f, 0.6167188726f, 0.6137421156f, 0.6107566079f, 0.6077623922f,
+ 0.6047595111f, 0.6017480075f, 0.5987279243f, 0.5956993045f, 0.5926621914f, 0.5896166282f,
+ 0.5865626583f, 0.5835003254f, 0.5804296731f, 0.5773507451f, 0.5742635853f, 0.5711682378f,
+ 0.5680647467f, 0.5649531563f, 0.5618335108f, 0.5587058549f, 0.5555702330f, 0.5524266899f,
+ 0.5492752705f, 0.5461160195f, 0.5429489822f, 0.5397742036f, 0.5365917290f, 0.5334016038f,
+ 0.5302038734f, 0.5269985836f, 0.5237857798f, 0.5205655081f, 0.5173378142f, 0.5141027442f,
+ 0.5108603442f, 0.5076106605f, 0.5043537394f, 0.5010896273f, 0.4978183708f, 0.4945400165f,
+ 0.4912546111f, 0.4879622015f, 0.4846628346f, 0.4813565576f, 0.4780434174f, 0.4747234614f,
+ 0.4713967368f, 0.4680632912f, 0.4647231720f, 0.4613764269f, 0.4580231036f, 0.4546632499f,
+ 0.4512969137f, 0.4479241430f, 0.4445449859f, 0.4411594905f, 0.4377677052f, 0.4343696782f,
+ 0.4309654581f, 0.4275550934f, 0.4241386327f, 0.4207161247f, 0.4172876183f, 0.4138531622f,
+ 0.4104128055f, 0.4069665971f, 0.4035145864f, 0.4000568224f, 0.3965933545f, 0.3931242320f,
+ 0.3896495045f, 0.3861692214f, 0.3826834324f, 0.3791921871f, 0.3756955354f, 0.3721935271f,
+ 0.3686862122f, 0.3651736406f, 0.3616558624f, 0.3581329278f, 0.3546048870f, 0.3510717904f,
+ 0.3475336882f, 0.3439906309f, 0.3404426692f, 0.3368898534f, 0.3333322343f, 0.3297698627f,
+ 0.3262027892f, 0.3226310648f, 0.3190547404f, 0.3154738670f, 0.3118884957f, 0.3082986774f,
+ 0.3047044636f, 0.3011059053f, 0.2975030539f, 0.2938959607f, 0.2902846773f, 0.2866692550f,
+ 0.2830497454f, 0.2794262002f, 0.2757986710f, 0.2721672095f, 0.2685318675f, 0.2648926968f,
+ 0.2612497493f, 0.2576030770f, 0.2539527318f, 0.2502987658f, 0.2466412312f, 0.2429801799f,
+ 0.2393156643f, 0.2356477366f, 0.2319764490f, 0.2283018540f, 0.2246240039f, 0.2209429511f,
+ 0.2172587482f, 0.2135714477f, 0.2098811021f, 0.2061877640f, 0.2024914862f, 0.1987923213f,
+ 0.1950903220f, 0.1913855412f, 0.1876780316f, 0.1839678462f, 0.1802550378f, 0.1765396594f,
+ 0.1728217639f, 0.1691014043f, 0.1653786337f, 0.1616535052f, 0.1579260718f, 0.1541963868f,
+ 0.1504645033f, 0.1467304745f, 0.1429943536f, 0.1392561939f, 0.1355160488f, 0.1317739715f,
+ 0.1280300154f, 0.1242842338f, 0.1205366803f, 0.1167874081f, 0.1130364708f, 0.1092839219f,
+ 0.1055298148f, 0.1017742031f, 0.0980171403f, 0.0942586800f, 0.0904988758f, 0.0867377813f,
+ 0.0829754501f, 0.0792119358f, 0.0754472922f, 0.0716815728f, 0.0679148314f, 0.0641471217f,
+ 0.0603784974f, 0.0566090123f, 0.0528387200f, 0.0490676743f, 0.0452959291f, 0.0415235380f,
+ 0.0377505549f, 0.0339770336f, 0.0302030278f, 0.0264285914f, 0.0226537782f, 0.0188786420f,
+ 0.0151032366f, 0.0113276159f, 0.0075518336f, 0.0037759437f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_768[768] = {
+ 0.0000000000f, 0.0040906040f, 0.0081811396f, 0.0122715383f, 0.0163617316f, 0.0204516512f,
+ 0.0245412285f, 0.0286303952f, 0.0327190828f, 0.0368072229f, 0.0408947472f, 0.0449815871f,
+ 0.0490676743f, 0.0531529405f, 0.0572373173f, 0.0613207363f, 0.0654031292f, 0.0694844278f,
+ 0.0735645636f, 0.0776434685f, 0.0817210741f, 0.0857973123f, 0.0898721149f, 0.0939454136f,
+ 0.0980171403f, 0.1020872269f, 0.1061556053f, 0.1102222073f, 0.1142869650f, 0.1183498103f,
+ 0.1224106752f, 0.1264694918f, 0.1305261922f, 0.1345807085f, 0.1386329728f, 0.1426829174f,
+ 0.1467304745f, 0.1507755762f, 0.1548181551f, 0.1588581433f, 0.1628954734f, 0.1669300777f,
+ 0.1709618888f, 0.1749908391f, 0.1790168613f, 0.1830398880f, 0.1870598518f, 0.1910766856f,
+ 0.1950903220f, 0.1991006940f, 0.2031077344f, 0.2071113762f, 0.2111115524f, 0.2151081960f,
+ 0.2191012402f, 0.2230906181f, 0.2270762630f, 0.2310581083f, 0.2350360872f, 0.2390101332f,
+ 0.2429801799f, 0.2469461607f, 0.2509080094f, 0.2548656596f, 0.2588190451f, 0.2627680998f,
+ 0.2667127575f, 0.2706529523f, 0.2745886182f, 0.2785196894f, 0.2824461001f, 0.2863677846f,
+ 0.2902846773f, 0.2941967126f, 0.2981038250f, 0.3020059493f, 0.3059030201f, 0.3097949722f,
+ 0.3136817404f, 0.3175632598f, 0.3214394653f, 0.3253102922f, 0.3291756756f, 0.3330355508f,
+ 0.3368898534f, 0.3407385187f, 0.3445814824f, 0.3484186802f, 0.3522500479f, 0.3560755214f,
+ 0.3598950365f, 0.3637085296f, 0.3675159366f, 0.3713171940f, 0.3751122380f, 0.3789010053f,
+ 0.3826834324f, 0.3864594560f, 0.3902290129f, 0.3939920401f, 0.3977484745f, 0.4014982534f,
+ 0.4052413140f, 0.4089775936f, 0.4127070298f, 0.4164295601f, 0.4201451222f, 0.4238536540f,
+ 0.4275550934f, 0.4312493785f, 0.4349364474f, 0.4386162385f, 0.4422886902f, 0.4459537410f,
+ 0.4496113297f, 0.4532613949f, 0.4569038756f, 0.4605387110f, 0.4641658400f, 0.4677852022f,
+ 0.4713967368f, 0.4750003835f, 0.4785960820f, 0.4821837721f, 0.4857633937f, 0.4893348870f,
+ 0.4928981922f, 0.4964532497f, 0.5000000000f, 0.5035383837f, 0.5070683417f, 0.5105898148f,
+ 0.5141027442f, 0.5176070710f, 0.5211027367f, 0.5245896827f, 0.5280678507f, 0.5315371824f,
+ 0.5349976199f, 0.5384491052f, 0.5418915806f, 0.5453249884f, 0.5487492713f, 0.5521643719f,
+ 0.5555702330f, 0.5589667978f, 0.5623540092f, 0.5657318108f, 0.5691001459f, 0.5724589582f,
+ 0.5758081914f, 0.5791477896f, 0.5824776969f, 0.5857978575f, 0.5891082158f, 0.5924087166f,
+ 0.5956993045f, 0.5989799245f, 0.6022505217f, 0.6055110414f, 0.6087614290f, 0.6120016301f,
+ 0.6152315906f, 0.6184512563f, 0.6216605734f, 0.6248594881f, 0.6280479471f, 0.6312258968f,
+ 0.6343932842f, 0.6375500561f, 0.6406961599f, 0.6438315429f, 0.6469561525f, 0.6500699366f,
+ 0.6531728430f, 0.6562648197f, 0.6593458151f, 0.6624157776f, 0.6654746558f, 0.6685223986f,
+ 0.6715589548f, 0.6745842739f, 0.6775983050f, 0.6806009978f, 0.6835923020f, 0.6865721676f,
+ 0.6895405447f, 0.6924973837f, 0.6954426350f, 0.6983762494f, 0.7012981778f, 0.7042083713f,
+ 0.7071067812f, 0.7099933590f, 0.7128680564f, 0.7157308253f, 0.7185816178f, 0.7214203862f,
+ 0.7242470830f, 0.7270616608f, 0.7298640727f, 0.7326542717f, 0.7354322111f, 0.7381978444f,
+ 0.7409511254f, 0.7436920079f, 0.7464204462f, 0.7491363945f, 0.7518398075f, 0.7545306398f,
+ 0.7572088465f, 0.7598743827f, 0.7625272039f, 0.7651672656f, 0.7677945237f, 0.7704089342f,
+ 0.7730104534f, 0.7755990377f, 0.7781746438f, 0.7807372286f, 0.7832867492f, 0.7858231631f,
+ 0.7883464276f, 0.7908565007f, 0.7933533403f, 0.7958369046f, 0.7983071521f, 0.8007640414f,
+ 0.8032075315f, 0.8056375814f, 0.8080541504f, 0.8104571983f, 0.8128466846f, 0.8152225695f,
+ 0.8175848132f, 0.8199333761f, 0.8222682190f, 0.8245893028f, 0.8268965886f, 0.8291900379f,
+ 0.8314696123f, 0.8337352736f, 0.8359869839f, 0.8382247056f, 0.8404484011f, 0.8426580333f,
+ 0.8448535652f, 0.8470349602f, 0.8492021815f, 0.8513551931f, 0.8534939589f, 0.8556184430f,
+ 0.8577286100f, 0.8598244245f, 0.8619058515f, 0.8639728561f, 0.8660254038f, 0.8680634601f,
+ 0.8700869911f, 0.8720959628f, 0.8740903416f, 0.8760700942f, 0.8780351874f, 0.8799855883f,
+ 0.8819212643f, 0.8838421831f, 0.8857483124f, 0.8876396204f, 0.8895160754f, 0.8913776461f,
+ 0.8932243012f, 0.8950560099f, 0.8968727415f, 0.8986744657f, 0.9004611522f, 0.9022327713f,
+ 0.9039892931f, 0.9057306884f, 0.9074569281f, 0.9091679831f, 0.9108638249f, 0.9125444252f,
+ 0.9142097557f, 0.9158597887f, 0.9174944964f, 0.9191138517f, 0.9207178273f, 0.9223063964f,
+ 0.9238795325f, 0.9254372092f, 0.9269794005f, 0.9285060805f, 0.9300172237f, 0.9315128048f,
+ 0.9329927988f, 0.9344571810f, 0.9359059268f, 0.9373390119f, 0.9387564125f, 0.9401581047f,
+ 0.9415440652f, 0.9429142707f, 0.9442686983f, 0.9456073254f, 0.9469301295f, 0.9482370885f,
+ 0.9495281806f, 0.9508033841f, 0.9520626777f, 0.9533060404f, 0.9545334512f, 0.9557448898f,
+ 0.9569403357f, 0.9581197691f, 0.9592831702f, 0.9604305194f, 0.9615617977f, 0.9626769860f,
+ 0.9637760658f, 0.9648590186f, 0.9659258263f, 0.9669764710f, 0.9680109353f, 0.9690292017f,
+ 0.9700312532f, 0.9710170731f, 0.9719866448f, 0.9729399522f, 0.9738769793f, 0.9747977104f,
+ 0.9757021300f, 0.9765902232f, 0.9774619749f, 0.9783173707f, 0.9791563962f, 0.9799790374f,
+ 0.9807852804f, 0.9815751119f, 0.9823485185f, 0.9831054874f, 0.9838460059f, 0.9845700616f,
+ 0.9852776424f, 0.9859687364f, 0.9866433321f, 0.9873014182f, 0.9879429836f, 0.9885680177f,
+ 0.9891765100f, 0.9897684502f, 0.9903438286f, 0.9909026354f, 0.9914448614f, 0.9919704974f,
+ 0.9924795346f, 0.9929719646f, 0.9934477790f, 0.9939069700f, 0.9943495298f, 0.9947754511f,
+ 0.9951847267f, 0.9955773497f, 0.9959533136f, 0.9963126122f, 0.9966552393f, 0.9969811893f,
+ 0.9972904567f, 0.9975830363f, 0.9978589232f, 0.9981181129f, 0.9983606009f, 0.9985863833f,
+ 0.9987954562f, 0.9989878162f, 0.9991634599f, 0.9993223846f, 0.9994645875f, 0.9995900662f,
+ 0.9996988187f, 0.9997908431f, 0.9998661379f, 0.9999247018f, 0.9999665339f, 0.9999916334f,
+ 1.0000000000f, 0.9999916334f, 0.9999665339f, 0.9999247018f, 0.9998661379f, 0.9997908431f,
+ 0.9996988187f, 0.9995900662f, 0.9994645875f, 0.9993223846f, 0.9991634599f, 0.9989878162f,
+ 0.9987954562f, 0.9985863833f, 0.9983606009f, 0.9981181129f, 0.9978589232f, 0.9975830363f,
+ 0.9972904567f, 0.9969811893f, 0.9966552393f, 0.9963126122f, 0.9959533136f, 0.9955773497f,
+ 0.9951847267f, 0.9947754511f, 0.9943495298f, 0.9939069700f, 0.9934477790f, 0.9929719646f,
+ 0.9924795346f, 0.9919704974f, 0.9914448614f, 0.9909026354f, 0.9903438286f, 0.9897684502f,
+ 0.9891765100f, 0.9885680177f, 0.9879429836f, 0.9873014182f, 0.9866433321f, 0.9859687364f,
+ 0.9852776424f, 0.9845700616f, 0.9838460059f, 0.9831054874f, 0.9823485185f, 0.9815751119f,
+ 0.9807852804f, 0.9799790374f, 0.9791563962f, 0.9783173707f, 0.9774619749f, 0.9765902232f,
+ 0.9757021300f, 0.9747977104f, 0.9738769793f, 0.9729399522f, 0.9719866448f, 0.9710170731f,
+ 0.9700312532f, 0.9690292017f, 0.9680109353f, 0.9669764710f, 0.9659258263f, 0.9648590186f,
+ 0.9637760658f, 0.9626769860f, 0.9615617977f, 0.9604305194f, 0.9592831702f, 0.9581197691f,
+ 0.9569403357f, 0.9557448898f, 0.9545334512f, 0.9533060404f, 0.9520626777f, 0.9508033841f,
+ 0.9495281806f, 0.9482370885f, 0.9469301295f, 0.9456073254f, 0.9442686983f, 0.9429142707f,
+ 0.9415440652f, 0.9401581047f, 0.9387564125f, 0.9373390119f, 0.9359059268f, 0.9344571810f,
+ 0.9329927988f, 0.9315128048f, 0.9300172237f, 0.9285060805f, 0.9269794005f, 0.9254372092f,
+ 0.9238795325f, 0.9223063964f, 0.9207178273f, 0.9191138517f, 0.9174944964f, 0.9158597887f,
+ 0.9142097557f, 0.9125444252f, 0.9108638249f, 0.9091679831f, 0.9074569281f, 0.9057306884f,
+ 0.9039892931f, 0.9022327713f, 0.9004611522f, 0.8986744657f, 0.8968727415f, 0.8950560099f,
+ 0.8932243012f, 0.8913776461f, 0.8895160754f, 0.8876396204f, 0.8857483124f, 0.8838421831f,
+ 0.8819212643f, 0.8799855883f, 0.8780351874f, 0.8760700942f, 0.8740903416f, 0.8720959628f,
+ 0.8700869911f, 0.8680634601f, 0.8660254038f, 0.8639728561f, 0.8619058515f, 0.8598244245f,
+ 0.8577286100f, 0.8556184430f, 0.8534939589f, 0.8513551931f, 0.8492021815f, 0.8470349602f,
+ 0.8448535652f, 0.8426580333f, 0.8404484011f, 0.8382247056f, 0.8359869839f, 0.8337352736f,
+ 0.8314696123f, 0.8291900379f, 0.8268965886f, 0.8245893028f, 0.8222682190f, 0.8199333761f,
+ 0.8175848132f, 0.8152225695f, 0.8128466846f, 0.8104571983f, 0.8080541504f, 0.8056375814f,
+ 0.8032075315f, 0.8007640414f, 0.7983071521f, 0.7958369046f, 0.7933533403f, 0.7908565007f,
+ 0.7883464276f, 0.7858231631f, 0.7832867492f, 0.7807372286f, 0.7781746438f, 0.7755990377f,
+ 0.7730104534f, 0.7704089342f, 0.7677945237f, 0.7651672656f, 0.7625272039f, 0.7598743827f,
+ 0.7572088465f, 0.7545306398f, 0.7518398075f, 0.7491363945f, 0.7464204462f, 0.7436920079f,
+ 0.7409511254f, 0.7381978444f, 0.7354322111f, 0.7326542717f, 0.7298640727f, 0.7270616608f,
+ 0.7242470830f, 0.7214203862f, 0.7185816178f, 0.7157308253f, 0.7128680564f, 0.7099933590f,
+ 0.7071067812f, 0.7042083713f, 0.7012981778f, 0.6983762494f, 0.6954426350f, 0.6924973837f,
+ 0.6895405447f, 0.6865721676f, 0.6835923020f, 0.6806009978f, 0.6775983050f, 0.6745842739f,
+ 0.6715589548f, 0.6685223986f, 0.6654746558f, 0.6624157776f, 0.6593458151f, 0.6562648197f,
+ 0.6531728430f, 0.6500699366f, 0.6469561525f, 0.6438315429f, 0.6406961599f, 0.6375500561f,
+ 0.6343932842f, 0.6312258968f, 0.6280479471f, 0.6248594881f, 0.6216605734f, 0.6184512563f,
+ 0.6152315906f, 0.6120016301f, 0.6087614290f, 0.6055110414f, 0.6022505217f, 0.5989799245f,
+ 0.5956993045f, 0.5924087166f, 0.5891082158f, 0.5857978575f, 0.5824776969f, 0.5791477896f,
+ 0.5758081914f, 0.5724589582f, 0.5691001459f, 0.5657318108f, 0.5623540092f, 0.5589667978f,
+ 0.5555702330f, 0.5521643719f, 0.5487492713f, 0.5453249884f, 0.5418915806f, 0.5384491052f,
+ 0.5349976199f, 0.5315371824f, 0.5280678507f, 0.5245896827f, 0.5211027367f, 0.5176070710f,
+ 0.5141027442f, 0.5105898148f, 0.5070683417f, 0.5035383837f, 0.5000000000f, 0.4964532497f,
+ 0.4928981922f, 0.4893348870f, 0.4857633937f, 0.4821837721f, 0.4785960820f, 0.4750003835f,
+ 0.4713967368f, 0.4677852022f, 0.4641658400f, 0.4605387110f, 0.4569038756f, 0.4532613949f,
+ 0.4496113297f, 0.4459537410f, 0.4422886902f, 0.4386162385f, 0.4349364474f, 0.4312493785f,
+ 0.4275550934f, 0.4238536540f, 0.4201451222f, 0.4164295601f, 0.4127070298f, 0.4089775936f,
+ 0.4052413140f, 0.4014982534f, 0.3977484745f, 0.3939920401f, 0.3902290129f, 0.3864594560f,
+ 0.3826834324f, 0.3789010053f, 0.3751122380f, 0.3713171940f, 0.3675159366f, 0.3637085296f,
+ 0.3598950365f, 0.3560755214f, 0.3522500479f, 0.3484186802f, 0.3445814824f, 0.3407385187f,
+ 0.3368898534f, 0.3330355508f, 0.3291756756f, 0.3253102922f, 0.3214394653f, 0.3175632598f,
+ 0.3136817404f, 0.3097949722f, 0.3059030201f, 0.3020059493f, 0.2981038250f, 0.2941967126f,
+ 0.2902846773f, 0.2863677846f, 0.2824461001f, 0.2785196894f, 0.2745886182f, 0.2706529523f,
+ 0.2667127575f, 0.2627680998f, 0.2588190451f, 0.2548656596f, 0.2509080094f, 0.2469461607f,
+ 0.2429801799f, 0.2390101332f, 0.2350360872f, 0.2310581083f, 0.2270762630f, 0.2230906181f,
+ 0.2191012402f, 0.2151081960f, 0.2111115524f, 0.2071113762f, 0.2031077344f, 0.1991006940f,
+ 0.1950903220f, 0.1910766856f, 0.1870598518f, 0.1830398880f, 0.1790168613f, 0.1749908391f,
+ 0.1709618888f, 0.1669300777f, 0.1628954734f, 0.1588581433f, 0.1548181551f, 0.1507755762f,
+ 0.1467304745f, 0.1426829174f, 0.1386329728f, 0.1345807085f, 0.1305261922f, 0.1264694918f,
+ 0.1224106752f, 0.1183498103f, 0.1142869650f, 0.1102222073f, 0.1061556053f, 0.1020872269f,
+ 0.0980171403f, 0.0939454136f, 0.0898721149f, 0.0857973123f, 0.0817210741f, 0.0776434685f,
+ 0.0735645636f, 0.0694844278f, 0.0654031292f, 0.0613207363f, 0.0572373173f, 0.0531529405f,
+ 0.0490676743f, 0.0449815871f, 0.0408947472f, 0.0368072229f, 0.0327190828f, 0.0286303952f,
+ 0.0245412285f, 0.0204516512f, 0.0163617316f, 0.0122715383f, 0.0081811396f, 0.0040906040f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_704[704] = {
+ 0.0000000000f, 0.0044624748f, 0.0089248606f, 0.0133870688f, 0.0178490104f, 0.0223105965f,
+ 0.0267717384f, 0.0312323471f, 0.0356923338f, 0.0401516098f, 0.0446100863f, 0.0490676743f,
+ 0.0535242853f, 0.0579798303f, 0.0624342208f, 0.0668873680f, 0.0713391832f, 0.0757895778f,
+ 0.0802384631f, 0.0846857505f, 0.0891313516f, 0.0935751777f, 0.0980171403f, 0.1024571511f,
+ 0.1068951216f, 0.1113309633f, 0.1157645881f, 0.1201959075f, 0.1246248334f, 0.1290512776f,
+ 0.1334751518f, 0.1378963681f, 0.1423148383f, 0.1467304745f, 0.1511431887f, 0.1555528931f,
+ 0.1599594998f, 0.1643629212f, 0.1687630694f, 0.1731598570f, 0.1775531963f, 0.1819429998f,
+ 0.1863291801f, 0.1907116500f, 0.1950903220f, 0.1994651091f, 0.2038359240f, 0.2082026798f,
+ 0.2125652896f, 0.2169236663f, 0.2212777232f, 0.2256273737f, 0.2299725311f, 0.2343131089f,
+ 0.2386490206f, 0.2429801799f, 0.2473065006f, 0.2516278964f, 0.2559442814f, 0.2602555695f,
+ 0.2645616750f, 0.2688625121f, 0.2731579951f, 0.2774480385f, 0.2817325568f, 0.2860114648f,
+ 0.2902846773f, 0.2945521090f, 0.2988136751f, 0.3030692907f, 0.3073188711f, 0.3115623315f,
+ 0.3157995876f, 0.3200305549f, 0.3242551492f, 0.3284732864f, 0.3326848824f, 0.3368898534f,
+ 0.3410881156f, 0.3452795855f, 0.3494641796f, 0.3536418145f, 0.3578124071f, 0.3619758743f,
+ 0.3661321331f, 0.3702811009f, 0.3744226950f, 0.3785568329f, 0.3826834324f, 0.3868024111f,
+ 0.3909136872f, 0.3950171787f, 0.3991128039f, 0.4032004812f, 0.4072801293f, 0.4113516669f,
+ 0.4154150130f, 0.4194700866f, 0.4235168069f, 0.4275550934f, 0.4315848657f, 0.4356060435f,
+ 0.4396185467f, 0.4436222955f, 0.4476172101f, 0.4516032109f, 0.4555802186f, 0.4595481539f,
+ 0.4635069380f, 0.4674564918f, 0.4713967368f, 0.4753275946f, 0.4792489867f, 0.4831608352f,
+ 0.4870630622f, 0.4909555898f, 0.4948383407f, 0.4987112375f, 0.5025742031f, 0.5064271605f,
+ 0.5102700331f, 0.5141027442f, 0.5179252176f, 0.5217373772f, 0.5255391469f, 0.5293304513f,
+ 0.5331112146f, 0.5368813617f, 0.5406408175f, 0.5443895070f, 0.5481273557f, 0.5518542891f,
+ 0.5555702330f, 0.5592751134f, 0.5629688565f, 0.5666513888f, 0.5703226369f, 0.5739825278f,
+ 0.5776309884f, 0.5812679463f, 0.5848933289f, 0.5885070641f, 0.5921090798f, 0.5956993045f,
+ 0.5992776665f, 0.6028440946f, 0.6063985179f, 0.6099408654f, 0.6134710667f, 0.6169890515f,
+ 0.6204947497f, 0.6239880915f, 0.6274690074f, 0.6309374279f, 0.6343932842f, 0.6378365072f,
+ 0.6412670285f, 0.6446847798f, 0.6480896929f, 0.6514817002f, 0.6548607339f, 0.6582267270f,
+ 0.6615796122f, 0.6649193229f, 0.6682457925f, 0.6715589548f, 0.6748587439f, 0.6781450940f,
+ 0.6814179396f, 0.6846772156f, 0.6879228571f, 0.6911547995f, 0.6943729784f, 0.6975773296f,
+ 0.7007677895f, 0.7039442944f, 0.7071067812f, 0.7102551868f, 0.7133894485f, 0.7165095039f,
+ 0.7196152909f, 0.7227067477f, 0.7257838126f, 0.7288464244f, 0.7318945222f, 0.7349280451f,
+ 0.7379469329f, 0.7409511254f, 0.7439405627f, 0.7469151853f, 0.7498749341f, 0.7528197499f,
+ 0.7557495744f, 0.7586643489f, 0.7615640156f, 0.7644485167f, 0.7673177947f, 0.7701717926f,
+ 0.7730104534f, 0.7758337206f, 0.7786415380f, 0.7814338498f, 0.7842106003f, 0.7869717341f,
+ 0.7897171964f, 0.7924469324f, 0.7951608878f, 0.7978590086f, 0.8005412409f, 0.8032075315f,
+ 0.8058578271f, 0.8084920751f, 0.8111102230f, 0.8137122185f, 0.8162980100f, 0.8188675460f,
+ 0.8214207751f, 0.8239576467f, 0.8264781102f, 0.8289821153f, 0.8314696123f, 0.8339405516f,
+ 0.8363948840f, 0.8388325606f, 0.8412535328f, 0.8436577526f, 0.8460451719f, 0.8484157432f,
+ 0.8507694194f, 0.8531061536f, 0.8554258992f, 0.8577286100f, 0.8600142402f, 0.8622827443f,
+ 0.8645340770f, 0.8667681937f, 0.8689850497f, 0.8711846009f, 0.8733668035f, 0.8755316141f,
+ 0.8776789896f, 0.8798088871f, 0.8819212643f, 0.8840160792f, 0.8860932899f, 0.8881528552f,
+ 0.8901947340f, 0.8922188857f, 0.8942252699f, 0.8962138467f, 0.8981845764f, 0.9001374200f,
+ 0.9020723384f, 0.9039892931f, 0.9058882460f, 0.9077691592f, 0.9096319954f, 0.9114767173f,
+ 0.9133032882f, 0.9151116718f, 0.9169018321f, 0.9186737335f, 0.9204273405f, 0.9221626184f,
+ 0.9238795325f, 0.9255780487f, 0.9272581331f, 0.9289197523f, 0.9305628733f, 0.9321874631f,
+ 0.9337934897f, 0.9353809208f, 0.9369497250f, 0.9384998710f, 0.9400313279f, 0.9415440652f,
+ 0.9430380528f, 0.9445132610f, 0.9459696603f, 0.9474072218f, 0.9488259168f, 0.9502257172f,
+ 0.9516065949f, 0.9529685226f, 0.9543114730f, 0.9556354195f, 0.9569403357f, 0.9582261956f,
+ 0.9594929736f, 0.9607406445f, 0.9619691833f, 0.9631785658f, 0.9643687677f, 0.9655397654f,
+ 0.9666915355f, 0.9678240552f, 0.9689373018f, 0.9700312532f, 0.9711058876f, 0.9721611837f,
+ 0.9731971203f, 0.9742136769f, 0.9752108332f, 0.9761885694f, 0.9771468660f, 0.9780857039f,
+ 0.9790050644f, 0.9799049292f, 0.9807852804f, 0.9816461005f, 0.9824873722f, 0.9833090790f,
+ 0.9841112043f, 0.9848937323f, 0.9856566473f, 0.9863999342f, 0.9871235781f, 0.9878275646f,
+ 0.9885118798f, 0.9891765100f, 0.9898214419f, 0.9904466627f, 0.9910521600f, 0.9916379217f,
+ 0.9922039361f, 0.9927501920f, 0.9932766785f, 0.9937833852f, 0.9942703018f, 0.9947374187f,
+ 0.9951847267f, 0.9956122167f, 0.9960198804f, 0.9964077096f, 0.9967756965f, 0.9971238338f,
+ 0.9974521146f, 0.9977605324f, 0.9980490810f, 0.9983177547f, 0.9985665481f, 0.9987954562f,
+ 0.9990044746f, 0.9991935990f, 0.9993628257f, 0.9995121512f, 0.9996415728f, 0.9997510877f,
+ 0.9998406937f, 0.9999103892f, 0.9999601726f, 0.9999900431f, 1.0000000000f, 0.9999900431f,
+ 0.9999601726f, 0.9999103892f, 0.9998406937f, 0.9997510877f, 0.9996415728f, 0.9995121512f,
+ 0.9993628257f, 0.9991935990f, 0.9990044746f, 0.9987954562f, 0.9985665481f, 0.9983177547f,
+ 0.9980490810f, 0.9977605324f, 0.9974521146f, 0.9971238338f, 0.9967756965f, 0.9964077096f,
+ 0.9960198804f, 0.9956122167f, 0.9951847267f, 0.9947374187f, 0.9942703018f, 0.9937833852f,
+ 0.9932766785f, 0.9927501920f, 0.9922039361f, 0.9916379217f, 0.9910521600f, 0.9904466627f,
+ 0.9898214419f, 0.9891765100f, 0.9885118798f, 0.9878275646f, 0.9871235781f, 0.9863999342f,
+ 0.9856566473f, 0.9848937323f, 0.9841112043f, 0.9833090790f, 0.9824873722f, 0.9816461005f,
+ 0.9807852804f, 0.9799049292f, 0.9790050644f, 0.9780857039f, 0.9771468660f, 0.9761885694f,
+ 0.9752108332f, 0.9742136769f, 0.9731971203f, 0.9721611837f, 0.9711058876f, 0.9700312532f,
+ 0.9689373018f, 0.9678240552f, 0.9666915355f, 0.9655397654f, 0.9643687677f, 0.9631785658f,
+ 0.9619691833f, 0.9607406445f, 0.9594929736f, 0.9582261956f, 0.9569403357f, 0.9556354195f,
+ 0.9543114730f, 0.9529685226f, 0.9516065949f, 0.9502257172f, 0.9488259168f, 0.9474072218f,
+ 0.9459696603f, 0.9445132610f, 0.9430380528f, 0.9415440652f, 0.9400313279f, 0.9384998710f,
+ 0.9369497250f, 0.9353809208f, 0.9337934897f, 0.9321874631f, 0.9305628733f, 0.9289197523f,
+ 0.9272581331f, 0.9255780487f, 0.9238795325f, 0.9221626184f, 0.9204273405f, 0.9186737335f,
+ 0.9169018321f, 0.9151116718f, 0.9133032882f, 0.9114767173f, 0.9096319954f, 0.9077691592f,
+ 0.9058882460f, 0.9039892931f, 0.9020723384f, 0.9001374200f, 0.8981845764f, 0.8962138467f,
+ 0.8942252699f, 0.8922188857f, 0.8901947340f, 0.8881528552f, 0.8860932899f, 0.8840160792f,
+ 0.8819212643f, 0.8798088871f, 0.8776789896f, 0.8755316141f, 0.8733668035f, 0.8711846009f,
+ 0.8689850497f, 0.8667681937f, 0.8645340770f, 0.8622827443f, 0.8600142402f, 0.8577286100f,
+ 0.8554258992f, 0.8531061536f, 0.8507694194f, 0.8484157432f, 0.8460451719f, 0.8436577526f,
+ 0.8412535328f, 0.8388325606f, 0.8363948840f, 0.8339405516f, 0.8314696123f, 0.8289821153f,
+ 0.8264781102f, 0.8239576467f, 0.8214207751f, 0.8188675460f, 0.8162980100f, 0.8137122185f,
+ 0.8111102230f, 0.8084920751f, 0.8058578271f, 0.8032075315f, 0.8005412409f, 0.7978590086f,
+ 0.7951608878f, 0.7924469324f, 0.7897171964f, 0.7869717341f, 0.7842106003f, 0.7814338498f,
+ 0.7786415380f, 0.7758337206f, 0.7730104534f, 0.7701717926f, 0.7673177947f, 0.7644485167f,
+ 0.7615640156f, 0.7586643489f, 0.7557495744f, 0.7528197499f, 0.7498749341f, 0.7469151853f,
+ 0.7439405627f, 0.7409511254f, 0.7379469329f, 0.7349280451f, 0.7318945222f, 0.7288464244f,
+ 0.7257838126f, 0.7227067477f, 0.7196152909f, 0.7165095039f, 0.7133894485f, 0.7102551868f,
+ 0.7071067812f, 0.7039442944f, 0.7007677895f, 0.6975773296f, 0.6943729784f, 0.6911547995f,
+ 0.6879228571f, 0.6846772156f, 0.6814179396f, 0.6781450940f, 0.6748587439f, 0.6715589548f,
+ 0.6682457925f, 0.6649193229f, 0.6615796122f, 0.6582267270f, 0.6548607339f, 0.6514817002f,
+ 0.6480896929f, 0.6446847798f, 0.6412670285f, 0.6378365072f, 0.6343932842f, 0.6309374279f,
+ 0.6274690074f, 0.6239880915f, 0.6204947497f, 0.6169890515f, 0.6134710667f, 0.6099408654f,
+ 0.6063985179f, 0.6028440946f, 0.5992776665f, 0.5956993045f, 0.5921090798f, 0.5885070641f,
+ 0.5848933289f, 0.5812679463f, 0.5776309884f, 0.5739825278f, 0.5703226369f, 0.5666513888f,
+ 0.5629688565f, 0.5592751134f, 0.5555702330f, 0.5518542891f, 0.5481273557f, 0.5443895070f,
+ 0.5406408175f, 0.5368813617f, 0.5331112146f, 0.5293304513f, 0.5255391469f, 0.5217373772f,
+ 0.5179252176f, 0.5141027442f, 0.5102700331f, 0.5064271605f, 0.5025742031f, 0.4987112375f,
+ 0.4948383407f, 0.4909555898f, 0.4870630622f, 0.4831608352f, 0.4792489867f, 0.4753275946f,
+ 0.4713967368f, 0.4674564918f, 0.4635069380f, 0.4595481539f, 0.4555802186f, 0.4516032109f,
+ 0.4476172101f, 0.4436222955f, 0.4396185467f, 0.4356060435f, 0.4315848657f, 0.4275550934f,
+ 0.4235168069f, 0.4194700866f, 0.4154150130f, 0.4113516669f, 0.4072801293f, 0.4032004812f,
+ 0.3991128039f, 0.3950171787f, 0.3909136872f, 0.3868024111f, 0.3826834324f, 0.3785568329f,
+ 0.3744226950f, 0.3702811009f, 0.3661321331f, 0.3619758743f, 0.3578124071f, 0.3536418145f,
+ 0.3494641796f, 0.3452795855f, 0.3410881156f, 0.3368898534f, 0.3326848824f, 0.3284732864f,
+ 0.3242551492f, 0.3200305549f, 0.3157995876f, 0.3115623315f, 0.3073188711f, 0.3030692907f,
+ 0.2988136751f, 0.2945521090f, 0.2902846773f, 0.2860114648f, 0.2817325568f, 0.2774480385f,
+ 0.2731579951f, 0.2688625121f, 0.2645616750f, 0.2602555695f, 0.2559442814f, 0.2516278964f,
+ 0.2473065006f, 0.2429801799f, 0.2386490206f, 0.2343131089f, 0.2299725311f, 0.2256273737f,
+ 0.2212777232f, 0.2169236663f, 0.2125652896f, 0.2082026798f, 0.2038359240f, 0.1994651091f,
+ 0.1950903220f, 0.1907116500f, 0.1863291801f, 0.1819429998f, 0.1775531963f, 0.1731598570f,
+ 0.1687630694f, 0.1643629212f, 0.1599594998f, 0.1555528931f, 0.1511431887f, 0.1467304745f,
+ 0.1423148383f, 0.1378963681f, 0.1334751518f, 0.1290512776f, 0.1246248334f, 0.1201959075f,
+ 0.1157645881f, 0.1113309633f, 0.1068951216f, 0.1024571511f, 0.0980171403f, 0.0935751777f,
+ 0.0891313516f, 0.0846857505f, 0.0802384631f, 0.0757895778f, 0.0713391832f, 0.0668873680f,
+ 0.0624342208f, 0.0579798303f, 0.0535242853f, 0.0490676743f, 0.0446100863f, 0.0401516098f,
+ 0.0356923338f, 0.0312323471f, 0.0267717384f, 0.0223105965f, 0.0178490104f, 0.0133870688f,
+ 0.0089248606f, 0.0044624748f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_640[640] = {
+ 0.0000000000f, 0.0049087188f, 0.0098173193f, 0.0147256833f, 0.0196336925f, 0.0245412285f,
+ 0.0294481732f, 0.0343544084f, 0.0392598158f, 0.0441642771f, 0.0490676743f, 0.0539698892f,
+ 0.0588708037f, 0.0637702996f, 0.0686682589f, 0.0735645636f, 0.0784590957f, 0.0833517373f,
+ 0.0882423705f, 0.0931308775f, 0.0980171403f, 0.1029010414f, 0.1077824630f, 0.1126612876f,
+ 0.1175373975f, 0.1224106752f, 0.1272810034f, 0.1321482646f, 0.1370123417f, 0.1418731173f,
+ 0.1467304745f, 0.1515842960f, 0.1564344650f, 0.1612808647f, 0.1661233781f, 0.1709618888f,
+ 0.1757962799f, 0.1806264352f, 0.1854522381f, 0.1902735724f, 0.1950903220f, 0.1999023708f,
+ 0.2047096027f, 0.2095119021f, 0.2143091531f, 0.2191012402f, 0.2238880479f, 0.2286694608f,
+ 0.2334453639f, 0.2382156419f, 0.2429801799f, 0.2477388632f, 0.2524915770f, 0.2572382069f,
+ 0.2619786385f, 0.2667127575f, 0.2714404499f, 0.2761616017f, 0.2808760993f, 0.2855838289f,
+ 0.2902846773f, 0.2949785310f, 0.2996652770f, 0.3043448024f, 0.3090169944f, 0.3136817404f,
+ 0.3183389281f, 0.3229884451f, 0.3276301796f, 0.3322640195f, 0.3368898534f, 0.3415075697f,
+ 0.3461170571f, 0.3507182046f, 0.3553109013f, 0.3598950365f, 0.3644704999f, 0.3690371811f,
+ 0.3735949701f, 0.3781437570f, 0.3826834324f, 0.3872138867f, 0.3917350109f, 0.3962466959f,
+ 0.4007488331f, 0.4052413140f, 0.4097240303f, 0.4141968741f, 0.4186597375f, 0.4231125131f,
+ 0.4275550934f, 0.4319873716f, 0.4364092407f, 0.4408205942f, 0.4452213259f, 0.4496113297f,
+ 0.4539904997f, 0.4583587306f, 0.4627159170f, 0.4670619540f, 0.4713967368f, 0.4757201610f,
+ 0.4800321224f, 0.4843325171f, 0.4886212415f, 0.4928981922f, 0.4971632663f, 0.5014163608f,
+ 0.5056573734f, 0.5098862018f, 0.5141027442f, 0.5183068989f, 0.5224985647f, 0.5266776406f,
+ 0.5308440257f, 0.5349976199f, 0.5391383229f, 0.5432660350f, 0.5473806568f, 0.5514820891f,
+ 0.5555702330f, 0.5596449901f, 0.5637062622f, 0.5677539514f, 0.5717879602f, 0.5758081914f,
+ 0.5798145481f, 0.5838069338f, 0.5877852523f, 0.5917494077f, 0.5956993045f, 0.5996348475f,
+ 0.6035559420f, 0.6074624933f, 0.6113544074f, 0.6152315906f, 0.6190939493f, 0.6229413906f,
+ 0.6267738216f, 0.6305911501f, 0.6343932842f, 0.6381801321f, 0.6419516026f, 0.6457076048f,
+ 0.6494480483f, 0.6531728430f, 0.6568818989f, 0.6605751269f, 0.6642524379f, 0.6679137433f,
+ 0.6715589548f, 0.6751879847f, 0.6788007455f, 0.6823971502f, 0.6859771120f, 0.6895405447f,
+ 0.6930873625f, 0.6966174800f, 0.7001308119f, 0.7036272737f, 0.7071067812f, 0.7105692504f,
+ 0.7140145981f, 0.7174427410f, 0.7208535967f, 0.7242470830f, 0.7276231180f, 0.7309816205f,
+ 0.7343225094f, 0.7376457044f, 0.7409511254f, 0.7442386926f, 0.7475083269f, 0.7507599494f,
+ 0.7539934820f, 0.7572088465f, 0.7604059656f, 0.7635847622f, 0.7667451597f, 0.7698870820f,
+ 0.7730104534f, 0.7761151985f, 0.7792012426f, 0.7822685114f, 0.7853169309f, 0.7883464276f,
+ 0.7913569286f, 0.7943483614f, 0.7973206538f, 0.8002737342f, 0.8032075315f, 0.8061219750f,
+ 0.8090169944f, 0.8118925200f, 0.8147484825f, 0.8175848132f, 0.8204014435f, 0.8231983058f,
+ 0.8259753325f, 0.8287324568f, 0.8314696123f, 0.8341867329f, 0.8368837533f, 0.8395606084f,
+ 0.8422172337f, 0.8448535652f, 0.8474695395f, 0.8500650934f, 0.8526401644f, 0.8551946904f,
+ 0.8577286100f, 0.8602418620f, 0.8627343860f, 0.8652061218f, 0.8676570098f, 0.8700869911f,
+ 0.8724960071f, 0.8748839997f, 0.8772509113f, 0.8795966851f, 0.8819212643f, 0.8842245931f,
+ 0.8865066159f, 0.8887672778f, 0.8910065242f, 0.8932243012f, 0.8954205554f, 0.8975952338f,
+ 0.8997482841f, 0.9018796543f, 0.9039892931f, 0.9060771497f, 0.9081431738f, 0.9101873156f,
+ 0.9122095258f, 0.9142097557f, 0.9161879571f, 0.9181440824f, 0.9200780843f, 0.9219899164f,
+ 0.9238795325f, 0.9257468871f, 0.9275919353f, 0.9294146324f, 0.9312149348f, 0.9329927988f,
+ 0.9347481818f, 0.9364810414f, 0.9381913359f, 0.9398790241f, 0.9415440652f, 0.9431864192f,
+ 0.9448060465f, 0.9464029080f, 0.9479769654f, 0.9495281806f, 0.9510565163f, 0.9525619357f,
+ 0.9540444024f, 0.9555038808f, 0.9569403357f, 0.9583537325f, 0.9597440372f, 0.9611112161f,
+ 0.9624552365f, 0.9637760658f, 0.9650736723f, 0.9663480247f, 0.9675990924f, 0.9688268450f,
+ 0.9700312532f, 0.9712122878f, 0.9723699204f, 0.9735041231f, 0.9746148686f, 0.9757021300f,
+ 0.9767658813f, 0.9778060968f, 0.9788227513f, 0.9798158205f, 0.9807852804f, 0.9817311076f,
+ 0.9826532793f, 0.9835517734f, 0.9844265681f, 0.9852776424f, 0.9861049758f, 0.9869085483f,
+ 0.9876883406f, 0.9884443339f, 0.9891765100f, 0.9898848512f, 0.9905693404f, 0.9912299613f,
+ 0.9918666978f, 0.9924795346f, 0.9930684570f, 0.9936334507f, 0.9941745021f, 0.9946915983f,
+ 0.9951847267f, 0.9956538754f, 0.9960990333f, 0.9965201894f, 0.9969173337f, 0.9972904567f,
+ 0.9976395492f, 0.9979646030f, 0.9982656102f, 0.9985425635f, 0.9987954562f, 0.9990242823f,
+ 0.9992290362f, 0.9994097131f, 0.9995663085f, 0.9996988187f, 0.9998072405f, 0.9998915712f,
+ 0.9999518090f, 0.9999879522f, 1.0000000000f, 0.9999879522f, 0.9999518090f, 0.9998915712f,
+ 0.9998072405f, 0.9996988187f, 0.9995663085f, 0.9994097131f, 0.9992290362f, 0.9990242823f,
+ 0.9987954562f, 0.9985425635f, 0.9982656102f, 0.9979646030f, 0.9976395492f, 0.9972904567f,
+ 0.9969173337f, 0.9965201894f, 0.9960990333f, 0.9956538754f, 0.9951847267f, 0.9946915983f,
+ 0.9941745021f, 0.9936334507f, 0.9930684570f, 0.9924795346f, 0.9918666978f, 0.9912299613f,
+ 0.9905693404f, 0.9898848512f, 0.9891765100f, 0.9884443339f, 0.9876883406f, 0.9869085483f,
+ 0.9861049758f, 0.9852776424f, 0.9844265681f, 0.9835517734f, 0.9826532793f, 0.9817311076f,
+ 0.9807852804f, 0.9798158205f, 0.9788227513f, 0.9778060968f, 0.9767658813f, 0.9757021300f,
+ 0.9746148686f, 0.9735041231f, 0.9723699204f, 0.9712122878f, 0.9700312532f, 0.9688268450f,
+ 0.9675990924f, 0.9663480247f, 0.9650736723f, 0.9637760658f, 0.9624552365f, 0.9611112161f,
+ 0.9597440372f, 0.9583537325f, 0.9569403357f, 0.9555038808f, 0.9540444024f, 0.9525619357f,
+ 0.9510565163f, 0.9495281806f, 0.9479769654f, 0.9464029080f, 0.9448060465f, 0.9431864192f,
+ 0.9415440652f, 0.9398790241f, 0.9381913359f, 0.9364810414f, 0.9347481818f, 0.9329927988f,
+ 0.9312149348f, 0.9294146324f, 0.9275919353f, 0.9257468871f, 0.9238795325f, 0.9219899164f,
+ 0.9200780843f, 0.9181440824f, 0.9161879571f, 0.9142097557f, 0.9122095258f, 0.9101873156f,
+ 0.9081431738f, 0.9060771497f, 0.9039892931f, 0.9018796543f, 0.8997482841f, 0.8975952338f,
+ 0.8954205554f, 0.8932243012f, 0.8910065242f, 0.8887672778f, 0.8865066159f, 0.8842245931f,
+ 0.8819212643f, 0.8795966851f, 0.8772509113f, 0.8748839997f, 0.8724960071f, 0.8700869911f,
+ 0.8676570098f, 0.8652061218f, 0.8627343860f, 0.8602418620f, 0.8577286100f, 0.8551946904f,
+ 0.8526401644f, 0.8500650934f, 0.8474695395f, 0.8448535652f, 0.8422172337f, 0.8395606084f,
+ 0.8368837533f, 0.8341867329f, 0.8314696123f, 0.8287324568f, 0.8259753325f, 0.8231983058f,
+ 0.8204014435f, 0.8175848132f, 0.8147484825f, 0.8118925200f, 0.8090169944f, 0.8061219750f,
+ 0.8032075315f, 0.8002737342f, 0.7973206538f, 0.7943483614f, 0.7913569286f, 0.7883464276f,
+ 0.7853169309f, 0.7822685114f, 0.7792012426f, 0.7761151985f, 0.7730104534f, 0.7698870820f,
+ 0.7667451597f, 0.7635847622f, 0.7604059656f, 0.7572088465f, 0.7539934820f, 0.7507599494f,
+ 0.7475083269f, 0.7442386926f, 0.7409511254f, 0.7376457044f, 0.7343225094f, 0.7309816205f,
+ 0.7276231180f, 0.7242470830f, 0.7208535967f, 0.7174427410f, 0.7140145981f, 0.7105692504f,
+ 0.7071067812f, 0.7036272737f, 0.7001308119f, 0.6966174800f, 0.6930873625f, 0.6895405447f,
+ 0.6859771120f, 0.6823971502f, 0.6788007455f, 0.6751879847f, 0.6715589548f, 0.6679137433f,
+ 0.6642524379f, 0.6605751269f, 0.6568818989f, 0.6531728430f, 0.6494480483f, 0.6457076048f,
+ 0.6419516026f, 0.6381801321f, 0.6343932842f, 0.6305911501f, 0.6267738216f, 0.6229413906f,
+ 0.6190939493f, 0.6152315906f, 0.6113544074f, 0.6074624933f, 0.6035559420f, 0.5996348475f,
+ 0.5956993045f, 0.5917494077f, 0.5877852523f, 0.5838069338f, 0.5798145481f, 0.5758081914f,
+ 0.5717879602f, 0.5677539514f, 0.5637062622f, 0.5596449901f, 0.5555702330f, 0.5514820891f,
+ 0.5473806568f, 0.5432660350f, 0.5391383229f, 0.5349976199f, 0.5308440257f, 0.5266776406f,
+ 0.5224985647f, 0.5183068989f, 0.5141027442f, 0.5098862018f, 0.5056573734f, 0.5014163608f,
+ 0.4971632663f, 0.4928981922f, 0.4886212415f, 0.4843325171f, 0.4800321224f, 0.4757201610f,
+ 0.4713967368f, 0.4670619540f, 0.4627159170f, 0.4583587306f, 0.4539904997f, 0.4496113297f,
+ 0.4452213259f, 0.4408205942f, 0.4364092407f, 0.4319873716f, 0.4275550934f, 0.4231125131f,
+ 0.4186597375f, 0.4141968741f, 0.4097240303f, 0.4052413140f, 0.4007488331f, 0.3962466959f,
+ 0.3917350109f, 0.3872138867f, 0.3826834324f, 0.3781437570f, 0.3735949701f, 0.3690371811f,
+ 0.3644704999f, 0.3598950365f, 0.3553109013f, 0.3507182046f, 0.3461170571f, 0.3415075697f,
+ 0.3368898534f, 0.3322640195f, 0.3276301796f, 0.3229884451f, 0.3183389281f, 0.3136817404f,
+ 0.3090169944f, 0.3043448024f, 0.2996652770f, 0.2949785310f, 0.2902846773f, 0.2855838289f,
+ 0.2808760993f, 0.2761616017f, 0.2714404499f, 0.2667127575f, 0.2619786385f, 0.2572382069f,
+ 0.2524915770f, 0.2477388632f, 0.2429801799f, 0.2382156419f, 0.2334453639f, 0.2286694608f,
+ 0.2238880479f, 0.2191012402f, 0.2143091531f, 0.2095119021f, 0.2047096027f, 0.1999023708f,
+ 0.1950903220f, 0.1902735724f, 0.1854522381f, 0.1806264352f, 0.1757962799f, 0.1709618888f,
+ 0.1661233781f, 0.1612808647f, 0.1564344650f, 0.1515842960f, 0.1467304745f, 0.1418731173f,
+ 0.1370123417f, 0.1321482646f, 0.1272810034f, 0.1224106752f, 0.1175373975f, 0.1126612876f,
+ 0.1077824630f, 0.1029010414f, 0.0980171403f, 0.0931308775f, 0.0882423705f, 0.0833517373f,
+ 0.0784590957f, 0.0735645636f, 0.0686682589f, 0.0637702996f, 0.0588708037f, 0.0539698892f,
+ 0.0490676743f, 0.0441642771f, 0.0392598158f, 0.0343544084f, 0.0294481732f, 0.0245412285f,
+ 0.0196336925f, 0.0147256833f, 0.0098173193f, 0.0049087188f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_n_by_576[576] = {
+ 0.0000000000f, 0.0054541269f, 0.0109080915f, 0.0163617316f, 0.0218148850f, 0.0272673895f,
+ 0.0327190828f, 0.0381698028f, 0.0436193874f, 0.0490676743f, 0.0545145016f, 0.0599597073f,
+ 0.0654031292f, 0.0708446056f, 0.0762839745f, 0.0817210741f, 0.0871557427f, 0.0925878187f,
+ 0.0980171403f, 0.1034435462f, 0.1088668749f, 0.1142869650f, 0.1197036553f, 0.1251167847f,
+ 0.1305261922f, 0.1359317169f, 0.1413331978f, 0.1467304745f, 0.1521233862f, 0.1575117726f,
+ 0.1628954734f, 0.1682743284f, 0.1736481777f, 0.1790168613f, 0.1843802195f, 0.1897380929f,
+ 0.1950903220f, 0.2004367476f, 0.2057772107f, 0.2111115524f, 0.2164396139f, 0.2217612369f,
+ 0.2270762630f, 0.2323845341f, 0.2376858923f, 0.2429801799f, 0.2482672394f, 0.2535469135f,
+ 0.2588190451f, 0.2640834775f, 0.2693400540f, 0.2745886182f, 0.2798290140f, 0.2850610856f,
+ 0.2902846773f, 0.2954996336f, 0.3007057995f, 0.3059030201f, 0.3110911408f, 0.3162700072f,
+ 0.3214394653f, 0.3265993613f, 0.3317495418f, 0.3368898534f, 0.3420201433f, 0.3471402589f,
+ 0.3522500479f, 0.3573493583f, 0.3624380383f, 0.3675159366f, 0.3725829021f, 0.3776387842f,
+ 0.3826834324f, 0.3877166966f, 0.3927384271f, 0.3977484745f, 0.4027466899f, 0.4077329244f,
+ 0.4127070298f, 0.4176688581f, 0.4226182617f, 0.4275550934f, 0.4324792063f, 0.4373904540f,
+ 0.4422886902f, 0.4471737694f, 0.4520455462f, 0.4569038756f, 0.4617486132f, 0.4665796149f,
+ 0.4713967368f, 0.4761998358f, 0.4809887689f, 0.4857633937f, 0.4905235682f, 0.4952691506f,
+ 0.5000000000f, 0.5047159755f, 0.5094169368f, 0.5141027442f, 0.5187732582f, 0.5234283398f,
+ 0.5280678507f, 0.5326916527f, 0.5372996083f, 0.5418915806f, 0.5464674328f, 0.5510270288f,
+ 0.5555702330f, 0.5600969103f, 0.5646069260f, 0.5691001459f, 0.5735764364f, 0.5780356642f,
+ 0.5824776969f, 0.5869024021f, 0.5913096484f, 0.5956993045f, 0.6000712399f, 0.6044253246f,
+ 0.6087614290f, 0.6130794241f, 0.6173791816f, 0.6216605734f, 0.6259234722f, 0.6301677512f,
+ 0.6343932842f, 0.6385999454f, 0.6427876097f, 0.6469561525f, 0.6511054499f, 0.6552353784f,
+ 0.6593458151f, 0.6634366378f, 0.6675077247f, 0.6715589548f, 0.6755902076f, 0.6796013631f,
+ 0.6835923020f, 0.6875629056f, 0.6915130558f, 0.6954426350f, 0.6993515264f, 0.7032396137f,
+ 0.7071067812f, 0.7109529139f, 0.7147778973f, 0.7185816178f, 0.7223639621f, 0.7261248177f,
+ 0.7298640727f, 0.7335816159f, 0.7372773368f, 0.7409511254f, 0.7446028723f, 0.7482324690f,
+ 0.7518398075f, 0.7554247804f, 0.7589872812f, 0.7625272039f, 0.7660444431f, 0.7695388943f,
+ 0.7730104534f, 0.7764590172f, 0.7798844831f, 0.7832867492f, 0.7866657144f, 0.7900212780f,
+ 0.7933533403f, 0.7966618021f, 0.7999465651f, 0.8032075315f, 0.8064446043f, 0.8096576872f,
+ 0.8128466846f, 0.8160115017f, 0.8191520443f, 0.8222682190f, 0.8253599331f, 0.8284270946f,
+ 0.8314696123f, 0.8344873957f, 0.8374803550f, 0.8404484011f, 0.8433914458f, 0.8463094016f,
+ 0.8492021815f, 0.8520696997f, 0.8549118707f, 0.8577286100f, 0.8605198339f, 0.8632854592f,
+ 0.8660254038f, 0.8687395861f, 0.8714279254f, 0.8740903416f, 0.8767267557f, 0.8793370892f,
+ 0.8819212643f, 0.8844792044f, 0.8870108332f, 0.8895160754f, 0.8919948566f, 0.8944471029f,
+ 0.8968727415f, 0.8992717002f, 0.9016439076f, 0.9039892931f, 0.9063077870f, 0.9085993204f,
+ 0.9108638249f, 0.9131012334f, 0.9153114791f, 0.9174944964f, 0.9196502204f, 0.9217785869f,
+ 0.9238795325f, 0.9259529948f, 0.9279989122f, 0.9300172237f, 0.9320078693f, 0.9339707898f,
+ 0.9359059268f, 0.9378132227f, 0.9396926208f, 0.9415440652f, 0.9433675008f, 0.9451628734f,
+ 0.9469301295f, 0.9486692166f, 0.9503800830f, 0.9520626777f, 0.9537169507f, 0.9553428529f,
+ 0.9569403357f, 0.9585093518f, 0.9600498544f, 0.9615617977f, 0.9630451367f, 0.9644998273f,
+ 0.9659258263f, 0.9673230912f, 0.9686915804f, 0.9700312532f, 0.9713420698f, 0.9726239912f,
+ 0.9738769793f, 0.9751009967f, 0.9762960071f, 0.9774619749f, 0.9785988655f, 0.9797066450f,
+ 0.9807852804f, 0.9818347397f, 0.9828549917f, 0.9838460059f, 0.9848077530f, 0.9857402043f,
+ 0.9866433321f, 0.9875171095f, 0.9883615105f, 0.9891765100f, 0.9899620837f, 0.9907182083f,
+ 0.9914448614f, 0.9921420212f, 0.9928096670f, 0.9934477790f, 0.9940563382f, 0.9946353265f,
+ 0.9951847267f, 0.9957045224f, 0.9961946981f, 0.9966552393f, 0.9970861323f, 0.9974873643f,
+ 0.9978589232f, 0.9982007982f, 0.9985129789f, 0.9987954562f, 0.9990482216f, 0.9992712676f,
+ 0.9994645875f, 0.9996281756f, 0.9997620271f, 0.9998661379f, 0.9999405050f, 0.9999851261f,
+ 1.0000000000f, 0.9999851261f, 0.9999405050f, 0.9998661379f, 0.9997620271f, 0.9996281756f,
+ 0.9994645875f, 0.9992712676f, 0.9990482216f, 0.9987954562f, 0.9985129789f, 0.9982007982f,
+ 0.9978589232f, 0.9974873643f, 0.9970861323f, 0.9966552393f, 0.9961946981f, 0.9957045224f,
+ 0.9951847267f, 0.9946353265f, 0.9940563382f, 0.9934477790f, 0.9928096670f, 0.9921420212f,
+ 0.9914448614f, 0.9907182083f, 0.9899620837f, 0.9891765100f, 0.9883615105f, 0.9875171095f,
+ 0.9866433321f, 0.9857402043f, 0.9848077530f, 0.9838460059f, 0.9828549917f, 0.9818347397f,
+ 0.9807852804f, 0.9797066450f, 0.9785988655f, 0.9774619749f, 0.9762960071f, 0.9751009967f,
+ 0.9738769793f, 0.9726239912f, 0.9713420698f, 0.9700312532f, 0.9686915804f, 0.9673230912f,
+ 0.9659258263f, 0.9644998273f, 0.9630451367f, 0.9615617977f, 0.9600498544f, 0.9585093518f,
+ 0.9569403357f, 0.9553428529f, 0.9537169507f, 0.9520626777f, 0.9503800830f, 0.9486692166f,
+ 0.9469301295f, 0.9451628734f, 0.9433675008f, 0.9415440652f, 0.9396926208f, 0.9378132227f,
+ 0.9359059268f, 0.9339707898f, 0.9320078693f, 0.9300172237f, 0.9279989122f, 0.9259529948f,
+ 0.9238795325f, 0.9217785869f, 0.9196502204f, 0.9174944964f, 0.9153114791f, 0.9131012334f,
+ 0.9108638249f, 0.9085993204f, 0.9063077870f, 0.9039892931f, 0.9016439076f, 0.8992717002f,
+ 0.8968727415f, 0.8944471029f, 0.8919948566f, 0.8895160754f, 0.8870108332f, 0.8844792044f,
+ 0.8819212643f, 0.8793370892f, 0.8767267557f, 0.8740903416f, 0.8714279254f, 0.8687395861f,
+ 0.8660254038f, 0.8632854592f, 0.8605198339f, 0.8577286100f, 0.8549118707f, 0.8520696997f,
+ 0.8492021815f, 0.8463094016f, 0.8433914458f, 0.8404484011f, 0.8374803550f, 0.8344873957f,
+ 0.8314696123f, 0.8284270946f, 0.8253599331f, 0.8222682190f, 0.8191520443f, 0.8160115017f,
+ 0.8128466846f, 0.8096576872f, 0.8064446043f, 0.8032075315f, 0.7999465651f, 0.7966618021f,
+ 0.7933533403f, 0.7900212780f, 0.7866657144f, 0.7832867492f, 0.7798844831f, 0.7764590172f,
+ 0.7730104534f, 0.7695388943f, 0.7660444431f, 0.7625272039f, 0.7589872812f, 0.7554247804f,
+ 0.7518398075f, 0.7482324690f, 0.7446028723f, 0.7409511254f, 0.7372773368f, 0.7335816159f,
+ 0.7298640727f, 0.7261248177f, 0.7223639621f, 0.7185816178f, 0.7147778973f, 0.7109529139f,
+ 0.7071067812f, 0.7032396137f, 0.6993515264f, 0.6954426350f, 0.6915130558f, 0.6875629056f,
+ 0.6835923020f, 0.6796013631f, 0.6755902076f, 0.6715589548f, 0.6675077247f, 0.6634366378f,
+ 0.6593458151f, 0.6552353784f, 0.6511054499f, 0.6469561525f, 0.6427876097f, 0.6385999454f,
+ 0.6343932842f, 0.6301677512f, 0.6259234722f, 0.6216605734f, 0.6173791816f, 0.6130794241f,
+ 0.6087614290f, 0.6044253246f, 0.6000712399f, 0.5956993045f, 0.5913096484f, 0.5869024021f,
+ 0.5824776969f, 0.5780356642f, 0.5735764364f, 0.5691001459f, 0.5646069260f, 0.5600969103f,
+ 0.5555702330f, 0.5510270288f, 0.5464674328f, 0.5418915806f, 0.5372996083f, 0.5326916527f,
+ 0.5280678507f, 0.5234283398f, 0.5187732582f, 0.5141027442f, 0.5094169368f, 0.5047159755f,
+ 0.5000000000f, 0.4952691506f, 0.4905235682f, 0.4857633937f, 0.4809887689f, 0.4761998358f,
+ 0.4713967368f, 0.4665796149f, 0.4617486132f, 0.4569038756f, 0.4520455462f, 0.4471737694f,
+ 0.4422886902f, 0.4373904540f, 0.4324792063f, 0.4275550934f, 0.4226182617f, 0.4176688581f,
+ 0.4127070298f, 0.4077329244f, 0.4027466899f, 0.3977484745f, 0.3927384271f, 0.3877166966f,
+ 0.3826834324f, 0.3776387842f, 0.3725829021f, 0.3675159366f, 0.3624380383f, 0.3573493583f,
+ 0.3522500479f, 0.3471402589f, 0.3420201433f, 0.3368898534f, 0.3317495418f, 0.3265993613f,
+ 0.3214394653f, 0.3162700072f, 0.3110911408f, 0.3059030201f, 0.3007057995f, 0.2954996336f,
+ 0.2902846773f, 0.2850610856f, 0.2798290140f, 0.2745886182f, 0.2693400540f, 0.2640834775f,
+ 0.2588190451f, 0.2535469135f, 0.2482672394f, 0.2429801799f, 0.2376858923f, 0.2323845341f,
+ 0.2270762630f, 0.2217612369f, 0.2164396139f, 0.2111115524f, 0.2057772107f, 0.2004367476f,
+ 0.1950903220f, 0.1897380929f, 0.1843802195f, 0.1790168613f, 0.1736481777f, 0.1682743284f,
+ 0.1628954734f, 0.1575117726f, 0.1521233862f, 0.1467304745f, 0.1413331978f, 0.1359317169f,
+ 0.1305261922f, 0.1251167847f, 0.1197036553f, 0.1142869650f, 0.1088668749f, 0.1034435462f,
+ 0.0980171403f, 0.0925878187f, 0.0871557427f, 0.0817210741f, 0.0762839745f, 0.0708446056f,
+ 0.0654031292f, 0.0599597073f, 0.0545145016f, 0.0490676743f, 0.0436193874f, 0.0381698028f,
+ 0.0327190828f, 0.0272673895f, 0.0218148850f, 0.0163617316f, 0.0109080915f, 0.0054541269f,
+};
+
+const FLOAT32 ixheaacd_sine_pi_by_2_N[] = {
+ 0.0015339802f, 0.9999988235f,
+ 0.0016362454f, 0.9999986613f,
+ 0.0017531200f, 0.9999984633f,
+ 0.0018879752f, 0.9999982178f,
+ 0.0020453063f, 0.9999979084f,
+ 0.0022312429f, 0.9999975108f,
+ 0.0024543668f, 0.9999969880f,
+ 0.0027270736f, 0.9999962815f,
+ 0.0049087188f, 0.9999879522f
+};
+
+const FLOAT32 ixheaacd_sin_cos_448[] = {
+ 0.014025f, 0.999902f, 0.028046f, 0.999607f, 0.042062f, 0.999115f, 0.056070f, 0.998427f,
+ 0.070067f, 0.997542f, 0.084051f, 0.996462f, 0.098017f, 0.995185f, 0.111964f, 0.993712f,
+ 0.125890f, 0.992044f, 0.139790f, 0.990181f, 0.153663f, 0.988123f, 0.167506f, 0.985871f,
+ 0.181316f, 0.983425f, 0.195090f, 0.980785f, 0.208826f, 0.977953f, 0.222521f, 0.974928f,
+ 0.236172f, 0.971711f, 0.249776f, 0.968304f, 0.263332f, 0.964705f, 0.276836f, 0.960917f,
+ 0.290285f, 0.956940f, 0.303677f, 0.952775f, 0.317009f, 0.948422f, 0.330279f, 0.943883f,
+ 0.343484f, 0.939158f, 0.356622f, 0.934249f, 0.369689f, 0.929156f, 0.382683f, 0.923880f,
+ 0.395603f, 0.918422f, 0.408444f, 0.912783f, 0.421205f, 0.906965f, 0.433884f, 0.900969f,
+ 0.446477f, 0.894795f, 0.458982f, 0.888446f, 0.471397f, 0.881921f, 0.483719f, 0.875223f,
+ 0.495946f, 0.868353f, 0.508075f, 0.861313f, 0.520105f, 0.854102f, 0.532032f, 0.846724f,
+ 0.543855f, 0.839179f, 0.555570f, 0.831470f, 0.567177f, 0.823596f, 0.578671f, 0.815561f,
+ 0.590052f, 0.807365f, 0.601317f, 0.799010f, 0.612464f, 0.790499f, 0.623490f, 0.781832f,
+ 0.634393f, 0.773010f, 0.645172f, 0.764037f, 0.655824f, 0.754914f, 0.666347f, 0.745642f,
+ 0.676738f, 0.736224f, 0.686997f, 0.726660f, 0.697120f, 0.716954f, 0.707107f, 0.707107f,
+ 0.716954f, 0.697120f, 0.726660f, 0.686997f, 0.736224f, 0.676738f, 0.745642f, 0.666347f,
+ 0.754914f, 0.655824f, 0.764037f, 0.645172f, 0.773010f, 0.634393f, 0.781832f, 0.623490f,
+ 0.790499f, 0.612464f, 0.799010f, 0.601317f, 0.807365f, 0.590052f, 0.815561f, 0.578671f,
+ 0.823596f, 0.567177f, 0.831470f, 0.555570f, 0.839179f, 0.543855f, 0.846724f, 0.532032f,
+ 0.854102f, 0.520105f, 0.861313f, 0.508075f, 0.868353f, 0.495946f, 0.875223f, 0.483719f,
+ 0.881921f, 0.471397f, 0.888446f, 0.458982f, 0.894795f, 0.446477f, 0.900969f, 0.433884f,
+ 0.906965f, 0.421205f, 0.912783f, 0.408444f, 0.918422f, 0.395603f, 0.923880f, 0.382683f,
+ 0.929156f, 0.369689f, 0.934249f, 0.356622f, 0.939158f, 0.343484f, 0.943883f, 0.330279f,
+ 0.948422f, 0.317009f, 0.952775f, 0.303677f, 0.956940f, 0.290285f, 0.960917f, 0.276836f,
+ 0.964705f, 0.263332f, 0.968304f, 0.249776f, 0.971711f, 0.236172f, 0.974928f, 0.222521f,
+ 0.977953f, 0.208826f, 0.980785f, 0.195090f, 0.983425f, 0.181316f, 0.985871f, 0.167506f,
+ 0.988123f, 0.153663f, 0.990181f, 0.139790f, 0.992044f, 0.125890f, 0.993712f, 0.111964f,
+ 0.995185f, 0.098017f, 0.996462f, 0.084051f, 0.997542f, 0.070067f, 0.998427f, 0.056070f,
+ 0.999115f, 0.042062f, 0.999607f, 0.028046f, 0.999902f, 0.014025f, 1.000000f, 0.000000f};
+
+const FLOAT32 ixheaacd_sin_cos_672[] = {
+ 0.009350f, 0.999956f, 0.018699f, 0.999825f, 0.028046f,
+ 0.999607f, 0.037391f, 0.999301f, 0.046733f, 0.998907f,
+ 0.056070f, 0.998427f, 0.065403f, 0.997859f, 0.074730f,
+ 0.997204f, 0.084051f, 0.996462f, 0.093364f, 0.995632f,
+ 0.102669f, 0.994716f, 0.111964f, 0.993712f, 0.121251f,
+ 0.992622f, 0.130526f, 0.991445f, 0.139790f, 0.990181f,
+ 0.149042f, 0.988831f, 0.158281f, 0.987394f, 0.167506f,
+ 0.985871f, 0.176717f, 0.984262f, 0.185912f, 0.982566f,
+ 0.195090f, 0.980785f, 0.204252f, 0.978918f, 0.213396f,
+ 0.976966f, 0.222521f, 0.974928f, 0.231627f, 0.972805f,
+ 0.240712f, 0.970597f, 0.249776f, 0.968304f, 0.258819f,
+ 0.965926f, 0.267839f, 0.963464f, 0.276836f, 0.960917f,
+ 0.285808f, 0.958287f, 0.294755f, 0.955573f, 0.303677f,
+ 0.952775f, 0.312572f, 0.949894f, 0.321439f, 0.946930f,
+ 0.330279f, 0.943883f, 0.339090f, 0.940754f, 0.347871f,
+ 0.937542f, 0.356622f, 0.934249f, 0.365341f, 0.930874f,
+ 0.374029f, 0.927417f, 0.382683f, 0.923880f, 0.391305f,
+ 0.920261f, 0.399892f, 0.916562f, 0.408444f, 0.912783f,
+ 0.416961f, 0.908924f, 0.425441f, 0.904986f, 0.433884f,
+ 0.900969f, 0.442289f, 0.896873f, 0.450655f, 0.892698f,
+ 0.458982f, 0.888446f, 0.467269f, 0.884115f, 0.475515f,
+ 0.879708f, 0.483719f, 0.875223f, 0.491881f, 0.870662f,
+ 0.500000f, 0.866025f, 0.508075f, 0.861313f, 0.516106f,
+ 0.856525f, 0.524092f, 0.851662f, 0.532032f, 0.846724f,
+ 0.539926f, 0.841713f, 0.547772f, 0.836628f, 0.555570f,
+ 0.831470f, 0.563320f, 0.826239f, 0.571021f, 0.820936f,
+ 0.578671f, 0.815561f, 0.586271f, 0.810115f, 0.593820f,
+ 0.804598f, 0.601317f, 0.799010f, 0.608761f, 0.793353f,
+ 0.616153f, 0.787627f, 0.623490f, 0.781832f, 0.630773f,
+ 0.775968f, 0.638000f, 0.770036f, 0.645172f, 0.764037f,
+ 0.652287f, 0.757972f, 0.659346f, 0.751840f, 0.666347f,
+ 0.745642f, 0.673289f, 0.739379f, 0.680173f, 0.733052f,
+ 0.686997f, 0.726660f, 0.693761f, 0.720205f, 0.700465f,
+ 0.713687f, 0.707107f, 0.707107f, 0.713687f, 0.700465f,
+ 0.720205f, 0.693761f, 0.726660f, 0.686997f, 0.733052f,
+ 0.680173f, 0.739379f, 0.673289f, 0.745642f, 0.666347f,
+ 0.751840f, 0.659346f, 0.757972f, 0.652287f, 0.764037f,
+ 0.645172f, 0.770036f, 0.638000f, 0.775968f, 0.630773f,
+ 0.781832f, 0.623490f, 0.787627f, 0.616153f, 0.793353f,
+ 0.608761f, 0.799010f, 0.601317f, 0.804598f, 0.593820f,
+ 0.810115f, 0.586271f, 0.815561f, 0.578671f, 0.820936f,
+ 0.571021f, 0.826239f, 0.563320f, 0.831470f, 0.555570f,
+ 0.836628f, 0.547772f, 0.841713f, 0.539926f, 0.846724f,
+ 0.532032f, 0.851662f, 0.524092f, 0.856525f, 0.516106f,
+ 0.861313f, 0.508075f, 0.866025f, 0.500000f, 0.870662f,
+ 0.491881f, 0.875223f, 0.483719f, 0.879708f, 0.475515f,
+ 0.884115f, 0.467269f, 0.888446f, 0.458982f, 0.892698f,
+ 0.450655f, 0.896873f, 0.442289f, 0.900969f, 0.433884f,
+ 0.904986f, 0.425441f, 0.908924f, 0.416961f, 0.912783f,
+ 0.408444f, 0.916562f, 0.399892f, 0.920261f, 0.391305f,
+ 0.923880f, 0.382683f, 0.927417f, 0.374029f, 0.930874f,
+ 0.365341f, 0.934249f, 0.356622f, 0.937542f, 0.347871f,
+ 0.940754f, 0.339090f, 0.943883f, 0.330279f, 0.946930f,
+ 0.321439f, 0.949894f, 0.312572f, 0.952775f, 0.303677f,
+ 0.955573f, 0.294755f, 0.958287f, 0.285808f, 0.960917f,
+ 0.276836f, 0.963464f, 0.267839f, 0.965926f, 0.258819f,
+ 0.968304f, 0.249776f, 0.970597f, 0.240712f, 0.972805f,
+ 0.231627f, 0.974928f, 0.222521f, 0.976966f, 0.213396f,
+ 0.978918f, 0.204252f, 0.980785f, 0.195090f, 0.982566f,
+ 0.185912f, 0.984262f, 0.176717f, 0.985871f, 0.167506f,
+ 0.987394f, 0.158281f, 0.988831f, 0.149042f, 0.990181f,
+ 0.139790f, 0.991445f, 0.130526f, 0.992622f, 0.121251f,
+ 0.993712f, 0.111964f, 0.994716f, 0.102669f, 0.995632f,
+ 0.093364f, 0.996462f, 0.084051f, 0.997204f, 0.074730f,
+ 0.997859f, 0.065403f, 0.998427f, 0.056070f, 0.998907f,
+ 0.046733f, 0.999301f, 0.037391f, 0.999607f, 0.028046f,
+ 0.999825f, 0.018699f, 0.999956f, 0.009350f, 1.000000f,
+ 0.000000f};
+
+const FLOAT32 ixheaacd_sin_cos_512[] = {
+ 0.012272f, 0.999925f, 0.024541f, 0.999699f, 0.036807f, 0.999322f, 0.049068f, 0.998795f,
+ 0.061321f, 0.998118f, 0.073565f, 0.997290f, 0.085797f, 0.996313f, 0.098017f, 0.995185f,
+ 0.110222f, 0.993907f, 0.122411f, 0.992480f, 0.134581f, 0.990903f, 0.146730f, 0.989177f,
+ 0.158858f, 0.987301f, 0.170962f, 0.985278f, 0.183040f, 0.983105f, 0.195090f, 0.980785f,
+ 0.207111f, 0.978317f, 0.219101f, 0.975702f, 0.231058f, 0.972940f, 0.242980f, 0.970031f,
+ 0.254866f, 0.966976f, 0.266713f, 0.963776f, 0.278520f, 0.960431f, 0.290285f, 0.956940f,
+ 0.302006f, 0.953306f, 0.313682f, 0.949528f, 0.325310f, 0.945607f, 0.336890f, 0.941544f,
+ 0.348419f, 0.937339f, 0.359895f, 0.932993f, 0.371317f, 0.928506f, 0.382683f, 0.923880f,
+ 0.393992f, 0.919114f, 0.405241f, 0.914210f, 0.416430f, 0.909168f, 0.427555f, 0.903989f,
+ 0.438616f, 0.898674f, 0.449611f, 0.893224f, 0.460539f, 0.887640f, 0.471397f, 0.881921f,
+ 0.482184f, 0.876070f, 0.492898f, 0.870087f, 0.503538f, 0.863973f, 0.514103f, 0.857729f,
+ 0.524590f, 0.851355f, 0.534998f, 0.844854f, 0.545325f, 0.838225f, 0.555570f, 0.831470f,
+ 0.565732f, 0.824589f, 0.575808f, 0.817585f, 0.585798f, 0.810457f, 0.595699f, 0.803208f,
+ 0.605511f, 0.795837f, 0.615232f, 0.788346f, 0.624860f, 0.780737f, 0.634393f, 0.773010f,
+ 0.643832f, 0.765167f, 0.653173f, 0.757209f, 0.662416f, 0.749136f, 0.671559f, 0.740951f,
+ 0.680601f, 0.732654f, 0.689541f, 0.724247f, 0.698376f, 0.715731f, 0.707107f, 0.707107f,
+ 0.715731f, 0.698376f, 0.724247f, 0.689541f, 0.732654f, 0.680601f, 0.740951f, 0.671559f,
+ 0.749136f, 0.662416f, 0.757209f, 0.653173f, 0.765167f, 0.643832f, 0.773010f, 0.634393f,
+ 0.780737f, 0.624860f, 0.788346f, 0.615232f, 0.795837f, 0.605511f, 0.803208f, 0.595699f,
+ 0.810457f, 0.585798f, 0.817585f, 0.575808f, 0.824589f, 0.565732f, 0.831470f, 0.555570f,
+ 0.838225f, 0.545325f, 0.844854f, 0.534998f, 0.851355f, 0.524590f, 0.857729f, 0.514103f,
+ 0.863973f, 0.503538f, 0.870087f, 0.492898f, 0.876070f, 0.482184f, 0.881921f, 0.471397f,
+ 0.887640f, 0.460539f, 0.893224f, 0.449611f, 0.898674f, 0.438616f, 0.903989f, 0.427555f,
+ 0.909168f, 0.416430f, 0.914210f, 0.405241f, 0.919114f, 0.393992f, 0.923880f, 0.382683f,
+ 0.928506f, 0.371317f, 0.932993f, 0.359895f, 0.937339f, 0.348419f, 0.941544f, 0.336890f,
+ 0.945607f, 0.325310f, 0.949528f, 0.313682f, 0.953306f, 0.302006f, 0.956940f, 0.290285f,
+ 0.960431f, 0.278520f, 0.963776f, 0.266713f, 0.966976f, 0.254866f, 0.970031f, 0.242980f,
+ 0.972940f, 0.231058f, 0.975702f, 0.219101f, 0.978317f, 0.207111f, 0.980785f, 0.195090f,
+ 0.983105f, 0.183040f, 0.985278f, 0.170962f, 0.987301f, 0.158858f, 0.989177f, 0.146730f,
+ 0.990903f, 0.134581f, 0.992480f, 0.122411f, 0.993907f, 0.110222f, 0.995185f, 0.098017f,
+ 0.996313f, 0.085797f, 0.997290f, 0.073565f, 0.998118f, 0.061321f, 0.998795f, 0.049068f,
+ 0.999322f, 0.036807f, 0.999699f, 0.024541f, 0.999925f, 0.012272f, 1.000000f, 0.000000f,
+ 0.014025f, 0.999902f, 0.028046f, 0.999607f, 0.042062f, 0.999115f, 0.056070f, 0.998427f,
+ 0.070067f, 0.997542f, 0.084051f, 0.996462f, 0.098017f, 0.995185f, 0.111964f, 0.993712f,
+ 0.125890f, 0.992044f, 0.139790f, 0.990181f, 0.153663f, 0.988123f, 0.167506f, 0.985871f,
+ 0.181316f, 0.983425f, 0.195090f, 0.980785f, 0.208826f, 0.977953f, 0.222521f, 0.974928f,
+ 0.236172f, 0.971711f, 0.249776f, 0.968304f, 0.263332f, 0.964705f, 0.276836f, 0.960917f,
+ 0.290285f, 0.956940f, 0.303677f, 0.952775f, 0.317009f, 0.948422f, 0.330279f, 0.943883f,
+ 0.343484f, 0.939158f, 0.356622f, 0.934249f, 0.369689f, 0.929156f, 0.382683f, 0.923880f,
+ 0.395603f, 0.918422f, 0.408444f, 0.912783f, 0.421205f, 0.906965f, 0.433884f, 0.900969f,
+ 0.446477f, 0.894795f, 0.458982f, 0.888446f, 0.471397f, 0.881921f, 0.483719f, 0.875223f,
+ 0.495946f, 0.868353f, 0.508075f, 0.861313f, 0.520105f, 0.854102f, 0.532032f, 0.846724f,
+ 0.543855f, 0.839179f, 0.555570f, 0.831470f, 0.567177f, 0.823596f, 0.578671f, 0.815561f,
+ 0.590052f, 0.807365f, 0.601317f, 0.799010f, 0.612464f, 0.790499f, 0.623490f, 0.781832f,
+ 0.634393f, 0.773010f, 0.645172f, 0.764037f, 0.655824f, 0.754914f, 0.666347f, 0.745642f,
+ 0.676738f, 0.736224f, 0.686997f, 0.726660f, 0.697120f, 0.716954f, 0.707107f, 0.707107f,
+ 0.716954f, 0.697120f, 0.726660f, 0.686997f, 0.736224f, 0.676738f, 0.745642f, 0.666347f,
+ 0.754914f, 0.655824f, 0.764037f, 0.645172f, 0.773010f, 0.634393f, 0.781832f, 0.623490f,
+ 0.790499f, 0.612464f, 0.799010f, 0.601317f, 0.807365f, 0.590052f, 0.815561f, 0.578671f,
+ 0.823596f, 0.567177f, 0.831470f, 0.555570f, 0.839179f, 0.543855f, 0.846724f, 0.532032f,
+ 0.854102f, 0.520105f, 0.861313f, 0.508075f, 0.868353f, 0.495946f, 0.875223f, 0.483719f,
+ 0.881921f, 0.471397f, 0.888446f, 0.458982f, 0.894795f, 0.446477f, 0.900969f, 0.433884f,
+ 0.906965f, 0.421205f, 0.912783f, 0.408444f, 0.918422f, 0.395603f, 0.923880f, 0.382683f,
+ 0.929156f, 0.369689f, 0.934249f, 0.356622f, 0.939158f, 0.343484f, 0.943883f, 0.330279f,
+ 0.948422f, 0.317009f, 0.952775f, 0.303677f, 0.956940f, 0.290285f, 0.960917f, 0.276836f,
+ 0.964705f, 0.263332f, 0.968304f, 0.249776f, 0.971711f, 0.236172f, 0.974928f, 0.222521f,
+ 0.977953f, 0.208826f, 0.980785f, 0.195090f, 0.983425f, 0.181316f, 0.985871f, 0.167506f,
+ 0.988123f, 0.153663f, 0.990181f, 0.139790f, 0.992044f, 0.125890f, 0.993712f, 0.111964f,
+ 0.995185f, 0.098017f, 0.996462f, 0.084051f, 0.997542f, 0.070067f, 0.998427f, 0.056070f,
+ 0.999115f, 0.042062f, 0.999607f, 0.028046f, 0.999902f, 0.014025f, 1.000000f, 0.000000f};
+
+const FLOAT32 ixheaacd_sin_cos_576[] = {
+ 0.010908f, 0.999941f, 0.021815f, 0.999762f, 0.032719f, 0.999465f, 0.043619f, 0.999048f,
+ 0.054515f, 0.998513f, 0.065403f, 0.997859f, 0.076284f, 0.997086f, 0.087156f, 0.996195f,
+ 0.098017f, 0.995185f, 0.108867f, 0.994056f, 0.119704f, 0.992810f, 0.130526f, 0.991445f,
+ 0.141333f, 0.989962f, 0.152123f, 0.988362f, 0.162895f, 0.986643f, 0.173648f, 0.984808f,
+ 0.184380f, 0.982855f, 0.195090f, 0.980785f, 0.205777f, 0.978599f, 0.216440f, 0.976296f,
+ 0.227076f, 0.973877f, 0.237686f, 0.971342f, 0.248267f, 0.968692f, 0.258819f, 0.965926f,
+ 0.269340f, 0.963045f, 0.279829f, 0.960050f, 0.290285f, 0.956940f, 0.300706f, 0.953717f,
+ 0.311091f, 0.950380f, 0.321439f, 0.946930f, 0.331750f, 0.943367f, 0.342020f, 0.939693f,
+ 0.352250f, 0.935906f, 0.362438f, 0.932008f, 0.372583f, 0.927999f, 0.382683f, 0.923880f,
+ 0.392738f, 0.919650f, 0.402747f, 0.915311f, 0.412707f, 0.910864f, 0.422618f, 0.906308f,
+ 0.432479f, 0.901644f, 0.442289f, 0.896873f, 0.452046f, 0.891995f, 0.461749f, 0.887011f,
+ 0.471397f, 0.881921f, 0.480989f, 0.876727f, 0.490524f, 0.871428f, 0.500000f, 0.866025f,
+ 0.509417f, 0.860520f, 0.518773f, 0.854912f, 0.528068f, 0.849202f, 0.537300f, 0.843391f,
+ 0.546467f, 0.837480f, 0.555570f, 0.831470f, 0.564607f, 0.825360f, 0.573576f, 0.819152f,
+ 0.582478f, 0.812847f, 0.591310f, 0.806445f, 0.600071f, 0.799947f, 0.608761f, 0.793353f,
+ 0.617379f, 0.786666f, 0.625923f, 0.779884f, 0.634393f, 0.773010f, 0.642788f, 0.766044f,
+ 0.651105f, 0.758987f, 0.659346f, 0.751840f, 0.667508f, 0.744603f, 0.675590f, 0.737277f,
+ 0.683592f, 0.729864f, 0.691513f, 0.722364f, 0.699352f, 0.714778f, 0.707107f, 0.707107f,
+ 0.714778f, 0.699352f, 0.722364f, 0.691513f, 0.729864f, 0.683592f, 0.737277f, 0.675590f,
+ 0.744603f, 0.667508f, 0.751840f, 0.659346f, 0.758987f, 0.651105f, 0.766044f, 0.642788f,
+ 0.773010f, 0.634393f, 0.779884f, 0.625923f, 0.786666f, 0.617379f, 0.793353f, 0.608761f,
+ 0.799947f, 0.600071f, 0.806445f, 0.591310f, 0.812847f, 0.582478f, 0.819152f, 0.573576f,
+ 0.825360f, 0.564607f, 0.831470f, 0.555570f, 0.837480f, 0.546467f, 0.843391f, 0.537300f,
+ 0.849202f, 0.528068f, 0.854912f, 0.518773f, 0.860520f, 0.509417f, 0.866025f, 0.500000f,
+ 0.871428f, 0.490524f, 0.876727f, 0.480989f, 0.881921f, 0.471397f, 0.887011f, 0.461749f,
+ 0.891995f, 0.452046f, 0.896873f, 0.442289f, 0.901644f, 0.432479f, 0.906308f, 0.422618f,
+ 0.910864f, 0.412707f, 0.915311f, 0.402747f, 0.919650f, 0.392738f, 0.923880f, 0.382683f,
+ 0.927999f, 0.372583f, 0.932008f, 0.362438f, 0.935906f, 0.352250f, 0.939693f, 0.342020f,
+ 0.943367f, 0.331750f, 0.946930f, 0.321439f, 0.950380f, 0.311091f, 0.953717f, 0.300706f,
+ 0.956940f, 0.290285f, 0.960050f, 0.279829f, 0.963045f, 0.269340f, 0.965926f, 0.258819f,
+ 0.968692f, 0.248267f, 0.971342f, 0.237686f, 0.973877f, 0.227076f, 0.976296f, 0.216440f,
+ 0.978599f, 0.205777f, 0.980785f, 0.195090f, 0.982855f, 0.184380f, 0.984808f, 0.173648f,
+ 0.986643f, 0.162895f, 0.988362f, 0.152123f, 0.989962f, 0.141333f, 0.991445f, 0.130526f,
+ 0.992810f, 0.119704f, 0.994056f, 0.108867f, 0.995185f, 0.098017f, 0.996195f, 0.087156f,
+ 0.997086f, 0.076284f, 0.997859f, 0.065403f, 0.998513f, 0.054515f, 0.999048f, 0.043619f,
+ 0.999465f, 0.032719f, 0.999762f, 0.021815f, 0.999941f, 0.010908f, 1.000000f, 0.000000f};
+
+const FLOAT32 ixheaacd_sin_cos_384[] = {
+ 0.016362f, 0.999866f, 0.032719f, 0.999465f, 0.049068f, 0.998795f,
+ 0.065403f, 0.997859f, 0.081721f, 0.996655f, 0.098017f, 0.995185f,
+ 0.114287f, 0.993448f, 0.130526f, 0.991445f, 0.146730f, 0.989177f,
+ 0.162895f, 0.986643f, 0.179017f, 0.983846f, 0.195090f, 0.980785f,
+ 0.211112f, 0.977462f, 0.227076f, 0.973877f, 0.242980f, 0.970031f,
+ 0.258819f, 0.965926f, 0.274589f, 0.961562f, 0.290285f, 0.956940f,
+ 0.305903f, 0.952063f, 0.321439f, 0.946930f, 0.336890f, 0.941544f,
+ 0.352250f, 0.935906f, 0.367516f, 0.930017f, 0.382683f, 0.923880f,
+ 0.397748f, 0.917494f, 0.412707f, 0.910864f, 0.427555f, 0.903989f,
+ 0.442289f, 0.896873f, 0.456904f, 0.889516f, 0.471397f, 0.881921f,
+ 0.485763f, 0.874090f, 0.500000f, 0.866025f, 0.514103f, 0.857729f,
+ 0.528068f, 0.849202f, 0.541892f, 0.840448f, 0.555570f, 0.831470f,
+ 0.569100f, 0.822268f, 0.582478f, 0.812847f, 0.595699f, 0.803208f,
+ 0.608761f, 0.793353f, 0.621661f, 0.783287f, 0.634393f, 0.773010f,
+ 0.646956f, 0.762527f, 0.659346f, 0.751840f, 0.671559f, 0.740951f,
+ 0.683592f, 0.729864f, 0.695443f, 0.718582f, 0.707107f, 0.707107f,
+ 0.718582f, 0.695443f, 0.729864f, 0.683592f, 0.740951f, 0.671559f,
+ 0.751840f, 0.659346f, 0.762527f, 0.646956f, 0.773010f, 0.634393f,
+ 0.783287f, 0.621661f, 0.793353f, 0.608761f, 0.803208f, 0.595699f,
+ 0.812847f, 0.582478f, 0.822268f, 0.569100f, 0.831470f, 0.555570f,
+ 0.840448f, 0.541892f, 0.849202f, 0.528068f, 0.857729f, 0.514103f,
+ 0.866025f, 0.500000f, 0.874090f, 0.485763f, 0.881921f, 0.471397f,
+ 0.889516f, 0.456904f, 0.896873f, 0.442289f, 0.903989f, 0.427555f,
+ 0.910864f, 0.412707f, 0.917494f, 0.397748f, 0.923880f, 0.382683f,
+ 0.930017f, 0.367516f, 0.935906f, 0.352250f, 0.941544f, 0.336890f,
+ 0.946930f, 0.321439f, 0.952063f, 0.305903f, 0.956940f, 0.290285f,
+ 0.961562f, 0.274589f, 0.965926f, 0.258819f, 0.970031f, 0.242980f,
+ 0.973877f, 0.227076f, 0.977462f, 0.211112f, 0.980785f, 0.195090f,
+ 0.983846f, 0.179017f, 0.986643f, 0.162895f, 0.989177f, 0.146730f,
+ 0.991445f, 0.130526f, 0.993448f, 0.114287f, 0.995185f, 0.098017f,
+ 0.996655f, 0.081721f, 0.997859f, 0.065403f, 0.998795f, 0.049068f,
+ 0.999465f, 0.032719f, 0.999866f, 0.016362f, 1.000000f, 0.000000f,
+ 0.012272f, 0.999925f, 0.024541f, 0.999699f, 0.036807f, 0.999322f,
+ 0.049068f, 0.998795f, 0.061321f, 0.998118f, 0.073565f, 0.997290f,
+ 0.085797f, 0.996313f, 0.098017f, 0.995185f, 0.110222f, 0.993907f,
+ 0.122411f, 0.992480f, 0.134581f, 0.990903f, 0.146730f, 0.989177f,
+ 0.158858f, 0.987301f, 0.170962f, 0.985278f, 0.183040f, 0.983105f,
+ 0.195090f, 0.980785f, 0.207111f, 0.978317f, 0.219101f, 0.975702f,
+ 0.231058f, 0.972940f, 0.242980f, 0.970031f, 0.254866f, 0.966976f,
+ 0.266713f, 0.963776f, 0.278520f, 0.960431f, 0.290285f, 0.956940f,
+ 0.302006f, 0.953306f, 0.313682f, 0.949528f, 0.325310f, 0.945607f,
+ 0.336890f, 0.941544f, 0.348419f, 0.937339f, 0.359895f, 0.932993f,
+ 0.371317f, 0.928506f, 0.382683f, 0.923880f, 0.393992f, 0.919114f,
+ 0.405241f, 0.914210f, 0.416430f, 0.909168f, 0.427555f, 0.903989f,
+ 0.438616f, 0.898674f, 0.449611f, 0.893224f, 0.460539f, 0.887640f,
+ 0.471397f, 0.881921f, 0.482184f, 0.876070f, 0.492898f, 0.870087f,
+ 0.503538f, 0.863973f, 0.514103f, 0.857729f, 0.524590f, 0.851355f,
+ 0.534998f, 0.844854f, 0.545325f, 0.838225f, 0.555570f, 0.831470f,
+ 0.565732f, 0.824589f, 0.575808f, 0.817585f, 0.585798f, 0.810457f,
+ 0.595699f, 0.803208f, 0.605511f, 0.795837f, 0.615232f, 0.788346f,
+ 0.624860f, 0.780737f, 0.634393f, 0.773010f, 0.643832f, 0.765167f,
+ 0.653173f, 0.757209f, 0.662416f, 0.749136f, 0.671559f, 0.740951f,
+ 0.680601f, 0.732654f, 0.689541f, 0.724247f, 0.698376f, 0.715731f,
+ 0.707107f, 0.707107f, 0.715731f, 0.698376f, 0.724247f, 0.689541f,
+ 0.732654f, 0.680601f, 0.740951f, 0.671559f, 0.749136f, 0.662416f,
+ 0.757209f, 0.653173f, 0.765167f, 0.643832f, 0.773010f, 0.634393f,
+ 0.780737f, 0.624860f, 0.788346f, 0.615232f, 0.795837f, 0.605511f,
+ 0.803208f, 0.595699f, 0.810457f, 0.585798f, 0.817585f, 0.575808f,
+ 0.824589f, 0.565732f, 0.831470f, 0.555570f, 0.838225f, 0.545325f,
+ 0.844854f, 0.534998f, 0.851355f, 0.524590f, 0.857729f, 0.514103f,
+ 0.863973f, 0.503538f, 0.870087f, 0.492898f, 0.876070f, 0.482184f,
+ 0.881921f, 0.471397f, 0.887640f, 0.460539f, 0.893224f, 0.449611f,
+ 0.898674f, 0.438616f, 0.903989f, 0.427555f, 0.909168f, 0.416430f,
+ 0.914210f, 0.405241f, 0.919114f, 0.393992f, 0.923880f, 0.382683f,
+ 0.928506f, 0.371317f, 0.932993f, 0.359895f, 0.937339f, 0.348419f,
+ 0.941544f, 0.336890f, 0.945607f, 0.325310f, 0.949528f, 0.313682f,
+ 0.953306f, 0.302006f, 0.956940f, 0.290285f, 0.960431f, 0.278520f,
+ 0.963776f, 0.266713f, 0.966976f, 0.254866f, 0.970031f, 0.242980f,
+ 0.972940f, 0.231058f, 0.975702f, 0.219101f, 0.978317f, 0.207111f,
+ 0.980785f, 0.195090f, 0.983105f, 0.183040f, 0.985278f, 0.170962f,
+ 0.987301f, 0.158858f, 0.989177f, 0.146730f, 0.990903f, 0.134581f,
+ 0.992480f, 0.122411f, 0.993907f, 0.110222f, 0.995185f, 0.098017f,
+ 0.996313f, 0.085797f, 0.997290f, 0.073565f, 0.998118f, 0.061321f,
+ 0.998795f, 0.049068f, 0.999322f, 0.036807f, 0.999699f, 0.024541f,
+ 0.999925f, 0.012272f, 1.000000f, 0.000000f
+
+};
+
+const FLOAT32 ixheaacd_sin_cos_768[] = {
+ 0.008181f, 0.999967f, 0.016362f, 0.999866f, 0.024541f, 0.999699f, 0.032719f, 0.999465f,
+ 0.040895f, 0.999163f, 0.049068f, 0.998795f, 0.057237f, 0.998361f, 0.065403f, 0.997859f,
+ 0.073565f, 0.997290f, 0.081721f, 0.996655f, 0.089872f, 0.995953f, 0.098017f, 0.995185f,
+ 0.106156f, 0.994350f, 0.114287f, 0.993448f, 0.122411f, 0.992480f, 0.130526f, 0.991445f,
+ 0.138633f, 0.990344f, 0.146730f, 0.989177f, 0.154818f, 0.987943f, 0.162895f, 0.986643f,
+ 0.170962f, 0.985278f, 0.179017f, 0.983846f, 0.187060f, 0.982349f, 0.195090f, 0.980785f,
+ 0.203108f, 0.979156f, 0.211112f, 0.977462f, 0.219101f, 0.975702f, 0.227076f, 0.973877f,
+ 0.235036f, 0.971987f, 0.242980f, 0.970031f, 0.250908f, 0.968011f, 0.258819f, 0.965926f,
+ 0.266713f, 0.963776f, 0.274589f, 0.961562f, 0.282446f, 0.959283f, 0.290285f, 0.956940f,
+ 0.298104f, 0.954533f, 0.305903f, 0.952063f, 0.313682f, 0.949528f, 0.321439f, 0.946930f,
+ 0.329176f, 0.944269f, 0.336890f, 0.941544f, 0.344581f, 0.938756f, 0.352250f, 0.935906f,
+ 0.359895f, 0.932993f, 0.367516f, 0.930017f, 0.375112f, 0.926979f, 0.382683f, 0.923880f,
+ 0.390229f, 0.920718f, 0.397748f, 0.917494f, 0.405241f, 0.914210f, 0.412707f, 0.910864f,
+ 0.420145f, 0.907457f, 0.427555f, 0.903989f, 0.434936f, 0.900461f, 0.442289f, 0.896873f,
+ 0.449611f, 0.893224f, 0.456904f, 0.889516f, 0.464166f, 0.885748f, 0.471397f, 0.881921f,
+ 0.478596f, 0.878035f, 0.485763f, 0.874090f, 0.492898f, 0.870087f, 0.500000f, 0.866025f,
+ 0.507068f, 0.861906f, 0.514103f, 0.857729f, 0.521103f, 0.853494f, 0.528068f, 0.849202f,
+ 0.534998f, 0.844854f, 0.541892f, 0.840448f, 0.548749f, 0.835987f, 0.555570f, 0.831470f,
+ 0.562354f, 0.826897f, 0.569100f, 0.822268f, 0.575808f, 0.817585f, 0.582478f, 0.812847f,
+ 0.589108f, 0.808054f, 0.595699f, 0.803208f, 0.602251f, 0.798307f, 0.608761f, 0.793353f,
+ 0.615232f, 0.788346f, 0.621661f, 0.783287f, 0.628048f, 0.778175f, 0.634393f, 0.773010f,
+ 0.640696f, 0.767795f, 0.646956f, 0.762527f, 0.653173f, 0.757209f, 0.659346f, 0.751840f,
+ 0.665475f, 0.746420f, 0.671559f, 0.740951f, 0.677598f, 0.735432f, 0.683592f, 0.729864f,
+ 0.689541f, 0.724247f, 0.695443f, 0.718582f, 0.701298f, 0.712868f, 0.707107f, 0.707107f,
+ 0.712868f, 0.701298f, 0.718582f, 0.695443f, 0.724247f, 0.689541f, 0.729864f, 0.683592f,
+ 0.735432f, 0.677598f, 0.740951f, 0.671559f, 0.746420f, 0.665475f, 0.751840f, 0.659346f,
+ 0.757209f, 0.653173f, 0.762527f, 0.646956f, 0.767795f, 0.640696f, 0.773010f, 0.634393f,
+ 0.778175f, 0.628048f, 0.783287f, 0.621661f, 0.788346f, 0.615232f, 0.793353f, 0.608761f,
+ 0.798307f, 0.602251f, 0.803208f, 0.595699f, 0.808054f, 0.589108f, 0.812847f, 0.582478f,
+ 0.817585f, 0.575808f, 0.822268f, 0.569100f, 0.826897f, 0.562354f, 0.831470f, 0.555570f,
+ 0.835987f, 0.548749f, 0.840448f, 0.541892f, 0.844854f, 0.534998f, 0.849202f, 0.528068f,
+ 0.853494f, 0.521103f, 0.857729f, 0.514103f, 0.861906f, 0.507068f, 0.866025f, 0.500000f,
+ 0.870087f, 0.492898f, 0.874090f, 0.485763f, 0.878035f, 0.478596f, 0.881921f, 0.471397f,
+ 0.885748f, 0.464166f, 0.889516f, 0.456904f, 0.893224f, 0.449611f, 0.896873f, 0.442289f,
+ 0.900461f, 0.434936f, 0.903989f, 0.427555f, 0.907457f, 0.420145f, 0.910864f, 0.412707f,
+ 0.914210f, 0.405241f, 0.917494f, 0.397748f, 0.920718f, 0.390229f, 0.923880f, 0.382683f,
+ 0.926979f, 0.375112f, 0.930017f, 0.367516f, 0.932993f, 0.359895f, 0.935906f, 0.352250f,
+ 0.938756f, 0.344581f, 0.941544f, 0.336890f, 0.944269f, 0.329176f, 0.946930f, 0.321439f,
+ 0.949528f, 0.313682f, 0.952063f, 0.305903f, 0.954533f, 0.298104f, 0.956940f, 0.290285f,
+ 0.959283f, 0.282446f, 0.961562f, 0.274589f, 0.963776f, 0.266713f, 0.965926f, 0.258819f,
+ 0.968011f, 0.250908f, 0.970031f, 0.242980f, 0.971987f, 0.235036f, 0.973877f, 0.227076f,
+ 0.975702f, 0.219101f, 0.977462f, 0.211112f, 0.979156f, 0.203108f, 0.980785f, 0.195090f,
+ 0.982349f, 0.187060f, 0.983846f, 0.179017f, 0.985278f, 0.170962f, 0.986643f, 0.162895f,
+ 0.987943f, 0.154818f, 0.989177f, 0.146730f, 0.990344f, 0.138633f, 0.991445f, 0.130526f,
+ 0.992480f, 0.122411f, 0.993448f, 0.114287f, 0.994350f, 0.106156f, 0.995185f, 0.098017f,
+ 0.995953f, 0.089872f, 0.996655f, 0.081721f, 0.997290f, 0.073565f, 0.997859f, 0.065403f,
+ 0.998361f, 0.057237f, 0.998795f, 0.049068f, 0.999163f, 0.040895f, 0.999465f, 0.032719f,
+ 0.999699f, 0.024541f, 0.999866f, 0.016362f, 0.999967f, 0.008181f, 1.000000f, 0.000000f};
diff --git a/decoder/ixheaacd_esbr_rom.h b/decoder/ixheaacd_esbr_rom.h
index 34eef98..6f15971 100644
--- a/decoder/ixheaacd_esbr_rom.h
+++ b/decoder/ixheaacd_esbr_rom.h
@@ -21,19 +21,19 @@
#define IXHEAACD_ESBR_ROM_H
extern const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 +
- 200 + 240 + 320 + 400];
+ 200 + 240 + 320 + 400 + 440];
extern const FLOAT32 ixheaacd_random_phase[512][2];
extern const FLOAT32 ixheaacd_hphase_tbl[2][8];
extern const FLOAT32 ixheaacd_g_lim_gains[4];
-typedef FLOAT32 FIR_FILTER[5];
-extern const FIR_FILTER ixheaacd_fir_0;
-extern const FIR_FILTER ixheaacd_fir_1;
-extern const FIR_FILTER ixheaacd_fir_2;
-extern const FIR_FILTER ixheaacd_fir_3;
-extern const FIR_FILTER ixheaacd_fir_4;
-extern const FIR_FILTER* const ixheaacd_fir_table[5];
+typedef FLOAT32 ia_fir_table_struct[5];
+extern const ia_fir_table_struct ixheaacd_fir_0;
+extern const ia_fir_table_struct ixheaacd_fir_1;
+extern const ia_fir_table_struct ixheaacd_fir_2;
+extern const ia_fir_table_struct ixheaacd_fir_3;
+extern const ia_fir_table_struct ixheaacd_fir_4;
+extern const ia_fir_table_struct *ixheaacd_fir_table[5];
extern const FLOAT32 ixheaacd_q_gamma_table[4];
extern const WORD32 ixheaacd_start_subband2kL_tbl[33];
extern const FLOAT32 ixheaacd_cos_table_trans_qmf[7][32 * 2];
@@ -57,5 +57,27 @@ extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_16[64];
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_24[96];
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_32[128];
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_40[40 * 40 * 2];
+
+extern const FLOAT32 ixheaacd_dft_hbe_window_ts_12[13];
+extern const FLOAT32 ixheaacd_dft_hbe_window_ts_18[19];
+
+extern const FLOAT32 ixheaacd_sine_pi_n_by_1024[1024];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_960[960];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_896[896];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_832[832];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_768[768];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_704[704];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_640[640];
+extern const FLOAT32 ixheaacd_sine_pi_n_by_576[576];
+extern const FLOAT32 ixheaacd_sine_pi_by_2_N[];
+extern const FLOAT32 ixheaacd_sin_cos_448[];
+extern const FLOAT32 ixheaacd_sin_cos_672[];
+extern const FLOAT32 ixheaacd_sin_cos_512[];
+extern const FLOAT32 ixheaacd_sin_cos_576[];
+extern const FLOAT32 ixheaacd_sin_cos_384[];
+extern const FLOAT32 ixheaacd_sin_cos_768[];
+
extern const FLOAT32 ixheaacd_sel_case[5][8];
+extern const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff_28_36[280 + 360];
+extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_56[56 * 56 * 2];
#endif
diff --git a/decoder/ixheaacd_ext_ch_ele.c b/decoder/ixheaacd_ext_ch_ele.c
index 9c3f1ac..aa70291 100644
--- a/decoder/ixheaacd_ext_ch_ele.c
+++ b/decoder/ixheaacd_ext_ch_ele.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <setjmp.h>
#include "ixheaacd_type_def.h"
@@ -43,6 +44,9 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_rom.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_tns_usac.h"
@@ -60,6 +64,13 @@
#include "ixheaacd_vec_baisc_ops.h"
#include "ixheaacd_config.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_pns.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_ec.h"
+#include "ixheaacd_error_codes.h"
const WORD16 ixheaacd_mdst_fcoeff_long_sin[] = {0, 0, -16384, 0, 16384, 0, 0};
const WORD16 ixheaacd_mdst_fcoeff_long_kbd[] = {-2998, 0, -19052, 0,
@@ -370,11 +381,13 @@ static VOID ixheaacd_filter_and_add(const WORD32 *in, const WORD32 length,
out++;
for (i = 3; i < length - 4; i += 2) {
+ sum = 0;
sum = ixheaacd_mac32x32in64_7(&in[i - 3], filter);
*out = ixheaacd_add32_sat(
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
out++;
+ sum = 0;
sum = ixheaacd_mac32x32in64_7(&in[i - 2], filter);
*out = ixheaacd_add32_sat(
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
@@ -531,7 +544,6 @@ static VOID ixheaacd_cplx_pred_upmixing(
(WORD64)(ixheaacd_sub32_sat(l_spec[i], mid_side));
l_spec[i] = ixheaacd_add32_sat(l_spec[i], mid_side);
}
-
} else {
i += pstr_sfb_info->sfb_width[sfb];
}
@@ -554,7 +566,6 @@ static VOID ixheaacd_cplx_pred_upmixing(
(WORD64)(ixheaacd_sub32_sat(l_spec[i], mid_side));
l_spec[i] = ixheaacd_add32_sat(l_spec[i], mid_side);
}
-
} else {
i += pstr_sfb_info->sfb_width[sfb];
}
@@ -602,12 +613,11 @@ WORD32 ixheaacd_ics_info(ia_usac_data_struct *usac_data, WORD32 chn,
usac_data->pstr_sfb_info[chn] =
usac_data->pstr_usac_winmap[usac_data->window_sequence[chn]];
- usac_data->window_shape[chn] = (WORD32)ixheaacd_read_bits_buf(it_bit_buff, 1);
+ usac_data->window_shape[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
if (usac_data->pstr_usac_winmap[win]->islong) {
*max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
*scf_group_ptr = 1;
-
} else {
WORD32 i, scale_factor_grouping;
@@ -628,7 +638,7 @@ WORD32 ixheaacd_ics_info(ia_usac_data_struct *usac_data, WORD32 chn,
if (*max_sfb > usac_data->pstr_sfb_info[chn]->sfb_per_sbk) {
*max_sfb = usac_data->pstr_sfb_info[chn]->sfb_per_sbk;
- return 0;
+ return -1;
}
return 0;
@@ -639,280 +649,421 @@ WORD32 ixheaacd_core_coder_data(WORD32 id, ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 nr_core_coder_channels) {
WORD32 err_code = 0;
- WORD32 k = 0, ch = 0, chn, left = 0, right = 0;
+ WORD32 k = 0, ch = 0, chn = 0, left = 0, right = 0;
ia_usac_tmp_core_coder_struct str_tmp_core_coder = {0};
ia_usac_tmp_core_coder_struct *pstr_core_coder = &str_tmp_core_coder;
ia_td_frame_data_struct td_frame;
+ jmp_buf local;
- memset(&td_frame, 0, sizeof(td_frame));
- pstr_core_coder->tns_on_lr = 0;
- pstr_core_coder->pred_dir = 0;
- if (id != ID_USAC_LFE) {
- for (ch = 0; ch < nr_core_coder_channels; ch++)
- pstr_core_coder->core_mode[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
- } else {
- for (ch = 0; ch < nr_core_coder_channels; ch++)
- pstr_core_coder->core_mode[ch] = 0;
+ if (usac_data->ec_flag) {
+ err_code = setjmp(local);
+ it_bit_buff->xaac_jmp_buf = &local;
}
+ if (err_code == 0 &&
+ ((usac_data->ec_flag == 0) || (usac_data->frame_ok == 1 && usac_data->ec_flag == 1))) {
+ memset(&td_frame, 0, sizeof(td_frame));
+ pstr_core_coder->tns_on_lr = 0;
+ pstr_core_coder->pred_dir = 0;
+ if (id != ID_USAC_LFE) {
+ for (ch = 0; ch < nr_core_coder_channels; ch++)
+ pstr_core_coder->core_mode[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ } else {
+ for (ch = 0; ch < nr_core_coder_channels; ch++) pstr_core_coder->core_mode[ch] = 0;
+ }
- if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
- pstr_core_coder->core_mode[1] == 0) {
- pstr_core_coder->tns_active = ixheaacd_read_bits_buf(it_bit_buff, 1);
- pstr_core_coder->common_window = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
+ pstr_core_coder->core_mode[1] == 0) {
+ pstr_core_coder->tns_active = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pstr_core_coder->common_window = ixheaacd_read_bits_buf(it_bit_buff, 1);
- if (pstr_core_coder->common_window) {
- left = chan_offset;
- right = chan_offset + 1;
+ if (pstr_core_coder->common_window) {
+ left = chan_offset;
+ right = chan_offset + 1;
+
+ err_code = ixheaacd_ics_info(usac_data, left, &pstr_core_coder->max_sfb[left],
+ it_bit_buff, usac_data->window_sequence_last[left]);
+
+ if (err_code == -1) {
+ if (usac_data->ec_flag) {
+ memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb,
+ sizeof(pstr_core_coder->max_sfb));
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return err_code;
+ }
+ }
- err_code =
- ixheaacd_ics_info(usac_data, left, &pstr_core_coder->max_sfb[left],
- it_bit_buff, usac_data->window_sequence_last[left]);
+ pstr_core_coder->common_max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 1);
- if (err_code == -1) return err_code;
+ if (pstr_core_coder->common_max_sfb == 0) {
+ if (usac_data->window_sequence[left] == EIGHT_SHORT_SEQUENCE)
+ pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 4);
+ else
+ pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 6);
+ } else {
+ pstr_core_coder->max_sfb[right] = pstr_core_coder->max_sfb[left];
+ }
- pstr_core_coder->common_max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pstr_core_coder->max_sfb_ste =
+ max(pstr_core_coder->max_sfb[left], pstr_core_coder->max_sfb[right]);
- if (pstr_core_coder->common_max_sfb == 0) {
- if (usac_data->window_sequence[left] == EIGHT_SHORT_SEQUENCE)
- pstr_core_coder->max_sfb[right] =
- ixheaacd_read_bits_buf(it_bit_buff, 4);
- else
- pstr_core_coder->max_sfb[right] =
- ixheaacd_read_bits_buf(it_bit_buff, 6);
- } else {
- pstr_core_coder->max_sfb[right] = pstr_core_coder->max_sfb[left];
- }
+ usac_data->window_sequence[right] = usac_data->window_sequence[left];
+ usac_data->window_shape[right] = usac_data->window_shape[left];
+ memcpy(&usac_data->group_dis[right][0], &usac_data->group_dis[left][0], 8);
+ usac_data->pstr_sfb_info[right] = usac_data->pstr_sfb_info[left];
+ if (pstr_core_coder->max_sfb[right] > usac_data->pstr_sfb_info[right]->sfb_per_sbk)
+ pstr_core_coder->max_sfb[right] = usac_data->pstr_sfb_info[right]->sfb_per_sbk;
- pstr_core_coder->max_sfb_ste =
- max(pstr_core_coder->max_sfb[left], pstr_core_coder->max_sfb[right]);
-
- usac_data->window_sequence[right] = usac_data->window_sequence[left];
- usac_data->window_shape[right] = usac_data->window_shape[left];
- memcpy(&usac_data->group_dis[right][0], &usac_data->group_dis[left][0],
- 8);
- usac_data->pstr_sfb_info[right] = usac_data->pstr_sfb_info[left];
- if (pstr_core_coder->max_sfb[right] >
- usac_data->pstr_sfb_info[right]->sfb_per_sbk)
- pstr_core_coder->max_sfb[right] =
- usac_data->pstr_sfb_info[right]->sfb_per_sbk;
-
- pstr_core_coder->ms_mask_present[0] =
- ixheaacd_read_ms_mask(usac_data, pstr_core_coder, it_bit_buff, left);
- } else {
- left = chan_offset;
- right = chan_offset + 1;
+ pstr_core_coder->ms_mask_present[0] =
+ ixheaacd_read_ms_mask(usac_data, pstr_core_coder, it_bit_buff, left);
+ } else {
+ left = chan_offset;
+ right = chan_offset + 1;
- pstr_core_coder->ms_mask_present[0] = 0;
- pstr_core_coder->ms_mask_present[1] = 0;
+ pstr_core_coder->ms_mask_present[0] = 0;
+ pstr_core_coder->ms_mask_present[1] = 0;
- for (k = 0; k < SFB_NUM_MAX; k++) {
- usac_data->alpha_q_re_prev[k] = 0;
- usac_data->alpha_q_im_prev[k] = 0;
+ for (k = 0; k < SFB_NUM_MAX; k++) {
+ usac_data->alpha_q_re_prev[k] = 0;
+ usac_data->alpha_q_im_prev[k] = 0;
+ }
}
- }
- if (usac_data->tw_mdct[elem_idx] == 1) {
- pstr_core_coder->common_tw = ixheaacd_read_bits_buf(it_bit_buff, 1);
-
- if (pstr_core_coder->common_tw == 1) {
- usac_data->tw_data_present[left] =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
- usac_data->tw_data_present[right] = usac_data->tw_data_present[left];
- if (usac_data->tw_data_present[left]) {
- for (k = 0; k < NUM_TW_NODES; k++) {
- usac_data->tw_ratio[left][k] =
- ixheaacd_read_bits_buf(it_bit_buff, 3);
- usac_data->tw_ratio[right][k] = usac_data->tw_ratio[left][k];
+ if (usac_data->tw_mdct[elem_idx] == 1) {
+ pstr_core_coder->common_tw = ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ if (pstr_core_coder->common_tw == 1) {
+ usac_data->tw_data_present[left] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ usac_data->tw_data_present[right] = usac_data->tw_data_present[left];
+ if (usac_data->tw_data_present[left]) {
+ for (k = 0; k < NUM_TW_NODES; k++) {
+ usac_data->tw_ratio[left][k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
+ usac_data->tw_ratio[right][k] = usac_data->tw_ratio[left][k];
+ }
}
}
}
- }
- if (pstr_core_coder->tns_active) {
- if (pstr_core_coder->common_window) {
- pstr_core_coder->common_tns = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (pstr_core_coder->tns_active) {
+ if (pstr_core_coder->common_window) {
+ pstr_core_coder->common_tns = ixheaacd_read_bits_buf(it_bit_buff, 1);
- } else {
- pstr_core_coder->common_tns = 0;
- }
-
- pstr_core_coder->tns_on_lr = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ } else {
+ pstr_core_coder->common_tns = 0;
+ }
- if (pstr_core_coder->common_tns) {
- ixheaacd_read_tns_u(usac_data->pstr_sfb_info[0],
- &usac_data->pstr_tns[left][0], it_bit_buff);
- memcpy(&usac_data->pstr_tns[right][0], &usac_data->pstr_tns[left][0],
- sizeof(ia_tns_frame_info_struct));
+ pstr_core_coder->tns_on_lr = ixheaacd_read_bits_buf(it_bit_buff, 1);
- pstr_core_coder->tns_data_present[0] = 2;
- pstr_core_coder->tns_data_present[1] = 2;
- } else {
- pstr_core_coder->tns_present_both =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (pstr_core_coder->common_tns) {
+ ixheaacd_read_tns_u(usac_data->pstr_sfb_info[0], &usac_data->pstr_tns[left][0],
+ it_bit_buff);
+ memcpy(&usac_data->pstr_tns[right][0], &usac_data->pstr_tns[left][0],
+ sizeof(ia_tns_frame_info_struct));
- if (pstr_core_coder->tns_present_both) {
- pstr_core_coder->tns_data_present[0] = 1;
- pstr_core_coder->tns_data_present[1] = 1;
+ pstr_core_coder->tns_data_present[0] = 2;
+ pstr_core_coder->tns_data_present[1] = 2;
} else {
- pstr_core_coder->tns_data_present[1] =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
- pstr_core_coder->tns_data_present[0] =
- 1 - pstr_core_coder->tns_data_present[1];
+ pstr_core_coder->tns_present_both = ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ if (pstr_core_coder->tns_present_both) {
+ pstr_core_coder->tns_data_present[0] = 1;
+ pstr_core_coder->tns_data_present[1] = 1;
+ } else {
+ pstr_core_coder->tns_data_present[1] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pstr_core_coder->tns_data_present[0] = 1 - pstr_core_coder->tns_data_present[1];
+ }
}
+ } else {
+ pstr_core_coder->common_tns = 0;
+ pstr_core_coder->tns_data_present[0] = 0;
+ pstr_core_coder->tns_data_present[1] = 0;
}
+
} else {
- pstr_core_coder->common_tns = 0;
- pstr_core_coder->tns_data_present[0] = 0;
- pstr_core_coder->tns_data_present[1] = 0;
+ pstr_core_coder->common_window = 0;
+ pstr_core_coder->common_tw = 0;
+ left = chan_offset;
+ right = chan_offset;
+ if (nr_core_coder_channels == 2) right = chan_offset + 1;
}
- } else {
- pstr_core_coder->common_window = 0;
- pstr_core_coder->common_tw = 0;
- left = chan_offset;
- right = chan_offset;
- if (nr_core_coder_channels == 2) right = chan_offset + 1;
- }
-
- for (ch = 0, chn = chan_offset; ch < nr_core_coder_channels; ch++, chn++) {
- if (pstr_core_coder->core_mode[ch] == 1) {
- err_code =
- ixheaacd_tw_buff_update(usac_data, chn, usac_data->str_tddec[chn]);
- if (err_code == -1) return err_code;
-
- if (!usac_data->td_frame_prev[chn]) {
- ixheaacd_fix2flt_data(usac_data, usac_data->str_tddec[chn], chn);
- }
+ for (ch = 0, chn = chan_offset; ch < nr_core_coder_channels; ch++, chn++) {
+ if (pstr_core_coder->core_mode[chn] == CORE_MODE_LPD &&
+ usac_data->td_frame_prev[chn] == CORE_MODE_FD && usac_data->ec_flag) {
+ memcpy(usac_data->coef_fix[chn], usac_data->str_error_concealment[chn].spectral_coeff,
+ sizeof(usac_data->str_error_concealment[chn].spectral_coeff));
+ memcpy(usac_data->spec_scale[chn], usac_data->str_error_concealment[chn].q_spec_coeff,
+ sizeof(usac_data->spec_scale[chn]));
+ err_code = ixheaacd_fd_frm_dec(usac_data, chn);
+ if (err_code == -1) return err_code;
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->time_sample_vector[chn][k] = (FLOAT32)(
+ (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
+ }
+ memcpy(usac_data->time_sample_vector_prev[chn], usac_data->time_sample_vector[chn],
+ usac_data->ccfl * sizeof(usac_data->time_sample_vector_prev[chn][0]));
- for (k = 0; k < usac_data->ccfl; k++) {
- usac_data->time_sample_vector[chn][k] =
- (FLOAT32)((FLOAT32)usac_data->output_data_ptr[chn][k] *
- (FLOAT32)(ONE_BY_TWO_POW_15));
+ usac_data->window_sequence[ch] = usac_data->str_error_concealment[ch].win_seq;
+ usac_data->window_shape[ch] = usac_data->str_error_concealment[ch].win_shape;
+ usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
+ usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
}
- usac_data->present_chan = chn;
- err_code =
- ixheaacd_lpd_channel_stream(usac_data, &td_frame, it_bit_buff,
- usac_data->time_sample_vector[chn]);
- if (err_code == -1) return err_code;
-
- for (k = 0; k < usac_data->ccfl; k++) {
- usac_data->output_data_ptr[chn][k] = (WORD32)(
- usac_data->time_sample_vector[chn][k] * (FLOAT32)((WORD64)1 << 15));
- }
-
- usac_data->window_shape[chn] = WIN_SEL_0;
+ if (pstr_core_coder->core_mode[ch] == 1) {
+ err_code = ixheaacd_tw_buff_update(usac_data, chn, usac_data->str_tddec[chn]);
+ if (err_code == -1) return err_code;
- ixheaacd_td_frm_dec(usac_data, chn, td_frame.mod[0]);
+ if (!usac_data->td_frame_prev[chn]) {
+ ixheaacd_fix2flt_data(usac_data, usac_data->str_tddec[chn], chn);
+ }
- for (k = 0; k < usac_data->ccfl; k++) {
- usac_data->time_sample_vector[chn][k] =
- (FLOAT32)((FLOAT32)usac_data->output_data_ptr[chn][k] *
- (FLOAT32)(ONE_BY_TWO_POW_15));
- }
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->time_sample_vector[chn][k] = (FLOAT32)(
+ (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
+ }
+ usac_data->present_chan = chn;
+ err_code = ixheaacd_lpd_channel_stream(usac_data, &td_frame, it_bit_buff,
+ usac_data->time_sample_vector[chn]);
+ if (err_code == -1) return err_code;
+ if (usac_data->ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ if (usac_data->ec_flag && usac_data->frame_ok) {
+ memcpy(&usac_data->td_frame_data_prev[chn], &td_frame, sizeof(td_frame));
+ usac_data->core_mode = CORE_MODE_LPD;
+ }
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->output_data_ptr[chn][k] =
+ (WORD32)(usac_data->time_sample_vector[chn][k] * (FLOAT32)((WORD64)1 << 15));
+ }
- usac_data->window_shape_prev[chn] = usac_data->window_shape[chn];
- usac_data->window_sequence_last[chn] = EIGHT_SHORT_SEQUENCE;
+ usac_data->window_shape[chn] = WIN_SEL_0;
- } else {
- memset(usac_data->coef_fix[chn], 0,
- LN2 * sizeof(*usac_data->coef_fix[0]));
+ ixheaacd_td_frm_dec(usac_data, chn, td_frame.mod[0]);
- if (usac_data->str_tddec[chn] && usac_data->td_frame_prev[chn]) {
- ixheaacd_lpd_dec_update(usac_data->str_tddec[chn], usac_data, chn);
- }
+ usac_data->window_shape_prev[chn] = usac_data->window_shape[chn];
+ usac_data->window_sequence_last[chn] = EIGHT_SHORT_SEQUENCE;
- if (id != ID_USAC_LFE) {
- if ((nr_core_coder_channels == 1) ||
- (pstr_core_coder->core_mode[0] != pstr_core_coder->core_mode[1]))
- pstr_core_coder->tns_data_present[ch] =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
- }
+ } else {
+ memset(usac_data->coef_fix[chn], 0, LN2 * sizeof(*usac_data->coef_fix[0]));
- err_code = ixheaacd_fd_channel_stream(
- usac_data, pstr_core_coder, &pstr_core_coder->max_sfb[ch],
- usac_data->window_sequence_last[chn], chn,
- usac_data->noise_filling_config[elem_idx], ch, it_bit_buff);
- if (err_code == -1) return err_code;
- }
- }
+ if (usac_data->str_tddec[chn] && usac_data->td_frame_prev[chn]) {
+ if (usac_data->ec_flag) {
+ memcpy(usac_data->time_sample_vector[chn], usac_data->time_sample_vector_prev[chn],
+ usac_data->ccfl * sizeof(usac_data->time_sample_vector[chn][0]));
+ }
+ ixheaacd_lpd_dec_update(usac_data->str_tddec[chn], usac_data, chn);
+ }
- if (pstr_core_coder->core_mode[0] == CORE_MODE_FD &&
- pstr_core_coder->core_mode[1] == CORE_MODE_FD &&
- nr_core_coder_channels == 2) {
- ixheaacd_cplx_prev_mdct_dmx(
- usac_data->pstr_sfb_info[left], usac_data->coef_save[left],
- usac_data->coef_save[right], usac_data->dmx_re_prev,
- pstr_core_coder->pred_dir);
- }
+ if (id != ID_USAC_LFE) {
+ if ((nr_core_coder_channels == 1) ||
+ (pstr_core_coder->core_mode[0] != pstr_core_coder->core_mode[1]))
+ pstr_core_coder->tns_data_present[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ }
- if (pstr_core_coder->tns_on_lr == 0 && (id != ID_USAC_LFE)) {
- for (ch = 0, chn = left; chn <= right; ch++, chn++) {
- if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
- err_code = ixheaacd_tns_apply(
- usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
- usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
- if (err_code) return err_code;
+ err_code = ixheaacd_fd_channel_stream(
+ usac_data, pstr_core_coder, &pstr_core_coder->max_sfb[ch],
+ usac_data->window_sequence_last[chn], chn, usac_data->noise_filling_config[elem_idx],
+ ch, it_bit_buff);
+ if (err_code == -1) return err_code;
}
}
- }
- if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
- pstr_core_coder->core_mode[1] == 0) {
- if (pstr_core_coder->ms_mask_present[0] == 3) {
- ixheaacd_cplx_pred_upmixing(usac_data, usac_data->coef_fix[left],
- usac_data->coef_fix[right], pstr_core_coder,
- left);
-
- } else if (pstr_core_coder->ms_mask_present[0] > 0) {
- ixheaacd_ms_stereo(
- usac_data, usac_data->coef_fix[right], usac_data->coef_fix[left],
- left, pstr_core_coder->max_sfb[right] > pstr_core_coder->max_sfb[left]
- ? pstr_core_coder->max_sfb[right]
- : pstr_core_coder->max_sfb[left]);
+ if (pstr_core_coder->core_mode[0] == CORE_MODE_FD &&
+ pstr_core_coder->core_mode[1] == CORE_MODE_FD && nr_core_coder_channels == 2) {
+ ixheaacd_cplx_prev_mdct_dmx(usac_data->pstr_sfb_info[left], usac_data->coef_save[left],
+ usac_data->coef_save[right], usac_data->dmx_re_prev,
+ pstr_core_coder->pred_dir);
}
- if (pstr_core_coder->tns_on_lr) {
+ if (pstr_core_coder->tns_on_lr == 0 && (id != ID_USAC_LFE)) {
for (ch = 0, chn = left; chn <= right; ch++, chn++) {
if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
- err_code = ixheaacd_tns_apply(
- usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
- usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
+ err_code = ixheaacd_tns_apply(usac_data, usac_data->coef_fix[chn],
+ pstr_core_coder->max_sfb[ch],
+ usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
if (err_code) return err_code;
}
}
}
- ixheaacd_usac_cplx_save_prev(
- usac_data->pstr_sfb_info[left], usac_data->coef_fix[left],
- usac_data->coef_fix[right], usac_data->coef_save[left],
- usac_data->coef_save[right]);
+ if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
+ pstr_core_coder->core_mode[1] == 0) {
+ if (pstr_core_coder->ms_mask_present[0] == 3) {
+ ixheaacd_cplx_pred_upmixing(usac_data, usac_data->coef_fix[left],
+ usac_data->coef_fix[right], pstr_core_coder, left);
+
+ } else if (pstr_core_coder->ms_mask_present[0] > 0) {
+ ixheaacd_ms_stereo(usac_data, usac_data->coef_fix[right], usac_data->coef_fix[left], left,
+ pstr_core_coder->max_sfb[right] > pstr_core_coder->max_sfb[left]
+ ? pstr_core_coder->max_sfb[right]
+ : pstr_core_coder->max_sfb[left]);
+ }
+
+ if (pstr_core_coder->tns_on_lr) {
+ for (ch = 0, chn = left; chn <= right; ch++, chn++) {
+ if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
+ err_code = ixheaacd_tns_apply(
+ usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
+ usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
+ if (err_code) return err_code;
+ }
+ }
+ }
+
+ ixheaacd_usac_cplx_save_prev(usac_data->pstr_sfb_info[left], usac_data->coef_fix[left],
+ usac_data->coef_fix[right], usac_data->coef_save[left],
+ usac_data->coef_save[right]);
+ }
+ if (usac_data->ec_flag) {
+ for (chn = left; chn <= right; chn++) {
+ if (pstr_core_coder->core_mode[chn] == CORE_MODE_FD &&
+ usac_data->td_frame_prev[chn] == CORE_MODE_LPD) {
+ memcpy(usac_data->str_error_concealment[chn].spectral_coeff, usac_data->coef_fix[chn],
+ sizeof(usac_data->str_error_concealment[chn].spectral_coeff));
+ memcpy(usac_data->str_error_concealment[chn].q_spec_coeff, usac_data->spec_scale[chn],
+ sizeof(usac_data->spec_scale[chn]));
+ usac_data->str_error_concealment[chn].win_seq = usac_data->window_sequence[chn];
+ usac_data->str_error_concealment[chn].win_shape = usac_data->window_shape[chn];
+ usac_data->str_error_concealment[chn].win_shape_prev =
+ usac_data->window_shape_prev[chn];
+ usac_data->str_error_concealment[chn].td_frame_prev = usac_data->td_frame_prev[chn];
+ usac_data->str_error_concealment[chn].fac_data_present =
+ usac_data->fac_data_present[chn];
+ }
+ }
+ if (usac_data->frame_ok && usac_data->ec_flag) {
+ memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb, sizeof(pstr_core_coder->max_sfb));
+ }
+ }
+ } else {
+ left = chan_offset;
+ right = chan_offset;
+ if (nr_core_coder_channels == 2) right = chan_offset + 1;
+ if (usac_data->ec_flag == 1) {
+ WORD32 err = 0;
+ usac_data->frame_ok = 0;
+ for (ch = left; ch <= right; ch++) {
+ if (usac_data->td_frame_prev[ch] == CORE_MODE_LPD) {
+ usac_data->fac_data_present[ch] = 0;
+ usac_data->str_error_concealment[ch].pstr_ec_scratch =
+ (ia_ec_scratch_str *)&usac_data->str_error_concealment[ch].str_ec_scratch;
+ usac_data->core_mode = usac_data->td_frame_prev[ch];
+ usac_data->present_chan = ch;
+ ixheaacd_usac_apply_ec(usac_data, NULL, ch);
+ err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[ch],
+ &usac_data->td_frame_data_prev[ch],
+ usac_data->time_sample_vector[ch], usac_data->first_lpd_flag, 0,
+ usac_data->bpf_control_info);
+
+ if (err) return err;
+
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->output_data_ptr[ch][k] =
+ (WORD32)(usac_data->time_sample_vector[ch][k] * (FLOAT32)((WORD64)1 << 15));
+ }
+
+ usac_data->window_shape[ch] = WIN_SEL_0;
+ usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
+ usac_data->window_sequence_last[ch] = EIGHT_SHORT_SEQUENCE;
+ } else {
+ pstr_core_coder->core_mode[ch] = CORE_MODE_FD;
+ }
+ }
+ }
}
for (ch = left; ch <= right; ch++) {
- if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
+ FLOAT32 *ptr_scratch =
+ (FLOAT32 *)usac_data->str_error_concealment[ch].str_ec_scratch.spec_coeff;
+ if ((pstr_core_coder->core_mode[ch] != CORE_MODE_LPD &&
+ usac_data->td_frame_prev[ch] != CORE_MODE_LPD && usac_data->ec_flag) ||
+ (pstr_core_coder->core_mode[ch] == CORE_MODE_FD && usac_data->ec_flag == 0)) {
if (usac_data->tw_mdct[elem_idx]) {
err_code = -1;
return err_code;
} else {
+ if (usac_data->frame_ok == 0) {
+ usac_data->fac_data_present[ch] = 0;
+ }
err_code = ixheaacd_fd_frm_dec(usac_data, ch);
if (err_code == -1) return err_code;
+ if (usac_data->ec_flag) {
+ if (usac_data->str_error_concealment[ch].fade_idx < MAX_FADE_FRAMES) {
+ FLOAT32 fade_fac = (FLOAT32)(ONE_BY_TWO_POW_15)*ia_ec_fade_factors
+ [usac_data->str_error_concealment[ch].fade_idx];
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->time_sample_vector[ch][k] =
+ (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] * fade_fac);
+ }
+ } else {
+ memset(&usac_data->time_sample_vector[ch][0], 0,
+ usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
+ }
+ } else {
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->time_sample_vector[ch][k] =
+ (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
+ (FLOAT32)(ONE_BY_TWO_POW_15));
+ }
+ }
+ }
+ usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
+ usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
+ } else {
+ if (usac_data->ec_flag) {
+ usac_data->str_error_concealment[ch].prev_frame_ok[0] =
+ usac_data->str_error_concealment[ch].prev_frame_ok[1];
+ usac_data->str_error_concealment[ch].prev_frame_ok[1] = usac_data->frame_ok;
+
+ if (usac_data->str_error_concealment[ch].fade_idx < MAX_FADE_FRAMES) {
+ FLOAT32 fade_fac =
+ (FLOAT32)(ONE_BY_TWO_POW_15)*ia_ec_fade_factors[usac_data->str_error_concealment[ch]
+ .fade_idx];
+ for (k = 0; k < usac_data->ccfl; k++) {
+ usac_data->time_sample_vector[ch][k] =
+ (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] * fade_fac);
+ }
+ } else {
+ memset(&usac_data->time_sample_vector[ch][0], 0,
+ usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
+ }
+ memcpy(ptr_scratch, usac_data->time_sample_vector[ch],
+ usac_data->ccfl * sizeof(ptr_scratch[0]));
+ memcpy(usac_data->time_sample_vector[ch], usac_data->time_sample_vector_prev[ch],
+ usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
+ memcpy(usac_data->time_sample_vector_prev[ch], ptr_scratch,
+ usac_data->ccfl * sizeof(ptr_scratch[0]));
+ } else {
for (k = 0; k < usac_data->ccfl; k++) {
usac_data->time_sample_vector[ch][k] =
(FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
(FLOAT32)(ONE_BY_TWO_POW_15));
}
}
-
- usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
- usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
+ }
+ if (usac_data->ec_flag) {
+ usac_data->window_sequence[ch] = usac_data->str_error_concealment[ch].win_seq;
+ usac_data->window_shape[ch] = usac_data->str_error_concealment[ch].win_shape;
+ if (usac_data->first_frame == 0) {
+ usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
+ usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
+ }
}
}
-
- for (ch = 0, chn = left; chn <= right; chn++, ch++)
- usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
+ if (usac_data->ec_flag) {
+ usac_data->first_frame = 0;
+ if (usac_data->frame_ok == 1) {
+ for (ch = 0, chn = left; chn <= right; chn++, ch++)
+ usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
+ }
+ } else {
+ for (ch = 0, chn = left; chn <= right; chn++, ch++)
+ usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
+ }
return 0;
}
diff --git a/decoder/ixheaacd_fft.c b/decoder/ixheaacd_fft.c
index f6b9b09..ecb88c1 100644
--- a/decoder/ixheaacd_fft.c
+++ b/decoder/ixheaacd_fft.c
@@ -63,7 +63,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32_sat(WORD32 a, WORD32 b, WORD32 c) {
return (result);
}
-static PLATFORM_INLINE FLOAT32 mult32X32float(FLOAT32 a, FLOAT32 b) {
+static PLATFORM_INLINE FLOAT32 ixheaacd_mult32X32float(FLOAT32 a, FLOAT32 b) {
FLOAT32 result;
result = a * b;
@@ -71,7 +71,7 @@ static PLATFORM_INLINE FLOAT32 mult32X32float(FLOAT32 a, FLOAT32 b) {
return result;
}
-static PLATFORM_INLINE FLOAT32 mac32X32float(FLOAT32 a, FLOAT32 b, FLOAT32 c) {
+static PLATFORM_INLINE FLOAT32 ixheaacd_mac32X32float(FLOAT32 a, FLOAT32 b, FLOAT32 c) {
FLOAT32 result;
result = a + b * c;
@@ -340,21 +340,21 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_r + 1);
data_r -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.923880f) -
- mult32X32float((FLOAT32)x1i, -0.382683f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.382683f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.923880f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.382683f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.382683f),
(FLOAT32)x1i, 0.923880f);
x1r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x2r, 0.707107f) -
- mult32X32float((FLOAT32)x2i, -0.707107f));
- x2i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x2r, -0.707107f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) -
+ ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
+ x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f),
(FLOAT32)x2i, 0.707107f);
x2r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x3r, 0.382683f) -
- mult32X32float((FLOAT32)x3i, -0.923880f));
- x3i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x3r, -0.923880f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, 0.382683f) -
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.923880f));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.923880f),
(FLOAT32)x3i, 0.382683f);
x3r = tmp;
@@ -408,21 +408,21 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_i + 1);
data_i -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.923880f) -
- mult32X32float((FLOAT32)x1i, -0.382683f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.382683f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.923880f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.382683f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.382683f),
(FLOAT32)x1i, 0.923880f);
x1r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x2r, 0.707107f) -
- mult32X32float((FLOAT32)x2i, -0.707107f));
- x2i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x2r, -0.707107f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) -
+ ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
+ x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f),
(FLOAT32)x2i, 0.707107f);
x2r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x3r, 0.382683f) -
- mult32X32float((FLOAT32)x3i, -0.923880f));
- x3i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x3r, -0.923880f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, 0.382683f) -
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.923880f));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.923880f),
(FLOAT32)x3i, 0.382683f);
x3r = tmp;
@@ -483,9 +483,9 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_r + 1);
data_r -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.707107f) -
- mult32X32float((FLOAT32)x1i, -0.707107f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.707107f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.707107f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.707107f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.707107f),
(FLOAT32)x1i, 0.707107f);
x1r = tmp;
@@ -493,10 +493,10 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x2i = -x2r;
x2r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x3r, -0.707107f) +
- mult32X32float((FLOAT32)x3i, 0.707107f));
- x3i = (FLOAT32)(-mult32X32float((FLOAT32)x3r, 0.707107f) +
- mult32X32float((FLOAT32)x3i, -0.707107f));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, -0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, 0.707107f));
+ x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.707107f));
x3r = tmp;
x0r = (*data_r);
@@ -549,9 +549,9 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_i + 1);
data_i -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.707107f) -
- mult32X32float((FLOAT32)x1i, -0.707107f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.707107f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.707107f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.707107f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.707107f),
(FLOAT32)x1i, 0.707107f);
x1r = tmp;
@@ -559,10 +559,10 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x2i = -x2r;
x2r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x3r, -0.707107f) +
- mult32X32float((FLOAT32)x3i, 0.707107f));
- x3i = (FLOAT32)(-mult32X32float((FLOAT32)x3r, 0.707107f) +
- mult32X32float((FLOAT32)x3i, -0.707107f));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, -0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, 0.707107f));
+ x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.707107f));
x3r = tmp;
x0r = (*data_i);
@@ -622,21 +622,21 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_r + 1);
data_r -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.382683f) -
- mult32X32float((FLOAT32)x1i, -0.923880f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.923880f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.382683f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.923880f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.923880f),
(FLOAT32)x1i, 0.382683f);
x1r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x2r, -0.707107f) +
- mult32X32float((FLOAT32)x2i, 0.707107f));
- x2i = (FLOAT32)(-mult32X32float((FLOAT32)x2r, 0.707107f) +
- mult32X32float((FLOAT32)x2i, -0.707107f));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x2i, 0.707107f));
+ x2i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
x2r = tmp;
- tmp = (FLOAT32)(-mult32X32float((FLOAT32)x3r, 0.923880f) +
- mult32X32float((FLOAT32)x3i, -0.382683f));
- x3i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x3r, -0.382683f),
+ tmp = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.923880f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.382683f));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.382683f),
(FLOAT32)x3i, 0.923880f);
x3r = tmp;
@@ -690,21 +690,21 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x3i = *(data_i + 1);
data_i -= 24;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, 0.382683f) -
- mult32X32float((FLOAT32)x1i, -0.923880f));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, -0.923880f),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.382683f) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, -0.923880f));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.923880f),
(FLOAT32)x1i, 0.382683f);
x1r = tmp;
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x2r, -0.707107f) +
- mult32X32float((FLOAT32)x2i, 0.707107f));
- x2i = (FLOAT32)(-mult32X32float((FLOAT32)x2r, 0.707107f) +
- mult32X32float((FLOAT32)x2i, -0.707107f));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x2i, 0.707107f));
+ x2i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) +
+ ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
x2r = tmp;
- tmp = (FLOAT32)(-mult32X32float((FLOAT32)x3r, 0.923880f) +
- mult32X32float((FLOAT32)x3i, -0.382683f));
- x3i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x3r, -0.382683f),
+ tmp = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.923880f) +
+ ixheaacd_mult32X32float((FLOAT32)x3i, -0.382683f));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.382683f),
(FLOAT32)x3i, 0.923880f);
x3r = tmp;
@@ -766,9 +766,9 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x1r = *ptr_y;
x1i = *(ptr_y + 1);
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, W1) -
- mult32X32float((FLOAT32)x1i, W4));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, W4),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, W4),
(FLOAT32)x1i, W1);
x1r = tmp;
@@ -790,9 +790,9 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x1r = *ptr_z;
x1i = *(ptr_z + 1);
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, W1) -
- mult32X32float((FLOAT32)x1i, W4));
- x1i = (FLOAT32)mac32X32float(mult32X32float((FLOAT32)x1r, W4),
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT32)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, W4),
(FLOAT32)x1i, W1);
x1r = tmp;
@@ -822,10 +822,10 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x1r = *ptr_y;
x1i = *(ptr_y + 1);
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, W4) +
- mult32X32float((FLOAT32)x1i, W1));
- x1i = (FLOAT32)(-mult32X32float((FLOAT32)x1r, W1) +
- mult32X32float((FLOAT32)x1i, W4));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W4) +
+ ixheaacd_mult32X32float((FLOAT32)x1i, W1));
+ x1i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x1r, W1) +
+ ixheaacd_mult32X32float((FLOAT32)x1i, W4));
x1r = tmp;
*ptr_xr = (x0r) - (x1r);
@@ -846,10 +846,10 @@ VOID ixheaacd_mps_synth_calc_fft(FLOAT32 *ptr_xr, FLOAT32 *ptr_xi,
x1r = *ptr_z;
x1i = *(ptr_z + 1);
- tmp = (FLOAT32)(mult32X32float((FLOAT32)x1r, W4) +
- mult32X32float((FLOAT32)x1i, W1));
- x1i = (FLOAT32)(-mult32X32float((FLOAT32)x1r, W1) +
- mult32X32float((FLOAT32)x1i, W4));
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W4) +
+ ixheaacd_mult32X32float((FLOAT32)x1i, W1));
+ x1i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x1r, W1) +
+ ixheaacd_mult32X32float((FLOAT32)x1i, W4));
x1r = tmp;
*ptr_xi = (x0r) - (x1r);
@@ -1044,16 +1044,16 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x3i = *(data + 1);
data -= 3 * (del << 1);
- tmp = (mult32X32float(x1r, w1l) - mult32X32float(x1i, w1h));
- x1i = mac32X32float(mult32X32float(x1r, w1h), x1i, w1l);
+ tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
+ x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
x1r = tmp;
- tmp = (mult32X32float(x2r, w2l) - mult32X32float(x2i, w2h));
- x2i = mac32X32float(mult32X32float(x2r, w2h), x2i, w2l);
+ tmp = (ixheaacd_mult32X32float(x2r, w2l) - ixheaacd_mult32X32float(x2i, w2h));
+ x2i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x2r, w2h), x2i, w2l);
x2r = tmp;
- tmp = (mult32X32float(x3r, w3l) - mult32X32float(x3i, w3h));
- x3i = mac32X32float(mult32X32float(x3r, w3h), x3i, w3l);
+ tmp = (ixheaacd_mult32X32float(x3r, w3l) - ixheaacd_mult32X32float(x3i, w3h));
+ x3i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x3r, w3h), x3i, w3l);
x3r = tmp;
x0r = (*data);
@@ -1124,16 +1124,16 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x3i = *(data + 1);
data -= 3 * (del << 1);
- tmp = (mult32X32float(x1r, w1l) - mult32X32float(x1i, w1h));
- x1i = mac32X32float(mult32X32float(x1r, w1h), x1i, w1l);
+ tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
+ x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
x1r = tmp;
- tmp = (mult32X32float(x2r, w2l) - mult32X32float(x2i, w2h));
- x2i = mac32X32float(mult32X32float(x2r, w2h), x2i, w2l);
+ tmp = (ixheaacd_mult32X32float(x2r, w2l) - ixheaacd_mult32X32float(x2i, w2h));
+ x2i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x2r, w2h), x2i, w2l);
x2r = tmp;
- tmp = (mult32X32float(x3r, w3h) + mult32X32float(x3i, w3l));
- x3i = -mult32X32float(x3r, w3l) + mult32X32float(x3i, w3h);
+ tmp = (ixheaacd_mult32X32float(x3r, w3h) + ixheaacd_mult32X32float(x3i, w3l));
+ x3i = -ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h);
x3r = tmp;
x0r = (*data);
@@ -1204,16 +1204,16 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x3i = *(data + 1);
data -= 3 * (del << 1);
- tmp = (mult32X32float(x1r, w1l) - mult32X32float(x1i, w1h));
- x1i = mac32X32float(mult32X32float(x1r, w1h), x1i, w1l);
+ tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
+ x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
x1r = tmp;
- tmp = (mult32X32float(x2r, w2h) + mult32X32float(x2i, w2l));
- x2i = -mult32X32float(x2r, w2l) + mult32X32float(x2i, w2h);
+ tmp = (ixheaacd_mult32X32float(x2r, w2h) + ixheaacd_mult32X32float(x2i, w2l));
+ x2i = -ixheaacd_mult32X32float(x2r, w2l) + ixheaacd_mult32X32float(x2i, w2h);
x2r = tmp;
- tmp = (mult32X32float(x3r, w3h) + mult32X32float(x3i, w3l));
- x3i = -mult32X32float(x3r, w3l) + mult32X32float(x3i, w3h);
+ tmp = (ixheaacd_mult32X32float(x3r, w3h) + ixheaacd_mult32X32float(x3i, w3l));
+ x3i = -ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h);
x3r = tmp;
x0r = (*data);
@@ -1284,16 +1284,16 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x3i = *(data + 1);
data -= 3 * (del << 1);
- tmp = (mult32X32float(x1r, w1l) - mult32X32float(x1i, w1h));
- x1i = mac32X32float(mult32X32float(x1r, w1h), x1i, w1l);
+ tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
+ x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
x1r = tmp;
- tmp = (mult32X32float(x2r, w2h) + mult32X32float(x2i, w2l));
- x2i = -mult32X32float(x2r, w2l) + mult32X32float(x2i, w2h);
+ tmp = (ixheaacd_mult32X32float(x2r, w2h) + ixheaacd_mult32X32float(x2i, w2l));
+ x2i = -ixheaacd_mult32X32float(x2r, w2l) + ixheaacd_mult32X32float(x2i, w2h);
x2r = tmp;
- tmp = (-mult32X32float(x3r, w3l) + mult32X32float(x3i, w3h));
- x3i = mac32X32float(mult32X32float(x3r, w3h), x3i, w3l);
+ tmp = (-ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h));
+ x3i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x3r, w3h), x3i, w3l);
x3r = tmp;
x0r = (*data);
@@ -1359,8 +1359,8 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x1r = *ptr_y;
x1i = *(ptr_y + 1);
- tmp = (mult32X32float(x1r, w1l) - mult32X32float(x1i, w1h));
- x1i = mac32X32float(mult32X32float(x1r, w1h), x1i, w1l);
+ tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
+ x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
x1r = tmp;
*ptr_y = (x0r) - (x1r);
@@ -1386,8 +1386,8 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
x1r = *ptr_y;
x1i = *(ptr_y + 1);
- tmp = (mult32X32float(x1r, w1h) + mult32X32float(x1i, w1l));
- x1i = -mult32X32float(x1r, w1l) + mult32X32float(x1i, w1h);
+ tmp = (ixheaacd_mult32X32float(x1r, w1h) + ixheaacd_mult32X32float(x1i, w1l));
+ x1i = -ixheaacd_mult32X32float(x1r, w1l) + ixheaacd_mult32X32float(x1i, w1h);
x1r = tmp;
*ptr_y = (x0r) - (x1r);
@@ -1961,7 +1961,6 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
ptr_y += 2;
}
}
-
}
else {
@@ -2662,17 +2661,12 @@ VOID ixheaacd_complex_fft_p3(WORD32 *xr, WORD32 *xi, WORD32 nlength,
return;
}
-WORD32 ixheaacd_complex_fft(WORD32 *data_r, WORD32 *data_i, WORD32 nlength,
- WORD32 fft_mode, WORD32 *preshift) {
+VOID ixheaacd_complex_fft(WORD32 *data_r, WORD32 *data_i, WORD32 nlength, WORD32 fft_mode,
+ WORD32 *preshift) {
if (nlength & (nlength - 1)) {
- if ((nlength != 24) && (nlength != 48) && (nlength != 96) &&
- (nlength != 192) && (nlength != 384)) {
- printf("%d point FFT not supported", nlength);
- return IA_FATAL_ERROR;
- }
ixheaacd_complex_fft_p3(data_r, data_i, nlength, fft_mode, preshift);
} else
(*ixheaacd_complex_fft_p2)(data_r, data_i, nlength, fft_mode, preshift);
- return 0;
+ return;
}
diff --git a/decoder/ixheaacd_fft_ifft_32x32.c b/decoder/ixheaacd_fft_ifft_32x32.c
new file mode 100644
index 0000000..33376b1
--- /dev/null
+++ b/decoder/ixheaacd_fft_ifft_32x32.c
@@ -0,0 +1,1587 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <stdlib.h>
+#include <math.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_fft_ifft_rom.h"
+#include "ixheaacd_dsp_fft32x32s.h"
+
+#define DIG_REV(i, m, j) \
+ do { \
+ unsigned _ = (i); \
+ _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
+ _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
+ _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
+ (j) = _ >> (m); \
+ } while (0)
+
+FLOAT64 ixheaacd_mult32X32float(FLOAT64 a, FLOAT64 b) {
+ FLOAT64 result;
+
+ result = a * b;
+
+ return result;
+}
+
+FLOAT64 ixheaacd_mac32X32float(FLOAT64 a, FLOAT64 b, FLOAT64 c) {
+ FLOAT64 result;
+
+ result = a + b * c;
+
+ return result;
+}
+
+VOID ixheaacd_hbe_apply_ifft_7(FLOAT32 *inp, FLOAT32 *op) {
+ FLOAT32 x0r, x1r, x2r, x3r, x4r, x5r, x6r, x7r, x8r;
+ FLOAT32 x0i, x1i, x2i, x3i, x4i, x5i, x6i, x7i, x8i;
+ FLOAT32 y0r, y1r, y2r, y3r, y4r, y5r, y6r, y7r, y8r;
+ FLOAT32 y0i, y1i, y2i, y3i, y4i, y5i, y6i, y7i, y8i;
+
+ x0r = inp[0];
+ x0i = inp[1];
+ x1r = inp[2] + inp[12];
+ x1i = inp[3] + inp[13];
+ x2r = inp[2] - inp[12];
+ x2i = inp[3] - inp[13];
+ x3r = inp[4] + inp[10];
+ x3i = inp[5] + inp[11];
+ x4r = inp[4] - inp[10];
+ x4i = inp[5] - inp[11];
+ x5r = inp[8] + inp[6];
+ x5i = inp[9] + inp[7];
+ x6r = inp[8] - inp[6];
+ x6i = inp[9] - inp[7];
+
+ y0r = x0r;
+ y0i = x0i;
+ y1r = x1r + x3r + x5r;
+ y1i = x1i + x3i + x5i;
+ y2r = x1r - x3r;
+ y2i = x1i - x3i;
+ y3r = x5r - x1r;
+ y3i = x5i - x1i;
+ y4r = x3r - x5r;
+ y4i = x3i - x5i;
+ y5r = x2r + x4r + x6r;
+ y5i = x2i + x4i + x6i;
+ y6r = x2r - x4r;
+ y6i = x2i - x4i;
+ y7r = x6r - x2r;
+ y7i = x6i - x2i;
+ y8r = x4r - x6r;
+ y8i = x4i - x6i;
+
+ x0r = y0r + y1r;
+ x0i = y0i + y1i;
+ x1r = y0r + C70 * y1r;
+ x1i = y0i + C70 * y1i;
+ x2r = C71 * y2r;
+ x2i = C71 * y2i;
+ x3r = C72 * y3r;
+ x3i = C72 * y3i;
+ x4r = C73 * y4r;
+ x4i = C73 * y4i;
+ x5r = C74 * y5i;
+ x5i = -C74 * y5r;
+ x6r = C75 * y6i;
+ x6i = -C75 * y6r;
+ x7r = C76 * y7i;
+ x7i = -C76 * y7r;
+ x8r = C77 * y8i;
+ x8i = -C77 * y8r;
+
+ y0r = x0r;
+ y0i = x0i;
+ y1r = x1r + x2r + x4r;
+ y1i = x1i + x2i + x4i;
+ y2r = x1r - x2r - x3r;
+ y2i = x1i - x2i - x3i;
+ y3r = x1r + x3r - x4r;
+ y3i = x1i + x3i - x4i;
+ y4r = x5r + x6r + x8r;
+ y4i = x5i + x6i + x8i;
+ y5r = x5r - x6r - x7r;
+ y5i = x5i - x6i - x7i;
+ y6r = x5r + x7r - x8r;
+ y6i = x5i + x7i - x8i;
+
+ x0r = y0r;
+ x0i = y0i;
+ x1r = y1r + y4r;
+ x1i = y1i + y4i;
+ x2r = y3r + y6r;
+ x2i = y3i + y6i;
+ x3r = y2r - y5r;
+ x3i = y2i - y5i;
+ x4r = y2r + y5r;
+ x4i = y2i + y5i;
+ x5r = y3r - y6r;
+ x5i = y3i - y6i;
+ x6r = y1r - y4r;
+ x6i = y1i - y4i;
+
+ op[0] = x0r;
+ op[1] = x0i;
+ op[2] = x1r;
+ op[3] = x1i;
+ op[4] = x2r;
+ op[5] = x2i;
+ op[6] = x3r;
+ op[7] = x3i;
+ op[8] = x4r;
+ op[9] = x4i;
+ op[10] = x5r;
+ op[11] = x5i;
+ op[12] = x6r;
+ op[13] = x6i;
+
+ return;
+}
+
+VOID ixheaacd_hbe_apply_fft_3(FLOAT32 *inp, FLOAT32 *op, WORD32 i_sign) {
+ FLOAT32 add_r, sub_r;
+ FLOAT32 add_i, sub_i;
+ FLOAT32 X01r, X01i, temp;
+
+ FLOAT32 p1, p2, p3, p4;
+
+ FLOAT64 sinmu;
+ sinmu = -0.866025403784439 * (FLOAT64)i_sign;
+
+ X01r = inp[0] + inp[2];
+ X01i = inp[1] + inp[3];
+
+ add_r = inp[2] + inp[4];
+ add_i = inp[3] + inp[5];
+
+ sub_r = inp[2] - inp[4];
+ sub_i = inp[3] - inp[5];
+
+ p1 = add_r / (FLOAT32)2.0;
+ p4 = add_i / (FLOAT32)2.0;
+ p2 = (FLOAT32)((FLOAT64)sub_i * sinmu);
+ p3 = (FLOAT32)((FLOAT64)sub_r * sinmu);
+
+ temp = inp[0] - p1;
+
+ op[0] = X01r + inp[4];
+ op[1] = X01i + inp[5];
+ op[2] = temp + p2;
+ op[3] = (inp[1] - p3) - p4;
+ op[4] = temp - p2;
+ op[5] = (inp[1] + p3) - p4;
+
+ return;
+}
+
+VOID ixheaacd_hbe_apply_tw_mult_ifft(FLOAT32 *inp, FLOAT32 *op, WORD32 dim1, WORD32 dim2,
+ const FLOAT32 *tw) {
+ FLOAT32 accu1, accu2;
+ WORD32 i, j;
+ WORD32 step_val = (dim2 - 1) << 1;
+ for (i = 0; i < (dim2); i++) {
+ op[0] = inp[0];
+ op[1] = inp[1];
+ op += 2;
+ inp += 2;
+ }
+
+ for (j = 0; j < (dim1 - 1); j++) {
+ op[0] = inp[0];
+ op[1] = inp[1];
+ inp += 2;
+ op += 2;
+ for (i = 0; i < (dim2 - 1); i++) {
+ CPLX_MPY_IFFT(accu1, accu2, inp[2 * i + 0], inp[2 * i + 1], tw[2 * i + 1], tw[2 * i]);
+ op[2 * i + 0] = accu1;
+ op[2 * i + 1] = accu2;
+ }
+ inp += step_val;
+ op += step_val;
+ tw += (dim2 - 1) * 2;
+ }
+}
+
+VOID ixheaacd_hbe_apply_tw_mult_fft(FLOAT32 *inp, FLOAT32 *op, WORD32 dim1, WORD32 dim2,
+ const FLOAT32 *tw) {
+ FLOAT32 accu1, accu2;
+ WORD32 i, j;
+ WORD32 step_val = (dim2 - 1) << 1;
+ for (i = 0; i < (dim2); i++) {
+ op[0] = inp[0];
+ op[1] = inp[1];
+ op += 2;
+ inp += 2;
+ }
+
+ for (j = 0; j < (dim1 - 1); j++) {
+ op[0] = inp[0];
+ op[1] = inp[1];
+ inp += 2;
+ op += 2;
+ for (i = 0; i < (dim2 - 1); i++) {
+ CPLX_MPY_FFT(accu1, accu2, inp[2 * i + 0], inp[2 * i + 1], tw[2 * i + 1], tw[2 * i]);
+ op[2 * i + 0] = accu1;
+ op[2 * i + 1] = accu2;
+ }
+ inp += step_val;
+ op += step_val;
+ tw += (dim2 - 1) * 2;
+ }
+}
+
+VOID ixheaacd_hbe_apply_cfftn(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass, WORD32 i_sign) {
+ WORD32 i, j, k, n_stages, h2;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+ WORD32 del, nodespacing, in_loop_cnt;
+ WORD32 not_power_4;
+ WORD32 dig_rev_shift;
+ WORD32 mpass = n_pass;
+ WORD32 npoints = n_pass;
+ const FLOAT64 *ptr_w;
+ FLOAT32 *ptr_x = scratch;
+ FLOAT32 *y = scratch + (2 * n_pass);
+ FLOAT32 *ptr_y = y;
+
+ dig_rev_shift = ixheaacd_norm32(mpass) + 1 - 16;
+ n_stages = 30 - ixheaacd_norm32(mpass);
+ not_power_4 = n_stages & 1;
+
+ n_stages = n_stages >> 1;
+
+ ptr_w = ixheaacd_twid_tbl_fft_double;
+ ptr_x = re;
+
+ if (i_sign == -1) {
+ for (i = 0; i < npoints; i += 4) {
+ FLOAT32 *inp = ptr_x;
+ FLOAT32 tmk;
+
+ DIG_REV(i, dig_rev_shift, h2);
+ if (not_power_4) {
+ h2 += 1;
+ h2 &= ~1;
+ }
+ inp += (h2);
+
+ x0r = *inp;
+ x0i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x1r = *inp;
+ x1i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x2r = *inp;
+ x2i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x3r = *inp;
+ x3i = *(inp + 1);
+
+ x0r = x0r + x2r;
+ x0i = x0i + x2i;
+
+ tmk = x0r - x2r;
+ x2r = tmk - x2r;
+ tmk = x0i - x2i;
+ x2i = tmk - x2i;
+
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+
+ tmk = x1r - x3r;
+ x3r = tmk - x3r;
+ tmk = x1i - x3i;
+ x3i = tmk - x3i;
+
+ x0r = x0r + x1r;
+ x0i = x0i + x1i;
+
+ tmk = x0r - x1r;
+ x1r = tmk - x1r;
+ tmk = x0i - x1i;
+ x1i = tmk - x1i;
+
+ x2r = x2r + x3i;
+ x2i = x2i - x3r;
+
+ tmk = x2r - x3i;
+ x3i = tmk - x3i;
+ tmk = x2i + x3r;
+ x3r = tmk + x3r;
+
+ *ptr_y++ = x0r;
+ *ptr_y++ = x0i;
+ *ptr_y++ = x2r;
+ *ptr_y++ = x2i;
+ *ptr_y++ = x1r;
+ *ptr_y++ = x1i;
+ *ptr_y++ = x3i;
+ *ptr_y++ = x3r;
+ }
+ ptr_y -= 2 * npoints;
+ del = 4;
+ nodespacing = 64;
+ in_loop_cnt = npoints >> 4;
+ for (i = n_stages - 1; i > 0; i--) {
+ const FLOAT64 *twiddles = ptr_w;
+ FLOAT32 *data = ptr_y;
+ FLOAT64 W1, W2, W3, W4, W5, W6;
+ WORD32 sec_loop_cnt;
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ x0r = (*data);
+ x0i = (*(data + 1));
+ data += (del << 1);
+
+ x1r = (*data);
+ x1i = (*(data + 1));
+ data += (del << 1);
+
+ x2r = (*data);
+ x2i = (*(data + 1));
+ data += (del << 1);
+
+ x3r = (*data);
+ x3i = (*(data + 1));
+ data -= 3 * (del << 1);
+
+ x0r = x0r + x2r;
+ x0i = x0i + x2i;
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + x1r;
+ x0i = x0i + x1i;
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r + x3i;
+ x2i = x2i - x3r;
+ x3i = x2r - (x3i * 2);
+ x3r = x2i + (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data = ptr_y + 2;
+
+ sec_loop_cnt = (nodespacing * del);
+ sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) - (sec_loop_cnt / 16) +
+ (sec_loop_cnt / 32) - (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
+ (sec_loop_cnt / 256);
+ j = nodespacing;
+
+ for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1));
+ W5 = *(twiddles + (j << 1) + 257);
+ W3 = *(twiddles + j + (j << 1));
+ W6 = *(twiddles + j + (j << 1) + 257);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x1r, W4),
+ (FLOAT64)x1i, W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x2r, W2) -
+ ixheaacd_mult32X32float((FLOAT64)x2i, W5));
+ x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x2r, W5),
+ (FLOAT64)x2i, W2);
+ x2r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x3r, W3) -
+ ixheaacd_mult32X32float((FLOAT64)x3i, W6));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x3r, W6),
+ (FLOAT64)x3i, W3);
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r + (x3i);
+ x2i = x2i - (x3r);
+ x3i = x2r - (x3i * 2);
+ x3r = x2i + (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1));
+ W5 = *(twiddles + (j << 1) + 257);
+ W3 = *(twiddles + j + (j << 1) - 256);
+ W6 = *(twiddles + j + (j << 1) + 1);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x1r, W4),
+ (FLOAT64)x1i, W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x2r, W2) -
+ ixheaacd_mult32X32float((FLOAT64)x2i, W5));
+ x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x2r, W5),
+ (FLOAT64)x2i, W2);
+ x2r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x3r, W6) +
+ ixheaacd_mult32X32float((FLOAT64)x3i, W3));
+ x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT64)x3r, W3) +
+ ixheaacd_mult32X32float((FLOAT64)x3i, W6));
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r + (x3i);
+ x2i = x2i - (x3r);
+ x3i = x2r - (x3i * 2);
+ x3r = x2i + (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j <= sec_loop_cnt * 2; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1) - 256);
+ W5 = *(twiddles + (j << 1) + 1);
+ W3 = *(twiddles + j + (j << 1) - 256);
+ W6 = *(twiddles + j + (j << 1) + 1);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, W4), x1i, W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x2r, W5) +
+ ixheaacd_mult32X32float((FLOAT64)x2i, W2));
+ x2i = (FLOAT32)(-ixheaacd_mult32X32float(x2r, W2) + ixheaacd_mult32X32float(x2i, W5));
+ x2r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x3r, W6) +
+ ixheaacd_mult32X32float((FLOAT64)x3i, W3));
+ x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT64)x3r, W3) +
+ ixheaacd_mult32X32float((FLOAT64)x3i, W6));
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r + (x3i);
+ x2i = x2i - (x3r);
+ x3i = x2r - (x3i * 2);
+ x3r = x2i + (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j < nodespacing * del; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1) - 256);
+ W5 = *(twiddles + (j << 1) + 1);
+ W3 = *(twiddles + j + (j << 1) - 512);
+ W6 = *(twiddles + j + (j << 1) - 512 + 257);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x1r, W4),
+ (FLOAT64)x1i, W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x2r, W5) +
+ ixheaacd_mult32X32float((FLOAT64)x2i, W2));
+ x2i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT64)x2r, W2) +
+ ixheaacd_mult32X32float((FLOAT64)x2i, W5));
+ x2r = tmp;
+
+ tmp = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT64)x3r, W3) +
+ ixheaacd_mult32X32float((FLOAT64)x3i, W6));
+ x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x3r, W6),
+ (FLOAT64)x3i, W3);
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i - x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i + (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r + (x3i);
+ x2i = x2i - (x3r);
+ x3i = x2r - (x3i * 2);
+ x3r = x2i + (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ nodespacing >>= 2;
+ del <<= 2;
+ in_loop_cnt >>= 2;
+ }
+ if (not_power_4) {
+ const FLOAT64 *twiddles = ptr_w;
+ nodespacing <<= 1;
+
+ for (j = del / 2; j != 0; j--) {
+ FLOAT64 W1 = *twiddles;
+ FLOAT64 W4 = *(twiddles + 257);
+ FLOAT32 tmp;
+ twiddles += nodespacing;
+
+ x0r = *ptr_y;
+ x0i = *(ptr_y + 1);
+ ptr_y += (del << 1);
+
+ x1r = *ptr_y;
+ x1i = *(ptr_y + 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W1) -
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT64)x1r, W4),
+ (FLOAT64)x1i, W1);
+ x1r = tmp;
+
+ *ptr_y = (x0r) - (x1r);
+ *(ptr_y + 1) = (x0i) - (x1i);
+ ptr_y -= (del << 1);
+
+ *ptr_y = (x0r) + (x1r);
+ *(ptr_y + 1) = (x0i) + (x1i);
+ ptr_y += 2;
+ }
+ twiddles = ptr_w;
+ for (j = del / 2; j != 0; j--) {
+ FLOAT64 W1 = *twiddles;
+ FLOAT64 W4 = *(twiddles + 257);
+ FLOAT32 tmp;
+ twiddles += nodespacing;
+
+ x0r = *ptr_y;
+ x0i = *(ptr_y + 1);
+ ptr_y += (del << 1);
+
+ x1r = *ptr_y;
+ x1i = *(ptr_y + 1);
+
+ tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT64)x1r, W4) +
+ ixheaacd_mult32X32float((FLOAT64)x1i, W1));
+ x1i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT64)x1r, W1) +
+ ixheaacd_mult32X32float((FLOAT64)x1i, W4));
+ x1r = tmp;
+
+ *ptr_y = (x0r) - (x1r);
+ *(ptr_y + 1) = (x0i) - (x1i);
+ ptr_y -= (del << 1);
+
+ *ptr_y = (x0r) + (x1r);
+ *(ptr_y + 1) = (x0i) + (x1i);
+ ptr_y += 2;
+ }
+ }
+ } else {
+ for (i = 0; i < npoints; i += 4) {
+ FLOAT32 *inp = ptr_x;
+
+ DIG_REV(i, dig_rev_shift, h2);
+ if (not_power_4) {
+ h2 += 1;
+ h2 &= ~1;
+ }
+ inp += (h2);
+
+ x0r = *inp;
+ x0i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x1r = *inp;
+ x1i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x2r = *inp;
+ x2i = *(inp + 1);
+ inp += (npoints >> 1);
+
+ x3r = *inp;
+ x3i = *(inp + 1);
+
+ x0r = x0r + x2r;
+ x0i = x0i + x2i;
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + x1r;
+ x0i = x0i + x1i;
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - x3i;
+ x2i = x2i + x3r;
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *ptr_y++ = x0r;
+ *ptr_y++ = x0i;
+ *ptr_y++ = x2r;
+ *ptr_y++ = x2i;
+ *ptr_y++ = x1r;
+ *ptr_y++ = x1i;
+ *ptr_y++ = x3i;
+ *ptr_y++ = x3r;
+ }
+ ptr_y -= 2 * npoints;
+ del = 4;
+ nodespacing = 64;
+ in_loop_cnt = npoints >> 4;
+ for (i = n_stages - 1; i > 0; i--) {
+ const FLOAT64 *twiddles = ptr_w;
+ FLOAT32 *data = ptr_y;
+ FLOAT64 W1, W2, W3, W4, W5, W6;
+ WORD32 sec_loop_cnt;
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ x0r = (*data);
+ x0i = (*(data + 1));
+ data += (del << 1);
+
+ x1r = (*data);
+ x1i = (*(data + 1));
+ data += (del << 1);
+
+ x2r = (*data);
+ x2i = (*(data + 1));
+ data += (del << 1);
+
+ x3r = (*data);
+ x3i = (*(data + 1));
+ data -= 3 * (del << 1);
+
+ x0r = x0r + x2r;
+ x0i = x0i + x2i;
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + x1r;
+ x0i = x0i + x1i;
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - x3i;
+ x2i = x2i + x3r;
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data = ptr_y + 2;
+
+ sec_loop_cnt = (nodespacing * del);
+ sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) - (sec_loop_cnt / 16) +
+ (sec_loop_cnt / 32) - (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
+ (sec_loop_cnt / 256);
+ j = nodespacing;
+
+ for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1));
+ W5 = *(twiddles + (j << 1) + 257);
+ W3 = *(twiddles + j + (j << 1));
+ W6 = *(twiddles + j + (j << 1) + 257);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1i = (FLOAT32)(-((FLOAT64)x1r * W4) + (FLOAT64)x1i * W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x2r * W2) + ((FLOAT64)x2i * W5));
+ x2i = (FLOAT32)(-((FLOAT64)x2r * W5) + (FLOAT64)x2i * W2);
+ x2r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x3r * W3) + ((FLOAT64)x3i * W6));
+ x3i = (FLOAT32)(-((FLOAT64)x3r * W6) + (FLOAT64)x3i * W3);
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - (x3i);
+ x2i = x2i + (x3r);
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1));
+ W5 = *(twiddles + (j << 1) + 257);
+ W3 = *(twiddles + j + (j << 1) - 256);
+ W6 = *(twiddles + j + (j << 1) + 1);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1i = (FLOAT32)(-((FLOAT64)x1r * W4) + (FLOAT64)x1i * W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x2r * W2) + ((FLOAT64)x2i * W5));
+ x2i = (FLOAT32)(-((FLOAT64)x2r * W5) + (FLOAT64)x2i * W2);
+ x2r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x3r * W6) - ((FLOAT64)x3i * W3));
+ x3i = (FLOAT32)(((FLOAT64)x3r * W3) + ((FLOAT64)x3i * W6));
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - (x3i);
+ x2i = x2i + (x3r);
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j <= sec_loop_cnt * 2; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1) - 256);
+ W5 = *(twiddles + (j << 1) + 1);
+ W3 = *(twiddles + j + (j << 1) - 256);
+ W6 = *(twiddles + j + (j << 1) + 1);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1i = (FLOAT32)(-((FLOAT64)x1r * W4) + (FLOAT64)x1i * W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x2r * W5) - ((FLOAT64)x2i * W2));
+ x2i = (FLOAT32)(((FLOAT64)x2r * W2) + ((FLOAT64)x2i * W5));
+ x2r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x3r * W6) - ((FLOAT64)x3i * W3));
+ x3i = (FLOAT32)(((FLOAT64)x3r * W3) + ((FLOAT64)x3i * W6));
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i + x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i - (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - (x3i);
+ x2i = x2i + (x3r);
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ for (; j < nodespacing * del; j += nodespacing) {
+ W1 = *(twiddles + j);
+ W4 = *(twiddles + j + 257);
+ W2 = *(twiddles + (j << 1) - 256);
+ W5 = *(twiddles + (j << 1) + 1);
+ W3 = *(twiddles + j + (j << 1) - 512);
+ W6 = *(twiddles + j + (j << 1) - 512 + 257);
+
+ for (k = in_loop_cnt; k != 0; k--) {
+ FLOAT32 tmp;
+ FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
+
+ data += (del << 1);
+
+ x1r = *data;
+ x1i = *(data + 1);
+ data += (del << 1);
+
+ x2r = *data;
+ x2i = *(data + 1);
+ data += (del << 1);
+
+ x3r = *data;
+ x3i = *(data + 1);
+ data -= 3 * (del << 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1i = (FLOAT32)(-((FLOAT64)x1r * W4) + (FLOAT64)x1i * W1);
+ x1r = tmp;
+
+ tmp = (FLOAT32)(((FLOAT64)x2r * W5) - ((FLOAT64)x2i * W2));
+ x2i = (FLOAT32)(((FLOAT64)x2r * W2) + ((FLOAT64)x2i * W5));
+ x2r = tmp;
+
+ tmp = (FLOAT32)(-((FLOAT64)x3r * W3) - ((FLOAT64)x3i * W6));
+ x3i = (FLOAT32)(-((FLOAT64)x3r * W6) + (FLOAT64)x3i * W3);
+ x3r = tmp;
+
+ x0r = (*data);
+ x0i = (*(data + 1));
+
+ x0r = x0r + (x2r);
+ x0i = x0i + (x2i);
+ x2r = x0r - (x2r * 2);
+ x2i = x0i - (x2i * 2);
+ x1r = x1r + x3r;
+ x1i = x1i - x3i;
+ x3r = x1r - (x3r * 2);
+ x3i = x1i + (x3i * 2);
+
+ x0r = x0r + (x1r);
+ x0i = x0i + (x1i);
+ x1r = x0r - (x1r * 2);
+ x1i = x0i - (x1i * 2);
+ x2r = x2r - (x3i);
+ x2i = x2i + (x3r);
+ x3i = x2r + (x3i * 2);
+ x3r = x2i - (x3r * 2);
+
+ *data = x0r;
+ *(data + 1) = x0i;
+ data += (del << 1);
+
+ *data = x2r;
+ *(data + 1) = x2i;
+ data += (del << 1);
+
+ *data = x1r;
+ *(data + 1) = x1i;
+ data += (del << 1);
+
+ *data = x3i;
+ *(data + 1) = x3r;
+ data += (del << 1);
+ }
+ data -= 2 * npoints;
+ data += 2;
+ }
+ nodespacing >>= 2;
+ del <<= 2;
+ in_loop_cnt >>= 2;
+ }
+
+ if (not_power_4) {
+ const FLOAT64 *twiddles = ptr_w;
+ nodespacing <<= 1;
+
+ for (j = del / 2; j != 0; j--) {
+ FLOAT64 W1 = *twiddles;
+ FLOAT64 W4 = *(twiddles + 257);
+ FLOAT32 tmp;
+ twiddles += nodespacing;
+
+ x0r = *ptr_y;
+ x0i = *(ptr_y + 1);
+ ptr_y += (del << 1);
+
+ x1r = *ptr_y;
+ x1i = *(ptr_y + 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1i = (FLOAT32)(-((FLOAT64)x1r * W4) + (FLOAT64)x1i * W1);
+ x1r = tmp;
+
+ *ptr_y = (x0r) - (x1r);
+ *(ptr_y + 1) = (x0i) - (x1i);
+ ptr_y -= (del << 1);
+
+ *ptr_y = (x0r) + (x1r);
+ *(ptr_y + 1) = (x0i) + (x1i);
+ ptr_y += 2;
+ }
+ twiddles = ptr_w;
+ for (j = del / 2; j != 0; j--) {
+ FLOAT64 W1 = *twiddles;
+ FLOAT64 W4 = *(twiddles + 257);
+ FLOAT32 tmp;
+ twiddles += nodespacing;
+
+ x0r = *ptr_y;
+ x0i = *(ptr_y + 1);
+ ptr_y += (del << 1);
+
+ x1r = *ptr_y;
+ x1i = *(ptr_y + 1);
+
+ tmp = (FLOAT32)(((FLOAT64)x1r * W4) - ((FLOAT64)x1i * W1));
+ x1i = (FLOAT32)(((FLOAT64)x1r * W1) + ((FLOAT64)x1i * W4));
+ x1r = tmp;
+
+ *ptr_y = (x0r) - (x1r);
+ *(ptr_y + 1) = (x0i) - (x1i);
+ ptr_y -= (del << 1);
+
+ *ptr_y = (x0r) + (x1r);
+ *(ptr_y + 1) = (x0i) + (x1i);
+ ptr_y += 2;
+ }
+ }
+ }
+
+ for (i = 0; i < n_pass; i++) {
+ re[2 * i + 0] = y[2 * i + 0];
+ re[2 * i + 1] = y[2 * i + 1];
+ }
+}
+
+VOID ixheaacd_hbe_apply_cfftn_gen(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass,
+ WORD32 i_sign) {
+ WORD32 i, j;
+ WORD32 m_points = n_pass;
+ FLOAT32 *x, *y, *re3;
+ FLOAT32 *ptr_x, *ptr_y;
+ ptr_x = x = scratch;
+ scratch += 2 * m_points;
+ ptr_y = y = scratch;
+ scratch += 4 * m_points;
+ re3 = scratch;
+ scratch += 2 * m_points;
+ WORD32 cnfac;
+ WORD32 mpass = n_pass;
+
+ cnfac = 0;
+ while (mpass % 3 == 0) {
+ mpass /= 3;
+ cnfac++;
+ }
+
+ for (i = 0; i < 3 * cnfac; i++) {
+ for (j = 0; j < mpass; j++) {
+ re3[2 * j + 0] = re[6 * j + 2 * i + 0];
+ re3[2 * j + 1] = re[6 * j + 2 * i + 1];
+ }
+
+ ixheaacd_hbe_apply_cfftn(re3, scratch, mpass, i_sign);
+
+ for (j = 0; j < mpass; j++) {
+ re[6 * j + 2 * i + 0] = re3[2 * j + 0];
+ re[6 * j + 2 * i + 1] = re3[2 * j + 1];
+ }
+ }
+
+ {
+ FLOAT64 *w1r, *w1i;
+ FLOAT32 tmp;
+ w1r = (FLOAT64 *)ixheaacd_twid_tbl_fft_ntwt3r;
+ w1i = (FLOAT64 *)ixheaacd_twid_tbl_fft_ntwt3i;
+
+ if (i_sign < 0) {
+
+ for (i = 0; i < n_pass; i += 3) {
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 0] * (*w1r) - (FLOAT64)re[2 * i + 1] * (*w1i));
+ re[2 * i + 1] =
+ (FLOAT32)((FLOAT64)re[2 * i + 0] * (*w1i) + (FLOAT64)re[2 * i + 1] * (*w1r));
+ re[2 * i + 0] = tmp;
+
+ w1r++;
+ w1i++;
+
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 2] * (*w1r) - (FLOAT64)re[2 * i + 3] * (*w1i));
+ re[2 * i + 3] =
+ (FLOAT32)((FLOAT64)re[2 * i + 2] * (*w1i) + (FLOAT64)re[2 * i + 3] * (*w1r));
+ re[2 * i + 2] = tmp;
+
+ w1r++;
+ w1i++;
+
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 4] * (*w1r) - (FLOAT64)re[2 * i + 5] * (*w1i));
+ re[2 * i + 5] =
+ (FLOAT32)((FLOAT64)re[2 * i + 4] * (*w1i) + (FLOAT64)re[2 * i + 5] * (*w1r));
+ re[2 * i + 4] = tmp;
+
+ w1r += 3 * (128 / mpass - 1) + 1;
+ w1i += 3 * (128 / mpass - 1) + 1;
+ }
+ } else {
+ for (i = 0; i < n_pass; i += 3) {
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 0] * (*w1r) + (FLOAT64)re[2 * i + 1] * (*w1i));
+ re[2 * i + 1] =
+ (FLOAT32)(-(FLOAT64)re[2 * i + 0] * (*w1i) + (FLOAT64)re[2 * i + 1] * (*w1r));
+ re[2 * i + 0] = tmp;
+
+ w1r++;
+ w1i++;
+
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 2] * (*w1r) + (FLOAT64)re[2 * i + 3] * (*w1i));
+ re[2 * i + 3] =
+ (FLOAT32)(-(FLOAT64)re[2 * i + 2] * (*w1i) + (FLOAT64)re[2 * i + 3] * (*w1r));
+ re[2 * i + 2] = tmp;
+
+ w1r++;
+ w1i++;
+
+ tmp = (FLOAT32)((FLOAT64)re[2 * i + 4] * (*w1r) + (FLOAT64)re[2 * i + 5] * (*w1i));
+ re[2 * i + 5] =
+ (FLOAT32)(-(FLOAT64)re[2 * i + 4] * (*w1i) + (FLOAT64)re[2 * i + 5] * (*w1r));
+ re[2 * i + 4] = tmp;
+
+ w1r += 3 * (128 / mpass - 1) + 1;
+ w1i += 3 * (128 / mpass - 1) + 1;
+ }
+ }
+ }
+
+ for (i = 0; i < n_pass; i++) {
+ ptr_x[2 * i + 0] = re[2 * i + 0];
+ ptr_x[2 * i + 1] = re[2 * i + 1];
+ }
+ for (i = 0; i < mpass; i++) {
+ ixheaacd_hbe_apply_fft_3(ptr_x, ptr_y, i_sign);
+
+ ptr_x = ptr_x + 6;
+ ptr_y = ptr_y + 6;
+ }
+
+ for (i = 0; i < mpass; i++) {
+ re[2 * i + 0] = y[6 * i + 0];
+ re[2 * i + 1] = y[6 * i + 1];
+ }
+
+ for (i = 0; i < mpass; i++) {
+ re[2 * mpass + 2 * i + 0] = y[6 * i + 2];
+ re[2 * mpass + 2 * i + 1] = y[6 * i + 3];
+ }
+
+ for (i = 0; i < mpass; i++) {
+ re[4 * mpass + 2 * i + 0] = y[6 * i + 4];
+ re[4 * mpass + 2 * i + 1] = y[6 * i + 5];
+ }
+}
+
+VOID ixheaacd_hbe_apply_fft_288(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 i_sign) {
+ FLOAT32 *op = scratch;
+ WORD32 mpoints = len / 96;
+ WORD32 fpoints = len / 3;
+ WORD32 ii, jj;
+ scratch += 2 * len;
+
+ for (ii = 0; ii < mpoints; ii++) {
+ for (jj = 0; jj < fpoints; jj++) {
+ op[2 * jj + 0] = inp[2 * mpoints * jj + 2 * ii];
+ op[2 * jj + 1] = inp[2 * mpoints * jj + 2 * ii + 1];
+ }
+
+ if (fpoints & (fpoints - 1))
+ ixheaacd_hbe_apply_cfftn_gen(op, scratch, fpoints, i_sign);
+ else
+ ixheaacd_hbe_apply_cfftn(op, scratch, fpoints, i_sign);
+
+ for (jj = 0; jj < fpoints; jj++) {
+ inp[mpoints * 2 * jj + 2 * ii + 0] = op[2 * jj + 0];
+ inp[mpoints * 2 * jj + 2 * ii + 1] = op[2 * jj + 1];
+ }
+ }
+
+ ixheaacd_hbe_apply_tw_mult_fft(inp, op, fpoints, mpoints, ixheaacd_twid_tbl_fft_288);
+
+ for (ii = 0; ii < fpoints; ii++) {
+ ixheaacd_hbe_apply_fft_3(op, scratch, i_sign);
+ op = op + (mpoints * 2);
+ scratch = scratch + (mpoints * 2);
+ }
+
+ scratch -= fpoints * mpoints * 2;
+
+ for (jj = 0; jj < fpoints; jj++) {
+ inp[2 * jj + 0] = scratch[6 * jj];
+ inp[2 * jj + 1] = scratch[6 * jj + 1];
+ }
+ for (jj = 0; jj < fpoints; jj++) {
+ inp[2 * fpoints + 2 * jj + 0] = scratch[6 * jj + 2];
+ inp[2 * fpoints + 2 * jj + 1] = scratch[6 * jj + 3];
+ }
+ for (jj = 0; jj < fpoints; jj++) {
+ inp[4 * fpoints + 2 * jj + 0] = scratch[6 * jj + 4];
+ inp[4 * fpoints + 2 * jj + 1] = scratch[6 * jj + 5];
+ }
+}
+
+VOID ixheaacd_hbe_apply_ifft_224(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 i_sign) {
+ WORD32 mpoints = len / 32;
+ WORD32 fpoints = len / 7;
+ WORD32 ii, jj;
+ FLOAT32 *op = scratch;
+ scratch += 2 * len;
+
+ for (ii = 0; ii < mpoints; ii++) {
+ for (jj = 0; jj < fpoints; jj++) {
+ op[2 * jj + 0] = inp[2 * mpoints * jj + 2 * ii];
+ op[2 * jj + 1] = inp[2 * mpoints * jj + 2 * ii + 1];
+ }
+
+ if (fpoints & (fpoints - 1))
+ ixheaacd_hbe_apply_cfftn_gen(op, scratch, fpoints, i_sign);
+ else
+ ixheaacd_hbe_apply_cfftn(op, scratch, fpoints, i_sign);
+
+ for (jj = 0; jj < fpoints; jj++) {
+ inp[mpoints * 2 * jj + 2 * ii + 0] = op[2 * jj + 0];
+ inp[mpoints * 2 * jj + 2 * ii + 1] = op[2 * jj + 1];
+ }
+ }
+
+ ixheaacd_hbe_apply_tw_mult_ifft(inp, op, fpoints, mpoints, ixheaacd_twid_tbl_fft_224);
+
+ for (ii = 0; ii < fpoints; ii++) {
+ ixheaacd_hbe_apply_ifft_7(op, scratch);
+ scratch += (mpoints * 2);
+ op += (mpoints * 2);
+ }
+
+ scratch -= fpoints * mpoints * 2;
+
+ for (jj = 0; jj < fpoints; jj++) {
+ for (ii = 0; ii < mpoints; ii++) {
+ inp[fpoints * ii * 2 + 2 * jj + 0] = scratch[mpoints * jj * 2 + 2 * ii + 0];
+ inp[fpoints * ii * 2 + 2 * jj + 1] = scratch[mpoints * jj * 2 + 2 * ii + 1];
+ }
+ }
+}
+
+VOID ixheaacd_hbe_apply_ifft_336(FLOAT32 *inp, FLOAT32 *ptr_scratch, WORD32 len,
+ WORD32 i_sign) {
+ WORD32 i, j;
+ WORD32 m_points = len / 7;
+ WORD32 n_points = len / 48;
+ FLOAT32 *ptr_real, *ptr_imag, *p_real_1, *p_scratch;
+ ptr_real = ptr_scratch;
+ ptr_scratch += 2 * len;
+ ptr_imag = ptr_scratch;
+ ptr_scratch += len;
+ p_scratch = ptr_scratch;
+ ptr_scratch += len;
+ p_real_1 = ptr_scratch;
+ ptr_scratch += len;
+
+ for (i = 0; i < len; i++) {
+ ptr_real[i] = inp[2 * i + 0];
+ ptr_imag[i] = inp[2 * i + 1];
+ }
+
+ for (i = 0; i < m_points; i++) {
+ for (j = 0; j < n_points; j++) {
+ p_real_1[2 * j + 0] = inp[m_points * 2 * j + 2 * i + 0];
+ p_real_1[2 * j + 1] = inp[m_points * 2 * j + 2 * i + 1];
+ }
+
+ ixheaacd_hbe_apply_ifft_7(p_real_1, ptr_scratch);
+
+ for (j = 0; j < n_points; j++) {
+ inp[m_points * 2 * j + 2 * i + 0] = ptr_scratch[2 * j + 0];
+ inp[m_points * 2 * j + 2 * i + 1] = ptr_scratch[2 * j + 1];
+ }
+ }
+
+ if (m_points == 48)
+ ixheaacd_hbe_apply_tw_mult_ifft(inp, p_scratch, n_points, m_points,
+ ixheaacd_twid_tbl_fft_336);
+ else
+ ixheaacd_hbe_apply_tw_mult_ifft(inp, p_scratch, n_points, m_points,
+ ixheaacd_twid_tbl_fft_168);
+
+ for (i = 0; i < len; i++) {
+ ptr_real[2 * i + 0] = p_scratch[2 * i + 0];
+ ptr_real[2 * i + 1] = p_scratch[2 * i + 1];
+ }
+
+ for (i = 0; i < n_points; i++) {
+ ixheaacd_hbe_apply_cfftn_gen(ptr_real, ptr_scratch, m_points, i_sign);
+ ptr_real += (2 * m_points);
+ }
+
+ ptr_real -= n_points * 2 * m_points;
+
+ for (j = 0; j < n_points; j++) {
+ for (i = 0; i < m_points; i++) {
+ inp[n_points * 2 * i + 2 * j + 0] = ptr_real[2 * m_points * j + 2 * i + 0];
+ inp[n_points * 2 * i + 2 * j + 1] = ptr_real[2 * m_points * j + 2 * i + 1];
+ }
+ }
+ return;
+}
+
diff --git a/decoder/ixheaacd_fft_ifft_32x32_rom.c b/decoder/ixheaacd_fft_ifft_32x32_rom.c
new file mode 100644
index 0000000..411aae4
--- /dev/null
+++ b/decoder/ixheaacd_fft_ifft_32x32_rom.c
@@ -0,0 +1,1210 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+
+const FLOAT64 ixheaacd_twid_tbl_fft_double[514] = {
+ 1.00000000000000000000, 0.99998117528260111000, 0.99992470183914450000,
+ 0.99983058179582340000, 0.99969881869620425000, 0.99952941750109314000,
+ 0.99932238458834954000, 0.99907772775264536000, 0.99879545620517241000,
+ 0.99847558057329477000, 0.99811811290014918000, 0.99772306664419164000,
+ 0.99729045667869021000, 0.99682029929116567000, 0.99631261218277800000,
+ 0.99576741446765982000, 0.99518472667219693000, 0.99456457073425542000,
+ 0.99390697000235606000, 0.99321194923479450000, 0.99247953459870997000,
+ 0.99170975366909953000, 0.99090263542778001000, 0.99005821026229712000,
+ 0.98917650996478101000, 0.98825756773074946000, 0.98730141815785843000,
+ 0.98630809724459867000, 0.98527764238894122000, 0.98421009238692903000,
+ 0.98310548743121629000, 0.98196386910955524000, 0.98078528040323043000,
+ 0.97956976568544052000, 0.97831737071962765000, 0.97702814265775439000,
+ 0.97570213003852857000, 0.97433938278557586000, 0.97293995220556018000,
+ 0.97150389098625178000, 0.97003125319454397000, 0.96852209427441738000,
+ 0.96697647104485207000, 0.96539444169768940000, 0.96377606579543984000,
+ 0.96212140426904158000, 0.96043051941556579000, 0.95870347489587160000,
+ 0.95694033573220882000, 0.95514116830577078000, 0.95330604035419386000,
+ 0.95143502096900834000, 0.94952818059303667000, 0.94758559101774109000,
+ 0.94560732538052128000, 0.94359345816196039000, 0.94154406518302081000,
+ 0.93945922360218992000, 0.93733901191257496000, 0.93518350993894761000,
+ 0.93299279883473896000, 0.93076696107898371000, 0.92850608047321559000,
+ 0.92621024213831138000, 0.92387953251128674000, 0.92151403934204201000,
+ 0.91911385169005777000, 0.91667905992104270000, 0.91420975570353069000,
+ 0.91170603200542988000, 0.90916798309052238000, 0.90659570451491533000,
+ 0.90398929312344334000, 0.90134884704602203000, 0.89867446569395382000,
+ 0.89596624975618522000, 0.89322430119551532000, 0.89044872324475788000,
+ 0.88763962040285393000, 0.88479709843093779000, 0.88192126434835505000,
+ 0.87901222642863353000, 0.87607009419540660000, 0.87309497841829009000,
+ 0.87008699110871146000, 0.86704624551569265000, 0.86397285612158681000,
+ 0.86086693863776731000, 0.85772861000027212000, 0.85455798836540053000,
+ 0.85135519310526520000, 0.84812034480329723000, 0.84485356524970712000,
+ 0.84155497743689844000, 0.83822470555483808000, 0.83486287498638001000,
+ 0.83146961230254524000, 0.82804504525775580000, 0.82458930278502529000,
+ 0.82110251499110465000, 0.81758481315158371000, 0.81403632970594841000,
+ 0.81045719825259477000, 0.80684755354379933000, 0.80320753148064494000,
+ 0.79953726910790501000, 0.79583690460888357000, 0.79210657730021239000,
+ 0.78834642762660634000, 0.78455659715557524000, 0.78073722857209449000,
+ 0.77688846567323244000, 0.77301045336273699000, 0.76910333764557970000,
+ 0.76516726562245896000, 0.76120238548426178000, 0.75720884650648457000,
+ 0.75318679904361252000, 0.74913639452345937000, 0.74505778544146606000,
+ 0.74095112535495911000, 0.73681656887736990000, 0.73265427167241282000,
+ 0.72846439044822520000, 0.72424708295146700000, 0.72000250796138165000,
+ 0.71573082528381859000, 0.71143219574521643000, 0.70710678118654757000,
+ 0.70275474445722530000, 0.69837624940897292000, 0.69397146088965400000,
+ 0.68954054473706694000, 0.68508366777270036000, 0.68060099779545313000,
+ 0.67609270357531603000, 0.67155895484701833000, 0.66699992230363747000,
+ 0.66241577759017178000, 0.65780669329707864000, 0.65317284295377676000,
+ 0.64851440102211255000, 0.64383154288979150000, 0.63912444486377573000,
+ 0.63439328416364549000, 0.62963823891492710000, 0.62485948814238645000,
+ 0.62005721176328921000, 0.61523159058062682000, 0.61038280627630948000,
+ 0.60551104140432555000, 0.60061647938386897000, 0.59569930449243347000,
+ 0.59075970185887428000, 0.58579785745643886000, 0.58081395809576453000,
+ 0.57580819141784534000, 0.57078074588696737000, 0.56573181078361323000,
+ 0.56066157619733603000, 0.55557023301960229000, 0.55045797293660481000,
+ 0.54532498842204646000, 0.54017147272989297000, 0.53499761988709726000,
+ 0.52980362468629483000, 0.52458968267846884000, 0.51935599016558953000,
+ 0.51410274419322166000, 0.50883014254310699000, 0.50353838372571758000,
+ 0.49822766697278187000, 0.49289819222978409000, 0.48755016014843605000,
+ 0.48218377207912283000, 0.47679923006332225000, 0.47139673682599781000,
+ 0.46597649576796613000, 0.46053871095824001000, 0.45508358712634384000,
+ 0.44961132965460660000, 0.44412214457042926000, 0.43861623853852771000,
+ 0.43309381885315201000, 0.42755509343028220000, 0.42200027079979979000,
+ 0.41642956009763732000, 0.41084317105790391000, 0.40524131400498986000,
+ 0.39962419984564679000, 0.39399204006104810000, 0.38834504669882630000,
+ 0.38268343236508984000, 0.37700741021641831000, 0.37131719395183760000,
+ 0.36561299780477396000, 0.35989503653498828000, 0.35416352542049051000,
+ 0.34841868024943451000, 0.34266071731199438000, 0.33688985339222005000,
+ 0.33110630575987643000, 0.32531029216226298000, 0.31950203081601575000,
+ 0.31368174039889157000, 0.30784964004153498000, 0.30200594931922820000,
+ 0.29615088824362396000, 0.29028467725446233000, 0.28440753721127182000,
+ 0.27851968938505306000, 0.27262135544994898000, 0.26671275747489842000,
+ 0.26079411791527557000, 0.25486565960451463000, 0.24892760574572026000,
+ 0.24298017990326398000, 0.23702360599436734000, 0.23105810828067128000,
+ 0.22508391135979278000, 0.21910124015686977000, 0.21311031991609136000,
+ 0.20711137619221856000, 0.20110463484209196000, 0.19509032201612833000,
+ 0.18906866414980628000, 0.18303988795514106000, 0.17700422041214886000,
+ 0.17096188876030136000, 0.16491312048997009000, 0.15885814333386139000,
+ 0.15279718525844341000, 0.14673047445536175000, 0.14065823933284924000,
+ 0.13458070850712622000, 0.12849811079379322000, 0.12241067519921628000,
+ 0.11631863091190488000, 0.11022220729388318000, 0.10412163387205473000,
+ 0.09801714032956077000, 0.09190895649713269600, 0.08579731234443988000,
+ 0.07968243797143012600, 0.07356456359966745400, 0.06744391956366410600,
+ 0.06132073630220864800, 0.05519524434969003100, 0.04906767432741812600,
+ 0.04293825693494095900, 0.03680722294135899100, 0.03067480317663658100,
+ 0.02454122852291226400, 0.01840672990580482000, 0.01227153828571994400,
+ 0.00613588464915451520, 0.00000000000000006123, 0.00000000000000000000,
+ -0.00613588464915447530, -0.01227153828571992500, -0.01840672990580482000,
+ -0.02454122852291228800, -0.03067480317663662600, -0.03680722294135883200,
+ -0.04293825693494082000, -0.04906767432741801500, -0.05519524434968993400,
+ -0.06132073630220857800, -0.06744391956366405100, -0.07356456359966742600,
+ -0.07968243797143012600, -0.08579731234443989400, -0.09190895649713272400,
+ -0.09801714032956060400, -0.10412163387205459000, -0.11022220729388306000,
+ -0.11631863091190475000, -0.12241067519921620000, -0.12849811079379317000,
+ -0.13458070850712617000, -0.14065823933284921000, -0.14673047445536175000,
+ -0.15279718525844344000, -0.15885814333386145000, -0.16491312048996989000,
+ -0.17096188876030122000, -0.17700422041214875000, -0.18303988795514095000,
+ -0.18906866414980619000, -0.19509032201612825000, -0.20110463484209190000,
+ -0.20711137619221856000, -0.21311031991609136000, -0.21910124015686980000,
+ -0.22508391135979283000, -0.23105810828067111000, -0.23702360599436720000,
+ -0.24298017990326387000, -0.24892760574572015000, -0.25486565960451457000,
+ -0.26079411791527551000, -0.26671275747489837000, -0.27262135544994898000,
+ -0.27851968938505306000, -0.28440753721127188000, -0.29028467725446233000,
+ -0.29615088824362379000, -0.30200594931922808000, -0.30784964004153487000,
+ -0.31368174039889152000, -0.31950203081601569000, -0.32531029216226293000,
+ -0.33110630575987643000, -0.33688985339222005000, -0.34266071731199438000,
+ -0.34841868024943456000, -0.35416352542049034000, -0.35989503653498811000,
+ -0.36561299780477385000, -0.37131719395183754000, -0.37700741021641826000,
+ -0.38268343236508978000, -0.38834504669882625000, -0.39399204006104810000,
+ -0.39962419984564679000, -0.40524131400498986000, -0.41084317105790391000,
+ -0.41642956009763715000, -0.42200027079979968000, -0.42755509343028208000,
+ -0.43309381885315196000, -0.43861623853852766000, -0.44412214457042920000,
+ -0.44961132965460654000, -0.45508358712634384000, -0.46053871095824001000,
+ -0.46597649576796618000, -0.47139673682599764000, -0.47679923006332209000,
+ -0.48218377207912272000, -0.48755016014843600000, -0.49289819222978404000,
+ -0.49822766697278187000, -0.50353838372571758000, -0.50883014254310699000,
+ -0.51410274419322166000, -0.51935599016558964000, -0.52458968267846895000,
+ -0.52980362468629461000, -0.53499761988709715000, -0.54017147272989285000,
+ -0.54532498842204646000, -0.55045797293660481000, -0.55557023301960218000,
+ -0.56066157619733603000, -0.56573181078361312000, -0.57078074588696726000,
+ -0.57580819141784534000, -0.58081395809576453000, -0.58579785745643886000,
+ -0.59075970185887416000, -0.59569930449243336000, -0.60061647938386897000,
+ -0.60551104140432555000, -0.61038280627630948000, -0.61523159058062682000,
+ -0.62005721176328910000, -0.62485948814238634000, -0.62963823891492698000,
+ -0.63439328416364549000, -0.63912444486377573000, -0.64383154288979139000,
+ -0.64851440102211244000, -0.65317284295377676000, -0.65780669329707864000,
+ -0.66241577759017178000, -0.66699992230363747000, -0.67155895484701833000,
+ -0.67609270357531592000, -0.68060099779545302000, -0.68508366777270036000,
+ -0.68954054473706683000, -0.69397146088965400000, -0.69837624940897292000,
+ -0.70275474445722530000, -0.70710678118654746000, -0.71143219574521643000,
+ -0.71573082528381859000, -0.72000250796138165000, -0.72424708295146689000,
+ -0.72846439044822520000, -0.73265427167241282000, -0.73681656887736979000,
+ -0.74095112535495911000, -0.74505778544146595000, -0.74913639452345926000,
+ -0.75318679904361241000, -0.75720884650648446000, -0.76120238548426178000,
+ -0.76516726562245896000, -0.76910333764557959000, -0.77301045336273699000,
+ -0.77688846567323244000, -0.78073722857209438000, -0.78455659715557524000,
+ -0.78834642762660623000, -0.79210657730021239000, -0.79583690460888346000,
+ -0.79953726910790501000, -0.80320753148064483000, -0.80684755354379922000,
+ -0.81045719825259477000, -0.81403632970594830000, -0.81758481315158371000,
+ -0.82110251499110465000, -0.82458930278502529000, -0.82804504525775580000,
+ -0.83146961230254524000, -0.83486287498638001000, -0.83822470555483797000,
+ -0.84155497743689833000, -0.84485356524970701000, -0.84812034480329712000,
+ -0.85135519310526520000, -0.85455798836540053000, -0.85772861000027212000,
+ -0.86086693863776731000, -0.86397285612158670000, -0.86704624551569265000,
+ -0.87008699110871135000, -0.87309497841829009000, -0.87607009419540660000,
+ -0.87901222642863341000, -0.88192126434835494000, -0.88479709843093779000,
+ -0.88763962040285393000, -0.89044872324475788000, -0.89322430119551532000,
+ -0.89596624975618511000, -0.89867446569395382000, -0.90134884704602203000,
+ -0.90398929312344334000, -0.90659570451491533000, -0.90916798309052227000,
+ -0.91170603200542988000, -0.91420975570353069000, -0.91667905992104270000,
+ -0.91911385169005777000, -0.92151403934204190000, -0.92387953251128674000,
+ -0.92621024213831127000, -0.92850608047321548000, -0.93076696107898371000,
+ -0.93299279883473885000, -0.93518350993894750000, -0.93733901191257496000,
+ -0.93945922360218992000, -0.94154406518302081000, -0.94359345816196039000,
+ -0.94560732538052128000, -0.94758559101774109000, -0.94952818059303667000,
+ -0.95143502096900834000, -0.95330604035419375000, -0.95514116830577067000,
+ -0.95694033573220894000, -0.95870347489587160000, -0.96043051941556579000,
+ -0.96212140426904158000, -0.96377606579543984000, -0.96539444169768940000,
+ -0.96697647104485207000, -0.96852209427441727000, -0.97003125319454397000,
+ -0.97150389098625178000, -0.97293995220556007000, -0.97433938278557586000,
+ -0.97570213003852857000, -0.97702814265775439000, -0.97831737071962765000,
+ -0.97956976568544052000, -0.98078528040323043000, -0.98196386910955524000,
+ -0.98310548743121629000, -0.98421009238692903000, -0.98527764238894122000,
+ -0.98630809724459867000, -0.98730141815785843000, -0.98825756773074946000,
+ -0.98917650996478101000, -0.99005821026229712000, -0.99090263542778001000,
+ -0.99170975366909953000, -0.99247953459870997000, -0.99321194923479450000,
+ -0.99390697000235606000, -0.99456457073425542000, -0.99518472667219682000,
+ -0.99576741446765982000, -0.99631261218277800000, -0.99682029929116567000,
+ -0.99729045667869021000, -0.99772306664419164000, -0.99811811290014918000,
+ -0.99847558057329477000, -0.99879545620517241000, -0.99907772775264536000,
+ -0.99932238458834954000, -0.99952941750109314000, -0.99969881869620425000,
+ -0.99983058179582340000, -0.99992470183914450000, -0.99998117528260111000,
+ -1.00000000000000000000};
+
+const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3r[1155] = {
+ 1.00000000000000000000, 1.00000000000000000000, 1.00000000000000000000,
+ 1.00000000000000000000, 0.99986613790956180000, 0.99946458747636568000,
+ 1.00000000000000000000, 0.99946458747636568000, 0.99785892323860348000,
+ 1.00000000000000000000, 0.99879545620517241000, 0.99518472667219693000,
+ 1.00000000000000000000, 0.99785892323860348000, 0.99144486137381038000,
+ 1.00000000000000000000, 0.99665523930918032000, 0.98664333208487898000,
+ 1.00000000000000000000, 0.99518472667219693000, 0.98078528040323043000,
+ 1.00000000000000000000, 0.99344777901944437000, 0.97387697927733363000,
+ 1.00000000000000000000, 0.99144486137381038000, 0.96592582628906831000,
+ 1.00000000000000000000, 0.98917650996478101000, 0.95694033573220882000,
+ 1.00000000000000000000, 0.98664333208487898000, 0.94693012949510569000,
+ 1.00000000000000000000, 0.98384600592707738000, 0.93590592675732576000,
+ 1.00000000000000000000, 0.98078528040323043000, 0.92387953251128674000,
+ 1.00000000000000000000, 0.97746197494357190000, 0.91086382492117579000,
+ 1.00000000000000000000, 0.97387697927733363000, 0.89687274153268837000,
+ 1.00000000000000000000, 0.97003125319454397000, 0.88192126434835505000,
+ 1.00000000000000000000, 0.96592582628906831000, 0.86602540378443871000,
+ 1.00000000000000000000, 0.96156179768296191000, 0.84920218152657889000,
+ 1.00000000000000000000, 0.95694033573220882000, 0.83146961230254524000,
+ 1.00000000000000000000, 0.95206267771392428000, 0.81284668459161524000,
+ 1.00000000000000000000, 0.94693012949510569000, 0.79335334029123517000,
+ 1.00000000000000000000, 0.94154406518302081000, 0.77301045336273699000,
+ 1.00000000000000000000, 0.93590592675732576000, 0.75183980747897738000,
+ 1.00000000000000000000, 0.93001722368401218000, 0.72986407269783571000,
+ 1.00000000000000000000, 0.92387953251128674000, 0.70710678118654757000,
+ 1.00000000000000000000, 0.91749449644749126000, 0.68359230202287125000,
+ 1.00000000000000000000, 0.91086382492117579000, 0.65934581510006884000,
+ 1.00000000000000000000, 0.90398929312344334000, 0.63439328416364549000,
+ 1.00000000000000000000, 0.89687274153268837000, 0.60876142900872066000,
+ 1.00000000000000000000, 0.88951607542185607000, 0.58247769686780215000,
+ 1.00000000000000000000, 0.88192126434835505000, 0.55557023301960240000,
+ 1.00000000000000000000, 0.87409034162675892000, 0.52806785065036810000,
+ 1.00000000000000000000, 0.86602540378443871000, 0.50000000000000011000,
+ 1.00000000000000000000, 0.85772861000027201000, 0.47139673682599759000,
+ 1.00000000000000000000, 0.84920218152657889000, 0.44228869021900125000,
+ 1.00000000000000000000, 0.84044840109443797000, 0.41270702980439472000,
+ 1.00000000000000000000, 0.83146961230254524000, 0.38268343236508984000,
+ 1.00000000000000000000, 0.82226821898977509000, 0.35225004792123360000,
+ 1.00000000000000000000, 0.81284668459161524000, 0.32143946530316170000,
+ 1.00000000000000000000, 0.80320753148064494000, 0.29028467725446250000,
+ 1.00000000000000000000, 0.79335334029123517000, 0.25881904510252074000,
+ 1.00000000000000000000, 0.78328674922865049000, 0.22707626303437345000,
+ 1.00000000000000000000, 0.77301045336273699000, 0.19509032201612833000,
+ 1.00000000000000000000, 0.76252720390638817000, 0.16289547339458882000,
+ 1.00000000000000000000, 0.75183980747897738000, 0.13052619222005171000,
+ 1.00000000000000000000, 0.74095112535495911000, 0.09801714032956054800,
+ 1.00000000000000000000, 0.72986407269783571000, 0.06540312923014327000,
+ 1.00000000000000000000, 0.71858161777969809000, 0.03271908282177616500,
+ 1.00000000000000000000, 0.70710678118654757000, 0.00000000000000006123,
+ 1.00000000000000000000, 0.69544263500961168000, -0.03271908282177604000,
+ 1.00000000000000000000, 0.68359230202287125000, -0.06540312923014314500,
+ 1.00000000000000000000, 0.67155895484701844000, -0.09801714032956042300,
+ 1.00000000000000000000, 0.65934581510006884000, -0.13052619222005160000,
+ 1.00000000000000000000, 0.64695615253485739000, -0.16289547339458871000,
+ 1.00000000000000000000, 0.63439328416364549000, -0.19509032201612819000,
+ 1.00000000000000000000, 0.62166057337007741000, -0.22707626303437331000,
+ 1.00000000000000000000, 0.60876142900872066000, -0.25881904510252063000,
+ 1.00000000000000000000, 0.59569930449243347000, -0.29028467725446216000,
+ 1.00000000000000000000, 0.58247769686780215000, -0.32143946530316159000,
+ 1.00000000000000000000, 0.56910014587889823000, -0.35225004792123349000,
+ 1.00000000000000000000, 0.55557023301960240000, -0.38268343236508950000,
+ 1.00000000000000000000, 0.54189158057475173000, -0.41270702980439461000,
+ 1.00000000000000000000, 0.52806785065036810000, -0.44228869021900113000,
+ 1.00000000000000000000, 0.51410274419322166000, -0.47139673682599770000,
+ 1.00000000000000000000, 0.50000000000000011000, -0.49999999999999978000,
+ 1.00000000000000000000, 0.48576339371634009000, -0.52806785065036799000,
+ 1.00000000000000000000, 0.47139673682599759000, -0.55557023301960229000,
+ 1.00000000000000000000, 0.45690387563042073000, -0.58247769686780204000,
+ 1.00000000000000000000, 0.44228869021900125000, -0.60876142900872066000,
+ 1.00000000000000000000, 0.42755509343028220000, -0.63439328416364538000,
+ 1.00000000000000000000, 0.41270702980439472000, -0.65934581510006884000,
+ 1.00000000000000000000, 0.39774847452701095000, -0.68359230202287136000,
+ 1.00000000000000000000, 0.38268343236508984000, -0.70710678118654746000,
+ 1.00000000000000000000, 0.36751593659470372000, -0.72986407269783538000,
+ 1.00000000000000000000, 0.35225004792123360000, -0.75183980747897727000,
+ 1.00000000000000000000, 0.33688985339222005000, -0.77301045336273699000,
+ 1.00000000000000000000, 0.32143946530316170000, -0.79335334029123505000,
+ 1.00000000000000000000, 0.30590302009655351000, -0.81284668459161513000,
+ 1.00000000000000000000, 0.29028467725446250000, -0.83146961230254501000,
+ 1.00000000000000000000, 0.27458861818493241000, -0.84920218152657878000,
+ 1.00000000000000000000, 0.25881904510252074000, -0.86602540378443871000,
+ 1.00000000000000000000, 0.24298017990326398000, -0.88192126434835494000,
+ 1.00000000000000000000, 0.22707626303437345000, -0.89687274153268814000,
+ 1.00000000000000000000, 0.21111155235896509000, -0.91086382492117590000,
+ 1.00000000000000000000, 0.19509032201612833000, -0.92387953251128674000,
+ 1.00000000000000000000, 0.17901686127663263000, -0.93590592675732576000,
+ 1.00000000000000000000, 0.16289547339458882000, -0.94693012949510558000,
+ 1.00000000000000000000, 0.14673047445536197000, -0.95694033573220871000,
+ 1.00000000000000000000, 0.13052619222005171000, -0.96592582628906820000,
+ 1.00000000000000000000, 0.11428696496684644000, -0.97387697927733363000,
+ 1.00000000000000000000, 0.09801714032956054800, -0.98078528040323043000,
+ 1.00000000000000000000, 0.08172107413366830300, -0.98664333208487898000,
+ 1.00000000000000000000, 0.06540312923014327000, -0.99144486137381038000,
+ 1.00000000000000000000, 0.04906767432741812600, -0.99518472667219682000,
+ 1.00000000000000000000, 0.03271908282177616500, -0.99785892323860348000,
+ 1.00000000000000000000, 0.01636173162648671400, -0.99946458747636568000,
+ 1.00000000000000000000, 0.00000000000000006123, -1.00000000000000000000,
+ 1.00000000000000000000, -0.01636173162648658900, -0.99946458747636568000,
+ 1.00000000000000000000, -0.03271908282177604000, -0.99785892323860348000,
+ 1.00000000000000000000, -0.04906767432741800800, -0.99518472667219693000,
+ 1.00000000000000000000, -0.06540312923014314500, -0.99144486137381038000,
+ 1.00000000000000000000, -0.08172107413366817800, -0.98664333208487898000,
+ 1.00000000000000000000, -0.09801714032956042300, -0.98078528040323054000,
+ 1.00000000000000000000, -0.11428696496684632000, -0.97387697927733363000,
+ 1.00000000000000000000, -0.13052619222005160000, -0.96592582628906831000,
+ 1.00000000000000000000, -0.14673047445536186000, -0.95694033573220882000,
+ 1.00000000000000000000, -0.16289547339458871000, -0.94693012949510569000,
+ 1.00000000000000000000, -0.17901686127663252000, -0.93590592675732587000,
+ 1.00000000000000000000, -0.19509032201612819000, -0.92387953251128685000,
+ 1.00000000000000000000, -0.21111155235896498000, -0.91086382492117601000,
+ 1.00000000000000000000, -0.22707626303437331000, -0.89687274153268826000,
+ 1.00000000000000000000, -0.24298017990326387000, -0.88192126434835505000,
+ 1.00000000000000000000, -0.25881904510252063000, -0.86602540378443882000,
+ 1.00000000000000000000, -0.27458861818493230000, -0.84920218152657889000,
+ 1.00000000000000000000, -0.29028467725446216000, -0.83146961230254546000,
+ 1.00000000000000000000, -0.30590302009655357000, -0.81284668459161502000,
+ 1.00000000000000000000, -0.32143946530316159000, -0.79335334029123517000,
+ 1.00000000000000000000, -0.33688985339221994000, -0.77301045336273710000,
+ 1.00000000000000000000, -0.35225004792123349000, -0.75183980747897750000,
+ 1.00000000000000000000, -0.36751593659470339000, -0.72986407269783593000,
+ 1.00000000000000000000, -0.38268343236508950000, -0.70710678118654791000,
+ 1.00000000000000000000, -0.39774847452701106000, -0.68359230202287125000,
+ 1.00000000000000000000, -0.41270702980439461000, -0.65934581510006907000,
+ 1.00000000000000000000, -0.42755509343028186000, -0.63439328416364593000,
+ 1.00000000000000000000, -0.44228869021900113000, -0.60876142900872088000,
+ 1.00000000000000000000, -0.45690387563042062000, -0.58247769686780226000,
+ 1.00000000000000000000, -0.47139673682599770000, -0.55557023301960218000,
+ 1.00000000000000000000, -0.48576339371634014000, -0.52806785065036776000,
+ 1.00000000000000000000, -0.49999999999999978000, -0.50000000000000044000,
+ 1.00000000000000000000, -0.51410274419322166000, -0.47139673682599786000,
+ 1.00000000000000000000, -0.52806785065036799000, -0.44228869021900136000,
+ 1.00000000000000000000, -0.54189158057475173000, -0.41270702980439467000,
+ 1.00000000000000000000, -0.55557023301960229000, -0.38268343236508950000,
+ 1.00000000000000000000, -0.56910014587889801000, -0.35225004792123393000,
+ 1.00000000000000000000, -0.58247769686780204000, -0.32143946530316181000,
+ 1.00000000000000000000, -0.59569930449243336000, -0.29028467725446244000,
+ 1.00000000000000000000, -0.60876142900872066000, -0.25881904510252063000,
+ 1.00000000000000000000, -0.62166057337007752000, -0.22707626303437292000,
+ 1.00000000000000000000, -0.63439328416364538000, -0.19509032201612866000,
+ 1.00000000000000000000, -0.64695615253485728000, -0.16289547339458896000,
+ 1.00000000000000000000, -0.65934581510006884000, -0.13052619222005163000,
+ 1.00000000000000000000, -0.67155895484701811000, -0.09801714032956133900,
+ 1.00000000000000000000, -0.68359230202287136000, -0.06540312923014272900,
+ 1.00000000000000000000, -0.69544263500961156000, -0.03271908282177651100,
+ 1.00000000000000000000, -0.70710678118654746000, -0.00000000000000018369,
+ 1.00000000000000000000, -0.71858161777969809000, 0.03271908282177614400,
+ 1.00000000000000000000, -0.72986407269783538000, 0.06540312923014236800,
+ 1.00000000000000000000, -0.74095112535495922000, 0.09801714032956096400,
+ 1.00000000000000000000, -0.75183980747897727000, 0.13052619222005127000,
+ 1.00000000000000000000, -0.76252720390638806000, 0.16289547339458860000,
+ 1.00000000000000000000, -0.77301045336273699000, 0.19509032201612830000,
+ 1.00000000000000000000, -0.78328674922865016000, 0.22707626303437256000,
+ 1.00000000000000000000, -0.79335334029123505000, 0.25881904510252030000,
+ 1.00000000000000000000, -0.80320753148064483000, 0.29028467725446205000,
+ 1.00000000000000000000, -0.81284668459161513000, 0.32143946530316148000,
+ 1.00000000000000000000, -0.82226821898977509000, 0.35225004792123354000,
+ 1.00000000000000000000, -0.83146961230254501000, 0.38268343236508917000,
+ 1.00000000000000000000, -0.84044840109443786000, 0.41270702980439433000,
+ 1.00000000000000000000, -0.84920218152657878000, 0.44228869021900102000,
+ 1.00000000000000000000, -0.85772861000027201000, 0.47139673682599759000,
+ 1.00000000000000000000, -0.86602540378443871000, 0.50000000000000011000,
+ 1.00000000000000000000, -0.87409034162675869000, 0.52806785065036743000,
+ 1.00000000000000000000, -0.88192126434835494000, 0.55557023301960184000,
+ 1.00000000000000000000, -0.88951607542185596000, 0.58247769686780193000,
+ 1.00000000000000000000, -0.89687274153268814000, 0.60876142900871988000,
+ 1.00000000000000000000, -0.90398929312344312000, 0.63439328416364493000,
+ 1.00000000000000000000, -0.91086382492117590000, 0.65934581510006907000,
+ 1.00000000000000000000, -0.91749449644749137000, 0.68359230202287169000,
+ 1.00000000000000000000, -0.92387953251128674000, 0.70710678118654735000,
+ 1.00000000000000000000, -0.93001722368401207000, 0.72986407269783560000,
+ 1.00000000000000000000, -0.93590592675732576000, 0.75183980747897750000,
+ 1.00000000000000000000, -0.94154406518302070000, 0.77301045336273666000,
+ 1.00000000000000000000, -0.94693012949510558000, 0.79335334029123494000,
+ 1.00000000000000000000, -0.95206267771392428000, 0.81284668459161513000,
+ 1.00000000000000000000, -0.95694033573220871000, 0.83146961230254479000,
+ 1.00000000000000000000, -0.96156179768296191000, 0.84920218152657856000,
+ 1.00000000000000000000, -0.96592582628906820000, 0.86602540378443837000,
+ 1.00000000000000000000, -0.97003125319454409000, 0.88192126434835527000,
+ 1.00000000000000000000, -0.97387697927733363000, 0.89687274153268826000,
+ 1.00000000000000000000, -0.97746197494357190000, 0.91086382492117579000,
+ 1.00000000000000000000, -0.98078528040323043000, 0.92387953251128685000,
+ 1.00000000000000000000, -0.98384600592707738000, 0.93590592675732553000,
+ 1.00000000000000000000, -0.98664333208487898000, 0.94693012949510558000,
+ 1.00000000000000000000, -0.98917650996478101000, 0.95694033573220882000,
+ 1.00000000000000000000, -0.99144486137381038000, 0.96592582628906809000,
+ 1.00000000000000000000, -0.99344777901944437000, 0.97387697927733352000,
+ 1.00000000000000000000, -0.99518472667219682000, 0.98078528040323032000,
+ 1.00000000000000000000, -0.99665523930918032000, 0.98664333208487909000,
+ 1.00000000000000000000, -0.99785892323860348000, 0.99144486137381038000,
+ 1.00000000000000000000, -0.99879545620517241000, 0.99518472667219693000,
+ 1.00000000000000000000, -0.99946458747636568000, 0.99785892323860348000,
+ 1.00000000000000000000, -0.99986613790956180000, 0.99946458747636568000,
+ 1.00000000000000000000, -1.00000000000000000000, 1.00000000000000000000,
+ 1.00000000000000000000, -0.99986613790956180000, 0.99946458747636568000,
+ 1.00000000000000000000, -0.99946458747636568000, 0.99785892323860359000,
+ 1.00000000000000000000, -0.99879545620517241000, 0.99518472667219693000,
+ 1.00000000000000000000, -0.99785892323860348000, 0.99144486137381049000,
+ 1.00000000000000000000, -0.99665523930918032000, 0.98664333208487920000,
+ 1.00000000000000000000, -0.99518472667219693000, 0.98078528040323043000,
+ 1.00000000000000000000, -0.99344777901944437000, 0.97387697927733363000,
+ 1.00000000000000000000, -0.99144486137381038000, 0.96592582628906820000,
+ 1.00000000000000000000, -0.98917650996478101000, 0.95694033573220894000,
+ 1.00000000000000000000, -0.98664333208487898000, 0.94693012949510569000,
+ 1.00000000000000000000, -0.98384600592707738000, 0.93590592675732565000,
+ 1.00000000000000000000, -0.98078528040323054000, 0.92387953251128707000,
+ 1.00000000000000000000, -0.97746197494357190000, 0.91086382492117601000,
+ 1.00000000000000000000, -0.97387697927733363000, 0.89687274153268848000,
+ 1.00000000000000000000, -0.97003125319454409000, 0.88192126434835549000,
+ 1.00000000000000000000, -0.96592582628906831000, 0.86602540378443860000,
+ 1.00000000000000000000, -0.96156179768296191000, 0.84920218152657878000,
+ 1.00000000000000000000, -0.95694033573220882000, 0.83146961230254501000,
+ 1.00000000000000000000, -0.95206267771392428000, 0.81284668459161535000,
+ 1.00000000000000000000, -0.94693012949510569000, 0.79335334029123528000,
+ 1.00000000000000000000, -0.94154406518302081000, 0.77301045336273688000,
+ 1.00000000000000000000, -0.93590592675732587000, 0.75183980747897783000,
+ 1.00000000000000000000, -0.93001722368401218000, 0.72986407269783593000,
+ 1.00000000000000000000, -0.92387953251128685000, 0.70710678118654768000,
+ 1.00000000000000000000, -0.91749449644749148000, 0.68359230202287202000,
+ 1.00000000000000000000, -0.91086382492117601000, 0.65934581510006951000,
+ 1.00000000000000000000, -0.90398929312344323000, 0.63439328416364527000,
+ 1.00000000000000000000, -0.89687274153268826000, 0.60876142900872032000,
+ 1.00000000000000000000, -0.88951607542185607000, 0.58247769686780237000,
+ 1.00000000000000000000, -0.88192126434835505000, 0.55557023301960229000,
+ 1.00000000000000000000, -0.87409034162675880000, 0.52806785065036788000,
+ 1.00000000000000000000, -0.86602540378443882000, 0.50000000000000056000,
+ 1.00000000000000000000, -0.85772861000027212000, 0.47139673682599798000,
+ 1.00000000000000000000, -0.84920218152657889000, 0.44228869021900147000,
+ 1.00000000000000000000, -0.84044840109443830000, 0.41270702980439555000,
+ 1.00000000000000000000, -0.83146961230254546000, 0.38268343236509045000,
+ 1.00000000000000000000, -0.82226821898977531000, 0.35225004792123404000,
+ 1.00000000000000000000, -0.81284668459161502000, 0.32143946530316109000,
+ 1.00000000000000000000, -0.80320753148064494000, 0.29028467725446255000,
+ 1.00000000000000000000, -0.79335334029123517000, 0.25881904510252074000,
+ 1.00000000000000000000, -0.78328674922865027000, 0.22707626303437303000,
+ 1.00000000000000000000, -0.77301045336273710000, 0.19509032201612878000,
+ 1.00000000000000000000, -0.76252720390638817000, 0.16289547339458907000,
+ 1.00000000000000000000, -0.75183980747897750000, 0.13052619222005174000,
+ 1.00000000000000000000, -0.74095112535495933000, 0.09801714032956145000,
+ 1.00000000000000000000, -0.72986407269783593000, 0.06540312923014374200,
+ 1.00000000000000000000, -0.71858161777969820000, 0.03271908282177662900,
+ 1.00000000000000000000, -0.70710678118654791000, 0.00000000000000119433,
+ 1.00000000000000000000, -0.69544263500961168000, -0.03271908282177601900,
+ 1.00000000000000000000, -0.68359230202287125000, -0.06540312923014313100,
+ 1.00000000000000000000, -0.67155895484701833000, -0.09801714032956084000,
+ 1.00000000000000000000, -0.65934581510006907000, -0.13052619222005113000,
+ 1.00000000000000000000, -0.64695615253485750000, -0.16289547339458846000,
+ 1.00000000000000000000, -0.63439328416364593000, -0.19509032201612730000,
+ 1.00000000000000000000, -0.62166057337007741000, -0.22707626303437331000,
+ 1.00000000000000000000, -0.60876142900872088000, -0.25881904510252018000,
+ 1.00000000000000000000, -0.59569930449243391000, -0.29028467725446111000,
+ 1.00000000000000000000, -0.58247769686780226000, -0.32143946530316136000,
+ 1.00000000000000000000, -0.56910014587889790000, -0.35225004792123427000,
+ 1.00000000000000000000, -0.55557023301960218000, -0.38268343236508989000,
+ 1.00000000000000000000, -0.54189158057475195000, -0.41270702980439422000,
+ 1.00000000000000000000, -0.52806785065036776000, -0.44228869021900175000,
+ 1.00000000000000000000, -0.51410274419322177000, -0.47139673682599748000,
+ 1.00000000000000000000, -0.50000000000000044000, -0.49999999999999922000,
+ 1.00000000000000000000, -0.48576339371633998000, -0.52806785065036810000,
+ 1.00000000000000000000, -0.47139673682599786000, -0.55557023301960173000,
+ 1.00000000000000000000, -0.45690387563042123000, -0.58247769686780115000,
+ 1.00000000000000000000, -0.44228869021900136000, -0.60876142900872054000,
+ 1.00000000000000000000, -0.42755509343028247000, -0.63439328416364482000,
+ 1.00000000000000000000, -0.41270702980439467000, -0.65934581510006895000,
+ 1.00000000000000000000, -0.39774847452701129000, -0.68359230202287091000,
+ 1.00000000000000000000, -0.38268343236508950000, -0.70710678118654791000,
+ 1.00000000000000000000, -0.36751593659470366000, -0.72986407269783560000,
+ 1.00000000000000000000, -0.35225004792123393000, -0.75183980747897683000,
+ 1.00000000000000000000, -0.33688985339221994000, -0.77301045336273710000,
+ 1.00000000000000000000, -0.32143946530316181000, -0.79335334029123483000,
+ 1.00000000000000000000, -0.30590302009655401000, -0.81284668459161447000,
+ 1.00000000000000000000, -0.29028467725446244000, -0.83146961230254512000,
+ 1.00000000000000000000, -0.27458861818493274000, -0.84920218152657845000,
+ 1.00000000000000000000, -0.25881904510252063000, -0.86602540378443882000,
+ 1.00000000000000000000, -0.24298017990326412000, -0.88192126434835483000,
+ 1.00000000000000000000, -0.22707626303437292000, -0.89687274153268859000,
+ 1.00000000000000000000, -0.21111155235896520000, -0.91086382492117579000,
+ 1.00000000000000000000, -0.19509032201612866000, -0.92387953251128641000,
+ 1.00000000000000000000, -0.17901686127663255000, -0.93590592675732576000,
+ 1.00000000000000000000, -0.16289547339458896000, -0.94693012949510558000,
+ 1.00000000000000000000, -0.14673047445536230000, -0.95694033573220849000,
+ 1.00000000000000000000, -0.13052619222005163000, -0.96592582628906831000,
+ 1.00000000000000000000, -0.11428696496684677000, -0.97387697927733352000,
+ 1.00000000000000000000, -0.09801714032956133900, -0.98078528040323021000,
+ 1.00000000000000000000, -0.08172107413366842800, -0.98664333208487898000,
+ 1.00000000000000000000, -0.06540312923014272900, -0.99144486137381049000,
+ 1.00000000000000000000, -0.04906767432741802900, -0.99518472667219693000,
+ 1.00000000000000000000, -0.03271908282177651100, -0.99785892323860348000,
+ 1.00000000000000000000, -0.01636173162648661300, -0.99946458747636568000,
+ 1.00000000000000000000, -0.00000000000000018369, -1.00000000000000000000,
+ 1.00000000000000000000, 0.01636173162648624600, -0.99946458747636568000,
+ 1.00000000000000000000, 0.03271908282177614400, -0.99785892323860348000,
+ 1.00000000000000000000, 0.04906767432741766100, -0.99518472667219693000,
+ 1.00000000000000000000, 0.06540312923014236800, -0.99144486137381060000,
+ 1.00000000000000000000, 0.08172107413366805400, -0.98664333208487909000,
+ 1.00000000000000000000, 0.09801714032956096400, -0.98078528040323032000,
+ 1.00000000000000000000, 0.11428696496684641000, -0.97387697927733363000,
+ 1.00000000000000000000, 0.13052619222005127000, -0.96592582628906842000,
+ 1.00000000000000000000, 0.14673047445536194000, -0.95694033573220871000,
+ 1.00000000000000000000, 0.16289547339458860000, -0.94693012949510580000,
+ 1.00000000000000000000, 0.17901686127663219000, -0.93590592675732609000,
+ 1.00000000000000000000, 0.19509032201612830000, -0.92387953251128674000,
+ 1.00000000000000000000, 0.21111155235896484000, -0.91086382492117612000,
+ 1.00000000000000000000, 0.22707626303437256000, -0.89687274153268892000,
+ 1.00000000000000000000, 0.24298017990326376000, -0.88192126434835516000,
+ 1.00000000000000000000, 0.25881904510252030000, -0.86602540378443915000,
+ 1.00000000000000000000, 0.27458861818493241000, -0.84920218152657889000,
+ 1.00000000000000000000, 0.29028467725446205000, -0.83146961230254557000,
+ 1.00000000000000000000, 0.30590302009655368000, -0.81284668459161491000,
+ 1.00000000000000000000, 0.32143946530316148000, -0.79335334029123528000,
+ 1.00000000000000000000, 0.33688985339221961000, -0.77301045336273755000,
+ 1.00000000000000000000, 0.35225004792123354000, -0.75183980747897727000,
+ 1.00000000000000000000, 0.36751593659470327000, -0.72986407269783604000,
+ 1.00000000000000000000, 0.38268343236508917000, -0.70710678118654846000,
+ 1.00000000000000000000, 0.39774847452701095000, -0.68359230202287147000,
+ 1.00000000000000000000, 0.41270702980439433000, -0.65934581510006951000,
+ 1.00000000000000000000, 0.42755509343028214000, -0.63439328416364538000,
+ 1.00000000000000000000, 0.44228869021900102000, -0.60876142900872110000,
+ 1.00000000000000000000, 0.45690387563042090000, -0.58247769686780171000,
+ 1.00000000000000000000, 0.47139673682599759000, -0.55557023301960240000,
+ 1.00000000000000000000, 0.48576339371633964000, -0.52806785065036876000,
+ 1.00000000000000000000, 0.50000000000000011000, -0.49999999999999983000,
+ 1.00000000000000000000, 0.51410274419322155000, -0.47139673682599809000,
+ 1.00000000000000000000, 0.52806785065036743000, -0.44228869021900236000,
+ 1.00000000000000000000, 0.54189158057475162000, -0.41270702980439489000,
+ 1.00000000000000000000, 0.55557023301960184000, -0.38268343236509056000,
+ 1.00000000000000000000, 0.56910014587889757000, -0.35225004792123499000,
+ 1.00000000000000000000, 0.58247769686780193000, -0.32143946530316203000,
+ 1.00000000000000000000, 0.59569930449243358000, -0.29028467725446183000,
+ 1.00000000000000000000, 0.60876142900871988000, -0.25881904510252257000,
+ 1.00000000000000000000, 0.62166057337007707000, -0.22707626303437400000,
+ 1.00000000000000000000, 0.63439328416364493000, -0.19509032201612977000,
+ 1.00000000000000000000, 0.64695615253485717000, -0.16289547339458918000,
+ 1.00000000000000000000, 0.65934581510006907000, -0.13052619222005099000,
+ 1.00000000000000000000, 0.67155895484701833000, -0.09801714032956068700,
+ 1.00000000000000000000, 0.68359230202287169000, -0.06540312923014209000,
+ 1.00000000000000000000, 0.69544263500961112000, -0.03271908282177764200,
+ 1.00000000000000000000, 0.70710678118654735000, -0.00000000000000042861,
+ 1.00000000000000000000, 0.71858161777969765000, 0.03271908282177501300,
+ 1.00000000000000000000, 0.72986407269783560000, 0.06540312923014300600,
+ 1.00000000000000000000, 0.74095112535495888000, 0.09801714032955984000,
+ 1.00000000000000000000, 0.75183980747897750000, 0.13052619222005191000,
+ 1.00000000000000000000, 0.76252720390638740000, 0.16289547339458660000,
+ 1.00000000000000000000, 0.77301045336273666000, 0.19509032201612719000,
+ 1.00000000000000000000, 0.78328674922865038000, 0.22707626303437317000,
+ 1.00000000000000000000, 0.79335334029123494000, 0.25881904510252007000,
+ 1.00000000000000000000, 0.80320753148064505000, 0.29028467725446266000,
+ 1.00000000000000000000, 0.81284668459161513000, 0.32143946530316125000,
+ 1.00000000000000000000, 0.82226821898977531000, 0.35225004792123416000,
+ 1.00000000000000000000, 0.83146961230254479000, 0.38268343236508812000,
+ 1.00000000000000000000, 0.84044840109443786000, 0.41270702980439411000,
+ 1.00000000000000000000, 0.84920218152657856000, 0.44228869021900002000,
+ 1.00000000000000000000, 0.85772861000027201000, 0.47139673682599736000,
+ 1.00000000000000000000, 0.86602540378443837000, 0.49999999999999911000,
+ 1.00000000000000000000, 0.87409034162675880000, 0.52806785065036799000,
+ 1.00000000000000000000, 0.88192126434835527000, 0.55557023301960318000,
+ 1.00000000000000000000, 0.88951607542185573000, 0.58247769686780104000,
+ 1.00000000000000000000, 0.89687274153268826000, 0.60876142900872043000,
+ 1.00000000000000000000, 0.90398929312344312000, 0.63439328416364471000,
+ 1.00000000000000000000, 0.91086382492117579000, 0.65934581510006895000,
+ 1.00000000000000000000, 0.91749449644749115000, 0.68359230202287080000,
+ 1.00000000000000000000, 0.92387953251128685000, 0.70710678118654779000,
+ 1.00000000000000000000, 0.93001722368401174000, 0.72986407269783427000,
+ 1.00000000000000000000, 0.93590592675732553000, 0.75183980747897672000,
+ 1.00000000000000000000, 0.94154406518302081000, 0.77301045336273699000,
+ 1.00000000000000000000, 0.94693012949510558000, 0.79335334029123483000,
+ 1.00000000000000000000, 0.95206267771392428000, 0.81284668459161546000,
+ 1.00000000000000000000, 0.95694033573220882000, 0.83146961230254512000,
+ 1.00000000000000000000, 0.96156179768296202000, 0.84920218152657934000,
+ 1.00000000000000000000, 0.96592582628906809000, 0.86602540378443782000,
+ 1.00000000000000000000, 0.97003125319454397000, 0.88192126434835472000,
+ 1.00000000000000000000, 0.97387697927733352000, 0.89687274153268770000,
+ 1.00000000000000000000, 0.97746197494357179000, 0.91086382492117568000,
+ 1.00000000000000000000, 0.98078528040323032000, 0.92387953251128641000,
+ 1.00000000000000000000, 0.98384600592707738000, 0.93590592675732576000,
+ 1.00000000000000000000, 0.98664333208487909000, 0.94693012949510602000,
+ 1.00000000000000000000, 0.98917650996478090000, 0.95694033573220849000,
+ 1.00000000000000000000, 0.99144486137381038000, 0.96592582628906820000,
+ 1.00000000000000000000, 0.99344777901944437000, 0.97387697927733341000,
+ 1.00000000000000000000, 0.99518472667219693000, 0.98078528040323043000,
+ 1.00000000000000000000, 0.99665523930918032000, 0.98664333208487887000,
+ 1.00000000000000000000, 0.99785892323860348000, 0.99144486137381049000,
+ 1.00000000000000000000, 0.99879545620517229000, 0.99518472667219671000,
+ 1.00000000000000000000, 0.99946458747636568000, 0.99785892323860348000,
+ 1.00000000000000000000, 0.99986613790956180000, 0.99946458747636557000,
+ 1.00000000000000000000, 1.00000000000000000000, 1.00000000000000000000};
+
+const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3i[1155] = {
+ 0.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000,
+ 0.00000000000000000000, -0.01636173162648678000, -0.03271908282177613700,
+ 0.00000000000000000000, -0.03271908282177613700, -0.06540312923014306200,
+ 0.00000000000000000000, -0.04906767432741801500, -0.09801714032956060400,
+ 0.00000000000000000000, -0.06540312923014306200, -0.13052619222005157000,
+ 0.00000000000000000000, -0.08172107413366822000, -0.16289547339458874000,
+ 0.00000000000000000000, -0.09801714032956060400, -0.19509032201612825000,
+ 0.00000000000000000000, -0.11428696496684639000, -0.22707626303437320000,
+ 0.00000000000000000000, -0.13052619222005157000, -0.25881904510252074000,
+ 0.00000000000000000000, -0.14673047445536175000, -0.29028467725446233000,
+ 0.00000000000000000000, -0.16289547339458874000, -0.32143946530316159000,
+ 0.00000000000000000000, -0.17901686127663266000, -0.35225004792123349000,
+ 0.00000000000000000000, -0.19509032201612825000, -0.38268343236508978000,
+ 0.00000000000000000000, -0.21111155235896517000, -0.41270702980439472000,
+ 0.00000000000000000000, -0.22707626303437320000, -0.44228869021900125000,
+ 0.00000000000000000000, -0.24298017990326384000, -0.47139673682599759000,
+ 0.00000000000000000000, -0.25881904510252074000, -0.49999999999999994000,
+ 0.00000000000000000000, -0.27458861818493235000, -0.52806785065036799000,
+ 0.00000000000000000000, -0.29028467725446233000, -0.55557023301960218000,
+ 0.00000000000000000000, -0.30590302009655346000, -0.58247769686780215000,
+ 0.00000000000000000000, -0.32143946530316159000, -0.60876142900872066000,
+ 0.00000000000000000000, -0.33688985339222005000, -0.63439328416364549000,
+ 0.00000000000000000000, -0.35225004792123349000, -0.65934581510006884000,
+ 0.00000000000000000000, -0.36751593659470350000, -0.68359230202287125000,
+ 0.00000000000000000000, -0.38268343236508978000, -0.70710678118654746000,
+ 0.00000000000000000000, -0.39774847452701106000, -0.72986407269783571000,
+ 0.00000000000000000000, -0.41270702980439472000, -0.75183980747897738000,
+ 0.00000000000000000000, -0.42755509343028208000, -0.77301045336273699000,
+ 0.00000000000000000000, -0.44228869021900125000, -0.79335334029123517000,
+ 0.00000000000000000000, -0.45690387563042067000, -0.81284668459161524000,
+ 0.00000000000000000000, -0.47139673682599759000, -0.83146961230254512000,
+ 0.00000000000000000000, -0.48576339371634003000, -0.84920218152657889000,
+ 0.00000000000000000000, -0.49999999999999994000, -0.86602540378443860000,
+ 0.00000000000000000000, -0.51410274419322177000, -0.88192126434835505000,
+ 0.00000000000000000000, -0.52806785065036799000, -0.89687274153268837000,
+ 0.00000000000000000000, -0.54189158057475173000, -0.91086382492117579000,
+ 0.00000000000000000000, -0.55557023301960218000, -0.92387953251128674000,
+ 0.00000000000000000000, -0.56910014587889823000, -0.93590592675732565000,
+ 0.00000000000000000000, -0.58247769686780215000, -0.94693012949510558000,
+ 0.00000000000000000000, -0.59569930449243325000, -0.95694033573220882000,
+ 0.00000000000000000000, -0.60876142900872066000, -0.96592582628906831000,
+ 0.00000000000000000000, -0.62166057337007730000, -0.97387697927733363000,
+ 0.00000000000000000000, -0.63439328416364549000, -0.98078528040323043000,
+ 0.00000000000000000000, -0.64695615253485728000, -0.98664333208487898000,
+ 0.00000000000000000000, -0.65934581510006884000, -0.99144486137381038000,
+ 0.00000000000000000000, -0.67155895484701844000, -0.99518472667219693000,
+ 0.00000000000000000000, -0.68359230202287125000, -0.99785892323860348000,
+ 0.00000000000000000000, -0.69544263500961168000, -0.99946458747636568000,
+ 0.00000000000000000000, -0.70710678118654746000, -1.00000000000000000000,
+ 0.00000000000000000000, -0.71858161777969798000, -0.99946458747636568000,
+ 0.00000000000000000000, -0.72986407269783571000, -0.99785892323860348000,
+ 0.00000000000000000000, -0.74095112535495899000, -0.99518472667219693000,
+ 0.00000000000000000000, -0.75183980747897738000, -0.99144486137381038000,
+ 0.00000000000000000000, -0.76252720390638806000, -0.98664333208487898000,
+ 0.00000000000000000000, -0.77301045336273699000, -0.98078528040323043000,
+ 0.00000000000000000000, -0.78328674922865038000, -0.97387697927733363000,
+ 0.00000000000000000000, -0.79335334029123517000, -0.96592582628906831000,
+ 0.00000000000000000000, -0.80320753148064483000, -0.95694033573220894000,
+ 0.00000000000000000000, -0.81284668459161524000, -0.94693012949510569000,
+ 0.00000000000000000000, -0.82226821898977509000, -0.93590592675732576000,
+ 0.00000000000000000000, -0.83146961230254512000, -0.92387953251128685000,
+ 0.00000000000000000000, -0.84044840109443797000, -0.91086382492117590000,
+ 0.00000000000000000000, -0.84920218152657889000, -0.89687274153268837000,
+ 0.00000000000000000000, -0.85772861000027212000, -0.88192126434835505000,
+ 0.00000000000000000000, -0.86602540378443860000, -0.86602540378443871000,
+ 0.00000000000000000000, -0.87409034162675880000, -0.84920218152657889000,
+ 0.00000000000000000000, -0.88192126434835505000, -0.83146961230254512000,
+ 0.00000000000000000000, -0.88951607542185596000, -0.81284668459161524000,
+ 0.00000000000000000000, -0.89687274153268837000, -0.79335334029123517000,
+ 0.00000000000000000000, -0.90398929312344334000, -0.77301045336273710000,
+ 0.00000000000000000000, -0.91086382492117579000, -0.75183980747897738000,
+ 0.00000000000000000000, -0.91749449644749137000, -0.72986407269783560000,
+ 0.00000000000000000000, -0.92387953251128674000, -0.70710678118654757000,
+ 0.00000000000000000000, -0.93001722368401207000, -0.68359230202287158000,
+ 0.00000000000000000000, -0.93590592675732565000, -0.65934581510006895000,
+ 0.00000000000000000000, -0.94154406518302081000, -0.63439328416364549000,
+ 0.00000000000000000000, -0.94693012949510558000, -0.60876142900872088000,
+ 0.00000000000000000000, -0.95206267771392428000, -0.58247769686780215000,
+ 0.00000000000000000000, -0.95694033573220882000, -0.55557023301960251000,
+ 0.00000000000000000000, -0.96156179768296191000, -0.52806785065036810000,
+ 0.00000000000000000000, -0.96592582628906831000, -0.49999999999999994000,
+ 0.00000000000000000000, -0.97003125319454397000, -0.47139673682599786000,
+ 0.00000000000000000000, -0.97387697927733363000, -0.44228869021900169000,
+ 0.00000000000000000000, -0.97746197494357190000, -0.41270702980439461000,
+ 0.00000000000000000000, -0.98078528040323043000, -0.38268343236508989000,
+ 0.00000000000000000000, -0.98384600592707738000, -0.35225004792123343000,
+ 0.00000000000000000000, -0.98664333208487898000, -0.32143946530316175000,
+ 0.00000000000000000000, -0.98917650996478090000, -0.29028467725446278000,
+ 0.00000000000000000000, -0.99144486137381038000, -0.25881904510252102000,
+ 0.00000000000000000000, -0.99344777901944437000, -0.22707626303437328000,
+ 0.00000000000000000000, -0.99518472667219693000, -0.19509032201612816000,
+ 0.00000000000000000000, -0.99665523930918032000, -0.16289547339458890000,
+ 0.00000000000000000000, -0.99785892323860348000, -0.13052619222005199000,
+ 0.00000000000000000000, -0.99879545620517241000, -0.09801714032956082600,
+ 0.00000000000000000000, -0.99946458747636568000, -0.06540312923014311700,
+ 0.00000000000000000000, -0.99986613790956180000, -0.03271908282177600500,
+ 0.00000000000000000000, -1.00000000000000000000, -0.00000000000000012246,
+ 0.00000000000000000000, -0.99986613790956180000, 0.03271908282177576200,
+ 0.00000000000000000000, -0.99946458747636568000, 0.06540312923014286700,
+ 0.00000000000000000000, -0.99879545620517241000, 0.09801714032956059000,
+ 0.00000000000000000000, -0.99785892323860348000, 0.13052619222005177000,
+ 0.00000000000000000000, -0.99665523930918032000, 0.16289547339458865000,
+ 0.00000000000000000000, -0.99518472667219693000, 0.19509032201612792000,
+ 0.00000000000000000000, -0.99344777901944437000, 0.22707626303437303000,
+ 0.00000000000000000000, -0.99144486137381038000, 0.25881904510252079000,
+ 0.00000000000000000000, -0.98917650996478090000, 0.29028467725446255000,
+ 0.00000000000000000000, -0.98664333208487898000, 0.32143946530316153000,
+ 0.00000000000000000000, -0.98384600592707749000, 0.35225004792123321000,
+ 0.00000000000000000000, -0.98078528040323043000, 0.38268343236508967000,
+ 0.00000000000000000000, -0.97746197494357190000, 0.41270702980439439000,
+ 0.00000000000000000000, -0.97387697927733363000, 0.44228869021900147000,
+ 0.00000000000000000000, -0.97003125319454397000, 0.47139673682599764000,
+ 0.00000000000000000000, -0.96592582628906831000, 0.49999999999999972000,
+ 0.00000000000000000000, -0.96156179768296202000, 0.52806785065036788000,
+ 0.00000000000000000000, -0.95694033573220894000, 0.55557023301960196000,
+ 0.00000000000000000000, -0.95206267771392417000, 0.58247769686780237000,
+ 0.00000000000000000000, -0.94693012949510569000, 0.60876142900872066000,
+ 0.00000000000000000000, -0.94154406518302081000, 0.63439328416364527000,
+ 0.00000000000000000000, -0.93590592675732576000, 0.65934581510006884000,
+ 0.00000000000000000000, -0.93001722368401218000, 0.68359230202287102000,
+ 0.00000000000000000000, -0.92387953251128685000, 0.70710678118654713000,
+ 0.00000000000000000000, -0.91749449644749126000, 0.72986407269783571000,
+ 0.00000000000000000000, -0.91086382492117590000, 0.75183980747897727000,
+ 0.00000000000000000000, -0.90398929312344345000, 0.77301045336273666000,
+ 0.00000000000000000000, -0.89687274153268837000, 0.79335334029123494000,
+ 0.00000000000000000000, -0.88951607542185607000, 0.81284668459161513000,
+ 0.00000000000000000000, -0.88192126434835505000, 0.83146961230254524000,
+ 0.00000000000000000000, -0.87409034162675880000, 0.84920218152657900000,
+ 0.00000000000000000000, -0.86602540378443871000, 0.86602540378443837000,
+ 0.00000000000000000000, -0.85772861000027212000, 0.88192126434835494000,
+ 0.00000000000000000000, -0.84920218152657889000, 0.89687274153268826000,
+ 0.00000000000000000000, -0.84044840109443797000, 0.91086382492117590000,
+ 0.00000000000000000000, -0.83146961230254512000, 0.92387953251128685000,
+ 0.00000000000000000000, -0.82226821898977520000, 0.93590592675732553000,
+ 0.00000000000000000000, -0.81284668459161524000, 0.94693012949510558000,
+ 0.00000000000000000000, -0.80320753148064494000, 0.95694033573220882000,
+ 0.00000000000000000000, -0.79335334029123517000, 0.96592582628906831000,
+ 0.00000000000000000000, -0.78328674922865027000, 0.97387697927733374000,
+ 0.00000000000000000000, -0.77301045336273710000, 0.98078528040323032000,
+ 0.00000000000000000000, -0.76252720390638817000, 0.98664333208487898000,
+ 0.00000000000000000000, -0.75183980747897738000, 0.99144486137381038000,
+ 0.00000000000000000000, -0.74095112535495933000, 0.99518472667219682000,
+ 0.00000000000000000000, -0.72986407269783560000, 0.99785892323860348000,
+ 0.00000000000000000000, -0.71858161777969820000, 0.99946458747636568000,
+ 0.00000000000000000000, -0.70710678118654757000, 1.00000000000000000000,
+ 0.00000000000000000000, -0.69544263500961168000, 0.99946458747636568000,
+ 0.00000000000000000000, -0.68359230202287158000, 0.99785892323860359000,
+ 0.00000000000000000000, -0.67155895484701822000, 0.99518472667219682000,
+ 0.00000000000000000000, -0.65934581510006895000, 0.99144486137381049000,
+ 0.00000000000000000000, -0.64695615253485739000, 0.98664333208487898000,
+ 0.00000000000000000000, -0.63439328416364549000, 0.98078528040323043000,
+ 0.00000000000000000000, -0.62166057337007763000, 0.97387697927733385000,
+ 0.00000000000000000000, -0.60876142900872088000, 0.96592582628906842000,
+ 0.00000000000000000000, -0.59569930449243347000, 0.95694033573220894000,
+ 0.00000000000000000000, -0.58247769686780215000, 0.94693012949510569000,
+ 0.00000000000000000000, -0.56910014587889823000, 0.93590592675732565000,
+ 0.00000000000000000000, -0.55557023301960251000, 0.92387953251128696000,
+ 0.00000000000000000000, -0.54189158057475195000, 0.91086382492117601000,
+ 0.00000000000000000000, -0.52806785065036810000, 0.89687274153268848000,
+ 0.00000000000000000000, -0.51410274419322177000, 0.88192126434835505000,
+ 0.00000000000000000000, -0.49999999999999994000, 0.86602540378443860000,
+ 0.00000000000000000000, -0.48576339371634031000, 0.84920218152657923000,
+ 0.00000000000000000000, -0.47139673682599786000, 0.83146961230254546000,
+ 0.00000000000000000000, -0.45690387563042079000, 0.81284668459161535000,
+ 0.00000000000000000000, -0.44228869021900169000, 0.79335334029123572000,
+ 0.00000000000000000000, -0.42755509343028242000, 0.77301045336273744000,
+ 0.00000000000000000000, -0.41270702980439461000, 0.75183980747897716000,
+ 0.00000000000000000000, -0.39774847452701084000, 0.72986407269783538000,
+ 0.00000000000000000000, -0.38268343236508989000, 0.70710678118654768000,
+ 0.00000000000000000000, -0.36751593659470361000, 0.68359230202287136000,
+ 0.00000000000000000000, -0.35225004792123343000, 0.65934581510006873000,
+ 0.00000000000000000000, -0.33688985339222033000, 0.63439328416364593000,
+ 0.00000000000000000000, -0.32143946530316175000, 0.60876142900872088000,
+ 0.00000000000000000000, -0.30590302009655357000, 0.58247769686780226000,
+ 0.00000000000000000000, -0.29028467725446278000, 0.55557023301960295000,
+ 0.00000000000000000000, -0.27458861818493269000, 0.52806785065036854000,
+ 0.00000000000000000000, -0.25881904510252102000, 0.50000000000000044000,
+ 0.00000000000000000000, -0.24298017990326362000, 0.47139673682599714000,
+ 0.00000000000000000000, -0.22707626303437328000, 0.44228869021900141000,
+ 0.00000000000000000000, -0.21111155235896514000, 0.41270702980439472000,
+ 0.00000000000000000000, -0.19509032201612816000, 0.38268343236508956000,
+ 0.00000000000000000000, -0.17901686127663291000, 0.35225004792123399000,
+ 0.00000000000000000000, -0.16289547339458890000, 0.32143946530316186000,
+ 0.00000000000000000000, -0.14673047445536180000, 0.29028467725446250000,
+ 0.00000000000000000000, -0.13052619222005199000, 0.25881904510252157000,
+ 0.00000000000000000000, -0.11428696496684672000, 0.22707626303437384000,
+ 0.00000000000000000000, -0.09801714032956082600, 0.19509032201612872000,
+ 0.00000000000000000000, -0.08172107413366791500, 0.16289547339458813000,
+ 0.00000000000000000000, -0.06540312923014311700, 0.13052619222005168000,
+ 0.00000000000000000000, -0.04906767432741796600, 0.09801714032956050600,
+ 0.00000000000000000000, -0.03271908282177600500, 0.06540312923014279800,
+ 0.00000000000000000000, -0.01636173162648699500, 0.03271908282177657400,
+ 0.00000000000000000000, -0.00000000000000012246, 0.00000000000000024492,
+ 0.00000000000000000000, 0.01636173162648675200, -0.03271908282177608100,
+ 0.00000000000000000000, 0.03271908282177576200, -0.06540312923014229800,
+ 0.00000000000000000000, 0.04906767432741772400, -0.09801714032956002100,
+ 0.00000000000000000000, 0.06540312923014286700, -0.13052619222005118000,
+ 0.00000000000000000000, 0.08172107413366767900, -0.16289547339458765000,
+ 0.00000000000000000000, 0.09801714032956059000, -0.19509032201612825000,
+ 0.00000000000000000000, 0.11428696496684647000, -0.22707626303437337000,
+ 0.00000000000000000000, 0.13052619222005177000, -0.25881904510252107000,
+ 0.00000000000000000000, 0.14673047445536158000, -0.29028467725446200000,
+ 0.00000000000000000000, 0.16289547339458865000, -0.32143946530316142000,
+ 0.00000000000000000000, 0.17901686127663269000, -0.35225004792123349000,
+ 0.00000000000000000000, 0.19509032201612792000, -0.38268343236508912000,
+ 0.00000000000000000000, 0.21111155235896492000, -0.41270702980439428000,
+ 0.00000000000000000000, 0.22707626303437303000, -0.44228869021900097000,
+ 0.00000000000000000000, 0.24298017990326337000, -0.47139673682599675000,
+ 0.00000000000000000000, 0.25881904510252079000, -0.50000000000000000000,
+ 0.00000000000000000000, 0.27458861818493246000, -0.52806785065036821000,
+ 0.00000000000000000000, 0.29028467725446255000, -0.55557023301960251000,
+ 0.00000000000000000000, 0.30590302009655329000, -0.58247769686780193000,
+ 0.00000000000000000000, 0.32143946530316153000, -0.60876142900872054000,
+ 0.00000000000000000000, 0.33688985339222011000, -0.63439328416364560000,
+ 0.00000000000000000000, 0.35225004792123321000, -0.65934581510006840000,
+ 0.00000000000000000000, 0.36751593659470333000, -0.68359230202287091000,
+ 0.00000000000000000000, 0.38268343236508967000, -0.70710678118654735000,
+ 0.00000000000000000000, 0.39774847452701062000, -0.72986407269783504000,
+ 0.00000000000000000000, 0.41270702980439439000, -0.75183980747897683000,
+ 0.00000000000000000000, 0.42755509343028220000, -0.77301045336273710000,
+ 0.00000000000000000000, 0.44228869021900147000, -0.79335334029123550000,
+ 0.00000000000000000000, 0.45690387563042056000, -0.81284668459161502000,
+ 0.00000000000000000000, 0.47139673682599764000, -0.83146961230254524000,
+ 0.00000000000000000000, 0.48576339371634009000, -0.84920218152657900000,
+ 0.00000000000000000000, 0.49999999999999972000, -0.86602540378443837000,
+ 0.00000000000000000000, 0.51410274419322155000, -0.88192126434835483000,
+ 0.00000000000000000000, 0.52806785065036788000, -0.89687274153268826000,
+ 0.00000000000000000000, 0.54189158057475129000, -0.91086382492117546000,
+ 0.00000000000000000000, 0.55557023301960196000, -0.92387953251128652000,
+ 0.00000000000000000000, 0.56910014587889801000, -0.93590592675732553000,
+ 0.00000000000000000000, 0.58247769686780237000, -0.94693012949510580000,
+ 0.00000000000000000000, 0.59569930449243325000, -0.95694033573220882000,
+ 0.00000000000000000000, 0.60876142900872066000, -0.96592582628906831000,
+ 0.00000000000000000000, 0.62166057337007752000, -0.97387697927733374000,
+ 0.00000000000000000000, 0.63439328416364527000, -0.98078528040323032000,
+ 0.00000000000000000000, 0.64695615253485728000, -0.98664333208487898000,
+ 0.00000000000000000000, 0.65934581510006884000, -0.99144486137381038000,
+ 0.00000000000000000000, 0.67155895484701811000, -0.99518472667219682000,
+ 0.00000000000000000000, 0.68359230202287102000, -0.99785892323860348000,
+ 0.00000000000000000000, 0.69544263500961145000, -0.99946458747636557000,
+ 0.00000000000000000000, 0.70710678118654713000, -1.00000000000000000000,
+ 0.00000000000000000000, 0.71858161777969798000, -0.99946458747636568000,
+ 0.00000000000000000000, 0.72986407269783571000, -0.99785892323860348000,
+ 0.00000000000000000000, 0.74095112535495922000, -0.99518472667219682000,
+ 0.00000000000000000000, 0.75183980747897727000, -0.99144486137381049000,
+ 0.00000000000000000000, 0.76252720390638806000, -0.98664333208487909000,
+ 0.00000000000000000000, 0.77301045336273666000, -0.98078528040323065000,
+ 0.00000000000000000000, 0.78328674922865038000, -0.97387697927733363000,
+ 0.00000000000000000000, 0.79335334029123494000, -0.96592582628906842000,
+ 0.00000000000000000000, 0.80320753148064450000, -0.95694033573220927000,
+ 0.00000000000000000000, 0.81284668459161513000, -0.94693012949510569000,
+ 0.00000000000000000000, 0.82226821898977531000, -0.93590592675732542000,
+ 0.00000000000000000000, 0.83146961230254524000, -0.92387953251128674000,
+ 0.00000000000000000000, 0.84044840109443786000, -0.91086382492117601000,
+ 0.00000000000000000000, 0.84920218152657900000, -0.89687274153268803000,
+ 0.00000000000000000000, 0.85772861000027201000, -0.88192126434835516000,
+ 0.00000000000000000000, 0.86602540378443837000, -0.86602540378443915000,
+ 0.00000000000000000000, 0.87409034162675892000, -0.84920218152657878000,
+ 0.00000000000000000000, 0.88192126434835494000, -0.83146961230254557000,
+ 0.00000000000000000000, 0.88951607542185573000, -0.81284668459161591000,
+ 0.00000000000000000000, 0.89687274153268826000, -0.79335334029123528000,
+ 0.00000000000000000000, 0.90398929312344312000, -0.77301045336273755000,
+ 0.00000000000000000000, 0.91086382492117590000, -0.75183980747897727000,
+ 0.00000000000000000000, 0.91749449644749126000, -0.72986407269783604000,
+ 0.00000000000000000000, 0.92387953251128685000, -0.70710678118654713000,
+ 0.00000000000000000000, 0.93001722368401207000, -0.68359230202287136000,
+ 0.00000000000000000000, 0.93590592675732553000, -0.65934581510006951000,
+ 0.00000000000000000000, 0.94154406518302081000, -0.63439328416364538000,
+ 0.00000000000000000000, 0.94693012949510558000, -0.60876142900872099000,
+ 0.00000000000000000000, 0.95206267771392405000, -0.58247769686780315000,
+ 0.00000000000000000000, 0.95694033573220882000, -0.55557023301960229000,
+ 0.00000000000000000000, 0.96156179768296179000, -0.52806785065036865000,
+ 0.00000000000000000000, 0.96592582628906831000, -0.49999999999999978000,
+ 0.00000000000000000000, 0.97003125319454397000, -0.47139673682599803000,
+ 0.00000000000000000000, 0.97387697927733374000, -0.44228869021900075000,
+ 0.00000000000000000000, 0.97746197494357190000, -0.41270702980439483000,
+ 0.00000000000000000000, 0.98078528040323032000, -0.38268343236509050000,
+ 0.00000000000000000000, 0.98384600592707749000, -0.35225004792123327000,
+ 0.00000000000000000000, 0.98664333208487898000, -0.32143946530316198000,
+ 0.00000000000000000000, 0.98917650996478090000, -0.29028467725446344000,
+ 0.00000000000000000000, 0.99144486137381038000, -0.25881904510252079000,
+ 0.00000000000000000000, 0.99344777901944437000, -0.22707626303437395000,
+ 0.00000000000000000000, 0.99518472667219682000, -0.19509032201612972000,
+ 0.00000000000000000000, 0.99665523930918032000, -0.16289547339458912000,
+ 0.00000000000000000000, 0.99785892323860348000, -0.13052619222005094000,
+ 0.00000000000000000000, 0.99879545620517241000, -0.09801714032956063100,
+ 0.00000000000000000000, 0.99946458747636568000, -0.06540312923014379700,
+ 0.00000000000000000000, 0.99986613790956180000, -0.03271908282177580400,
+ 0.00000000000000000000, 1.00000000000000000000, -0.00000000000000036738,
+ 0.00000000000000000000, 0.99986613790956180000, 0.03271908282177506800,
+ 0.00000000000000000000, 0.99946458747636568000, 0.06540312923014306200,
+ 0.00000000000000000000, 0.99879545620517241000, 0.09801714032955989600,
+ 0.00000000000000000000, 0.99785892323860359000, 0.13052619222005019000,
+ 0.00000000000000000000, 0.99665523930918032000, 0.16289547339458840000,
+ 0.00000000000000000000, 0.99518472667219682000, 0.19509032201612900000,
+ 0.00000000000000000000, 0.99344777901944437000, 0.22707626303437323000,
+ 0.00000000000000000000, 0.99144486137381049000, 0.25881904510252013000,
+ 0.00000000000000000000, 0.98917650996478090000, 0.29028467725446278000,
+ 0.00000000000000000000, 0.98664333208487898000, 0.32143946530316131000,
+ 0.00000000000000000000, 0.98384600592707749000, 0.35225004792123255000,
+ 0.00000000000000000000, 0.98078528040323043000, 0.38268343236508984000,
+ 0.00000000000000000000, 0.97746197494357190000, 0.41270702980439417000,
+ 0.00000000000000000000, 0.97387697927733385000, 0.44228869021900008000,
+ 0.00000000000000000000, 0.97003125319454397000, 0.47139673682599742000,
+ 0.00000000000000000000, 0.96592582628906842000, 0.49999999999999917000,
+ 0.00000000000000000000, 0.96156179768296191000, 0.52806785065036810000,
+ 0.00000000000000000000, 0.95694033573220894000, 0.55557023301960173000,
+ 0.00000000000000000000, 0.95206267771392417000, 0.58247769686780249000,
+ 0.00000000000000000000, 0.94693012949510569000, 0.60876142900872043000,
+ 0.00000000000000000000, 0.94154406518302092000, 0.63439328416364471000,
+ 0.00000000000000000000, 0.93590592675732565000, 0.65934581510006895000,
+ 0.00000000000000000000, 0.93001722368401218000, 0.68359230202287080000,
+ 0.00000000000000000000, 0.92387953251128696000, 0.70710678118654657000,
+ 0.00000000000000000000, 0.91749449644749137000, 0.72986407269783549000,
+ 0.00000000000000000000, 0.91086382492117601000, 0.75183980747897683000,
+ 0.00000000000000000000, 0.90398929312344334000, 0.77301045336273710000,
+ 0.00000000000000000000, 0.89687274153268848000, 0.79335334029123483000,
+ 0.00000000000000000000, 0.88951607542185596000, 0.81284668459161546000,
+ 0.00000000000000000000, 0.88192126434835505000, 0.83146961230254512000,
+ 0.00000000000000000000, 0.87409034162675903000, 0.84920218152657845000,
+ 0.00000000000000000000, 0.86602540378443860000, 0.86602540378443871000,
+ 0.00000000000000000000, 0.85772861000027223000, 0.88192126434835483000,
+ 0.00000000000000000000, 0.84920218152657923000, 0.89687274153268781000,
+ 0.00000000000000000000, 0.84044840109443808000, 0.91086382492117579000,
+ 0.00000000000000000000, 0.83146961230254546000, 0.92387953251128641000,
+ 0.00000000000000000000, 0.82226821898977553000, 0.93590592675732520000,
+ 0.00000000000000000000, 0.81284668459161535000, 0.94693012949510547000,
+ 0.00000000000000000000, 0.80320753148064472000, 0.95694033573220905000,
+ 0.00000000000000000000, 0.79335334029123572000, 0.96592582628906776000,
+ 0.00000000000000000000, 0.78328674922865060000, 0.97387697927733341000,
+ 0.00000000000000000000, 0.77301045336273744000, 0.98078528040323010000,
+ 0.00000000000000000000, 0.76252720390638828000, 0.98664333208487898000,
+ 0.00000000000000000000, 0.75183980747897716000, 0.99144486137381049000,
+ 0.00000000000000000000, 0.74095112535495911000, 0.99518472667219693000,
+ 0.00000000000000000000, 0.72986407269783538000, 0.99785892323860359000,
+ 0.00000000000000000000, 0.71858161777969853000, 0.99946458747636557000,
+ 0.00000000000000000000, 0.70710678118654768000, 1.00000000000000000000,
+ 0.00000000000000000000, 0.69544263500961201000, 0.99946458747636568000,
+ 0.00000000000000000000, 0.68359230202287136000, 0.99785892323860348000,
+ 0.00000000000000000000, 0.67155895484701866000, 0.99518472667219693000,
+ 0.00000000000000000000, 0.65934581510006873000, 0.99144486137381038000,
+ 0.00000000000000000000, 0.64695615253485816000, 0.98664333208487931000,
+ 0.00000000000000000000, 0.63439328416364593000, 0.98078528040323065000,
+ 0.00000000000000000000, 0.62166057337007741000, 0.97387697927733363000,
+ 0.00000000000000000000, 0.60876142900872088000, 0.96592582628906842000,
+ 0.00000000000000000000, 0.59569930449243325000, 0.95694033573220871000,
+ 0.00000000000000000000, 0.58247769686780226000, 0.94693012949510580000,
+ 0.00000000000000000000, 0.56910014587889790000, 0.93590592675732542000,
+ 0.00000000000000000000, 0.55557023301960295000, 0.92387953251128740000,
+ 0.00000000000000000000, 0.54189158057475206000, 0.91086382492117612000,
+ 0.00000000000000000000, 0.52806785065036854000, 0.89687274153268892000,
+ 0.00000000000000000000, 0.51410274419322188000, 0.88192126434835516000,
+ 0.00000000000000000000, 0.50000000000000044000, 0.86602540378443915000,
+ 0.00000000000000000000, 0.48576339371634003000, 0.84920218152657889000,
+ 0.00000000000000000000, 0.47139673682599714000, 0.83146961230254457000,
+ 0.00000000000000000000, 0.45690387563042129000, 0.81284668459161602000,
+ 0.00000000000000000000, 0.44228869021900141000, 0.79335334029123539000,
+ 0.00000000000000000000, 0.42755509343028253000, 0.77301045336273755000,
+ 0.00000000000000000000, 0.41270702980439472000, 0.75183980747897738000,
+ 0.00000000000000000000, 0.39774847452701134000, 0.72986407269783604000,
+ 0.00000000000000000000, 0.38268343236508956000, 0.70710678118654724000,
+ 0.00000000000000000000, 0.36751593659470450000, 0.68359230202287280000,
+ 0.00000000000000000000, 0.35225004792123399000, 0.65934581510006962000,
+ 0.00000000000000000000, 0.33688985339222000000, 0.63439328416364538000,
+ 0.00000000000000000000, 0.32143946530316186000, 0.60876142900872110000,
+ 0.00000000000000000000, 0.30590302009655324000, 0.58247769686780182000,
+ 0.00000000000000000000, 0.29028467725446250000, 0.55557023301960240000,
+ 0.00000000000000000000, 0.27458861818493197000, 0.52806785065036732000,
+ 0.00000000000000000000, 0.25881904510252157000, 0.50000000000000144000,
+ 0.00000000000000000000, 0.24298017990326418000, 0.47139673682599814000,
+ 0.00000000000000000000, 0.22707626303437384000, 0.44228869021900241000,
+ 0.00000000000000000000, 0.21111155235896528000, 0.41270702980439494000,
+ 0.00000000000000000000, 0.19509032201612872000, 0.38268343236509061000,
+ 0.00000000000000000000, 0.17901686127663261000, 0.35225004792123338000,
+ 0.00000000000000000000, 0.16289547339458813000, 0.32143946530316042000,
+ 0.00000000000000000000, 0.14673047445536239000, 0.29028467725446355000,
+ 0.00000000000000000000, 0.13052619222005168000, 0.25881904510252096000,
+ 0.00000000000000000000, 0.11428696496684684000, 0.22707626303437406000,
+ 0.00000000000000000000, 0.09801714032956050600, 0.19509032201612808000,
+ 0.00000000000000000000, 0.08172107413366848400, 0.16289547339458926000,
+ 0.00000000000000000000, 0.06540312923014279800, 0.13052619222005105000,
+ 0.00000000000000000000, 0.04906767432741897900, 0.09801714032956251900,
+ 0.00000000000000000000, 0.03271908282177657400, 0.06540312923014392200,
+ 0.00000000000000000000, 0.01636173162648756400, 0.03271908282177770500,
+ 0.00000000000000000000, 0.00000000000000024492, 0.00000000000000048984};
+
+const FLOAT32 ixheaacd_twid_tbl_fft_224[372] = {
+ -0.028046f, 0.999607f, -0.056070f, 0.998427f, -0.084051f, 0.996461f, -0.111964f,
+ 0.993712f, -0.139790f, 0.990181f, -0.167506f, 0.985871f, -0.056070f, 0.998427f,
+ -0.111964f, 0.993712f, -0.167506f, 0.985871f, -0.222521f, 0.974928f, -0.276836f,
+ 0.960917f, -0.330279f, 0.943883f, -0.084051f, 0.996461f, -0.167506f, 0.985871f,
+ -0.249776f, 0.968304f, -0.330279f, 0.943883f, -0.408444f, 0.912783f, -0.483719f,
+ 0.875223f, -0.111964f, 0.993712f, -0.222521f, 0.974928f, -0.330279f, 0.943883f,
+ -0.433884f, 0.900969f, -0.532032f, 0.846724f, -0.623490f, 0.781831f, -0.139790f,
+ 0.990181f, -0.276836f, 0.960917f, -0.408444f, 0.912783f, -0.532032f, 0.846724f,
+ -0.645172f, 0.764037f, -0.745642f, 0.666347f, -0.167506f, 0.985871f, -0.330279f,
+ 0.943883f, -0.483719f, 0.875223f, -0.623490f, 0.781831f, -0.745642f, 0.666347f,
+ -0.846724f, 0.532032f, -0.195090f, 0.980785f, -0.382683f, 0.923880f, -0.555570f,
+ 0.831470f, -0.707107f, 0.707107f, -0.831470f, 0.555570f, -0.923880f, 0.382683f,
+ -0.222521f, 0.974928f, -0.433884f, 0.900969f, -0.623490f, 0.781831f, -0.781831f,
+ 0.623490f, -0.900969f, 0.433884f, -0.974928f, 0.222521f, -0.249776f, 0.968304f,
+ -0.483719f, 0.875223f, -0.686997f, 0.726660f, -0.846724f, 0.532032f, -0.952775f,
+ 0.303677f, -0.998427f, 0.056070f, -0.276836f, 0.960917f, -0.532032f, 0.846724f,
+ -0.745642f, 0.666347f, -0.900969f, 0.433884f, -0.985871f, 0.167506f, -0.993712f,
+ -0.111964f, -0.303677f, 0.952775f, -0.578671f, 0.815561f, -0.799010f, 0.601317f,
+ -0.943883f, 0.330279f, -0.999607f, 0.028046f, -0.960917f, -0.276836f, -0.330279f,
+ 0.943883f, -0.623490f, 0.781831f, -0.846724f, 0.532032f, -0.974928f, 0.222521f,
+ -0.993712f, -0.111964f, -0.900969f, -0.433884f, -0.356622f, 0.934249f, -0.666347f,
+ 0.745642f, -0.888446f, 0.458982f, -0.993712f, 0.111964f, -0.968304f, -0.249776f,
+ -0.815561f, -0.578671f, -0.382683f, 0.923880f, -0.707107f, 0.707107f, -0.923880f,
+ 0.382683f, -1.000000f, 0.000000f, -0.923880f, -0.382683f, -0.707107f, -0.707107f,
+ -0.408444f, 0.912783f, -0.745642f, 0.666347f, -0.952775f, 0.303677f, -0.993712f,
+ -0.111964f, -0.861313f, -0.508075f, -0.578671f, -0.815561f, -0.433884f, 0.900969f,
+ -0.781831f, 0.623490f, -0.974928f, 0.222521f, -0.974928f, -0.222521f, -0.781831f,
+ -0.623490f, -0.433884f, -0.900969f, -0.458982f, 0.888446f, -0.815561f, 0.578671f,
+ -0.990181f, 0.139790f, -0.943883f, -0.330279f, -0.686997f, -0.726660f, -0.276836f,
+ -0.960917f, -0.483719f, 0.875223f, -0.846724f, 0.532032f, -0.998427f, 0.056070f,
+ -0.900969f, -0.433884f, -0.578671f, -0.815561f, -0.111964f, -0.993712f, -0.508075f,
+ 0.861313f, -0.875223f, 0.483719f, -0.999607f, -0.028046f, -0.846724f, -0.532032f,
+ -0.458982f, -0.888446f, 0.056070f, -0.998427f, -0.532032f, 0.846724f, -0.900969f,
+ 0.433884f, -0.993712f, -0.111964f, -0.781831f, -0.623490f, -0.330279f, -0.943883f,
+ 0.222521f, -0.974928f, -0.555570f, 0.831470f, -0.923880f, 0.382683f, -0.980785f,
+ -0.195090f, -0.707107f, -0.707107f, -0.195090f, -0.980785f, 0.382683f, -0.923880f,
+ -0.578671f, 0.815561f, -0.943883f, 0.330279f, -0.960917f, -0.276836f, -0.623490f,
+ -0.781831f, -0.056070f, -0.998427f, 0.532032f, -0.846724f, -0.601317f, 0.799010f,
+ -0.960917f, 0.276836f, -0.934249f, -0.356622f, -0.532032f, -0.846724f, 0.084051f,
+ -0.996461f, 0.666347f, -0.745642f, -0.623490f, 0.781831f, -0.974928f, 0.222521f,
+ -0.900969f, -0.433884f, -0.433884f, -0.900969f, 0.222521f, -0.974928f, 0.781831f,
+ -0.623490f, -0.645172f, 0.764037f, -0.985871f, 0.167506f, -0.861313f, -0.508075f,
+ -0.330279f, -0.943883f, 0.356622f, -0.934249f, 0.875223f, -0.483719f, -0.666347f,
+ 0.745642f, -0.993712f, 0.111964f, -0.815561f, -0.578671f, -0.222521f, -0.974928f,
+ 0.483719f, -0.875223f, 0.943883f, -0.330279f, -0.686997f, 0.726660f, -0.998427f,
+ 0.056070f, -0.764037f, -0.645172f, -0.111964f, -0.993712f, 0.601317f, -0.799010f,
+ 0.985871f, -0.167506f, -0.707107f, 0.707107f, -1.000000f, 0.000000f, -0.707107f,
+ -0.707107f, -0.000000f, -1.000000f, 0.707107f, -0.707107f, 1.000000f, -0.000000f,
+ -0.726660f, 0.686997f, -0.998427f, -0.056070f, -0.645172f, -0.764037f, 0.111964f,
+ -0.993712f, 0.799010f, -0.601317f, 0.985871f, 0.167506f, -0.745642f, 0.666347f,
+ -0.993712f, -0.111964f, -0.578671f, -0.815561f, 0.222521f, -0.974928f, 0.875223f,
+ -0.483719f, 0.943883f, 0.330279f, -0.764037f, 0.645172f, -0.985871f, -0.167506f,
+ -0.508075f, -0.861313f, 0.330279f, -0.943883f, 0.934249f, -0.356622f, 0.875223f,
+ 0.483719f};
+
+const FLOAT32 ixheaacd_twid_tbl_fft_288[380] = {
+ -0.021815f, 0.999762f, -0.043619f, 0.999048f, -0.043619f, 0.999048f, -0.087156f,
+ 0.996195f, -0.065403f, 0.997859f, -0.130526f, 0.991445f, -0.087156f, 0.996195f,
+ -0.173648f, 0.984808f, -0.108867f, 0.994056f, -0.216440f, 0.976296f, -0.130526f,
+ 0.991445f, -0.258819f, 0.965926f, -0.152123f, 0.988362f, -0.300706f, 0.953717f,
+ -0.173648f, 0.984808f, -0.342020f, 0.939693f, -0.195090f, 0.980785f, -0.382683f,
+ 0.923880f, -0.216440f, 0.976296f, -0.422618f, 0.906308f, -0.237686f, 0.971342f,
+ -0.461749f, 0.887011f, -0.258819f, 0.965926f, -0.500000f, 0.866025f, -0.279829f,
+ 0.960050f, -0.537300f, 0.843391f, -0.300706f, 0.953717f, -0.573576f, 0.819152f,
+ -0.321439f, 0.946930f, -0.608761f, 0.793353f, -0.342020f, 0.939693f, -0.642788f,
+ 0.766044f, -0.362438f, 0.932008f, -0.675590f, 0.737277f, -0.382683f, 0.923880f,
+ -0.707107f, 0.707107f, -0.402747f, 0.915311f, -0.737277f, 0.675590f, -0.422618f,
+ 0.906308f, -0.766044f, 0.642788f, -0.442289f, 0.896873f, -0.793353f, 0.608761f,
+ -0.461749f, 0.887011f, -0.819152f, 0.573576f, -0.480989f, 0.876727f, -0.843391f,
+ 0.537300f, -0.500000f, 0.866025f, -0.866025f, 0.500000f, -0.518773f, 0.854912f,
+ -0.887011f, 0.461749f, -0.537300f, 0.843391f, -0.906308f, 0.422618f, -0.555570f,
+ 0.831470f, -0.923880f, 0.382683f, -0.573576f, 0.819152f, -0.939693f, 0.342020f,
+ -0.591310f, 0.806445f, -0.953717f, 0.300706f, -0.608761f, 0.793353f, -0.965926f,
+ 0.258819f, -0.625923f, 0.779884f, -0.976296f, 0.216440f, -0.642788f, 0.766044f,
+ -0.984808f, 0.173648f, -0.659346f, 0.751840f, -0.991445f, 0.130526f, -0.675590f,
+ 0.737277f, -0.996195f, 0.087156f, -0.691513f, 0.722364f, -0.999048f, 0.043619f,
+ -0.707107f, 0.707107f, -1.000000f, 0.000000f, -0.722364f, 0.691513f, -0.999048f,
+ -0.043619f, -0.737277f, 0.675590f, -0.996195f, -0.087156f, -0.751840f, 0.659346f,
+ -0.991445f, -0.130526f, -0.766044f, 0.642788f, -0.984808f, -0.173648f, -0.779884f,
+ 0.625923f, -0.976296f, -0.216440f, -0.793353f, 0.608761f, -0.965926f, -0.258819f,
+ -0.806445f, 0.591310f, -0.953717f, -0.300706f, -0.819152f, 0.573576f, -0.939693f,
+ -0.342020f, -0.831470f, 0.555570f, -0.923880f, -0.382683f, -0.843391f, 0.537300f,
+ -0.906308f, -0.422618f, -0.854912f, 0.518773f, -0.887011f, -0.461749f, -0.866025f,
+ 0.500000f, -0.866025f, -0.500000f, -0.876727f, 0.480989f, -0.843391f, -0.537300f,
+ -0.887011f, 0.461749f, -0.819152f, -0.573576f, -0.896873f, 0.442289f, -0.793353f,
+ -0.608761f, -0.906308f, 0.422618f, -0.766044f, -0.642788f, -0.915311f, 0.402747f,
+ -0.737277f, -0.675590f, -0.923880f, 0.382683f, -0.707107f, -0.707107f, -0.932008f,
+ 0.362438f, -0.675590f, -0.737277f, -0.939693f, 0.342020f, -0.642788f, -0.766044f,
+ -0.946930f, 0.321439f, -0.608761f, -0.793353f, -0.953717f, 0.300706f, -0.573576f,
+ -0.819152f, -0.960050f, 0.279829f, -0.537300f, -0.843391f, -0.965926f, 0.258819f,
+ -0.500000f, -0.866025f, -0.971342f, 0.237686f, -0.461749f, -0.887011f, -0.976296f,
+ 0.216440f, -0.422618f, -0.906308f, -0.980785f, 0.195090f, -0.382683f, -0.923880f,
+ -0.984808f, 0.173648f, -0.342020f, -0.939693f, -0.988362f, 0.152123f, -0.300706f,
+ -0.953717f, -0.991445f, 0.130526f, -0.258819f, -0.965926f, -0.994056f, 0.108867f,
+ -0.216440f, -0.976296f, -0.996195f, 0.087156f, -0.173648f, -0.984808f, -0.997859f,
+ 0.065403f, -0.130526f, -0.991445f, -0.999048f, 0.043619f, -0.087156f, -0.996195f,
+ -0.999762f, 0.021815f, -0.043619f, -0.999048f, -1.000000f, 0.000000f, -0.000000f,
+ -1.000000f, -0.999762f, -0.021815f, 0.043619f, -0.999048f, -0.999048f, -0.043619f,
+ 0.087156f, -0.996195f, -0.997859f, -0.065403f, 0.130526f, -0.991445f, -0.996195f,
+ -0.087156f, 0.173648f, -0.984808f, -0.994056f, -0.108867f, 0.216440f, -0.976296f,
+ -0.991445f, -0.130526f, 0.258819f, -0.965926f, -0.988362f, -0.152123f, 0.300706f,
+ -0.953717f, -0.984808f, -0.173648f, 0.342020f, -0.939693f, -0.980785f, -0.195090f,
+ 0.382683f, -0.923880f, -0.976296f, -0.216440f, 0.422618f, -0.906308f, -0.971342f,
+ -0.237686f, 0.461749f, -0.887011f, -0.965926f, -0.258819f, 0.500000f, -0.866025f,
+ -0.960050f, -0.279829f, 0.537300f, -0.843391f, -0.953717f, -0.300706f, 0.573576f,
+ -0.819152f, -0.946930f, -0.321439f, 0.608761f, -0.793353f, -0.939693f, -0.342020f,
+ 0.642788f, -0.766044f, -0.932008f, -0.362438f, 0.675590f, -0.737277f, -0.923880f,
+ -0.382683f, 0.707107f, -0.707107f, -0.915311f, -0.402747f, 0.737277f, -0.675590f,
+ -0.906308f, -0.422618f, 0.766044f, -0.642788f, -0.896873f, -0.442289f, 0.793353f,
+ -0.608761f, -0.887011f, -0.461749f, 0.819152f, -0.573576f, -0.876727f, -0.480989f,
+ 0.843391f, -0.537300f};
+
+const FLOAT32 ixheaacd_twid_tbl_fft_336[564] = {
+ -0.018699f, 0.999825f, -0.037391f, 0.999301f, -0.056070f, 0.998427f, -0.074730f,
+ 0.997204f, -0.093364f, 0.995632f, -0.111964f, 0.993712f, -0.130526f, 0.991445f,
+ -0.149042f, 0.988831f, -0.167506f, 0.985871f, -0.185912f, 0.982566f, -0.204252f,
+ 0.978918f, -0.222521f, 0.974928f, -0.240712f, 0.970597f, -0.258819f, 0.965926f,
+ -0.276836f, 0.960917f, -0.294755f, 0.955573f, -0.312572f, 0.949894f, -0.330279f,
+ 0.943883f, -0.347871f, 0.937542f, -0.365341f, 0.930874f, -0.382683f, 0.923880f,
+ -0.399892f, 0.916562f, -0.416961f, 0.908924f, -0.433884f, 0.900969f, -0.450655f,
+ 0.892698f, -0.467269f, 0.884115f, -0.483719f, 0.875223f, -0.500000f, 0.866025f,
+ -0.516106f, 0.856525f, -0.532032f, 0.846724f, -0.547772f, 0.836628f, -0.563320f,
+ 0.826239f, -0.578671f, 0.815561f, -0.593820f, 0.804598f, -0.608761f, 0.793353f,
+ -0.623490f, 0.781832f, -0.638000f, 0.770036f, -0.652287f, 0.757972f, -0.666347f,
+ 0.745642f, -0.680173f, 0.733052f, -0.693761f, 0.720205f, -0.707107f, 0.707107f,
+ -0.720205f, 0.693761f, -0.733052f, 0.680173f, -0.745642f, 0.666347f, -0.757972f,
+ 0.652287f, -0.770036f, 0.638000f, -0.037391f, 0.999301f, -0.074730f, 0.997204f,
+ -0.111964f, 0.993712f, -0.149042f, 0.988831f, -0.185912f, 0.982566f, -0.222521f,
+ 0.974928f, -0.258819f, 0.965926f, -0.294755f, 0.955573f, -0.330279f, 0.943883f,
+ -0.365341f, 0.930874f, -0.399892f, 0.916562f, -0.433884f, 0.900969f, -0.467269f,
+ 0.884115f, -0.500000f, 0.866025f, -0.532032f, 0.846724f, -0.563320f, 0.826239f,
+ -0.593820f, 0.804598f, -0.623490f, 0.781832f, -0.652287f, 0.757972f, -0.680173f,
+ 0.733052f, -0.707107f, 0.707107f, -0.733052f, 0.680173f, -0.757972f, 0.652287f,
+ -0.781832f, 0.623490f, -0.804598f, 0.593820f, -0.826239f, 0.563320f, -0.846724f,
+ 0.532032f, -0.866025f, 0.500000f, -0.884115f, 0.467269f, -0.900969f, 0.433884f,
+ -0.916562f, 0.399892f, -0.930874f, 0.365341f, -0.943883f, 0.330279f, -0.955573f,
+ 0.294755f, -0.965926f, 0.258819f, -0.974928f, 0.222521f, -0.982566f, 0.185912f,
+ -0.988831f, 0.149042f, -0.993712f, 0.111964f, -0.997204f, 0.074730f, -0.999301f,
+ 0.037391f, -1.000000f, 0.000000f, -0.999301f, -0.037391f, -0.997204f, -0.074730f,
+ -0.993712f, -0.111964f, -0.988831f, -0.149042f, -0.982566f, -0.185912f, -0.056070f,
+ 0.998427f, -0.111964f, 0.993712f, -0.167506f, 0.985871f, -0.222521f, 0.974928f,
+ -0.276836f, 0.960917f, -0.330279f, 0.943883f, -0.382683f, 0.923880f, -0.433884f,
+ 0.900969f, -0.483719f, 0.875223f, -0.532032f, 0.846724f, -0.578671f, 0.815561f,
+ -0.623490f, 0.781832f, -0.666347f, 0.745642f, -0.707107f, 0.707107f, -0.745642f,
+ 0.666347f, -0.781832f, 0.623490f, -0.815561f, 0.578671f, -0.846724f, 0.532032f,
+ -0.875223f, 0.483719f, -0.900969f, 0.433884f, -0.923880f, 0.382683f, -0.943883f,
+ 0.330279f, -0.960917f, 0.276836f, -0.974928f, 0.222521f, -0.985871f, 0.167506f,
+ -0.993712f, 0.111964f, -0.998427f, 0.056070f, -1.000000f, 0.000000f, -0.998427f,
+ -0.056070f, -0.993712f, -0.111964f, -0.985871f, -0.167506f, -0.974928f, -0.222521f,
+ -0.960917f, -0.276836f, -0.943883f, -0.330279f, -0.923880f, -0.382683f, -0.900969f,
+ -0.433884f, -0.875223f, -0.483719f, -0.846724f, -0.532032f, -0.815561f, -0.578671f,
+ -0.781832f, -0.623490f, -0.745642f, -0.666347f, -0.707107f, -0.707107f, -0.666347f,
+ -0.745642f, -0.623490f, -0.781832f, -0.578671f, -0.815561f, -0.532032f, -0.846724f,
+ -0.483719f, -0.875223f, -0.074730f, 0.997204f, -0.149042f, 0.988831f, -0.222521f,
+ 0.974928f, -0.294755f, 0.955573f, -0.365341f, 0.930874f, -0.433884f, 0.900969f,
+ -0.500000f, 0.866025f, -0.563320f, 0.826239f, -0.623490f, 0.781832f, -0.680173f,
+ 0.733052f, -0.733052f, 0.680173f, -0.781832f, 0.623490f, -0.826239f, 0.563320f,
+ -0.866025f, 0.500000f, -0.900969f, 0.433884f, -0.930874f, 0.365341f, -0.955573f,
+ 0.294755f, -0.974928f, 0.222521f, -0.988831f, 0.149042f, -0.997204f, 0.074730f,
+ -1.000000f, 0.000000f, -0.997204f, -0.074730f, -0.988831f, -0.149042f, -0.974928f,
+ -0.222521f, -0.955573f, -0.294755f, -0.930874f, -0.365341f, -0.900969f, -0.433884f,
+ -0.866025f, -0.500000f, -0.826239f, -0.563320f, -0.781832f, -0.623490f, -0.733052f,
+ -0.680173f, -0.680173f, -0.733052f, -0.623490f, -0.781832f, -0.563320f, -0.826239f,
+ -0.500000f, -0.866025f, -0.433884f, -0.900969f, -0.365341f, -0.930874f, -0.294755f,
+ -0.955573f, -0.222521f, -0.974928f, -0.149042f, -0.988831f, -0.074730f, -0.997204f,
+ -0.000000f, -1.000000f, 0.074730f, -0.997204f, 0.149042f, -0.988831f, 0.222521f,
+ -0.974928f, 0.294755f, -0.955573f, 0.365341f, -0.930874f, -0.093364f, 0.995632f,
+ -0.185912f, 0.982566f, -0.276836f, 0.960917f, -0.365341f, 0.930874f, -0.450655f,
+ 0.892698f, -0.532032f, 0.846724f, -0.608761f, 0.793353f, -0.680173f, 0.733052f,
+ -0.745642f, 0.666347f, -0.804598f, 0.593820f, -0.856525f, 0.516106f, -0.900969f,
+ 0.433884f, -0.937542f, 0.347871f, -0.965926f, 0.258819f, -0.985871f, 0.167506f,
+ -0.997204f, 0.074730f, -0.999825f, -0.018699f, -0.993712f, -0.111964f, -0.978918f,
+ -0.204252f, -0.955573f, -0.294755f, -0.923880f, -0.382683f, -0.884115f, -0.467269f,
+ -0.836628f, -0.547772f, -0.781832f, -0.623490f, -0.720205f, -0.693761f, -0.652287f,
+ -0.757972f, -0.578671f, -0.815561f, -0.500000f, -0.866025f, -0.416961f, -0.908924f,
+ -0.330279f, -0.943883f, -0.240712f, -0.970597f, -0.149042f, -0.988831f, -0.056070f,
+ -0.998427f, 0.037391f, -0.999301f, 0.130526f, -0.991445f, 0.222521f, -0.974928f,
+ 0.312572f, -0.949894f, 0.399892f, -0.916562f, 0.483719f, -0.875223f, 0.563320f,
+ -0.826239f, 0.638000f, -0.770036f, 0.707107f, -0.707107f, 0.770036f, -0.638000f,
+ 0.826239f, -0.563320f, 0.875223f, -0.483719f, 0.916562f, -0.399892f, 0.949894f,
+ -0.312572f, -0.111964f, 0.993712f, -0.222521f, 0.974928f, -0.330279f, 0.943883f,
+ -0.433884f, 0.900969f, -0.532032f, 0.846724f, -0.623490f, 0.781832f, -0.707107f,
+ 0.707107f, -0.781832f, 0.623490f, -0.846724f, 0.532032f, -0.900969f, 0.433884f,
+ -0.943883f, 0.330279f, -0.974928f, 0.222521f, -0.993712f, 0.111964f, -1.000000f,
+ 0.000000f, -0.993712f, -0.111964f, -0.974928f, -0.222521f, -0.943883f, -0.330279f,
+ -0.900969f, -0.433884f, -0.846724f, -0.532032f, -0.781832f, -0.623490f, -0.707107f,
+ -0.707107f, -0.623490f, -0.781832f, -0.532032f, -0.846724f, -0.433884f, -0.900969f,
+ -0.330279f, -0.943883f, -0.222521f, -0.974928f, -0.111964f, -0.993712f, -0.000000f,
+ -1.000000f, 0.111964f, -0.993712f, 0.222521f, -0.974928f, 0.330279f, -0.943883f,
+ 0.433884f, -0.900969f, 0.532032f, -0.846724f, 0.623490f, -0.781832f, 0.707107f,
+ -0.707107f, 0.781832f, -0.623490f, 0.846724f, -0.532032f, 0.900969f, -0.433884f,
+ 0.943883f, -0.330279f, 0.974928f, -0.222521f, 0.993712f, -0.111964f, 1.000000f,
+ -0.000000f, 0.993712f, 0.111964f, 0.974928f, 0.222521f, 0.943883f, 0.330279f,
+ 0.900969f, 0.433884f, 0.846724f, 0.532032f
+
+};
+
+const FLOAT32 ixheaacd_twid_tbl_fft_168[276] = {
+ -0.037391f, 0.999301f, -0.074730f, 0.997204f, -0.111964f, 0.993712f, -0.149042f,
+ 0.988831f, -0.185912f, 0.982566f, -0.222521f, 0.974928f, -0.258819f, 0.965926f,
+ -0.294755f, 0.955573f, -0.330279f, 0.943883f, -0.365341f, 0.930874f, -0.399892f,
+ 0.916562f, -0.433884f, 0.900969f, -0.467269f, 0.884115f, -0.500000f, 0.866025f,
+ -0.532032f, 0.846724f, -0.563320f, 0.826239f, -0.593820f, 0.804598f, -0.623490f,
+ 0.781832f, -0.652287f, 0.757972f, -0.680173f, 0.733052f, -0.707107f, 0.707107f,
+ -0.733052f, 0.680173f, -0.757972f, 0.652287f, -0.074730f, 0.997204f, -0.149042f,
+ 0.988831f, -0.222521f, 0.974928f, -0.294755f, 0.955573f, -0.365341f, 0.930874f,
+ -0.433884f, 0.900969f, -0.500000f, 0.866025f, -0.563320f, 0.826239f, -0.623490f,
+ 0.781832f, -0.680173f, 0.733052f, -0.733052f, 0.680173f, -0.781832f, 0.623490f,
+ -0.826239f, 0.563320f, -0.866025f, 0.500000f, -0.900969f, 0.433884f, -0.930874f,
+ 0.365341f, -0.955573f, 0.294755f, -0.974928f, 0.222521f, -0.988831f, 0.149042f,
+ -0.997204f, 0.074730f, -1.000000f, 0.000000f, -0.997204f, -0.074730f, -0.988831f,
+ -0.149042f, -0.111964f, 0.993712f, -0.222521f, 0.974928f, -0.330279f, 0.943883f,
+ -0.433884f, 0.900969f, -0.532032f, 0.846724f, -0.623490f, 0.781832f, -0.707107f,
+ 0.707107f, -0.781832f, 0.623490f, -0.846724f, 0.532032f, -0.900969f, 0.433884f,
+ -0.943883f, 0.330279f, -0.974928f, 0.222521f, -0.993712f, 0.111964f, -1.000000f,
+ 0.000000f, -0.993712f, -0.111964f, -0.974928f, -0.222521f, -0.943883f, -0.330279f,
+ -0.900969f, -0.433884f, -0.846724f, -0.532032f, -0.781832f, -0.623490f, -0.707107f,
+ -0.707107f, -0.623490f, -0.781832f, -0.532032f, -0.846724f, -0.149042f, 0.988831f,
+ -0.294755f, 0.955573f, -0.433884f, 0.900969f, -0.563320f, 0.826239f, -0.680173f,
+ 0.733052f, -0.781832f, 0.623490f, -0.866025f, 0.500000f, -0.930874f, 0.365341f,
+ -0.974928f, 0.222521f, -0.997204f, 0.074730f, -0.997204f, -0.074730f, -0.974928f,
+ -0.222521f, -0.930874f, -0.365341f, -0.866025f, -0.500000f, -0.781832f, -0.623490f,
+ -0.680173f, -0.733052f, -0.563320f, -0.826239f, -0.433884f, -0.900969f, -0.294755f,
+ -0.955573f, -0.149042f, -0.988831f, -0.000000f, -1.000000f, 0.149042f, -0.988831f,
+ 0.294755f, -0.955573f, -0.185912f, 0.982566f, -0.365341f, 0.930874f, -0.532032f,
+ 0.846724f, -0.680173f, 0.733052f, -0.804598f, 0.593820f, -0.900969f, 0.433884f,
+ -0.965926f, 0.258819f, -0.997204f, 0.074730f, -0.993712f, -0.111964f, -0.955573f,
+ -0.294755f, -0.884115f, -0.467269f, -0.781832f, -0.623490f, -0.652287f, -0.757972f,
+ -0.500000f, -0.866025f, -0.330279f, -0.943883f, -0.149042f, -0.988831f, 0.037391f,
+ -0.999301f, 0.222521f, -0.974928f, 0.399892f, -0.916562f, 0.563320f, -0.826239f,
+ 0.707107f, -0.707107f, 0.826239f, -0.563320f, 0.916562f, -0.399892f, -0.222521f,
+ 0.974928f, -0.433884f, 0.900969f, -0.623490f, 0.781832f, -0.781832f, 0.623490f,
+ -0.900969f, 0.433884f, -0.974928f, 0.222521f, -1.000000f, 0.000000f, -0.974928f,
+ -0.222521f, -0.900969f, -0.433884f, -0.781832f, -0.623490f, -0.623490f, -0.781832f,
+ -0.433884f, -0.900969f, -0.222521f, -0.974928f, -0.000000f, -1.000000f, 0.222521f,
+ -0.974928f, 0.433884f, -0.900969f, 0.623490f, -0.781832f, 0.781832f, -0.623490f,
+ 0.900969f, -0.433884f, 0.974928f, -0.222521f, 1.000000f, -0.000000f, 0.974928f,
+ 0.222521f, 0.900969f, 0.433884f,
+
+}; \ No newline at end of file
diff --git a/decoder/ixheaacd_fft_ifft_rom.h b/decoder/ixheaacd_fft_ifft_rom.h
new file mode 100644
index 0000000..8a67d61
--- /dev/null
+++ b/decoder/ixheaacd_fft_ifft_rom.h
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_FFT_IFFT_ROM_H
+#define IXHEAACD_FFT_IFFT_ROM_H
+
+extern const FLOAT64 ixheaacd_twid_tbl_fft_double[514];
+extern const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3r[1155];
+extern const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3i[1155];
+extern const FLOAT32 ixheaacd_twid_tbl_fft_224[372];
+extern const FLOAT32 ixheaacd_twid_tbl_fft_288[380];
+extern const FLOAT32 ixheaacd_twid_tbl_fft_336[564];
+extern const FLOAT32 ixheaacd_twid_tbl_fft_168[276];
+
+#endif /* IXHEAACD_FFT_IFFT_ROM_H */
diff --git a/decoder/ixheaacd_freq_sca.c b/decoder/ixheaacd_freq_sca.c
index 3895d2a..57dc68d 100644
--- a/decoder/ixheaacd_freq_sca.c
+++ b/decoder/ixheaacd_freq_sca.c
@@ -455,7 +455,6 @@ IA_ERRORCODE ixheaacd_calc_master_frq_bnd_tbl(
f_master_tbl[num_bands0 + k] =
f_master_tbl[num_bands0 + k - 1] + vec_dk1[k - 1];
num_mf_bands = add_d(num_bands0, num_bands1);
-
} else {
k1 = k2;
@@ -490,6 +489,15 @@ IA_ERRORCODE ixheaacd_calc_master_frq_bnd_tbl(
return -1;
}
pstr_freq_band_data->num_mf_bands = num_mf_bands;
+
+ if (upsamp_fac == 4) {
+ for (k = 1; k < num_mf_bands; k++) {
+ if (!(f_master_tbl[k] - f_master_tbl[k - 1] <= k0 - 2)) {
+ return -1;
+ }
+ }
+ }
+
return 0;
}
@@ -523,7 +531,6 @@ static WORD16 ixheaacd_calc_freq_ratio(WORD16 k_start, WORD16 k_stop,
if (direction == 0) step = ixheaacd_shr32(step, 1);
direction = 1;
bandfactor = ixheaacd_add32_sat(bandfactor, step);
-
} else {
if (direction == 1) step = ixheaacd_shr32(step, 1);
direction = 0;
diff --git a/decoder/ixheaacd_func_def.h b/decoder/ixheaacd_func_def.h
index 07591f1..31a06d4 100644
--- a/decoder/ixheaacd_func_def.h
+++ b/decoder/ixheaacd_func_def.h
@@ -55,7 +55,7 @@ VOID ixheaacd_reset_acelp_data(ia_usac_data_struct *usac_data,
FLOAT32 *ptr_ola_buffer, WORD32 last_was_short,
WORD32 tw_mdct);
-WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
+VOID ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
ia_td_frame_data_struct *pstr_td_frame_data,
WORD32 k, FLOAT32 A[], FLOAT32 stab_fac,
ia_usac_lpd_decoder_handle st);
@@ -65,14 +65,13 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
WORD32 frame_index, FLOAT32 A[], WORD32 long_frame,
ia_usac_lpd_decoder_handle st);
-VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
- WORD32 first_lpd_flag, FLOAT32 *lsf,
- WORD32 mod[]);
+VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data, WORD32 first_lpd_flag,
+ FLOAT32 *lsf, WORD32 mod[], WORD32 ec_flag);
VOID ixheaacd_fac_decoding(WORD32 fac_len, WORD32 k, WORD32 *fac_prm,
ia_bit_buf_struct *it_bit_buff);
-WORD32 ixheaacd_lpc_to_td(FLOAT32 *lpc_coeffs, WORD32 lpc_order,
+VOID ixheaacd_lpc_to_td(FLOAT32 *lpc_coeffs, WORD32 lpc_order,
FLOAT32 *mdct_gains, WORD32 lg);
VOID ixheaacd_noise_shaping(FLOAT32 x[], WORD32 lg, WORD32 fdns_npts,
diff --git a/decoder/ixheaacd_function_selector.h b/decoder/ixheaacd_function_selector.h
index 5003b6c..b83216a 100644
--- a/decoder/ixheaacd_function_selector.h
+++ b/decoder/ixheaacd_function_selector.h
@@ -41,6 +41,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -153,6 +156,19 @@ extern VOID (*ixheaacd_imdct_using_fft)(ia_aac_dec_imdct_tables_struct *,
extern VOID (*ixheaacd_complex_fft_p2)(WORD32 *xr, WORD32 *xi, WORD32 nlength,
WORD32 fft_mode, WORD32 *preshift);
+extern VOID(*ixheaacd_mps_complex_fft_64)(WORD32 *ptr_x, WORD32 *fin_re,
+ WORD32 *fin_im, WORD32 nlength);
+
+extern VOID(*ixheaacd_mps_synt_pre_twiddle)(FLOAT32 *ptr_in,
+ const FLOAT32 *table_re,
+ const FLOAT32 *table_im,
+ WORD32 resolution);
+
+extern VOID(*ixheaacd_mps_synt_post_twiddle)(WORD32 *ptr_in,
+ const WORD32 *table_re,
+ const WORD32 *table_im,
+ WORD32 resolution);
+
extern VOID (*ixheaacd_calc_pre_twid)(WORD32 *ptr_x, WORD32 *r_ptr,
WORD32 *i_ptr, WORD32 nlength,
const WORD32 *cos_ptr,
@@ -163,6 +179,10 @@ extern VOID (*ixheaacd_calc_post_twid)(WORD32 *ptr_x, WORD32 *r_ptr,
const WORD32 *cos_ptr,
const WORD32 *sin_ptr);
+extern VOID(*ixheaacd_mps_synt_post_fft_twiddle)(
+ WORD32 resolution, FLOAT32 *fin_re, FLOAT32 *fin_im, const FLOAT32 *table_re,
+ const FLOAT32 *table_im, FLOAT32 *state);
+
extern VOID (*ixheaacd_mps_synt_out_calc)(WORD32 resolution, FLOAT32 *out,
FLOAT32 *state,
const FLOAT32 *filter_coeff);
diff --git a/decoder/ixheaacd_fwd_alias_cnx.c b/decoder/ixheaacd_fwd_alias_cnx.c
index 4441dab..f7d8f6c 100644
--- a/decoder/ixheaacd_fwd_alias_cnx.c
+++ b/decoder/ixheaacd_fwd_alias_cnx.c
@@ -36,6 +36,8 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_windows.h"
@@ -91,13 +93,12 @@ static VOID ixheaacd_synthesis_tool(WORD32 a[], WORD32 x[], WORD32 l,
return;
}
-WORD32 ixheaacd_fwd_alias_cancel_tool(
+VOID ixheaacd_fwd_alias_cancel_tool(
ia_usac_data_struct *usac_data, ia_td_frame_data_struct *pstr_td_frame_data,
WORD32 fac_length, FLOAT32 *lp_filt_coeff, WORD32 gain) {
WORD32 i;
FLOAT32 lp_filt_coeff_a[ORDER + 1];
WORD32 qshift = 0;
- WORD32 err = 0;
WORD32 *x_in = pstr_td_frame_data->fac_data;
WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
@@ -110,8 +111,7 @@ WORD32 ixheaacd_fwd_alias_cancel_tool(
memset(fac_signal - 16, 0, ORDER * sizeof(WORD32));
- err = ixheaacd_acelp_mdct(x_in, fac_signal, &qshift, fac_length, ptr_scratch);
- if (err == -1) return err;
+ ixheaacd_acelp_mdct(x_in, fac_signal, &qshift, fac_length, ptr_scratch);
ixheaacd_lpc_coeff_wt_apply(lp_filt_coeff, lp_filt_coeff_a);
@@ -132,10 +132,10 @@ WORD32 ixheaacd_fwd_alias_cancel_tool(
ptr_overlap_buf[i],
(WORD32)ixheaacd_mul32_sh(fac_signal[i], gain, (WORD8)(16 - qshift)));
- return err;
+ return;
}
-WORD32 ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
+VOID ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
WORD32 *lp_filt_coeff, WORD32 *izir,
WORD32 *fac_data_out, WORD8 *qshift1,
WORD8 qshift2, WORD8 qshift3, WORD32 *preshift,
@@ -144,7 +144,6 @@ WORD32 ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
const WORD32 *sine_window;
WORD32 fac_window[2 * FAC_LENGTH];
WORD32 lp_filt_coeff_a[ORDER + 1];
- WORD32 err = 0;
if (fac_length == 48) {
sine_window = ixheaacd_sine_win_96;
@@ -155,25 +154,11 @@ WORD32 ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
} else {
sine_window = ixheaacd_sine_win_256;
}
- if (FAC_LENGTH < fac_length) {
- return -1;
- }
-
- if (FAC_LENGTH < fac_length) {
- return -1;
- }
- if ((1 + (len / 2)) < (fac_length + 1)) {
- return -1;
- }
- if ((len / 2 + 1) > (2 * LEN_FRAME - fac_length - 1)) {
- return -1;
- }
if (lp_filt_coeff != NULL && fac_data_out != NULL) {
memset(fac_data_out - 16, 0, ORDER * sizeof(WORD32));
- err = ixheaacd_acelp_mdct(x_in, fac_data_out, preshift, fac_length,
+ ixheaacd_acelp_mdct(x_in, fac_data_out, preshift, fac_length,
ptr_scratch);
- if (err == -1) return err;
ixheaacd_weighted_synthesis_filter(lp_filt_coeff, lp_filt_coeff_a);
@@ -210,5 +195,5 @@ WORD32 ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
}
}
- return err;
+ return;
}
diff --git a/decoder/ixheaacd_hbe_dft_trans.c b/decoder/ixheaacd_hbe_dft_trans.c
new file mode 100644
index 0000000..4ce6800
--- /dev/null
+++ b/decoder/ixheaacd_hbe_dft_trans.c
@@ -0,0 +1,941 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+ */
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ixheaacd_type_def.h"
+
+#include "ixheaacd_bitbuffer.h"
+
+#include "ixheaacd_interface.h"
+
+#include "ixheaacd_tns_usac.h"
+#include "ixheaacd_cnst.h"
+
+#include "ixheaacd_acelp_info.h"
+
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_info.h"
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_drc_data_struct.h"
+#include "ixheaacd_drc_dec.h"
+#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_sbr_const.h"
+
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_freq_sca.h"
+#include "ixheaacd_lpp_tran.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_env_extr.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_env_calc.h"
+#include "ixheaacd_pvc_dec.h"
+
+#include "ixheaacd_sbr_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_sbrqmftrans.h"
+#include "ixheaacd_qmf_poly.h"
+
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_op.h"
+
+#include "ixheaacd_esbr_rom.h"
+
+static FLOAT32 *ixheaacd_map_prot_filter(WORD32 filt_length) {
+ switch (filt_length) {
+ case 4:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
+ break;
+ case 8:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[40];
+ break;
+ case 12:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[120];
+ break;
+ case 16:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[240];
+ break;
+ case 20:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[400];
+ break;
+ case 24:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[600];
+ break;
+ case 28:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff_28_36[0];
+ break;
+ case 32:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[840];
+ break;
+ case 36:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff_28_36[280];
+ break;
+ case 40:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[1160];
+ break;
+ case 44:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[1560];
+ break;
+ default:
+ return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
+ }
+}
+
+static VOID ixheaacd_create_dft_hbe_window(FLOAT32 *win, WORD32 x_over_bin1,
+ WORD32 x_over_bin2,
+ WORD32 ts, WORD32 size) {
+ const FLOAT32 *ptr_freq_domain_win = NULL;
+ WORD32 n;
+ if (ts == 12) {
+ ptr_freq_domain_win = &ixheaacd_dft_hbe_window_ts_12[0];
+ } else {
+ ptr_freq_domain_win = &ixheaacd_dft_hbe_window_ts_18[0];
+ }
+ for (n = 0; n < (x_over_bin1 - ts / 2); n++) {
+ win[n] = 0;
+ }
+
+ for (n = (x_over_bin1 - ts / 2); n <= (x_over_bin1 + ts / 2); n++) {
+ win[n] = (FLOAT32)ptr_freq_domain_win[n - (x_over_bin1 - ts / 2)];
+ }
+
+ for (n = (x_over_bin1 + ts / 2 + 1); n < (x_over_bin2 - ts / 2); n++) {
+ win[n] = (FLOAT32)1.0f;
+ }
+
+ for (n = (x_over_bin2 - ts / 2); n <= (x_over_bin2 + ts / 2); n++) {
+ win[n] = (FLOAT32)1.0f - ptr_freq_domain_win[n - (x_over_bin2 - ts / 2)];
+ }
+
+ for (n = (x_over_bin2 + ts / 2 + 1); n < size; n++) {
+ win[n] = 0.0f;
+ }
+}
+
+static WORD32 ixheaacd_calc_anal_synth_window(WORD32 fft_size, FLOAT32 *ptr_window) {
+ FLOAT32 sin_pi_2_N = 0.0f;
+ FLOAT32 cos_pi_2_N = 0.0f;
+ FLOAT32 *ptr_sin_pi_n_by_N = NULL;
+ WORD32 hop_stride = 1;
+ WORD32 i, j;
+ WORD32 l_fft_stride = 512;
+ switch (fft_size) {
+ case 64:
+ hop_stride = 16;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
+ l_fft_stride = 512;
+ break;
+ case 128:
+ hop_stride = 8;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
+ l_fft_stride = 512;
+ break;
+ case 256:
+ hop_stride = 4;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
+ l_fft_stride = 512;
+ break;
+ case 512:
+ hop_stride = 2;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[512 + 1];
+ l_fft_stride = 512;
+ break;
+ case 1024:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[0];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[1];
+ l_fft_stride = 512;
+ break;
+ case 192:
+ hop_stride = 4;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[384 + (hop_stride >> 1)];
+ l_fft_stride = 384;
+ break;
+ case 384:
+ hop_stride = 2;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[384 + 1];
+ l_fft_stride = 384;
+ break;
+ case 768:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[8];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[9];
+ l_fft_stride = 384;
+ break;
+ case 320:
+ hop_stride = 3;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_960[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[16];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[17];
+ l_fft_stride = 480;
+ break;
+ case 960:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_960[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[2];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[3];
+ l_fft_stride = 480;
+ break;
+ case 448:
+ hop_stride = 2;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_896[0];
+ sin_pi_2_N = ptr_sin_pi_n_by_N[1];
+ cos_pi_2_N = ptr_sin_pi_n_by_N[448 + 1];
+ l_fft_stride = 448;
+ break;
+ case 896:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_896[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[4];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[5];
+ l_fft_stride = 448;
+ break;
+ case 576:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_576[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[14];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[15];
+ l_fft_stride = 288;
+ break;
+ case 640:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_640[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[12];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[13];
+ l_fft_stride = 320;
+ break;
+ case 704:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_704[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[10];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[11];
+ l_fft_stride = 352;
+ break;
+ case 832:
+ hop_stride = 1;
+ ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_832[0];
+ sin_pi_2_N = ixheaacd_sine_pi_by_2_N[6];
+ cos_pi_2_N = ixheaacd_sine_pi_by_2_N[7];
+ l_fft_stride = 416;
+ break;
+ default:
+ return -1;
+ }
+
+ for (i = 0, j = 0; j < (fft_size >> 1); i += hop_stride, j++) {
+ FLOAT32 cos_val = ptr_sin_pi_n_by_N[i + l_fft_stride];
+ FLOAT32 sin_val = ptr_sin_pi_n_by_N[i];
+ ptr_window[j] = cos_val * sin_pi_2_N + sin_val * cos_pi_2_N;
+ }
+
+ for (; j < fft_size; j++, i += hop_stride) {
+ FLOAT32 cos_val = ptr_sin_pi_n_by_N[i - l_fft_stride];
+ FLOAT32 sin_val = ptr_sin_pi_n_by_N[i];
+ ptr_window[j] = sin_val * cos_pi_2_N - cos_val * sin_pi_2_N;
+ }
+ return 0;
+}
+
+WORD32 ixheaacd_dft_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD16 *p_freq_band_tab[2], WORD16 *p_num_sfb) {
+ WORD32 sfb;
+ WORD32 patch;
+ WORD32 i;
+ WORD32 temp_start;
+ FLOAT32 fb_ratio;
+ WORD32 stop_patch;
+ WORD32 in_hop_size_divisor = 8;
+ static const WORD32 trans_samp[2] = {12, 18};
+ WORD32 err = 0;
+
+ ptr_hbe_txposer->start_band = p_freq_band_tab[LOW][0];
+ ptr_hbe_txposer->end_band = p_freq_band_tab[LOW][p_num_sfb[LOW]];
+ ptr_hbe_txposer->esbr_hq = 1;
+
+ ptr_hbe_txposer->synth_size = 4 * ((ptr_hbe_txposer->start_band + 4) / 8 + 1);
+ ptr_hbe_txposer->k_start = ixheaacd_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
+
+ fb_ratio = ptr_hbe_txposer->synth_size / 32.0f;
+
+ ptr_hbe_txposer->ana_fft_size[0] = (WORD32)(fb_ratio * ptr_hbe_txposer->fft_size[0]);
+ ptr_hbe_txposer->ana_fft_size[1] = (WORD32)(fb_ratio * ptr_hbe_txposer->fft_size[1]);
+
+ ptr_hbe_txposer->in_hop_size = ptr_hbe_txposer->ana_fft_size[0] / in_hop_size_divisor;
+
+ ptr_hbe_txposer->synth_window = (FLOAT32 *)&ptr_hbe_txposer->synthesis_window_buf[0];
+ ptr_hbe_txposer->anal_window = (FLOAT32 *)&ptr_hbe_txposer->analysis_window_buf[0];
+
+ err = ixheaacd_calc_anal_synth_window(ptr_hbe_txposer->ana_fft_size[0],
+ ptr_hbe_txposer->anal_window);
+ if (err) {
+ return err;
+ }
+
+ memset(ptr_hbe_txposer->synth_buf, 0, 1280 * sizeof(ptr_hbe_txposer->synth_buf[0]));
+
+ ptr_hbe_txposer->synth_wind_coeff = ixheaacd_map_prot_filter(ptr_hbe_txposer->synth_size);
+
+ temp_start = 2 * ((ptr_hbe_txposer->start_band - 1) / 2);
+ ptr_hbe_txposer->analy_size =
+ 4 * ((min(64, ptr_hbe_txposer->end_band + 1) - temp_start - 1) / 4 +
+ 1);
+ ptr_hbe_txposer->a_start = temp_start - max(0, temp_start + ptr_hbe_txposer->analy_size - 64);
+
+ fb_ratio = ptr_hbe_txposer->analy_size / 64.0f;
+
+ ptr_hbe_txposer->syn_fft_size[0] = (WORD32)(fb_ratio * ptr_hbe_txposer->fft_size[0]);
+ ptr_hbe_txposer->syn_fft_size[1] = (WORD32)(fb_ratio * ptr_hbe_txposer->fft_size[1]);
+
+ ptr_hbe_txposer->out_hop_size = 2 * ptr_hbe_txposer->syn_fft_size[0] / in_hop_size_divisor;
+
+ err = ixheaacd_calc_anal_synth_window(ptr_hbe_txposer->syn_fft_size[0],
+ ptr_hbe_txposer->synth_window);
+ if (err) {
+ return err;
+ }
+
+ ptr_hbe_txposer->analy_wind_coeff = ixheaacd_map_prot_filter(ptr_hbe_txposer->analy_size);
+
+ memset(&ptr_hbe_txposer->x_over_qmf[0], 0, sizeof(ptr_hbe_txposer->x_over_qmf));
+ for (i = 0; i < MAX_STRETCH; i++) {
+ memset(&ptr_hbe_txposer->x_over_bin[i][0], 0,
+ 2 * sizeof(ptr_hbe_txposer->x_over_bin[i][0]));
+ }
+ sfb = 0;
+ stop_patch = MAX_STRETCH;
+
+ switch (ptr_hbe_txposer->synth_size) {
+ case 4:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
+ ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
+ break;
+ case 8:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_8;
+ ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
+ break;
+ case 12:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_12;
+ ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p3;
+ break;
+ case 16:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_16;
+ ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
+ break;
+ case 20:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_20;
+ break;
+ case 28:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_20;
+ break;
+ default:
+ ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
+ ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
+ }
+
+ {
+ WORD32 l, k, L = ptr_hbe_txposer->analy_size;
+ for (k = 0; k < L; k++) {
+ for (l = 0; l < 2 * L; l++) {
+ ptr_hbe_txposer->str_dft_hbe_anal_coeff.real[k][l] =
+ (FLOAT32)cos(PI / (2 * L) *
+ ((k + 0.5) * (2 * l - L / 64.0) - L / 64.0 *
+ ptr_hbe_txposer->a_start));
+ ptr_hbe_txposer->str_dft_hbe_anal_coeff.imag[k][l] =
+ (FLOAT32)sin(PI / (2 * L) *
+ ((k + 0.5) * (2 * l - L / 64.0) - L / 64.0 *
+ ptr_hbe_txposer->a_start));
+ }
+ }
+ }
+
+ for (patch = 1; patch <= stop_patch; patch++) {
+ while (sfb <= p_num_sfb[LOW] &&
+ p_freq_band_tab[LOW][sfb] <= patch * ptr_hbe_txposer->start_band)
+ sfb++;
+ if (sfb <= p_num_sfb[LOW]) {
+ if ((patch * ptr_hbe_txposer->start_band - p_freq_band_tab[LOW][sfb - 1]) <= 3) {
+ ptr_hbe_txposer->x_over_qmf[patch - 1] = p_freq_band_tab[LOW][sfb - 1];
+ if (patch <= MAX_STRETCH) {
+ ptr_hbe_txposer->x_over_bin[patch - 1][0] = (WORD32)(
+ ptr_hbe_txposer->fft_size[0] * p_freq_band_tab[LOW][sfb - 1] / 128 + 0.5);
+ ptr_hbe_txposer->x_over_bin[patch - 1][1] = (WORD32)(
+ ptr_hbe_txposer->fft_size[1] * p_freq_band_tab[LOW][sfb - 1] / 128 + 0.5);
+ }
+ } else {
+ WORD32 sfb = 0;
+ while (sfb <= p_num_sfb[HIGH] &&
+ p_freq_band_tab[HIGH][sfb] <= patch * ptr_hbe_txposer->start_band)
+ sfb++;
+ ptr_hbe_txposer->x_over_qmf[patch - 1] = p_freq_band_tab[HIGH][sfb - 1];
+ if (patch <= MAX_STRETCH) {
+ ptr_hbe_txposer->x_over_bin[patch - 1][0] = (WORD32)(
+ ptr_hbe_txposer->fft_size[0] * p_freq_band_tab[HIGH][sfb - 1] / 128 + 0.5);
+ ptr_hbe_txposer->x_over_bin[patch - 1][1] = (WORD32)(
+ ptr_hbe_txposer->fft_size[1] * p_freq_band_tab[HIGH][sfb - 1] / 128 + 0.5);
+ }
+ }
+ } else {
+ ptr_hbe_txposer->x_over_qmf[patch - 1] = ptr_hbe_txposer->end_band;
+ if (patch <= MAX_STRETCH) {
+ ptr_hbe_txposer->x_over_bin[patch - 1][0] =
+ (WORD32)(ptr_hbe_txposer->fft_size[0] * ptr_hbe_txposer->end_band / 128 + 0.5);
+ ptr_hbe_txposer->x_over_bin[patch - 1][1] =
+ (WORD32)(ptr_hbe_txposer->fft_size[1] * ptr_hbe_txposer->end_band / 128 + 0.5);
+ }
+ ptr_hbe_txposer->max_stretch = min(patch, MAX_STRETCH);
+ break;
+ }
+ }
+
+ for (patch = 0; patch < ptr_hbe_txposer->max_stretch - 1; patch++) {
+ for (i = 0; i < 2; i++) {
+ ixheaacd_create_dft_hbe_window(ptr_hbe_txposer->fd_win_buf[patch][i],
+ ptr_hbe_txposer->x_over_bin[patch][i],
+ ptr_hbe_txposer->x_over_bin[patch + 1][i], trans_samp[i],
+ ptr_hbe_txposer->fft_size[i]);
+ }
+ }
+ return 0;
+}
+
+static VOID ixheaacd_dft_hbe_apply_win(const FLOAT32 *inp1, const FLOAT32 *inp2, FLOAT32 *out,
+ WORD32 n) {
+ WORD32 i;
+ for (i = 0; i < n; i++) {
+ out[i] = inp1[i] * inp2[i];
+ }
+}
+
+VOID ixheaacd_dft_hbe_fft_memmove(FLOAT32 *ptr_spectrum, WORD32 size) {
+ WORD32 n;
+
+ for (n = 0; n < size / 2; n++) {
+ FLOAT32 tmp = ptr_spectrum[n];
+ ptr_spectrum[n] = ptr_spectrum[n + size / 2];
+ ptr_spectrum[n + size / 2] = tmp;
+ }
+}
+
+VOID ixheaacd_karth2polar(FLOAT32 *spectrum, FLOAT32 *mag, FLOAT32 *phase, WORD32 fft_size) {
+ WORD32 n;
+
+ for (n = 1; n < fft_size / 2; n++) {
+ phase[n] = (FLOAT32)atan2(spectrum[2 * n + 1], spectrum[2 * n]);
+ mag[n] = (FLOAT32)sqrt(spectrum[2 * n] * spectrum[2 * n] +
+ spectrum[2 * n + 1] * spectrum[2 * n + 1]);
+ }
+
+ if (spectrum[0] < 0) {
+ phase[0] = (FLOAT32)acos(-1);
+ mag[0] = -spectrum[0];
+ } else {
+ phase[0] = 0;
+ mag[0] = spectrum[0];
+ }
+
+ if (spectrum[1] < 0) {
+ phase[fft_size / 2] = (FLOAT32)acos(-1);
+ mag[fft_size / 2] = -spectrum[1];
+ } else {
+ phase[fft_size / 2] = 0;
+ mag[fft_size / 2] = spectrum[1];
+ }
+}
+
+VOID ixheaacd_hbe_fft_table(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 ana_fft_size = ptr_hbe_txposer->ana_fft_size[oversampling_flag];
+ WORD32 syn_fft_size = ptr_hbe_txposer->syn_fft_size[oversampling_flag];
+
+ switch (ana_fft_size) {
+ case 576:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_576;
+ break;
+ case 384:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_384;
+ break;
+ case 512:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
+ break;
+ case 768:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
+ break;
+ default:
+ break;
+ }
+
+ switch (syn_fft_size) {
+ case 448:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_448;
+ break;
+ case 512:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
+ break;
+ case 768:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
+ break;
+ case 672:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_672;
+ break;
+ default:
+ break;
+ }
+}
+
+IA_ERRORCODE ixheaacd_hbe_fft_map(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 ana_fft_size = ptr_hbe_txposer->ana_fft_size[oversampling_flag];
+ WORD32 syn_fft_size = ptr_hbe_txposer->syn_fft_size[oversampling_flag];
+
+ switch (ana_fft_size) {
+ case 576:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_576;
+ ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_fft_288;
+ break;
+ case 384:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_384;
+ ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn_gen;
+ break;
+ case 512:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
+ ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn;
+ break;
+ case 768:
+ ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
+ ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn_gen;
+ break;
+ default:
+ return IA_FATAL_ERROR;
+ break;
+ }
+
+ switch (syn_fft_size) {
+ case 448:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_448;
+ ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_ifft_224;
+ break;
+ case 512:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
+ ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_cfftn;
+ break;
+ case 768:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
+ ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_cfftn_gen;
+ break;
+ case 672:
+ ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_672;
+ ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_ifft_336;
+ break;
+ default:
+ return IA_FATAL_ERROR;
+ break;
+ }
+
+ return IA_NO_ERROR;
+}
+
+VOID ixheaacd_dft_hbe_apply_polar_t2(
+ WORD32 trans_fac, ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD32 pitch_in_bins, WORD out_transform_size) {
+ WORD32 tr;
+ WORD32 ti;
+ WORD32 m_tr;
+ WORD32 p, i;
+ FLOAT32 mag_t;
+ FLOAT32 phase_t;
+ FLOAT32 m_val;
+ FLOAT32(*fd_win_buf)[3][3][1536] = &ptr_hbe_txposer->fd_win_buf;
+ FLOAT32 *phase = ptr_hbe_txposer->phase;
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 fft_size = ptr_hbe_txposer->fft_size[oversampling_flag];
+ FLOAT32 *ptr_spectrum_tx = ptr_hbe_txposer->ptr_spectrum_tx;
+ FLOAT32 *mag = ptr_hbe_txposer->mag;
+ FLOAT32 p_flt = fft_size * pitch_in_bins / 1536.0f;
+ p = (WORD32)p_flt;
+ FLOAT32 q_thr = 4.0f;
+ m_tr = 0;
+
+ for (i = 0; i <= out_transform_size; i++) {
+ WORD32 utk = i;
+
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] * mag[utk];
+
+ phase_t = trans_fac * phase[utk];
+
+ if (phase_t == 0.0) {
+ ptr_spectrum_tx[2 * i] += mag_t;
+ } else {
+ ptr_spectrum_tx[2 * i] += mag_t * (FLOAT32)cos(phase_t);
+ ptr_spectrum_tx[2 * i + 1] += mag_t * (FLOAT32)sin(phase_t);
+ }
+ if (p > 0) {
+ m_val = 0;
+ for (tr = 1; tr < trans_fac; tr++) {
+ FLOAT32 temp;
+ ti = (WORD32)((2.0f * i - tr * p_flt) / trans_fac + 0.5f);
+ if ((ti < 0) || (ti + p > fft_size / 2)) continue;
+ temp = min(mag[ti], mag[ti + p]);
+ if (temp > m_val) {
+ m_val = temp;
+ m_tr = tr;
+ utk = ti;
+ }
+ }
+
+ if (m_val > q_thr * mag[2 * i / trans_fac]) {
+ mag_t = (FLOAT32)((*fd_win_buf)[trans_fac - 2][oversampling_flag][i] *
+ sqrt(mag[utk]) * sqrt(mag[utk + p]));
+ phase_t = (trans_fac - m_tr) * phase[utk] + m_tr * phase[utk + p];
+ ptr_spectrum_tx[2 * i] += (FLOAT32)(mag_t * cos(phase_t));
+ ptr_spectrum_tx[2 * i + 1] += (FLOAT32)(mag_t * sin(phase_t));
+ }
+ }
+ }
+}
+
+VOID ixheaacd_dft_hbe_apply_polar_t3(
+ WORD32 trans_fac, ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD32 pitch_in_bins, WORD out_transform_size) {
+ WORD32 tr;
+ WORD32 ti;
+ WORD32 m_tr = 0;
+ WORD32 p, i;
+ FLOAT32 mag_t = 0;
+ FLOAT32 phase_t;
+ FLOAT32 m_val;
+ FLOAT32(*fd_win_buf)[3][3][1536] = &ptr_hbe_txposer->fd_win_buf;
+ FLOAT32 *phase = ptr_hbe_txposer->phase;
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 fft_size = ptr_hbe_txposer->fft_size[oversampling_flag];
+ FLOAT32 *ptr_spectrum_tx = ptr_hbe_txposer->ptr_spectrum_tx;
+ FLOAT32 *mag = ptr_hbe_txposer->mag;
+ FLOAT32 p_flt = fft_size * pitch_in_bins / 1536.0f;
+ p = (WORD32)p_flt;
+ FLOAT32 q_thr = 4.0f;
+
+ for (i = 0; i <= out_transform_size; i++) {
+ WORD32 utk = 2 * i / trans_fac;
+ FLOAT32 ptk = (2.0f * i / trans_fac) - utk;
+ FLOAT32 k;
+
+ if (i % 3 == 0) {
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] * mag[utk];
+ } else if (i % 3 == 1) {
+ k = (FLOAT32)cbrt(mag[utk]);
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] * k *
+ (FLOAT32)pow(mag[utk + 1], ptk);
+ } else if (i % 3 == 2) {
+ k = (FLOAT32)cbrt(mag[utk + 1]);
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] *
+ (FLOAT32)pow(mag[utk], 1.0 - ptk) * k;
+ }
+
+ phase_t = trans_fac * ((1 - ptk) * phase[utk] + ptk * phase[utk + 1]);
+
+ ptr_spectrum_tx[2 * i] += mag_t * (FLOAT32)cos(phase_t);
+ ptr_spectrum_tx[2 * i + 1] += mag_t * (FLOAT32)sin(phase_t);
+
+ if (p > 0) {
+ m_val = 0;
+ for (tr = 1; tr < trans_fac; tr++) {
+ FLOAT32 temp;
+ ti = (WORD32)((2.0f * i - tr * p_flt) / trans_fac + 0.5f);
+ if ((ti < 0) || (ti + p > fft_size / 2)) continue;
+ temp = min(mag[ti], mag[ti + p]);
+ if (temp > m_val) {
+ m_val = temp;
+ m_tr = tr;
+ utk = ti;
+ }
+ }
+
+ if (m_val > q_thr * mag[2 * i / trans_fac]) {
+ FLOAT32 r = (FLOAT32)m_tr / trans_fac;
+ if (m_tr == 1) {
+ k = (FLOAT32)(cbrt((FLOAT32)mag[utk + p]));
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] *
+ (FLOAT32)pow(mag[utk], 1.0 - r) * k;
+ phase_t = (trans_fac - m_tr) * phase[utk] + phase[utk + p];
+ } else if (m_tr == 2) {
+ k = (FLOAT32)(cbrt((FLOAT32)mag[utk]));
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] * k *
+ (FLOAT32)pow(mag[utk + p], r);
+ phase_t = phase[utk] + m_tr * phase[utk + p];
+ }
+
+ ptr_spectrum_tx[2 * i] += mag_t * (FLOAT32)cos(phase_t);
+ ptr_spectrum_tx[2 * i + 1] += mag_t * (FLOAT32)sin(phase_t);
+ }
+ }
+ }
+}
+
+VOID ixheaacd_dft_hbe_apply_polar_t(
+ WORD32 trans_fac, ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD32 pitch_in_bins, WORD out_transform_size) {
+ WORD32 tr;
+ WORD32 ti;
+ WORD32 m_tr;
+ WORD32 p, i;
+ FLOAT32 mag_t;
+ FLOAT32 phase_t;
+ FLOAT32 m_val;
+ FLOAT32(*fd_win_buf)[3][3][1536] = &ptr_hbe_txposer->fd_win_buf;
+ FLOAT32 *phase = ptr_hbe_txposer->phase;
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 fft_size = ptr_hbe_txposer->fft_size[oversampling_flag];
+ FLOAT32 *ptr_spectrum_tx = ptr_hbe_txposer->ptr_spectrum_tx;
+ FLOAT32 *mag = ptr_hbe_txposer->mag;
+ FLOAT32 p_flt = fft_size * pitch_in_bins / 1536.0f;
+ p = (WORD32)p_flt;
+ FLOAT32 q_thr = 4.0f;
+ m_tr = 0;
+
+ for (i = 0; i <= out_transform_size; i++) {
+ WORD32 utk = 2 * i / trans_fac;
+ FLOAT32 ptk = (2.0f * i / trans_fac) - utk;
+
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] *
+ (FLOAT32)pow(mag[utk], 1.0f - ptk) * (FLOAT32)pow(mag[utk + 1], ptk);
+
+ phase_t = trans_fac * ((1 - ptk) * phase[utk] + ptk * phase[utk + 1]);
+
+ ptr_spectrum_tx[2 * i] += mag_t * (FLOAT32)cos(phase_t);
+ ptr_spectrum_tx[2 * i + 1] += mag_t * (FLOAT32)sin(phase_t);
+
+ if (p > 0) {
+ m_val = 0;
+ for (tr = 1; tr < trans_fac; tr++) {
+ FLOAT32 temp;
+ ti = (WORD32)((2.0f * i - tr * p_flt) / trans_fac + 0.5f);
+ if ((ti < 0) || (ti + p > fft_size / 2)) continue;
+ temp = min(mag[ti], mag[ti + p]);
+ if (temp > m_val) {
+ m_val = temp;
+ m_tr = tr;
+ utk = ti;
+ }
+ }
+
+ if (m_val > q_thr * mag[2 * i / trans_fac]) {
+ FLOAT32 r = (FLOAT32)m_tr / trans_fac;
+ mag_t = (*fd_win_buf)[trans_fac - 2][oversampling_flag][i] *
+ (FLOAT32)pow(mag[utk], 1.0 - r) * (FLOAT32)pow(mag[utk + p], r);
+ phase_t = (trans_fac - m_tr) * phase[utk] + m_tr * phase[utk + p];
+ ptr_spectrum_tx[2 * i] += mag_t * (FLOAT32)cos(phase_t);
+ ptr_spectrum_tx[2 * i + 1] += mag_t * (FLOAT32)sin(phase_t);
+ }
+ }
+ }
+}
+
+WORD32 ixheaacd_dft_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ FLOAT32 qmf_buf_real[][64], FLOAT32 qmf_buf_imag[][64],
+ WORD32 num_columns, FLOAT32 pv_qmf_buf_real[][64],
+ FLOAT32 pv_qmf_buf_imag[][64], WORD32 pitch_in_bins,
+ FLOAT32 *dft_hbe_scratch_buf) {
+ WORD32 in_offset = 0;
+ WORD32 out_offset = 0;
+ WORD32 in_hop_size = ptr_hbe_txposer->in_hop_size;
+ WORD32 oversampling_flag = ptr_hbe_txposer->oversampling_flag;
+ WORD32 fft_size = ptr_hbe_txposer->fft_size[oversampling_flag];
+
+ WORD32 out_hop_size = ptr_hbe_txposer->out_hop_size;
+ WORD32 num_in_samples = num_columns * ptr_hbe_txposer->synth_size;
+ WORD32 ana_fft_size = ptr_hbe_txposer->ana_fft_size[oversampling_flag];
+ WORD32 syn_fft_size = ptr_hbe_txposer->syn_fft_size[oversampling_flag];
+
+ WORD32 ana_pad_size = (ana_fft_size - ptr_hbe_txposer->ana_fft_size[0]) / 2;
+ WORD32 syn_pad_size = (syn_fft_size - ptr_hbe_txposer->syn_fft_size[0]) / 2;
+
+ FLOAT32 *ptr_input_buf = ptr_hbe_txposer->ptr_input_buf;
+ FLOAT32 *ptr_output_buf = ptr_hbe_txposer->ptr_output_buf;
+ FLOAT32 *ptr_spectrum = ptr_hbe_txposer->ptr_spectrum;
+ FLOAT32 *ptr_spectrum_tx = ptr_hbe_txposer->ptr_spectrum_tx;
+ FLOAT32 *mag = ptr_hbe_txposer->mag;
+ FLOAT32 *phase = ptr_hbe_txposer->phase;
+ WORD32 i, trans_fac;
+
+ FLOAT32 *ptr_cos_fft;
+ FLOAT32 *ptr_cos_ifft;
+
+ WORD32 ana_fft_offset = ptr_hbe_txposer->k_start * fft_size / 32;
+ WORD32 syn_fft_offset = ptr_hbe_txposer->a_start * fft_size / 64;
+
+ WORD32 err_code = IA_NO_ERROR;
+
+ memcpy(ptr_hbe_txposer->ptr_input_buf,
+ ptr_hbe_txposer->ptr_input_buf + ptr_hbe_txposer->ana_fft_size[0],
+ ptr_hbe_txposer->ana_fft_size[0] * sizeof(ptr_hbe_txposer->ptr_input_buf[0]));
+
+ ixheaacd_real_synth_filt(ptr_hbe_txposer, num_columns, qmf_buf_real, qmf_buf_imag);
+ memcpy(ptr_output_buf, ptr_output_buf + 2 * ptr_hbe_txposer->syn_fft_size[0],
+ 2 * ptr_hbe_txposer->syn_fft_size[0] * sizeof(*ptr_output_buf));
+
+ memset(ptr_output_buf + 2 * ptr_hbe_txposer->syn_fft_size[0], 0,
+ 2 * ptr_hbe_txposer->syn_fft_size[0] * sizeof(*ptr_output_buf));
+
+ err_code = ixheaacd_hbe_fft_map(ptr_hbe_txposer);
+ if (err_code) return err_code;
+ while (in_offset < num_in_samples) {
+ memset(ptr_spectrum, 0, fft_size * sizeof(FLOAT32));
+ memset(ptr_spectrum_tx, 0, ((fft_size + 2) * sizeof(FLOAT32)));
+
+ memset(mag, 0, (fft_size / 2 + 2) * sizeof(FLOAT32));
+ memset(phase, 0, (fft_size / 2 + 2) * sizeof(FLOAT32));
+ ixheaacd_dft_hbe_apply_win(ptr_input_buf + in_offset, ptr_hbe_txposer->anal_window,
+ ptr_spectrum + ana_pad_size + ana_fft_offset,
+ ptr_hbe_txposer->ana_fft_size[0]);
+ ixheaacd_dft_hbe_fft_memmove(ptr_spectrum + ana_fft_offset, ana_fft_size);
+ {
+ WORD32 len = ana_fft_size;
+ ptr_cos_fft = ptr_hbe_txposer->ana_cos_sin_tab;
+ FLOAT32 *ptr_fft_data = ptr_spectrum + ana_fft_offset;
+ FLOAT32 tmp1, tmp2, tmp3, tmp4;
+
+ (*(ptr_hbe_txposer->ixheaacd_hbe_anal_fft))(ptr_fft_data, dft_hbe_scratch_buf,
+ len / 2, -1);
+
+ tmp1 = ptr_fft_data[0] + ptr_fft_data[1];
+ ptr_fft_data[1] = ptr_fft_data[0] - ptr_fft_data[1];
+ ptr_fft_data[0] = tmp1;
+
+ for (i = 1; i <= (len / 4 + (len % 4) / 2); ++i) {
+ tmp1 = ptr_fft_data[2 * i] - ptr_fft_data[len - 2 * i];
+ tmp2 = ptr_fft_data[2 * i + 1] + ptr_fft_data[len - 2 * i + 1];
+
+ tmp3 = (*(ptr_cos_fft)) * tmp1 -
+ (*(ptr_cos_fft + 1)) * tmp2;
+ tmp4 = (*(ptr_cos_fft + 1)) * tmp1 +
+ (*(ptr_cos_fft)) * tmp2;
+
+ ptr_cos_fft = ptr_cos_fft + 2;
+
+ tmp1 = ptr_fft_data[2 * i] + ptr_fft_data[len - 2 * i];
+ tmp2 = ptr_fft_data[2 * i + 1] - ptr_fft_data[len - 2 * i + 1];
+
+ ptr_fft_data[2 * i + 0] = 0.5f * (tmp1 - tmp3);
+ ptr_fft_data[2 * i + 1] = 0.5f * (tmp2 - tmp4);
+ ptr_fft_data[len - 2 * i + 0] = 0.5f * (tmp1 + tmp3);
+ ptr_fft_data[len - 2 * i + 1] = -0.5f * (tmp2 + tmp4);
+ }
+ }
+ ixheaacd_karth2polar(ptr_spectrum + ana_fft_offset, mag + ana_fft_offset / 2,
+ phase + ana_fft_offset / 2, ana_fft_size);
+
+ for (trans_fac = 2; trans_fac <= ptr_hbe_txposer->max_stretch; trans_fac++) {
+ WORD32 out_transform_size;
+
+ out_transform_size = (fft_size / 2);
+
+ switch (trans_fac) {
+ case 2:
+ ixheaacd_dft_hbe_apply_polar_t2(trans_fac, ptr_hbe_txposer,
+ pitch_in_bins, out_transform_size);
+ break;
+ case 3:
+ ixheaacd_dft_hbe_apply_polar_t3(trans_fac, ptr_hbe_txposer,
+ pitch_in_bins, out_transform_size);
+ break;
+ default:
+ ixheaacd_dft_hbe_apply_polar_t(trans_fac, ptr_hbe_txposer,
+ pitch_in_bins, out_transform_size);
+ }
+ }
+
+ ptr_spectrum_tx[syn_fft_offset + 1] = ptr_spectrum_tx[syn_fft_offset +
+ syn_fft_size];
+
+ {
+ WORD32 len = syn_fft_size;
+ ptr_cos_ifft = ptr_hbe_txposer->syn_cos_sin_tab;
+ FLOAT32 *ptr_fft_data = ptr_spectrum_tx + syn_fft_offset;
+ FLOAT32 tmp1, tmp2, tmp3, tmp4;
+
+ FLOAT32 scale = 1.0f / len;
+ tmp1 = ptr_fft_data[0] + ptr_fft_data[1];
+ ptr_fft_data[1] = scale * (ptr_fft_data[0] - ptr_fft_data[1]);
+ ptr_fft_data[0] = scale * tmp1;
+
+ for (i = 1; i <= (len / 4 + (len % 4) / 2); ++i) {
+ tmp1 = ptr_fft_data[2 * i] - ptr_fft_data[len - 2 * i];
+ tmp2 = ptr_fft_data[2 * i + 1] + ptr_fft_data[len - 2 * i + 1];
+
+ tmp3 = (*(ptr_cos_ifft)) * tmp1 +
+ (*(ptr_cos_ifft + 1)) * tmp2;
+ tmp4 = -(*(ptr_cos_ifft + 1)) * tmp1 +
+ (*(ptr_cos_ifft)) * tmp2;
+
+ ptr_cos_ifft = ptr_cos_ifft + 2;
+
+ tmp1 = ptr_fft_data[2 * i] + ptr_fft_data[len - 2 * i];
+ tmp2 = ptr_fft_data[2 * i + 1] - ptr_fft_data[len - 2 * i + 1];
+
+ ptr_fft_data[2 * i] = scale * (tmp1 - tmp3);
+ ptr_fft_data[2 * i + 1] = scale * (tmp2 - tmp4);
+ ptr_fft_data[len - 2 * i] = scale * (tmp1 + tmp3);
+ ptr_fft_data[len - 2 * i + 1] = -scale * (tmp2 + tmp4);
+ }
+
+ (*(ptr_hbe_txposer->ixheaacd_hbe_synth_ifft))(ptr_fft_data, dft_hbe_scratch_buf,
+ len / 2, 1);
+ }
+
+ ixheaacd_dft_hbe_fft_memmove(ptr_spectrum_tx + syn_fft_offset, syn_fft_size);
+ ixheaacd_dft_hbe_apply_win(
+ ptr_spectrum_tx + syn_pad_size + syn_fft_offset, ptr_hbe_txposer->synth_window,
+ ptr_spectrum_tx + syn_pad_size + syn_fft_offset, ptr_hbe_txposer->syn_fft_size[0]);
+
+ for (i = 0; i < ptr_hbe_txposer->syn_fft_size[0]; i++) {
+ ptr_output_buf[out_offset + i] += ptr_spectrum_tx[syn_pad_size + syn_fft_offset + i];
+ }
+
+ in_offset += in_hop_size;
+ out_offset += out_hop_size;
+
+ }
+
+ err_code = ixheaacd_dft_hbe_cplx_anal_filt(ptr_hbe_txposer, pv_qmf_buf_real,
+ pv_qmf_buf_imag);
+
+ return err_code;
+}
diff --git a/decoder/ixheaacd_hbe_trans.c b/decoder/ixheaacd_hbe_trans.c
index 26965ca..179349d 100644
--- a/decoder/ixheaacd_hbe_trans.c
+++ b/decoder/ixheaacd_hbe_trans.c
@@ -114,6 +114,7 @@ WORD32 ixheaacd_qmf_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
ixheaacd_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
ptr_hbe_txposer->upsamp_4_flag = upsamp_4_flag;
+ ptr_hbe_txposer->esbr_hq = 0;
if (upsamp_4_flag) {
if (ptr_hbe_txposer->k_start + ptr_hbe_txposer->synth_size > 16)
@@ -225,7 +226,8 @@ WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
FLOAT32 pv_qmf_buf_real[][64],
FLOAT32 pv_qmf_buf_imag[][64],
- WORD32 pitch_in_bins) {
+ WORD32 pitch_in_bins,
+ ia_sbr_header_data_struct *ptr_header_data) {
WORD32 i, qmf_band_idx;
WORD32 qmf_voc_columns = ptr_hbe_txposer->no_bins / 2;
WORD32 err_code = 0;
@@ -235,6 +237,16 @@ WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
ptr_hbe_txposer->no_bins * ptr_hbe_txposer->synth_size,
ptr_hbe_txposer->synth_size * sizeof(FLOAT32));
+ if (ptr_hbe_txposer->ixheaacd_cmplx_anal_fft == NULL) {
+ WORD32 err = ixheaacd_qmf_hbe_data_reinit(
+ ptr_hbe_txposer,
+ ptr_header_data->pstr_freq_band_data->freq_band_table,
+ ptr_header_data->pstr_freq_band_data->num_sf_bands,
+ ptr_header_data->is_usf_4);
+ if (err)
+ return err;
+ }
+
err_code = ixheaacd_real_synth_filt(ptr_hbe_txposer, num_columns,
qmf_buf_real, qmf_buf_imag);
if (err_code) return err_code;
diff --git a/decoder/ixheaacd_hcr.h b/decoder/ixheaacd_hcr.h
index e872764..95687a2 100644
--- a/decoder/ixheaacd_hcr.h
+++ b/decoder/ixheaacd_hcr.h
@@ -20,25 +20,25 @@
#ifndef IXHEAACD_HCR_H
#define IXHEAACD_HCR_H
-void ixheaacd_huff_code_reorder_tbl_init(ia_hcr_info_struct* ptr_hcr_info);
+VOID ixheaacd_huff_code_reorder_tbl_init(ia_hcr_info_struct *ptr_hcr_info);
UWORD32 ixheaacd_huff_code_reorder_init(
ia_hcr_info_struct* ptr_hcr_info,
- ia_aac_dec_channel_info_struct* ptr_aac_dec_channel_info,
+ ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info,
ia_aac_dec_tables_struct* ptr_aac_tables, ia_bit_buf_struct* itt_bit_buff);
UWORD32 ixheaacd_hcr_decoder(
ia_hcr_info_struct* ptr_hcr_info,
- ia_aac_dec_channel_info_struct* ptr_aac_dec_channel_info,
+ ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info,
ia_aac_dec_tables_struct* ptr_aac_tables, ia_bit_buf_struct* itt_bit_buff);
-VOID ixheaacd_huff_mute_erroneous_lines(ia_hcr_info_struct* ptr_hcr_info);
+VOID ixheaacd_huff_mute_erroneous_lines(ia_hcr_info_struct *ptr_hcr_info);
void ixheaacd_lt_prediction(
ia_aac_dec_channel_info_struct* ptr_aac_dec_channel_info, ltp_info* ltp,
WORD32* spec, ia_aac_dec_tables_struct* aac_tables_ptr,
UWORD16 win_shape_prev, UWORD32 sr_index, UWORD32 object_type,
- UWORD32 frame_len, WORD32* in_data, WORD32* out_data);
+ UWORD32 frame_len, WORD32 *in_data, WORD32 *out_data);
WORD32 ixheaacd_ltp_data(WORD32 object_type, ia_ics_info_struct* ics,
- ltp_info* ltp, ia_handle_bit_buf_struct bs,
+ ltp_info* ltp, ia_bit_buf_struct *it_bit_buf,
WORD32 frame_len);
#endif
diff --git a/decoder/ixheaacd_headerdecode.c b/decoder/ixheaacd_headerdecode.c
index e291e1f..4e07b8d 100644
--- a/decoder/ixheaacd_headerdecode.c
+++ b/decoder/ixheaacd_headerdecode.c
@@ -49,6 +49,9 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -66,8 +69,11 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-
#include "ixheaacd_struct_def.h"
#include "ixheaacd_error_codes.h"
#include "ixheaacd_definitions.h"
@@ -86,13 +92,6 @@
#include "ixheaacd_error_standards.h"
-#undef ALLOW_SMALL_FRAMELENGTH
-
-#define ALLOW_SMALL_FRAMELENGTH
-#ifdef ALLOW_SMALL_FRAMELENGTH
-#undef FRAME_SIZE_SMALL
-#define FRAME_SIZE_SMALL 960
-#endif
#define ELDEXT_SAOC 1
#define ELDEXT_TERM 0
#define ELDEXT_LDSAC 2
@@ -103,10 +102,6 @@ extern const WORD32 ixheaacd_sampl_freq_idx_table[17];
#define ADTS_HEADER_LENGTH 7
-#undef ALLOW_SMALL_FRAMELENGTH
-
-#define ALLOW_SMALL_FRAMELENGTH
-
static PLATFORM_INLINE VOID
ixheaacd_aac_bytealign(struct ia_bit_buf_struct *it_bit_buff) {
WORD16 num_bit;
@@ -170,12 +165,12 @@ WORD32 ixheaacd_read_prog_config_element(
&& (ptr_config_element->object_type + 1) != 4
) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
ptr_config_element->samp_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
if (ptr_config_element->samp_freq_index > 11) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
}
tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
@@ -189,7 +184,7 @@ WORD32 ixheaacd_read_prog_config_element(
count += ptr_config_element->num_valid_cc_elements = tmp & 0xF;
if (count > MAX_BS_ELEMENT) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
+ return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
}
ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4);
@@ -308,12 +303,12 @@ WORD32 ixheaacd_find_syncword(ia_adts_header_struct *adts,
while (1) {
ixheaacd_read_bidirection(it_bit_buff, -4);
if (it_bit_buff->cnt_bits < 12) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12);
if (adts->sync_word == 0xFFF) {
ixheaacd_read_bidirection(it_bit_buff, -12);
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
}
}
@@ -344,7 +339,7 @@ WORD32 ixheaacd_adtsframe(ia_adts_header_struct *adts,
if (((adts->profile != AAC_LC_PROFILE)) || (adts->samp_freq_index > 11))
{
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
@@ -533,7 +528,7 @@ WORD32 ixheaacd_ga_hdr_dec(ia_aac_dec_state_struct *aac_state_struct,
if (tmp == -1) {
*bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
} else
aac_state_struct->sampling_rate = tmp;
aac_state_struct->p_config->ui_samp_freq = tmp;
@@ -550,7 +545,7 @@ WORD32 ixheaacd_ga_hdr_dec(ia_aac_dec_state_struct *aac_state_struct,
aac_state_struct->sbr_present_flag = 1;
if (tmp == -1) {
*bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
} else
aac_state_struct->extension_samp_rate = tmp;
@@ -625,210 +620,209 @@ WORD32 ixheaacd_ga_hdr_dec(ia_aac_dec_state_struct *aac_state_struct,
pstr_audio_specific_config->ext_audio_object_type = 0;
}
- {{size_t tmp = 0xf;
- UWORD32 i;
- WORD32 err = 0;
-
- aac_state_struct->usac_flag = 1;
-
- ixheaacd_conf_default(&(pstr_audio_specific_config->str_usac_config));
- err = ixheaacd_config(it_bit_buff,
- &(pstr_audio_specific_config->str_usac_config),
- &(pstr_audio_specific_config->channel_configuration));
- if (err != 0) return err;
-
- pstr_audio_specific_config->sampling_frequency =
- pstr_audio_specific_config->str_usac_config.usac_sampling_frequency;
-
- if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
- pstr_audio_specific_config->sbr_present_flag = 1;
- pstr_audio_specific_config->ext_audio_object_type = AOT_SBR;
- pstr_audio_specific_config->ext_sampling_frequency =
- pstr_audio_specific_config->sampling_frequency;
- pstr_audio_specific_config->ext_samp_frequency_index =
- pstr_audio_specific_config->samp_frequency_index;
-
- for (i = 0; i < sizeof(ixheaacd_sampl_freq_idx_table) /
- sizeof(ixheaacd_sampl_freq_idx_table[0]);
- i++) {
- if (ixheaacd_sampl_freq_idx_table[i] ==
- (int)(pstr_audio_specific_config->sampling_frequency)) {
- tmp = i;
- break;
+ {
+ {
+ SIZE_T tmp = 0xf;
+ UWORD32 i;
+ WORD32 err = 0;
+
+ aac_state_struct->usac_flag = 1;
+
+ ixheaacd_conf_default(&(pstr_audio_specific_config->str_usac_config));
+ err = ixheaacd_config(it_bit_buff, &(pstr_audio_specific_config->str_usac_config),
+ &(pstr_audio_specific_config->channel_configuration),
+ aac_state_struct->ec_enable);
+ if (err != 0) return err;
+
+ pstr_audio_specific_config->sampling_frequency =
+ pstr_audio_specific_config->str_usac_config.usac_sampling_frequency;
+
+ if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
+ pstr_audio_specific_config->sbr_present_flag = 1;
+ pstr_audio_specific_config->ext_audio_object_type = AOT_SBR;
+ pstr_audio_specific_config->ext_sampling_frequency =
+ pstr_audio_specific_config->sampling_frequency;
+ pstr_audio_specific_config->ext_samp_frequency_index =
+ pstr_audio_specific_config->samp_frequency_index;
+
+ for (i = 0; i < sizeof(ixheaacd_sampl_freq_idx_table) /
+ sizeof(ixheaacd_sampl_freq_idx_table[0]);
+ i++) {
+ if (ixheaacd_sampl_freq_idx_table[i] ==
+ (int)(pstr_audio_specific_config->sampling_frequency)) {
+ tmp = i;
+ break;
+ }
+ }
+ pstr_audio_specific_config->samp_frequency_index = (UINT32)tmp;
+ } else {
+ pstr_audio_specific_config->sbr_present_flag = 0;
}
}
- pstr_audio_specific_config->samp_frequency_index = (UINT32)tmp;
- } else {
- pstr_audio_specific_config->sbr_present_flag = 0;
}
- }
-}
-{
- ixheaacd_skip_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
+ if (aac_state_struct->bs_format != LOAS_BSFORMAT) {
+ ixheaacd_skip_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
- if ((SIZE_T)it_bit_buff->ptr_read_next ==
- (SIZE_T)it_bit_buff->ptr_bit_buf_base) {
- *bytes_consumed = ((WORD32)it_bit_buff->size) >> 3;
- } else {
- *bytes_consumed = (((((SIZE_T)it_bit_buff->ptr_read_next -
- (SIZE_T)it_bit_buff->ptr_bit_buf_base))
- << 3) +
- 7 - it_bit_buff->bit_pos + 7) >>
- 3;
+ if ((SIZE_T)it_bit_buff->ptr_read_next ==
+ (SIZE_T)it_bit_buff->ptr_bit_buf_base) {
+ *bytes_consumed = ((WORD32)it_bit_buff->size) >> 3;
+ } else {
+ *bytes_consumed = (WORD32)((((((SIZE_T)it_bit_buff->ptr_read_next -
+ (SIZE_T)it_bit_buff->ptr_bit_buf_base))
+ << 3) +
+ 7 - it_bit_buff->bit_pos + 7) >>
+ 3);
+ }
+ }
+ return 0;
}
-}
-return 0;
-}
-aac_state_struct->frame_length = FRAME_SIZE;
-if (aac_state_struct->frame_len_flag)
-#ifdef ALLOW_SMALL_FRAMELENGTH
- aac_state_struct->frame_length = FRAME_SIZE_SMALL;
-#else
- return -1;
-#endif
-
-if (aac_state_struct->extension_flag)
- aac_state_struct->extension_flag_3 = ixheaacd_read_bits_buf(it_bit_buff, 1);
-
-if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
- aac_state_struct->frame_length >>= 1;
-
-if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
- aac_state_struct->frame_length >>= 1;
- if (aac_state_struct->eld_specific_config.ld_sbr_flag_present) {
- aac_state_struct->eld_specific_config.ld_sbr_samp_rate =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
- aac_state_struct->eld_specific_config.ld_sbr_crc_flag =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
-
- ixheaacd_eld_sbr_header(it_bit_buff, aac_state_struct->ch_config,
- &aac_state_struct->str_sbr_config);
-
- aac_state_struct->dwnsmp_signal =
- !aac_state_struct->eld_specific_config.ld_sbr_samp_rate;
- }
+ aac_state_struct->frame_length = FRAME_SIZE;
+ if (aac_state_struct->frame_len_flag)
+ aac_state_struct->frame_length = FRAME_SIZE_SMALL;
- {
- UWORD16 len, eld_ext_type;
- WORD32 err;
- UWORD16 cnt;
-
- if (ixheaacd_show_bits_buf(it_bit_buff, 4) != ELDEXT_TERM) {
- while ((eld_ext_type = ixheaacd_read_bits_buf(it_bit_buff, 4)) !=
- ELDEXT_TERM) {
- len = ixheaacd_read_bits_buf(it_bit_buff, 4);
- if (len == 15) {
- len += ixheaacd_read_bits_buf(it_bit_buff, 8);
- }
- if (len == 15 + 255) {
- len += ixheaacd_read_bits_buf(it_bit_buff, 16);
- }
+ if (aac_state_struct->extension_flag)
+ aac_state_struct->extension_flag_3 = ixheaacd_read_bits_buf(it_bit_buff, 1);
- switch (eld_ext_type) {
- case ELDEXT_SAOC:
- break;
- case ELDEXT_LDSAC:
- aac_state_struct->ldmps_present = 1;
- aac_state_struct->mps_dec_handle.ldmps_config.ldmps_present_flag =
- 1;
- aac_state_struct->mps_dec_handle.object_type =
- aac_state_struct->audio_object_type;
- err = ixheaacd_ld_spatial_specific_config(
- &(aac_state_struct->mps_dec_handle.ldmps_config), it_bit_buff);
- if (err) return err;
-
- if (ixheaacd_mps_create(
- &aac_state_struct->mps_dec_handle,
- aac_state_struct->mps_dec_handle.ldmps_config
- .bs_frame_length,
- 0, &(aac_state_struct->mps_dec_handle.ldmps_config))) {
- return -1;
- }
- break;
- default:
- for (cnt = 0; cnt < len; cnt++) {
- ixheaacd_read_bits_buf(it_bit_buff, 8);
- }
+ if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
+ aac_state_struct->frame_length >>= 1;
+
+ if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
+ aac_state_struct->frame_length >>= 1;
+ if (aac_state_struct->eld_specific_config.ld_sbr_flag_present) {
+ aac_state_struct->eld_specific_config.ld_sbr_samp_rate =
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
+ aac_state_struct->eld_specific_config.ld_sbr_crc_flag =
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
+
+ ixheaacd_eld_sbr_header(it_bit_buff, aac_state_struct->ch_config,
+ &aac_state_struct->str_sbr_config);
+
+ aac_state_struct->dwnsmp_signal =
+ !aac_state_struct->eld_specific_config.ld_sbr_samp_rate;
+ }
+
+ {
+ UWORD16 len, eld_ext_type;
+ WORD32 err;
+ UWORD16 cnt;
+
+ if (ixheaacd_show_bits_buf(it_bit_buff, 4) != ELDEXT_TERM) {
+ while ((eld_ext_type = ixheaacd_read_bits_buf(it_bit_buff, 4)) !=
+ ELDEXT_TERM) {
+ len = ixheaacd_read_bits_buf(it_bit_buff, 4);
+ if (len == 15) {
+ len += ixheaacd_read_bits_buf(it_bit_buff, 8);
+ }
+ if (len == 15 + 255) {
+ len += ixheaacd_read_bits_buf(it_bit_buff, 16);
+ }
- break;
+ switch (eld_ext_type) {
+ case ELDEXT_SAOC:
+ break;
+ case ELDEXT_LDSAC:
+ aac_state_struct->ldmps_present = 1;
+ aac_state_struct->mps_dec_handle.ldmps_config.ldmps_present_flag =
+ 1;
+ aac_state_struct->mps_dec_handle.object_type =
+ aac_state_struct->audio_object_type;
+ aac_state_struct->mps_dec_handle.ec_flag = aac_state_struct->ec_enable;
+ err = ixheaacd_ld_spatial_specific_config(
+ &(aac_state_struct->mps_dec_handle.ldmps_config), it_bit_buff);
+ if (err) return err;
+
+ if (ixheaacd_mps_create(
+ &aac_state_struct->mps_dec_handle,
+ aac_state_struct->mps_dec_handle.ldmps_config
+ .bs_frame_length,
+ 0, &(aac_state_struct->mps_dec_handle.ldmps_config))) {
+ return -1;
+ }
+ break;
+ default:
+ for (cnt = 0; cnt < len; cnt++) {
+ ixheaacd_read_bits_buf(it_bit_buff, 8);
+ }
+
+ break;
+ }
+ break;
}
- break;
}
}
+ if (!((aac_state_struct->ldmps_present == 1) &&
+ !(it_bit_buff->cnt_bits >= 1)))
+ ixheaacd_read_bits_buf(it_bit_buff, 1);
}
- if (!((aac_state_struct->ldmps_present == 1) &&
- !(it_bit_buff->cnt_bits >= 1)))
- ixheaacd_read_bits_buf(it_bit_buff, 1);
-}
-if (!((aac_state_struct->ldmps_present == 1) && !(it_bit_buff->cnt_bits > 0))) {
- if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
- aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
- aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
- WORD32 ep_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
- if (ep_config == 2 || ep_config == 3) {
- }
- if (ep_config == 3) {
- WORD32 direct_map = ixheaacd_read_bits_buf(it_bit_buff, 1);
- if (!direct_map) {
+ if (!((aac_state_struct->ldmps_present == 1) && !(it_bit_buff->cnt_bits > 0))) {
+ if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
+ aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
+ aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
+ WORD32 ep_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
+ if (ep_config == 2 || ep_config == 3) {
+ }
+ if (ep_config == 3) {
+ WORD32 direct_map = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (!direct_map) {
+ }
}
}
- }
- tmp = (header_len * 8) - it_bit_buff->cnt_bits;
-
- if (aac_state_struct->audio_object_type != AOT_SBR &&
- (it_bit_buff->cnt_bits >= 16)) {
- tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
-
- if (tmp == 0x2b7) {
- tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
-
- if (tmp == AOT_SBR) {
- WORD32 sbr_present_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
- if (sbr_present_flag) {
- tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
- pstr_audio_specific_config);
- if (tmp == -1) {
- *bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
- } else
- aac_state_struct->extension_samp_rate = tmp;
-
- if (it_bit_buff->cnt_bits >= 12) {
- tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
- if (tmp == 0x548) {
- tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ tmp = (header_len * 8) - it_bit_buff->cnt_bits;
+
+ if (aac_state_struct->audio_object_type != AOT_SBR &&
+ (it_bit_buff->cnt_bits >= 16)) {
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
+
+ if (tmp == 0x2b7) {
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
+
+ if (tmp == AOT_SBR) {
+ WORD32 sbr_present_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (sbr_present_flag) {
+ tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
+ pstr_audio_specific_config);
+ if (tmp == -1) {
+ *bytes_consumed = 1;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ } else
+ aac_state_struct->extension_samp_rate = tmp;
+
+ if (it_bit_buff->cnt_bits >= 12) {
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
+ if (tmp == 0x548) {
+ tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ }
}
}
}
+ } else if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
+ ixheaacd_read_bidirection(it_bit_buff, -11);
}
- } else if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
- ixheaacd_read_bidirection(it_bit_buff, -11);
}
}
-}
-if (aac_state_struct->audio_object_type != AOT_AAC_LC &&
- aac_state_struct->audio_object_type != AOT_SBR &&
- aac_state_struct->audio_object_type != AOT_PS &&
- aac_state_struct->audio_object_type != AOT_ER_AAC_LC &&
- aac_state_struct->audio_object_type != AOT_ER_AAC_LD &&
- aac_state_struct->audio_object_type != AOT_ER_AAC_ELD &&
- aac_state_struct->audio_object_type != AOT_AAC_LTP) {
- *bytes_consumed = 1;
- return IA_ENHAACPLUS_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
-} else {
- if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
- *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) >> 3;
- if (it_bit_buff->bit_pos < 7) *bytes_consumed += 1;
+ if (aac_state_struct->audio_object_type != AOT_AAC_LC &&
+ aac_state_struct->audio_object_type != AOT_SBR &&
+ aac_state_struct->audio_object_type != AOT_PS &&
+ aac_state_struct->audio_object_type != AOT_ER_AAC_LC &&
+ aac_state_struct->audio_object_type != AOT_ER_AAC_LD &&
+ aac_state_struct->audio_object_type != AOT_ER_AAC_ELD &&
+ aac_state_struct->audio_object_type != AOT_AAC_LTP) {
+ *bytes_consumed = 1;
+ return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
+ } else {
+ if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
+ *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) >> 3;
+ if (it_bit_buff->bit_pos < 7) *bytes_consumed += 1;
- } else
- *bytes_consumed = header_len;
+ } else
+ *bytes_consumed = header_len;
- return 0;
-}
+ return 0;
+ }
}
WORD32 ixheaacd_check_if_adts(ia_adts_header_struct *adts,
@@ -876,7 +870,7 @@ IA_ERRORCODE ixheaacd_latm_header_decode(
if (it_bit_buff->cnt_bits < 13) {
ixheaacd_read_bidirection(it_bit_buff, -11);
*bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
- return (IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
+ return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
}
}
@@ -902,10 +896,16 @@ IA_ERRORCODE ixheaacd_latm_header_decode(
}
} else {
- ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
- bit_count -= (13 + 11);
- *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ if (it_bit_buff->cnt_bits != audio_mux_len_bits_last) {
+ ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
+ bit_count -= (13 + 11);
+ *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ } else {
+ ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
+ bit_count -= (13 + 11);
+ break;
+ }
}
} while (1);
@@ -920,7 +920,7 @@ IA_ERRORCODE ixheaacd_latm_header_decode(
ixheaacd_read_bidirection(it_bit_buff, -25);
bit_count -= 11;
*bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
- return IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
+ return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
}
audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
@@ -929,22 +929,21 @@ IA_ERRORCODE ixheaacd_latm_header_decode(
use_same_stream_mux = ixheaacd_read_bits_buf(it_bit_buff, 1);
bit_count += 1;
- if (it_bit_buff->cnt_bits - (audio_mux_len_bytes_last * 8 - 1 + 11) < 0) {
- ixheaacd_read_bidirection(it_bit_buff, -25);
- bit_count -= 25;
- aac_state_struct->bit_count = bit_count;
- *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
- return IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
- }
-
if (!use_same_stream_mux) {
ixheaacd_read_bidirection(it_bit_buff, -25);
bit_count -= 25;
sync_status = 1;
aac_state_struct->sync_status = sync_status;
break;
+ } else {
+ ixheaacd_read_bidirection(it_bit_buff, -25);
+ bit_count -= 25;
+ aac_state_struct->bit_count = bit_count;
+ *bytes_consumed = 1;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
}
+
ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bytes_last * 8 - 1);
bit_count += audio_mux_len_bytes_last * 8 - 1;
@@ -999,7 +998,7 @@ WORD32 ixheaacd_aac_headerdecode(
->str_sample_rate_info[0];
if (buffer == 0) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
header_len = aac_state_struct->ui_in_bytes;
@@ -1125,9 +1124,9 @@ WORD32 ixheaacd_aac_headerdecode(
if (result != 0) {
if ((result ==
(WORD32)
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) ||
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) ||
(result ==
- (WORD32)IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX)) {
+ (WORD32)IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX)) {
bytes_taken += *bytes_consumed;
*bytes_consumed = bytes_taken;
return result;
@@ -1171,7 +1170,7 @@ WORD32 ixheaacd_aac_headerdecode(
case AOT_USAC:
break;
default:
- return IA_ENHAACPLUS_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
+ return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
}
if (aac_state_struct->audio_object_type != AOT_USAC)
@@ -1182,12 +1181,12 @@ WORD32 ixheaacd_aac_headerdecode(
(handle_bit_buff->size <
(usr_max_ch * (IA_ENHAACPLUS_DEC_INP_BUF_SIZE << 3)))) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
if (header_found == 0) {
*bytes_consumed = bytes_taken + 1;
- return IA_ENHAACPLUS_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
+ return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
} else {
return 0;
}
diff --git a/decoder/ixheaacd_headerdecode.h b/decoder/ixheaacd_headerdecode.h
index f813de6..3aa9b92 100644
--- a/decoder/ixheaacd_headerdecode.h
+++ b/decoder/ixheaacd_headerdecode.h
@@ -57,7 +57,12 @@ WORD32 ixheaacd_get_element_index_tag(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD ch_idx1,
WORD *ch_idx, WORD *channel, WORD *element_index_order, WORD total_elements,
WORD8 *element_used, WORD total_channels, ia_drc_dec_struct *pstr_drc_dec,
- ia_drc_dec_struct *drc_dummy);
+ ia_drc_dec_struct *drc_dummy
+ ,
+ UWORD8 *mps_buffer,
+ WORD32 *mps_header,
+ WORD32 *mps_bytes
+);
WORD32 ixheaacd_latm_audio_mux_element(
struct ia_bit_buf_struct *it_bit_buff, ixheaacd_latm_struct *latm_element,
diff --git a/decoder/ixheaacd_huff_code_reorder.c b/decoder/ixheaacd_huff_code_reorder.c
index 71819aa..08b2318 100644
--- a/decoder/ixheaacd_huff_code_reorder.c
+++ b/decoder/ixheaacd_huff_code_reorder.c
@@ -35,7 +35,9 @@
#include "ixheaacd_pns.h"
#include "ixheaacd_lt_predict.h"
-
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_data_struct.h"
@@ -61,10 +63,13 @@
#include "ixheaacd_hybrid.h"
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
-#include "ixheaacd_cnst.h"
#include "ixheaacd_rvlc.h"
const UWORD8 ixheaacd_min_huff_cb_pair_tbl[MAX_CB_PAIRS] = {
diff --git a/decoder/ixheaacd_hybrid.h b/decoder/ixheaacd_hybrid.h
index 3fb080f..83f3cfa 100644
--- a/decoder/ixheaacd_hybrid.h
+++ b/decoder/ixheaacd_hybrid.h
@@ -26,6 +26,15 @@
#define NO_HYBRID_CHANNELS_LOW 2
#define NO_HYBRID_CHANNELS_HIGH 8
+#define NO_HYBRID_CHANNELS_2 2
+#define NO_HYBRID_CHANNELS_4 4
+#define NO_HYBRID_CHANNELS_8 8
+#define NO_HYBRID_CHANNELS_12 12
+#define MAX_NUM_QMF_CHANNELS 64
+
+#define REAL 0
+#define CPLX 1
+
typedef struct {
const WORD16 *ptr_resol;
WORD8 ptr_qmf_buf;
@@ -37,6 +46,18 @@ typedef struct {
WORD32 *ptr_temp_im;
} ia_hybrid_struct;
+typedef struct {
+ WORD32 num_qmf_bands;
+ WORD32 frame_size;
+ WORD16 *ptr_resol;
+ FLOAT32 *ptr_work_re;
+ FLOAT32 *ptr_work_im;
+ FLOAT32 (*ptr_qmf_buf_re)[HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 (*ptr_qmf_buf_im)[HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 (*ptr_temp_re)[MAX_NUM_QMF_CHANNELS];
+ FLOAT32 (*ptr_temp_im)[MAX_NUM_QMF_CHANNELS];
+} ia_hybrid_flt_struct;
+
VOID ixheaacd_hybrid_analysis(const WORD32 *ptr_qmf_real, WORD32 *ptr_hyb_real,
WORD32 *ptr_hyb_imag,
ia_hybrid_struct *ptr_hybrid, WORD16 scale,
diff --git a/decoder/ixheaacd_imdct.c b/decoder/ixheaacd_imdct.c
index 08a89fc..512cbc3 100644
--- a/decoder/ixheaacd_imdct.c
+++ b/decoder/ixheaacd_imdct.c
@@ -25,8 +25,10 @@
#include "ixheaacd_type_def.h"
#include "ixheaacd_interface.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_aac_rom.h"
+
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_interface.h"
#include "ixheaacd_tns_usac.h"
#include "ixheaacd_cnst.h"
@@ -42,7 +44,15 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_pns.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_ec.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_windows.h"
@@ -65,6 +75,7 @@ extern const WORD32 ixheaacd_pre_post_twid_sin_64[64];
extern const WORD32 ixheaacd_pre_post_twid_cos_48[48];
extern const WORD32 ixheaacd_pre_post_twid_sin_48[48];
extern const FLOAT64 ixheaacd_power_10_table[28];
+extern const ia_usac_samp_rate_info ixheaacd_samp_rate_info[];
#define ABS(A) ((A) < 0 ? (-A) : (A))
@@ -135,12 +146,11 @@ void ixheaacd_calc_post_twid_dec(WORD32 *xptr, WORD32 *r_ptr, WORD32 *i_ptr,
}
}
-static WORD32 ixheaacd_fft_based_imdct(WORD32 *data, WORD32 npoints,
- WORD32 *preshift, WORD32 *tmp_data) {
+static VOID ixheaacd_fft_based_imdct(WORD32 *data, WORD32 npoints, WORD32 *preshift,
+ WORD32 *tmp_data) {
WORD32 *data_r;
WORD32 *data_i;
WORD32 nlength = npoints >> 1;
- WORD32 err = 0;
const WORD32 *cos_ptr;
const WORD32 *sin_ptr;
@@ -165,20 +175,19 @@ static WORD32 ixheaacd_fft_based_imdct(WORD32 *data, WORD32 npoints,
}
(*ixheaacd_calc_pre_twid)(data, data_r, data_i, nlength, cos_ptr, sin_ptr);
- err = ixheaacd_complex_fft(data_r, data_i, nlength, 1, preshift);
- if (err) return err;
+ ixheaacd_complex_fft(data_r, data_i, nlength, 1, preshift);
+
(*ixheaacd_calc_post_twid)(data, data_r, data_i, nlength, cos_ptr, sin_ptr);
- return err;
+ return;
}
#define N_LONG_LEN_MAX 1024
-WORD32 ixheaacd_acelp_imdct(WORD32 *imdct_in, WORD32 npoints, WORD8 *qshift,
+VOID ixheaacd_acelp_imdct(WORD32 *imdct_in, WORD32 npoints, WORD8 *qshift,
WORD32 *tmp_data) {
WORD32 preshift = 0;
WORD32 i;
WORD32 k = (npoints / 2);
- WORD32 err = 0;
while (((k & 1) == 0) & (k != 1)) {
k = k >> 1;
@@ -192,11 +201,10 @@ WORD32 ixheaacd_acelp_imdct(WORD32 *imdct_in, WORD32 npoints, WORD8 *qshift,
preshift++;
}
- err = ixheaacd_fft_based_imdct(imdct_in, npoints / 2, &preshift, tmp_data);
- if (err) return err;
+ ixheaacd_fft_based_imdct(imdct_in, npoints / 2, &preshift, tmp_data);
preshift += 2;
*qshift -= preshift;
- return err;
+ return;
}
IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
@@ -212,7 +220,6 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
WORD8 qshift2 = 0;
WORD8 qshift3 = 0;
WORD32 preshift = 0;
- IA_ERRORCODE err = IA_NO_ERROR;
FLOAT32 *last_lpc = usac_data->lpc_prev[i_ch];
FLOAT32 *acelp_in = usac_data->acelp_in[i_ch];
@@ -281,10 +288,39 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
x_in[lfac / 2 + k] = fac_data[lfac - 2 * k];
}
- err = ixheaacd_fr_alias_cnx_fix(x_in, n_long / 4, lfac, i_aq, izir,
- fac_idata + 16, &qshift1, qshift2, qshift3,
- &preshift, ptr_scratch);
- if (err) return err;
+ if (FAC_LENGTH < lfac) {
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else
+ lfac = FAC_LENGTH;
+ }
+
+ if ((n_long / 8) < lfac) {
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else
+ lfac = (n_long / 8);
+ }
+
+ if ((n_long / 8 + 1) > (2 * LEN_FRAME - lfac - 1)) {
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else
+ lfac = (2 * LEN_FRAME) - (n_long / 8);
+ }
+
+ if (lfac & (lfac - 1)) {
+ if ((lfac != 48) && (lfac != 96) && (lfac != 192) && (lfac != 384) && (lfac != 768)) {
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else
+ lfac = 48;
+ }
+ }
+
+ ixheaacd_fr_alias_cnx_fix(x_in, n_long / 4, lfac, i_aq, izir, fac_idata + 16, &qshift1, qshift2,
+ qshift3, &preshift, ptr_scratch);
+
preshift += 4;
*q_fac = (qshift1 - preshift);
@@ -321,8 +357,19 @@ static IA_ERRORCODE ixheaacd_fd_imdct_short(ia_usac_data_struct *usac_data,
ia_usac_lpd_decoder_handle st = usac_data->str_tddec[i_ch];
WORD32 err_code = 0;
- max_shift =
- ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
+ if (usac_data->ec_flag) {
+ td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
+ } else {
+ if (ixheaacd_drc_offset->n_short & (ixheaacd_drc_offset->n_short - 1)) {
+ if ((ixheaacd_drc_offset->n_short != 48) && (ixheaacd_drc_offset->n_short != 96) &&
+ (ixheaacd_drc_offset->n_short != 192) && (ixheaacd_drc_offset->n_short != 384) &&
+ (ixheaacd_drc_offset->n_short != 768)) {
+ return -1;
+ }
+ }
+ }
+
+ max_shift = ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
ixheaacd_normalize(p_in_ibuffer, max_shift, ixheaacd_drc_offset->n_long);
shiftp = max_shift + 6;
input_q = shiftp;
@@ -335,10 +382,9 @@ static IA_ERRORCODE ixheaacd_fd_imdct_short(ia_usac_data_struct *usac_data,
for (k = 0; k < 8; k++) {
shiftp = input_q;
- err_code = ixheaacd_acelp_imdct(
+ ixheaacd_acelp_imdct(
p_in_ibuffer + (k * ixheaacd_drc_offset->n_short),
2 * ixheaacd_drc_offset->n_short, &shiftp, scratch_mem);
- if (err_code) return err_code;
}
max_shift =
@@ -347,11 +393,10 @@ static IA_ERRORCODE ixheaacd_fd_imdct_short(ia_usac_data_struct *usac_data,
shiftp += max_shift - 1;
err_code = ixheaacd_calc_window(&window_short, ixheaacd_drc_offset->n_short,
- window_select);
+ window_select, usac_data->ec_flag);
if (err_code == -1) return err_code;
- err_code =
- ixheaacd_calc_window(&window_short_prev_ptr,
- ixheaacd_drc_offset->n_trans_ls, window_select_prev);
+ err_code = ixheaacd_calc_window(&window_short_prev_ptr, ixheaacd_drc_offset->n_trans_ls,
+ window_select_prev, usac_data->ec_flag);
if (err_code == -1) return err_code;
if (fac_apply)
@@ -431,7 +476,7 @@ static IA_ERRORCODE ixheaacd_fd_imdct_long(ia_usac_data_struct *usac_data,
offset_lengths *ixheaacd_drc_offset,
WORD8 fac_q) {
FLOAT32 qfac;
- WORD32 *window_long_prev, k, i, *window_short_prev_ptr;
+ WORD32 *window_long_prev = NULL, k, i, *window_short_prev_ptr = NULL;
WORD32 *p_in_ibuffer = usac_data->coef_fix[i_ch];
WORD32 *p_overlap_ibuffer = usac_data->overlap_data_ptr[i_ch];
@@ -449,15 +494,25 @@ static IA_ERRORCODE ixheaacd_fd_imdct_long(ia_usac_data_struct *usac_data,
ia_usac_lpd_decoder_handle st = usac_data->str_tddec[i_ch];
WORD32 err_code = 0;
+ if (usac_data->ec_flag) {
+ td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
+ } else {
+ if (ixheaacd_drc_offset->n_long & (ixheaacd_drc_offset->n_long - 1)) {
+ if ((ixheaacd_drc_offset->n_long != 48) && (ixheaacd_drc_offset->n_long != 96) &&
+ (ixheaacd_drc_offset->n_long != 192) && (ixheaacd_drc_offset->n_long != 384) &&
+ (ixheaacd_drc_offset->n_long != 768)) {
+ return -1;
+ }
+ }
+ }
max_shift =
ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
ixheaacd_normalize(p_in_ibuffer, max_shift, ixheaacd_drc_offset->n_long);
shiftp = max_shift + 6;
- err_code = ixheaacd_acelp_imdct(p_in_ibuffer, 2 * ixheaacd_drc_offset->n_long,
+ ixheaacd_acelp_imdct(p_in_ibuffer, 2 * ixheaacd_drc_offset->n_long,
&shiftp, scratch_mem);
- if (err_code) return err_code;
max_shift =
ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
@@ -468,7 +523,7 @@ static IA_ERRORCODE ixheaacd_fd_imdct_long(ia_usac_data_struct *usac_data,
case ONLY_LONG_SEQUENCE:
case LONG_START_SEQUENCE:
err_code = ixheaacd_calc_window(
- &window_long_prev, ixheaacd_drc_offset->n_long, window_select_prev);
+ &window_long_prev, ixheaacd_drc_offset->n_long, window_select_prev, usac_data->ec_flag);
if (err_code == -1) return err_code;
output_q = ixheaacd_windowing_long1(
p_in_ibuffer + n_long / 2, p_overlap_ibuffer, window_long_prev,
@@ -480,7 +535,7 @@ static IA_ERRORCODE ixheaacd_fd_imdct_long(ia_usac_data_struct *usac_data,
case LONG_STOP_SEQUENCE:
err_code = ixheaacd_calc_window(&window_short_prev_ptr,
ixheaacd_drc_offset->n_trans_ls,
- window_select_prev);
+ window_select_prev, usac_data->ec_flag);
if (err_code == -1) return err_code;
if (fac_apply) {
output_q = ixheaacd_windowing_long2(
@@ -528,10 +583,21 @@ WORD32 ixheaacd_fd_frm_dec(ia_usac_data_struct *usac_data, WORD32 i_ch) {
WORD32 fac_idata[2 * FAC_LENGTH + 16];
offset_lengths ixheaacd_drc_offset;
WORD8 fac_q = 0;
- WORD32 td_frame_prev = usac_data->td_frame_prev[i_ch];
- WORD32 fac_apply = usac_data->fac_data_present[i_ch];
- WORD32 window_sequence = usac_data->window_sequence[i_ch];
IA_ERRORCODE err = IA_NO_ERROR;
+ WORD32 td_frame_prev, fac_apply, window_sequence;
+ if (usac_data->ec_flag) {
+ usac_data->str_error_concealment[i_ch].pstr_ec_scratch =
+ (ia_ec_scratch_str *)&usac_data->str_error_concealment[i_ch].str_ec_scratch;
+ usac_data->core_mode = 0;
+ ixheaacd_usac_apply_ec(usac_data, &ixheaacd_samp_rate_info[0], i_ch);
+ }
+ if (usac_data->ec_flag) {
+ td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
+ } else {
+ td_frame_prev = usac_data->td_frame_prev[i_ch];
+ }
+ fac_apply = usac_data->fac_data_present[i_ch];
+ window_sequence = usac_data->window_sequence[i_ch];
ixheaacd_drc_offset.n_long = usac_data->ccfl;
ixheaacd_drc_offset.n_short = ixheaacd_drc_offset.n_long >> 3;
@@ -554,7 +620,7 @@ WORD32 ixheaacd_fd_frm_dec(ia_usac_data_struct *usac_data, WORD32 i_ch) {
ixheaacd_drc_offset.n_trans_ls = ixheaacd_drc_offset.n_short;
}
- if (fac_apply) {
+ if (fac_apply && usac_data->frame_ok == 1) {
err = ixheaacd_cal_fac_data(usac_data, i_ch, ixheaacd_drc_offset.n_long,
ixheaacd_drc_offset.lfac, fac_idata, &fac_q);
if (err) return err;
diff --git a/decoder/ixheaacd_info.h b/decoder/ixheaacd_info.h
index 3f4d485..822338c 100644
--- a/decoder/ixheaacd_info.h
+++ b/decoder/ixheaacd_info.h
@@ -20,8 +20,6 @@
#ifndef IXHEAACD_INFO_H
#define IXHEAACD_INFO_H
-#define chans 51
-
#define EXT_SBR_DATA 13
typedef struct {
diff --git a/decoder/ixheaacd_init_config.c b/decoder/ixheaacd_init_config.c
index 92ecee7..4285fab 100644
--- a/decoder/ixheaacd_init_config.c
+++ b/decoder/ixheaacd_init_config.c
@@ -23,7 +23,7 @@
#include <assert.h>
#include "ixheaacd_type_def.h"
-
+#include "ixheaacd_constants.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_defines.h"
@@ -42,10 +42,11 @@
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_lt_predict.h"
-
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_channel.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_latmdemux.h"
@@ -55,17 +56,19 @@
#include "ixheaacd_hybrid.h"
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_mps_dec.h"
-
#include "ixheaacd_struct_def.h"
#include "ixheaacd_config.h"
#include "ixheaacd_interface.h"
#include "ixheaacd_info.h"
#include "ixheaacd_struct.h"
-#include "ixheaacd_constants.h"
#include "ixheaacd_error_standards.h"
#include "ixheaacd_error_codes.h"
@@ -180,8 +183,9 @@ VOID ixheaacd_read_escape_value(ia_bit_buf_struct *it_bit_buff,
*ext_ele_value = value;
}
-static VOID ixheaacd_get_usac_chan_conf(ia_usac_config_struct *pstr_usac_config,
- UWORD32 ch_config_index) {
+static IA_ERRORCODE ixheaacd_get_usac_chan_conf(ia_usac_config_struct *pstr_usac_config,
+ UWORD32 ch_config_index, ia_bit_buf_struct *it_bit_buff, WORD32 ec_flag)
+{
switch (ch_config_index) {
case 1:
pstr_usac_config->num_out_channels = 1;
@@ -199,9 +203,14 @@ static VOID ixheaacd_get_usac_chan_conf(ia_usac_config_struct *pstr_usac_config,
break;
default:
- assert(0);
+ if (ec_flag)
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ else
+ return IA_FATAL_ERROR;
break;
}
+ return IA_NO_ERROR;
}
VOID ixheaacd_sbr_config(ia_bit_buf_struct *it_bit_buff,
@@ -334,7 +343,7 @@ IA_ERRORCODE ixheaacd_mps212_config(
pstr_usac_mps212_config->bs_residual_bands =
ixheaacd_read_bits_buf(it_bit_buff, 5);
- if (pstr_usac_mps212_config->bs_residual_bands > MAX_PARAMETER_BANDS_MPS)
+ if (pstr_usac_mps212_config->bs_residual_bands > MAX_PARAMETER_BANDS)
return IA_FATAL_ERROR;
pstr_usac_mps212_config->bs_ott_bands_phase =
@@ -381,9 +390,10 @@ IA_ERRORCODE ixheaacd_cpe_config(
WORD32 ixheaacd_decoder_config(
ia_bit_buf_struct *it_bit_buff,
ia_usac_decoder_config_struct *pstr_usac_decoder_config,
- WORD32 sbr_ratio_index, UINT32 *chan) {
+ WORD32 sbr_ratio_index, UINT32 *chan, WORD32 ec_flag) {
UWORD32 elem_idx = 0;
UWORD32 err = 0;
+ WORD32 num_channels = 0;
ixheaacd_read_escape_value(
it_bit_buff, &(pstr_usac_decoder_config->num_elements), 4, 8, 16);
@@ -391,7 +401,12 @@ WORD32 ixheaacd_decoder_config(
pstr_usac_decoder_config->preroll_flag = 0;
if (pstr_usac_decoder_config->num_elements > USAC_MAX_ELEMENTS) {
- return -1;
+ if (ec_flag) {
+ pstr_usac_decoder_config->num_elements = USAC_MAX_ELEMENTS;
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
}
for (elem_idx = 0; elem_idx < pstr_usac_decoder_config->num_elements;
@@ -404,7 +419,7 @@ WORD32 ixheaacd_decoder_config(
switch (pstr_usac_decoder_config->usac_element_type[elem_idx]) {
case ID_USAC_SCE:
-
+ num_channels++;
pstr_usac_element_config->tw_mdct =
ixheaacd_read_bits_buf(it_bit_buff, 1);
pstr_usac_element_config->noise_filling =
@@ -417,16 +432,28 @@ WORD32 ixheaacd_decoder_config(
break;
case ID_USAC_CPE:
- if (ixheaacd_cpe_config(it_bit_buff, pstr_usac_element_config,
- sbr_ratio_index) != IA_NO_ERROR)
- return IA_FATAL_ERROR;
- if (pstr_usac_element_config->stereo_config_index > 1 && *chan < 2)
- return -1;
-
+ num_channels += 2;
+ if (ixheaacd_cpe_config(it_bit_buff, pstr_usac_element_config, sbr_ratio_index) !=
+ IA_NO_ERROR) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
+ if (pstr_usac_element_config->stereo_config_index > 1 && *chan < 2) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
break;
case ID_USAC_LFE:
-
+ num_channels++;
pstr_usac_element_config->tw_mdct = 0;
pstr_usac_element_config->noise_filling = 0;
pstr_usac_element_config->stereo_config_index = 0;
@@ -444,19 +471,38 @@ WORD32 ixheaacd_decoder_config(
} else {
pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 0;
}
- if (err != 0) return -1;
+ if (err != 0) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
break;
default:
- return -1;
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
break;
}
+ if (num_channels > 2) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
}
return err;
}
-WORD32 ixheaacd_config_extension(
- ia_bit_buf_struct *it_bit_buff,
- ia_usac_decoder_config_struct *pstr_usac_decoder_config) {
+WORD32 ixheaacd_config_extension(ia_bit_buf_struct *it_bit_buff,
+ ia_usac_decoder_config_struct *pstr_usac_decoder_config, WORD32 ec_flag) {
UWORD32 i, j;
UWORD32 num_config_extensions;
UWORD32 usac_config_ext_type, usac_config_ext_len;
@@ -464,7 +510,11 @@ WORD32 ixheaacd_config_extension(
ixheaacd_read_escape_value(it_bit_buff, &(num_config_extensions), 2, 4, 8);
num_config_extensions += 1;
if (USAC_MAX_CONFIG_EXTENSIONS < num_config_extensions) {
- return -1;
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
}
pstr_usac_decoder_config->num_config_extensions = num_config_extensions;
@@ -479,18 +529,37 @@ WORD32 ixheaacd_config_extension(
ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_type), 4, 8, 16);
ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_len), 4, 8, 16);
- if (usac_config_ext_len > 768) return IA_FATAL_ERROR;
+ if (usac_config_ext_len > 768) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
switch (usac_config_ext_type) {
case ID_CONFIG_EXT_FILL:
for (i = 0; i < usac_config_ext_len; i++) {
fill_byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
- if (fill_byte_val != 0xa5) return -1;
+ if (fill_byte_val != 0xa5) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
}
break;
default:
if ((WORD32)usac_config_ext_len > (it_bit_buff->cnt_bits >> 3)) {
- return -1;
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
}
if (ID_CONFIG_EXT_LOUDNESS_INFO == usac_config_ext_type) {
for (i = 0; i < usac_config_ext_len; i++) {
@@ -511,8 +580,8 @@ WORD32 ixheaacd_config_extension(
return 0;
}
-WORD32 ixheaacd_config(ia_bit_buf_struct *it_bit_buff,
- ia_usac_config_struct *pstr_usac_conf, UINT32 *chan) {
+WORD32 ixheaacd_config(ia_bit_buf_struct *it_bit_buff, ia_usac_config_struct *pstr_usac_conf,
+ UINT32 *chan, WORD32 ec_flag) {
WORD32 tmp, err;
err = 0;
@@ -524,7 +593,12 @@ WORD32 ixheaacd_config(ia_bit_buf_struct *it_bit_buff,
ixheaacd_read_bits_buf(it_bit_buff, 24);
if (pstr_usac_conf->usac_sampling_frequency > USAC_MAX_SAMPLE_RATE) {
- return IA_FATAL_ERROR;
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
}
} else {
@@ -532,17 +606,34 @@ WORD32 ixheaacd_config(ia_bit_buf_struct *it_bit_buff,
sampling_rate_tbl[pstr_usac_conf->usac_sampling_frequency_index];
}
+ if (pstr_usac_conf->usac_sampling_frequency == 0) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
pstr_usac_conf->core_sbr_framelength_index =
ixheaacd_read_bits_buf(it_bit_buff, 3);
- if (pstr_usac_conf->core_sbr_framelength_index > MAX_CORE_SBR_FRAME_LEN_IDX)
- return -1;
+ if (pstr_usac_conf->core_sbr_framelength_index > MAX_CORE_SBR_FRAME_LEN_IDX) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
pstr_usac_conf->channel_configuration_index =
ixheaacd_read_bits_buf(it_bit_buff, 5);
if ((pstr_usac_conf->channel_configuration_index >= 3) &&
- (pstr_usac_conf->channel_configuration_index != 8))
- return -1;
+ (pstr_usac_conf->channel_configuration_index != 8)) {
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
if (pstr_usac_conf->channel_configuration_index == 0) {
UWORD32 i;
@@ -551,27 +642,32 @@ WORD32 ixheaacd_config(ia_bit_buf_struct *it_bit_buff,
(UWORD32 *)(&(pstr_usac_conf->num_out_channels)),
5, 8, 16);
if (BS_MAX_NUM_OUT_CHANNELS < pstr_usac_conf->num_out_channels) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
+ return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
}
for (i = 0; i < pstr_usac_conf->num_out_channels; i++)
pstr_usac_conf->output_channel_pos[i] =
ixheaacd_read_bits_buf(it_bit_buff, 5);
+ if (ec_flag) {
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
} else {
- ixheaacd_get_usac_chan_conf(pstr_usac_conf,
- pstr_usac_conf->channel_configuration_index);
+ err = ixheaacd_get_usac_chan_conf(pstr_usac_conf, pstr_usac_conf->channel_configuration_index,
+ it_bit_buff, ec_flag);
+ if (err != 0)
+ return err;
}
err = ixheaacd_decoder_config(
it_bit_buff, &(pstr_usac_conf->str_usac_dec_config),
- ixheaacd_sbr_ratio(pstr_usac_conf->core_sbr_framelength_index), chan);
- if (err != 0) return -1;
+ ixheaacd_sbr_ratio(pstr_usac_conf->core_sbr_framelength_index), chan, ec_flag);
+ if (err != 0) return err;
tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
if (tmp) {
err = ixheaacd_config_extension(it_bit_buff,
- &pstr_usac_conf->str_usac_dec_config);
+ &pstr_usac_conf->str_usac_dec_config, ec_flag);
if (err != 0) return -1;
}
diff --git a/decoder/ixheaacd_initfuncs.c b/decoder/ixheaacd_initfuncs.c
index 1955776..e1a0498 100644
--- a/decoder/ixheaacd_initfuncs.c
+++ b/decoder/ixheaacd_initfuncs.c
@@ -46,6 +46,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -76,6 +79,10 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
@@ -110,6 +117,16 @@ WORD32 ixheaacd_set_aac_persistent_buffers(VOID *aac_persistent_mem_v,
persistent_used += ALIGN_SIZE64(MAXSBRBYTES) * num_channel * sizeof(WORD8);
+ aac_persistent_mem->prev_sbr_payload_buffer =
+ (WORD8 *)((WORD8 *)aac_persistent_mem_v + persistent_used);
+
+ memset((WORD8 *)aac_persistent_mem->prev_sbr_payload_buffer, 0,
+ ALIGN_SIZE64(MAXSBRBYTES) * num_channel *
+ sizeof(*(aac_persistent_mem->prev_sbr_payload_buffer)));
+
+ persistent_used += ALIGN_SIZE64(MAXSBRBYTES) * num_channel *
+ sizeof(*(aac_persistent_mem->prev_sbr_payload_buffer));
+
{
WORD32 i;
@@ -405,8 +422,13 @@ ia_aac_decoder_struct *ixheaacd_aac_decoder_init(
ptr_sbr_bitstream->no_elements = 0;
ptr_sbr_bitstream->str_sbr_ele[0].ptr_sbr_data =
&aac_persistent_mem->sbr_payload_buffer[ALIGN_SIZE64(MAXSBRBYTES) * i];
+ ptr_sbr_bitstream->str_sbr_ele[0].ptr_prev_sbr_data =
+ &aac_persistent_mem->prev_sbr_payload_buffer[ALIGN_SIZE64(MAXSBRBYTES) * i];
ptr_sbr_bitstream->str_sbr_ele[0].sbr_ele_id = ID_SCE;
ptr_sbr_bitstream->str_sbr_ele[0].size_payload = 0;
+ ptr_sbr_bitstream->str_sbr_ele[0].prev_size_payload = 0;
+ ptr_sbr_bitstream->str_sbr_ele[0].prev_sbr_ele_id = ID_SCE;
+ ptr_sbr_bitstream->str_sbr_ele[0].size_payload_old = 0;
}
{
diff --git a/decoder/ixheaacd_interface.h b/decoder/ixheaacd_interface.h
index 3dde0c3..c320e2a 100644
--- a/decoder/ixheaacd_interface.h
+++ b/decoder/ixheaacd_interface.h
@@ -99,6 +99,10 @@ VOID ixheaacd_mps_synt_out_calc_dec(WORD32 resolution, FLOAT32 *out,
FLOAT32 *state,
const FLOAT32 *filter_coeff);
+VOID ixheaacd_mps_synt_post_fft_twiddle_dec(WORD32 resolution, FLOAT32 *fin_re,
+ FLOAT32 *fin_im, const FLOAT32 *table_re,
+ const FLOAT32 *table_im, FLOAT32 *state);
+
VOID ixheaacd_mps_synt_out_calc_armv7(WORD32 resolution, WORD32 *out,
WORD32 *state,
const WORD32 *filter_coeff);
diff --git a/decoder/ixheaacd_latmdemux.c b/decoder/ixheaacd_latmdemux.c
index b01d32b..590d671 100644
--- a/decoder/ixheaacd_latmdemux.c
+++ b/decoder/ixheaacd_latmdemux.c
@@ -44,7 +44,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -73,6 +75,10 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
@@ -114,7 +120,7 @@ WORD32 ixheaacd_latm_payload_length_info(struct ia_bit_buf_struct *it_bit_buff,
layer_info->frame_len_bits =
ixheaacd_latm_au_chunk_length_info(it_bit_buff);
if (layer_info->frame_len_bits % 8 != 0) {
- error_code = IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
return error_code;
}
@@ -124,13 +130,13 @@ WORD32 ixheaacd_latm_payload_length_info(struct ia_bit_buf_struct *it_bit_buff,
break;
default:
- error_code = IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
return error_code;
}
}
}
} else {
- error_code = IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
return error_code;
}
@@ -177,7 +183,7 @@ IA_ERRORCODE ixheaacd_latm_stream_mux_config(
latm_element->num_sub_frames = ixheaacd_read_bits_buf(it_bit_buff, 6) + 1;
if (latm_element->num_sub_frames != 1)
- return IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ return IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
latm_element->num_program = ixheaacd_read_bits_buf(it_bit_buff, 4) + 1;
@@ -202,7 +208,7 @@ IA_ERRORCODE ixheaacd_latm_stream_mux_config(
if (asc_len > it_bit_buff->size - 106 || asc_len > 2592 ||
asc_len < 0) {
- return IA_ENHAACPLUS_DEC_INIT_FATAL_DEC_INIT_FAIL;
+ return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
}
if ((error_code = ixheaacd_ga_hdr_dec(
@@ -248,7 +254,7 @@ IA_ERRORCODE ixheaacd_latm_stream_mux_config(
break;
default:
- return IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ return IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
}
}
}
@@ -278,7 +284,7 @@ IA_ERRORCODE ixheaacd_latm_stream_mux_config(
latm_element->crc_check_sum = ixheaacd_read_bits_buf(it_bit_buff, 8);
}
} else {
- error_code = IA_ENHAACPLUS_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
+ error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
}
return (error_code);
}
diff --git a/decoder/ixheaacd_latmdemux.h b/decoder/ixheaacd_latmdemux.h
index d085f1f..d7f6291 100644
--- a/decoder/ixheaacd_latmdemux.h
+++ b/decoder/ixheaacd_latmdemux.h
@@ -57,9 +57,9 @@ typedef struct {
ixheaacd_latm_layer_info layer_info[LATM_MAX_PROG][LATM_MAX_LAYER];
} ixheaacd_latm_struct;
-WORD32 ixheaacd_latm_au_chunk_length_info(ia_bit_buf_struct* it_bit_buff);
+WORD32 ixheaacd_latm_au_chunk_length_info(ia_bit_buf_struct *it_bit_buff);
-WORD32 ixheaacd_latm_payload_length_info(ia_bit_buf_struct* it_bit_buff,
- ixheaacd_latm_struct* latm_element);
+WORD32 ixheaacd_latm_payload_length_info(ia_bit_buf_struct *it_bit_buff,
+ ixheaacd_latm_struct *latm_element);
#endif
diff --git a/decoder/ixheaacd_ld_mps_config.c b/decoder/ixheaacd_ld_mps_config.c
index fbcc373..b378748 100644
--- a/decoder/ixheaacd_ld_mps_config.c
+++ b/decoder/ixheaacd_ld_mps_config.c
@@ -18,8 +18,8 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include "ixheaacd_type_def.h"
-#include <ixheaacd_constants.h>
-#include <ixheaacd_error_standards.h>
+#include "ixheaacd_constants.h"
+#include "ixheaacd_error_standards.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_config.h"
@@ -36,17 +36,16 @@ typedef struct {
WORD32 num_ott_boxes;
WORD32 num_ttt_boxes;
WORD32 ott_mode_lfe[MAX_NUM_OTT];
-} TREEPROPERTIES;
+} ia_ld_mps_dec_tree_properties_struct;
static WORD32 ixheaacd_freq_res_table[] = {0, 23, 15, 12, 9, 7, 5, 4};
-static WORD32 ixheaacd_HRTF_freq_res_table[][8] = {{0, 28, 20, 14, 10, 7, 5, 4},
+static WORD32 ixheaacd_hrtf_freq_res_table[][8] = {{0, 28, 20, 14, 10, 7, 5, 4},
{0, 13, 13, 8, 7, 4, 3, 3}};
-static TREEPROPERTIES ixheaacd_tree_property_table[] = {
- {1, 6, 5, 0, {0, 0, 0, 0, 1}}, {1, 6, 5, 0, {0, 0, 1, 0, 0}},
- {2, 6, 3, 1, {1, 0, 0, 0, 0}}, {2, 8, 5, 1, {1, 0, 0, 0, 0}},
- {2, 8, 5, 1, {1, 0, 0, 0, 0}}, {6, 8, 2, 0, {0, 0, 0, 0, 0}},
+static ia_ld_mps_dec_tree_properties_struct ixheaacd_tree_property_table[] = {
+ {1, 6, 5, 0, {0, 0, 0, 0, 1}}, {1, 6, 5, 0, {0, 0, 1, 0, 0}}, {2, 6, 3, 1, {1, 0, 0, 0, 0}},
+ {2, 8, 5, 1, {1, 0, 0, 0, 0}}, {2, 8, 5, 1, {1, 0, 0, 0, 0}}, {6, 8, 2, 0, {0, 0, 0, 0, 0}},
{6, 8, 2, 0, {0, 0, 0, 0, 0}}, {1, 2, 1, 0, {0, 0, 0, 0, 0}}};
static IA_ERRORCODE ixheaacd_ld_spatial_extension_config(
@@ -269,8 +268,8 @@ IA_ERRORCODE ixheaacd_ld_spatial_specific_config(
config->bs_HRTF_num_chan = 5;
config->bs_HRTF_asymmetric = ixheaacd_read_bits_buf(it_bit_buff, 1);
- config->HRTF_num_band = ixheaacd_HRTF_freq_res_table[0][config->bs_HRTF_freq_res];
- config->HRTF_num_phase = ixheaacd_HRTF_freq_res_table[1][config->bs_HRTF_freq_res];
+ config->HRTF_num_band = ixheaacd_hrtf_freq_res_table[0][config->bs_HRTF_freq_res];
+ config->HRTF_num_phase = ixheaacd_hrtf_freq_res_table[1][config->bs_HRTF_freq_res];
for (hc = 0; hc < config->bs_HRTF_num_chan; hc++) {
for (hb = 0; hb < config->HRTF_num_band; hb++) {
diff --git a/decoder/ixheaacd_ld_mps_dec.c b/decoder/ixheaacd_ld_mps_dec.c
index 8b98283..b12d1f8 100644
--- a/decoder/ixheaacd_ld_mps_dec.c
+++ b/decoder/ixheaacd_ld_mps_dec.c
@@ -50,9 +50,10 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_block.h"
@@ -61,8 +62,6 @@
#include "ixheaacd_sbr_payload.h"
#include "ixheaacd_common_rom.h"
-#include "ixheaacd_type_def.h"
-
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
#include "ixheaacd_env_extr_part.h"
@@ -85,6 +84,10 @@
#include "ixheaacd_pvc_dec.h"
#include "ixheaacd_sbr_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_struct_def.h"
@@ -154,6 +157,8 @@ WORD32 ixheaacd_ld_mps_apply(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
err = ixheaacd_mps_frame_decode(mps_handle);
if (err != IA_NO_ERROR) return err;
+ if (aac_handle->mps_dec_handle.num_parameter_sets_prev <= 0) return IA_FATAL_ERROR;
+
if (mps_handle->ldmps_config.bs_tree_config == 7) {
ixheaacd_pre_and_mix_matrix_calculation(&(aac_handle->mps_dec_handle));
ixheaacd_mps_pre_matrix_mix_matrix_smoothing(&(aac_handle->mps_dec_handle));
@@ -177,22 +182,22 @@ WORD32 ixheaacd_ld_mps_apply(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
}
ixheaacd_mps_qmf_hyb_analysis(mps_handle);
- err = ixheaacd_mps_apply_pre_matrix(mps_handle);
- if (err < 0) return err;
+ mps_handle->bs_high_rate_mode = 1;
+
+ ixheaacd_mps_apply_pre_matrix(mps_handle);
ixheaacd_mps_create_w(mps_handle);
if ((!(mps_handle->res_bands | mps_handle->pre_mix_req)) &&
(mps_handle->config->bs_phase_coding == 0)) {
- err = ixheaacd_mps_apply_mix_matrix_type1(mps_handle);
+ ixheaacd_mps_apply_mix_matrix_type1(mps_handle);
} else if (mps_handle->pre_mix_req) {
- err = ixheaacd_mps_apply_mix_matrix_type2(mps_handle);
+ ixheaacd_mps_apply_mix_matrix_type2(mps_handle);
} else {
- err = ixheaacd_mps_apply_mix_matrix_type3(mps_handle);
+ ixheaacd_mps_apply_mix_matrix_type3(mps_handle);
}
- if (err < 0) return err;
if (mps_handle->ldmps_config.bs_temp_shape_config == 2) {
ixheaacd_mps_time_env_shaping(mps_handle);
diff --git a/decoder/ixheaacd_ld_mps_dec.h b/decoder/ixheaacd_ld_mps_dec.h
index 1e4d459..480787a 100644
--- a/decoder/ixheaacd_ld_mps_dec.h
+++ b/decoder/ixheaacd_ld_mps_dec.h
@@ -17,15 +17,23 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
+#ifndef IXHEAACD_LD_MPS_DEC_H
+#define IXHEAACD_LD_MPS_DEC_H
WORD32 ixheaacd_ld_mps_apply(ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
WORD16 *output_buf);
IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
- ia_mps_dec_state_struct *self, ia_handle_bit_buf_struct it_bit_buff);
+ ia_mps_dec_state_struct *self, ia_bit_buf_struct *it_bit_buff);
WORD32 ixheaacd_extension_payload(ia_bit_buf_struct *it_bit_buff, WORD32 *cnt,
ia_mps_dec_state_struct *self);
IA_ERRORCODE ixheaacd_ld_spatial_specific_config(
ia_usac_dec_mps_config_struct *config, ia_bit_buf_struct *it_bit_buff);
+
+IA_ERRORCODE ixheaacd_heaac_mps_apply(ia_exhaacplus_dec_api_struct *self,
+ WORD16 *output_buf, UWORD8 *mps_buffer,
+ WORD32 mps_bytes);
+
+#endif /* IXHEAACD_LD_MPS_DEC_H */
diff --git a/decoder/ixheaacd_longblock.c b/decoder/ixheaacd_longblock.c
index 574941e..0938389 100644
--- a/decoder/ixheaacd_longblock.c
+++ b/decoder/ixheaacd_longblock.c
@@ -39,9 +39,10 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_block.h"
@@ -124,7 +125,7 @@ IA_ERRORCODE ixheaacd_read_section_data(
band_offsets[top] - band_offsets[sfb];
num_lines_sec_idx++;
if (sect_cb == (ESC_HCB + 1)) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INVALID_CODE_BOOK;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK;
} else {
*ptr_hcr_code_book++ = sect_cb;
}
@@ -134,11 +135,11 @@ IA_ERRORCODE ixheaacd_read_section_data(
sfb = (sfb + sect_len);
if (sfb > max_sfb) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED);
}
if (sect_cb == (ESC_HCB + 1)) {
return (WORD16)(
- (WORD32)IA_ENHAACPLUS_DEC_EXE_NONFATAL_INVALID_CODE_BOOK);
+ (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK);
}
while (sect_len--) {
@@ -297,8 +298,9 @@ VOID ixheaacd_read_scale_factor_data(
it_bit_buff->bit_pos = 7 - bit_pos;
{
WORD bits_consumed;
- bits_consumed = ((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
- (start_bit_pos - it_bit_buff->bit_pos);
+ bits_consumed =
+ (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
+ (start_bit_pos - it_bit_buff->bit_pos));
it_bit_buff->cnt_bits -= bits_consumed;
}
}
diff --git a/decoder/ixheaacd_lpc.c b/decoder/ixheaacd_lpc.c
index b3bc304..3f76fd7 100644
--- a/decoder/ixheaacd_lpc.c
+++ b/decoder/ixheaacd_lpc.c
@@ -27,6 +27,8 @@
#include "ixheaacd_type_def.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_interface.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_aac_rom.h"
#include "ixheaacd_tns_usac.h"
#include "ixheaacd_cnst.h"
#include "ixheaacd_acelp_info.h"
@@ -39,7 +41,15 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_pns.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_ec.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_func_def.h"
@@ -53,8 +63,6 @@
#define FREQ_MAX_F 6400.0f
#define FREQ_DIV_F 400.0f
-extern const FLOAT32 lsf_init[ORDER];
-
extern const FLOAT32 ixheaacd_fir_lp_filt[1 + FILTER_DELAY];
const WORD32 ixheaacd_pow_10_i_by_128[128] = {
@@ -214,10 +222,9 @@ static VOID ixheaacd_lsf_2_lsp_conversion_float(FLOAT32 lsf[], FLOAT32 lsp[],
return;
}
-static WORD32 ixheaacd_bass_post_filter(FLOAT32 *synth_sig, WORD32 *pitch,
- FLOAT32 *pitch_gain, FLOAT32 *synth_out,
- WORD32 len_fr, WORD32 len2,
- FLOAT32 bpf_prev[]) {
+static WORD32 ixheaacd_bass_post_filter(FLOAT32 *synth_sig, WORD32 *pitch, FLOAT32 *pitch_gain,
+ FLOAT32 *synth_out, WORD32 len_fr, WORD32 len2,
+ FLOAT32 bpf_prev[], WORD32 ec_flag) {
WORD32 i, j, sf, num_subfr, pitch_lag, lg;
FLOAT32 x_energy, xy_corr, y_energy, norm_corr, energy, gain, tmp, alpha;
FLOAT32 noise_buf[FILTER_DELAY + (2 * LEN_SUBFR)], *noise_tmp1, *noise_tmp2,
@@ -235,7 +242,13 @@ static WORD32 ixheaacd_bass_post_filter(FLOAT32 *synth_sig, WORD32 *pitch,
for (num_subfr = 0; num_subfr < len_fr; num_subfr += LEN_SUBFR, sf++) {
pitch_lag = pitch[sf];
gain = pitch_gain[sf];
- if (((pitch_lag >> 1) + 96 - num_subfr) > MAX_PITCH) return -1;
+ if (((pitch_lag >> 1) + 96 - num_subfr) > MAX_PITCH) {
+ if (ec_flag) {
+ pitch_lag = (MAX_PITCH + num_subfr - 96) << 1;
+ } else {
+ return -1;
+ }
+ }
if (gain > 1.0f) gain = 1.0f;
if (gain < 0.0f) gain = 0.0f;
@@ -259,6 +272,14 @@ static WORD32 ixheaacd_bass_post_filter(FLOAT32 *synth_sig, WORD32 *pitch,
if (lg < 0) lg = 0;
if (lg > LEN_SUBFR) lg = LEN_SUBFR;
+ if (pitch_lag > MAX_PITCH) {
+ if (ec_flag) {
+ pitch_lag = MAX_PITCH;
+ } else {
+ return -1;
+ }
+ }
+
if (gain > 0) {
if (lg > 0) {
tmp = 0.01f;
@@ -343,7 +364,7 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
WORD32 i, k, tp, mode;
WORD32 *mod;
- FLOAT32 gain, stability_factor;
+ FLOAT32 gain, stability_factor = 0.0f;
FLOAT32 tmp, synth_corr, synth_energy;
WORD32 len_fr;
@@ -358,6 +379,7 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
WORD32 subfr_len = 0, n_subfr = 0;
WORD32 err = 0;
+ WORD32 ch = usac_data->present_chan;
len_fr = usac_data->ccfl;
len_subfrm = usac_data->len_subfrm;
@@ -376,7 +398,14 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
memset(xcitation_curr, 0, sizeof(FLOAT32) * (LEN_SUPERFRAME + 1));
mod = pstr_td_frame_data->mod;
+ if (usac_data->frame_ok == 1) {
+ usac_data->num_lost_lpd_frames[usac_data->present_chan] = 0;
+ }
+ if (usac_data->ec_flag && usac_data->frame_ok == 0) {
+ ixheaacd_usac_lpc_ec(usac_data->lsp_coeff, usac_data->lpc4_lsf, usac_data->lsf_adaptive_mean,
+ first_lpd_flag);
+ }
for (i = 0; i < num_subfr_by2; i++) {
pitch[i] = st->pitch_prev[i];
pitch_gain[i] = st->gain_prev[i];
@@ -385,13 +414,20 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
pitch[i + num_subfr_by2] = 64;
pitch_gain[i + num_subfr_by2] = 0.0f;
}
- if (!first_lpd_flag) {
- ixheaacd_lsp_2_lsf_conversion(st->lspold, lsf_flt, ORDER);
- }
- ixheaacd_alg_vec_dequant(pstr_td_frame_data, first_lpd_flag, lsf_flt,
- pstr_td_frame_data->mod);
+ if (usac_data->frame_ok) {
+ if (!first_lpd_flag) {
+ ixheaacd_lsp_2_lsf_conversion(st->lspold, lsf_flt, ORDER);
+ }
+ ixheaacd_alg_vec_dequant(pstr_td_frame_data, first_lpd_flag, lsf_flt, pstr_td_frame_data->mod,
+ usac_data->ec_flag);
+ }
+ if (usac_data->ec_flag && !(usac_data->frame_ok)) {
+ for (i = 0; i < 5; i++) {
+ memcpy(&lsf_flt[i * ORDER], &usac_data->lsp_coeff[i], ORDER * sizeof(lsf_flt[0]));
+ }
+ }
if (first_lpd_flag) {
ixheaacd_mem_cpy(&lsf_flt[0], st->lsf_prev, ORDER);
ixheaacd_lsf_2_lsp_conversion_float(st->lsf_prev, st->lspold, ORDER);
@@ -424,9 +460,9 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
} else {
fac_length = len_subfrm / 2;
}
- if ((pstr_td_frame_data->fac_data[0] < 0) ||
- (pstr_td_frame_data->fac_data[0] > 128)) {
- return -1;
+
+ if (usac_data->frame_ok == 0) {
+ memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
}
gain = ixheaacd_pow_10_i_by_128[pstr_td_frame_data->fac_data[0]];
@@ -439,13 +475,20 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
ptr_scratch[fac_length - 2 * i] << 16;
}
- err = ixheaacd_fwd_alias_cancel_tool(usac_data, pstr_td_frame_data,
- fac_length, lp_flt_coeff_a, gain);
- if (err == -1) return err;
+ if (usac_data->ec_flag == 0) {
+ if (fac_length & (fac_length - 1)) {
+ if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
+ (fac_length != 384) && (fac_length != 768)) {
+ return -1;
+ }
+ }
+ }
+
+ ixheaacd_fwd_alias_cancel_tool(usac_data, pstr_td_frame_data, fac_length, lp_flt_coeff_a,
+ gain);
- memset(
- &usac_data->overlap_data_ptr[usac_data->present_chan][(len_fr / 2)],
- 0, fac_length * sizeof(WORD32));
+ memset(&usac_data->overlap_data_ptr[usac_data->present_chan][(len_fr / 2)], 0,
+ fac_length * sizeof(WORD32));
}
for (i = 0; i < 2 * len_subfrm; i++)
@@ -484,6 +527,14 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
k = 0;
while (k < 4) {
+ if (usac_data->ec_flag && usac_data->frame_ok == 0) {
+ if (mod[k] != 0 && usac_data->frame_ok == 0 &&
+ usac_data->str_error_concealment[ch].prev_frame_ok[0] == 0 && k == 0) {
+ memcpy(st->lspold, usac_data->lspold_ec, sizeof(st->lspold));
+ }
+ usac_data->num_lost_lpd_frames[usac_data->present_chan]++;
+ }
+
mode = mod[k];
if ((st->mode_prev == 0) && (mode > 0) &&
(k != 0 || st->bpf_active_prev == 1)) {
@@ -491,35 +542,52 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
pitch[i + 1] = pitch[i] = pitch[i - 1];
pitch_gain[i + 1] = pitch_gain[i] = pitch_gain[i - 1];
}
-
- if ((mode == 0) || (mode == 1))
+ if (usac_data->frame_ok == 0) {
memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
- else if (mode == 2)
- memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
- else
- memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
+ } else {
+ if ((mode == 0) || (mode == 1))
+ memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
+ else if (mode == 2)
+ memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
+ else
+ memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
+ }
ixheaacd_lsf_2_lsp_conversion_float(lsf_curr, lsp_curr, ORDER);
-
- tmp = 0.0f;
- for (i = 0; i < ORDER; i++) {
- tmp += (lsf_curr[i] - st->lsf_prev[i]) * (lsf_curr[i] - st->lsf_prev[i]);
+ if (usac_data->frame_ok) {
+ tmp = 0.0f;
+ for (i = 0; i < ORDER; i++) {
+ tmp += (lsf_curr[i] - st->lsf_prev[i]) * (lsf_curr[i] - st->lsf_prev[i]);
+ }
+ stability_factor = (FLOAT32)(1.25f - (tmp / 400000.0f));
+ if (stability_factor > 1.0f) {
+ stability_factor = 1.0f;
+ }
+ if (stability_factor < 0.0f) {
+ stability_factor = 0.0f;
+ }
+ if (usac_data->ec_flag) {
+ usac_data->stability_factor_old = stability_factor;
+ }
}
- stability_factor = (FLOAT32)(1.25f - (tmp / 400000.0f));
- if (stability_factor > 1.0f) {
- stability_factor = 1.0f;
+ if (usac_data->ec_flag && !(usac_data->frame_ok)) {
+ stability_factor = usac_data->stability_factor_old;
}
- if (stability_factor < 0.0f) {
- stability_factor = 0.0f;
+ if (usac_data->frame_ok == 0) {
+ mode = st->mode_prev;
}
+ if ((usac_data->frame_ok == 1 && mode == 0) ||
+ (usac_data->frame_ok == 0 && (st->mode_prev == 0 || st->mode_prev == 1))) {
+ ixheaacd_interpolation_lsp_params(st->lspold, lsp_curr, lp_flt_coff_a, num_subfr);
- if (mode == 0) {
- ixheaacd_interpolation_lsp_params(st->lspold, lsp_curr, lp_flt_coff_a,
- num_subfr);
+ if (usac_data->frame_ok == 1 || (usac_data->frame_ok == 0 && st->mode_prev == 0)) {
+ ixheaacd_acelp_alias_cnx(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
+ stability_factor, st);
+ }
- err = ixheaacd_acelp_alias_cnx(usac_data, pstr_td_frame_data, k,
- lp_flt_coff_a, stability_factor, st);
- if (err) return err;
+ if (usac_data->frame_ok == 0 && st->mode_prev == 1) {
+ ixheaacd_usac_tcx_ec(usac_data, st, lsp_curr, k, lp_flt_coff_a);
+ }
if ((st->mode_prev != 0) && bpf_control_info) {
i = (k * num_subfr) + num_subfr_by2;
@@ -541,6 +609,12 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
} else if (mode == 3) {
subfr_len = len_subfrm << 2;
n_subfr = num_subfr_in_superfr;
+ } else {
+ if (usac_data->frame_ok == 0) {
+ mode = 3;
+ subfr_len = len_subfrm << 2;
+ n_subfr = num_subfr_in_superfr;
+ }
}
ixheaacd_lpc_coef_gen(st->lspold, lsp_curr, lp_flt_coff_a, n_subfr,
@@ -549,11 +623,17 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
err = ixheaacd_tcx_mdct(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
subfr_len, st);
if (err) return err;
+ if (usac_data->frame_ok == 1 && k == 2) {
+ memcpy(usac_data->lp_flt_coff_a_ec, &lp_flt_coff_a[k * (ORDER + 1)],
+ sizeof(usac_data->lp_flt_coff_a_ec));
+ }
k += (1 << (mode - 1));
}
st->mode_prev = mode;
-
+ if (usac_data->frame_ok == 0) {
+ memcpy(usac_data->lspold_ec, st->lspold, sizeof(st->lspold));
+ }
ixheaacd_mem_cpy(lsp_curr, st->lspold, ORDER);
ixheaacd_mem_cpy(lsf_curr, st->lsf_prev, ORDER);
}
@@ -587,8 +667,12 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
if (gain > 0.0f) {
synth_corr = 0.0f, synth_energy = 1e-6f;
if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
- ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME))
- return -1;
+ ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
+ if (usac_data->ec_flag) {
+ tp = LEN_SUPERFRAME - LEN_SUBFR - (i * LEN_SUBFR);
+ } else
+ return -1;
+ }
for (k = 0; k < LEN_SUBFR; k++) {
synth_corr +=
synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
@@ -600,12 +684,20 @@ WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
}
if (mod[3] == 0) {
- err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
- synth_delay, st->bpf_prev);
+ err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr, synth_delay,
+ st->bpf_prev, usac_data->ec_flag);
} else {
- err =
- ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
- synth_delay - (len_subfrm / 2), st->bpf_prev);
+ err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
+ synth_delay - (len_subfrm / 2), st->bpf_prev,
+ usac_data->ec_flag);
+ }
+ if (err) return err;
+ if (usac_data->ec_flag && usac_data->frame_ok) {
+ memcpy(usac_data->lpc4_lsf, pstr_td_frame_data->lpc4_lsf, sizeof(usac_data->lpc4_lsf));
+ memcpy(usac_data->str_error_concealment[ch].lsf4, usac_data->lpc4_lsf,
+ sizeof(usac_data->lpc4_lsf));
+ memcpy(usac_data->lsf_adaptive_mean, pstr_td_frame_data->lsf_adaptive_mean_cand,
+ sizeof(usac_data->lsf_adaptive_mean));
}
return err;
}
@@ -698,11 +790,19 @@ WORD32 ixheaacd_lpd_bpf_fix(ia_usac_data_struct *usac_data,
for (i = 0; i < num_subfr_by2 + 2; i++) {
tp = pitch[i];
if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
- return -1;
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else {
+ tp = MAX_PITCH - (i * LEN_SUBFR);
+ }
} else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
(((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
- return -1;
+ if (usac_data->ec_flag == 0)
+ return -1;
+ else {
+ tp = (i * LEN_SUBFR + MAX_PITCH - 1882);
+ }
}
if (pitch_gain[i] > 0.0f) {
@@ -717,10 +817,9 @@ WORD32 ixheaacd_lpd_bpf_fix(ia_usac_data_struct *usac_data,
}
}
- err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, signal_out,
- (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
- len_fr - (lpd_sbf_len + 4) * LEN_SUBFR,
- st->bpf_prev);
+ err = ixheaacd_bass_post_filter(
+ synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
+ len_fr - (lpd_sbf_len + 4) * LEN_SUBFR, st->bpf_prev, usac_data->ec_flag);
if (err != 0) return err;
ixheaacd_mem_cpy(signal_out, out_buffer,
diff --git a/decoder/ixheaacd_lpc_dec.c b/decoder/ixheaacd_lpc_dec.c
index 0a90d1d..2794776 100644
--- a/decoder/ixheaacd_lpc_dec.c
+++ b/decoder/ixheaacd_lpc_dec.c
@@ -31,6 +31,8 @@
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_func_def.h"
@@ -119,6 +121,15 @@ static WORD32 ixheaacd_avq_first_approx_abs(FLOAT32 *lsf, WORD32 *indx) {
lsf_min = lsf[i] + LSF_GAP;
}
+ lsf_min = FREQ_MAX - LSF_GAP;
+ for (i = ORDER - 1; i >= 0; i--) {
+ if (lsf[i] > lsf_min) {
+ lsf[i] = lsf_min;
+ }
+
+ lsf_min = lsf[i] - LSF_GAP;
+ }
+
return position;
}
@@ -146,14 +157,13 @@ WORD32 ixheaacd_avq_first_approx_rel(FLOAT32 *lsf, WORD32 *indx, WORD32 mode) {
return position;
}
-VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
- WORD32 first_lpd_flag, FLOAT32 *lsf,
- WORD32 mod[]) {
+VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data, WORD32 first_lpd_flag,
+ FLOAT32 *lsf, WORD32 mod[], WORD32 ec_flag) {
WORD32 i;
WORD32 *lpc_index, mode_lpc, pos = 0;
-
+ WORD32 lpc_present[5] = {0, 0, 0, 0, 0};
lpc_index = pstr_td_frame_data->lpc_first_approx_idx;
-
+ lpc_present[4] = 1;
pos = ixheaacd_avq_first_approx_abs(&lsf[4 * ORDER], &lpc_index[0]);
lpc_index += pos;
@@ -172,10 +182,12 @@ VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
lpc_index += pos;
}
+ lpc_present[0] = 1;
if (mod[0] < 3) {
mode_lpc = lpc_index[0];
lpc_index++;
+ lpc_present[2] = 1;
if (mode_lpc == 0) {
pos = ixheaacd_avq_first_approx_abs(&lsf[2 * ORDER], &lpc_index[0]);
@@ -190,6 +202,7 @@ VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
if (mod[0] < 2) {
mode_lpc = lpc_index[0];
lpc_index++;
+ lpc_present[1] = 1;
if (mode_lpc == 1) {
for (i = 0; i < ORDER; i++)
@@ -209,6 +222,7 @@ VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
if (mod[2] < 2) {
mode_lpc = lpc_index[0];
lpc_index++;
+ lpc_present[3] = 1;
if (mode_lpc == 0) {
pos = ixheaacd_avq_first_approx_abs(&lsf[3 * ORDER], &lpc_index[0]);
@@ -226,4 +240,40 @@ VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
lpc_index += pos;
}
-} \ No newline at end of file
+ if (ec_flag) {
+ WORD32 last, k;
+ WORD32 num_lpc = 0, num_div = 4;
+ FLOAT32 div_fac;
+ FLOAT32 *lsf4 = &lsf[4 * ORDER];
+ for (i = 0; i < ORDER; i++) {
+ pstr_td_frame_data->lpc4_lsf[i] = lsf4[i];
+ }
+ i = num_div;
+ do {
+ num_lpc += lpc_present[i--];
+ } while (i >= 0 && num_lpc < 3);
+
+ last = i;
+
+ switch (num_lpc) {
+ case 3:
+ div_fac = (1.0f / 3.0f);
+ break;
+ case 2:
+ div_fac = (1.0f / 2.0f);
+ break;
+ default:
+ div_fac = (1.0f);
+ break;
+ }
+ for (k = 0; k < ORDER; k++) {
+ FLOAT32 temp = 0;
+ for (i = 4; i > last; i--) {
+ if (lpc_present[i]) {
+ temp = temp + (lsf[i * ORDER + k] * div_fac);
+ }
+ }
+ pstr_td_frame_data->lsf_adaptive_mean_cand[k] = temp;
+ }
+ }
+}
diff --git a/decoder/ixheaacd_lpfuncs.c b/decoder/ixheaacd_lpfuncs.c
index 14a0cfd..a86c94d 100644
--- a/decoder/ixheaacd_lpfuncs.c
+++ b/decoder/ixheaacd_lpfuncs.c
@@ -45,8 +45,10 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -76,8 +78,11 @@
#include "ixheaacd_aacdec.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-
#include "ixheaacd_struct_def.h"
#include "ixheaacd_tns.h"
@@ -86,23 +91,6 @@
#include "ixheaacd_multichannel.h"
#include "ixheaacd_function_selector.h"
-static PLATFORM_INLINE WORD32 ixheaacd_shr32_drc(WORD32 a, WORD32 b) {
- WORD32 out_val;
-
- b = ((UWORD32)(b << 24) >> 24);
- if (b >= 31) {
- if (a < 0)
- out_val = -1;
- else
- out_val = 0;
- } else {
- a = ixheaacd_add32_sat(a, (1 << (b - 1)));
- out_val = (WORD32)a >> b;
- }
-
- return out_val;
-}
-
VOID ixheaacd_process_win_seq(WORD32 *coef, WORD32 *prev, WORD32 *out,
const WORD16 *window_long,
const WORD16 *window_short, WORD16 q_shift,
@@ -301,7 +289,7 @@ VOID ixheaacd_nolap1_32(WORD32 *coef, WORD32 *out, WORD16 q_shift,
WORD32 i;
for (i = 0; i < size_07; i++) {
- out[ch_fac * i] = ixheaacd_shr32_drc(
+ out[ch_fac * i] = ixheaacd_shr32_sat(
ixheaacd_negate32_sat(coef[size_07 - 1 - i]), 16 - q_shift);
}
}
@@ -330,7 +318,7 @@ VOID ixheaacd_spec_to_overlapbuf_dec(WORD32 *ptr_overlap_buf,
WORD32 size) {
WORD32 i;
for (i = 0; i < size; i++) {
- ptr_overlap_buf[i] = ixheaacd_shr32_drc(ptr_spec_coeff[i], 16 - q_shift);
+ ptr_overlap_buf[i] = ixheaacd_shr32_sat(ptr_spec_coeff[i], 16 - q_shift);
}
}
@@ -492,8 +480,8 @@ VOID ixheaacd_imdct_process(ia_aac_dec_overlap_info *ptr_aac_dec_overlap_info,
ptr_spec_coeff, ptr_long_window,
ptr_ics_info->frame_length, q_shift, ptr_overlap_buf,
ch_fac, (WORD16 *)out_samples, slot_element);
- ptr_ics_info->qshift_adj = -2;
}
+ ptr_ics_info->qshift_adj = -2;
}
}
break;
diff --git a/decoder/ixheaacd_lpp_tran.c b/decoder/ixheaacd_lpp_tran.c
index 8af8ca9..395206a 100644
--- a/decoder/ixheaacd_lpp_tran.c
+++ b/decoder/ixheaacd_lpp_tran.c
@@ -46,7 +46,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -79,16 +81,6 @@
#define SHIFT 5
-static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32(WORD32 a, WORD32 b) {
- WORD32 result;
- WORD64 temp_result;
-
- temp_result = (WORD64)(a) * (WORD64)(b >> 16);
- result = (WORD32)(temp_result >> 16);
-
- return (result);
-}
-
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16hin32(WORD32 a, WORD32 b,
WORD32 c) {
WORD32 result;
@@ -653,18 +645,16 @@ static PLATFORM_INLINE VOID ixheaacd_filt_step3_lp(WORD len, WORD32 coef1,
WORD32 temp = ixheaacd_mult32x16hin32(prev2, coef2);
pqmf_real_low += 64;
- *pqmf_real_high = ixheaacd_add32_sat(
- (curr >> LPC_SCALE_FACTOR),
- (ixheaacd_shl32_sat(ixheaacd_mac32x16hin32(temp, prev1, coef1), 1)));
+ *pqmf_real_high = ixheaacd_add32_sat((curr >> LPC_SCALE_FACTOR),
+ ((ixheaacd_mac32x16hin32(temp, prev1, coef1)) << 1));
pqmf_real_high += 64;
prev2 = *pqmf_real_low;
temp = ixheaacd_mult32x16hin32(prev1, coef2);
pqmf_real_low += 64;
- *pqmf_real_high = ixheaacd_add32_sat(
- (prev2 >> LPC_SCALE_FACTOR),
- (ixheaacd_shl32_sat(ixheaacd_mac32x16hin32(temp, curr, coef1), 1)));
+ *pqmf_real_high = ixheaacd_add32_sat((prev2 >> LPC_SCALE_FACTOR),
+ ((ixheaacd_mac32x16hin32(temp, curr, coef1)) << 1));
pqmf_real_high += 64;
prev1 = prev2;
@@ -916,8 +906,7 @@ VOID ixheaacd_low_pow_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
&cov_matrix_seq[start_patch],
(stop_patch - start_patch),
auto_corr_length);
- }
- else
+ } else
(*ixheaacd_covariance_matrix_calc)(sub_sig_x + start_patch,
&cov_matrix_seq[start_patch],
(stop_patch - start_patch),
@@ -1049,8 +1038,7 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
(stop_patch - start_patch), 38);
}
} else {
- if (hf_generator->pstr_settings->num_columns == 15)
- {
+ if (hf_generator->pstr_settings->num_columns == 15) {
(*ixheaacd_covariance_matrix_calc_2)(
&cov_matrix_seq[start_patch],
(sub_sig_x + start_patch + LPC_ORDER * 128),
diff --git a/decoder/ixheaacd_lt_predict.c b/decoder/ixheaacd_lt_predict.c
index 92d10dc..0838741 100644
--- a/decoder/ixheaacd_lt_predict.c
+++ b/decoder/ixheaacd_lt_predict.c
@@ -29,15 +29,17 @@
#include "ixheaacd_basic_ops40.h"
#include "ixheaacd_defines.h"
+#include "ixheaacd_cnst.h"
#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_pulsedata.h"
#include "ixheaacd_pns.h"
-#include "ixheaacd_lt_predict.h"
#include "ixheaacd_channelinfo.h"
-#include "ixheaacd_cnst.h"
#include "ixheaacd_tns.h"
#include "ixheaacd_aac_imdct.h"
@@ -395,7 +397,7 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
}
}
-VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, void *time_t,
+VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time_t,
WORD32 *overlap, WORD32 frame_len,
WORD32 object_type, WORD32 stride,
WORD16 window_sequence, WORD16 *p_window_next,
diff --git a/decoder/ixheaacd_lt_predict.h b/decoder/ixheaacd_lt_predict.h
index 69a2a39..4c60cfb 100644
--- a/decoder/ixheaacd_lt_predict.h
+++ b/decoder/ixheaacd_lt_predict.h
@@ -17,9 +17,8 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-
-#ifndef _LT_PREDICT_
-#define _LT_PREDICT_
+#ifndef IXHEAACD_LT_PREDICT_H
+#define IXHEAACD_LT_PREDICT_H
#define MAX_SFB 51
#define MAX_LTP_SFB 40
@@ -46,7 +45,7 @@ typedef struct {
VOID ixheaacd_init_ltp_object(ltp_info *ltp);
-VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, void *time, WORD32 *overlap,
+VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time, WORD32 *overlap,
WORD32 frame_len, WORD32 object_type,
WORD32 stride, WORD16 window_sequence,
WORD16 *p_window_next, WORD slot_element);
@@ -57,4 +56,4 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
WORD32 *out_mdct, UWORD32 object_type,
UWORD32 frame_len);
-#endif
+#endif /* IXHEAACD_LT_PREDICT_H */
diff --git a/decoder/ixheaacd_main.h b/decoder/ixheaacd_main.h
index fe6355b..78a0602 100644
--- a/decoder/ixheaacd_main.h
+++ b/decoder/ixheaacd_main.h
@@ -61,11 +61,13 @@ typedef struct ia_usac_lpd_decoder {
FLOAT32 fd_synth_buf[3 * LEN_FRAME + 1 + ORDER];
FLOAT32 *fd_synth;
WORD32 bpf_active_prev;
-
+ WORD32 last_tcx_pitch;
+ FLOAT32 synth_prev_ec[ORDER];
} ia_usac_lpd_decoder, *ia_usac_lpd_decoder_handle;
typedef struct ia_usac_data_main_struct {
FLOAT32 time_sample_vector[MAX_NUM_CHANNELS][4096];
+ FLOAT32 time_sample_vector_prev[MAX_NUM_CHANNELS][4096];
WORD32 input_data_ptr[MAX_NUM_CHANNELS][4096];
WORD32 overlap_data_ptr[MAX_NUM_CHANNELS][4096];
WORD32 output_data_ptr[MAX_NUM_CHANNELS][4096];
@@ -112,7 +114,7 @@ typedef struct ia_usac_data_main_struct {
WORD32 *coef_fix[MAX_NUM_CHANNELS];
FLOAT32 *coef[MAX_NUM_CHANNELS];
UWORD8 *ms_used[MAX_NUM_CHANNELS];
- WORD32 *coef_save[chans];
+ WORD32 *coef_save[MAX_NUM_CHANNELS];
WORD16 *factors[MAX_NUM_CHANNELS];
UWORD8 *group_dis[MAX_NUM_CHANNELS];
@@ -170,7 +172,7 @@ typedef struct ia_usac_data_main_struct {
WORD32 arr_coef_fix[MAX_NUM_CHANNELS][(LN2 + LN2 / 8)];
FLOAT32 arr_coef[MAX_NUM_CHANNELS][(LN2 + LN2 / 8)];
- WORD32 arr_coef_save[chans][(LN2 + LN2 / 8)];
+ WORD32 arr_coef_save[MAX_NUM_CHANNELS][(LN2 + LN2 / 8)];
WORD16 arr_factors[MAX_NUM_CHANNELS][MAXBANDS];
UWORD8 arr_group_dis[MAX_NUM_CHANNELS][NSHORT];
WORD32 arr_tw_ratio[MAX_NUM_CHANNELS][NUM_TW_NODES];
@@ -178,6 +180,48 @@ typedef struct ia_usac_data_main_struct {
ia_usac_lpd_decoder arr_str_tddec[MAX_NUM_CHANNELS];
ia_tns_frame_info_struct arr_str_tns[MAX_NUM_CHANNELS];
+ WORD32 enh_sbr;
+ WORD32 esbr_hq;
+ WORD32 enh_sbr_ps;
+ WORD32 drc_config_changed;
+ WORD32 core_mode;
+ WORD32 frame_ok;
+ WORD32 sbr_parse_err_flag;
+ WORD32 last_frame_ok;
+ WORD32 ec_flag;
+ WORD32 first_frame;
+ WORD32 sbr_parse_complete;
+ UWORD8 max_sfb[2];
+ WORD32 num_ch_out;
+ WORD16 spec_scale[MAX_NUM_CHANNELS][128];
+ ia_ec_state_str str_error_concealment[MAX_NUM_CHANNELS];
+ ia_td_frame_data_struct *pstr_td_frame;
+ WORD32 sampling_rate;
+ WORD32 td_frame_prev_ec[MAX_NUM_CHANNELS];
+ FLOAT32 lsp_coeff[5][ORDER];
+ FLOAT32 lsf_adaptive_mean_cand[ORDER];
+ FLOAT32 lsf_adaptive_mean[ORDER];
+ FLOAT32 lpc4_lsf[ORDER];
+ WORD32 bpf_control_info;
+ WORD32 first_lpd_flag;
+ WORD32 short_fac_flag;
+ WORD32 core_mode_last;
+ FLOAT32 stability_factor_old;
+ WORD32 num_lost_lpd_frames[MAX_NUM_CHANNELS];
+ WORD32 pitch_lag_old;
+ WORD32 pitch_lag_frac_old;
+ WORD32 pitch_lag;
+ WORD32 pitch_lag_frac;
+ WORD16 seed_ace;
+ ia_ec_state_str *pstr_ec_state;
+ FLOAT32 past_pitch_gain;
+ FLOAT32 past_gain_code;
+ FLOAT32 past_gain_tcx[MAX_NUM_CHANNELS];
+ WORD32 tcx_spec_coeffs[MAX_NUM_CHANNELS][1280];
+ FLOAT32 lspold_ec[ORDER];
+ FLOAT32 lp_flt_coff_a_ec[ORDER + 1];
+ ia_td_frame_data_struct td_frame_data_prev[MAX_NUM_CHANNELS];
+ WORD32 last_shiftp;
} ia_usac_data_struct;
IA_ERRORCODE ixheaacd_tns_apply(ia_usac_data_struct *usac_data, WORD32 *spec,
@@ -205,21 +249,19 @@ WORD32 ixheaacd_tw_frame_dec(ia_usac_data_struct *usac_data, WORD32 i_ch,
WORD32 ixheaacd_fd_frm_dec(ia_usac_data_struct *usac_data, WORD32 i_ch);
-WORD32 ixheaacd_acelp_mdct(WORD32 *ptr_in, WORD32 *ptr_out, WORD32 *preshift,
- WORD32 length, WORD32 *ptr_scratch);
+VOID ixheaacd_acelp_mdct(WORD32 *ptr_in, WORD32 *ptr_out, WORD32 *preshift, WORD32 length,
+ WORD32 *ptr_scratch);
-WORD32 ixheaacd_acelp_mdct_main(ia_usac_data_struct *usac_data, WORD32 *x,
- WORD32 *y, WORD32 l, WORD32 m,
- WORD32 *preshift);
+VOID ixheaacd_acelp_mdct_main(ia_usac_data_struct *usac_data, WORD32 *x, WORD32 *y, WORD32 l,
+ WORD32 m, WORD32 *preshift);
-WORD32 ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len_subfr, WORD32 lfac,
- WORD32 *iaq, WORD32 *izir, WORD32 *ifacdec,
- WORD8 *qshift1, WORD8 qshift2, WORD8 qshift3,
- WORD32 *preshift, WORD32 *ptr_scratch);
+VOID ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len_subfr, WORD32 lfac, WORD32 *iaq,
+ WORD32 *izir, WORD32 *ifacdec, WORD8 *qshift1, WORD8 qshift2,
+ WORD8 qshift3, WORD32 *preshift, WORD32 *ptr_scratch);
-WORD32 ixheaacd_fwd_alias_cancel_tool(
- ia_usac_data_struct *usac_data, ia_td_frame_data_struct *pstr_td_frame_data,
- WORD32 fac_length, FLOAT32 *iaq, WORD32 gain);
+VOID ixheaacd_fwd_alias_cancel_tool(ia_usac_data_struct *usac_data,
+ ia_td_frame_data_struct *pstr_td_frame_data,
+ WORD32 fac_length, FLOAT32 *iaq, WORD32 gain);
WORD32 ixheaacd_lpd_bpf_fix(ia_usac_data_struct *usac_data, WORD32 is_short,
FLOAT32 out_buffer[],
@@ -229,4 +271,6 @@ VOID ixheaacd_reset_acelp_data_fix(ia_usac_data_struct *usac_data,
ia_usac_lpd_decoder_handle st,
WORD32 *ptr_ola_buff, WORD32 last_was_short,
WORD32 tw_mdct);
+
+FLOAT32 ixheaacd_randomsign(UWORD32 *seed);
#endif
diff --git a/decoder/ixheaacd_memory_standards.h b/decoder/ixheaacd_memory_standards.h
index 2494751..bcd8726 100644
--- a/decoder/ixheaacd_memory_standards.h
+++ b/decoder/ixheaacd_memory_standards.h
@@ -33,6 +33,13 @@ typedef struct {
UWORD32 ui_placed[2]; /* the o_red location for placement */
} ia_mem_info_struct;
+typedef struct {
+ WORD8 *p_lib_name;
+ WORD8 *p_version_num;
+} ia_lib_info_struct;
+
+VOID ixheaacd_get_lib_id_strings(pVOID pv_output);
+
/*****************************************************************************/
/* Constant hash defines */
/*****************************************************************************/
diff --git a/decoder/ixheaacd_mps_aac_struct.h b/decoder/ixheaacd_mps_aac_struct.h
new file mode 100644
index 0000000..aeed275
--- /dev/null
+++ b/decoder/ixheaacd_mps_aac_struct.h
@@ -0,0 +1,94 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_AAC_STRUCT_H
+#define IXHEAACD_MPS_AAC_STRUCT_H
+
+#include "ixheaacd_defines.h"
+
+#define PNS_BAND_FLAGS_SIZE 16
+#define MAX_WINDOWS 8
+#define MAX_SFB_SHORT 16
+#define MAXIMUM_LINES 4
+
+typedef struct {
+ WORD16 a_scale_factor[MAX_WINDOWS * MAX_SFB_SHORT];
+ WORD8 a_code_book[MAX_WINDOWS * MAX_SFB_SHORT];
+} ia_mps_dec_residual_dynamic_data_struct;
+
+typedef struct {
+ WORD16 window_sequence;
+ WORD16 max_sf_bands;
+ WORD16 total_sf_bands;
+ WORD16 sampling_rate_index;
+ WORD16 window_groups;
+ WORD8 window_group_length[8];
+ WORD16 frame_length;
+
+} ia_mps_dec_residual_ics_info_struct;
+
+typedef struct {
+ WORD16 start_band;
+ WORD16 stop_band;
+ WORD8 direction;
+ WORD8 resolution;
+ WORD8 order;
+ WORD8 coeff[MAX_ORDER];
+} ia_mps_dec_residual_filter_struct;
+
+typedef struct {
+ FLAG tns_data_present;
+ WORD8 number_of_filters[MAX_WINDOWS];
+ ia_mps_dec_residual_filter_struct filter[MAX_WINDOWS][MAX_FILTERS];
+} ia_mps_dec_residual_tns_data;
+
+typedef struct {
+ FLAG pulse_data_present;
+ WORD16 number_pulse;
+ WORD16 pulse_start_band;
+ WORD8 pulse_offset[MAXIMUM_LINES];
+ WORD8 pulse_amp[MAXIMUM_LINES];
+} ia_mps_dec_residual_pulse_data_struct;
+
+typedef struct {
+ UWORD8 pns_used[PNS_BAND_FLAGS_SIZE * 8];
+ WORD16 current_energy;
+ UWORD16 pns_active;
+} ia_mps_dec_residual_pns_data_struct;
+
+typedef struct {
+ WORD16 *p_scale_factor;
+ WORD8 *p_code_book;
+ WORD32 *p_spectral_coefficient;
+ ia_mps_dec_residual_ics_info_struct ics_info;
+ ia_mps_dec_residual_tns_data tns_data;
+ ia_mps_dec_residual_pulse_data_struct pulse_data;
+ ia_mps_dec_residual_pns_data_struct pns_data;
+ WORD16 common_window;
+ WORD16 global_gain;
+ WORD32 *p_tns_scratch;
+} ia_mps_dec_residual_channel_info_struct;
+
+typedef struct {
+ WORD16 sfb_long_idx[52];
+ WORD16 sfb_short_idx[16];
+
+} ia_mps_dec_residual_sfband_info_struct;
+
+#endif /* IXHEAACD_MPS_AAC_STRUCT_H */
diff --git a/decoder/ixheaacd_mps_apply_common.c b/decoder/ixheaacd_mps_apply_common.c
new file mode 100644
index 0000000..130e7c7
--- /dev/null
+++ b/decoder/ixheaacd_mps_apply_common.c
@@ -0,0 +1,112 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+
+VOID ixheaacd_dec_interp_umx(WORD32 m[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS], WORD32 *ptr_r,
+ WORD32 *ptr_m_prev, ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ts, ps = 0, pb;
+ WORD32 *r_out;
+ const WORD32 *reciprocal_tab = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
+
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+
+ WORD32 prev_slot = -1;
+ WORD32 *prm_slot = pstr_mps_state->aux_struct->param_slot;
+ WORD32 curr_slot = *prm_slot;
+
+ WORD32 temp = reciprocal_tab[curr_slot];
+ r_out = ptr_r;
+
+ for (ts = prev_slot + 1; ts <= curr_slot; ts++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 alpha = temp * (ts + 1);
+ WORD32 one_minus_alpha;
+ WORD64 result;
+
+ one_minus_alpha = (ONE_IN_Q28 - alpha);
+
+ result = ((WORD64)(*ptr_m_prev) * (WORD64)one_minus_alpha);
+ result += ((WORD64)(m[ps][pb]) * (WORD64)alpha);
+
+ *r_out++ = (WORD32)((WORD64)result >> 28);
+ ptr_m_prev++;
+ }
+ ptr_m_prev -= num_parameter_bands;
+ }
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 prev_slot = prm_slot[ps - 1];
+ WORD32 curr_slot = prm_slot[ps];
+
+ temp = reciprocal_tab[curr_slot - prev_slot - 1];
+
+ for (ts = (prev_slot) + 1; ts <= (curr_slot); ts++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 alpha = (ts - prev_slot) * temp;
+ WORD64 result;
+ WORD32 one_minus_alpha;
+ one_minus_alpha = (ONE_IN_Q28 - alpha);
+
+ result = ((WORD64)(m[ps - 1][pb]) * (WORD64)one_minus_alpha);
+ result += ((WORD64)(m[ps][pb]) * (WORD64)alpha);
+
+ *r_out++ = (WORD32)((WORD64)result >> 28);
+ }
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_apply_abs_kernels(WORD32 *ptr_r_in, WORD32 *ptr_r_out, SIZE_T *ptr_params) {
+ WORD32 ts, qb;
+ SIZE_T *idx_ptr = (SIZE_T *)ptr_params[0];
+ WORD32 time_slots = (WORD32)ptr_params[1];
+ WORD32 num_parameter_bands = (WORD32)ptr_params[2];
+ WORD32 hybrid_bands = (WORD32)ptr_params[3];
+
+ for (ts = 0; ts < time_slots; ts++) {
+ SIZE_T *idx = idx_ptr;
+ for (qb = 0; qb < hybrid_bands; qb++) {
+ WORD32 idx_v = (WORD32)(*idx);
+ *ptr_r_out++ = *(ptr_r_in + idx_v);
+ idx++;
+ }
+ ptr_r_in += num_parameter_bands;
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_apply_common.h b/decoder/ixheaacd_mps_apply_common.h
new file mode 100644
index 0000000..c8d7d57
--- /dev/null
+++ b/decoder/ixheaacd_mps_apply_common.h
@@ -0,0 +1,28 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_APPLY_COMMON_H
+#define IXHEAACD_MPS_APPLY_COMMON_H
+
+VOID ixheaacd_dec_interp_umx(WORD32 m[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS], WORD32 *ptr_r,
+ WORD32 *ptr_m_prev, ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_apply_abs_kernels(WORD32 *ptr_r_in, WORD32 *ptr_r_out, SIZE_T *ptr_params);
+
+#endif /* IXHEAACD_MPS_APPLY_COMMON_H */
diff --git a/decoder/ixheaacd_mps_apply_m1.c b/decoder/ixheaacd_mps_apply_m1.c
new file mode 100644
index 0000000..e4d5e0d
--- /dev/null
+++ b/decoder/ixheaacd_mps_apply_m1.c
@@ -0,0 +1,258 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_apply_common.h"
+#include "ixheaacd_mps_basic_op.h"
+
+VOID ixheaacd_mps_apply_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ ia_mps_dec_m1_param_struct *m1_param = p_array_struct->m1_param;
+ WORD32 ts, qs, row, col;
+ WORD32 temp_1, temp_2;
+ WORD32 *rout_real_ptr, *rout_imag_ptr, *rout_kernel_real_ptr, *rout_kernel_imag_ptr;
+ WORD32 *v_real, *v_imag, *x_real, *x_imag;
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_v_real, *p_v_imag;
+
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 *m1_param_real_prev = curr_state->mps_persistent_mem.m1_param_real_prev;
+ WORD32 *m1_param_imag_prev = curr_state->mps_persistent_mem.m1_param_imag_prev;
+ WORD32 imag_present = curr_state->m1_param_imag_present;
+ WORD32 v_channels = curr_state->num_v_channels;
+ WORD32 x_channels = curr_state->num_x_channels;
+ WORD32 hybrid_bands = curr_state->hybrid_bands;
+ WORD32 num_parameter_bands = curr_state->num_parameter_bands;
+ WORD32 *index = curr_state->index;
+
+ WORD32 *p_x_re, *p_x_im;
+
+ WORD32 hyb_bands = hybrid_bands;
+ WORD32 time_slots = curr_state->time_slots;
+ SIZE_T params[4];
+
+ params[0] = (SIZE_T)(&curr_state->kernels[0]);
+ params[1] = time_slots;
+ params[2] = num_parameter_bands;
+ params[3] = hybrid_bands;
+
+ rout_real_ptr = pstr_mps_state->mps_scratch_mem_v;
+ rout_kernel_real_ptr = rout_real_ptr + TSXHB;
+ rout_imag_ptr = rout_kernel_real_ptr + TSXHB;
+ rout_kernel_imag_ptr = rout_imag_ptr + TSXHB;
+
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (row = 0; row < v_channels; row++) {
+ v_real = p_buffer_real;
+ v_imag = p_buffer_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ memset(v_real, 0, hybrid_bands * sizeof(v_real[0]));
+ memset(v_imag, 0, hybrid_bands * sizeof(v_imag[0]));
+
+ v_real += MAX_HYBRID_BANDS;
+ v_imag += MAX_HYBRID_BANDS;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ if (!imag_present) {
+ for (row = 0; row < v_channels; row++) {
+ WORD32 *p_x_real = p_array_struct->x_real;
+ WORD32 *p_x_imag = p_array_struct->x_imag;
+
+ for (col = 0; col < x_channels; col++) {
+ if (pstr_mps_state->m1_param_present[row][col]) {
+ WORD32 idx = index[col];
+
+ ixheaacd_dec_interp_umx(m1_param->m1_param_real[row][col], rout_real_ptr,
+ m1_param_real_prev, pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_real_ptr, rout_kernel_real_ptr, params);
+
+ p_v_real = p_buffer_real;
+ p_v_imag = p_buffer_imag;
+
+ p_x_re = p_x_real;
+ p_x_im = p_x_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ v_real = p_v_real;
+ v_imag = p_v_imag;
+
+ x_real = p_x_re;
+ x_imag = p_x_im;
+
+ for (qs = 0; qs < idx; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
+ *v_real = *v_real + temp_1;
+ v_real++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
+ rout_kernel_real_ptr++;
+ *v_imag = *v_imag + temp_1;
+ v_imag++;
+
+ x_real++;
+ x_imag++;
+ }
+ rout_kernel_real_ptr += hyb_bands - idx;
+
+ p_v_real += MAX_HYBRID_BANDS;
+ p_v_imag += MAX_HYBRID_BANDS;
+
+ p_x_re += MAX_HYBRID_BANDS;
+ p_x_im += MAX_HYBRID_BANDS;
+ }
+
+ m1_param_real_prev += num_parameter_bands;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ } else {
+ m1_param_real_prev += num_parameter_bands;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ }
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ } else {
+ for (row = 0; row < v_channels; row++) {
+ WORD32 *p_x_real = p_array_struct->x_real;
+ WORD32 *p_x_imag = p_array_struct->x_imag;
+
+ for (col = 0; col < x_channels; col++) {
+ if (pstr_mps_state->m1_param_present[row][col]) {
+ WORD32 idx = index[col];
+
+ ixheaacd_dec_interp_umx(m1_param->m1_param_real[row][col], rout_real_ptr,
+ m1_param_real_prev, pstr_mps_state);
+ ixheaacd_dec_interp_umx(m1_param->m1_param_imag[row][col], rout_imag_ptr,
+ m1_param_imag_prev, pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_real_ptr, rout_kernel_real_ptr, params);
+ ixheaacd_apply_abs_kernels(rout_imag_ptr, rout_kernel_imag_ptr, params);
+
+ p_v_real = p_buffer_real;
+ p_v_imag = p_buffer_imag;
+
+ p_x_re = p_x_real;
+ p_x_im = p_x_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ v_real = p_v_real;
+ v_imag = p_v_imag;
+
+ x_real = p_x_re;
+ x_imag = p_x_im;
+ for (qs = 0; qs < 2; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
+ temp_2 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_imag_ptr);
+ temp_1 += temp_2;
+
+ *v_real = *v_real + temp_1;
+ v_real++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
+ rout_kernel_real_ptr++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_imag_ptr);
+ rout_kernel_imag_ptr++;
+ temp_1 -= temp_2;
+
+ *v_imag = *v_imag + temp_1;
+ v_imag++;
+
+ x_real++;
+ x_imag++;
+ }
+ for (; qs < idx; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
+ temp_2 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_imag_ptr);
+ temp_1 -= temp_2;
+
+ *v_real = *v_real + temp_1;
+ v_real++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
+ rout_kernel_real_ptr++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_imag_ptr);
+ rout_kernel_imag_ptr++;
+ temp_1 += temp_2;
+
+ *v_imag = *v_imag + temp_1;
+ v_imag++;
+
+ x_real++;
+ x_imag++;
+ }
+ rout_kernel_real_ptr += hyb_bands - idx;
+ rout_kernel_imag_ptr += hyb_bands - idx;
+
+ p_v_real += MAX_HYBRID_BANDS;
+ p_v_imag += MAX_HYBRID_BANDS;
+
+ p_x_re += MAX_HYBRID_BANDS;
+ p_x_im += MAX_HYBRID_BANDS;
+ }
+
+ m1_param_real_prev += num_parameter_bands;
+ m1_param_imag_prev += num_parameter_bands;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ } else {
+ m1_param_real_prev += num_parameter_bands;
+ m1_param_imag_prev += num_parameter_bands;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ }
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_apply_m2.c b/decoder/ixheaacd_mps_apply_m2.c
new file mode 100644
index 0000000..6c989c3
--- /dev/null
+++ b/decoder/ixheaacd_mps_apply_m2.c
@@ -0,0 +1,497 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_apply_common.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_get_index.h"
+
+VOID ixheaacd_apply_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ts, qs, row, col;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ ia_mps_dec_m2_param_struct *p_m2_param = pstr_mps_state->aux_struct->m2_param;
+
+ WORD32 num_direct_signals = curr_state->num_direct_signals;
+ WORD32 temp_1, loop_counter, col_counter = num_direct_signals + curr_state->num_decor_signals;
+
+ WORD32 *rout_ptr, *rout_kernel_ptr;
+
+ WORD32 *hyb_output_real_dry, *hyb_output_imag_dry, *hyb_output_real_wet, *hyb_output_imag_wet;
+
+ WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag, *p_hyb_out_dry_re, *p_hyb_out_dry_im;
+
+ WORD32 *w_wet_real, *w_wet_imag, *w_dry_real, *w_dry_imag;
+
+ WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
+ WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
+
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
+ WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
+
+ WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
+ WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
+
+ WORD32 idx = 0;
+ WORD32 w_wet_offset = num_direct_signals * TSXHB;
+
+ WORD32 num_output_channels = curr_state->num_output_channels;
+ WORD32 time_slots = curr_state->time_slots;
+ WORD32 hybrid_bands = curr_state->hybrid_bands;
+ WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
+ WORD32 num_parameter_bands = curr_state->num_parameter_bands;
+ WORD32 up_mix_type = curr_state->up_mix_type;
+ WORD32 residual_coding = curr_state->residual_coding;
+ WORD32 *index_ptr = curr_state->index;
+
+ SIZE_T params[4];
+
+ params[0] = (SIZE_T)(&curr_state->kernels[0]);
+ params[1] = time_slots;
+ params[2] = num_parameter_bands;
+ params[3] = hybrid_bands;
+
+ rout_ptr = pstr_mps_state->mps_scratch_mem_v;
+ rout_kernel_ptr = rout_ptr + TSXHB;
+
+ p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
+ p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
+
+ for (row = 0; row < num_output_channels; row++) {
+ hyb_output_real_dry = p_hyb_out_dry_real;
+ hyb_output_imag_dry = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ memset(hyb_output_real_dry, 0, (hybrid_bands) * sizeof(hyb_output_real_dry[0]));
+ memset(hyb_output_imag_dry, 0, (hybrid_bands) * sizeof(hyb_output_imag_dry[0]));
+
+ hyb_output_real_dry += MAX_HYBRID_BANDS;
+ hyb_output_imag_dry += MAX_HYBRID_BANDS;
+ }
+
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+
+ if (residual_coding)
+ loop_counter = col_counter;
+ else
+ loop_counter = num_direct_signals;
+
+ idx = 0;
+
+ p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
+ p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
+
+ for (row = 0; row < num_output_channels; row++) {
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (col = 0; col < num_direct_signals; col++) {
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ if (curr_state->m2_param_present[row][col] & 2) {
+ ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
+ pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ w_dry_real = p_buffer_re;
+ w_dry_imag = p_buffer_im;
+
+ for (qs = 0; qs < hybrid_bands; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ *hyb_output_real_dry = *hyb_output_real_dry + temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry + temp_1;
+ hyb_output_imag_dry++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+ }
+ m2_resid_real_prev += num_parameter_bands;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+
+ for (; col < loop_counter; col++) {
+ WORD32 index;
+ WORD32 res = ixheaacd_get_res_idx(pstr_mps_state, col);
+ index = index_ptr[res];
+
+ if (curr_state->m2_param_present[row][col] & 2) {
+ WORD32 *p_dry_real = p_array_struct->w_dry_real + res * TSXHB;
+ WORD32 *p_dry_imag = p_array_struct->w_dry_imag + res * TSXHB;
+
+ ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
+ pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ w_dry_real = p_dry_real;
+ w_dry_imag = p_dry_imag;
+
+ for (qs = 0; qs < index; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ *hyb_output_real_dry = *hyb_output_real_dry + temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry + temp_1;
+ hyb_output_imag_dry++;
+ }
+ rout_kernel_ptr += hybrid_bands - index;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+
+ p_dry_real += MAX_HYBRID_BANDS;
+ p_dry_imag += MAX_HYBRID_BANDS;
+ }
+ m2_resid_real_prev += num_parameter_bands;
+ }
+ }
+
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+
+ if (up_mix_type == 2) {
+ if (m2_param_imag_present) {
+ if (residual_coding)
+ loop_counter = col_counter;
+ else
+ loop_counter = num_direct_signals;
+
+ idx = 0;
+
+ p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
+ p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
+
+ for (row = 0; row < num_output_channels; row++) {
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (col = 0; col < num_direct_signals; col++) {
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ if (curr_state->m2_param_present[row][col] & 2) {
+ ixheaacd_dec_interp_umx(p_m2_param->m2_resid_imag[idx++], rout_ptr,
+ m2_resid_imag_prev, pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ w_dry_real = p_buffer_re;
+ w_dry_imag = p_buffer_im;
+
+ for (qs = 0; qs < 2; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ *hyb_output_real_dry = *hyb_output_real_dry + temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry - temp_1;
+ hyb_output_imag_dry++;
+ }
+
+ for (; qs < hybrid_bands; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ *hyb_output_real_dry = *hyb_output_real_dry - temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry + temp_1;
+ hyb_output_imag_dry++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+ }
+ m2_resid_imag_prev += num_parameter_bands;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+
+ for (; col < loop_counter; col++) {
+ WORD32 index;
+ WORD32 res = ixheaacd_get_res_idx(pstr_mps_state, col);
+ index = index_ptr[res];
+
+ if (curr_state->m2_param_present[row][col] & 2) {
+ WORD32 *p_dry_real = p_array_struct->w_dry_real + res * TSXHB;
+ WORD32 *p_dry_imag = p_array_struct->w_dry_imag + res * TSXHB;
+ ixheaacd_dec_interp_umx(p_m2_param->m2_resid_imag[idx++], rout_ptr,
+ m2_resid_imag_prev, pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ w_dry_real = p_dry_real;
+ w_dry_imag = p_dry_imag;
+
+ for (qs = 0; qs < 2; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ *hyb_output_real_dry = *hyb_output_real_dry + temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry - temp_1;
+ hyb_output_imag_dry++;
+ }
+
+ for (; qs < index; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
+ w_dry_imag++;
+ *hyb_output_real_dry = *hyb_output_real_dry - temp_1;
+ hyb_output_real_dry++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
+ w_dry_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_dry = *hyb_output_imag_dry + temp_1;
+ hyb_output_imag_dry++;
+ }
+ rout_kernel_ptr += hybrid_bands - index;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+
+ p_dry_real += MAX_HYBRID_BANDS;
+ p_dry_imag += MAX_HYBRID_BANDS;
+ }
+ m2_resid_imag_prev += num_parameter_bands;
+ }
+ }
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+ }
+ }
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (row = 0; row < num_output_channels; row++) {
+ hyb_output_real_wet = p_buffer_real;
+ hyb_output_imag_wet = p_buffer_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ memset(hyb_output_real_wet, 0, (hybrid_bands) * sizeof(*hyb_output_real_wet));
+ memset(hyb_output_imag_wet, 0, (hybrid_bands) * sizeof(*hyb_output_imag_wet));
+
+ hyb_output_real_wet += MAX_HYBRID_BANDS;
+ hyb_output_imag_wet += MAX_HYBRID_BANDS;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ idx = 0;
+
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (row = 0; row < num_output_channels; row++) {
+ p_buf_real = p_array_struct->buffer_real + w_wet_offset;
+ p_buf_imag = p_array_struct->buffer_imag + w_wet_offset;
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 1) {
+ ixheaacd_dec_interp_umx(p_m2_param->m2_decor_real[idx++], rout_ptr, m2_decor_real_prev,
+ pstr_mps_state);
+
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_wet = p_buffer_re;
+ hyb_output_imag_wet = p_buffer_im;
+
+ w_wet_real = p_buf_re;
+ w_wet_imag = p_buf_im;
+
+ for (qs = 0; qs < hybrid_bands; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
+ w_wet_real++;
+ *hyb_output_real_wet = *hyb_output_real_wet + temp_1;
+ hyb_output_real_wet++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
+ w_wet_imag++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_wet = *hyb_output_imag_wet + temp_1;
+ hyb_output_imag_wet++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_buf_re += MAX_HYBRID_BANDS;
+ p_buf_im += MAX_HYBRID_BANDS;
+ }
+ m2_decor_real_prev += num_parameter_bands;
+ }
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+
+ if (up_mix_type == 2) {
+ if (m2_param_imag_present) {
+ idx = 0;
+
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ for (row = 0; row < num_output_channels; row++) {
+ m2_decor_imag_prev += num_parameter_bands * num_direct_signals;
+ p_buf_real = p_array_struct->buffer_real + w_wet_offset;
+ p_buf_imag = p_array_struct->buffer_imag + w_wet_offset;
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 1) {
+ ixheaacd_dec_interp_umx(p_m2_param->m2_decor_imag[idx++], rout_ptr,
+ m2_decor_imag_prev, pstr_mps_state);
+ ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
+
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_wet = p_buffer_re;
+ hyb_output_imag_wet = p_buffer_im;
+
+ w_wet_real = p_buf_re;
+ w_wet_imag = p_buf_im;
+
+ for (qs = 0; qs < 2; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
+ w_wet_imag++;
+ *hyb_output_real_wet = *hyb_output_real_wet + temp_1;
+ hyb_output_real_wet++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
+ w_wet_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_wet = *hyb_output_imag_wet - temp_1;
+ hyb_output_imag_wet++;
+ }
+
+ for (; qs < hybrid_bands; qs++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
+ w_wet_imag++;
+ *hyb_output_real_wet = *hyb_output_real_wet - temp_1;
+ hyb_output_real_wet++;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
+ w_wet_real++;
+ rout_kernel_ptr++;
+ *hyb_output_imag_wet = *hyb_output_imag_wet + temp_1;
+ hyb_output_imag_wet++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_buf_re += MAX_HYBRID_BANDS;
+ p_buf_im += MAX_HYBRID_BANDS;
+ }
+ m2_decor_imag_prev += num_parameter_bands;
+ }
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_basic_op.h b/decoder/ixheaacd_mps_basic_op.h
new file mode 100644
index 0000000..65987b0
--- /dev/null
+++ b/decoder/ixheaacd_mps_basic_op.h
@@ -0,0 +1,393 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_BASIC_OP_H
+#define IXHEAACD_MPS_BASIC_OP_H
+
+#define NORM32 (0x40000000)
+#define INV_SQRT_2_Q31 (1518500250)
+#define Q_SQRT_TAB (15)
+#define LOG2XQ17 (5171707904LL)
+#define LOG_COEFF1 (27890)
+#define LOG_COEFF2 (16262)
+#define LOG_COEFF3 (7574)
+#define LOG_COEFF4 (1786)
+
+#define TRIG_TABLE_CONV_FAC 326
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
+ WORD32 temp_1, temp_2;
+ temp_1 = (WORD32)(a >> 32);
+ temp_2 = ixheaacd_norm32(temp_1);
+ if (temp_2 < 31) {
+ return (32 - temp_2);
+ } else {
+ temp_2 = (WORD32)(a);
+ if ((temp_1 ^ temp_2) < 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
+ WORD32 x;
+ x = ixheaacd_mps_get_rshift_bits(a);
+ *qfac = 20 - x;
+ return (WORD32)((WORD64)a >> x);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
+ WORD32 index, answer, temp;
+ WORD k;
+
+ if (num == 0) return 0;
+
+ k = ixheaacd_norm32(num);
+ temp = ixheaacd_shr32(ixheaacd_shl32(num, k), 21);
+ *q += k;
+ index = temp & 0x1FF;
+ answer = sqrt_tab[index];
+ if (*q & 1) {
+ *q -= 1;
+ answer = ixheaacd_mult32_shl(answer, INV_SQRT_2_Q31);
+ }
+ *q = *q >> 1;
+ *q += Q_SQRT_TAB;
+ return answer;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_reshape_add32(WORD32 op1, WORD32 op2, WORD16 *qop1,
+ WORD16 qop2) {
+ WORD64 tempresult;
+ if (0 == op2) {
+ return op1;
+ }
+ if (0 == op1) {
+ *qop1 = qop2;
+ return op2;
+ }
+ if (*qop1 < qop2) {
+ if ((qop2 - *qop1) > 31)
+ op2 = 0;
+ else
+ op2 = op2 >> (qop2 - *qop1);
+ tempresult = (WORD64)op1 + (WORD64)op2;
+ } else {
+ if ((*qop1 - qop2) > 31)
+ op1 = 0;
+ else
+ op1 = op1 >> (*qop1 - qop2);
+ *qop1 = qop2;
+ tempresult = (WORD64)op1 + (WORD64)op2;
+ }
+ if (tempresult > (WORD32)0x7fffffff || tempresult < (WORD32)0x80000000) {
+ tempresult = tempresult >> 1;
+ *qop1 -= 1;
+ }
+ return (WORD32)tempresult;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
+ WORD64 temp_result;
+
+ if (a == 0 || b == 0) {
+ if (b == 0) {
+ return a;
+ } else {
+ *q_a = q_b;
+ return b;
+ }
+ }
+ if (*q_a > q_b) {
+ if (((*q_a) - q_b) > 31) {
+ a = 0;
+ *q_a = q_b;
+ } else {
+ a = (a >> ((*q_a) - q_b));
+ *q_a = q_b;
+ }
+ } else {
+ if ((q_b - (*q_a)) > 31) {
+ b = 0;
+ } else {
+ b = (b >> (q_b - (*q_a)));
+ q_b = *q_a;
+ }
+ }
+ temp_result = (WORD64)a + (WORD64)b;
+ if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
+ temp_result = temp_result >> 1;
+ *q_a -= 1;
+ }
+
+ return (WORD32)temp_result;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
+ WORD64 temp_result;
+ WORD32 temp;
+
+ if (a == 0 || b == 0) {
+ temp_result = 0;
+ *q_a = 15;
+ return (WORD32)temp_result;
+ }
+
+ *q_a = *q_a + q_b;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ temp = ixheaacd_mps_get_rshift_bits(temp_result);
+ if (0 != temp) {
+ *q_a -= temp;
+ temp_result = temp_result >> temp;
+ }
+
+ return (WORD32)temp_result;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x32(WORD32 a, WORD32 b, WORD16 *q_a,
+ WORD16 q_b) {
+ WORD64 temp_result;
+ if (a == 0 || b == 0) {
+ temp_result = 0;
+ *q_a = 15;
+ return (WORD32)temp_result;
+ }
+ *q_a = *q_a + q_b;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ while (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
+ temp_result = temp_result >> 1;
+ *q_a -= 1;
+ }
+
+ return (WORD32)temp_result;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
+ WORD32 result;
+ WORD64 temp_result;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> n);
+
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> 30);
+
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_16(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> 16);
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> 16);
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> 15);
+
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_14(WORD32 a, WORD32 b) {
+ WORD32 result;
+ WORD64 temp_result;
+
+ temp_result = (WORD64)a * (WORD64)b;
+ result = (WORD32)(temp_result >> 16);
+ result = result << 2;
+
+ return (result);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
+ WORD32 quotient;
+ UWORD32 mantissa_nr, mantissa_dr;
+ LOOPINDEX i;
+ WORD q_nr, q_dr;
+
+ quotient = 0;
+
+ if (0 == b) {
+ *q_format = 0;
+ return (a);
+ }
+
+ quotient = 0;
+
+ q_nr = ixheaacd_norm32(a);
+ mantissa_nr = (UWORD32)a << (q_nr);
+ q_dr = ixheaacd_norm32(b);
+ mantissa_dr = (UWORD32)b << (q_dr);
+ *q_format = (WORD)(30 + q_nr - q_dr);
+
+ for (i = 0; i < 31; i++) {
+ quotient <<= 1;
+
+ if (mantissa_nr >= mantissa_dr) {
+ mantissa_nr -= mantissa_dr;
+ quotient += 1;
+ }
+ mantissa_nr <<= 1;
+ }
+
+ if ((a ^ b) < 0) {
+ return -(quotient);
+ }
+
+ return quotient;
+}
+
+static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
+ WORD64 result;
+ if (qtemp == n)
+ return temp;
+ else if (qtemp > n)
+ temp = (WORD32)((WORD64)temp >> (qtemp - n));
+ else {
+ result = (WORD32)((WORD64)temp << (n - qtemp));
+ if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
+ return 0;
+ } else
+ temp = (WORD32)result;
+ }
+ return temp;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_div32_in_q15(WORD32 num, WORD32 den) {
+ WORD32 quotient;
+ WORD16 q_quotient;
+
+ quotient = ixheaacd_mps_div_32(num, den, &q_quotient);
+ quotient = ixheaacd_mps_convert_to_qn(quotient, q_quotient, 15);
+ return quotient;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_log10(WORD32 a, WORD16 q_a) {
+ WORD32 x;
+ WORD16 q_x;
+ WORD32 j, k, temp;
+ WORD16 q_num;
+ q_num = ixheaacd_norm32(a);
+ a = a << q_num;
+ x = ixheaacd_mps_div_32(a, NORM32, &q_x);
+
+ if (q_x > 16)
+ x = x >> (q_x - 16);
+ else
+ x = x << (16 - q_x);
+
+ q_num = 30 - (q_num + q_a);
+
+ j = x - ONE_IN_Q16;
+ k = ixheaacd_mps_mult32_shr_16(SQRT_THREE_Q15, j);
+ temp = ixheaacd_mps_mult32_shr_16(j, j);
+ k -= ixheaacd_mps_mult32_shr_16(LOG_COEFF1, temp);
+ temp = ixheaacd_mps_mult32_shr_16(temp, j);
+ k += ixheaacd_mps_mult32_shr_16(LOG_COEFF2, temp);
+ temp = ixheaacd_mps_mult32_shr_16(temp, j);
+ k -= ixheaacd_mps_mult32_shr_16(LOG_COEFF3, temp);
+ temp = ixheaacd_mps_mult32_shr_16(temp, j);
+ k += ixheaacd_mps_mult32_shr_16(LOG_COEFF4, temp);
+
+ k += (WORD32)(q_num * ((WORD32)LOG2XQ17));
+
+ return (k >> 1);
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_cos(WORD32 a, const WORD32 *cosine_tab) {
+ WORD32 temp_result;
+
+ if (a < 0) {
+ a = -a;
+ }
+
+ a = a % TWO_PI_IN_Q15;
+
+ temp_result = cosine_tab[((a * TRIG_TABLE_CONV_FAC) >> 15)];
+ return temp_result;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_sin(WORD32 a, const WORD32 *sine_tab) {
+ WORD32 temp_result, flag = 0;
+
+ if (a < 0) {
+ a = -a;
+ flag = 1;
+ }
+
+ a = a % TWO_PI_IN_Q15;
+
+ temp_result = sine_tab[((a * TRIG_TABLE_CONV_FAC) >> 15)];
+ if (flag) temp_result = -temp_result;
+
+ return temp_result;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_mps_comp(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
+ if (a == 0 || b == 0) {
+ if (a == 0) {
+ if (b < 0)
+ return 1;
+ else
+ return 0;
+ } else if (b == 0) {
+ if (a > 0)
+ return 1;
+ else
+ return 0;
+ }
+ }
+
+ if (*q_a > q_b) {
+ a = (a >> ((*q_a) - q_b));
+ } else {
+ b = (b >> (q_b - (*q_a)));
+ }
+
+ if (a > b)
+ return 1;
+ else
+ return 0;
+}
+
+#endif /* IXHEAACD_MPS_BASIC_OP_H */
diff --git a/decoder/ixheaacd_mps_bitdec.c b/decoder/ixheaacd_mps_bitdec.c
new file mode 100644
index 0000000..c67d346
--- /dev/null
+++ b/decoder/ixheaacd_mps_bitdec.c
@@ -0,0 +1,2482 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_channel.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_interface.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_nlc_dec.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_res_tns.h"
+#include "ixheaacd_mps_mdct_2_qmf.h"
+#include "ixheaacd_sbr_const.h"
+
+static IA_ERRORCODE ixheaacd_parse_extension_config(
+ ia_mps_spatial_bs_config_struct *config, WORD32 num_ott_boxes, WORD32 num_ttt_boxes,
+ WORD32 num_out_chan, WORD32 bits_available, ia_bit_buf_struct *it_bit_buff,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 i, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits, temp;
+ WORD32 ba = bits_available;
+
+ config->sac_ext_cnt = 0;
+
+ while (ba >= 8) {
+ ba -= 8;
+ temp = ixheaacd_read_bits_buf(it_bit_buff, 8);
+ config->bs_sac_ext_type[config->sac_ext_cnt] = (temp >> 4) & FOUR_BIT_MASK;
+ sac_ext_len = temp & FOUR_BIT_MASK;
+ if (sac_ext_len == 15) {
+ sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 8);
+ ba -= 8;
+ if (sac_ext_len == 15 + 255) {
+ sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 16);
+ ba -= 16;
+ }
+ }
+
+ tmp = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
+ (it_bit_buff->bit_pos + 1));
+
+ switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
+ case EXT_TYPE_0:
+ config->bs_residual_coding = 1;
+ temp = ixheaacd_read_bits_buf(it_bit_buff, 6);
+ config->bs_residual_sampling_freq_index = (temp >> 2) & FOUR_BIT_MASK;
+ config->bs_residual_frames_per_spatial_frame = temp & TWO_BIT_MASK;
+
+ for (i = 0; i < num_ott_boxes + num_ttt_boxes; i++) {
+ config->bs_residual_present[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (config->bs_residual_present[i]) {
+ config->bs_residual_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
+ }
+ }
+ break;
+
+ case EXT_TYPE_1:
+ config->bs_arbitrary_downmix = 2;
+
+ temp = ixheaacd_read_bits_buf(it_bit_buff, 11);
+ config->bs_arbitrary_downmix_residual_sampling_freq_index = (temp >> 7) & FOUR_BIT_MASK;
+ config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
+ (temp >> 5) & TWO_BIT_MASK;
+ config->bs_arbitrary_downmix_residual_bands = temp & FIVE_BIT_MASK;
+
+ break;
+
+ case EXT_TYPE_2:
+ config->arbitrary_tree = 1;
+ config->num_out_chan_at = 0;
+ config->num_ott_boxes_at = 0;
+ for (ch = 0; ch < num_out_chan; ch++) {
+ tmp_open = 1;
+ idx = 0;
+ while (tmp_open > 0) {
+ config->bs_ott_box_present_at[ch][idx] = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (config->bs_ott_box_present_at[ch][idx]) {
+ config->num_ott_boxes_at++;
+ tmp_open++;
+ } else {
+ config->num_out_chan_at++;
+ tmp_open--;
+ }
+ if (config->num_ott_boxes_at >= 56) return IA_FATAL_ERROR;
+ idx++;
+ if (idx >= MAX_ARBITRARY_TREE_INDEX) return IA_FATAL_ERROR;
+ }
+ }
+
+ for (i = 0; i < config->num_ott_boxes_at; i++) {
+ temp = ixheaacd_read_bits_buf(it_bit_buff, 2);
+ config->bs_ott_default_cld_at[i] = (temp >> 1) & ONE_BIT_MASK;
+ config->bs_ott_mode_lfe_at[i] = temp & ONE_BIT_MASK;
+ if (config->bs_ott_mode_lfe_at[i]) {
+ config->bs_ott_bands_at[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
+ if (config->bs_ott_bands_at[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
+ } else {
+ config->bs_ott_bands_at[i] =
+ ixheaacd_mps_dec_bitdec_tables->freq_res_table[config->bs_freq_res];
+ }
+ }
+
+ for (i = 0; i < config->num_out_chan_at; i++) {
+ config->bs_output_channel_pos_at[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
+ }
+
+ break;
+
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE;
+ }
+
+ bits_read = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
+ (it_bit_buff->bit_pos + 1) - tmp);
+ n_fill_bits = 8 * sac_ext_len - bits_read;
+
+ while (n_fill_bits > 7) {
+ ixheaacd_read_bits_buf(it_bit_buff, 8);
+ n_fill_bits -= 8;
+ }
+ if (n_fill_bits > 0) {
+ ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
+ }
+
+ ba -= 8 * sac_ext_len;
+ config->sac_ext_cnt++;
+ if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) {
+ return IA_FATAL_ERROR;
+ }
+ }
+
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_parse_specific_config(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 sac_header_len) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ const ia_mps_dec_tree_properties_struct *p_tree_property_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->tree_property_table;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ WORD32 i, hc, hb, num_header_bits, ott_mode_lfe[MAX_NUM_OTT];
+
+ WORD32 tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
+ (mps_bit_buf->bit_pos + 1));
+ WORD32 bits_available = (sac_header_len << 3);
+ WORD32 temp, alignment_bits = 0;
+
+ config->bs_sampling_freq_index = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ if (config->bs_sampling_freq_index == 15) {
+ config->bs_sampling_frequency = ixheaacd_read_bits_buf(mps_bit_buf, 24);
+ }
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 14);
+ config->bs_frame_length = (temp >> 7) & SEVEN_BIT_MASK;
+ if (config->bs_frame_length >= (MAX_QMF_BUF_LEN - 1)) {
+ return IA_FATAL_ERROR;
+ }
+ config->bs_freq_res = (temp >> 4) & THREE_BIT_MASK;
+ if (config->bs_freq_res == 0) {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS;
+ }
+ config->bs_tree_config = (temp)&FOUR_BIT_MASK;
+
+ if (config->bs_tree_config >= 7) {
+ return IA_FATAL_ERROR;
+ }
+
+ if (config->bs_tree_config != 15) {
+ curr_state->num_ott_boxes = p_tree_property_table[config->bs_tree_config].num_ott_boxes;
+ curr_state->num_ttt_boxes = p_tree_property_table[config->bs_tree_config].num_ttt_boxes;
+ curr_state->num_input_channels =
+ p_tree_property_table[config->bs_tree_config].num_input_channels;
+ curr_state->num_output_channels =
+ p_tree_property_table[config->bs_tree_config].num_output_channels;
+ for (i = 0; i < MAX_NUM_OTT; i++) {
+ ott_mode_lfe[i] = p_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
+ }
+ }
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 19);
+ config->bs_quant_mode = (temp >> 17) & TWO_BIT_MASK;
+ config->bs_one_icc = (temp >> 16) & ONE_BIT_MASK;
+ config->bs_arbitrary_downmix = (temp >> 15) & ONE_BIT_MASK;
+ config->bs_fixed_gain_sur = (temp >> 12) & THREE_BIT_MASK;
+ if (config->bs_fixed_gain_sur >= 5) {
+ return IA_FATAL_ERROR;
+ }
+ config->bs_fixed_gain_lfe = (temp >> 9) & THREE_BIT_MASK;
+
+ if (config->bs_fixed_gain_lfe >= 5) return IA_FATAL_ERROR;
+ config->bs_fixed_gain_dmx = (temp >> 6) & THREE_BIT_MASK;
+ config->bs_matrix_mode = (temp >> 5) & ONE_BIT_MASK;
+ config->bs_temp_shape_config = (temp >> 3) & TWO_BIT_MASK;
+ config->bs_decorr_config = (temp >> 1) & TWO_BIT_MASK;
+ config->bs_3d_audio_mode = (temp)&ONE_BIT_MASK;
+
+ for (i = 0; i < curr_state->num_ott_boxes; i++) {
+ if (ott_mode_lfe[i]) {
+ config->bs_ott_bands[i] = ixheaacd_read_bits_buf(mps_bit_buf, 5);
+ if (config->bs_ott_bands[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
+ }
+ }
+
+ for (i = 0; i < curr_state->num_ttt_boxes; i++) {
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ config->bs_ttt_dual_mode[i] = (temp >> 3) & ONE_BIT_MASK;
+ config->bs_ttt_mode_low[i] = (temp)&THREE_BIT_MASK;
+ if (config->bs_ttt_dual_mode[i]) {
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 8);
+ config->bs_ttt_mode_high[i] = (temp >> 5) & THREE_BIT_MASK;
+ config->bs_ttt_bands_low[i] = (temp)&FIVE_BIT_MASK;
+ if (config->bs_ttt_bands_low[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
+ }
+ }
+
+ if (config->bs_temp_shape_config == 2) {
+ config->bs_env_quant_mode = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ }
+
+ if (config->bs_3d_audio_mode) {
+ config->bs_3d_audio_hrtf_set = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ if (config->bs_3d_audio_hrtf_set == 0) {
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ config->bs_hrtf_freq_res = (temp >> 1) & THREE_BIT_MASK;
+ config->bs_hrtf_num_chan = 5;
+ config->bs_hrtf_asymmetric = (temp)&ONE_BIT_MASK;
+
+ config->hrtf_num_band = pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr
+ ->freq_res_table[config->bs_hrtf_freq_res];
+
+ for (hc = 0; hc < config->bs_hrtf_num_chan; hc++) {
+ for (hb = 0; hb < config->hrtf_num_band; hb++) {
+ config->bs_hrtf_level_left[hc][hb] = ixheaacd_read_bits_buf(mps_bit_buf, 6);
+ }
+ for (hb = 0; hb < config->hrtf_num_band; hb++) {
+ config->bs_hrtf_level_right[hc][hb] = config->bs_hrtf_asymmetric
+ ? ixheaacd_read_bits_buf(mps_bit_buf, 6)
+ : config->bs_hrtf_level_left[hc][hb];
+ }
+ config->bs_hrtf_phase[hc] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ for (hb = 0; hb < config->hrtf_num_band; hb++) {
+ config->bs_hrtf_phase_lr[hc][hb] =
+ config->bs_hrtf_phase[hc] ? ixheaacd_read_bits_buf(mps_bit_buf, 6) : 0;
+ }
+ }
+ }
+ }
+
+ ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
+
+ num_header_bits =
+ (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
+ (mps_bit_buf->bit_pos + 1) - tmp);
+ bits_available -= num_header_bits;
+
+ err_code = ixheaacd_parse_extension_config(
+ config, curr_state->num_ott_boxes, curr_state->num_ttt_boxes,
+ curr_state->num_output_channels, bits_available, mps_bit_buf,
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_default_specific_config(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 sampling_freq) {
+ ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ const ia_mps_dec_tree_properties_struct *p_tree_property_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->tree_property_table;
+ WORD32 i, ott_mode_lfe[MAX_NUM_OTT];
+
+ config->bs_sampling_freq_index = 15;
+ for (i = 0; i < 15; i++) {
+ if (sampling_freq ==
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->sampling_freq_table[i]) {
+ config->bs_sampling_freq_index = i;
+ }
+ }
+ if (config->bs_sampling_freq_index == 15) {
+ config->bs_sampling_frequency = sampling_freq;
+ }
+ config->bs_frame_length = 31;
+ config->bs_freq_res = 1;
+ config->bs_tree_config = 2;
+ if (config->bs_tree_config > 5) return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
+ if (config->bs_tree_config != 15) {
+ curr_state->num_ott_boxes = p_tree_property_table[config->bs_tree_config].num_ott_boxes;
+ curr_state->num_ttt_boxes = p_tree_property_table[config->bs_tree_config].num_ttt_boxes;
+ curr_state->num_input_channels =
+ p_tree_property_table[config->bs_tree_config].num_input_channels;
+ curr_state->num_output_channels =
+ p_tree_property_table[config->bs_tree_config].num_output_channels;
+ memcpy(ott_mode_lfe, p_tree_property_table[config->bs_tree_config].ott_mode_lfe,
+ MAX_NUM_OTT * sizeof(ott_mode_lfe[0]));
+ }
+ config->bs_quant_mode = 0;
+ config->bs_one_icc = 0;
+ config->bs_arbitrary_downmix = 0;
+ config->bs_residual_coding = 0;
+ config->bs_smooth_config = 0;
+ config->bs_fixed_gain_sur = 2;
+ config->bs_fixed_gain_lfe = 1;
+ config->bs_fixed_gain_dmx = 0;
+ config->bs_matrix_mode = 1;
+ config->bs_temp_shape_config = 0;
+ config->bs_decorr_config = 0;
+ if (config->bs_tree_config == 15) {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
+ }
+ for (i = 0; i < curr_state->num_ott_boxes; i++) {
+ if (ott_mode_lfe[i]) {
+ config->bs_ott_bands[i] = 28;
+ }
+ }
+ for (i = 0; i < curr_state->num_ttt_boxes; i++) {
+ config->bs_ttt_dual_mode[i] = 0;
+ config->bs_ttt_mode_low[i] = 1;
+ if (config->bs_ttt_dual_mode[i]) {
+ config->bs_ttt_mode_high[i] = 1;
+ config->bs_ttt_bands_low[i] = 28;
+ }
+ }
+ return IA_NO_ERROR;
+}
+
+static VOID ixheaacd_coarse_2_fine(WORD32 *data, WORD32 data_type, WORD32 start_band,
+ WORD32 num_bands) {
+ WORD32 i;
+
+ for (i = start_band; i < start_band + num_bands; i++) {
+ data[i] <<= 1;
+ }
+
+ if (data_type == CLD) {
+ for (i = start_band; i < start_band + num_bands; i++) {
+ if (data[i] == -14)
+ data[i] = -15;
+ else if (data[i] == 14)
+ data[i] = 15;
+ }
+ }
+}
+
+static VOID ixheaacd_fine_2_coarse(WORD32 *data, WORD32 start_band, WORD32 num_bands) {
+ WORD32 i;
+
+ for (i = start_band; i < start_band + num_bands; i++) {
+ data[i] >>= 1;
+ }
+}
+
+static WORD32 ixheaacd_get_stride_map(
+ WORD32 freq_res_stride, WORD32 start_band, WORD32 stop_band, WORD32 *a_strides,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 i, pb, pb_stride, data_bands, str_offset;
+
+ pb_stride = ixheaacd_mps_dec_bitdec_tables->pb_stride_table[freq_res_stride];
+ data_bands = (stop_band - start_band - 1) / pb_stride + 1;
+
+ a_strides[0] = start_band;
+ for (pb = 1; pb <= data_bands; pb++) {
+ a_strides[pb] = a_strides[pb - 1] + pb_stride;
+ }
+ str_offset = 0;
+ while (a_strides[data_bands] > stop_band) {
+ if (str_offset < data_bands) str_offset++;
+ for (i = str_offset; i <= data_bands; i++) {
+ a_strides[i]--;
+ }
+ }
+
+ return data_bands;
+}
+
+static IA_ERRORCODE ixheaacd_ec_data_dec(ia_heaac_mps_state_struct *pstr_mps_state,
+ ia_mps_dec_lossless_data_struct *ll_data,
+ WORD32 data[][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
+ WORD32 lastdata[][MAX_PARAMETER_BANDS], WORD32 datatype,
+ WORD32 box_idx, WORD32 param_idx, WORD32 start_band,
+ WORD32 stop_band) {
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 i, pb, data_sets, set_idx, bs_data_pair, data_bands, old_quant_coarse_xxx, temp;
+ WORD32 a_strides[MAX_PARAMETER_BANDS + 1] = {0};
+
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ data_sets = 0;
+ for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
+ ll_data->bs_xxx_data_mode[param_idx][i] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
+ data_sets++;
+ }
+ }
+ set_idx = 0;
+ old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx_prev[param_idx];
+
+ while (set_idx < data_sets) {
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ bs_data_pair = (temp >> 3) & ONE_BIT_MASK;
+ ll_data->bs_quant_coarse_xxx[param_idx][set_idx] = (temp >> 2) & ONE_BIT_MASK;
+ ll_data->bs_freq_res_stride_xxx[param_idx][set_idx] = temp & TWO_BIT_MASK;
+
+ if (ll_data->bs_quant_coarse_xxx[param_idx][set_idx] != old_quant_coarse_xxx) {
+ if (old_quant_coarse_xxx) {
+ ixheaacd_coarse_2_fine(lastdata[box_idx], datatype, start_band, stop_band - start_band);
+ } else {
+ ixheaacd_fine_2_coarse(lastdata[box_idx], start_band, stop_band - start_band);
+ }
+ }
+
+ data_bands = ixheaacd_get_stride_map(ll_data->bs_freq_res_stride_xxx[param_idx][set_idx],
+ start_band, stop_band, a_strides,
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+
+ for (pb = 0; pb < data_bands; pb++) {
+ lastdata[box_idx][start_band + pb] = lastdata[box_idx][a_strides[pb]];
+ }
+
+ error_code = ixheaacd_mps_ecdatapairdec(
+ mps_bit_buf, data[box_idx], lastdata[box_idx], datatype, set_idx, start_band, data_bands,
+ bs_data_pair, ll_data->bs_quant_coarse_xxx[param_idx][set_idx],
+ (!frame->bs_independency_flag || (set_idx > 0)), 0, 1, pstr_mps_state->ec_flag);
+ if (error_code != IA_NO_ERROR) return error_code;
+
+ for (pb = 0; pb < data_bands; pb++) {
+ for (i = a_strides[pb]; i < a_strides[pb + 1]; i++) {
+ lastdata[box_idx][i] = data[box_idx][set_idx + bs_data_pair][start_band + pb];
+ }
+ }
+
+ old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
+
+ if (bs_data_pair) {
+ ll_data->bs_quant_coarse_xxx[param_idx][set_idx + 1] =
+ ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
+ ll_data->bs_freq_res_stride_xxx[param_idx][set_idx + 1] =
+ ll_data->bs_freq_res_stride_xxx[param_idx][set_idx];
+ }
+ set_idx += bs_data_pair + 1;
+ }
+ return error_code;
+}
+
+static IA_ERRORCODE ixheaacd_parse_arbitrary_downmix_data(
+ ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
+ WORD32 ch;
+
+ for (ch = 0; ch < num_input_channels; ch++) {
+ error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
+ frame->cmp_arbdmx_gain_idx, frame->cmp_arbdmx_gain_idx_prev,
+ CLD, ch, offset + ch, 0, bitstream_parameter_bands);
+ if (error_code != IA_NO_ERROR) return error_code;
+ }
+ return error_code;
+}
+
+static WORD32 ixheaacd_decode_icc_diff_code(ia_bit_buf_struct *it_bit_buff) {
+ WORD32 value = 0;
+ WORD32 count = 0;
+ while ((ixheaacd_read_bits_buf(it_bit_buff, 1) == 0) && (count++ < 7)) {
+ value++;
+ }
+
+ return value;
+}
+
+static VOID ixheaacd_parse_residual_data(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ich, ch;
+ WORD32 rfpsf;
+ WORD32 ps;
+ WORD32 pb;
+
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
+ pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
+ WORD32 i;
+
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
+
+ WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 residual_frames_per_spatial_frame = pstr_mps_state->residual_frames_per_spatial_frame;
+ WORD32 upd_qmf = pstr_mps_state->upd_qmf;
+
+ WORD32 loop_counter = num_ott_boxes + pstr_mps_state->num_ttt_boxes;
+ WORD32 *p_mdct_res;
+
+ WORD32 *p_res_mdct = pstr_mps_state->array_struct->res_mdct;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ for (ich = 0; ich < loop_counter; ich++) {
+ ch = ich;
+
+ p_mdct_res = p_res_mdct;
+ if (config->bs_residual_bands[ch] > 0) {
+ if (ch < num_ott_boxes) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ frame->res_data.bs_icc_diff_present[ch][ps] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ if (frame->res_data.bs_icc_diff_present[ch][ps]) {
+ for (pb = 0; pb < config->bs_residual_bands[ch]; pb++) {
+ frame->res_data.bs_icc_diff[ch][ps][pb] =
+ ixheaacd_decode_icc_diff_code(mps_bit_buf);
+ frame->ott_icc_diff_idx[ch][ps][pb] = frame->res_data.bs_icc_diff[ch][ps][pb];
+ }
+ }
+ }
+ }
+ p_mdct_res = p_res_mdct;
+ for (rfpsf = 0; rfpsf < residual_frames_per_spatial_frame; rfpsf++) {
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
+ aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+ if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ pstr_mps_state->res_block_type[ch][rfpsf] =
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ =
+ (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
+ }
+
+ if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
+ EIGHT_SHORT_SEQUENCE) &&
+ ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
+ aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+ if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ =
+ (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
+ }
+ }
+ }
+ }
+
+ p_res_mdct += RFX2XMDCTCOEF;
+ }
+}
+
+static IA_ERRORCODE ixheaacd_parse_extension_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 i, fr, gr, offset, ch;
+ WORD32 ext_num, sac_ext_type, sac_ext_len, tmp, bits_read, n_fill_bits, temp;
+ WORD32 channel_grouping[MAX_INPUT_CHANNELS_MPS];
+
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
+
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
+ pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
+
+ WORD32 arbdmx_upd_qmf = pstr_mps_state->arbdmx_upd_qmf;
+ WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
+ WORD32 arbdmx_frames_per_spatial_frame = pstr_mps_state->arbdmx_frames_per_spatial_frame;
+ WORD32 *p_res_mdct, *p_mdct_res;
+
+ WORD32 sfidx;
+ VOID *free_scratch = pstr_mps_state->mps_scratch_mem_v;
+ ia_mps_dec_residual_sfband_info_struct *p_sfband_info_tab = &pstr_mps_state->sfband_info_tab;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ for (ch = 0; ch < 2; ch++) {
+ pstr_mps_state->p_aac_decoder_channel_info[ch] = free_scratch;
+ free_scratch = (WORD8 *)free_scratch + sizeof(ia_mps_dec_residual_channel_info_struct);
+ pstr_mps_state->p_aac_decoder_dynamic_data_init[ch] = free_scratch;
+ free_scratch = (WORD8 *)free_scratch + sizeof(ia_mps_dec_residual_dynamic_data_struct);
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->p_scale_factor =
+ pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_scale_factor;
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->p_code_book =
+ pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_code_book;
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->p_spectral_coefficient = free_scratch;
+ free_scratch = (WORD8 *)free_scratch + 4096;
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->p_tns_scratch = free_scratch;
+ free_scratch = (WORD8 *)free_scratch + 4096;
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->ics_info.frame_length = AAC_FRAME_LENGTH;
+ pstr_mps_state->p_aac_decoder_channel_info[ch]->common_window = 0;
+ }
+ if (pstr_mps_state->arbitrary_downmix == 2)
+ sfidx = p_bs_config->bs_arbitrary_downmix_residual_sampling_freq_index;
+ else
+ sfidx = p_bs_config->bs_residual_sampling_freq_index;
+ {
+ WORD16 *psfb_idx[2];
+ const WORD8 *psfb_width[2];
+ WORD width_idx;
+ WORD32 j;
+
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.sampling_rate_index = sfidx;
+ psfb_idx[0] = p_sfband_info_tab->sfb_long_idx;
+ psfb_idx[1] = p_sfband_info_tab->sfb_short_idx;
+ psfb_width[0] = aac_tables_ptr->scale_factor_bands_long[sfidx];
+ psfb_width[1] = aac_tables_ptr->scale_factor_bands_short[sfidx];
+
+ for (j = 1; j >= 0; j--) {
+ const WORD8 *ptr_w = psfb_width[j];
+ WORD16 *ptr_i = psfb_idx[j];
+ width_idx = 0;
+ *ptr_i++ = width_idx;
+ do {
+ width_idx += (*ptr_w++);
+ *ptr_i++ = width_idx;
+ } while (*ptr_w != -1);
+
+ pstr_mps_state->tot_sf_bands_ls[j] = (WORD8)(ptr_w - psfb_width[j]);
+ }
+
+ {
+ aac_tables_ptr->sfb_index_long = p_sfband_info_tab->sfb_long_idx;
+ aac_tables_ptr->sfb_index_short = p_sfband_info_tab->sfb_short_idx;
+ aac_tables_ptr->sfb_index_long_width = (WORD8 *)psfb_width[0];
+ aac_tables_ptr->sfb_index_short_width = (WORD8 *)psfb_width[1];
+ }
+ }
+
+ for (ext_num = 0; ext_num < p_bs_config->sac_ext_cnt; ext_num++) {
+ sac_ext_type = p_bs_config->bs_sac_ext_type[ext_num];
+
+ if (sac_ext_type < 12) {
+ sac_ext_len = ixheaacd_read_bits_buf(mps_bit_buf, 8);
+ if (sac_ext_len == 255) {
+ sac_ext_len += ixheaacd_read_bits_buf(mps_bit_buf, 16);
+ }
+
+ tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
+ (mps_bit_buf->bit_pos + 1));
+
+ switch (sac_ext_type) {
+ case EXT_TYPE_0:
+ ixheaacd_parse_residual_data(pstr_mps_state);
+ break;
+
+ case EXT_TYPE_1:
+ switch (num_input_channels) {
+ case IN_CH_1:
+ channel_grouping[0] = 1;
+ break;
+ case IN_CH_2:
+ channel_grouping[0] = 2;
+ break;
+ case IN_CH_6:
+ channel_grouping[0] = 2;
+ channel_grouping[1] = 2;
+ channel_grouping[2] = 2;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_INPUT_CHANNEL;
+ break;
+ }
+
+ offset = num_ott_boxes + num_ttt_boxes;
+
+ p_res_mdct = pstr_mps_state->array_struct->res_mdct + offset * RFX2XMDCTCOEF;
+
+ for (ch = 0, gr = 0; ch < num_input_channels; ch += channel_grouping[gr++]) {
+ p_mdct_res = p_res_mdct;
+
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ frame->bs_arbitrary_downmix_residual_abs[ch] = (temp >> 1) & ONE_BIT_MASK;
+ frame->bs_arbitrary_downmix_residual_alpha_update_set[ch] = temp & ONE_BIT_MASK;
+
+ if (channel_grouping[gr] == 1) {
+ for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
+ aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+ if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+
+ pstr_mps_state->res_block_type[offset + ch][fr] =
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ =
+ (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
+ }
+
+ if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
+ EIGHT_SHORT_SEQUENCE) &&
+ ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
+ (arbdmx_upd_qmf == UPD_QMF_30))) {
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
+ 1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+ if (1 ==
+ pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
+ ->p_spectral_coefficient[i]);
+ }
+ }
+ }
+ p_res_mdct += RFX2XMDCTCOEF;
+ } else {
+ frame->bs_arbitrary_downmix_residual_abs[ch + 1] =
+ frame->bs_arbitrary_downmix_residual_abs[ch];
+ frame->bs_arbitrary_downmix_residual_alpha_update_set[ch + 1] =
+ frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
+
+ for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
+ WORD32 *res_mdct_1 = p_mdct_res + RFX2XMDCTCOEF;
+ WORD32 temp, win1, win2;
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+
+ if (temp != 0) {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT;
+ }
+
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
+ aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+
+ if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+ pstr_mps_state->res_block_type[offset + ch][fr] =
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ =
+ (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
+ }
+
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
+ aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+
+ if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ win2 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *res_mdct_1++ =
+ (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
+ }
+
+ if (win1 != win2) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE;
+
+ if ((win1 == EIGHT_SHORT_SEQUENCE) &&
+ ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
+ (arbdmx_upd_qmf == UPD_QMF_30))) {
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+
+ if (temp != 0) {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT;
+ }
+
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
+ 1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+
+ if (1 ==
+ pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *p_mdct_res++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
+ ->p_spectral_coefficient[i]);
+ }
+
+ ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
+ 1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
+
+ if (1 ==
+ pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
+ ixheaacd_res_ctns_apply(
+ pstr_mps_state->p_aac_decoder_channel_info[0],
+ pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
+ aac_tables_ptr);
+ win2 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
+ for (i = 0; i < AAC_FRAME_LENGTH; i++) {
+ *res_mdct_1++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
+ ->p_spectral_coefficient[i]);
+ }
+
+ if (win1 != win2) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE;
+ }
+ }
+ p_res_mdct += RFX2XMDCTCOEF;
+ }
+ }
+
+ break;
+
+ case EXT_TYPE_2:
+ for (i = 0; i < p_bs_config->num_ott_boxes_at; i++) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
+ frame->cmp_ott_cld_idx, frame->cmp_ott_cld_idx_prev, CLD,
+ num_ott_boxes + i, num_ott_boxes + i, 0,
+ p_bs_config->bs_ott_bands_at[i]);
+ }
+
+ break;
+
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE;
+ }
+
+ bits_read =
+ (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
+ (mps_bit_buf->bit_pos + 1) - tmp);
+ n_fill_bits = (sac_ext_len << 3) - bits_read;
+
+ while (n_fill_bits > 7) {
+ ixheaacd_read_bits_buf(mps_bit_buf, 8);
+ n_fill_bits -= 8;
+ }
+ if (n_fill_bits > 0) {
+ ixheaacd_read_bits_buf(mps_bit_buf, n_fill_bits);
+ }
+ }
+ }
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_parse_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
+
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 i, bs_framing_type, prev_param_slot, data_bands, bs_temp_shape_enable,
+ num_temp_shape_chan;
+ WORD32 ttt_off, ps, pg, ts, pb, temp;
+ WORD32 *bs_env_shape_data = pstr_mps_state->mps_scratch_mem_v;
+ WORD32 const *reciprocal_tab = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
+ WORD32 num_parameter_sets;
+
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ WORD32 bs_num_output_channels =
+ bitdec_table->tree_property_table[pstr_mps_state->tree_config].num_output_channels;
+
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
+ WORD32 *b_ott_bands = pstr_mps_state->bitstream_ott_bands;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+
+ WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
+
+ WORD32 reciprocal, alignment_bits = 0;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ if (pstr_mps_state->parse_next_bitstream_frame == 0) return IA_NO_ERROR;
+
+ temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
+ bs_framing_type = (temp >> 3) & ONE_BIT_MASK;
+ num_parameter_sets = (temp & THREE_BIT_MASK) + 1;
+ pstr_mps_state->num_parameter_sets = num_parameter_sets;
+
+ reciprocal = reciprocal_tab[num_parameter_sets - 1];
+
+ prev_param_slot = -1;
+ for (i = 0; i < num_parameter_sets; i++) {
+ if (bs_framing_type) {
+ WORD32 bits_param_slot = 0;
+ while ((1 << bits_param_slot) < (time_slots - num_parameter_sets + i - prev_param_slot))
+ bits_param_slot++;
+ param_slot[i] =
+ bits_param_slot
+ ? prev_param_slot + 1 + ixheaacd_read_bits_buf(mps_bit_buf, bits_param_slot)
+ : prev_param_slot + 1;
+ prev_param_slot = param_slot[i];
+ } else {
+ WORD64 temp = (WORD64)(
+ ((WORD64)((time_slots * (i + 1)) + num_parameter_sets - 1) * (WORD64)reciprocal) >> 28);
+ param_slot[i] = (WORD32)(temp - 1);
+ }
+ }
+ frame->bs_independency_flag = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+
+ for (i = 0; i < num_ott_boxes; i++) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ott_cld_idx,
+ frame->cmp_ott_cld_idx_prev, CLD, i, i, 0, b_ott_bands[i]);
+ }
+ if (pstr_mps_state->one_icc) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ott_icc_idx,
+ frame->cmp_ott_icc_idx_prev, ICC, 0, 0, 0, bitstream_parameter_bands);
+ } else {
+ for (i = 0; i < num_ott_boxes; i++) {
+ if (!pstr_mps_state->ott_mode_lfe[i]) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ott_icc_idx,
+ frame->cmp_ott_icc_idx_prev, ICC, i, i, 0, b_ott_bands[i]);
+ }
+ }
+ }
+
+ ttt_off = num_ott_boxes;
+ for (i = 0; i < pstr_mps_state->num_ttt_boxes; i++) {
+ if (p_aux_struct->ttt_config[0][i].mode < 2) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data, frame->cmp_ttt_cpc_1_idx,
+ frame->cmp_ttt_cpc_1_idx_prev, CPC, i, ttt_off + 4 * i,
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data, frame->cmp_ttt_cpc_2_idx,
+ frame->cmp_ttt_cpc_2_idx_prev, CPC, i, ttt_off + 4 * i + 1,
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ttt_icc_idx,
+ frame->cmp_ttt_icc_idx_prev, ICC, i, ttt_off + 4 * i,
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band);
+ } else {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ttt_cld_1_idx,
+ frame->cmp_ttt_cld_1_idx_prev, CLD, i, ttt_off + 4 * i,
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ttt_cld_2_idx,
+ frame->cmp_ttt_cld_2_idx_prev, CLD, i, ttt_off + 4 * i + 1,
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band);
+ }
+
+ if (p_aux_struct->ttt_config[1][i].bitstream_start_band <
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band) {
+ if (p_aux_struct->ttt_config[1][i].mode < 2) {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data, frame->cmp_ttt_cpc_1_idx,
+ frame->cmp_ttt_cpc_1_idx_prev, CPC, i, ttt_off + 4 * i + 2,
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data, frame->cmp_ttt_cpc_2_idx,
+ frame->cmp_ttt_cpc_2_idx_prev, CPC, i, ttt_off + 4 * i + 3,
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ttt_icc_idx,
+ frame->cmp_ttt_icc_idx_prev, ICC, i, ttt_off + 4 * i + 2,
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band);
+ } else {
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ttt_cld_1_idx,
+ frame->cmp_ttt_cld_1_idx_prev, CLD, i, ttt_off + 4 * i + 2,
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band);
+ ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ttt_cld_2_idx,
+ frame->cmp_ttt_cld_2_idx_prev, CLD, i, ttt_off + 4 * i + 3,
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band);
+ }
+ }
+ }
+
+ frame->bs_smooth_control = 1;
+
+ if (frame->bs_smooth_control) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ if (frame->bs_smooth_mode[ps] > 3 || frame->bs_smooth_mode[ps] < 0) {
+ return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SMOOTH_MODE;
+ }
+ if (frame->bs_smooth_mode[ps] >= 2) {
+ frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ }
+ if (frame->bs_smooth_mode[ps] == 3) {
+ frame->bs_freq_res_stride_smg[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
+ data_bands = (bitstream_parameter_bands - 1) /
+ bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]] +
+ 1;
+ for (pg = 0; pg < data_bands; pg++) {
+ frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ }
+ }
+ }
+ }
+
+ for (i = 0; i < bs_num_output_channels; i++) {
+ p_aux_struct->temp_shape_enable_channel_stp[i] = 0;
+ p_aux_struct->temp_shape_enable_channel_ges[i] = 0;
+ }
+
+ if (p_bs_config->bs_temp_shape_config != 0) {
+ bs_temp_shape_enable = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ if (bs_temp_shape_enable) {
+ num_temp_shape_chan =
+ bitdec_table->temp_shape_chan_table[p_bs_config->bs_temp_shape_config - 1]
+ [p_bs_config->bs_tree_config];
+ switch (pstr_mps_state->temp_shape_config) {
+ case 1:
+ for (i = 0; i < num_temp_shape_chan; i++) {
+ p_aux_struct->temp_shape_enable_channel_stp[i] =
+ ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ }
+ break;
+ case 2:
+ for (i = 0; i < num_temp_shape_chan; i++) {
+ p_aux_struct->temp_shape_enable_channel_ges[i] =
+ ixheaacd_read_bits_buf(mps_bit_buf, 1);
+ }
+ for (i = 0; i < num_temp_shape_chan; i++) {
+ if (p_aux_struct->temp_shape_enable_channel_ges[i]) {
+ WORD32 const *envshape_data =
+ &bitdec_table->envshape_data[pstr_mps_state->env_quant_mode][0];
+ ixheaacd_mps_huff_decode(mps_bit_buf, bs_env_shape_data, time_slots);
+ for (ts = 0; ts < time_slots; ts++) {
+ p_aux_struct->env_shape_data[i][ts] = envshape_data[bs_env_shape_data[ts]];
+ }
+ }
+ }
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TEMPORAL_SHAPING_CONFIG;
+ }
+ }
+ }
+
+ if (pstr_mps_state->up_mix_type == 2) {
+ for (i = 0; i < bs_num_output_channels; i++) {
+ p_aux_struct->temp_shape_enable_channel_stp[i] = 0;
+ p_aux_struct->temp_shape_enable_channel_ges[i] = 0;
+ }
+ }
+
+ if (pstr_mps_state->arbitrary_downmix != 0) {
+ ixheaacd_parse_arbitrary_downmix_data(pstr_mps_state);
+ }
+
+ ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
+ ixheaacd_parse_extension_frame(pstr_mps_state);
+
+ for (i = 0; i < num_ott_boxes; i++) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ if (!frame->res_data.bs_icc_diff_present[i][ps] || (pstr_mps_state->up_mix_type == 2) ||
+ (pstr_mps_state->up_mix_type == 3)) {
+ for (pb = 0; pb < bitstream_parameter_bands; pb++) {
+ pstr_mps_state->bs_frame->ott_icc_diff_idx[i][ps][pb] = 0;
+ }
+ }
+ }
+ }
+
+ pstr_mps_state->parse_next_bitstream_frame = 1;
+
+ return IA_NO_ERROR;
+}
+
+static VOID ixheaacd_create_mapping(WORD32 a_map[MAX_PARAMETER_BANDS + 1], WORD32 start_band,
+ WORD32 stop_band, WORD32 stride, VOID *scratch) {
+ WORD32 in_bands, out_bands, bands_achived, bands_diff, incr, k, i;
+ WORD32 *v_dk;
+ in_bands = stop_band - start_band;
+ out_bands = (in_bands - 1) / stride + 1;
+ v_dk = scratch;
+ if (out_bands < 1) {
+ out_bands = 1;
+ }
+
+ bands_achived = out_bands * stride;
+ bands_diff = in_bands - bands_achived;
+ for (i = 0; i < out_bands; i++) {
+ v_dk[i] = stride;
+ }
+
+ if (bands_diff > 0) {
+ incr = -1;
+ k = out_bands - 1;
+ } else {
+ incr = 1;
+ k = 0;
+ }
+
+ while (bands_diff != 0) {
+ v_dk[k] = v_dk[k] - incr;
+ k = k + incr;
+ bands_diff = bands_diff + incr;
+ if (k >= out_bands) {
+ if (bands_diff > 0) {
+ k = out_bands - 1;
+ } else if (bands_diff < 0) {
+ k = 0;
+ }
+ }
+ }
+ a_map[0] = start_band;
+ for (i = 0; i < out_bands; i++) {
+ a_map[i + 1] = a_map[i] + v_dk[i];
+ }
+}
+
+static VOID ixheaacd_map_frequency(WORD32 *p_input, WORD32 *p_output, WORD32 *p_map,
+ WORD32 data_bands) {
+ WORD32 i, j, start_band, stop_band, value;
+ WORD32 start_band_0 = p_map[0];
+
+ for (i = 0; i < data_bands; i++) {
+ value = p_input[i + start_band_0];
+
+ start_band = p_map[i];
+ stop_band = p_map[i + 1];
+ for (j = start_band; j < stop_band; j++) {
+ p_output[j] = value;
+ }
+ }
+}
+
+static IA_ERRORCODE ixheaacd_deq_coarse(
+ WORD32 value, WORD32 param_type, WORD32 *dequant,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ switch (param_type) {
+ case CLD:
+ if (value >= 8 || value < -7) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld_coarse[value + 7];
+ break;
+
+ case ICC:
+ if (value >= 8 || value < 0) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
+ break;
+
+ case CPC:
+ if (value >= 16 || value < -10) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc_coarse[value + 10];
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM;
+ }
+ return IA_NO_ERROR;
+}
+
+static IA_ERRORCODE ia_mps_dec_deq(
+ WORD32 value, WORD32 param_type, WORD32 *dequant,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ switch (param_type) {
+ case CLD:
+ if (value >= 16 || value < -15) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld[value + 15];
+ break;
+
+ case ICC:
+ if (value >= 8 || value < 0) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
+ break;
+
+ case CPC:
+ if (value >= 32 || value < -20) return IA_FATAL_ERROR;
+ *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc[value + 20];
+ break;
+
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM;
+ }
+ return IA_NO_ERROR;
+}
+
+static IA_ERRORCODE ixheaacd_factor_funct(WORD32 ott_vs_tot_db, WORD32 quant_mode,
+ WORD32 *factor) {
+ WORD32 db_diff;
+ WORD32 x_linear = 0;
+
+ WORD32 maxfactor = 0;
+ WORD32 constfact;
+
+ if (ott_vs_tot_db > 0) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
+ db_diff = -ott_vs_tot_db;
+
+ switch (quant_mode) {
+ case QUANT_MODE_0:
+ return (ONE_IN_Q25);
+ break;
+ case QUANT_MODE_1:
+ x_linear = 1024;
+
+ maxfactor = 167772160;
+ constfact = 6554;
+ break;
+ case QUANT_MODE_2:
+ x_linear = 1024;
+
+ maxfactor = ONE_IN_Q28;
+ constfact = 9557;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE;
+ }
+
+ if (db_diff > (x_linear << 5)) {
+ WORD32 db_diff_fix = db_diff >> 5;
+ *factor = (db_diff_fix - (WORD32)x_linear) * constfact + ONE_IN_Q25;
+ } else {
+ *factor = ONE_IN_Q25;
+ }
+
+ *factor = min(maxfactor, *factor);
+ return IA_NO_ERROR;
+}
+
+static VOID ixheaacd_factor_cld(WORD32 *idx, WORD32 ott_vs_tot_db, WORD32 *ott_vs_tot_db_1,
+ WORD32 *ott_vs_tot_db_2, WORD32 quant_mode,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 factor = 0;
+ WORD32 c1;
+ WORD32 c2;
+ WORD32 cld_idx;
+
+ ixheaacd_factor_funct(ott_vs_tot_db, quant_mode, &factor);
+
+ cld_idx = (((*idx * factor) + THIRTYONE_BY_TWO_IN_Q25) >> 25);
+ cld_idx -= 15;
+
+ cld_idx = min(cld_idx, 15);
+ cld_idx = max(cld_idx, -15);
+
+ *idx = cld_idx;
+
+ c1 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[*idx + 15];
+ c2 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[15 - *idx];
+
+ *ott_vs_tot_db_1 = c1 + ott_vs_tot_db;
+ *ott_vs_tot_db_2 = c2 + ott_vs_tot_db;
+}
+
+static IA_ERRORCODE ixheaacd_map_index_data(
+ ia_mps_dec_lossless_data_struct *ll_data,
+ WORD32 output_data[][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
+ WORD32 output_idx_data[][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
+ WORD32 cmp_idx_data[][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
+ WORD32 diff_idx_data[][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS], WORD32 xtt_idx,
+ WORD32 idx_prev[MAX_NUM_OTT][MAX_PARAMETER_BANDS], WORD32 param_idx, WORD32 param_type,
+ WORD32 start_band, WORD32 stop_band, WORD32 default_value, WORD32 num_parameter_sets,
+ WORD32 *param_slot, WORD32 extend_frame, WORD32 quant_mode, WORD32 *ott_vs_tot_db_in,
+ WORD32 *ott_vs_tot_db_1, WORD32 *ott_vs_tot_db_2,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables, VOID *scratch) {
+ WORD32 *a_param_slots;
+ WORD32 *a_interpolate;
+
+ WORD32 data_sets;
+ WORD32 *a_map;
+ VOID *free_scratch;
+
+ WORD32 set_idx, i, band, parm_slot;
+ WORD32 data_bands, stride;
+ WORD32 ps, pb;
+
+ WORD32 i1, i2, x1, xi, x2;
+ WORD32 *db_in;
+ WORD32 *db_1, *db_2;
+ db_in = ott_vs_tot_db_in;
+ db_1 = ott_vs_tot_db_1;
+ db_2 = ott_vs_tot_db_2;
+ a_param_slots = scratch;
+ a_interpolate = a_param_slots + MAX_PARAMETER_SETS;
+ a_map = a_interpolate + MAX_PARAMETER_SETS;
+ free_scratch = a_map + MAX_PARAMETER_BANDS_PLUS_1;
+
+ data_sets = 0;
+ for (i = 0; i < num_parameter_sets; i++) {
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
+ a_param_slots[data_sets] = i;
+ data_sets++;
+ }
+ }
+
+ set_idx = 0;
+
+ for (i = 0; i < num_parameter_sets; i++) {
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 0) {
+ ll_data->no_cmp_quant_coarse_xxx[param_idx][i] = 0;
+ for (band = start_band; band < stop_band; band++) {
+ output_idx_data[xtt_idx][i][band] = default_value;
+ }
+ for (band = start_band; band < stop_band; band++) {
+ idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][i][band];
+ }
+ }
+
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 1) {
+ for (band = start_band; band < stop_band; band++) {
+ output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
+ }
+ ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
+ ll_data->bs_quant_coarse_xxx_prev[param_idx];
+ }
+
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 2) {
+ for (band = start_band; band < stop_band; band++) {
+ output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
+ }
+ a_interpolate[i] = 1;
+ } else {
+ a_interpolate[i] = 0;
+ }
+
+ if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
+ parm_slot = a_param_slots[set_idx];
+ stride = ixheaacd_mps_dec_bitdec_tables
+ ->pb_stride_table[ll_data->bs_freq_res_stride_xxx[param_idx][set_idx]];
+ data_bands = (stop_band - start_band - 1) / stride + 1;
+ ixheaacd_create_mapping(a_map, start_band, stop_band, stride, free_scratch);
+ ixheaacd_map_frequency(&cmp_idx_data[xtt_idx][set_idx][0],
+ &output_idx_data[xtt_idx][parm_slot][0], a_map, data_bands);
+
+ for (band = start_band; band < stop_band; band++) {
+ idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][parm_slot][band];
+ }
+
+ ll_data->bs_quant_coarse_xxx_prev[param_idx] =
+ ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
+ ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
+ ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
+
+ set_idx++;
+ }
+
+ if (diff_idx_data != NULL) {
+ for (band = start_band; band < stop_band; band++) {
+ output_idx_data[xtt_idx][i][band] += diff_idx_data[xtt_idx][i][band];
+ }
+ }
+ }
+
+ for (i = 0; i < num_parameter_sets; i++) {
+ if (a_interpolate[i] != 1) {
+ if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i] == 1) {
+ for (band = start_band; band < stop_band; band++) {
+ ixheaacd_deq_coarse(output_idx_data[xtt_idx][i][band], param_type,
+ &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
+ }
+ } else {
+ for (band = start_band; band < stop_band; band++) {
+ ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
+ &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
+ }
+ }
+ }
+ }
+
+ if (quant_mode && (param_type == CLD)) {
+ if (db_in == 0 || db_1 == 0 || db_2 == 0)
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ if (a_interpolate[ps] != 1) {
+ if (ll_data->no_cmp_quant_coarse_xxx[param_idx][ps]) {
+ ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][ps], param_type, start_band,
+ stop_band - start_band);
+ }
+ for (pb = start_band; pb < stop_band; pb++) {
+ ll_data->no_cmp_quant_coarse_xxx[param_idx][ps] = 1;
+ ixheaacd_factor_cld(&(output_idx_data[xtt_idx][ps][pb]), *db_in++, &(*db_1++),
+ &(*db_2++), quant_mode, ixheaacd_mps_dec_bitdec_tables);
+ ia_mps_dec_deq(output_idx_data[xtt_idx][ps][pb], param_type,
+ &(output_data[xtt_idx][ps][pb]), ixheaacd_mps_dec_bitdec_tables);
+ }
+ }
+ }
+ }
+
+ i1 = 0;
+ x1 = 0;
+ i2 = 0;
+ for (i = 0; i < num_parameter_sets; i++) {
+ if (a_interpolate[i] != 1) {
+ i1 = i;
+ }
+ i2 = i;
+ while (a_interpolate[i2] == 1) {
+ i2++;
+ }
+ x1 = param_slot[i1];
+ xi = param_slot[i];
+ x2 = param_slot[i2];
+
+ if (a_interpolate[i] == 1) {
+ if (i2 >= num_parameter_sets) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS;
+ if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i1]) {
+ ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i1], param_type, start_band,
+ stop_band - start_band);
+ }
+ if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i2]) {
+ ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i2], param_type, start_band,
+ stop_band - start_band);
+ }
+ for (band = start_band; band < stop_band; band++) {
+ WORD32 yi = 0, y1, y2;
+ y1 = output_idx_data[xtt_idx][i1][band];
+ y2 = output_idx_data[xtt_idx][i2][band];
+
+ if (x2 != x1) {
+ yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
+ }
+ output_idx_data[xtt_idx][i][band] = yi;
+ ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
+ &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
+ }
+ }
+ }
+
+ if (extend_frame) {
+ for (band = start_band; band < stop_band; band++) {
+ output_data[xtt_idx][num_parameter_sets][band] =
+ output_data[xtt_idx][num_parameter_sets - 1][band];
+ output_idx_data[xtt_idx][num_parameter_sets][band] =
+ output_idx_data[xtt_idx][num_parameter_sets - 1][band];
+ }
+ }
+ return IA_NO_ERROR;
+}
+
+static VOID ixheaacd_get_parameters_mapping(
+ WORD32 bs_parameter_bands, WORD32 *mapping,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ switch (bs_parameter_bands) {
+ case PARAMETER_BANDS_4:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_4_to_28;
+ break;
+ case PARAMETER_BANDS_5:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_5_to_28;
+ break;
+ case PARAMETER_BANDS_7:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_7_to_28;
+ break;
+ case PARAMETER_BANDS_10:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_10_to_28;
+ break;
+ case PARAMETER_BANDS_14:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_14_to_28;
+ break;
+ case PARAMETER_BANDS_20:
+ mapping = ixheaacd_mps_dec_bitdec_tables->map_table.mapping_20_to_28;
+ break;
+ case PARAMETER_BANDS_28:
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
+static VOID ixheaacd_map_number_of_bands_to_28_bands(
+ WORD32 bands, WORD32 bs_parameter_bands, WORD32 *bands28,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 *mapping = NULL;
+ WORD32 pb;
+
+ *bands28 = bands;
+
+ ixheaacd_get_parameters_mapping(bs_parameter_bands, mapping, ixheaacd_mps_dec_bitdec_tables);
+
+ if (mapping != NULL) {
+ for (pb = 0; pb < MAX_PARAMETER_BANDS; pb++) {
+ if (mapping[pb] == bands) {
+ break;
+ }
+ }
+ *bands28 = pb;
+ }
+ return;
+}
+
+static VOID ixheaacd_map_data_to_28_bands(
+ WORD32 *data, WORD32 bs_parameter_bands,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 *mapping = NULL;
+ WORD32 pb;
+
+ ixheaacd_get_parameters_mapping(bs_parameter_bands, mapping, ixheaacd_mps_dec_bitdec_tables);
+
+ if (mapping != NULL) {
+ for (pb = MAX_PARAMETER_BANDS - 1; pb >= 0; pb--) {
+ data[pb] = data[mapping[pb]];
+ }
+ }
+ return;
+}
+
+static VOID ixheaacd_decode_and_map_frame_ott(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+
+ WORD32 i, num_parameter_sets, ott_idx, band;
+ WORD32 num_ott_boxes;
+ VOID *free_scratch;
+
+ WORD32 ps, pb;
+
+ WORD32 *tot_db;
+ WORD32 *ott_vs_tot_db_fc;
+ WORD32 *ott_vs_tot_db_s;
+ WORD32 *ott_vs_tot_db_f;
+ WORD32 *ott_vs_tot_db_c;
+ WORD32 *ott_vs_tot_db_lr;
+ WORD32 *ott_vs_tot_db_l;
+ WORD32 *ott_vs_tot_db_r;
+ WORD32 *tmp1;
+ WORD32 *tmp2;
+
+ WORD32 bitstream_parameter_bands = curr_state->bitstream_parameter_bands;
+ WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
+ WORD32 *ott_cld_default = curr_state->ott_cld_default;
+ WORD32 parameter_sets = curr_state->num_parameter_sets;
+ WORD32 extend_frame = curr_state->extend_frame;
+ WORD32 quant_mode = curr_state->quant_mode;
+
+ tot_db = pstr_mps_state->mps_scratch_mem_v;
+ ott_vs_tot_db_fc = tot_db + MAX_PSXPB;
+ ott_vs_tot_db_s = ott_vs_tot_db_fc + MAX_PSXPB;
+ ott_vs_tot_db_f = ott_vs_tot_db_s + MAX_PSXPB;
+ ott_vs_tot_db_c = ott_vs_tot_db_f + MAX_PSXPB;
+ ott_vs_tot_db_lr = ott_vs_tot_db_c + MAX_PSXPB;
+ ott_vs_tot_db_l = ott_vs_tot_db_lr + MAX_PSXPB;
+ ott_vs_tot_db_r = ott_vs_tot_db_l + MAX_PSXPB;
+ tmp1 = ott_vs_tot_db_r + MAX_PSXPB;
+ tmp2 = tmp1 + MAX_PSXPB;
+ free_scratch = tmp2 + MAX_PSXPB;
+
+ p_cur_bs = pstr_mps_state->bs_frame;
+ num_ott_boxes = curr_state->num_ott_boxes;
+
+ pb = MAX_PSXPB;
+ for (i = 0; i < pb; i++) tot_db[i] = 0;
+
+ switch (curr_state->tree_config) {
+ case TREE_5151:
+ i = 0;
+
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, tot_db, ott_vs_tot_db_fc, ott_vs_tot_db_s, bitdec_table, free_scratch);
+
+ i = 1;
+
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
+ p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
+ ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_fc, ott_vs_tot_db_f, ott_vs_tot_db_c,
+ bitdec_table, free_scratch);
+
+ i = 2;
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_s, tmp1, tmp2, bitdec_table, free_scratch);
+
+ i = 3;
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_f, tmp1, tmp2, bitdec_table, free_scratch);
+
+ i = 4;
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
+ p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
+ ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
+
+ break;
+
+ case TREE_5152:
+ i = 0;
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, tot_db, ott_vs_tot_db_lr, ott_vs_tot_db_c, bitdec_table, free_scratch);
+ i = 1;
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
+ p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
+ ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_lr, ott_vs_tot_db_l, ott_vs_tot_db_r,
+ bitdec_table, free_scratch);
+ i = 2;
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
+ p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
+ ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
+ i = 3;
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_l, tmp1, tmp2, bitdec_table, free_scratch);
+ i = 4;
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
+ p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
+ b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ quant_mode, ott_vs_tot_db_r, tmp1, tmp2, bitdec_table, free_scratch);
+ break;
+
+ default:
+ for (i = 0; i < num_ott_boxes; i++) {
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
+ p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
+ ott_cld_default[i], parameter_sets, param_slot, extend_frame,
+ (curr_state->tree_config == TREE_525) ? 0 : quant_mode, NULL,
+ NULL, NULL, bitdec_table, free_scratch);
+ }
+ break;
+ }
+
+ if (curr_state->one_icc == 1) {
+ if (extend_frame == 0) {
+ num_parameter_sets = parameter_sets;
+ } else {
+ num_parameter_sets = parameter_sets + 1;
+ }
+
+ for (ott_idx = 1; ott_idx < num_ott_boxes; ott_idx++) {
+ if (curr_state->ott_mode_lfe[ott_idx] == 0) {
+ for (i = 0; i < num_parameter_sets; i++) {
+ for (band = 0; band < bitstream_parameter_bands; band++) {
+ p_cur_bs->cmp_ott_icc_idx[ott_idx][i][band] = p_cur_bs->cmp_ott_icc_idx[0][i][band];
+ }
+ }
+ }
+ }
+
+ for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
+ if (curr_state->ott_mode_lfe[ott_idx] == 0) {
+ ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
+ p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
+ p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
+ 0, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
+ parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
+ NULL, bitdec_table, free_scratch);
+ }
+ }
+ } else {
+ for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
+ if (curr_state->ott_mode_lfe[ott_idx] == 0) {
+ ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
+ p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
+ p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
+ ott_idx, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
+ parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
+ NULL, bitdec_table, free_scratch);
+ }
+ }
+ }
+
+ if (curr_state->up_mix_type == 2) {
+ WORD32 num_parameter_sets = parameter_sets;
+
+ if (extend_frame) {
+ num_parameter_sets++;
+ }
+
+ for (ott_idx = 0; ott_idx < curr_state->num_ott_boxes; ott_idx++) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ott_cld[ott_idx][ps],
+ bitstream_parameter_bands, bitdec_table);
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ott_icc[ott_idx][ps],
+ bitstream_parameter_bands, bitdec_table);
+ }
+ }
+ }
+ return;
+}
+
+static VOID ixheaacd_decode_and_map_frame_ttt(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+
+ WORD32 num_bands;
+
+ WORD32 i, j, offset;
+ WORD32 num_ttt_boxes;
+ VOID *free_scratch;
+
+ p_cur_bs = pstr_mps_state->bs_frame;
+ num_bands = pstr_mps_state->bitstream_parameter_bands;
+ offset = pstr_mps_state->num_ott_boxes;
+ num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
+ free_scratch = pstr_mps_state->mps_scratch_mem_v;
+
+ for (i = 0; i < num_ttt_boxes; i++) {
+ for (j = 0;
+ (j < 2) &&
+ p_aux_struct->ttt_config[j][i].start_band < p_aux_struct->ttt_config[j][i].stop_band;
+ j++) {
+ if (p_aux_struct->ttt_config[j][i].mode < 2) {
+ ixheaacd_map_index_data(
+ &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_1, p_cur_bs->ttt_cpc_1_idx,
+ p_cur_bs->cmp_ttt_cpc_1_idx, NULL, i, p_cur_bs->ttt_cpc_1_idx_prev,
+ offset + 4 * i + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
+ p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
+ pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
+ pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
+
+ ixheaacd_map_index_data(
+ &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_2, p_cur_bs->ttt_cpc_2_idx,
+ p_cur_bs->cmp_ttt_cpc_2_idx, NULL, i, p_cur_bs->ttt_cpc_2_idx_prev,
+ offset + 4 * i + 1 + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
+ p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
+ pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
+ pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
+
+ ixheaacd_map_index_data(
+ &p_cur_bs->icc_lossless_data, p_aux_struct->ttt_icc, p_cur_bs->ttt_icc_idx,
+ p_cur_bs->cmp_ttt_icc_idx, NULL, i, p_cur_bs->ttt_icc_idx_prev,
+ offset + 4 * i + 2 * j, ICC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
+ p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->icc_default,
+ pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
+ pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
+ }
+
+ else {
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_1, p_cur_bs->ttt_cld_1_idx,
+ p_cur_bs->cmp_ttt_cld_1_idx, NULL, i, p_cur_bs->ttt_cld_1_idx_prev,
+ offset + 4 * i + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
+ p_aux_struct->ttt_config[j][i].bitstream_stop_band,
+ pstr_mps_state->ttt_cld_1_default[i], pstr_mps_state->num_parameter_sets, param_slot,
+ pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
+ bitdec_table, free_scratch);
+
+ ixheaacd_map_index_data(
+ &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_2, p_cur_bs->ttt_cld_2_idx,
+ p_cur_bs->cmp_ttt_cld_2_idx, NULL, i, p_cur_bs->ttt_cld_2_idx_prev,
+ offset + 4 * i + 1 + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
+ p_aux_struct->ttt_config[j][i].bitstream_stop_band,
+ pstr_mps_state->ttt_cld_2_default[i], pstr_mps_state->num_parameter_sets, param_slot,
+ pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
+ bitdec_table, free_scratch);
+ }
+
+ if (pstr_mps_state->up_mix_type == 2) {
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 ps;
+
+ if (pstr_mps_state->extend_frame) {
+ num_parameter_sets++;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cpc_1[i][ps], num_bands, bitdec_table);
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cpc_2[i][ps], num_bands, bitdec_table);
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cld_1[i][ps], num_bands, bitdec_table);
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cld_2[i][ps], num_bands, bitdec_table);
+ ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_icc[i][ps], num_bands, bitdec_table);
+ }
+ }
+ }
+ }
+}
+
+static VOID ixheaacd_decode_and_map_frame_smg(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_smoothing_state_struct *smooth_state =
+ pstr_mps_state->mps_persistent_mem.smooth_state;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *smg_time = p_aux_struct->smg_time;
+ WORD32 ps, pb, pg, pb_stride, data_bands, pb_start, pb_stop;
+ WORD32 *a_group_to_band;
+ VOID *free_scratch;
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ pstr_mps_state->smooth_control = frame->bs_smooth_control;
+ a_group_to_band = pstr_mps_state->mps_scratch_mem_v;
+ free_scratch = a_group_to_band + MAX_PARAMETER_BANDS_PLUS_1;
+
+ if (pstr_mps_state->smooth_control) {
+ for (ps = 0; ps < pstr_mps_state->num_parameter_sets; ps++) {
+ switch (frame->bs_smooth_mode[ps]) {
+ case SMOOTH_MODE_0:
+ smg_time[ps] = 256;
+ for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
+ p_aux_struct->smg_data[ps][pb] = 0;
+ }
+ break;
+
+ case SMOOTH_MODE_1:
+ if (ps > 0)
+ smg_time[ps] = smg_time[ps - 1];
+ else
+ smg_time[ps] = smooth_state->prev_smg_time;
+
+ for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
+ if (ps > 0)
+ p_aux_struct->smg_data[ps][pb] = p_aux_struct->smg_data[ps - 1][pb];
+ else
+ p_aux_struct->smg_data[ps][pb] = smooth_state->prev_smg_data[pb];
+ }
+ break;
+
+ case SMOOTH_MODE_2:
+ smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
+ for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
+ p_aux_struct->smg_data[ps][pb] = 1;
+ }
+ break;
+
+ case SMOOTH_MODE_3:
+ smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
+ pb_stride = bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]];
+ data_bands = (pstr_mps_state->bitstream_parameter_bands - 1) / pb_stride + 1;
+ ixheaacd_create_mapping(a_group_to_band, 0, pstr_mps_state->bitstream_parameter_bands,
+ pb_stride, free_scratch);
+ for (pg = 0; pg < data_bands; pg++) {
+ pb_start = a_group_to_band[pg];
+ pb_stop = a_group_to_band[pg + 1];
+ for (pb = pb_start; pb < pb_stop; pb++) {
+ p_aux_struct->smg_data[ps][pb] = frame->bs_smg_data[ps][pg];
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ smooth_state->prev_smg_time = smg_time[pstr_mps_state->num_parameter_sets - 1];
+ for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
+ smooth_state->prev_smg_data[pb] =
+ p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
+ }
+
+ if (pstr_mps_state->extend_frame) {
+ smg_time[pstr_mps_state->num_parameter_sets] =
+ smg_time[pstr_mps_state->num_parameter_sets - 1];
+ for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
+ p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets][pb] =
+ p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
+ }
+ }
+
+ if (pstr_mps_state->up_mix_type == 2) {
+ WORD32 *mapping = NULL;
+ ixheaacd_get_parameters_mapping(pstr_mps_state->bitstream_parameter_bands, mapping,
+ bitdec_table);
+
+ if (mapping != NULL) {
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+
+ if (pstr_mps_state->extend_frame) {
+ num_parameter_sets++;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = MAX_PARAMETER_BANDS - 1; pb >= 0; pb--) {
+ p_aux_struct->smg_data[ps][pb] = p_aux_struct->smg_data[ps][mapping[pb]];
+ }
+ }
+ }
+ }
+ }
+ return;
+}
+
+static VOID ixheaacd_decode_and_map_frame_arbdmx(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *param_slot = p_aux_struct->param_slot;
+ WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
+ WORD32 ch;
+
+ VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
+
+ for (ch = 0; ch < pstr_mps_state->num_input_channels; ch++) {
+ ixheaacd_map_index_data(
+ &frame->cld_lossless_data, p_aux_struct->arbdmx_gain, frame->arbdmx_gain_idx,
+ frame->cmp_arbdmx_gain_idx, NULL, ch, frame->arbdmx_gain_idx_prev, offset + ch, CLD, 0,
+ pstr_mps_state->bitstream_parameter_bands, pstr_mps_state->arbdmx_gain_default,
+ pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame, 0, NULL,
+ NULL, NULL, bitdec_table, scratch);
+
+ p_aux_struct->arbdmx_residual_abs[ch] = frame->bs_arbitrary_downmix_residual_abs[ch];
+ p_aux_struct->arbdmx_alpha_upd_set[ch] =
+ frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
+
+ if (pstr_mps_state->up_mix_type == 2) {
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 ps;
+
+ if (pstr_mps_state->extend_frame) {
+ num_parameter_sets++;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_map_data_to_28_bands(p_aux_struct->arbdmx_gain[ch][ps],
+ pstr_mps_state->bitstream_parameter_bands, bitdec_table);
+ }
+ }
+ }
+}
+
+static VOID ixheaacd_decode_and_map_frame_arb_tree(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ ia_mps_spatial_bs_config_struct *p_config = &(pstr_mps_state->bs_config);
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *param_slot = p_aux_struct->param_slot;
+ WORD32 offset = pstr_mps_state->num_ott_boxes;
+
+ VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
+
+ WORD32 i;
+
+ for (i = 0; i < p_config->num_ott_boxes_at; i++) {
+ ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
+ p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, offset + i,
+ p_cur_bs->ott_cld_idx_prev, offset + i, CLD, 0,
+ p_config->bs_ott_bands_at[i], p_config->bs_ott_default_cld_at[i],
+ pstr_mps_state->num_parameter_sets, param_slot,
+ pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL,
+ NULL, pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr, scratch);
+ }
+}
+
+IA_ERRORCODE ixheaacd_decode_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+
+ pstr_mps_state->extend_frame = 0;
+ if (param_slot[pstr_mps_state->num_parameter_sets - 1] != pstr_mps_state->time_slots - 1) {
+ pstr_mps_state->extend_frame = 1;
+ }
+
+ ixheaacd_decode_and_map_frame_ott(pstr_mps_state);
+ ixheaacd_decode_and_map_frame_ttt(pstr_mps_state);
+
+ ixheaacd_decode_and_map_frame_smg(pstr_mps_state);
+ if (p_bs_config->arbitrary_tree != 0) {
+ ixheaacd_decode_and_map_frame_arb_tree(pstr_mps_state);
+ }
+
+ if (pstr_mps_state->arbitrary_downmix != 0) {
+ ixheaacd_decode_and_map_frame_arbdmx(pstr_mps_state);
+ }
+
+ if (pstr_mps_state->extend_frame) {
+ pstr_mps_state->num_parameter_sets++;
+ if (pstr_mps_state->num_parameter_sets > MAX_PARAMETER_SETS) {
+ if (pstr_mps_state->ec_flag)
+ pstr_mps_state->num_parameter_sets = 1;
+ else
+ return IA_FATAL_ERROR;
+ }
+
+ param_slot[pstr_mps_state->num_parameter_sets - 1] = pstr_mps_state->time_slots - 1;
+ }
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_set_current_state_parameters(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 i;
+
+ ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
+ ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
+
+ if (config->bs_sampling_freq_index == 15) {
+ curr_state->sampling_freq = config->bs_sampling_frequency;
+ } else {
+ curr_state->sampling_freq = bitdec_table->sampling_freq_table[config->bs_sampling_freq_index];
+ }
+ curr_state->time_slots = config->bs_frame_length + 1;
+ curr_state->frame_length = curr_state->time_slots * curr_state->qmf_bands;
+ curr_state->bitstream_parameter_bands = bitdec_table->freq_res_table[config->bs_freq_res];
+
+ curr_state->hybrid_bands = curr_state->qmf_bands - QMF_BANDS_TO_HYBRID + 10;
+ curr_state->tp_hyb_band_border = 12;
+ if (curr_state->hybrid_bands > 71) {
+ return IA_FATAL_ERROR;
+ }
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_parameter_bands = MAX_PARAMETER_BANDS;
+ } else {
+ curr_state->num_parameter_bands = curr_state->bitstream_parameter_bands;
+ }
+
+ switch (curr_state->num_parameter_bands) {
+ case PARAMETER_BANDS_4:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_4_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_5:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_5_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_7:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_7_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_10:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_10_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_14:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_14_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_20:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_20_to_71[i];
+ }
+ break;
+ case PARAMETER_BANDS_28:
+ for (i = 0; i < curr_state->hybrid_bands; i++) {
+ curr_state->kernels[i] = bitdec_table->kernel_table.kernels_28_to_71[i];
+ }
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS;
+ };
+
+ curr_state->tree_config = config->bs_tree_config;
+
+ switch (curr_state->tree_config) {
+ case TREE_5151:
+ case TREE_5152:
+ case TREE_525:
+ config->ui_channel_mask = FIVE_POINT_ONE_CHANNEL_MASK;
+ break;
+ case TREE_7271:
+ case TREE_7571:
+ config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK1;
+ break;
+ case TREE_7272:
+ case TREE_7572:
+ config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK2;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
+ }
+
+ curr_state->num_ott_boxes =
+ bitdec_table->tree_property_table[curr_state->tree_config].num_ott_boxes;
+ curr_state->num_ttt_boxes =
+ bitdec_table->tree_property_table[curr_state->tree_config].num_ttt_boxes;
+ curr_state->num_input_channels =
+ bitdec_table->tree_property_table[curr_state->tree_config].num_input_channels;
+ curr_state->num_output_channels =
+ bitdec_table->tree_property_table[curr_state->tree_config].num_output_channels;
+ curr_state->quant_mode = config->bs_quant_mode;
+ curr_state->one_icc = config->bs_one_icc;
+ curr_state->arbitrary_downmix = config->bs_arbitrary_downmix;
+ curr_state->residual_coding = config->bs_residual_coding;
+ curr_state->smooth_config = config->bs_smooth_config;
+ curr_state->mtx_inversion = config->bs_matrix_mode;
+ curr_state->temp_shape_config = config->bs_temp_shape_config;
+ curr_state->decorr_config = config->bs_decorr_config;
+ curr_state->env_quant_mode = config->bs_env_quant_mode;
+ curr_state->lfe_gain = bitdec_table->lfe_gain_table[config->bs_fixed_gain_lfe];
+ curr_state->surround_gain = bitdec_table->surround_gain_table[config->bs_fixed_gain_sur];
+ curr_state->clip_protect_gain = bitdec_table->clip_gain_table[config->bs_fixed_gain_dmx];
+
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_output_channels = 2;
+ curr_state->decorr_config = 0;
+ }
+
+ if (curr_state->up_mix_type == 3) {
+ curr_state->num_output_channels = 2;
+ }
+
+ if (p_bs_config->arbitrary_tree == 1)
+ curr_state->num_output_channels_at = p_bs_config->num_out_chan_at;
+ else
+ curr_state->num_output_channels_at = curr_state->num_output_channels;
+
+ p_bs_config->ui_out_channels = curr_state->num_output_channels_at;
+
+ curr_state->_3d_stereo_inversion = config->bs_3d_audio_mode;
+
+ if (curr_state->mtx_inversion == 1 || curr_state->_3d_stereo_inversion == 1)
+ curr_state->m1_param_imag_present = 1;
+
+ for (i = 0; i < curr_state->num_ott_boxes; i++) {
+ if (bitdec_table->tree_property_table[curr_state->tree_config].ott_mode_lfe[i]) {
+ b_ott_bands[i] = config->bs_ott_bands[i];
+ curr_state->ott_mode_lfe[i] = 1;
+ } else {
+ b_ott_bands[i] = curr_state->bitstream_parameter_bands;
+ curr_state->ott_mode_lfe[i] = 0;
+ }
+
+ if (curr_state->up_mix_type == 2) {
+ ixheaacd_map_number_of_bands_to_28_bands(b_ott_bands[i],
+ curr_state->bitstream_parameter_bands,
+ &p_aux_struct->num_ott_bands[i], bitdec_table);
+ } else {
+ p_aux_struct->num_ott_bands[i] = b_ott_bands[i];
+ }
+ }
+ for (i = 0; i < curr_state->num_ttt_boxes; i++) {
+ p_aux_struct->ttt_config[0][i].mode = config->bs_ttt_mode_low[i];
+ p_aux_struct->ttt_config[1][i].mode = config->bs_ttt_mode_high[i];
+ p_aux_struct->ttt_config[0][i].bitstream_start_band = 0;
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band = curr_state->bitstream_parameter_bands;
+
+ if (config->bs_ttt_dual_mode[i]) {
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band = config->bs_ttt_bands_low[i];
+ p_aux_struct->ttt_config[1][i].bitstream_start_band = config->bs_ttt_bands_low[i];
+ } else {
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band = curr_state->bitstream_parameter_bands;
+ p_aux_struct->ttt_config[1][i].bitstream_start_band = curr_state->bitstream_parameter_bands;
+ }
+
+ if (curr_state->up_mix_type == 2) {
+ ixheaacd_map_number_of_bands_to_28_bands(
+ p_aux_struct->ttt_config[0][i].bitstream_start_band,
+ curr_state->bitstream_parameter_bands, &p_aux_struct->ttt_config[0][i].start_band,
+ bitdec_table);
+
+ ixheaacd_map_number_of_bands_to_28_bands(p_aux_struct->ttt_config[0][i].bitstream_stop_band,
+ curr_state->bitstream_parameter_bands,
+ &p_aux_struct->ttt_config[0][i].stop_band,
+ bitdec_table);
+
+ ixheaacd_map_number_of_bands_to_28_bands(
+ p_aux_struct->ttt_config[1][i].bitstream_start_band,
+ curr_state->bitstream_parameter_bands, &p_aux_struct->ttt_config[1][i].start_band,
+ bitdec_table);
+
+ ixheaacd_map_number_of_bands_to_28_bands(p_aux_struct->ttt_config[1][i].bitstream_stop_band,
+ curr_state->bitstream_parameter_bands,
+ &p_aux_struct->ttt_config[1][i].stop_band,
+ bitdec_table);
+ } else {
+ p_aux_struct->ttt_config[0][i].start_band =
+ p_aux_struct->ttt_config[0][i].bitstream_start_band;
+ p_aux_struct->ttt_config[0][i].stop_band =
+ p_aux_struct->ttt_config[0][i].bitstream_stop_band;
+ p_aux_struct->ttt_config[1][i].start_band =
+ p_aux_struct->ttt_config[1][i].bitstream_start_band;
+ p_aux_struct->ttt_config[1][i].stop_band =
+ p_aux_struct->ttt_config[1][i].bitstream_stop_band;
+ }
+ }
+ curr_state->residual_coding = config->bs_residual_coding;
+ curr_state->num_residual_signals = 0;
+ if (curr_state->residual_coding) {
+ for (i = 0; i < curr_state->num_ttt_boxes + curr_state->num_ott_boxes; i++) {
+ if (config->bs_residual_present[i]) {
+ curr_state->res_bands[i] = config->bs_residual_bands[i];
+ curr_state->num_residual_signals++;
+ } else {
+ curr_state->res_bands[i] = 0;
+ }
+
+ if (curr_state->up_mix_type == 2 || curr_state->up_mix_type == 3) {
+ curr_state->res_bands[i] = 0;
+ }
+ }
+ }
+
+ curr_state->residual_frames_per_spatial_frame =
+ p_bs_config->bs_residual_frames_per_spatial_frame + 1;
+ if (curr_state->residual_frames_per_spatial_frame > 0) {
+ WORD32 const *reciprocal_tab =
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
+
+ WORD64 temp =
+ (WORD64)(((WORD64)(p_bs_config->bs_frame_length + 1) *
+ (WORD64)reciprocal_tab[p_bs_config->bs_residual_frames_per_spatial_frame]) >>
+ 28);
+ curr_state->upd_qmf = (WORD32)temp;
+ if (curr_state->upd_qmf != UPD_QMF_15 && curr_state->upd_qmf != UPD_QMF_16 &&
+ curr_state->upd_qmf != UPD_QMF_32 && curr_state->upd_qmf != UPD_QMF_18 &&
+ curr_state->upd_qmf != UPD_QMF_30 && curr_state->upd_qmf != UPD_QMF_24)
+ return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
+ }
+
+ curr_state->arbdmx_residual_bands = config->bs_arbitrary_downmix_residual_bands;
+ curr_state->arbdmx_frames_per_spatial_frame =
+ config->bs_arbitrary_downmix_residual_frames_per_spatial_frame + 1;
+ if (curr_state->arbdmx_frames_per_spatial_frame > 0) {
+ curr_state->arbdmx_upd_qmf =
+ curr_state->time_slots / curr_state->arbdmx_frames_per_spatial_frame;
+ if (curr_state->arbdmx_upd_qmf != UPD_QMF_15 && curr_state->arbdmx_upd_qmf != UPD_QMF_16 &&
+ curr_state->arbdmx_upd_qmf != UPD_QMF_32 && curr_state->arbdmx_upd_qmf != UPD_QMF_18 &&
+ curr_state->arbdmx_upd_qmf != UPD_QMF_30 && curr_state->arbdmx_upd_qmf != UPD_QMF_24)
+ return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
+ }
+
+ curr_state->cpc_default = 10;
+ curr_state->ttt_cld_1_default[0] = 15;
+ curr_state->ttt_cld_2_default[0] = 0;
+ curr_state->icc_default = 0;
+ curr_state->arbdmx_gain_default = 0;
+
+ if (curr_state->_3d_stereo_inversion) {
+ if (config->bs_3d_audio_hrtf_set == 0) {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET;
+ } else {
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET;
+ }
+ }
+
+ switch (curr_state->tree_config) {
+ case TREE_5151:
+ curr_state->num_direct_signals = 1;
+ curr_state->num_decor_signals = 4;
+
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_decor_signals = 1;
+ }
+
+ if (curr_state->up_mix_type == 3) {
+ curr_state->num_decor_signals = 3;
+ }
+
+ curr_state->num_x_channels = 1;
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_x_channels += 1;
+ }
+ curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
+ curr_state->num_w_channels = curr_state->num_v_channels;
+ curr_state->w_start_residual_idx = 0;
+ curr_state->ott_cld_default[0] = 15;
+ curr_state->ott_cld_default[1] = 15;
+ curr_state->ott_cld_default[2] = 0;
+ curr_state->ott_cld_default[3] = 0;
+ curr_state->ott_cld_default[4] = 15;
+ break;
+ case TREE_5152:
+ curr_state->num_direct_signals = 1;
+ curr_state->num_decor_signals = 4;
+
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_decor_signals = 1;
+ }
+
+ if (curr_state->up_mix_type == 3) {
+ curr_state->num_decor_signals = 2;
+ }
+
+ curr_state->num_x_channels = 1;
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_x_channels += 1;
+ }
+ curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
+ curr_state->num_w_channels = curr_state->num_v_channels;
+ curr_state->w_start_residual_idx = 0;
+ curr_state->ott_cld_default[0] = 15;
+ curr_state->ott_cld_default[1] = 0;
+ curr_state->ott_cld_default[2] = 15;
+ curr_state->ott_cld_default[3] = 15;
+ curr_state->ott_cld_default[4] = 15;
+ break;
+ case TREE_525:
+ curr_state->num_direct_signals = 3;
+
+ for (i = 0; i < 2; i++) {
+ switch (p_aux_struct->ttt_config[i][0].mode) {
+ case TTT_MODE_0:
+ p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
+ curr_state->num_decor_signals = 3;
+ break;
+ case TTT_MODE_1:
+ case TTT_MODE_2:
+ case TTT_MODE_3:
+ case TTT_MODE_4:
+ case TTT_MODE_5:
+ p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
+ curr_state->num_decor_signals = 2;
+ break;
+ default:
+ if (p_bs_config->bs_ttt_mode_low[0] <= 1)
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE;
+ break;
+ }
+ }
+
+ if (curr_state->residual_coding == 1) {
+ curr_state->num_x_channels = 3;
+ } else {
+ curr_state->num_x_channels = 2;
+ }
+
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_x_channels = 5;
+ }
+
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_direct_signals = 2;
+ curr_state->num_decor_signals = 0;
+ curr_state->num_x_channels = 2;
+
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_direct_signals = 4;
+ curr_state->num_x_channels = 5;
+ }
+ }
+
+ curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
+ curr_state->num_w_channels = curr_state->num_v_channels;
+ curr_state->w_start_residual_idx = 1;
+ curr_state->ott_cld_default[0] = 15;
+ curr_state->ott_cld_default[1] = 15;
+ curr_state->ott_cld_default[2] = 15;
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ curr_state->num_direct_signals = 3;
+
+ for (i = 0; i < 2; i++) {
+ switch (p_aux_struct->ttt_config[i][0].mode) {
+ case TTT_MODE_0:
+ p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
+ curr_state->num_decor_signals = 5;
+ break;
+ case TTT_MODE_1:
+ case TTT_MODE_2:
+ case TTT_MODE_3:
+ case TTT_MODE_4:
+ case TTT_MODE_5:
+ p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
+ curr_state->num_decor_signals = 5;
+ break;
+ default:
+ if (p_bs_config->bs_ttt_mode_low[0] <= 1)
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE;
+ break;
+ }
+ }
+
+ if (curr_state->residual_coding == 1) {
+ curr_state->num_x_channels = 3;
+ } else {
+ curr_state->num_x_channels = 2;
+ }
+
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_x_channels = 5;
+ }
+
+ if (curr_state->up_mix_type == 2) {
+ curr_state->num_direct_signals = 2;
+ curr_state->num_decor_signals = 0;
+ curr_state->num_x_channels = 2;
+
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->num_direct_signals = 4;
+ curr_state->num_x_channels = 5;
+ }
+ }
+
+ curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
+ curr_state->num_w_channels = curr_state->num_v_channels;
+ curr_state->w_start_residual_idx = 1;
+ curr_state->ott_cld_default[0] = 15;
+ curr_state->ott_cld_default[1] = 15;
+ curr_state->ott_cld_default[2] = 15;
+ curr_state->ott_cld_default[3] = 15;
+ curr_state->ott_cld_default[4] = 15;
+ break;
+ case TREE_7571:
+ case TREE_7572:
+ curr_state->num_direct_signals = 6;
+ curr_state->num_decor_signals = 2;
+ curr_state->num_x_channels = 6;
+ curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
+ curr_state->num_w_channels = curr_state->num_v_channels;
+ curr_state->w_start_residual_idx = 0;
+ curr_state->ott_cld_default[0] = 15;
+ curr_state->ott_cld_default[1] = 15;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
+ break;
+ }
+ return IA_NO_ERROR;
+}
+
+VOID ixheaacd_get_dequant_tables(
+ WORD32 **cld, WORD32 **icc, WORD32 **cpc,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ *cld = ixheaacd_mps_dec_bitdec_tables->dequant_cld;
+ *icc = ixheaacd_mps_dec_bitdec_tables->dequant_icc;
+ *cpc = ixheaacd_mps_dec_bitdec_tables->dequant_cpc;
+}
+
+WORD32 ixheaacd_quantize_cld(WORD32 v,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 i = 1;
+ WORD32 temp_1;
+ WORD32 vmin = ixheaacd_mps_dec_bitdec_tables->dequant_cld[0];
+ WORD32 dmin = abs(v - vmin);
+
+ do {
+ temp_1 = abs(v - ixheaacd_mps_dec_bitdec_tables->dequant_cld[i]);
+ if (temp_1 < dmin) {
+ dmin = temp_1;
+ vmin = ixheaacd_mps_dec_bitdec_tables->dequant_cld[i];
+ }
+ } while (ixheaacd_mps_dec_bitdec_tables->dequant_cld[i++] < ONE_FORTYNINE_Q15);
+ return vmin;
+}
+
+WORD32 ixheaacd_quantize_icc(WORD32 v,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
+ WORD32 i = 1;
+ WORD32 temp_1;
+ WORD32 vmin = ixheaacd_mps_dec_bitdec_tables->dequant_icc[0];
+ WORD32 dmin = abs(v - vmin);
+
+ do {
+ temp_1 = abs(v - ixheaacd_mps_dec_bitdec_tables->dequant_icc[i]);
+ if (temp_1 < dmin) {
+ dmin = temp_1;
+ vmin = ixheaacd_mps_dec_bitdec_tables->dequant_icc[i];
+ }
+ } while (ixheaacd_mps_dec_bitdec_tables->dequant_icc[i++] > MINUS_POINT_NINE_EIGHT_Q15);
+
+ return vmin;
+}
diff --git a/decoder/ixheaacd_mps_bitdec.h b/decoder/ixheaacd_mps_bitdec.h
new file mode 100644
index 0000000..b4a4931
--- /dev/null
+++ b/decoder/ixheaacd_mps_bitdec.h
@@ -0,0 +1,80 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_BITDEC_H
+#define IXHEAACD_MPS_BITDEC_H
+
+enum { EXT_TYPE_0 = 0, EXT_TYPE_1 = 1, EXT_TYPE_2 = 2 };
+
+enum { QUANT_MODE_0 = 0, QUANT_MODE_1 = 1, QUANT_MODE_2 = 2 };
+
+enum { IN_CH_1 = 1, IN_CH_2 = 2, IN_CH_6 = 6 };
+
+enum {
+ TREE_5151 = 0,
+ TREE_5152 = 1,
+ TREE_525 = 2,
+ TREE_7271 = 3,
+ TREE_7272 = 4,
+ TREE_7571 = 5,
+ TREE_7572 = 6
+};
+
+enum {
+ PARAMETER_BANDS_4 = 4,
+ PARAMETER_BANDS_5 = 5,
+ PARAMETER_BANDS_7 = 7,
+ PARAMETER_BANDS_10 = 10,
+ PARAMETER_BANDS_14 = 14,
+ PARAMETER_BANDS_20 = 20,
+ PARAMETER_BANDS_28 = 28,
+ PARAMETER_BANDS_40 = 40
+};
+
+enum { SMOOTH_MODE_0 = 0, SMOOTH_MODE_1 = 1, SMOOTH_MODE_2 = 2, SMOOTH_MODE_3 = 3 };
+
+enum {
+ TTT_MODE_0 = 0,
+ TTT_MODE_1 = 1,
+ TTT_MODE_2 = 2,
+ TTT_MODE_3 = 3,
+ TTT_MODE_4 = 4,
+ TTT_MODE_5 = 5
+};
+
+IA_ERRORCODE ixheaacd_parse_specific_config(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 sac_header_len);
+
+IA_ERRORCODE ixheaacd_default_specific_config(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 sampling_freq);
+
+IA_ERRORCODE ixheaacd_decode_frame(ia_heaac_mps_state_struct *pstr_mps_state);
+
+IA_ERRORCODE ixheaacd_set_current_state_parameters(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_get_dequant_tables(WORD32 **cld, WORD32 **icc, WORD32 **cpc,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables);
+
+WORD32 ixheaacd_quantize_icc(WORD32 v,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables);
+
+WORD32 ixheaacd_quantize_cld(WORD32 v,
+ ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables);
+
+#endif /* IXHEAACD_MPS_BITDEC_H */
diff --git a/decoder/ixheaacd_mps_blind.c b/decoder/ixheaacd_mps_blind.c
new file mode 100644
index 0000000..3aff243
--- /dev/null
+++ b/decoder/ixheaacd_mps_blind.c
@@ -0,0 +1,427 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_blind.h"
+
+static IA_ERRORCODE ixheaacd_get_sampling_freq_idx(
+ WORD32 sampling_freq, ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables,
+ WORD32 *idx) {
+ WORD32 i;
+ for (i = 0; i < 13; i++) {
+ if (ixheaacd_mps_dec_bitdec_tables->sampling_freq_table[i] == sampling_freq) {
+ *idx = i;
+ return IA_NO_ERROR;
+ }
+ }
+ *idx = 3;
+ return IA_XHEAAC_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE;
+}
+
+VOID ixheaacd_init_blind(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_blind_decoder_struct *blind = pstr_mps_state->mps_persistent_mem.blind_decoder;
+ ia_mps_dec_blind_tables_struct *p_blind_table =
+ pstr_mps_state->ia_mps_dec_mps_table.blind_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 temp_1, temp_2;
+ WORD32 q_64, q_32, q_16, q_8, q_4, q_2;
+ WORD32 r_64, r_32, r_16, r_8, r_4, r_2;
+ WORD32 i;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+
+ ixheaacd_get_sampling_freq_idx(pstr_mps_state->sampling_freq,
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr, &temp_1);
+ if (pstr_mps_state->qmf_bands == 128)
+ blind->filter_coeff = p_blind_table->exp_128[temp_1];
+ else {
+ q_64 = (WORD32)(qmf_bands >> 6) ? p_blind_table->exp_64[temp_1] : ONE_IN_Q15;
+ r_64 = (WORD32)(qmf_bands & SIX_BIT_MASK);
+
+ q_32 = (WORD32)(r_64 >> 5) ? p_blind_table->exp_32[temp_1] : ONE_IN_Q15;
+ r_32 = (WORD32)(r_64 & FIVE_BIT_MASK);
+
+ q_16 = (WORD32)(r_32 >> 4) ? p_blind_table->exp_16[temp_1] : ONE_IN_Q15;
+ r_16 = (WORD32)(r_32 & FOUR_BIT_MASK);
+
+ q_8 = (WORD32)(r_16 >> 3) ? p_blind_table->exp_8[temp_1] : ONE_IN_Q15;
+ r_8 = (WORD32)(r_16 & THREE_BIT_MASK);
+
+ q_4 = (WORD32)(r_8 >> 2) ? p_blind_table->exp_4[temp_1] : ONE_IN_Q15;
+ r_4 = (WORD32)(r_8 & TWO_BIT_MASK);
+
+ q_2 = (WORD32)(r_4 >> 1) ? p_blind_table->exp_2[temp_1] : ONE_IN_Q15;
+ r_2 = (WORD32)(r_4 & ONE_BIT_MASK) ? p_blind_table->exp_1[temp_1] : ONE_IN_Q15;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(ixheaacd_mps_mult32_shr_15(q_64, q_32), q_16);
+ temp_2 = ixheaacd_mps_mult32_shr_15(ixheaacd_mps_mult32_shr_15(q_8, q_4), q_2);
+ blind->filter_coeff =
+ ixheaacd_mps_mult32_shr_15(ixheaacd_mps_mult32_shr_15(temp_1, temp_2), r_2);
+ }
+ for (i = 0; i < MAX_PARAMETER_BANDS; i++) {
+ blind->excitation[0][i] = ABS_THR_FIX;
+ blind->excitation[1][i] = ABS_THR_FIX;
+ blind->excitation[2][i] = ABS_THR_FIX;
+
+ blind->q_excitation[0][i] = 15;
+ blind->q_excitation[1][i] = 15;
+ blind->q_excitation[2][i] = 15;
+ }
+
+ memset(p_aux_struct->temp_shape_enable_channel_stp, 0,
+ MAX_OUTPUT_CHANNELS_MPS * sizeof(p_aux_struct->temp_shape_enable_channel_stp[0]));
+ memset(p_aux_struct->temp_shape_enable_channel_ges, 0,
+ MAX_OUTPUT_CHANNELS_MPS * sizeof(p_aux_struct->temp_shape_enable_channel_ges[0]));
+}
+
+static VOID ixheaacd_signal_2_parameters(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps) {
+ ia_mps_dec_blind_decoder_struct *blind = pstr_mps_state->mps_persistent_mem.blind_decoder;
+ ia_mps_dec_blind_tables_struct *p_blind_table =
+ pstr_mps_state->ia_mps_dec_mps_table.blind_table_ptr;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+
+ WORD32 cld_index;
+ WORD32 icc_index;
+ WORD32 mesh[2][2];
+ WORD32 pb;
+ WORD32 *dequant_cld;
+ WORD32 *dequant_icc;
+ WORD32 *dequant_cpc;
+ WORD32 cld;
+ WORD32 icc;
+ WORD16 q_icc;
+ WORD32 cld_delta;
+ WORD32 icc_delta;
+ WORD16 q_icc_delta;
+ WORD32 temp_1;
+ WORD16 qtemp1, qtemp;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+
+ ixheaacd_get_dequant_tables(&dequant_cld, &dequant_icc, &dequant_cpc,
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ temp_1 = ixheaacd_mps_div_32(blind->excitation[0][pb], blind->excitation[1][pb], &qtemp1);
+ qtemp1 = qtemp1 + blind->q_excitation[0][pb] - blind->q_excitation[1][pb];
+ cld = 10 * ixheaacd_mps_log10(temp_1, qtemp1);
+
+ qtemp1 = blind->q_excitation[0][pb];
+ temp_1 = ixheaacd_mps_mult32(blind->excitation[0][pb], blind->excitation[1][pb], &qtemp1,
+ blind->q_excitation[1][pb]);
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ icc = ixheaacd_mps_div_32(blind->excitation[2][pb], temp_1, &q_icc);
+ q_icc = q_icc + blind->q_excitation[2][pb] - qtemp1;
+
+ if (abs(cld) > THIRTY_IN_Q16)
+ cld_delta = THIRTY_IN_Q16;
+ else
+ cld_delta = ixheaacd_abs32(cld);
+
+ q_icc_delta = q_icc;
+ icc_delta = ixheaacd_mps_add32(icc, ONE_IN_Q15, &q_icc_delta, 15);
+ icc_delta = ixheaacd_mps_mult32(icc_delta, 10, &q_icc_delta, 0);
+
+ temp_1 = cld_delta >> 16;
+ if (temp_1 > 29)
+ cld_index = 29;
+ else
+ cld_index = temp_1;
+
+ temp_1 = icc_delta >> q_icc_delta;
+ if (temp_1 > 19)
+ icc_index = 19;
+ else
+ icc_index = temp_1;
+
+ cld_delta -= (cld_index << 16);
+ icc_delta -= (icc_index << q_icc_delta);
+
+ mesh[0][0] = p_blind_table->mesh_table.blind_cld_mesh[cld_index][icc_index] + 15;
+ mesh[0][1] = p_blind_table->mesh_table.blind_cld_mesh[cld_index][icc_index + 1] + 15;
+ mesh[1][0] = p_blind_table->mesh_table.blind_cld_mesh[cld_index + 1][icc_index] + 15;
+ mesh[1][1] = p_blind_table->mesh_table.blind_cld_mesh[cld_index + 1][icc_index + 1] + 15;
+
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, (mesh[0][1] - mesh[0][0]), &qtemp1, 0);
+ qtemp = 15;
+ p_aux_struct->ott_cld[0][ps][pb] =
+ ixheaacd_mps_add32((mesh[0][0] << 15), temp_1, &qtemp, qtemp1);
+ qtemp1 = 16;
+ temp_1 = ixheaacd_mps_mult32(cld_delta, (mesh[1][0] - mesh[0][0]), &qtemp1, 0);
+ p_aux_struct->ott_cld[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_cld[0][ps][pb], temp_1, &qtemp, qtemp1);
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, cld_delta, &qtemp1, 16);
+ temp_1 = ixheaacd_mps_mult32(temp_1, (mesh[1][1] - mesh[0][1] - mesh[1][0] + mesh[0][0]),
+ &qtemp1, 0);
+ p_aux_struct->ott_cld[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_cld[0][ps][pb], temp_1, &qtemp, qtemp1);
+
+ p_aux_struct->ott_cld[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_cld[0][ps][pb], ONE_IN_Q14, &qtemp, 15);
+ p_aux_struct->ott_cld[0][ps][pb] = dequant_cld[((p_aux_struct->ott_cld[0][ps][pb]) >> qtemp)];
+
+ mesh[0][0] = p_blind_table->mesh_table.blind_icc_mesh[cld_index][icc_index];
+ mesh[0][1] = p_blind_table->mesh_table.blind_icc_mesh[cld_index][icc_index + 1];
+ mesh[1][0] = p_blind_table->mesh_table.blind_icc_mesh[cld_index + 1][icc_index];
+ mesh[1][1] = p_blind_table->mesh_table.blind_icc_mesh[cld_index + 1][icc_index + 1];
+
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, (mesh[0][1] - mesh[0][0]), &qtemp1, 0);
+ qtemp = 15;
+ p_aux_struct->ott_icc[0][ps][pb] =
+ ixheaacd_mps_add32((mesh[0][0] << 15), temp_1, &qtemp, qtemp1);
+ qtemp1 = 16;
+ temp_1 = ixheaacd_mps_mult32(cld_delta, (mesh[1][0] - mesh[0][0]), &qtemp1, 0);
+ p_aux_struct->ott_icc[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_icc[0][ps][pb], temp_1, &qtemp, qtemp1);
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, cld_delta, &qtemp1, 16);
+ temp_1 = ixheaacd_mps_mult32(temp_1, (mesh[1][1] - mesh[0][1] - mesh[1][0] + mesh[0][0]),
+ &qtemp1, 0);
+ p_aux_struct->ott_icc[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_icc[0][ps][pb], temp_1, &qtemp, qtemp1);
+
+ p_aux_struct->ott_icc[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ott_icc[0][ps][pb], ONE_IN_Q14, &qtemp, 15);
+ p_aux_struct->ott_icc[0][ps][pb] = dequant_icc[((p_aux_struct->ott_icc[0][ps][pb]) >> qtemp)];
+
+ mesh[0][0] = p_blind_table->mesh_table.blind_cpc_1_mesh[cld_index][icc_index] + 20;
+ mesh[0][1] = p_blind_table->mesh_table.blind_cpc_1_mesh[cld_index][icc_index + 1] + 20;
+ mesh[1][0] = p_blind_table->mesh_table.blind_cpc_1_mesh[cld_index + 1][icc_index] + 20;
+ mesh[1][1] = p_blind_table->mesh_table.blind_cpc_1_mesh[cld_index + 1][icc_index + 1] + 20;
+
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, (mesh[0][1] - mesh[0][0]), &qtemp1, 0);
+ qtemp = 15;
+ p_aux_struct->ttt_cpc_1[0][ps][pb] =
+ ixheaacd_mps_add32((mesh[0][0] << 15), temp_1, &qtemp, qtemp1);
+ qtemp1 = 16;
+ temp_1 = ixheaacd_mps_mult32(cld_delta, (mesh[1][0] - mesh[0][0]), &qtemp1, 0);
+ p_aux_struct->ttt_cpc_1[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_1[0][ps][pb], temp_1, &qtemp, qtemp1);
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, cld_delta, &qtemp1, 16);
+ temp_1 = ixheaacd_mps_mult32(temp_1, (mesh[1][1] - mesh[0][1] - mesh[1][0] + mesh[0][0]),
+ &qtemp1, 0);
+ p_aux_struct->ttt_cpc_1[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_1[0][ps][pb], temp_1, &qtemp, qtemp1);
+
+ p_aux_struct->ttt_cpc_1[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_1[0][ps][pb], ONE_IN_Q14, &qtemp, 15);
+ p_aux_struct->ttt_cpc_1[0][ps][pb] =
+ dequant_cpc[((p_aux_struct->ttt_cpc_1[0][ps][pb]) >> qtemp)];
+
+ mesh[0][0] = p_blind_table->mesh_table.blind_cpc_2_mesh[cld_index][icc_index] + 20;
+ mesh[0][1] = p_blind_table->mesh_table.blind_cpc_2_mesh[cld_index][icc_index + 1] + 20;
+ mesh[1][0] = p_blind_table->mesh_table.blind_cpc_2_mesh[cld_index + 1][icc_index] + 20;
+ mesh[1][1] = p_blind_table->mesh_table.blind_cpc_2_mesh[cld_index + 1][icc_index + 1] + 20;
+
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, (mesh[0][1] - mesh[0][0]), &qtemp1, 0);
+ qtemp = 15;
+ p_aux_struct->ttt_cpc_2[0][ps][pb] =
+ ixheaacd_mps_add32((mesh[0][0] < 15), temp_1, &qtemp, qtemp1);
+ qtemp1 = 16;
+ temp_1 = ixheaacd_mps_mult32(cld_delta, (mesh[1][0] - mesh[0][0]), &qtemp1, 0);
+ p_aux_struct->ttt_cpc_2[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_2[0][ps][pb], temp_1, &qtemp, qtemp1);
+ qtemp1 = q_icc_delta;
+ temp_1 = ixheaacd_mps_mult32(icc_delta, cld_delta, &qtemp1, 16);
+ temp_1 = ixheaacd_mps_mult32(temp_1, (mesh[1][1] - mesh[0][1] - mesh[1][0] + mesh[0][0]),
+ &qtemp1, 0);
+ p_aux_struct->ttt_cpc_2[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_2[0][ps][pb], temp_1, &qtemp, qtemp1);
+
+ p_aux_struct->ttt_cpc_2[0][ps][pb] =
+ ixheaacd_mps_add32(p_aux_struct->ttt_cpc_2[0][ps][pb], ONE_IN_Q14, &qtemp, 15);
+ p_aux_struct->ttt_cpc_2[0][ps][pb] =
+ dequant_cpc[((p_aux_struct->ttt_cpc_2[0][ps][pb]) >> qtemp)];
+
+ if (cld < 0) {
+ cld = p_aux_struct->ttt_cpc_2[0][ps][pb];
+ p_aux_struct->ttt_cpc_2[0][ps][pb] = p_aux_struct->ttt_cpc_1[0][ps][pb];
+ p_aux_struct->ttt_cpc_1[0][ps][pb] = cld;
+ }
+ }
+}
+
+static VOID ixheaacd_update_down_mix_state(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 offset) {
+ ia_mps_dec_blind_decoder_struct *blind = pstr_mps_state->mps_persistent_mem.blind_decoder;
+ WORD32 ts;
+ WORD32 hb;
+ WORD32 pb;
+ WORD32 *excitation_0, *excitation_1, *excitation_2;
+ WORD16 *q_excitation_0, *q_excitation_1, *q_excitation_2;
+ WORD32 temp_1, temp_2;
+ WORD16 qtemp1, qtemp2;
+ WORD32 *p_x_real, *p_x_imag;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+ excitation_0 = pstr_mps_state->mps_scratch_mem_v;
+ q_excitation_0 = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX2;
+ excitation_1 = excitation_0 + PARAMETER_BANDSX1_5;
+ q_excitation_1 = q_excitation_0 + PARAMETER_BANDSX3;
+ excitation_2 = excitation_1 + PARAMETER_BANDSX1_5;
+ q_excitation_2 = q_excitation_1 + PARAMETER_BANDSX3;
+
+ p_x_real = &pstr_mps_state->array_struct->x_real[offset * MAX_HYBRID_BANDS];
+ p_x_imag = &pstr_mps_state->array_struct->x_imag[offset * MAX_HYBRID_BANDS];
+ for (ts = 0; ts < HOP_SLOTS; ts++) {
+ WORD32 *x_real_0 = p_x_real;
+ WORD32 *x_imag_0 = p_x_imag;
+
+ WORD32 *x_real_1 = p_x_real + TSXHB;
+ WORD32 *x_imag_1 = p_x_imag + TSXHB;
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ excitation_0[pb] = ABS_THR_FIX;
+ excitation_1[pb] = ABS_THR_FIX;
+ excitation_2[pb] = ABS_THR_FIX;
+
+ q_excitation_0[pb] = 15;
+ q_excitation_1[pb] = 15;
+ q_excitation_2[pb] = 15;
+ }
+
+ for (hb = 0; hb < hybrid_bands; hb++) {
+ WORD64 temp;
+ pb = (WORD32)pstr_mps_state->kernels[hb];
+
+ temp =
+ (WORD64)((WORD64)*x_real_0 * (WORD64)*x_real_0 + (WORD64)*x_imag_0 * (WORD64)*x_imag_0);
+ temp >>= 10;
+ temp_1 = (WORD32)temp;
+ qtemp1 = 10;
+ excitation_0[pb] =
+ ixheaacd_mps_add32(excitation_0[pb], temp_1, &(q_excitation_0[pb]), qtemp1);
+
+ temp =
+ (WORD64)((WORD64)*x_real_1 * (WORD64)*x_real_1 + (WORD64)*x_imag_1 * (WORD64)*x_imag_1);
+ temp >>= 10;
+ temp_1 = (WORD32)temp;
+ qtemp1 = 10;
+ excitation_1[pb] =
+ ixheaacd_mps_add32(excitation_1[pb], temp_1, &(q_excitation_1[pb]), qtemp1);
+
+ temp =
+ (WORD64)((WORD64)*x_real_0 * (WORD64)*x_real_1 + (WORD64)*x_imag_0 * (WORD64)*x_imag_1);
+ temp >>= 10;
+ temp_1 = (WORD32)temp;
+ qtemp1 = 10;
+ excitation_2[pb] =
+ ixheaacd_mps_add32(excitation_2[pb], temp_1, &(q_excitation_2[pb]), qtemp1);
+
+ x_real_0++;
+ x_imag_0++;
+ x_real_1++;
+ x_imag_1++;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ blind->excitation[0][pb] =
+ ixheaacd_mps_mult32_shr_15(blind->excitation[0][pb], blind->filter_coeff);
+ blind->excitation[1][pb] =
+ ixheaacd_mps_mult32_shr_15(blind->excitation[1][pb], blind->filter_coeff);
+ blind->excitation[2][pb] =
+ ixheaacd_mps_mult32_shr_15(blind->excitation[2][pb], blind->filter_coeff);
+
+ temp_1 = ONE_IN_Q15 - blind->filter_coeff;
+
+ qtemp2 = *q_excitation_0++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *excitation_0);
+ excitation_0++;
+
+ blind->excitation[0][pb] = ixheaacd_mps_add32(blind->excitation[0][pb], temp_2,
+ &(blind->q_excitation[0][pb]), qtemp2);
+
+ qtemp2 = *q_excitation_1++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *excitation_1);
+ excitation_1++;
+
+ blind->excitation[1][pb] = ixheaacd_mps_add32(blind->excitation[1][pb], temp_2,
+ &(blind->q_excitation[1][pb]), qtemp2);
+
+ qtemp2 = *q_excitation_2++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *excitation_2);
+ excitation_2++;
+
+ blind->excitation[2][pb] = ixheaacd_mps_add32(blind->excitation[2][pb], temp_2,
+ &(blind->q_excitation[2][pb]), qtemp2);
+ }
+ excitation_0[pb] -= num_parameter_bands;
+ excitation_1[pb] -= num_parameter_bands;
+ excitation_2[pb] -= num_parameter_bands;
+
+ q_excitation_0[pb] -= num_parameter_bands;
+ q_excitation_1[pb] -= num_parameter_bands;
+ q_excitation_2[pb] -= num_parameter_bands;
+
+ p_x_real += MAX_HYBRID_BANDS;
+ p_x_imag += MAX_HYBRID_BANDS;
+ }
+}
+
+VOID ixheaacd_apply_blind(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
+ WORD32 ts;
+ WORD32 ps;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+
+ for (ts = 0, ps = 0; ts < time_slots; ts += HOP_SLOTS, ps++) {
+ param_slot[ps] = ts + HOP_SLOTS - 1;
+
+ ixheaacd_signal_2_parameters(pstr_mps_state, ps);
+ ixheaacd_update_down_mix_state(pstr_mps_state, ts);
+ }
+
+ pstr_mps_state->num_parameter_sets_prev = ps;
+ pstr_mps_state->num_parameter_sets = ps;
+ frame->bs_independency_flag = 0;
+ pstr_mps_state->aux_struct->num_ott_bands[0] = pstr_mps_state->num_parameter_bands;
+
+ return;
+}
diff --git a/decoder/ixheaacd_mps_blind.h b/decoder/ixheaacd_mps_blind.h
new file mode 100644
index 0000000..d213dce
--- /dev/null
+++ b/decoder/ixheaacd_mps_blind.h
@@ -0,0 +1,29 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_BLIND_H
+#define IXHEAACD_MPS_BLIND_H
+
+#define HOP_SLOTS (4)
+
+VOID ixheaacd_init_blind(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_apply_blind(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_BLIND_H */
diff --git a/decoder/ixheaacd_mps_calc_m1m2_common.c b/decoder/ixheaacd_mps_calc_m1m2_common.c
new file mode 100644
index 0000000..a1532d8
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_common.c
@@ -0,0 +1,930 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+
+VOID ixheaacd_get_matrix_inversion_weights(
+ WORD32 iid_lf_ls_idx, WORD32 iid_rf_rs_idx, WORD32 prediction_mode, WORD32 c1, WORD32 c2,
+ WORD32 *weight1, WORD32 *weight2, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr) {
+ WORD32 temp, temp_1, temp_2;
+ WORD16 qtemp;
+ WORD32 w1 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_2[iid_lf_ls_idx + 15];
+ WORD32 w2 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_2[iid_rf_rs_idx + 15];
+
+ if (prediction_mode == 1) {
+ if (abs(c1) >= ONE_IN_Q15) {
+ c1 = ONE_IN_Q15;
+ } else if ((c1 < MINUS_ONE_IN_Q14) && (c1 > MINUS_ONE_IN_Q15)) {
+ c1 = MINUS_ONE_IN_Q15 - (c1 << 1);
+ } else {
+ qtemp = 15;
+ temp = ixheaacd_mps_mult32(TWO_BY_THREE_Q15, c1, &qtemp, 15);
+ temp = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
+ c1 = ONE_BY_THREE_Q15 + temp;
+ }
+
+ if (abs(c2) >= ONE_IN_Q15) {
+ c2 = ONE_IN_Q15;
+ } else if ((c2 < MINUS_ONE_IN_Q14) && (c2 > MINUS_ONE_IN_Q15)) {
+ c2 = MINUS_ONE_IN_Q15 - (c2 << 1);
+ } else {
+ qtemp = 15;
+ temp = ixheaacd_mps_mult32(TWO_BY_THREE_Q15, c2, &qtemp, 15);
+ temp = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
+ qtemp = 15;
+ temp = ixheaacd_mps_add32(temp, ONE_BY_THREE_Q15, &qtemp, 15);
+ c2 = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
+ }
+ } else {
+ WORD32 c1p, c2p;
+ WORD64 acc;
+ const WORD32 *cld_tab_3 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_3;
+ const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
+
+ c1p = cld_tab_3[c1 + 15];
+ c2p = cld_tab_3[c2 + 15];
+
+ acc = (WORD64)((WORD64)c1p * (WORD64)c2p);
+ acc >>= 15;
+ temp = (WORD32)acc;
+ temp_1 = (ONE_IN_Q15 + c2p) << 1;
+ acc += temp_1;
+ temp_2 = (WORD32)acc;
+
+ temp = ixheaacd_mps_div_32(temp, temp_2, &qtemp);
+
+ c1 = ixheaacd_mps_sqrt(temp, &qtemp, sqrt_tab);
+ c1 = ixheaacd_mps_convert_to_qn(c1, qtemp, 15);
+
+ temp_2 = c1p + temp_1;
+ temp = ixheaacd_mps_div_32(c1p, temp_2, &qtemp);
+ c2 = ixheaacd_mps_sqrt(temp, &qtemp, sqrt_tab);
+ c2 = ixheaacd_mps_convert_to_qn(c2, qtemp, 15);
+ }
+ temp_1 = ONE_IN_Q15 + w1;
+ temp_2 = ixheaacd_mps_mult32_shr_15(c1, w1);
+ *weight1 = ixheaacd_mps_div32_in_q15(temp_2, temp_1);
+
+ temp_1 = ONE_IN_Q15 + w2;
+ temp_2 = ixheaacd_mps_mult32_shr_15(c2, w2);
+ *weight2 = ixheaacd_mps_div32_in_q15(temp_2, temp_1);
+}
+
+VOID ixheaacd_invert_matrix(WORD32 weight1, WORD32 weight2, WORD32 h_real[][2],
+ WORD32 h_imag[][2],
+ const ia_mps_dec_common_tables_struct *common_tab_ptr) {
+ WORD32 h11_f_real, h12_f_real, h21_f_real, h22_f_real;
+ WORD32 h11_f_imag, h12_f_imag, h21_f_imag, h22_f_imag;
+
+ WORD32 inv_norm_real, inv_norm_imag, inv_norm;
+
+ WORD32 len1, len2;
+ WORD16 q_len1 = 0, q_len2 = 0;
+
+ WORD64 acc1, acc2;
+
+ len1 = ixheaacd_mps_sqrt((ONE_IN_Q15 - (weight1 << 1) + ((weight1 * weight1) >> 14)), &q_len1,
+ common_tab_ptr->sqrt_tab);
+
+ len2 = ixheaacd_mps_sqrt((ONE_IN_Q15 - (weight2 << 1) + ((weight2 * weight2) >> 14)), &q_len2,
+ common_tab_ptr->sqrt_tab);
+
+ len1 = ixheaacd_mps_convert_to_qn(len1, q_len1, 15);
+ len2 = ixheaacd_mps_convert_to_qn(len2, q_len2, 15);
+
+ h11_f_real = ixheaacd_mps_div32_in_q15((ONE_IN_Q15 - weight1), len1);
+
+ h11_f_imag = ixheaacd_mps_div32_in_q15(weight1, len1);
+
+ h22_f_imag = -(ixheaacd_mps_div32_in_q15(weight2, len2));
+
+ h12_f_real = 0;
+
+ h12_f_imag = ixheaacd_mps_mult32_shr_15(h22_f_imag, ONE_BY_SQRT_3_Q15);
+
+ h21_f_real = 0;
+
+ h21_f_imag = ixheaacd_mps_mult32_shr_15(h11_f_imag, -(ONE_BY_SQRT_3_Q15));
+
+ h22_f_real = ixheaacd_mps_div32_in_q15((ONE_IN_Q15 - weight2), len2);
+
+ acc1 =
+ (WORD64)((WORD64)h11_f_real * (WORD64)h22_f_real - (WORD64)h11_f_imag * (WORD64)h22_f_imag);
+ acc1 >>= 15;
+
+ acc2 =
+ (WORD64)((WORD64)h12_f_real * (WORD64)h21_f_real - (WORD64)h12_f_imag * (WORD64)h21_f_imag);
+ acc2 >>= 15;
+ inv_norm_real = (WORD32)(acc1 - acc2);
+
+ acc1 =
+ (WORD64)((WORD64)h11_f_real * (WORD64)h22_f_imag + (WORD64)h11_f_imag * (WORD64)h22_f_real);
+ acc1 >>= 15;
+
+ acc2 =
+ (WORD64)((WORD64)h12_f_real * (WORD64)h21_f_imag + (WORD64)h12_f_imag * (WORD64)h21_f_real);
+ acc2 >>= 15;
+ inv_norm_imag = (WORD32)(acc1 + acc2);
+
+ acc1 = (WORD64)((WORD64)inv_norm_real * (WORD64)inv_norm_real +
+ (WORD64)inv_norm_imag * (WORD64)inv_norm_imag);
+ acc1 >>= 15;
+ inv_norm = (WORD32)acc1;
+
+ inv_norm_real = ixheaacd_mps_div32_in_q15(inv_norm_real, inv_norm);
+ inv_norm_imag = -(ixheaacd_mps_div32_in_q15(inv_norm_imag, inv_norm));
+
+ acc1 = (WORD64)((WORD64)h22_f_real * (WORD64)inv_norm_real -
+ (WORD64)h22_f_imag * (WORD64)inv_norm_imag);
+ acc1 >>= 15;
+ h_real[0][0] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h22_f_real * (WORD64)inv_norm_imag +
+ (WORD64)h22_f_imag * (WORD64)inv_norm_real);
+ acc1 >>= 15;
+ h_imag[0][0] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h12_f_imag * (WORD64)inv_norm_imag -
+ (WORD64)h12_f_real * (WORD64)inv_norm_real);
+ acc1 >>= 15;
+ h_real[0][1] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h12_f_real * (WORD64)inv_norm_imag +
+ (WORD64)h12_f_imag * (WORD64)inv_norm_real);
+ acc1 = -(acc1 >> 15);
+ h_imag[0][1] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h21_f_imag * (WORD64)inv_norm_imag -
+ (WORD64)h21_f_real * (WORD64)inv_norm_real);
+ acc1 >>= 15;
+ h_real[1][0] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h21_f_real * (WORD64)inv_norm_imag +
+ (WORD64)h21_f_imag * (WORD64)inv_norm_real);
+ acc1 = -(acc1 >> 15);
+ h_imag[1][0] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h11_f_real * (WORD64)inv_norm_real -
+ (WORD64)h11_f_imag * (WORD64)inv_norm_imag);
+ acc1 >>= 15;
+ h_real[1][1] = (WORD32)acc1;
+
+ acc1 = (WORD64)((WORD64)h11_f_real * (WORD64)inv_norm_imag +
+ (WORD64)h11_f_imag * (WORD64)inv_norm_real);
+ acc1 >>= 15;
+ h_imag[1][1] = (WORD32)acc1;
+}
+
+WORD32 ixheaacd_dequant_icc_band(WORD32 iccband, WORD32 cldband) {
+ if (iccband < 6) {
+ return iccband;
+ }
+ if (iccband == 6) {
+ if (cldband > 9 && cldband < 21) {
+ switch (cldband) {
+ case 10:
+ case 20:
+ return 10;
+ case 11:
+ case 19:
+ return 11;
+ case 12:
+ case 18:
+ return 12;
+ case 13:
+ case 17:
+ return 13;
+ case 14:
+ case 16:
+ return 14;
+ case 15:
+ return 15;
+ default:
+ return iccband;
+ }
+ } else {
+ return iccband;
+ }
+ }
+ if (7 == iccband) {
+ if (cldband > 7 && cldband < 23) {
+ switch (cldband) {
+ case 8:
+ case 22:
+ return 8;
+ case 9:
+ case 21:
+ return 9;
+ case 10:
+ case 20:
+ return 10;
+ case 11:
+ case 19:
+ return 11;
+ case 12:
+ case 18:
+ return 12;
+ case 13:
+ case 17:
+ return 13;
+ case 14:
+ case 16:
+ return 14;
+ case 15:
+ return 15;
+ default:
+ return iccband;
+ }
+ } else {
+ return iccband;
+ }
+ } else {
+ return iccband;
+ }
+}
+
+WORD32 ixheaacd_dequant_cld_band(WORD32 cld) {
+ switch (cld) {
+ case -4915200:
+ return 0;
+ case -1474560:
+ return 1;
+ case -1310720:
+ return 2;
+ case -1146880:
+ return 3;
+ case -983040:
+ return 4;
+ case -819200:
+ return 5;
+ case -720896:
+ return 6;
+ case -622592:
+ return 7;
+ case -524288:
+ return 8;
+ case -425984:
+ return 9;
+ case -327680:
+ return 10;
+ case -262144:
+ return 11;
+ case -196608:
+ return 12;
+ case -131072:
+ return 13;
+ case -65536:
+ return 14;
+ case 0:
+ return 15;
+ case 65536:
+ return 16;
+ case 131072:
+ return 17;
+ case 196608:
+ return 18;
+ case 262144:
+ return 19;
+ case 327680:
+ return 20;
+ case 425984:
+ return 21;
+ case 524288:
+ return 22;
+ case 622592:
+ return 23;
+ case 720896:
+ return 24;
+ case 819200:
+ return 25;
+ case 983040:
+ return 26;
+ case 1146880:
+ return 27;
+ case 1310720:
+ return 28;
+ case 1474560:
+ return 29;
+ case 4915200:
+ return 30;
+ default:
+ return 0;
+ }
+}
+
+VOID ixheaacd_param_2_umx_ps_core_tables(
+ WORD32 cld[MAX_PARAMETER_BANDS], WORD32 icc[MAX_PARAMETER_BANDS], WORD32 num_ott_bands,
+ WORD32 res_bands, WORD32 h11[MAX_PARAMETER_BANDS], WORD32 h12[MAX_PARAMETER_BANDS],
+ WORD32 h21[MAX_PARAMETER_BANDS], WORD32 h22[MAX_PARAMETER_BANDS],
+ WORD32 h12_res[MAX_PARAMETER_BANDS], WORD32 h22_res[MAX_PARAMETER_BANDS],
+ WORD16 c_l[MAX_PARAMETER_BANDS], WORD16 c_r[MAX_PARAMETER_BANDS],
+ const ia_mps_dec_m1_m2_tables_struct *ixheaacd_mps_dec_m1_m2_tables) {
+ WORD32 band;
+ WORD32 quant_band_cld, quant_band_icc;
+
+ for (band = 0; band < num_ott_bands; band++) {
+ quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
+
+ c_l[band] = (WORD16)ixheaacd_mps_dec_m1_m2_tables->c_l_table[quant_band_cld];
+ c_r[band] = (WORD16)ixheaacd_mps_dec_m1_m2_tables->c_l_table[30 - quant_band_cld];
+ }
+
+ for (band = 0; band < num_ott_bands; band++) {
+ if (band < res_bands) {
+ quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
+ quant_band_icc = ixheaacd_dequant_icc_band(icc[band], quant_band_cld);
+
+ h11[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][quant_band_cld];
+ h11[band] = ixheaacd_mps_mult32_shr_15(h11[band], c_l[band]);
+ h21[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][30 - quant_band_cld];
+ h21[band] = ixheaacd_mps_mult32_shr_15(h21[band], c_r[band]);
+
+ h12[band] = 0;
+ h22[band] = 0;
+ h12_res[band] = ONE_IN_Q15;
+ h22_res[band] = MINUS_ONE_IN_Q15;
+ } else {
+ quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
+ if (quant_band_cld < 0 || quant_band_cld >= 31) {
+ quant_band_cld = 30;
+ }
+
+ quant_band_icc = icc[band];
+
+ if (quant_band_icc < 0 || quant_band_icc >= 8) {
+ quant_band_icc = 7;
+ }
+ h11[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][quant_band_cld];
+ h11[band] = ixheaacd_mps_mult32_shr_15(h11[band], c_l[band]);
+ h21[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][30 - quant_band_cld];
+ h21[band] = ixheaacd_mps_mult32_shr_15(h21[band], c_r[band]);
+ h12[band] = ixheaacd_mps_dec_m1_m2_tables->sin_table[quant_band_icc][quant_band_cld];
+ h12[band] = ixheaacd_mps_mult32_shr_15(h12[band], c_l[band]);
+ h22[band] = -ixheaacd_mps_dec_m1_m2_tables->sin_table[quant_band_icc][30 - quant_band_cld];
+ h22[band] = ixheaacd_mps_mult32_shr_15(h22[band], c_r[band]);
+
+ h12_res[band] = 0;
+ h22_res[band] = 0;
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_param_2_umx_ps(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 *h11, WORD32 *h12,
+ WORD32 *h21, WORD32 *h22, WORD32 *h12_res, WORD32 *h22_res,
+ WORD16 *c_l, WORD16 *c_r, WORD32 ott_box_indx,
+ WORD32 parameter_set_indx, WORD32 res_bands) {
+ WORD32 band;
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+
+ ixheaacd_param_2_umx_ps_core_tables(p_aux_struct->ott_cld[ott_box_indx][parameter_set_indx],
+ p_cur_bs->ott_icc_idx[ott_box_indx][parameter_set_indx],
+ p_aux_struct->num_ott_bands[ott_box_indx], res_bands, h11,
+ h12, h21, h22, h12_res, h22_res, c_l, c_r,
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr);
+
+ for (band = p_aux_struct->num_ott_bands[ott_box_indx]; band < num_parameter_bands; band++) {
+ h11[band] = h21[band] = h12[band] = h22[band] = h12_res[band] = h22_res[band] = 0;
+ }
+ return;
+}
+
+static WORD32 ixheaacd_dequant_one_by_icc(WORD32 icc) {
+ switch (icc) {
+ case 32768:
+ return 32768;
+ case 30704:
+ return 34971;
+ case 27564:
+ return 38955;
+ case 19691:
+ return 54530;
+ case 12047:
+ return 89131;
+ case 0:
+ return 0;
+ case -19300:
+ return -55633;
+ case -32440:
+ return -33099;
+ default:
+ return 0;
+ }
+}
+
+static WORD16 ixheaacd_map_cld_index(WORD32 cld_val) {
+ WORD32 temp = cld_val;
+ WORD16 idx = 0;
+ if (cld_val == 0) {
+ return 15;
+ } else {
+ if (cld_val < 0) {
+ temp = -cld_val;
+ }
+ switch (temp) {
+ case 150:
+ idx = 15;
+ break;
+ case 45:
+ idx = 14;
+ break;
+ case 40:
+ idx = 13;
+ break;
+ case 35:
+ idx = 12;
+ break;
+ case 30:
+ idx = 11;
+ break;
+ case 25:
+ idx = 10;
+ break;
+ case 22:
+ idx = 9;
+ break;
+ case 19:
+ idx = 8;
+ break;
+ case 16:
+ idx = 7;
+ break;
+ case 13:
+ idx = 6;
+ break;
+ case 10:
+ idx = 5;
+ break;
+ case 8:
+ idx = 4;
+ break;
+ case 6:
+ idx = 3;
+ break;
+ case 4:
+ idx = 2;
+ break;
+ case 2:
+ idx = 1;
+ break;
+ default:
+ idx = 0;
+ break;
+ }
+ }
+
+ return (cld_val >= 0) ? idx + 15 : 15 - idx;
+}
+
+VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb,
+ WORD32 ttt_mode, WORD32 m_ttt[][3]) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 col;
+
+ if (ttt_mode < 2) {
+ m_ttt[0][0] = (p_aux_struct->ttt_cpc_1[0][ps][pb] + ONE_IN_Q16);
+ m_ttt[0][1] = (p_aux_struct->ttt_cpc_2[0][ps][pb] - ONE_IN_Q15);
+ m_ttt[1][0] = (p_aux_struct->ttt_cpc_1[0][ps][pb] - ONE_IN_Q15);
+ m_ttt[1][1] = (p_aux_struct->ttt_cpc_2[0][ps][pb] + ONE_IN_Q16);
+ m_ttt[2][0] = (ONE_IN_Q15 - p_aux_struct->ttt_cpc_1[0][ps][pb]);
+ m_ttt[2][1] = (ONE_IN_Q15 - p_aux_struct->ttt_cpc_2[0][ps][pb]);
+
+ if (pb >= pstr_mps_state->res_bands[3]) {
+ WORD32 one_by_icc;
+ one_by_icc = ixheaacd_dequant_one_by_icc(p_aux_struct->ttt_icc[0][ps][pb]);
+
+ m_ttt[0][0] = ixheaacd_mps_mult32_shr_15(m_ttt[0][0], one_by_icc);
+ m_ttt[0][1] = ixheaacd_mps_mult32_shr_15(m_ttt[0][1], one_by_icc);
+ m_ttt[1][0] = ixheaacd_mps_mult32_shr_15(m_ttt[1][0], one_by_icc);
+ m_ttt[1][1] = ixheaacd_mps_mult32_shr_15(m_ttt[1][1], one_by_icc);
+ m_ttt[2][0] = ixheaacd_mps_mult32_shr_15(m_ttt[2][0], one_by_icc);
+ m_ttt[2][1] = ixheaacd_mps_mult32_shr_15(m_ttt[2][1], one_by_icc);
+ }
+
+ m_ttt[0][0] = ixheaacd_mult32x16in32(m_ttt[0][0], TWO_BY_THREE_Q15);
+ m_ttt[0][1] = ixheaacd_mult32x16in32(m_ttt[0][1], TWO_BY_THREE_Q15);
+ m_ttt[1][0] = ixheaacd_mult32x16in32(m_ttt[1][0], TWO_BY_THREE_Q15);
+ m_ttt[1][1] = ixheaacd_mult32x16in32(m_ttt[1][1], TWO_BY_THREE_Q15);
+ m_ttt[2][0] = ixheaacd_mult32x16in32(m_ttt[2][0], TWO_BY_THREE_Q15);
+ m_ttt[2][1] = ixheaacd_mult32x16in32(m_ttt[2][1], TWO_BY_THREE_Q15);
+ } else {
+ WORD32 center_wiener;
+ WORD32 center_subtraction;
+ WORD32 c1d, c2d;
+ WORD64 prod;
+ WORD32 w11, w00, w20, w21;
+ WORD16 q_w11, q_w00, q_w20, q_w21;
+
+ const WORD32 *ten_cld_by_10 =
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->ten_cld_by_10;
+
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ WORD16 index = ixheaacd_map_cld_index(p_aux_struct->ttt_cld_1[0][ps][pb] >> 15);
+
+ c1d = ten_cld_by_10[index];
+
+ index = ixheaacd_map_cld_index(p_aux_struct->ttt_cld_2[0][ps][pb] >> 15);
+ c2d = ten_cld_by_10[index];
+
+ if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15 ||
+ p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
+ if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15) {
+ if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == -15) {
+ w00 = ONE_BY_SQRT_2_Q15;
+ w20 = ONE_BY_SQRT_8_Q15;
+ } else {
+ w00 = ONE_IN_Q15;
+ w20 = 0;
+ }
+
+ if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
+ w11 = ONE_BY_SQRT_2_Q15;
+ w21 = ONE_BY_SQRT_8_Q15;
+ } else {
+ w11 = ONE_IN_Q15;
+ w21 = 0;
+ }
+
+ m_ttt[0][0] = w00;
+ m_ttt[2][0] = w20;
+ m_ttt[2][1] = w21;
+ m_ttt[1][1] = w11;
+ }
+
+ if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
+ const WORD32 *w00_cld2_15 =
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->w00_cld2_15;
+
+ if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15) {
+ w11 = ONE_BY_SQRT_2_Q15;
+ w21 = ONE_BY_SQRT_8_Q15;
+ } else {
+ w11 = 0;
+ w21 = ONE_IN_Q14;
+ }
+
+ w00 = w00_cld2_15[p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] + 15];
+ w20 = w00_cld2_15[15 - p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb]] / 2;
+ m_ttt[0][0] = w00;
+ m_ttt[2][0] = w20;
+ m_ttt[2][1] = w21;
+ m_ttt[1][1] = w11;
+ }
+
+ m_ttt[0][1] = 0;
+ m_ttt[1][0] = 0;
+ } else {
+ WORD32 temporary;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ prod = ixheaacd_mps_mult32_shr_15(c1d, c2d);
+
+ temporary = ixheaacd_add32_sat(ONE_IN_Q15, c2d);
+ temporary = ixheaacd_add32_sat(temporary, (WORD32)prod);
+ w00 = ixheaacd_mps_div_32((WORD32)prod, temporary, &q_w00);
+
+ w11 = ixheaacd_mps_div_32(c1d, (ixheaacd_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w11);
+
+ w20 = ixheaacd_mps_div_32((ixheaacd_add32_sat(c2d, ONE_IN_Q15)),
+ ixheaacd_add32_sat3(ONE_IN_Q15, (WORD32)prod, c2d), &q_w20);
+
+ w21 = ixheaacd_mps_div_32(ixheaacd_add32_sat(c2d, ONE_IN_Q15),
+ (ixheaacd_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w21);
+
+ m_ttt[0][0] = ixheaacd_mps_sqrt(w00, &q_w00, sqrt_tab);
+ m_ttt[0][0] = ixheaacd_mps_convert_to_qn(m_ttt[0][0], q_w00, 15);
+
+ m_ttt[0][1] = 0;
+ m_ttt[1][0] = 0;
+
+ m_ttt[1][1] = ixheaacd_mps_sqrt(w11, &q_w11, sqrt_tab);
+ m_ttt[1][1] = ixheaacd_mps_convert_to_qn(m_ttt[1][1], q_w11, 15);
+
+ m_ttt[2][0] = ixheaacd_mps_sqrt(w20, &q_w20, sqrt_tab) >> 1;
+
+ m_ttt[2][0] = ixheaacd_mps_convert_to_qn(m_ttt[2][0], q_w20, 15);
+
+ m_ttt[2][1] = ixheaacd_mps_sqrt(w21, &q_w21, sqrt_tab) >> 1;
+
+ m_ttt[2][1] = ixheaacd_mps_convert_to_qn(m_ttt[2][1], q_w21, 15);
+ if (p_aux_struct->ttt_cld_1[0][ps][pb] == 4915200) {
+ m_ttt[0][0] = 32767;
+ m_ttt[1][1] = 32767;
+ m_ttt[2][0] = 0;
+ m_ttt[2][1] = 0;
+ }
+ }
+
+ center_wiener = 0;
+ center_subtraction = (ttt_mode == 2 || ttt_mode == 3);
+
+ if (center_wiener) {
+ WORD32 cld_1_idx = p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb];
+ WORD32 cld_2_idx = p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb];
+
+ if (cld_1_idx == 15 && cld_2_idx == 15) {
+ m_ttt[2][0] = 0;
+ m_ttt[2][1] = ONE_BY_SQRT_2_Q15;
+ } else if (cld_1_idx == 15) {
+ if (cld_2_idx == -15)
+ m_ttt[2][0] = ONE_BY_SQRT_2_Q15;
+ else
+ m_ttt[2][0] = 0;
+ m_ttt[2][1] = 0;
+ } else if (cld_2_idx == 15) {
+ m_ttt[2][0] = 0;
+ m_ttt[2][1] = ONE_IN_Q15;
+ } else {
+ WORD32 temp;
+ WORD16 q_temp;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+
+ prod = ixheaacd_mps_mult32_shr_15(c2d, (c2d + c1d + ONE_IN_Q16)) + ONE_IN_Q15;
+
+ temp = ixheaacd_mps_div_32((WORD32)ONE_IN_Q15, (WORD32)prod, &q_temp);
+
+ m_ttt[2][0] = ixheaacd_mps_sqrt(temp, &q_temp, sqrt_tab);
+ m_ttt[2][0] = ixheaacd_mps_convert_to_qn(m_ttt[2][0], q_temp, 15);
+
+ m_ttt[2][1] = ixheaacd_mps_mult32_shr_15(c2d, m_ttt[2][0]);
+ }
+ }
+
+ if (center_subtraction) {
+ WORD32 wl1, wl2, wr1, wr2;
+ WORD16 q_wl1, q_wr1;
+ WORD32 cld_1_idx = p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb];
+ WORD32 cld_2_idx = p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb];
+
+ if (cld_1_idx == 15 && cld_2_idx == 15) {
+ m_ttt[0][0] = ONE_IN_Q15;
+ m_ttt[0][1] = MINUS_ONE_IN_Q14;
+ m_ttt[1][1] = ONE_BY_SQRT_2_Q15;
+ m_ttt[1][0] = 0;
+ } else if (cld_1_idx == 15) {
+ if (cld_2_idx == -15) {
+ m_ttt[0][0] = ONE_BY_SQRT_2_Q15;
+ m_ttt[1][0] = MINUS_ONE_IN_Q14;
+ } else {
+ m_ttt[0][0] = ONE_IN_Q15;
+ m_ttt[1][0] = 0;
+ }
+
+ m_ttt[0][1] = 0;
+ m_ttt[1][1] = ONE_IN_Q15;
+ } else if (cld_2_idx == 15) {
+ m_ttt[0][0] = ONE_IN_Q15;
+ m_ttt[0][1] = MINUS_ONE_IN_Q15;
+ m_ttt[1][1] = 0;
+ m_ttt[1][0] = 0;
+ } else {
+ WORD32 temp, temp_1, q_a;
+ WORD16 q_c, q_l, q_r, q_temp, q_temp1;
+ WORD32 c;
+ WORD32 r;
+ WORD32 l;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+
+ c = ixheaacd_mps_div_32(ONE_IN_Q15, (ixheaacd_add32_sat(c1d, ONE_IN_Q15)), &q_c);
+ r = ixheaacd_mps_div_32(c1d, (ixheaacd_add32_sat(c2d, ONE_IN_Q15)), &q_r);
+ r = ixheaacd_mps_mult32_shr_30(r, c);
+ q_r = q_r + q_c - 30;
+
+ l = ixheaacd_mps_mult32_shr_30(c2d, r);
+ q_l = q_r - 15;
+
+ temp = ixheaacd_mps_div_32(r, l, &q_temp);
+ q_temp += (q_r - q_l);
+
+ if (q_temp > 28) {
+ temp = temp >> (q_temp - 28);
+ q_temp = 28;
+ }
+
+ temp += ((1 << q_temp) - 1);
+
+ temp = ixheaacd_add32_sat(
+ ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_r)), r);
+ q_temp = q_r;
+
+ if (q_c > q_r) {
+ temp_1 = r + (c >> (q_c - q_r));
+ q_temp1 = q_r;
+ } else {
+ temp_1 = (r >> (q_r - q_c)) + c;
+ q_temp1 = q_c;
+ }
+
+ temp = ixheaacd_div32(temp_1, temp, &q_a);
+ q_wl1 = q_a + q_temp1 - q_temp;
+ wl1 = ixheaacd_mps_sqrt(temp, &q_wl1, sqrt_tab);
+ m_ttt[0][0] = ixheaacd_mps_convert_to_qn(wl1, q_wl1, 15);
+
+ temp = ixheaacd_div32(wl1, temp_1, &q_a);
+ q_temp = q_a + (q_wl1 - q_temp1);
+ wl2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15));
+ m_ttt[0][1] = ixheaacd_negate32_sat(wl2);
+
+ temp = ixheaacd_mps_div_32(l, r, &q_temp);
+ q_temp += (q_l - q_r);
+
+ if (q_temp > 28) {
+ temp = temp >> (q_temp - 28);
+ q_temp = 28;
+ }
+
+ temp = ixheaacd_add32_sat((1 << q_temp) - 1, temp);
+
+ temp = ixheaacd_add32_sat(
+ ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_l)), l);
+
+ q_temp = q_l;
+
+ if (q_c > q_l) {
+ temp_1 = l + (c >> (q_c - q_l));
+ q_temp1 = q_l;
+ } else {
+ temp_1 = (l >> (q_l - q_c)) + c;
+ q_temp1 = q_c;
+ }
+
+ temp = ixheaacd_div32(temp_1, temp, &q_a);
+ q_wr1 = q_a + q_temp1 - q_temp;
+ wr1 = ixheaacd_mps_sqrt(temp, &q_wr1, sqrt_tab);
+ m_ttt[1][1] = ixheaacd_mps_convert_to_qn(wr1, q_wr1, 15);
+
+ temp = ixheaacd_div32(wr1, temp_1, &q_a);
+ q_temp = q_a + (q_wl1 - q_temp1);
+ wr2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15));
+ m_ttt[1][0] = ixheaacd_negate32_sat(wr2);
+ }
+ }
+ }
+
+ m_ttt[0][2] = ONE_BY_THREE_Q15;
+ m_ttt[1][2] = ONE_BY_THREE_Q15;
+ m_ttt[2][2] = MINUS_ONE_BY_THREE_Q15;
+
+ for (col = 0; col < 3; col++) {
+ m_ttt[2][col] = ixheaacd_mps_mult32_shr_15(m_ttt[2][col], SQRT_TWO_Q15);
+ }
+}
+
+VOID ixheaacd_calculate_mtx_inv(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb,
+ WORD32 mode, WORD32 h_real[][2], WORD32 h_imag[][2]) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+
+ WORD32 weight1;
+ WORD32 weight2;
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ if (mode < 2) {
+ ixheaacd_get_matrix_inversion_weights(
+ p_cur_bs->ott_cld_idx[1][ps][pb], p_cur_bs->ott_cld_idx[2][ps][pb], 1,
+ p_aux_struct->ttt_cpc_1[0][ps][pb], p_aux_struct->ttt_cpc_2[0][ps][pb], &weight1,
+ &weight2, &(pstr_mps_state->ia_mps_dec_mps_table));
+ } else {
+ ixheaacd_get_matrix_inversion_weights(
+ p_cur_bs->ott_cld_idx[1][ps][pb], p_cur_bs->ott_cld_idx[2][ps][pb], 0,
+ p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb], p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb], &weight1,
+ &weight2, &(pstr_mps_state->ia_mps_dec_mps_table));
+ }
+
+ ixheaacd_invert_matrix(weight1, weight2, h_real, h_imag,
+ pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr);
+}
+
+VOID ixheaacd_calculate_arb_dmx_mtx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps,
+ WORD32 pb, WORD32 g_real[]) {
+ WORD32 ch;
+ WORD32 gain;
+
+ WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
+ WORD32 *arbdmx_alpha_upd_set = pstr_mps_state->aux_struct->arbdmx_alpha_upd_set;
+ WORD32 *arbdmx_alpha = pstr_mps_state->aux_struct->arbdmx_alpha;
+
+ WORD32 n_ch_in = pstr_mps_state->num_input_channels;
+ WORD32 temp_1;
+ for (ch = 0; ch < n_ch_in; ch++) {
+ temp_1 = pstr_mps_state->bs_frame->arbdmx_gain_idx[ch][ps][pb] + 15;
+ gain = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->dec_pow[temp_1];
+
+ if (pb < pstr_mps_state->arbdmx_residual_bands) {
+ if ((ps == 0) && (arbdmx_alpha_upd_set[ch] == 1)) {
+ g_real[ch] = ixheaacd_mps_mult32_shr_15(*arbdmx_alpha_prev, gain);
+ } else {
+ g_real[ch] = ixheaacd_mps_mult32_shr_15(arbdmx_alpha[ch], gain);
+ }
+ } else {
+ g_real[ch] = gain;
+ }
+ arbdmx_alpha_prev++;
+ }
+}
+
+WORD32 ixheaacd_quantize(WORD32 cld) {
+ switch (cld) {
+ case -150:
+ return -15;
+ case -45:
+ return -14;
+ case -40:
+ return -13;
+ case -35:
+ return -12;
+ case -30:
+ return -11;
+ case -25:
+ return -10;
+ case -22:
+ return -9;
+ case -19:
+ return -8;
+ case -16:
+ return -7;
+ case -13:
+ return -6;
+ case -10:
+ return -5;
+ case -8:
+ return -4;
+ case -6:
+ return -3;
+ case -4:
+ return -2;
+ case -2:
+ return -1;
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ case 4:
+ return 2;
+ case 6:
+ return 3;
+ case 8:
+ return 4;
+ case 10:
+ return 5;
+ case 13:
+ return 6;
+ case 16:
+ return 7;
+ case 19:
+ return 8;
+ case 22:
+ return 9;
+ case 25:
+ return 10;
+ case 30:
+ return 11;
+ case 35:
+ return 12;
+ case 40:
+ return 13;
+ case 45:
+ return 14;
+ case 150:
+ return 15;
+ default:
+ return 0;
+ }
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_common.h b/decoder/ixheaacd_mps_calc_m1m2_common.h
new file mode 100644
index 0000000..ffdc557
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_common.h
@@ -0,0 +1,52 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_CALC_M1M2_COMMON_H
+#define IXHEAACD_MPS_CALC_M1M2_COMMON_H
+
+VOID ixheaacd_param_2_umx_ps(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 *h11, WORD32 *h12,
+ WORD32 *h21, WORD32 *h22, WORD32 *h12_res, WORD32 *h22_res,
+ WORD16 *c_l, WORD16 *c_r, WORD32 ott_box_indx,
+ WORD32 parameter_set_indx, WORD32 res_bands);
+
+VOID ixheaacd_get_matrix_inversion_weights(
+ WORD32 iid_lf_ls_idx, WORD32 iid_rf_rs_idx, WORD32 prediction_mode, WORD32 c1, WORD32 c2,
+ WORD32 *weight1, WORD32 *weight2, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr);
+
+VOID ixheaacd_invert_matrix(WORD32 weight1, WORD32 weight2, WORD32 h_real[][2],
+ WORD32 h_imag[][2],
+ const ia_mps_dec_common_tables_struct *common_tab_ptr);
+
+VOID ixheaacd_calculate_arb_dmx_mtx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps,
+ WORD32 pb, WORD32 g_real[]);
+
+VOID ixheaacd_param_2_umx_ps_core_tables(
+ WORD32 *cld, WORD32 *icc, WORD32 num_ott_bands, WORD32 res_bands, WORD32 *h11, WORD32 *h12,
+ WORD32 *h21, WORD32 *h22, WORD32 *h12_res, WORD32 *h22_res, WORD16 *c_l, WORD16 *c_r,
+ const ia_mps_dec_m1_m2_tables_struct *ixheaacd_mps_dec_m1_m2_tables);
+
+VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb,
+ WORD32 ttt_mode, WORD32 m_ttt[][3]);
+
+VOID ixheaacd_calculate_mtx_inv(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb,
+ WORD32 mode, WORD32 h_real[][2], WORD32 h_imag[][2]);
+
+WORD32 ixheaacd_quantize(WORD32 cld);
+
+#endif /* IXHEAACD_MPS_CALC_M1M2_COMMON_H */
diff --git a/decoder/ixheaacd_mps_calc_m1m2_emm.c b/decoder/ixheaacd_mps_calc_m1m2_emm.c
new file mode 100644
index 0000000..276c149
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_emm.c
@@ -0,0 +1,189 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+
+VOID ixheaacd_calc_m1m2_emm(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps;
+ WORD32 pb;
+ WORD32 col;
+ WORD32 row;
+
+ WORD64 acc;
+ WORD32 *h11, *h12, *h21, *h22, *dummy1, *dummy2;
+ WORD16 *dummy3, *dummy4;
+
+ h11 = pstr_mps_state->mps_scratch_mem_v;
+ h12 = h11 + MAX_PARAMETER_BANDS;
+ h21 = h12 + MAX_PARAMETER_BANDS;
+ h22 = h21 + MAX_PARAMETER_BANDS;
+ dummy1 = h22 + MAX_PARAMETER_BANDS;
+ dummy2 = dummy1 + MAX_PARAMETER_BANDS;
+
+ dummy3 = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX12;
+ dummy4 = dummy3 + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < pstr_mps_state->num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11, h12, h21, h22, dummy1, dummy2, dummy3, dummy4, 0,
+ ps, 0);
+
+ for (pb = 0; pb < pstr_mps_state->num_parameter_bands; pb++) {
+ WORD32 m11 = p_aux_struct->ttt_cpc_1[0][ps][pb] + ONE_IN_Q16;
+ WORD32 m12 = p_aux_struct->ttt_cpc_2[0][ps][pb] - ONE_IN_Q15;
+ WORD32 m21 = p_aux_struct->ttt_cpc_1[0][ps][pb] - ONE_IN_Q15;
+ WORD32 m22 = p_aux_struct->ttt_cpc_2[0][ps][pb] + ONE_IN_Q16;
+ WORD32 m31 = ONE_IN_Q15 - p_aux_struct->ttt_cpc_1[0][ps][pb];
+ WORD32 m32 = ONE_IN_Q15 - p_aux_struct->ttt_cpc_2[0][ps][pb];
+ WORD32 weight1;
+ WORD32 weight2;
+ WORD32 h_real[2][2];
+ WORD32 h_imag[2][2];
+
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ ixheaacd_get_matrix_inversion_weights(
+ p_cur_bs->ott_cld_idx[0][ps][pb], p_cur_bs->ott_cld_idx[0][ps][pb], 1,
+ p_aux_struct->ttt_cpc_1[0][ps][pb], p_aux_struct->ttt_cpc_2[0][ps][pb], &weight1,
+ &weight2, &(pstr_mps_state->ia_mps_dec_mps_table));
+
+ ixheaacd_invert_matrix(weight1, weight2, h_real, h_imag,
+ pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr);
+
+ pstr_mps_state->m1_param_imag_present = 1;
+
+ acc = (WORD64)((WORD64)h_real[0][0] * (WORD64)m11 + (WORD64)h_real[1][0] * (WORD64)m12);
+ acc >>= 15;
+ m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_real[0][1] * (WORD64)m11 + (WORD64)h_real[1][1] * (WORD64)m12);
+ acc >>= 15;
+ m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][0] * (WORD64)m11 + (WORD64)h_imag[1][0] * (WORD64)m12);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][1] * (WORD64)m11 + (WORD64)h_imag[1][1] * (WORD64)m12);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_real[0][0] * (WORD64)m21 + (WORD64)h_real[1][0] * (WORD64)m22);
+ acc >>= 15;
+ m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_real[0][1] * (WORD64)m21 + (WORD64)h_real[1][1] * (WORD64)m22);
+ acc >>= 15;
+ m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][0] * (WORD64)m21 + (WORD64)h_imag[1][0] * (WORD64)m22);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][1] * (WORD64)m21 + (WORD64)h_imag[1][1] * (WORD64)m22);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_real[0][0] * (WORD64)m31 + (WORD64)h_real[1][0] * (WORD64)m32);
+ acc >>= 15;
+ m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_real[0][1] * (WORD64)m31 + (WORD64)h_real[1][1] * (WORD64)m32);
+ acc >>= 15;
+ m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][0] * (WORD64)m31 + (WORD64)h_imag[1][0] * (WORD64)m32);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)h_imag[0][1] * (WORD64)m31 + (WORD64)h_imag[1][1] * (WORD64)m32);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
+
+ m1_param->m1_param_real[0][2][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[1][2][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][2][ps][pb] = -32768;
+
+ m1_param->m1_param_imag[0][2][ps][pb] = 0;
+ m1_param->m1_param_imag[1][2][ps][pb] = 0;
+ m1_param->m1_param_imag[2][2][ps][pb] = 0;
+
+ for (row = 0; row < 3; row++) {
+ for (col = 0; col < 3; col++) {
+ m1_param->m1_param_real[row][col][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m1_param->m1_param_real[row][col][ps][pb], ONE_BY_THREE_Q15);
+ m1_param->m1_param_imag[row][col][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m1_param->m1_param_imag[row][col][ps][pb], ONE_BY_THREE_Q15);
+ }
+
+ m1_param->m1_param_real[2][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[2][col][ps][pb], SQRT_TWO_Q15);
+ m1_param->m1_param_imag[2][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_imag[2][col][ps][pb], SQRT_TWO_Q15);
+
+ m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
+ m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
+ m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
+ m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
+ m1_param->m1_param_real[5][col][ps][pb] = 0;
+ m1_param->m1_param_imag[5][col][ps][pb] = 0;
+ }
+ }
+
+ for (pb = 0; pb < pstr_mps_state->num_parameter_bands; pb++) {
+ m2_param->m2_decor_real[0][ps][pb] = h12[pb];
+ m2_param->m2_decor_real[1][ps][pb] = h22[pb];
+ m2_param->m2_decor_real[2][ps][pb] = h12[pb];
+ m2_param->m2_decor_real[3][ps][pb] = h22[pb];
+ }
+
+ for (pb = 0; pb < pstr_mps_state->num_parameter_bands; pb++) {
+ m2_param->m2_resid_real[0][ps][pb] = h11[pb];
+ m2_param->m2_resid_real[1][ps][pb] = h21[pb];
+ m2_param->m2_resid_real[2][ps][pb] = h21[pb];
+ m2_param->m2_resid_real[3][ps][pb] = 32768;
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c
new file mode 100644
index 0000000..23875be
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c
@@ -0,0 +1,463 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+
+VOID ixheaacd_calc_m1m2_5151(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 ps, pb;
+ WORD32 *h11_fs, *h11_c;
+ WORD32 *h12_fs, *h12_c;
+ WORD32 *h21_fs, *h21_c;
+ WORD32 *h22_fs, *h22_c;
+ WORD32 *h12_res_fs, *h12_res_c;
+ WORD32 *h22_res_fs, *h22_res_c;
+ WORD16 *c_l_fs, *c_l_c;
+ WORD16 *c_r_fs, *c_r_c;
+
+ WORD32 *h11_f, *h11_s;
+ WORD32 *h12_f, *h12_s;
+ WORD32 *h21_f, *h21_s;
+ WORD32 *h22_f, *h22_s;
+ WORD32 *h12_res_f, *h12_res_s, *c_r_clfe;
+ WORD32 *h22_res_f, *h22_res_s, *c_l_clfe;
+ WORD16 *c_l_f, *c_l_s;
+ WORD16 *c_r_f, *c_r_s;
+
+ WORD32 idx;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+ WORD32 *res_bands = pstr_mps_state->res_bands;
+
+ h11_fs = pstr_mps_state->mps_scratch_mem_v;
+ h11_c = h11_fs + MAX_PARAMETER_BANDS;
+ h12_fs = h11_c + MAX_PARAMETER_BANDS;
+ h12_c = h12_fs + MAX_PARAMETER_BANDS;
+ h21_fs = h12_c + MAX_PARAMETER_BANDS;
+ h21_c = h21_fs + MAX_PARAMETER_BANDS;
+ h22_fs = h21_c + MAX_PARAMETER_BANDS;
+ h22_c = h22_fs + MAX_PARAMETER_BANDS;
+ h12_res_fs = h22_c + MAX_PARAMETER_BANDS;
+ h12_res_c = h12_res_fs + MAX_PARAMETER_BANDS;
+ h22_res_fs = h12_res_c + MAX_PARAMETER_BANDS;
+ h22_res_c = h22_res_fs + MAX_PARAMETER_BANDS;
+ h11_f = h22_res_c + MAX_PARAMETER_BANDS;
+ h11_s = h11_f + MAX_PARAMETER_BANDS;
+ h12_f = h11_s + MAX_PARAMETER_BANDS;
+ h12_s = h12_f + MAX_PARAMETER_BANDS;
+ h21_f = h12_s + MAX_PARAMETER_BANDS;
+ h21_s = h21_f + MAX_PARAMETER_BANDS;
+ h22_f = h21_s + MAX_PARAMETER_BANDS;
+ h22_s = h22_f + MAX_PARAMETER_BANDS;
+ h12_res_f = h22_s + MAX_PARAMETER_BANDS;
+ h12_res_s = h12_res_f + MAX_PARAMETER_BANDS;
+ h22_res_f = h12_res_s + MAX_PARAMETER_BANDS;
+ h22_res_s = h22_res_f + MAX_PARAMETER_BANDS;
+ c_r_clfe = h22_res_s + MAX_PARAMETER_BANDS;
+ c_l_clfe = c_r_clfe + MAX_PARAMETER_BANDS;
+
+ c_l_fs = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX52;
+ c_l_c = c_l_fs + MAX_PARAMETER_BANDS;
+ c_r_fs = c_l_c + MAX_PARAMETER_BANDS;
+ c_r_c = c_r_fs + MAX_PARAMETER_BANDS;
+ c_l_f = c_r_c + MAX_PARAMETER_BANDS;
+ c_l_s = c_l_f + MAX_PARAMETER_BANDS;
+ c_r_f = c_l_s + MAX_PARAMETER_BANDS;
+ c_r_s = c_r_f + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_fs, h12_fs, h21_fs, h22_fs, h12_res_fs,
+ h22_res_fs, c_l_fs, c_r_fs, 0, ps, res_bands[0]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_c, h12_c, h21_c, h22_c, h12_res_c, h22_res_c,
+ c_l_c, c_r_c, 1, ps, res_bands[1]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_s, h12_s, h21_s, h22_s, h12_res_s, h22_res_s,
+ c_l_s, c_r_s, 2, ps, res_bands[2]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_f, h12_f, h21_f, h22_f, h12_res_f, h22_res_f,
+ c_l_f, c_r_f, 3, ps, res_bands[3]);
+
+ for (pb = 0; pb < p_aux_struct->num_ott_bands[4]; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[p_cur_bs->ott_cld_idx[4][ps][pb] + 15];
+ c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[4][ps][pb]];
+ }
+
+ for (pb = p_aux_struct->num_ott_bands[4]; pb < num_parameter_bands; pb++) {
+ c_l_clfe[pb] = ONE_IN_Q15;
+ c_r_clfe[pb] = 0;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][0][ps][pb] = c_l_fs[pb];
+ m1_param->m1_param_real[3][0][ps][pb] = ixheaacd_mult16_shl(c_l_fs[pb], c_l_c[pb]);
+ m1_param->m1_param_real[4][0][ps][pb] = c_r_fs[pb];
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m2_param->m2_decor_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_fs[pb]));
+ m2_param->m2_decor_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_f[pb], h12_c[pb]);
+ m2_param->m2_decor_real[2][ps][pb] = h12_f[pb];
+
+ m2_param->m2_decor_real[3][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_fs[pb]));
+ m2_param->m2_decor_real[4][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_f[pb], h12_c[pb]);
+ m2_param->m2_decor_real[5][ps][pb] = h22_f[pb];
+
+ m2_param->m2_decor_real[6][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h12_fs[pb]));
+ m2_param->m2_decor_real[7][ps][pb] = ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_c[pb]);
+
+ m2_param->m2_decor_real[8][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_s[pb], h22_fs[pb]);
+ m2_param->m2_decor_real[9][ps][pb] = h12_s[pb];
+
+ m2_param->m2_decor_real[10][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_s[pb], h22_fs[pb]);
+ m2_param->m2_decor_real[11][ps][pb] = h22_s[pb];
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h11_fs[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_res_fs[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_f[pb], h12_res_c[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_f[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h11_fs[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_res_fs[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_f[pb], h12_res_c[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_f[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h11_fs[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h12_res_fs[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_res_c[pb]);
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ c_r_clfe[pb], ixheaacd_mps_mult32_shr_15(c_r_c[pb], c_l_fs[pb]));
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_s[pb], h21_fs[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_s[pb], h22_res_fs[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_s[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_s[pb], h21_fs[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_s[pb], h22_res_fs[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_s[pb];
+ }
+ }
+ }
+
+ if (arbitrary_downmix > 0) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 g_real[1];
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ if (arbitrary_downmix == 2) {
+ m1_param->m1_param_real[0][1][ps][pb] = m1_param->m1_param_real[0][0][ps][pb];
+ m1_param->m1_param_real[1][1][ps][pb] = m1_param->m1_param_real[1][0][ps][pb];
+ m1_param->m1_param_real[2][1][ps][pb] = m1_param->m1_param_real[2][0][ps][pb];
+ m1_param->m1_param_real[3][1][ps][pb] = m1_param->m1_param_real[3][0][ps][pb];
+ m1_param->m1_param_real[4][1][ps][pb] = m1_param->m1_param_real[4][0][ps][pb];
+
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[3][1] = 1;
+ curr_state->m1_param_present[4][1] = 1;
+ }
+
+ m1_param->m1_param_real[0][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[1][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[2][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[2][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[3][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[3][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[4][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[4][0][ps][pb], g_real[0]);
+ }
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_calc_m1m2_5152(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 ps, pb;
+
+ WORD32 *h11_lr, *h11_c, *h12_lr, *h12_c, *h21_lr, *h21_c, *h22_lr, *h22_c, *h12_res_lr,
+ *h12_res_c, *h22_res_lr, *h22_res_c;
+ WORD16 *c_l_lr, *c_l_c, *c_r_lr, *c_r_c;
+
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r, *c_l_clfe, *c_r_clfe;
+ WORD16 *c_l_l, *c_l_r, *c_r_l, *c_r_r;
+
+ WORD32 idx;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+ WORD32 *res_bands = pstr_mps_state->res_bands;
+
+ h11_lr = pstr_mps_state->mps_scratch_mem_v;
+ h11_c = h11_lr + MAX_PARAMETER_BANDS;
+ h12_lr = h11_c + MAX_PARAMETER_BANDS;
+ h12_c = h12_lr + MAX_PARAMETER_BANDS;
+ h21_lr = h12_c + MAX_PARAMETER_BANDS;
+ h21_c = h21_lr + MAX_PARAMETER_BANDS;
+ h22_lr = h21_c + MAX_PARAMETER_BANDS;
+ h22_c = h22_lr + MAX_PARAMETER_BANDS;
+ h12_res_lr = h22_c + MAX_PARAMETER_BANDS;
+ h12_res_c = h12_res_lr + MAX_PARAMETER_BANDS;
+ h22_res_lr = h12_res_c + MAX_PARAMETER_BANDS;
+ h22_res_c = h22_res_lr + MAX_PARAMETER_BANDS;
+ h11_l = h22_res_c + MAX_PARAMETER_BANDS;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+ c_r_clfe = h22_res_r + MAX_PARAMETER_BANDS;
+ c_l_clfe = c_r_clfe + MAX_PARAMETER_BANDS;
+
+ c_l_lr = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX52;
+ c_l_c = c_l_lr + MAX_PARAMETER_BANDS;
+ c_r_lr = c_l_c + MAX_PARAMETER_BANDS;
+ c_r_c = c_r_lr + MAX_PARAMETER_BANDS;
+ c_l_l = c_r_c + MAX_PARAMETER_BANDS;
+ c_l_r = c_l_l + MAX_PARAMETER_BANDS;
+ c_r_l = c_l_r + MAX_PARAMETER_BANDS;
+ c_r_r = c_r_l + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_c, h12_c, h21_c, h22_c, h12_res_c, h22_res_c,
+ c_l_c, c_r_c, 0, ps, res_bands[0]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_lr, h12_lr, h21_lr, h22_lr, h12_res_lr,
+ h22_res_lr, c_l_lr, c_r_lr, 1, ps, res_bands[1]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_l_l, c_r_l, 3, ps, res_bands[3]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_l_r, c_r_r, 4, ps, res_bands[4]);
+
+ for (pb = 0; pb < p_aux_struct->num_ott_bands[2]; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[p_cur_bs->ott_cld_idx[2][ps][pb] + 15];
+ c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[2][ps][pb]];
+ }
+
+ for (pb = p_aux_struct->num_ott_bands[2]; pb < num_parameter_bands; pb++) {
+ c_l_clfe[pb] = ONE_IN_Q15;
+ c_r_clfe[pb] = 0;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][0][ps][pb] = c_l_c[pb];
+ m1_param->m1_param_real[3][0][ps][pb] = ixheaacd_mult16_shl(c_l_c[pb], c_l_lr[pb]);
+ m1_param->m1_param_real[4][0][ps][pb] = ixheaacd_mult16_shl(c_l_c[pb], c_r_lr[pb]);
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m2_param->m2_decor_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_c[pb]));
+ m2_param->m2_decor_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_l[pb], h12_lr[pb]);
+ m2_param->m2_decor_real[2][ps][pb] = h12_l[pb];
+
+ m2_param->m2_decor_real[3][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_c[pb]));
+ m2_param->m2_decor_real[4][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_l[pb], h12_lr[pb]);
+ m2_param->m2_decor_real[5][ps][pb] = h22_l[pb];
+
+ m2_param->m2_decor_real[6][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_c[pb]));
+ m2_param->m2_decor_real[7][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_r[pb], h22_lr[pb]);
+ m2_param->m2_decor_real[8][ps][pb] = h12_r[pb];
+
+ m2_param->m2_decor_real[9][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_c[pb]));
+ m2_param->m2_decor_real[10][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_r[pb], h22_lr[pb]);
+ m2_param->m2_decor_real[11][ps][pb] = h22_r[pb];
+
+ m2_param->m2_decor_real[12][ps][pb] = ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_c[pb]);
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h11_c[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_res_c[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_l[pb], h12_res_lr[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h11_c[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_res_c[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_l[pb], h12_res_lr[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h11_c[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_res_c[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_r[pb], h22_res_lr[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h11_c[pb]));
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_res_c[pb]));
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_r[pb], h22_res_lr[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h21_c[pb]);
+
+ if (residual_coding)
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_res_c[pb]);
+
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_r_c[pb], c_r_clfe[pb]);
+ }
+ }
+
+ if (arbitrary_downmix > 0) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 g_real[1];
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ if (arbitrary_downmix == 2) {
+ m1_param->m1_param_real[0][1][ps][pb] = m1_param->m1_param_real[0][0][ps][pb];
+ m1_param->m1_param_real[1][1][ps][pb] = m1_param->m1_param_real[1][0][ps][pb];
+ m1_param->m1_param_real[2][1][ps][pb] = m1_param->m1_param_real[2][0][ps][pb];
+ m1_param->m1_param_real[3][1][ps][pb] = m1_param->m1_param_real[3][0][ps][pb];
+ m1_param->m1_param_real[4][1][ps][pb] = m1_param->m1_param_real[4][0][ps][pb];
+
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[3][1] = 1;
+ curr_state->m1_param_present[4][1] = 1;
+ }
+
+ m1_param->m1_param_real[0][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[1][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[2][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[2][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[3][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[3][0][ps][pb], g_real[0]);
+ m1_param->m1_param_real[4][0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[4][0][ps][pb], g_real[0]);
+ }
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c b/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c
new file mode 100644
index 0000000..481eb9a
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c
@@ -0,0 +1,324 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+#include "ixheaacd_mps_bitdec.h"
+
+#undef ABS_THR
+#define ABS_THR 1
+
+VOID ixheaacd_calc_m1m2_51s1(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps, pb;
+
+ WORD32 *iid;
+ WORD32 *icc;
+ WORD32 *h11;
+ WORD32 *h12;
+ WORD32 *h21;
+ WORD32 *h22;
+ WORD32 *h12_res;
+ WORD32 *h22_res;
+ WORD16 *c_l;
+ WORD16 *c_r;
+
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ iid = pstr_mps_state->mps_scratch_mem_v;
+ icc = iid + MAX_PARAMETER_BANDS;
+ h11 = icc + MAX_PARAMETER_BANDS;
+ h12 = h11 + MAX_PARAMETER_BANDS;
+ h21 = h12 + MAX_PARAMETER_BANDS;
+ h22 = h21 + MAX_PARAMETER_BANDS;
+ h12_res = h22 + MAX_PARAMETER_BANDS;
+ h22_res = h12_res + MAX_PARAMETER_BANDS;
+ c_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX16;
+ c_r = c_l + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 p_l_fs, p_r_fs;
+ WORD32 p_l_c, p_r_c;
+ WORD32 p_l_s, p_r_s;
+ WORD32 p_l_f, p_r_f;
+ WORD32 left_f;
+ WORD32 right_f;
+ WORD32 center;
+ WORD32 left_s;
+ WORD32 right_s;
+ WORD32 left;
+ WORD32 right;
+ WORD32 cross;
+ WORD32 temp_1, temp_2;
+ WORD16 qtemp1, qtemp2;
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ p_l_fs = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
+ p_r_fs = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
+
+ p_l_c = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[1][ps][pb] + 15];
+ p_r_c = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[1][ps][pb]];
+
+ p_l_s = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[2][ps][pb] + 15];
+ p_r_s = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[2][ps][pb]];
+
+ p_l_f = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[3][ps][pb] + 15];
+ p_r_f = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[3][ps][pb]];
+
+ left_f = ixheaacd_mps_mult32_shr_15(ixheaacd_mps_mult32_shr_15(p_l_fs, p_l_c), p_l_f);
+ right_f = ixheaacd_mps_mult32_shr_15(ixheaacd_mps_mult32_shr_15(p_l_fs, p_l_c), p_r_f);
+ center = ixheaacd_mps_mult32_shr_16(p_l_fs, p_r_c);
+ left_s = ixheaacd_mps_mult32_shr_15(p_r_fs, p_l_s);
+ right_s = ixheaacd_mps_mult32_shr_15(p_r_fs, p_r_s);
+
+ left = center + left_f + left_s;
+ right = center + right_f + right_s;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(left_f, right_f);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[3][ps][pb]);
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(left_f, right_f);
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, p_aux_struct->ott_icc[3][ps][pb]);
+
+ temp_1 = ixheaacd_add32_sat(temp_1, temp_2);
+ cross = ixheaacd_add32_sat(center, temp_1);
+
+ temp_1 = ixheaacd_mps_div32_in_q15(left, right);
+ qtemp1 = 15;
+
+ iid[pb] = (10 * ixheaacd_mps_log10(temp_1, qtemp1)) >> 1;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(left, right);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_add32(temp_1, ABS_THR, &qtemp1, 30);
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_2 = ixheaacd_mps_div_32(cross, temp_1, &qtemp2);
+ qtemp2 = qtemp2 + 15 - qtemp1;
+ icc[pb] = ixheaacd_mps_convert_to_qn(temp_2, qtemp2, 15);
+
+ if (icc[pb] > ONE_IN_Q15) {
+ icc[pb] = ONE_IN_Q15;
+ } else {
+ if (icc[pb] < MINUS_POINT_NINE_NINE_Q15) {
+ icc[pb] = MINUS_POINT_NINE_NINE_Q15;
+ }
+ }
+
+ iid[pb] =
+ ixheaacd_quantize_cld(iid[pb], pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ icc[pb] =
+ ixheaacd_quantize_icc(icc[pb], pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ }
+
+ ixheaacd_param_2_umx_ps_core_tables(iid, icc, num_parameter_bands, 0, h11, h12, h21, h22,
+ h12_res, h22_res, c_l, c_r,
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr);
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[3][0][ps][pb] = ONE_IN_Q15;
+ }
+
+ memcpy(m2_param->m2_decor_real[0][ps], h12, num_parameter_bands * sizeof(h12[0]));
+ memcpy(m2_param->m2_decor_real[1][ps], h22, num_parameter_bands * sizeof(h22[0]));
+ memcpy(m2_param->m2_resid_real[0][ps], h11, num_parameter_bands * sizeof(h11[0]));
+ memcpy(m2_param->m2_resid_real[1][ps], h21, num_parameter_bands * sizeof(h21[0]));
+ }
+ return;
+}
+
+VOID ixheaacd_calc_m1m2_51s2(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps, pb;
+
+ WORD32 *iid;
+ WORD32 *icc;
+ WORD32 *h11;
+ WORD32 *h12;
+ WORD32 *h21;
+ WORD32 *h22;
+ WORD32 *h12_res;
+ WORD32 *h22_res;
+ WORD32 *g_s;
+ WORD16 *c_l;
+ WORD16 *c_r;
+
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+
+ iid = pstr_mps_state->mps_scratch_mem_v;
+ icc = iid + MAX_PARAMETER_BANDS;
+ h11 = icc + MAX_PARAMETER_BANDS;
+ h12 = h11 + MAX_PARAMETER_BANDS;
+ h21 = h12 + MAX_PARAMETER_BANDS;
+ h22 = h21 + MAX_PARAMETER_BANDS;
+ h12_res = h22 + MAX_PARAMETER_BANDS;
+ h22_res = h12_res + MAX_PARAMETER_BANDS;
+ g_s = h22_res + MAX_PARAMETER_BANDS;
+ c_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX18;
+ c_r = c_l + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ WORD32 p_l_c, p_r_c;
+ WORD32 p_l_lr, p_r_lr;
+ WORD32 left;
+ WORD32 right;
+ WORD32 center;
+ WORD32 cross;
+ WORD32 temp_1;
+ WORD16 qtemp1;
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ p_l_c = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
+ p_r_c = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
+
+ p_l_lr = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[p_cur_bs->ott_cld_idx[1][ps][pb] + 15];
+ p_r_lr = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->cld_tab_1[15 - p_cur_bs->ott_cld_idx[1][ps][pb]];
+
+ left = ixheaacd_mps_mult32_shr_15(p_l_c, p_l_lr);
+ right = ixheaacd_mps_mult32_shr_15(p_l_c, p_r_lr);
+ center = (p_r_c) >> 1;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(left, right);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_1 = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15);
+ cross = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[1][ps][pb]);
+
+ temp_1 = ixheaacd_add32_sat((left + right), cross);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, center);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_1 = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]);
+ temp_1 = ixheaacd_add32_sat(temp_1, center);
+ cross = ixheaacd_add32_sat(cross, temp_1);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(left, center);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_1 = ixheaacd_mps_convert_to_qn(2 * temp_1, qtemp1, 15);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]);
+ temp_1 = ixheaacd_add32_sat(temp_1, center);
+ left = ixheaacd_add32_sat(left, temp_1);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(right, center);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_1 = ixheaacd_mps_convert_to_qn(2 * temp_1, qtemp1, 15);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]);
+ temp_1 = ixheaacd_add32_sat(temp_1, center);
+ right = ixheaacd_add32_sat(right, temp_1);
+
+ temp_1 = ixheaacd_mps_div32_in_q15(left, right);
+ qtemp1 = 15;
+ iid[pb] = ((10 * ixheaacd_mps_log10(temp_1, qtemp1)) >> 1);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(left, right);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ temp_1 = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15);
+ if (temp_1 == 0) {
+ temp_1 = 1;
+ }
+
+ icc[pb] = ixheaacd_mps_div32_in_q15(cross, temp_1);
+
+ temp_1 = ixheaacd_add32_sat(left, right);
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ g_s[pb] = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15);
+
+ if (icc[pb] > ONE_IN_Q15) {
+ icc[pb] = ONE_IN_Q15;
+ } else {
+ if (icc[pb] < MINUS_POINT_NINE_NINE_Q15) {
+ icc[pb] = MINUS_POINT_NINE_NINE_Q15;
+ }
+ }
+
+ iid[pb] =
+ ixheaacd_quantize_cld(iid[pb], pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ icc[pb] =
+ ixheaacd_quantize_icc(icc[pb], pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
+ }
+
+ ixheaacd_param_2_umx_ps_core_tables(iid, icc, num_parameter_bands, 0, h11, h12, h21, h22,
+ h12_res, h22_res, c_l, c_r,
+ pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr);
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][0][ps][pb] = ONE_IN_Q15;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m2_param->m2_decor_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(g_s[pb], h12[pb]);
+ m2_param->m2_decor_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(g_s[pb], h22[pb]);
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m2_param->m2_resid_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(g_s[pb], h11[pb]);
+ m2_param->m2_resid_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(g_s[pb], h21[pb]);
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c b/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c
new file mode 100644
index 0000000..e9579c2
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c
@@ -0,0 +1,620 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+
+VOID ixheaacd_calc_m1m2_5227(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps, pb, i;
+ WORD32 row, col, ch;
+ WORD32 *a_prediction_mode;
+
+ WORD32 *m_real;
+ WORD32 *m_imag;
+
+ WORD32 *lf;
+ WORD32 *ls;
+ WORD32 *rf;
+ WORD32 *rs;
+ WORD32 *a_c1;
+ WORD32 *a_c2;
+ WORD32 *a_icc_c;
+
+ WORD64 acc;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+ WORD32 arbdmx_residual_bands = pstr_mps_state->arbdmx_residual_bands;
+ WORD32 in_ch = pstr_mps_state->num_input_channels;
+
+ const WORD32 *cld_tab_1 = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->cld_tab_1;
+
+ lf = pstr_mps_state->mps_scratch_mem_v;
+ ls = lf + MAX_PARAMETER_BANDS;
+ rf = ls + MAX_PARAMETER_BANDS;
+ rs = rf + MAX_PARAMETER_BANDS;
+ a_c1 = rs + MAX_PARAMETER_BANDS;
+ a_c2 = a_c1 + MAX_PARAMETER_BANDS;
+ a_icc_c = a_c2 + MAX_PARAMETER_BANDS;
+ a_prediction_mode = a_icc_c + MAX_PARAMETER_BANDS;
+ m_real = a_prediction_mode + MAX_PARAMETER_BANDS;
+ m_imag = m_real + PARAMETER_BANDSX15;
+
+ for (i = 0; i < PARAMETER_BANDSX15; i++) {
+ m_real[i] = 0;
+ m_imag[i] = 0;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ WORD32 m_pre[3][5];
+ WORD32 m_ttt[3][3];
+ WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
+
+ memset(m_pre, 0, sizeof(m_pre));
+
+ if (p_aux_struct->ttt_config[i][0].mode >= 2) {
+ mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
+ p_aux_struct->ttt_config[i][0].mode == 4);
+ }
+
+ ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ m_ttt);
+
+ for (row = 0; row < 3; row++) {
+ for (col = 0; col < 3; col++) {
+ m_pre[row][col] = m_ttt[row][col];
+ }
+ }
+
+ if (arbitrary_downmix != 0) {
+ WORD32 g_real[2];
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ if (arbitrary_downmix == 2 && pb < arbdmx_residual_bands) {
+ for (ch = 0; ch < in_ch; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
+
+ m_pre[row][3 + ch] = m_ttt[row][ch];
+ }
+ }
+ } else {
+ for (ch = 0; ch < in_ch; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
+ }
+ }
+ }
+ }
+
+ if (mtx_inversion) {
+ WORD32 h_real[2][2];
+ WORD32 h_imag[2][2];
+
+ ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ h_real, h_imag);
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m_real[0] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m_real[1] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m_real[5] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m_real[6] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m_real[10] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m_real[11] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m_imag[0] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m_imag[1] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m_imag[5] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m_imag[6] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m_imag[10] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m_imag[11] = (WORD32)acc;
+ } else if (pstr_mps_state->_3d_stereo_inversion) {
+ } else {
+ m_real[0] = m_pre[0][0];
+ m_real[1] = m_pre[0][1];
+ m_real[5] = m_pre[1][0];
+ m_real[6] = m_pre[1][1];
+ m_real[10] = m_pre[2][0];
+ m_real[11] = m_pre[2][1];
+
+ m_imag[0] = 0;
+ m_imag[1] = 0;
+ m_imag[5] = 0;
+ m_imag[6] = 0;
+ m_imag[10] = 0;
+ m_imag[11] = 0;
+ }
+
+ m_real[2] = m_pre[0][3];
+ m_real[3] = m_pre[0][4];
+ m_real[4] = m_pre[0][2];
+ m_real[7] = m_pre[1][3];
+ m_real[8] = m_pre[1][4];
+ m_real[9] = m_pre[1][2];
+ m_real[12] = m_pre[2][3];
+ m_real[13] = m_pre[2][4];
+ m_real[14] = m_pre[2][2];
+ }
+ }
+
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ if (p_aux_struct->ttt_config[i][0].mode < 2) {
+ a_prediction_mode[pb] = 1;
+ a_c1[pb] = p_aux_struct->ttt_cpc_1[0][ps][pb];
+ a_c2[pb] = p_aux_struct->ttt_cpc_2[0][ps][pb];
+ a_icc_c[pb] = p_aux_struct->ttt_icc[0][ps][pb];
+ } else {
+ a_prediction_mode[pb] = 0;
+ a_c1[pb] = p_aux_struct->ttt_cld_1[0][ps][pb];
+ a_c2[pb] = p_aux_struct->ttt_cld_2[0][ps][pb];
+ a_icc_c[pb] = 0;
+ }
+ lf[pb] = cld_tab_1[p_cur_bs->ott_cld_idx[1][ps][pb] + 15];
+ ls[pb] = cld_tab_1[15 - p_cur_bs->ott_cld_idx[1][ps][pb]];
+
+ rf[pb] = cld_tab_1[p_cur_bs->ott_cld_idx[1][ps][pb] + 15];
+ rs[pb] = cld_tab_1[15 - p_cur_bs->ott_cld_idx[2][ps][pb]];
+ }
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[0][1][ps][pb] = 0;
+ m1_param->m1_param_real[1][0][ps][pb] = 0;
+ m1_param->m1_param_real[1][1][ps][pb] = ONE_IN_Q15;
+
+ m1_param->m1_param_real[2][3][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][4][ps][pb] = 0;
+ m1_param->m1_param_real[3][3][ps][pb] = 0;
+ m1_param->m1_param_real[3][4][ps][pb] = ONE_IN_Q15;
+ }
+ }
+}
+
+VOID ixheaacd_calc_m1m2_5251(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ch, ps, pb, col, row, i;
+
+ WORD32 temp_1;
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r;
+ WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
+ WORD16 *c_f_l, *c_f_r, *dummy1, *dummy2;
+
+ WORD32 idx, index2 = 0, index3 = 0;
+ WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
+ WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
+ WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
+
+ WORD32 num_decor_signals = pstr_mps_state->num_decor_signals;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
+ WORD32 num_x_channels = pstr_mps_state->num_x_channels;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+ WORD32 arbdmx_residual_bands = pstr_mps_state->arbdmx_residual_bands;
+ WORD32 in_ch = pstr_mps_state->num_input_channels;
+ WORD32 res_bands = pstr_mps_state->res_bands[3];
+
+ WORD32 decorr_present;
+ WORD32 pos[3];
+ WORD64 acc;
+
+ h11_l = pstr_mps_state->mps_scratch_mem_v;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+ c_l_clfe = h22_res_r + MAX_PARAMETER_BANDS;
+ c_r_clfe = c_l_clfe + MAX_PARAMETER_BANDS;
+ kappa = c_r_clfe + MAX_PARAMETER_BANDS;
+ g_dd = kappa + MAX_PARAMETER_BANDS;
+
+ c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX32;
+ c_f_r = c_f_l + MAX_PARAMETER_BANDS;
+ dummy1 = c_f_r + MAX_PARAMETER_BANDS;
+ dummy2 = dummy1 + MAX_PARAMETER_BANDS;
+
+ if (enable_additionals) {
+ if (mode_1 == 0 &&
+ (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
+ enable_additionals = 0;
+ else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
+ p_aux_struct->ttt_config[0][0].stop_band))
+ enable_additionals = 0;
+ }
+
+ decorr_present = enable_additionals && num_decor_signals == 3;
+
+ pstr_mps_state->num_decor_signals = 2;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ WORD32 m_ttt[3][3];
+ WORD32 m_pre[3][5];
+ WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
+
+ memset(m_pre, 0, sizeof(m_pre));
+
+ if (p_aux_struct->ttt_config[i][0].mode >= 2) {
+ mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
+ p_aux_struct->ttt_config[i][0].mode == 4);
+ }
+
+ ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ m_ttt);
+
+ for (row = 0; row < 3; row++) {
+ for (col = 0; col < 3; col++) {
+ m_pre[row][col] = m_ttt[row][col];
+ }
+ }
+
+ if (arbitrary_downmix != 0) {
+ WORD32 g_real[2];
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ if (arbitrary_downmix == 2 && pb < arbdmx_residual_bands) {
+ for (ch = 0; ch < in_ch; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
+ m_pre[row][3 + ch] = m_ttt[row][ch];
+ }
+ }
+ } else {
+ for (ch = 0; ch < in_ch; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
+ }
+ }
+ }
+ }
+
+ if (mtx_inversion) {
+ WORD32 h_real[2][2], h_imag[2][2];
+
+ ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ h_real, h_imag);
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
+ } else if (pstr_mps_state->_3d_stereo_inversion) {
+ } else {
+ m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
+ m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
+ m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
+ m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
+ m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
+ m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
+ m1_param->m1_param_imag[0][0][ps][pb] = 0;
+ m1_param->m1_param_imag[0][1][ps][pb] = 0;
+ m1_param->m1_param_imag[1][0][ps][pb] = 0;
+ m1_param->m1_param_imag[1][1][ps][pb] = 0;
+ m1_param->m1_param_imag[2][0][ps][pb] = 0;
+ m1_param->m1_param_imag[2][1][ps][pb] = 0;
+ }
+
+ m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
+ m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
+ m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
+ m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
+ m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
+ m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
+ m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
+ m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
+ m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
+
+ m1_param->m1_param_imag[0][2][ps][pb] = 0;
+ m1_param->m1_param_imag[0][3][ps][pb] = 0;
+ m1_param->m1_param_imag[0][4][ps][pb] = 0;
+ m1_param->m1_param_imag[1][2][ps][pb] = 0;
+ m1_param->m1_param_imag[1][3][ps][pb] = 0;
+ m1_param->m1_param_imag[1][4][ps][pb] = 0;
+ m1_param->m1_param_imag[2][2][ps][pb] = 0;
+ m1_param->m1_param_imag[2][3][ps][pb] = 0;
+ m1_param->m1_param_imag[2][4][ps][pb] = 0;
+
+ for (col = 0; col < num_x_channels; col++) {
+ m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
+ m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
+
+ if (m1_param_imag_present) {
+ m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
+ m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
+ }
+ pstr_mps_state->m1_param_present[3][col] = 1;
+ pstr_mps_state->m1_param_present[4][col] = 1;
+
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
+ if (m1_param_imag_present)
+ m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
+
+ pstr_mps_state->m1_param_present[5][col] = 1;
+ }
+ }
+ }
+ }
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_f_l, dummy1, 1, ps, pstr_mps_state->res_bands[1]);
+
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_f_r, dummy2, 2, ps, pstr_mps_state->res_bands[2]);
+
+ for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
+ WORD32 temp = ixheaacd_quantize((p_aux_struct->ott_cld[0][ps][pb]) >> 15);
+
+ c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->r1_matrix_l[temp + 15];
+ c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->r1_matrix_l[15 - temp];
+ }
+
+ for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
+ c_l_clfe[pb] = ONE_IN_Q15;
+ c_r_clfe[pb] = 0;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_l[pb];
+ if (enable_additionals) {
+ pos[0] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_l[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_r[pb];
+ if (enable_additionals) {
+ pos[1] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_r[pb];
+ if (enable_additionals) {
+ pos[2] = idx++;
+ }
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 1;
+
+ m2_param->m2_resid_real[0][ps][pb] = h11_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
+
+ if (decorr_present) idx++;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
+
+ m2_param->m2_resid_real[idx][ps][pb] = h11_r[pb];
+ index2 = idx++;
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
+
+ if (decorr_present) idx++;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
+
+ m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
+ index3 = idx++;
+
+ if (decorr_present) idx++;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = c_r_clfe[pb];
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
+ g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
+ }
+
+ for (i = 0; i < 2; i++) {
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= res_bands) {
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr && enable_additionals) {
+ WORD32 temp;
+ pstr_mps_state->num_decor_signals = 3;
+
+ temp_1 = MINUS_SQRT_2_Q30;
+ m2_param->m2_decor_real[pos[0]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
+ m2_param->m2_decor_real[pos[1]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
+
+ temp = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
+ m2_param->m2_decor_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp, temp_1);
+
+ pstr_mps_state->m2_param_present[0][5] = 3;
+ pstr_mps_state->m2_param_present[2][5] = 3;
+ pstr_mps_state->m2_param_present[4][5] = 3;
+
+ m2_param->m2_resid_real[0][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[0][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[index2][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[index2][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[index3][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[index3][ps][pb], kappa[pb]);
+
+ m2_param->m2_resid_real[pos[0]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
+ m2_param->m2_resid_real[pos[1]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
+
+ temp = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
+ m2_param->m2_resid_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp, temp_1);
+ }
+ }
+ }
+ }
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c
new file mode 100644
index 0000000..77072cf
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c
@@ -0,0 +1,833 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+
+VOID ixheaacd_calc_m1m2_7271(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 ps, pb, col, row, i;
+
+ WORD32 m_pre[3][5];
+ WORD32 m_ttt[3][3];
+
+ WORD32 g_real[2];
+
+ WORD32 temp_1, temp_2;
+ WORD64 acc;
+
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r;
+ WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
+ WORD16 *c_f_l, *c_f_r, *dummy;
+
+ WORD32 *h11_lc, *h11_rc, *h12_lc, *h12_rc, *h21_lc, *h21_rc, *h22_lc, *h22_rc, *h12_res_lc,
+ *h12_res_rc, *h22_res_lc, *h22_res_rc;
+ WORD16 *c_f_lc, *c_f_rc;
+
+ WORD32 idx;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 *res_bands = pstr_mps_state->res_bands;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+ WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
+ WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
+ WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
+ WORD32 pos[5] = {0};
+ WORD32 pos_resid[5] = {0};
+
+ h11_l = pstr_mps_state->mps_scratch_mem_v;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+ c_l_clfe = h22_res_r + MAX_PARAMETER_BANDS;
+ c_r_clfe = c_l_clfe + MAX_PARAMETER_BANDS;
+ kappa = c_r_clfe + MAX_PARAMETER_BANDS;
+ g_dd = kappa + MAX_PARAMETER_BANDS;
+
+ h11_lc = g_dd + MAX_PARAMETER_BANDS;
+ h11_rc = h11_lc + MAX_PARAMETER_BANDS;
+ h12_lc = h11_rc + MAX_PARAMETER_BANDS;
+ h12_rc = h12_lc + MAX_PARAMETER_BANDS;
+ h21_lc = h12_rc + MAX_PARAMETER_BANDS;
+ h21_rc = h21_lc + MAX_PARAMETER_BANDS;
+ h22_lc = h21_rc + MAX_PARAMETER_BANDS;
+ h22_rc = h22_lc + MAX_PARAMETER_BANDS;
+ h12_res_lc = h22_rc + MAX_PARAMETER_BANDS;
+ h12_res_rc = h12_res_lc + MAX_PARAMETER_BANDS;
+ h22_res_lc = h12_res_rc + MAX_PARAMETER_BANDS;
+ h22_res_rc = h22_res_lc + MAX_PARAMETER_BANDS;
+
+ c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX56;
+ c_f_r = c_f_l + MAX_PARAMETER_BANDS;
+ dummy = c_f_r + MAX_PARAMETER_BANDS;
+ c_f_lc = dummy + MAX_PARAMETER_BANDS;
+ c_f_rc = c_f_lc + MAX_PARAMETER_BANDS;
+
+ if (enable_additionals) {
+ if (mode_1 == 0 &&
+ (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
+ enable_additionals = 0;
+ else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
+ p_aux_struct->ttt_config[0][0].stop_band))
+ enable_additionals = 0;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_f_l, dummy, 1, ps, res_bands[1]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_f_r, dummy, 2, ps, res_bands[2]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_lc, h12_lc, h21_lc, h22_lc, h12_res_lc,
+ h22_res_lc, c_f_lc, dummy, 3, ps, res_bands[3]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_rc, h12_rc, h21_rc, h22_rc, h12_res_rc,
+ h22_res_rc, c_f_rc, dummy, 4, ps, res_bands[4]);
+
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
+
+ memset(m_pre, 0, sizeof(m_pre));
+
+ if (p_aux_struct->ttt_config[i][0].mode >= 2) {
+ mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
+ p_aux_struct->ttt_config[i][0].mode == 4);
+ }
+
+ ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ m_ttt);
+
+ for (row = 0; row < 3; row++) {
+ for (col = 0; col < 3; col++) {
+ m_pre[row][col] = m_ttt[row][col];
+ }
+ }
+
+ if (arbitrary_downmix != 0) {
+ WORD32 ch;
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ for (ch = 0; ch < num_input_channels; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][col] = ixheaacd_mps_mult32_shr_15(m_pre[row][col], g_real[ch]);
+
+ if (arbitrary_downmix == 2 && pb < pstr_mps_state->arbdmx_residual_bands) {
+ m_pre[row][3 + ch] = m_ttt[row][ch];
+ }
+ }
+ }
+ }
+
+ if (mtx_inversion) {
+ WORD32 h_real[2][2], h_imag[2][2];
+
+ ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ h_real, h_imag);
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
+ } else if (pstr_mps_state->_3d_stereo_inversion) {
+ } else {
+ m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
+ m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
+ m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
+ m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
+ m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
+ m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
+ }
+
+ m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
+ m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
+ m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
+ m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
+ m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
+ m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
+ m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
+ m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
+ m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
+
+ for (col = 0; col < pstr_mps_state->num_x_channels; col++) {
+ m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
+ m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
+
+ curr_state->m1_param_present[3][col] = 1;
+ curr_state->m1_param_present[4][col] = 1;
+
+ if (m1_param_imag_present) {
+ m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
+ m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
+ }
+
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
+ if (m1_param_imag_present)
+ m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
+
+ curr_state->m1_param_present[5][col] = 1;
+ } else {
+ m1_param->m1_param_real[5][col][ps][pb] = 0;
+ if (m1_param_imag_present) m1_param->m1_param_imag[5][col][ps][pb] = 0;
+ }
+
+ m1_param->m1_param_real[6][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_f_l[pb], m1_param->m1_param_real[0][col][ps][pb]);
+ m1_param->m1_param_real[7][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_f_r[pb], m1_param->m1_param_real[1][col][ps][pb]);
+
+ if (m1_param_imag_present) {
+ m1_param->m1_param_imag[6][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_f_l[pb], m1_param->m1_param_imag[0][col][ps][pb]);
+ m1_param->m1_param_imag[7][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(c_f_r[pb], m1_param->m1_param_imag[1][col][ps][pb]);
+ }
+
+ curr_state->m1_param_present[6][col] = 1;
+ curr_state->m1_param_present[7][col] = 1;
+ }
+ }
+ }
+
+ for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
+ c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
+ }
+ for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
+ c_l_clfe[pb] = ONE_IN_Q15;
+ c_r_clfe[pb] = 0;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_lc[pb], h12_l[pb]);
+ if (enable_additionals) {
+ pos[0] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_lc[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_lc[pb], h12_l[pb]);
+ if (enable_additionals) {
+ pos[1] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_lc[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_l[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rc[pb], h12_r[pb]);
+ if (enable_additionals) {
+ pos[2] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_rc[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rc[pb], h12_r[pb]);
+ if (enable_additionals) {
+ pos[3] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_rc[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_r[pb];
+ if (enable_additionals) {
+ pos[4] = idx++;
+ }
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_lc[pb], h11_l[pb]);
+ pos_resid[0] = idx++;
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_lc[pb], h12_res_l[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_lc[pb];
+ }
+
+ m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_lc[pb], h11_l[pb]);
+ pos_resid[1] = idx++;
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_lc[pb], h12_res_l[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_lc[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
+
+ m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rc[pb], h11_r[pb]);
+ pos_resid[2] = idx++;
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_rc[pb], h12_res_r[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_rc[pb];
+ }
+
+ m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rc[pb], h11_r[pb]);
+ pos_resid[3] = idx++;
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_rc[pb], h12_res_r[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_rc[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
+
+ m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
+ pos_resid[4] = idx++;
+
+ m2_param->m2_resid_real[idx][ps][pb] = c_r_clfe[pb];
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
+ g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
+ }
+
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= pstr_mps_state->res_bands[5]) {
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
+ m2_param->m2_decor_real[pos[0]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(temp_1, h11_lc[pb]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
+ m2_param->m2_decor_real[pos[1]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(temp_1, h21_lc[pb]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
+ m2_param->m2_decor_real[pos[2]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(temp_1, h11_rc[pb]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
+ m2_param->m2_decor_real[pos[3]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(temp_1, h21_rc[pb]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
+ temp_2 = MINUS_SQRT_2_Q30;
+ m2_param->m2_decor_real[pos[4]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp_1, temp_2);
+
+ pstr_mps_state->m2_param_present[0][5] = 1;
+ pstr_mps_state->m2_param_present[1][5] = 1;
+ pstr_mps_state->m2_param_present[3][5] = 1;
+ pstr_mps_state->m2_param_present[4][5] = 1;
+ pstr_mps_state->m2_param_present[6][5] = 1;
+
+ m2_param->m2_resid_real[pos_resid[0]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[0]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[1]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[1]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[2]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[2]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[3]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[3]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[4]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[4]][ps][pb], kappa[pb]);
+ }
+ }
+ }
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_calc_m1m2_7272(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 ps, pb, col, row, i;
+
+ WORD32 m_pre[3][5];
+ WORD32 m_ttt[3][3];
+
+ WORD32 g_real[2];
+
+ WORD32 temp_1, temp_2;
+ WORD64 acc;
+
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r;
+ WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
+ WORD16 *c_1_L, *c_1_R, *c_2_L, *c_2_R;
+ WORD32 *h11_ls, *h11_rs, *h12_ls, *h12_rs, *h21_ls, *h21_rs, *h22_ls, *h22_rs, *h12_res_ls,
+ *h12_res_rs, *h22_res_ls, *h22_res_rs;
+ WORD16 *c_f_ls, *c_f_rs, *dummy;
+
+ WORD32 idx;
+ WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
+ WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+
+ WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
+ WORD32 pos[3] = {0};
+ WORD32 pos_resid[3] = {0};
+
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+
+ h11_l = pstr_mps_state->mps_scratch_mem_v;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+ c_l_clfe = h22_res_r + MAX_PARAMETER_BANDS;
+ c_r_clfe = c_l_clfe + MAX_PARAMETER_BANDS;
+ kappa = c_r_clfe + MAX_PARAMETER_BANDS;
+ g_dd = kappa + MAX_PARAMETER_BANDS;
+
+ h11_ls = g_dd + MAX_PARAMETER_BANDS;
+ h11_rs = h11_ls + MAX_PARAMETER_BANDS;
+ h12_ls = h11_rs + MAX_PARAMETER_BANDS;
+ h12_rs = h12_ls + MAX_PARAMETER_BANDS;
+ h21_ls = h12_rs + MAX_PARAMETER_BANDS;
+ h21_rs = h21_ls + MAX_PARAMETER_BANDS;
+ h22_ls = h21_rs + MAX_PARAMETER_BANDS;
+ h22_rs = h22_ls + MAX_PARAMETER_BANDS;
+ h12_res_ls = h22_rs + MAX_PARAMETER_BANDS;
+ h12_res_rs = h12_res_ls + MAX_PARAMETER_BANDS;
+ h22_res_ls = h12_res_rs + MAX_PARAMETER_BANDS;
+ h22_res_rs = h22_res_ls + MAX_PARAMETER_BANDS;
+
+ c_1_L = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX56;
+ c_1_R = c_1_L + MAX_PARAMETER_BANDS;
+ c_2_L = c_1_R + MAX_PARAMETER_BANDS;
+ c_2_R = c_2_L + MAX_PARAMETER_BANDS;
+ c_f_ls = c_2_R + MAX_PARAMETER_BANDS;
+ c_f_rs = c_f_ls + MAX_PARAMETER_BANDS;
+ dummy = c_f_rs + MAX_PARAMETER_BANDS;
+
+ if (enable_additionals) {
+ if (mode_1 == 0 &&
+ (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
+ enable_additionals = 0;
+ else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
+ p_aux_struct->ttt_config[0][0].stop_band))
+ enable_additionals = 0;
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_1_L, c_2_L, 1, ps, pstr_mps_state->res_bands[1]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_1_R, c_2_R, 2, ps, pstr_mps_state->res_bands[2]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_ls, h12_ls, h21_ls, h22_ls, h12_res_ls,
+ h22_res_ls, dummy, c_f_ls, 3, ps, pstr_mps_state->res_bands[3]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_rs, h12_rs, h21_rs, h22_rs, h12_res_rs,
+ h22_res_rs, dummy, c_f_rs, 4, ps, pstr_mps_state->res_bands[4]);
+
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
+
+ memset(m_pre, 0, sizeof(m_pre));
+
+ if (p_aux_struct->ttt_config[i][0].mode >= 2) {
+ mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
+ p_aux_struct->ttt_config[i][0].mode == 4);
+ }
+
+ ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ m_ttt);
+
+ for (row = 0; row < 3; row++) {
+ for (col = 0; col < 3; col++) {
+ m_pre[row][col] = m_ttt[row][col];
+ }
+ }
+
+ if (arbitrary_downmix != 0) {
+ WORD32 ch;
+ ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
+
+ for (ch = 0; ch < pstr_mps_state->num_input_channels; ch++) {
+ for (row = 0; row < 3; row++) {
+ m_pre[row][col] = ixheaacd_mps_mult32_shr_15(m_pre[row][col], g_real[ch]);
+
+ if (arbitrary_downmix == 2 && pb < pstr_mps_state->arbdmx_residual_bands) {
+ m_pre[row][3 + ch] = m_ttt[row][ch];
+ }
+ }
+ }
+ }
+
+ if (mtx_inversion) {
+ WORD32 h_real[2][2], h_imag[2][2];
+
+ ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
+ h_real, h_imag);
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
+ (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
+ acc >>= 15;
+ m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
+ } else if (pstr_mps_state->_3d_stereo_inversion) {
+ } else {
+ m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
+ m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
+ m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
+ m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
+ m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
+ m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
+ }
+
+ m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
+ m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
+ m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
+ m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
+ m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
+ m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
+ m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
+ m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
+ m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
+
+ for (col = 0; col < pstr_mps_state->num_x_channels; col++) {
+ m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
+ m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
+
+ if (m1_param_imag_present) {
+ m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
+ m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
+ }
+
+ curr_state->m1_param_present[3][col] = 1;
+ curr_state->m1_param_present[4][col] = 1;
+
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
+ if (m1_param_imag_present)
+ m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
+
+ curr_state->m1_param_present[5][col] = 1;
+ } else {
+ m1_param->m1_param_real[5][col][ps][pb] = 0;
+ if (m1_param_imag_present) m1_param->m1_param_imag[5][col][ps][pb] = 0;
+ }
+
+ m1_param->m1_param_real[6][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][col][ps][pb], c_2_L[pb]);
+ m1_param->m1_param_real[7][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][col][ps][pb], c_2_R[pb]);
+
+ if (m1_param_imag_present) {
+ m1_param->m1_param_imag[6][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_imag[0][col][ps][pb], c_2_L[pb]);
+ m1_param->m1_param_imag[7][col][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(m1_param->m1_param_imag[1][col][ps][pb], c_2_R[pb]);
+ }
+
+ curr_state->m1_param_present[6][col] = 1;
+ curr_state->m1_param_present[7][col] = 1;
+ }
+ }
+ }
+
+ for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+ c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
+ c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
+ }
+ for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
+ c_l_clfe[pb] = ONE_IN_Q15;
+ c_r_clfe[pb] = 0;
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_l[pb];
+ if (enable_additionals) {
+ pos[0] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_ls[pb], h22_l[pb]);
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_ls[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_ls[pb], h22_l[pb]);
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_ls[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_r[pb];
+ if (enable_additionals) {
+ pos[1] = idx++;
+ }
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rs[pb], h22_r[pb]);
+ m2_param->m2_decor_real[idx++][ps][pb] = h12_rs[pb];
+ m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rs[pb], h22_r[pb]);
+ m2_param->m2_decor_real[idx++][ps][pb] = h22_rs[pb];
+ if (enable_additionals) {
+ pos[2] = idx++;
+ }
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+ m2_param->m2_resid_real[idx][ps][pb] = h11_l[pb];
+ pos_resid[0] = idx++;
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_ls[pb], h21_l[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_ls[pb], h22_res_l[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_ls[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_ls[pb], h21_l[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_ls[pb], h22_res_l[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_ls[pb];
+ }
+
+ m2_param->m2_resid_real[idx][ps][pb] = h11_r[pb];
+ pos_resid[1] = idx++;
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rs[pb], h21_r[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h11_rs[pb], h22_res_r[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h12_res_rs[pb];
+ }
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rs[pb], h21_r[pb]);
+
+ if (residual_coding) {
+ m2_param->m2_resid_real[idx++][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(h21_rs[pb], h22_res_r[pb]);
+ m2_param->m2_resid_real[idx++][ps][pb] = h22_res_rs[pb];
+ }
+
+ m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
+ pos_resid[2] = idx++;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = c_r_clfe[pb];
+ }
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
+
+ kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
+ g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
+ ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
+ }
+
+ for (i = 0; i < 2; i++) {
+ for (pb = p_aux_struct->ttt_config[i][0].start_band;
+ pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
+ if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= pstr_mps_state->res_bands[5]) {
+ if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
+ m2_param->m2_decor_real[pos[0]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_1_L[pb]);
+
+ m2_param->m2_decor_real[pos[1]][ps][pb] =
+ ixheaacd_mps_mult32_shr_15(g_dd[pb], c_1_R[pb]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
+ temp_2 = MINUS_SQRT_2_Q30;
+ m2_param->m2_decor_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp_1, temp_2);
+
+ pstr_mps_state->m2_param_present[0][5] = 1;
+ pstr_mps_state->m2_param_present[3][5] = 1;
+ pstr_mps_state->m2_param_present[6][5] = 1;
+
+ m2_param->m2_resid_real[pos_resid[0]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[0]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[1]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[1]][ps][pb], kappa[pb]);
+ m2_param->m2_resid_real[pos_resid[2]][ps][pb] = ixheaacd_mps_mult32_shr_15(
+ m2_param->m2_resid_real[pos_resid[2]][ps][pb], kappa[pb]);
+ }
+ }
+ }
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c
new file mode 100644
index 0000000..b118bf7
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c
@@ -0,0 +1,212 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_calc_m1m2_common.h"
+
+VOID ixheaacd_calc_m1m2_7571(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps, pb;
+
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r;
+ WORD16 *c_f_l, *c_f_r, *dummy;
+
+ WORD32 idx;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+
+ h11_l = pstr_mps_state->mps_scratch_mem_v;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+
+ c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX24;
+ c_f_r = c_f_l + MAX_PARAMETER_BANDS;
+ dummy = c_f_r + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_f_l, dummy, 0, ps, pstr_mps_state->res_bands[0]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_f_r, dummy, 1, ps, pstr_mps_state->res_bands[1]);
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[1][1][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][2][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[3][3][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[4][4][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[5][5][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[6][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[7][1][ps][pb] = ONE_IN_Q15;
+ }
+
+ memcpy(m2_param->m2_decor_real[0][ps], h12_l, num_parameter_bands * sizeof(h12_l[0]));
+ memcpy(m2_param->m2_decor_real[1][ps], h22_l, num_parameter_bands * sizeof(h22_l[0]));
+ memcpy(m2_param->m2_decor_real[2][ps], h12_r, num_parameter_bands * sizeof(h12_r[0]));
+ memcpy(m2_param->m2_decor_real[3][ps], h22_r, num_parameter_bands * sizeof(h22_r[0]));
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h11_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h11_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_calc_m1m2_7572(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 ps, pb;
+ WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
+ *h22_res_l, *h22_res_r;
+ WORD16 *c_f_l, *c_f_r, *dummy;
+
+ WORD32 idx;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+
+ h11_l = pstr_mps_state->mps_scratch_mem_v;
+ h11_r = h11_l + MAX_PARAMETER_BANDS;
+ h12_l = h11_r + MAX_PARAMETER_BANDS;
+ h12_r = h12_l + MAX_PARAMETER_BANDS;
+ h21_l = h12_r + MAX_PARAMETER_BANDS;
+ h21_r = h21_l + MAX_PARAMETER_BANDS;
+ h22_l = h21_r + MAX_PARAMETER_BANDS;
+ h22_r = h22_l + MAX_PARAMETER_BANDS;
+ h12_res_l = h22_r + MAX_PARAMETER_BANDS;
+ h12_res_r = h12_res_l + MAX_PARAMETER_BANDS;
+ h22_res_l = h12_res_r + MAX_PARAMETER_BANDS;
+ h22_res_r = h22_res_l + MAX_PARAMETER_BANDS;
+
+ c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + PARAMETER_BANDSX24;
+ c_f_r = c_f_l + MAX_PARAMETER_BANDS;
+ dummy = c_f_r + MAX_PARAMETER_BANDS;
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
+ c_f_l, dummy, 0, ps, pstr_mps_state->res_bands[0]);
+ ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
+ c_f_r, dummy, 1, ps, pstr_mps_state->res_bands[1]);
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[1][1][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[2][2][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[3][3][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[4][4][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[5][5][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[6][4][ps][pb] = ONE_IN_Q15;
+ m1_param->m1_param_real[7][5][ps][pb] = ONE_IN_Q15;
+ }
+
+ memcpy(m2_param->m2_decor_real[0][ps], h22_l, num_parameter_bands * sizeof(h22_l[0]));
+ memcpy(m2_param->m2_decor_real[1][ps], h12_l, num_parameter_bands * sizeof(h12_l[0]));
+ memcpy(m2_param->m2_decor_real[2][ps], h22_r, num_parameter_bands * sizeof(h22_r[0]));
+ memcpy(m2_param->m2_decor_real[3][ps], h12_r, num_parameter_bands * sizeof(h12_r[0]));
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ idx = 0;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h11_l[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = h11_r[pb];
+
+ if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+
+ m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_config.h b/decoder/ixheaacd_mps_calc_m1m2_tree_config.h
new file mode 100644
index 0000000..4af674b
--- /dev/null
+++ b/decoder/ixheaacd_mps_calc_m1m2_tree_config.h
@@ -0,0 +1,35 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_CALC_M1M2_TREE_CONFIG_H
+#define IXHEAACD_MPS_CALC_M1M2_TREE_CONFIG_H
+
+VOID ixheaacd_calc_m1m2_emm(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_5151(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_5152(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_51s1(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_51s2(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_5227(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_5251(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_7271(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_7272(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_7571(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_calc_m1m2_7572(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_CALC_M1M2_TREE_CONFIG_H */
diff --git a/decoder/ixheaacd_mps_dec.c b/decoder/ixheaacd_mps_dec.c
index 9070dfe..715cd4c 100644
--- a/decoder/ixheaacd_mps_dec.c
+++ b/decoder/ixheaacd_mps_dec.c
@@ -17,17 +17,13 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <stdlib.h>
-#include <stdio.h>
#include <math.h>
-
-#include <assert.h>
#include <string.h>
-
#include "ixheaacd_type_def.h"
-
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
#include "ixheaacd_bitbuffer.h"
-
#include "ixheaacd_defines.h"
#include "ixheaacd_sbr_const.h"
#include "ixheaacd_memory_standards.h"
@@ -38,21 +34,17 @@
#include "ixheaacd_sbr_rom.h"
#include "ixheaacd_pulsedata.h"
#include "ixheaacd_pns.h"
-
#include "ixheaacd_sbr_common.h"
#include "ixheaacd_drc_data_struct.h"
-#include "ixheaacd_drc_dec.h"
-
-#include "ixheaacd_lt_predict.h"
-#include "ixheaacd_channelinfo.h"
-#include "ixheaacd_channel.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_error_codes.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_latmdemux.h"
#include "ixheaacd_aacdec.h"
-#include "ixheaacd_sbr_common.h"
-
#include "ixheaacd_hybrid.h"
#include "ixheaacd_sbr_scale.h"
#include "ixheaacd_ps_dec.h"
@@ -64,35 +56,33 @@
#include "ixheaacd_sbr_dec.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_config.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_mps_interface.h"
#include "ixheaacd_struct_def.h"
-
-#include "ixheaacd_config.h"
-#include "ixheaacd_mps_interface.h"
-
-#include "ixheaacd_mps_polyphase.h"
-
-#include "ixheaacd_mps_dec.h"
#include "ixheaacd_mps_process.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_smoothing.h"
+#include "ixheaacd_mps_tp_process.h"
+#include "ixheaacd_mps_reshape_bb_env.h"
+#include "ixheaacd_mps_blind.h"
+#include "ixheaacd_mps_m1m2.h"
+#include "ixheaacd_mps_basic_op.h"
#include "ixheaacd_mps_decor.h"
#include "ixheaacd_mps_hybfilter.h"
#include "ixheaacd_mps_nlc_dec.h"
#include "ixheaacd_mps_huff_tab.h"
-#include "math.h"
-#include <assert.h>
-#include <string.h>
-#include "ixheaacd_error_standards.h"
-
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-
extern const ia_huff_pt0_nodes_struct ixheaacd_huff_part0_nodes;
extern const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes;
extern const ia_huff_lav_nodes_struct ixheaacd_huff_lav_idx_nodes;
extern const ia_huff_pt0_nodes_struct ixheaacd_huff_pilot_nodes;
extern const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes;
extern const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes;
+extern const ia_huff_cpc_nodes_struct ixheaacd_huff_cpc_nodes;
extern const ia_huff_res_nodes_struct ixheaacd_huff_reshape_nodes;
WORD32 ixheaacd_mps_create(ia_mps_dec_state_struct* self, WORD32 bs_frame_len,
@@ -126,17 +116,18 @@ WORD32 ixheaacd_mps_create(ia_mps_dec_state_struct* self, WORD32 bs_frame_len,
err_code = ixheaacd_mps_header_decode(self);
if (err_code != IA_NO_ERROR) {
- return err_code;
+ self->mps_init_done = 0;
+ return err_code;
}
if ((self->residual_coding) && (self->res_bands > 0)) self->res_ch_count++;
ixheaacd_mps_env_init(self);
- ixheaacd_mps_synt_create(&self->poly_phase_filt_kernel, self->qmf_band_count);
+ self->resolution = self->qmf_band_count;
for (num_ch = 0; num_ch < self->out_ch_count; num_ch++) {
- ixheaacd_mps_synt_init(&self->qmf_filt_state[num_ch]);
+ ixheaacd_mps_synt_init(self->qmf_filt_state[num_ch]);
}
ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[0]);
@@ -149,7 +140,8 @@ WORD32 ixheaacd_mps_create(ia_mps_dec_state_struct* self, WORD32 bs_frame_len,
self->object_type);
if (err_code != IA_NO_ERROR) {
- return err_code;
+ self->mps_init_done = 0;
+ return err_code;
}
ixheaacd_mps_init_pre_and_post_matrix(self);
@@ -187,7 +179,7 @@ static const FLOAT32 ixheaacd_tsd_mul_im[] = {
VOID ixheaacd_mps_qmf_hyb_analysis(ia_mps_dec_state_struct* self) {
if (self->object_type == AOT_ER_AAC_ELD ||
self->object_type == AOT_ER_AAC_LD) {
- int k, n;
+ WORD32 k, n;
for (n = 0; n < self->time_slots; n++) {
for (k = 0; k < self->qmf_band_count; k++) {
@@ -213,7 +205,7 @@ VOID ixheaacd_mps_qmf_hyb_synthesis(ia_mps_dec_state_struct* self) {
if (self->object_type == AOT_ER_AAC_ELD ||
self->object_type == AOT_ER_AAC_LD) {
- int k, n;
+ WORD32 k, n;
for (ch = 0; ch < self->out_ch_count; ch++) {
for (n = 0; n < self->time_slots; n++) {
for (k = 0; k < self->qmf_band_count; k++) {
@@ -408,26 +400,22 @@ WORD32 ixheaacd_mps_apply(ia_mps_dec_state_struct* self,
} else {
ixheaacd_mps_qmf_hyb_analysis(self);
- err = ixheaacd_mps_apply_pre_matrix(self);
-
- if (err < 0) return err;
+ ixheaacd_mps_apply_pre_matrix(self);
ixheaacd_mps_create_w(self);
}
if ((!(self->res_bands | self->pre_mix_req)) &&
(self->config->bs_phase_coding == 0)) {
- err = ixheaacd_mps_apply_mix_matrix_type1(self);
+ ixheaacd_mps_apply_mix_matrix_type1(self);
} else if (self->pre_mix_req) {
- err = ixheaacd_mps_apply_mix_matrix_type2(self);
+ ixheaacd_mps_apply_mix_matrix_type2(self);
} else {
- err = ixheaacd_mps_apply_mix_matrix_type3(self);
+ ixheaacd_mps_apply_mix_matrix_type3(self);
}
- if (err < 0) return err;
-
if (self->config->bs_temp_shape_config == 2) {
ixheaacd_mps_time_env_shaping(self);
}
@@ -440,9 +428,7 @@ WORD32 ixheaacd_mps_apply(ia_mps_dec_state_struct* self,
return 0;
}
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-
-static VOID ixheaacd_mps_pcm_decode(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_pcm_decode(ia_bit_buf_struct *it_bit_buff,
WORD32* out_data_1, WORD32* out_data_2,
WORD32 ixheaacd_drc_offset, WORD32 num_val,
WORD32 num_levels) {
@@ -485,7 +471,7 @@ static VOID ixheaacd_mps_pcm_decode(ia_handle_bit_buf_struct it_bit_buff,
max_grp_len = 1;
break;
default:
- assert(0);
+ return;
}
ld_nlev = (FLOAT32)(log((FLOAT32)num_levels) / log(2.f));
@@ -523,7 +509,7 @@ static VOID ixheaacd_mps_pcm_decode(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-static VOID ixheaacd_mps_huff_read(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_huff_read(ia_bit_buf_struct *it_bit_buff,
const WORD32 (*node_tab)[][2],
WORD32* out_data) {
WORD32 node = 0;
@@ -539,7 +525,7 @@ static VOID ixheaacd_mps_huff_read(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-static VOID ixheaacd_mps_huff_read_2d(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_huff_read_2d(ia_bit_buf_struct *it_bit_buff,
const WORD32 (*node_tab)[][2],
WORD32 out_data[2], WORD32* escape)
@@ -562,7 +548,7 @@ static VOID ixheaacd_mps_huff_read_2d(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-static VOID ixheaacd_mps_sym_restore(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_sym_restore(ia_bit_buf_struct *it_bit_buff,
WORD32 lav, WORD32 data[2]) {
WORD32 tmp = 0;
UWORD32 sym_bit = 0;
@@ -598,7 +584,7 @@ static VOID ixheaacd_mps_sym_restore(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-static VOID ixheaacd_mps_sym_restoreipd(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_sym_restoreipd(ia_bit_buf_struct *it_bit_buff,
WORD32 lav, WORD32 data[2]) {
WORD32 tmp = 0;
UWORD32 sym_bit = 0;
@@ -626,7 +612,7 @@ static VOID ixheaacd_mps_sym_restoreipd(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-static VOID ixheaacd_mps_huff_dec_pilot(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_mps_huff_dec_pilot(ia_bit_buf_struct *it_bit_buff,
const WORD32 (*node_tab)[][2],
WORD32* pilot_data) {
WORD32 node = 0;
@@ -638,7 +624,7 @@ static VOID ixheaacd_mps_huff_dec_pilot(ia_handle_bit_buf_struct it_bit_buff,
}
static VOID ixheaacd_mps_huff_dec_cld_1d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_cld_node_1d_struct* huff_nodes, WORD32* out_data,
WORD32 num_val, WORD32 p0_flag) {
WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
@@ -672,7 +658,7 @@ static VOID ixheaacd_mps_huff_dec_cld_1d(
}
static VOID ixheaacd_mps_huff_dec_ipd_1d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_ipd_node_1d_struct* huff_nodes, WORD32* out_data,
WORD32 num_val, WORD32 p0_flag) {
WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
@@ -697,7 +683,7 @@ static VOID ixheaacd_mps_huff_dec_ipd_1d(
}
static VOID ixheaacd_mps_huff_dec_icc_1d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_icc_node_1d_struct* huff_nodes, WORD32* out_data,
WORD32 num_val, WORD32 p0_flag) {
WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
@@ -730,8 +716,39 @@ static VOID ixheaacd_mps_huff_dec_icc_1d(
return;
}
+static VOID ia_mps_dec_huff_dec_cpc_1d(
+ const ia_huff_cpc_node_1d_struct *huff_nodes, WORD32 *out_data,
+ WORD32 num_val, WORD32 p0_flag, ia_bit_buf_struct *h_bit_buf) {
+ WORD32 i = 0, node = 0, offset = 0;
+ WORD32 od = 0, od_sign = 0;
+ WORD32 data = 0;
+
+ if (p0_flag) {
+ ixheaacd_mps_huff_read(
+ h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
+ &node);
+ out_data[0] = -(node + 1);
+ offset = 1;
+ }
+
+ for (i = offset; i < num_val; i++) {
+ ixheaacd_mps_huff_read(h_bit_buf,
+ (ia_huff_node_struct)&huff_nodes->node_tab, &node);
+ od = -(node + 1);
+
+ if (od != 0) {
+ data = ixheaacd_read_bits_buf(h_bit_buf, 1);
+ od_sign = data;
+
+ if (od_sign) od = -od;
+ }
+
+ out_data[i] = od;
+ }
+}
+
static VOID ixheaacd_mps_huff_dec_cld_2d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_cld_node_2d_struct* huff_nodes, WORD32 out_data[][2],
WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
@@ -808,7 +825,7 @@ static VOID ixheaacd_mps_huff_dec_cld_2d(
}
static VOID ixheaacd_mps_huff_dec_icc_2d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_icc_node_2d_struct* huff_nodes, WORD32 out_data[][2],
WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
@@ -883,7 +900,7 @@ static VOID ixheaacd_mps_huff_dec_icc_2d(
}
static VOID ixheaacd_mps_huff_dec_ipd_2d(
- ia_handle_bit_buf_struct it_bit_buff,
+ ia_bit_buf_struct *it_bit_buff,
const ia_huff_ipd_node_2d_struct* huff_nodes, WORD32 out_data[][2],
WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
@@ -962,12 +979,86 @@ static VOID ixheaacd_mps_huff_dec_ipd_2d(
return;
}
-static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
- WORD32* out_data_1, WORD32* out_data_2,
- WORD32 data_type, WORD32 diff_type_1,
- WORD32 diff_type_2, WORD32 pilot_coding_flag,
- WORD32* pilot_data, WORD32 num_val,
- WORD32* cdg_scheme, WORD32 ld_mps_flag) {
+static VOID ia_mps_dec_huff_dec_cpc_2d(
+ const ia_mps_dec_huff_cpc_nod_2d *huff_nodes, WORD32 out_data[][2],
+ WORD32 num_val, WORD32 stride, WORD32 *p0_data[2],
+ ia_bit_buf_struct *h_bit_buf) {
+ WORD32 i = 0, lav = 0, escape = 0, esc_cntr = 0;
+ WORD32 node = 0;
+ WORD32 data = 0;
+
+ WORD32 esc_data[2][MAXBANDS] = {{0}};
+ WORD32 esc_idx[MAXBANDS] = {0};
+
+ ixheaacd_mps_huff_read(
+ h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_lav_idx_nodes.node_tab),
+ &node);
+ data = -(node + 1);
+
+ lav = 3 * data + 3;
+
+ if (p0_data[0] != NULL) {
+ ixheaacd_mps_huff_read(
+ h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
+ &node);
+ *p0_data[0] = -(node + 1);
+ }
+ if (p0_data[1] != NULL) {
+ ixheaacd_mps_huff_read(
+ h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
+ &node);
+ *p0_data[1] = -(node + 1);
+ }
+
+ for (i = 0; i < num_val; i += stride) {
+ switch (lav) {
+ case LAV_3:
+ ixheaacd_mps_huff_read_2d(h_bit_buf,
+ (ia_huff_node_struct)&huff_nodes->lav3,
+ out_data[i], &escape);
+ break;
+ case LAV_6:
+ ixheaacd_mps_huff_read_2d(h_bit_buf,
+ (ia_huff_node_struct)&huff_nodes->lav6,
+ out_data[i], &escape);
+ break;
+ case LAV_9:
+ ixheaacd_mps_huff_read_2d(h_bit_buf,
+ (ia_huff_node_struct)&huff_nodes->lav9,
+ out_data[i], &escape);
+ break;
+ case LAV_12:
+ ixheaacd_mps_huff_read_2d(h_bit_buf,
+ (ia_huff_node_struct)&huff_nodes->lav12,
+ out_data[i], &escape);
+ break;
+ default:
+ break;
+ }
+
+ if (escape) {
+ esc_idx[esc_cntr++] = i;
+ } else {
+ ixheaacd_mps_sym_restore(h_bit_buf, lav, out_data[i]);
+ }
+ }
+
+ if (esc_cntr > 0) {
+ ixheaacd_mps_pcm_decode(h_bit_buf, esc_data[0], esc_data[1], 0,
+ (esc_cntr << 1), ((lav << 1) + 1));
+
+ for (i = 0; i < esc_cntr; i++) {
+ out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
+ out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
+ }
+ }
+ return;
+}
+
+static VOID ixheaacd_huff_decode(ia_bit_buf_struct *it_bit_buff, WORD32 *out_data_1,
+ WORD32 *out_data_2, WORD32 data_type, WORD32 diff_type_1,
+ WORD32 diff_type_2, WORD32 pilot_coding_flag, WORD32 *pilot_data,
+ WORD32 num_val, WORD32 *cdg_scheme, WORD32 ld_mps_flag) {
WORD32 diff_type;
WORD32 i = 0;
@@ -992,7 +1083,6 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
WORD32 huff_yy_1;
WORD32 huff_yy_2;
WORD32 huff_yy;
-
if (pilot_coding_flag) {
switch (data_type) {
case CLD:
@@ -1011,11 +1101,17 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
}
break;
- default:
+ case CPC:
if (out_data_1 != NULL) {
- return 0;
+ ixheaacd_mps_huff_dec_pilot(
+ it_bit_buff,
+ (ia_huff_node_struct) & (ixheaacd_huff_pilot_nodes.cpc),
+ pilot_data);
}
break;
+
+ default:
+ break;
}
}
@@ -1087,7 +1183,19 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
}
break;
+ case CPC:
+ if (out_data_1 != NULL) {
+ ia_mps_dec_huff_dec_cpc_1d(
+ &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]), out_data_1,
+ num_val_1_int, p0_flag[0], it_bit_buff);
+ }
+ if (out_data_2 != NULL) {
+ ia_mps_dec_huff_dec_cpc_1d(
+ &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]), out_data_2,
+ num_val_2_int, p0_flag[1], it_bit_buff);
+ }
+ break;
default:
break;
}
@@ -1198,7 +1306,28 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
}
}
break;
+ case CPC:
+ if (out_data_1 != NULL) {
+ ia_mps_dec_huff_dec_cpc_2d(
+ &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_1][FREQ_PAIR]), pair_vec,
+ num_val_1_int, 2, p0_data_1, it_bit_buff);
+ if (df_rest_flag_1) {
+ ia_mps_dec_huff_dec_cpc_1d(&(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]),
+ out_data_1_int + num_val_1_int, 1, 0, it_bit_buff);
+ }
+ }
+ if (out_data_2 != NULL) {
+ ia_mps_dec_huff_dec_cpc_2d(
+ &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_2][FREQ_PAIR]), pair_vec + 1,
+ num_val_2_int, 2, p0_data_2, it_bit_buff);
+ if (df_rest_flag_2) {
+ ia_mps_dec_huff_dec_cpc_1d(
+ &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]),
+ out_data_2_int + num_val_2_int, 1, 0, it_bit_buff);
+ }
+ }
+ break;
default:
break;
}
@@ -1263,7 +1392,10 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
&ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy][TIME_PAIR],
pair_vec, num_val_1_int, 1, p0_data_1);
break;
-
+ case CPC:
+ ia_mps_dec_huff_dec_cpc_2d(&(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy][TIME_PAIR]),
+ pair_vec, num_val_1_int, 1, p0_data_1, it_bit_buff);
+ break;
default:
break;
}
@@ -1285,7 +1417,7 @@ static WORD32 ixheaacd_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
break;
}
- return 1;
+ return;
}
static VOID ixheaacd_diff_freq_decode(WORD32* diff_data, WORD32* out_data,
@@ -1335,7 +1467,7 @@ static VOID ixheaacd_mps_diff_time_dec_fwd(WORD32* prev_data, WORD32* diff_data,
}
}
-static VOID ixheaacd_attach_lsb(ia_handle_bit_buf_struct it_bit_buff,
+static VOID ixheaacd_attach_lsb(ia_bit_buf_struct *it_bit_buff,
WORD32* in_data_msb, WORD32 ixheaacd_drc_offset,
WORD32 num_lsb, WORD32 num_val,
WORD32* out_data) {
@@ -1357,15 +1489,11 @@ static VOID ixheaacd_attach_lsb(ia_handle_bit_buf_struct it_bit_buff,
return;
}
-WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
- WORD32 outdata[][MAXBANDS],
- WORD32 history[MAXBANDS], WORD32 data_type,
- WORD32 set_idx, WORD32 data_bands,
- WORD32 pair_flag, WORD32 coarse_flag,
- WORD32 diff_time_back_flag,
- WORD32 ld_mps_flag)
-
-{
+WORD32 ixheaacd_mps_ecdatapairdec(ia_bit_buf_struct *it_bit_buff, WORD32 outdata[][MAXBANDS],
+ WORD32 history[MAXBANDS], WORD32 data_type, WORD32 set_idx,
+ WORD32 start_band, WORD32 data_bands, WORD32 pair_flag,
+ WORD32 coarse_flag, WORD32 diff_time_back_flag,
+ WORD32 ld_mps_flag, WORD32 heaac_mps_present, WORD32 ec_flag) {
WORD32 attach_lsb_flag = 0;
WORD32 pcm_coding_flag = 0;
WORD32 pilot_coding_flag = 0;
@@ -1386,6 +1514,10 @@ WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
WORD32 cdg_scheme = HUFF_1D;
WORD32 direction = BACKWARDS;
+ if (heaac_mps_present == 1) {
+ band_start = start_band;
+ }
+
switch (data_type) {
case CLD:
if (coarse_flag) {
@@ -1425,9 +1557,20 @@ WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
}
break;
+ case CPC:
+ if (coarse_flag) {
+ attach_lsb_flag = 0;
+ quant_levels = 26;
+ quant_offset = 10;
+ } else {
+ attach_lsb_flag = 1;
+ quant_levels = 51;
+ quant_offset = 20;
+ }
+ break;
+
default:
- fprintf(stderr, "Unknown type of data!\n");
- return -1;
+ break;
}
data = ixheaacd_read_bits_buf(it_bit_buff, 1);
@@ -1435,6 +1578,13 @@ WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
pilot_coding_flag = 0;
+ if (heaac_mps_present == 1) {
+ if (pcm_coding_flag && data_bands > 4) {
+ data = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ pilot_coding_flag = data;
+ }
+ }
+
if (pcm_coding_flag && !pilot_coding_flag) {
if (pair_flag) {
data_array[0] = data_pair[0];
@@ -1475,64 +1625,78 @@ WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
}
}
- if (data_bands <= 0) return -1;
-
- if (!ixheaacd_huff_decode(it_bit_buff, data_array[0], data_array[1],
- data_type, diff_type[0], diff_type[1],
- pilot_coding_flag, pilot_data, data_bands,
- &cdg_scheme, ld_mps_flag)) {
- return 0;
+ if (data_bands <= 0) {
+ if (!ec_flag)
+ return -1;
+ else
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_FATAL_ERROR);
}
- if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
+ ixheaacd_huff_decode(it_bit_buff, data_array[0], data_array[1], data_type, diff_type[0],
+ diff_type[1], pilot_coding_flag, pilot_data, data_bands, &cdg_scheme,
+ ld_mps_flag);
+
+ if (pilot_coding_flag && heaac_mps_present == 1) {
+ WORD32 i;
+ for (i = 0; i < data_bands; i++) {
+ data_pair[0][i] = data_diff[0][i] + pilot_data[0];
+ }
+
if (pair_flag) {
- if ((diff_type[0] == DIFF_TIME) && !diff_time_back_flag) {
- direction = FORWARDS;
- } else if (diff_type[1] == DIFF_TIME) {
- direction = BACKWARDS;
+ for (i = 0; i < data_bands; i++) {
+ data_pair[1][i] = data_diff[1][i] + pilot_data[0];
+ }
+ }
+ } else {
+ if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
+ if (pair_flag) {
+ if ((diff_type[0] == DIFF_TIME) && !diff_time_back_flag) {
+ direction = FORWARDS;
+ } else if (diff_type[1] == DIFF_TIME) {
+ direction = BACKWARDS;
+ } else {
+ data = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ direction = data;
+ }
} else {
- data = ixheaacd_read_bits_buf(it_bit_buff, 1);
- direction = data;
+ direction = BACKWARDS;
}
- } else {
- direction = BACKWARDS;
}
- }
- mixed_time_pair = (diff_type[0] != diff_type[1]) &&
- ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
+ mixed_time_pair = (diff_type[0] != diff_type[1]) &&
+ ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
- if (direction == BACKWARDS) {
- if (diff_type[0] == DIFF_FREQ) {
- ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
- } else {
- WORD32 i;
- for (i = 0; i < data_bands; i++) {
- msb_state[i] = history[i + band_start] + quant_offset;
- if (attach_lsb_flag) {
- msb_state[i] >>= 1;
+ if (direction == BACKWARDS) {
+ if (diff_type[0] == DIFF_FREQ) {
+ ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
+ } else {
+ WORD32 i;
+ for (i = 0; i < data_bands; i++) {
+ msb_state[i] = history[i + band_start] + quant_offset;
+ if (attach_lsb_flag) {
+ msb_state[i] >>= 1;
+ }
}
+ ixheaacd_mps_diff_time_dec_bwd(msb_state, data_diff[0], data_pair[0],
+ mixed_time_pair, data_bands);
+ }
+ if (diff_type[1] == DIFF_FREQ) {
+ ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
+ } else {
+ ixheaacd_mps_diff_time_dec_bwd(data_pair[0], data_diff[1], data_pair[1],
+ mixed_time_pair, data_bands);
}
- ixheaacd_mps_diff_time_dec_bwd(msb_state, data_diff[0], data_pair[0],
- mixed_time_pair, data_bands);
- }
- if (diff_type[1] == DIFF_FREQ) {
- ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
} else {
- ixheaacd_mps_diff_time_dec_bwd(data_pair[0], data_diff[1], data_pair[1],
- mixed_time_pair, data_bands);
- }
- } else {
- ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
+ ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
- if (diff_type[0] == DIFF_FREQ) {
- ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
- } else {
- ixheaacd_mps_diff_time_dec_fwd(data_pair[1], data_diff[0], data_pair[0],
- mixed_time_pair, data_bands);
+ if (diff_type[0] == DIFF_FREQ) {
+ ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
+ } else {
+ ixheaacd_mps_diff_time_dec_fwd(data_pair[1], data_diff[0], data_pair[0],
+ mixed_time_pair, data_bands);
+ }
}
}
-
ixheaacd_attach_lsb(it_bit_buff, data_pair[0], quant_offset,
attach_lsb_flag ? 1 : 0, data_bands, data_pair[0]);
if (pair_flag) {
@@ -1551,7 +1715,7 @@ WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct it_bit_buff,
return IA_NO_ERROR;
}
-VOID ixheaacd_mps_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
+VOID ixheaacd_mps_huff_decode(ia_bit_buf_struct *it_bit_buff,
WORD32* out_data, WORD32 num_val) {
WORD32 val_rcvd = 0, dummy = 0, i = 0, val = 0, len = 0;
WORD32 rl_data[2] = {0};
@@ -1570,3 +1734,375 @@ VOID ixheaacd_mps_huff_decode(ia_handle_bit_buf_struct it_bit_buff,
return;
}
+
+VOID ixheaacd_update_out_buffer(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD16 *out_buf) {
+ WORD32 ch, sam;
+ WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at;
+ WORD32 frame_length = pstr_mps_state->frame_length;
+
+ WORD32 *p_time_out = pstr_mps_state->array_struct->time_out;
+
+ for (ch = 0; ch < num_output_channels_at; ch++) {
+ WORD32 *time_out = p_time_out;
+ for (sam = 0; sam < frame_length; sam++) {
+ out_buf[sam * num_output_channels_at + ch] = (*time_out++) >> 16;
+ }
+ p_time_out += QBXTS;
+ }
+
+ return;
+}
+
+VOID ixheaacd_update_time_out_buffer(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 n;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 tree_config = pstr_mps_state->tree_config;
+ WORD32 lfe_gain = pstr_mps_state->lfe_gain;
+ WORD32 surround_gain = pstr_mps_state->surround_gain;
+
+ if (!pstr_mps_state->bs_config.arbitrary_tree && up_mix_type != 2 && up_mix_type != 3) {
+ WORD32 frame_length = pstr_mps_state->frame_length;
+
+ WORD32 *time_out_3 = pstr_mps_state->array_struct->time_out + QBXTSX3;
+ WORD32 *time_out_4 = time_out_3 + QBXTS;
+ WORD32 *time_out_5 = time_out_4 + QBXTS;
+ WORD32 *time_out_6 = time_out_5 + QBXTS;
+ WORD32 *time_out_7 = time_out_6 + QBXTS;
+
+ for (n = 0; n < frame_length; n++) {
+ *time_out_3 = ixheaacd_mps_mult32_shr_15(*time_out_3, lfe_gain);
+ time_out_3++;
+ *time_out_4 = ixheaacd_mps_mult32_shr_15(*time_out_4, surround_gain);
+ time_out_4++;
+ *time_out_5 = ixheaacd_mps_mult32_shr_15(*time_out_5, surround_gain);
+ time_out_5++;
+ }
+
+ if (tree_config == 4 || tree_config == 6) {
+ for (n = 0; n < frame_length; n++) {
+ *time_out_6 = ixheaacd_mps_mult32_shr_15(*time_out_6, surround_gain);
+ time_out_6++;
+ *time_out_7 = ixheaacd_mps_mult32_shr_15(*time_out_7, surround_gain);
+ time_out_7++;
+ }
+ }
+ }
+}
+
+static IA_ERRORCODE ixheaacd_apply_frame(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 in_time_slots,
+ WORD32 *m_qmf_real, WORD32 *m_qmf_imag,
+ WORD16 *out_buf) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ WORD32 ch, ts, qs;
+ WORD32 *pbuf_real, *pbuf_imag, *pbuf_re, *pbuf_im;
+ WORD32 *buf_real, *buf_imag;
+ WORD32 *qmf_input_delay_real_2 =
+ pstr_mps_state->mps_persistent_mem.qmf_input_delay_real;
+ WORD32 *qmf_input_delay_imag_2 =
+ pstr_mps_state->mps_persistent_mem.qmf_input_delay_imag;
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 cur_time_slot = pstr_mps_state->cur_time_slot;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 residual_coding = pstr_mps_state->residual_coding;
+ WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
+
+ WORD32 *qmf_input_delay_real_1, *qmf_input_delay_imag_1;
+ WORD32 *qmf_input_delay_real, *qmf_input_delay_imag;
+
+ WORD32 *p_qmf_real = m_qmf_real;
+ WORD32 *p_qmf_imag = m_qmf_imag;
+ WORD32 *p_qmf_re, *p_qmf_im, *qmf_real, *qmf_imag;
+
+ if (cur_time_slot + in_time_slots > time_slots) {
+ if (pstr_mps_state->ec_flag)
+ cur_time_slot = time_slots - in_time_slots;
+ else
+ return IA_FATAL_ERROR;
+ }
+ if (time_slots % HOP_SLOTS != 0) {
+ if (pstr_mps_state->ec_flag)
+ time_slots = time_slots - (time_slots % HOP_SLOTS);
+ else
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS;
+ }
+
+ pbuf_real = pstr_mps_state->array_struct->buf_real;
+ pbuf_imag = pstr_mps_state->array_struct->buf_imag;
+
+ if (up_mix_type == 1) {
+ for (ch = 0; ch < num_input_channels; ch++) {
+ pbuf_re = pbuf_real;
+ pbuf_im = pbuf_imag;
+
+ p_qmf_re = p_qmf_real;
+ p_qmf_im = p_qmf_imag;
+
+ for (ts = 0; ts < in_time_slots; ts++) {
+ buf_real = pbuf_re + (cur_time_slot + ts);
+ buf_imag = pbuf_im + (cur_time_slot + ts);
+
+ qmf_real = p_qmf_re;
+ qmf_imag = p_qmf_im;
+
+ for (qs = 0; qs < qmf_bands; qs++) {
+ *buf_real++ = *qmf_real++;
+ *buf_imag++ = *qmf_imag++;
+ }
+ pbuf_re += MAX_HYBRID_BANDS;
+ pbuf_im += MAX_HYBRID_BANDS;
+
+ p_qmf_re += MAX_NUM_QMF_BANDS;
+ p_qmf_im += MAX_NUM_QMF_BANDS;
+ }
+ pbuf_real += TSXHB;
+ pbuf_imag += TSXHB;
+
+ p_qmf_real += QBXTS;
+ p_qmf_imag += QBXTS;
+ }
+ } else {
+ for (ch = 0; ch < num_input_channels; ch++) {
+ WORD32 offset = ch * PCXQB;
+ qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
+ qmf_input_delay_real_1 = qmf_input_delay_real_2 + offset;
+ qmf_input_delay_imag_1 = qmf_input_delay_imag_2 + offset;
+
+ pbuf_re = pbuf_real + cur_time_slot * MAX_HYBRID_BANDS;
+ pbuf_im = pbuf_imag + cur_time_slot * MAX_HYBRID_BANDS;
+
+ p_qmf_re = p_qmf_real;
+ p_qmf_im = p_qmf_imag;
+
+ for (ts = 0; ts < in_time_slots; ts++) {
+ WORD32 off_set = qmf_input_delay_index * MAX_NUM_QMF_BANDS;
+ qmf_input_delay_real = qmf_input_delay_real_1 + off_set;
+ qmf_input_delay_imag = qmf_input_delay_imag_1 + off_set;
+
+ buf_real = pbuf_re;
+ buf_imag = pbuf_im;
+
+ qmf_real = p_qmf_re;
+ qmf_imag = p_qmf_im;
+
+ for (qs = 0; qs < qmf_bands; qs++) {
+ {
+ *buf_real++ = *qmf_input_delay_real;
+ *buf_imag++ = *qmf_input_delay_imag;
+
+ *qmf_input_delay_real++ = *qmf_real++;
+ *qmf_input_delay_imag++ = *qmf_imag++;
+ }
+ }
+
+ qmf_input_delay_index++;
+
+ if (qmf_input_delay_index == PC_FILTERDELAY) {
+ qmf_input_delay_index = 0;
+ }
+ pbuf_re += MAX_HYBRID_BANDS;
+ pbuf_im += MAX_HYBRID_BANDS;
+
+ p_qmf_re += MAX_NUM_QMF_BANDS;
+ p_qmf_im += MAX_NUM_QMF_BANDS;
+ }
+ pbuf_real += TSXHB;
+ pbuf_imag += TSXHB;
+
+ p_qmf_real += QBXTS;
+ p_qmf_imag += QBXTS;
+ }
+ pstr_mps_state->qmf_input_delay_index = qmf_input_delay_index;
+ }
+
+ pstr_mps_state->cur_time_slot += in_time_slots;
+ cur_time_slot = pstr_mps_state->cur_time_slot;
+
+ if (pstr_mps_state->cur_time_slot < time_slots) {
+ if (pstr_mps_state->ec_flag) {
+ pstr_mps_state->cur_time_slot = time_slots;
+ } else
+ return IA_FATAL_ERROR;
+ }
+
+ pstr_mps_state->cur_time_slot = 0;
+
+ err_code = ixheaacd_decode_frame(pstr_mps_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ ixheaacd_mdct_2_qmf(pstr_mps_state);
+
+ ixheaacd_hybrid_qmf_analysis(pstr_mps_state);
+
+ if (residual_coding || (arbitrary_downmix == 2)) {
+ ixheaacd_update_buffers(pstr_mps_state);
+ }
+
+ if (up_mix_type == 1) {
+ ixheaacd_apply_blind(pstr_mps_state);
+ }
+
+ ixheaacd_calc_m1m2(pstr_mps_state);
+
+ ixheaacd_smooth_m1m2(pstr_mps_state);
+
+ ixheaacd_mps_apply_m1(pstr_mps_state);
+
+ ixheaacd_buffer_m1(pstr_mps_state);
+
+ if (up_mix_type != 2) {
+ if (pstr_mps_state->temp_shape_config == 2) {
+ ixheaacd_pre_reshape_bb_env(pstr_mps_state);
+ }
+ }
+
+ ixheaacd_create_w(pstr_mps_state);
+
+ ixheaacd_apply_m2(pstr_mps_state);
+
+ ixheaacd_buffer_m2(pstr_mps_state);
+
+ if (up_mix_type != 2) {
+ if (pstr_mps_state->temp_shape_config == 2) {
+ ixheaacd_reshape_bb_env(pstr_mps_state);
+ }
+ }
+
+ ixheaacd_tp_process(pstr_mps_state);
+
+ ixheaacd_update_time_out_buffer(pstr_mps_state);
+
+ ixheaacd_update_out_buffer(pstr_mps_state, out_buf);
+
+ pstr_mps_state->parse_next_bitstream_frame = 1;
+
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_heaac_mps_apply(ia_exhaacplus_dec_api_struct *self,
+ WORD16 *output_buf, UWORD8 *mps_buffer,
+ WORD32 mps_bytes) {
+ ia_heaac_mps_state_struct *pstr_mps_state =
+ &self->p_state_aac->heaac_mps_handle;
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 n_channels, n_time_slots, qmf_bands, channel;
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+
+ WORD32 *p_qmf_real = pstr_mps_state->array_struct->m_qmf_real;
+ WORD32 *p_qmf_imag = pstr_mps_state->array_struct->m_qmf_imag;
+ WORD32 buffer_size = mps_bytes;
+
+ if (self->p_state_aac->heaac_mps_handle.is_first == 1) {
+ self->p_state_aac->heaac_mps_handle.is_first = 1;
+ if (pstr_mps_state->bytes_remaining != 0) {
+ buffer_size = mps_bytes + pstr_mps_state->bytes_remaining;
+ for (WORD32 ii = 0; ii < mps_bytes; ii++) {
+ pstr_mps_state->temp_buf[ii + pstr_mps_state->bytes_remaining] =
+ mps_buffer[ii];
+ }
+
+ pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
+ &pstr_mps_state->mps_bit_buf, (UWORD8 *)pstr_mps_state->temp_buf,
+ buffer_size);
+ pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
+ &self->p_state_aac->xaac_jmp_buf;
+
+ pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
+ } else {
+ memcpy(pstr_mps_state->temp_buf, mps_buffer, mps_bytes);
+ buffer_size = mps_bytes;
+ pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
+ &pstr_mps_state->mps_bit_buf, (UWORD8 *)mps_buffer, buffer_size);
+ pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
+
+ pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
+ &self->p_state_aac->xaac_jmp_buf;
+ }
+ }
+
+ if (curr_state->num_input_channels > 2 && pstr_mps_state->mps_with_sbr == 1) {
+ if (pstr_mps_state->ec_flag) {
+ curr_state->num_input_channels = 2;
+ pstr_mps_state->frame_ok = 0;
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
+
+ n_channels = curr_state->num_input_channels;
+ n_time_slots = curr_state->time_slots;
+ qmf_bands = curr_state->qmf_bands;
+
+ if (pstr_mps_state->mps_decode == 1) {
+ if (pstr_mps_state->mps_with_sbr) {
+ for (channel = 0; channel < n_channels; channel++) {
+ WORD32 kk = 0;
+
+ for (WORD32 ii = 0; ii < n_time_slots; ii++) {
+ FLOAT32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0]
+ ->pstr_sbr_channel[channel]
+ ->str_sbr_dec.pp_qmf_buf_real[ii];
+ FLOAT32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0]
+ ->pstr_sbr_channel[channel]
+ ->str_sbr_dec.pp_qmf_buf_imag[ii];
+
+ for (WORD32 jj = 0; jj < qmf_bands; jj++) {
+ p_qmf_real[kk] = ixheaacd_mps_mult32_shr_15(
+ curr_state->clip_protect_gain, (WORD32)(qmf_re[jj] * 1024));
+ p_qmf_imag[kk++] = ixheaacd_mps_mult32_shr_15(
+ curr_state->clip_protect_gain, (WORD32)(qmf_im[jj] * 1024));
+ }
+ }
+ p_qmf_real += QBXTS;
+ p_qmf_imag += QBXTS;
+ }
+ } else {
+ for (channel = 0; channel < n_channels; channel++) {
+ ixheaacd_calc_ana_filt_bank(pstr_mps_state, output_buf, p_qmf_real,
+ p_qmf_imag, channel);
+
+ p_qmf_real += QBXTS;
+ p_qmf_imag += QBXTS;
+ }
+ }
+ if (!pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
+ error_code = ixheaacd_parse_frame(pstr_mps_state);
+ if (error_code != IA_NO_ERROR) return error_code;
+ }
+
+ if (!pstr_mps_state->first_frame || !pstr_mps_state->ec_flag) {
+ error_code = ixheaacd_apply_frame(pstr_mps_state, n_time_slots,
+ pstr_mps_state->array_struct->m_qmf_real,
+ pstr_mps_state->array_struct->m_qmf_imag, output_buf);
+ if (error_code != IA_NO_ERROR) return error_code;
+ }
+ if (error_code == 0 && pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
+ error_code = ixheaacd_parse_frame(pstr_mps_state);
+ if (error_code != IA_NO_ERROR) {
+ pstr_mps_state->frame_ok = 0;
+ }
+ }
+
+ pstr_mps_state->i_bytes_consumed_mps =
+ (WORD32)(pstr_mps_state->ptr_mps_bit_buff->ptr_read_next -
+ pstr_mps_state->ptr_mps_bit_buff->ptr_bit_buf_base);
+
+ pstr_mps_state->bytes_remaining =
+ buffer_size - pstr_mps_state->i_bytes_consumed_mps;
+
+ if (pstr_mps_state->bytes_remaining != 0) {
+ for (WORD32 ii = 0; ii < pstr_mps_state->bytes_remaining; ii++) {
+ pstr_mps_state->temp_buf[ii] =
+ pstr_mps_state->temp_buf[ii + pstr_mps_state->i_bytes_consumed_mps];
+ }
+ }
+ }
+ self->p_state_aac->heaac_mps_handle.is_first = 1;
+ self->p_state_aac->heaac_mps_handle.first_frame = 0;
+
+ return error_code;
+}
diff --git a/decoder/ixheaacd_mps_dec.h b/decoder/ixheaacd_mps_dec.h
index b163286..68a11e2 100644
--- a/decoder/ixheaacd_mps_dec.h
+++ b/decoder/ixheaacd_mps_dec.h
@@ -20,32 +20,79 @@
#ifndef IXHEAACD_MPS_DEC_H
#define IXHEAACD_MPS_DEC_H
+#include "stddef.h"
+
#define ABS_THR (1e-9f * 32768 * 32768)
#define MAX_NUM_QMF_BANDS_MPS (128)
#define MAX_NUM_QMF_BANDS_MPS_NEW (64)
#define MAX_PARAMETER_SETS_MPS (9)
-#define MAX_M2_OUTPUT_MP (MAX_OUTPUT_CHANNELS_MPS)
#define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
-#define MAX_OUTPUT_CHANNELS_MPS_AT (2)
-#define HYBRID_BAND_BORDER (12)
-#define DECORR_FILT_0_ORD_LD_MPS (20)
-#define DECORR_FILT_1_ORD_LD_MPS (15)
-#define DECORR_FILT_2_ORD_LD_MPS (6)
-#define DECORR_FILT_3_ORD_LD_MPS (3)
+#define DECORR_FILTER_ORDER_BAND_0 (20)
+#define DECORR_FILTER_ORDER_BAND_1 (15)
+#define DECORR_FILTER_ORDER_BAND_2 (6)
+#define DECORR_FILTER_ORDER_BAND_3 (3)
+
+#define MAX_DECORR_FILTER_ORDER (DECORR_FILTER_ORDER_BAND_0)
#define DECORR_FILT_0_ORD (10)
#define DECORR_FILT_1_ORD (8)
#define DECORR_FILT_2_ORD (3)
#define DECORR_FILT_3_ORD (2)
-#define MAX_DECORR_FIL_ORDER (DECORR_FILT_0_ORD_LD_MPS)
-#define MAX_DECORR_FIL_ORDER_MPS (DECORR_FILT_0_ORD)
-
#define NO_RES_BANDS -1
+#define MAX_HYBRID_BANDS_MPS (MAX_NUM_QMF_BANDS_MPS_NEW - 3 + 10)
+#define MAX_TIME_SLOTS (72)
+
+#define QMF_HYBRID_FILT_ORDER (13)
+#define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
+#define MAX_NO_TIME_SLOTS_DELAY (14)
+
+#define MAXNRSBRCHANNELS 2
+#define abs(x) (x < 0) ? -x : x
+
+#define PC_FILTERLENGTH (11)
+#define PC_FILTERDELAY ((PC_FILTERLENGTH - 1) / 2)
+#define ABS_THR_FIX (35184)
+
+#ifndef MAX_NUM_QMF_BANDS
+#define MAX_NUM_QMF_BANDS (64)
+#endif
+
+#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
+#define MAX_INPUT_CHANNELS_MPS (6)
+
+#define MAX_RESIDUAL_CHANNELS_MPS (10)
+#define MAX_RESIDUAL_FRAMES (4)
+
+#define MAX_OUTPUT_CHANNELS_MPS (8)
+#define MAX_NUM_PARAMS (MAX_NUM_OTT + 4 * MAX_NUM_TTT + MAX_INPUT_CHANNELS_MPS)
+
+#define MAX_PARAMETER_SETS (8)
+
+#define MAX_M1_OUTPUT (8)
+#define MAX_M2_INPUT (8)
+#define MAX_M2_OUTPUT (8)
+
+#define PROTO_LEN (13)
+#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
+#define BUFFER_LEN_HF ((PROTO_LEN - 1) / 2 + MAX_TIME_SLOTS)
+
+#define MAX_NO_DECORR_CHANNELS (5)
+
+#define MAX_OUTPUT_CHANNELS_AT_MPS (8)
+
+#define QMF_FILTER_STATE_SYN_SIZE_MPS (576)
+
+#define QMF_FILTER_STATE_ANA_SIZE_MPS (640)
+
+#define MAX_NUM_POAT max(MAX_NUM_PARAMS, MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT)
+
+#define BP_SIZE 25
+
typedef struct {
FLOAT32 re;
FLOAT32 im;
@@ -67,32 +114,12 @@ typedef struct ia_mps_decor_filt_struct {
WORD32 num_len;
WORD32 den_len;
- ia_cmplx_flt_struct state[MAX_DECORR_FIL_ORDER + 1];
+ ia_cmplx_flt_struct state[MAX_DECORR_FILTER_ORDER + 1];
const FLOAT32 *num;
const FLOAT32 *den;
} ia_mps_decor_filt_struct;
-typedef struct ia_mps_decor_struct *ia_mps_decor_struct_handle;
-
-#define MAX_HYBRID_BANDS_MPS (MAX_NUM_QMF_BANDS_MPS_NEW - 3 + 10)
-#define MAX_HYBRID_BANDS_MPS_LD (MAX_NUM_QMF_BANDS_MPS - 3 + 10)
-#define MAX_TIME_SLOTS (72)
-
-#define MAX_M_INPUT_MPS (2)
-#define MAX_M_OUTPUT_MPS (2)
-#define MAX_M1_INPUT (2)
-#define MAX_M1_OUTPUT (2)
-#define MAX_M2_INPUT (2)
-
-#define MAX_M_INPUT (2)
-#define MAX_M_OUTPUT (2)
-#define QMF_HYBRID_FILT_ORDER (13)
-#define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
-#define MAX_NO_TIME_SLOTS_DELAY (14)
-
-#define MAXNRSBRCHANNELS 2
-
typedef struct ixheaacd_mps_decor_energy_adjust_filt_struct {
WORD32 num_bins;
FLOAT32 smooth_in_energy[MAX_PARAMETER_BANDS];
@@ -168,8 +195,6 @@ typedef struct ia_mps_env_reshape_struct {
FLOAT32 frame_energy_prev[3];
} ia_mps_env_reshape_struct;
-#define BP_SIZE 25
-
typedef struct ia_mps_stp_struct {
FLOAT32 nrg_dir;
FLOAT32 nrg_diff[2];
@@ -202,10 +227,10 @@ typedef struct ia_mps_dec_state_struct {
FLOAT32 env_shape_data[2][MAX_TIME_SLOTS];
WORD8 parse_nxt_frame;
- WORD32 band_count[MAX_M1_INPUT];
+ WORD32 band_count[MAX_M_INPUT];
WORD32 synth_count;
WORD32 qmf_band_count;
- WORD32 hyb_band_count[MAX_M1_INPUT];
+ WORD32 hyb_band_count[MAX_M_INPUT];
WORD32 hyb_band_count_max;
const WORD32 *hyb_band_to_processing_band_table;
@@ -291,7 +316,7 @@ typedef struct ia_mps_dec_state_struct {
FLOAT32 (*output_buffer)[4096];
ia_mps_hybrid_filt_struct hyb_filt_state[2];
- ia_mps_poly_phase_synth_struct qmf_filt_state[2];
+ FLOAT32 qmf_filt_state[2][POLY_PHASE_SYNTH_SIZE];
ia_mps_decor_struct mps_decor;
@@ -335,7 +360,7 @@ typedef struct ia_mps_dec_state_struct {
ia_mps_stp_struct subband_var;
ia_mps_opd_smooth_struct opd_smooth;
- ia_mps_poly_phase_struct poly_phase_filt_kernel;
+ WORD32 resolution;
VOID *p_sbr_dec[MAXNRSBRCHANNELS];
VOID *p_sbr_frame[MAXNRSBRCHANNELS];
VOID *p_sbr_header[MAXNRSBRCHANNELS];
@@ -346,20 +371,26 @@ typedef struct ia_mps_dec_state_struct {
ia_qmf_dec_tables_struct *qmf_dec_tables_ptr;
ia_sbr_tables_struct *sbr_tables_ptr;
ia_sbr_scale_fact_struct *str_sbr_scale_fact;
+ WORD8 ec_flag;
+ WORD8 frame_ok;
} ia_mps_dec_state_struct;
VOID ixheaacd_mps_init_pre_and_post_matrix(ia_mps_dec_state_struct *self);
VOID ixheaacd_pre_and_mix_matrix_calculation(ia_mps_dec_state_struct *self);
-WORD32 ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self);
-WORD32 ixheaacd_mps_apply_mix_matrix(ia_mps_dec_state_struct *self);
-WORD32 ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self);
-WORD32 ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self);
-WORD32 ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_apply_mix_matrix(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self);
VOID ixheaacd_samples_sat(WORD8 *outbuffer, WORD32 num_samples_out,
WORD32 pcmsize, FLOAT32 (*out_samples)[4096],
WORD32 *out_bytes, WORD32 num_channel_out);
+VOID ixheaacd_samples_sat_mc(WORD8* outbuffer, WORD32 num_samples_out,
+ FLOAT32(*out_samples)[4096], WORD32* out_bytes,
+ WORD32 num_channel_out, WORD32 ch_fac);
+
IA_ERRORCODE ixheaacd_mps_frame_decode(ia_mps_dec_state_struct *self);
WORD32 ixheaacd_mps_header_decode(ia_mps_dec_state_struct *self);
@@ -384,7 +415,7 @@ VOID ixheaacd_mps_par2umx_pred(ia_mps_dec_state_struct *self,
FLOAT32 *h_real, WORD32 param_set_idx,
WORD32 res_bands);
-WORD32 ixheaacd_mps_upmix_interp(
+VOID ixheaacd_mps_upmix_interp(
FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
[MAX_M_INPUT],
FLOAT32 r_matrix[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
@@ -392,7 +423,7 @@ WORD32 ixheaacd_mps_upmix_interp(
FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
WORD32 num_rows, WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode);
-WORD32 ixheaacd_mps_upmix_interp_type1(
+VOID ixheaacd_mps_upmix_interp_type1(
FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
[MAX_M_INPUT],
FLOAT32 r_matrix[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
@@ -401,7 +432,7 @@ WORD32 ixheaacd_mps_upmix_interp_type1(
WORD32 num_rows, WORD32 num_cols, ia_mps_dec_state_struct *self,
WORD32 bs_high_rate_mode);
-WORD32 ixheaacd_mps_upmix_interp_type2(
+VOID ixheaacd_mps_upmix_interp_type2(
FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
[MAX_M_INPUT],
FLOAT32 r_matrix[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
@@ -419,4 +450,578 @@ VOID ixheaacd_mps_phase_interpolation(
VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength);
-#endif
+typedef struct {
+ WORD32 state_length;
+ WORD32 num_length;
+ WORD32 den_length;
+ WORD32 complex;
+
+ WORD32 *state_real;
+ WORD32 *state_imag;
+
+ WORD32 *numerator_real;
+ WORD32 *numerator_imag;
+
+ WORD32 *denominator_real;
+ WORD32 *denominator_imag;
+} ia_mps_dec_decorr_filter_instance_struct;
+
+typedef struct ia_mps_dec_ducker_interface ia_mps_dec_ducker_interface;
+
+typedef struct {
+ WORD32 decorr_seed;
+ WORD32 numbins;
+
+ ia_mps_dec_decorr_filter_instance_struct *filter[MAX_HYBRID_BANDS];
+
+ ia_mps_dec_ducker_interface *ducker;
+
+ WORD32 no_sample_delay[MAX_HYBRID_BANDS];
+ WORD32 **delay_buffer_real;
+ WORD32 **delay_buffer_imag;
+} ia_mps_dec_decorr_dec_struct, *ia_mps_dec_decorr_dec_handle;
+
+typedef struct {
+ WORD32 buffer_lf_real[QMF_BANDS_TO_HYBRID][BUFFER_LEN_LF];
+ WORD32 buffer_lf_imag[QMF_BANDS_TO_HYBRID][BUFFER_LEN_LF];
+ WORD32 qmf_lf_real[QMF_BANDS_TO_HYBRID][BUFFER_LEN_LF];
+ WORD32 qmf_lf_imag[QMF_BANDS_TO_HYBRID][BUFFER_LEN_LF];
+ WORD32 buffer_hf_real[MAX_NUM_QMF_BANDS][BUFFER_LEN_HF];
+ WORD32 buffer_hf_imag[MAX_NUM_QMF_BANDS][BUFFER_LEN_HF];
+} ia_mps_dec_thyb_filter_state_struct;
+
+typedef struct {
+ WORD32 re;
+ WORD32 im;
+} complex;
+
+typedef struct {
+ UWORD32 ui_pcm_wdsz;
+ UWORD32 ui_samp_freq;
+ UWORD32 ui_in_channels;
+ UWORD32 ui_out_channels;
+ WORD32 ui_channel_mask;
+
+ WORD32 frame_ok;
+ UWORD32 ui_bs_is_buried;
+ WORD32 ui_dec_type;
+ WORD32 ui_upmix_type;
+ WORD32 ui_binaural_quality;
+ WORD32 ui_hrtf_model;
+ UWORD32 ui_qmf_bands;
+
+ WORD32 bs_frame_length;
+ WORD32 bs_sampling_freq_index;
+ WORD32 bs_sampling_frequency;
+ WORD32 bs_freq_res;
+ WORD32 bs_tree_config;
+ WORD32 bs_quant_mode;
+ WORD32 bs_one_icc;
+ WORD32 bs_arbitrary_downmix;
+ WORD32 bs_residual_coding;
+ WORD32 bs_smooth_config;
+ WORD32 bs_fixed_gain_sur;
+ WORD32 bs_fixed_gain_lfe;
+ WORD32 bs_fixed_gain_dmx;
+ WORD32 bs_matrix_mode;
+ WORD32 bs_temp_shape_config;
+
+ WORD32 bs_decorr_config;
+
+ WORD32 bs_3d_audio_mode;
+ WORD32 bs_3d_audio_hrtf_set;
+ WORD32 bs_hrtf_freq_res;
+ WORD32 hrtf_num_band;
+ WORD32 bs_hrtf_num_chan;
+ WORD32 bs_hrtf_asymmetric;
+ WORD32 bs_hrtf_level_left[MAX_OUTPUT_CHANNELS_MPS][MAX_PARAMETER_BANDS];
+ WORD32 bs_hrtf_level_right[MAX_OUTPUT_CHANNELS_MPS][MAX_PARAMETER_BANDS];
+ WORD32 bs_hrtf_phase[MAX_OUTPUT_CHANNELS_MPS];
+ WORD32 bs_hrtf_phase_lr[MAX_OUTPUT_CHANNELS_MPS][MAX_PARAMETER_BANDS];
+
+ WORD32 bs_ott_bands[MAX_NUM_OTT];
+ WORD32 bs_ttt_dual_mode[MAX_NUM_TTT];
+ WORD32 bs_ttt_mode_low[MAX_NUM_TTT];
+ WORD32 bs_ttt_mode_high[MAX_NUM_TTT];
+ WORD32 bs_ttt_bands_low[MAX_NUM_TTT];
+
+ WORD32 bs_sac_ext_type[MAX_NUM_EXT_TYPES];
+ WORD32 sac_ext_cnt;
+
+ WORD32 bs_residual_present[MAX_RESIDUAL_CHANNELS_MPS];
+ WORD32 bs_residual_sampling_freq_index;
+ WORD32 bs_residual_frames_per_spatial_frame;
+
+ WORD32 bs_residual_bands[MAX_RESIDUAL_CHANNELS_MPS];
+
+ WORD32 bs_arbitrary_downmix_residual_sampling_freq_index;
+ WORD32 bs_arbitrary_downmix_residual_frames_per_spatial_frame;
+ WORD32 bs_arbitrary_downmix_residual_bands;
+
+ WORD32 bs_env_quant_mode;
+
+ WORD32 arbitrary_tree;
+ WORD32 num_out_chan_at;
+ WORD32 num_ott_boxes_at;
+ WORD32 bs_output_channel_pos_at[MAX_OUTPUT_CHANNELS_AT_MPS];
+ WORD32 bs_ott_box_present_at[MAX_OUTPUT_CHANNELS_AT_MPS]
+ [MAX_ARBITRARY_TREE_INDEX];
+ WORD32 bs_ott_default_cld_at[MAX_OUTPUT_CHANNELS_AT_MPS *
+ MAX_ARBITRARY_TREE_INDEX];
+ WORD32
+ bs_ott_mode_lfe_at[MAX_OUTPUT_CHANNELS_AT_MPS * MAX_ARBITRARY_TREE_INDEX];
+ WORD32 bs_ott_bands_at[MAX_OUTPUT_CHANNELS_AT_MPS * MAX_ARBITRARY_TREE_INDEX];
+} ia_mps_spatial_bs_config_struct;
+
+typedef struct {
+ WORD32
+ bs_xxx_data_mode[MAX_NUM_POAT][MAX_PARAMETER_SETS];
+ WORD32
+ bs_quant_coarse_xxx[MAX_NUM_POAT][MAX_PARAMETER_SETS];
+ WORD32
+ bs_freq_res_stride_xxx[MAX_NUM_POAT][MAX_PARAMETER_SETS];
+
+ WORD32 bs_quant_coarse_xxx_prev[MAX_NUM_POAT];
+ WORD32
+ no_cmp_quant_coarse_xxx[MAX_NUM_POAT][MAX_PARAMETER_SETS];
+
+} ia_mps_dec_lossless_data_struct;
+
+typedef struct {
+ WORD32 bs_icc_diff_present[MAX_RESIDUAL_CHANNELS_MPS][MAX_PARAMETER_SETS];
+ WORD32
+ bs_icc_diff[MAX_RESIDUAL_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+
+} RESIDUAL_FRAME_DATA;
+
+typedef struct {
+ WORD32 bs_independency_flag;
+ WORD32
+ ott_cld_idx[MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ott_icc_idx[MAX_NUM_OTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cpc_1_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cpc_2_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_1_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_2_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ttt_icc_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+
+ WORD32 ott_cld_idx_prev[MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT][MAX_PARAMETER_BANDS];
+ WORD32 ott_icc_idx_prev[MAX_NUM_OTT][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cpc_1_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cpc_2_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_1_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_2_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 ttt_icc_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+
+ WORD32
+ cmp_ott_cld_idx[MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ott_icc_idx[MAX_NUM_OTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 ott_icc_diff_idx[MAX_NUM_OTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cpc_1_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cpc_2_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cld_1_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cld_2_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_icc_idx[MAX_NUM_TTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ott_cld_idx_prev[MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_ott_icc_idx_prev[MAX_NUM_OTT][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cpc_1_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cpc_2_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cld_1_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_cld_2_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+ WORD32 cmp_ttt_icc_idx_prev[MAX_NUM_TTT][MAX_PARAMETER_BANDS];
+
+ ia_mps_dec_lossless_data_struct cld_lossless_data;
+ ia_mps_dec_lossless_data_struct icc_lossless_data;
+ ia_mps_dec_lossless_data_struct cpc_lossless_data;
+
+ WORD32 bs_smooth_control;
+ WORD32 bs_smooth_mode[MAX_PARAMETER_SETS];
+ WORD32 bs_smooth_time[MAX_PARAMETER_SETS];
+ WORD32 bs_freq_res_stride_smg[MAX_PARAMETER_SETS];
+ WORD32 bs_smg_data[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+
+ RESIDUAL_FRAME_DATA res_data;
+
+ WORD32
+ arbdmx_gain_idx[MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 arbdmx_gain_idx_prev[MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_BANDS];
+ WORD32
+ cmp_arbdmx_gain_idx[MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 cmp_arbdmx_gain_idx_prev[MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_BANDS];
+ WORD32 bs_arbitrary_downmix_residual_abs[MAX_INPUT_CHANNELS_MPS];
+ WORD32 bs_arbitrary_downmix_residual_alpha_update_set[MAX_INPUT_CHANNELS_MPS];
+
+} ia_mps_dec_spatial_bs_frame_struct;
+
+typedef struct {
+ WORD32 spec_prev_real[MAX_NUM_QMF_BANDS * 8];
+ WORD32 spec_prev_imag[MAX_NUM_QMF_BANDS * 8];
+ WORD32 p_cross_real[MAX_NUM_QMF_BANDS * 8];
+ WORD32 p_cross_imag[MAX_NUM_QMF_BANDS * 8];
+
+ WORD32 p_sum[MAX_NUM_QMF_BANDS * 8];
+ WORD32 p_sum_prev[MAX_NUM_QMF_BANDS * 8];
+
+ WORD32 buf_real[MAX_NUM_QMF_BANDS][6];
+ WORD32 buf_imag[MAX_NUM_QMF_BANDS][6];
+
+ WORD32 win_buf_real[MAX_NUM_QMF_BANDS][16];
+ WORD32 win_buf_imag[MAX_NUM_QMF_BANDS][16];
+} ia_mps_dec_tonality_state_struct;
+
+typedef struct {
+ WORD32 prev_smg_time;
+ WORD32 prev_smg_data[MAX_PARAMETER_BANDS];
+} ia_mps_dec_smoothing_state_struct;
+
+typedef struct {
+ WORD32
+ part_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 norm_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS];
+ WORD32 frame_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS];
+
+ WORD16
+ q_part_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS]
+ [MAX_PARAMETER_BANDS];
+ WORD16 q_norm_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS];
+ WORD16 q_frame_nrg_prev[2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS];
+
+} ia_mps_dec_reshape_bb_env_state_struct;
+
+typedef struct {
+ WORD32 use_ttt_decorr;
+ WORD32 mode;
+ WORD32 start_band;
+ WORD32 stop_band;
+ WORD32 bitstream_start_band;
+ WORD32 bitstream_stop_band;
+} ia_mps_dec_ttt_config_struct;
+
+typedef struct {
+ WORD32 excitation[3][MAX_PARAMETER_BANDS];
+ WORD32 filter_coeff;
+ WORD16 q_excitation[3][MAX_PARAMETER_BANDS];
+} ia_mps_dec_blind_decoder_struct;
+
+typedef struct {
+ WORD32 run_dry_ener[MAX_INPUT_CHANNELS_MPS];
+ WORD32 run_wet_ener[MAX_OUTPUT_CHANNELS_MPS];
+ WORD32 old_dry_ener[MAX_INPUT_CHANNELS_MPS];
+ WORD32 old_wet_ener[MAX_OUTPUT_CHANNELS_MPS];
+
+ WORD16 q_run_dry_ener[MAX_INPUT_CHANNELS_MPS];
+ WORD16 q_run_wet_ener[MAX_OUTPUT_CHANNELS_MPS];
+ WORD16 q_old_dry_ener[MAX_INPUT_CHANNELS_MPS];
+ WORD16 q_old_wet_ener[MAX_OUTPUT_CHANNELS_MPS];
+ WORD32 update_old_ener;
+
+ WORD32 prev_tp_scale[MAX_OUTPUT_CHANNELS_MPS];
+ WORD16 q_prev_tp_scale[MAX_OUTPUT_CHANNELS_MPS];
+} ia_mps_dec_subband_tp_params_struct;
+
+typedef struct ia_mps_persistent_mem {
+ WORD32 *prev_gain_at;
+ WORD32 *arbdmx_alpha_prev;
+ WORD32 *m1_param_real_prev;
+ WORD32 *m1_param_imag_prev;
+ WORD32 *m2_decor_real_prev;
+ WORD32 *m2_decor_imag_prev;
+ WORD32 *m2_resid_real_prev;
+ WORD32 *m2_resid_imag_prev;
+ WORD32 *qmf_input_delay_real;
+ WORD32 *qmf_input_delay_imag;
+ WORD32 *ana_qmf_states_buffer;
+ WORD32 *syn_qmf_states_buffer;
+ VOID *decorr_ptr;
+
+ ia_mps_dec_thyb_filter_state_struct *hyb_filter_state;
+ ia_mps_dec_tonality_state_struct *ton_state;
+ ia_mps_dec_smoothing_state_struct *smooth_state;
+ ia_mps_dec_reshape_bb_env_state_struct *reshape_bb_env_state;
+ ia_mps_dec_subband_tp_params_struct *sub_band_params;
+ ia_mps_dec_blind_decoder_struct *blind_decoder;
+ ia_mps_dec_spatial_bs_frame_struct *p_bs_frame;
+} ia_mps_persistent_mem;
+
+typedef struct {
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr;
+ ia_mps_dec_common_tables_struct *common_table_ptr;
+ ia_mps_dec_hybrid_tables_struct *hybrid_table_ptr;
+ ia_mps_dec_m1_m2_tables_struct *m1_m2_table_ptr;
+ ia_mps_dec_decorr_tables_struct *decor_table_ptr;
+ ia_mps_dec_tp_process_tables_struct *tp_process_table_ptr;
+ ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_table_ptr;
+ ia_mps_dec_tonality_tables_struct *tonality_table_ptr;
+ ia_mps_dec_bitdec_tables_struct *bitdec_table_ptr;
+ ia_mps_dec_blind_tables_struct *blind_table_ptr;
+ ia_mps_dec_mdct2qmf_tables_struct *mdct2qmfcos_table_ptr;
+ ia_mps_dec_mdct2qmf_cos_table_struct *mdct2qmfcos_tab_ptr;
+ VOID *aac_tab;
+ ia_mps_dec_wf_ptr_table_struct *wf_tab_ptr;
+
+} ia_mps_dec_mps_tables_struct;
+
+typedef struct {
+ VOID(*syn_filter_bank)
+ (ia_mps_dec_qmf_syn_filter_bank *syn, WORD32 *sr, WORD32 *si,
+ WORD32 *time_sig, WORD32 channel, WORD32 resolution, WORD32 nr_samples,
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr);
+} ia_mps_dec_synthesis_interface, *ia_mps_dec_synthesis_interface_handle;
+
+typedef struct {
+ WORD32
+ m1_param_real[MAX_M1_OUTPUT][MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32
+ m1_param_imag[MAX_M1_OUTPUT][MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+} ia_mps_dec_m1_param_struct;
+
+typedef struct {
+ WORD32 *qmf_residual_real;
+ WORD32 *qmf_residual_imag;
+ WORD32 *qmf_residual_real_pre, *qmf_residual_real_post;
+ WORD32 *qmf_residual_imag_pre, *qmf_residual_imag_post;
+ WORD32 *res_mdct;
+ WORD32 *time_out;
+ WORD32 *x_real;
+ WORD32 *x_imag;
+ WORD32 *hyb_output_real_dry;
+ WORD32 *hyb_output_imag_dry;
+ WORD32 *env_dmx_0;
+ WORD32 *env_dmx_1;
+ WORD32 *m_qmf_real;
+ WORD32 *m_qmf_imag;
+ WORD32 *w_dry_real;
+ WORD32 *w_dry_imag;
+ WORD32 *buf_real;
+ WORD32 *buf_imag;
+ WORD32 *buffer_real;
+ WORD32 *buffer_imag;
+ ia_mps_dec_m1_param_struct *m1_param;
+} ia_mps_dec_reuse_array_struct;
+
+typedef struct {
+ WORD32 m2_decor_real[15][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 m2_decor_imag[15][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+
+ WORD32 m2_resid_real[19][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 m2_resid_imag[19][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+} ia_mps_dec_m2_param_struct;
+
+typedef struct {
+ ia_mps_dec_m2_param_struct *m2_param;
+
+ WORD32 temp_shape_enable_channel_stp[MAX_OUTPUT_CHANNELS_MPS];
+ WORD32 temp_shape_enable_channel_ges[MAX_OUTPUT_CHANNELS_MPS];
+
+ WORD32 env_shape_data[MAX_OUTPUT_CHANNELS_MPS][MAX_TIME_SLOTS];
+
+ WORD32 num_ott_bands[MAX_NUM_OTT];
+
+ ia_mps_dec_ttt_config_struct ttt_config[2][MAX_NUM_TTT];
+ WORD32 param_slot[MAX_PARAMETER_SETS];
+
+ WORD32 smg_time[MAX_PARAMETER_SETS];
+ WORD32 smg_data[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+
+ WORD32
+ ott_cld[MAX_NUM_OTT + MAX_OUTPUT_CHANNELS_AT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ott_icc[MAX_NUM_OTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+
+ WORD32 ttt_cpc_1[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ttt_cpc_2[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_1[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ttt_cld_2[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+ WORD32 ttt_icc[MAX_NUM_TTT][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+
+ WORD32
+ arbdmx_gain[MAX_INPUT_CHANNELS_MPS][MAX_PARAMETER_SETS]
+ [MAX_PARAMETER_BANDS];
+
+ WORD32 arbdmx_residual_abs[MAX_INPUT_CHANNELS_MPS];
+ WORD32 arbdmx_alpha_upd_set[MAX_INPUT_CHANNELS_MPS];
+ WORD32 arbdmx_alpha[MAX_INPUT_CHANNELS_MPS];
+} ia_mps_dec_auxilary_struct;
+
+typedef struct ia_heaac_mps_state_struct {
+ WORD32 sac_time_align_flag;
+ WORD32 sac_time_align;
+ WORD32 sampling_freq;
+
+ WORD32 tree_config;
+ WORD32 num_input_channels;
+ WORD32 num_output_channels;
+ WORD32 num_ott_boxes;
+ WORD32 num_ttt_boxes;
+
+ WORD32 num_output_channels_at;
+
+ WORD32 quant_mode;
+ WORD32 one_icc;
+ WORD32 arbitrary_downmix;
+ WORD32 residual_coding;
+ WORD32 smooth_config;
+ WORD32 temp_shape_config;
+ WORD32 decorr_config;
+ WORD32 mtx_inversion;
+ WORD32 _3d_stereo_inversion;
+ WORD32 env_quant_mode;
+
+ WORD32 clip_protect_gain;
+ WORD32 surround_gain;
+ WORD32 lfe_gain;
+ WORD32 cpc_default;
+ WORD32 icc_default;
+ WORD32 arbdmx_gain_default;
+
+ WORD32 num_direct_signals;
+ WORD32 num_residual_signals;
+ WORD32 num_decor_signals;
+ WORD32 num_v_channels;
+ WORD32 num_w_channels;
+ WORD32 w_start_residual_idx;
+ WORD32 num_x_channels;
+
+ WORD32 time_slots;
+ WORD32 cur_time_slot;
+ WORD32 frame_length;
+ WORD32 dec_type;
+ WORD32 up_mix_type;
+ WORD32 binaural_quality;
+ WORD32 hrtf_model;
+
+ WORD32 tp_hyb_band_border;
+
+ WORD32 parse_next_bitstream_frame;
+
+ WORD32 qmf_bands;
+ WORD32 hybrid_bands;
+
+ WORD32 residual_frames_per_spatial_frame;
+ WORD32 upd_qmf;
+
+ WORD32 arbdmx_residual_bands;
+ WORD32 arbdmx_frames_per_spatial_frame;
+ WORD32 arbdmx_upd_qmf;
+
+ WORD32 bitstream_parameter_bands;
+ WORD32 num_parameter_bands;
+
+ WORD32 extend_frame;
+ WORD32 num_parameter_sets;
+ WORD32 num_parameter_sets_prev;
+
+ WORD32 smooth_control;
+
+ WORD32 i_bytes_consumed_mps;
+ WORD32 bytes_remaining;
+ WORD32 ui_mps_in_bytes;
+ WORD32 is_sbr_present;
+
+ WORD32 bits_per_sample;
+ WORD32 qmf_input_delay_index;
+
+ WORD32 m1_param_imag_present;
+ WORD32 m2_param_imag_present;
+
+ WORD32 m1_param_present[MAX_M1_OUTPUT][MAX_INPUT_CHANNELS_MPS];
+ WORD32 m2_param_present[MAX_M2_OUTPUT][MAX_M2_INPUT];
+
+ WORD32 index[MAX_RESIDUAL_CHANNELS_MPS];
+
+ WORD32 ott_cld_default[MAX_NUM_OTT];
+ WORD32 ttt_cld_1_default[MAX_NUM_TTT];
+ WORD32 ttt_cld_2_default[MAX_NUM_TTT];
+
+ SIZE_T kernels[MAX_HYBRID_BANDS];
+
+ WORD32 res_bands[MAX_RESIDUAL_CHANNELS_MPS];
+ WORD32 ott_mode_lfe[MAX_NUM_OTT];
+ WORD32 bitstream_ott_bands[MAX_NUM_OTT];
+
+ WORD32 scaling_enable;
+
+ WORD32 is_buried_flag;
+
+ ia_mps_dec_residual_sfband_info_struct sfband_info_tab;
+ WORD16 *pcm_out_buf;
+
+ WORD32 res_block_type[MAX_RESIDUAL_CHANNELS_MPS][MAX_RESIDUAL_FRAMES];
+
+ ia_mps_spatial_bs_config_struct bs_config;
+ ia_mps_dec_decorr_dec_handle ap_decor[MAX_NO_DECORR_CHANNELS];
+ ia_mps_dec_qmf_ana_filter_bank qmf_bank[6];
+ ia_mps_dec_qmf_syn_filter_bank syn_qmf_bank;
+ struct ia_bit_buf_struct mps_bit_buf, *ptr_mps_bit_buff;
+
+ ia_mps_dec_spatial_bs_frame_struct *bs_frame;
+ ia_mps_dec_reuse_array_struct *array_struct;
+ ia_mps_dec_auxilary_struct *aux_struct;
+ VOID *mps_scratch_mem_v;
+ ia_mps_persistent_mem mps_persistent_mem;
+ VOID *mps_persistent_mem_v;
+
+ ia_mps_dec_synthesis_interface *syn;
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info[2];
+ ia_mps_dec_residual_dynamic_data_struct *p_aac_decoder_dynamic_data_init[2];
+ WORD8 tot_sf_bands_ls[2];
+
+ ia_mps_dec_mps_tables_struct ia_mps_dec_mps_table;
+ ia_mps_dec_residual_aac_tables_struct aac_table;
+ ia_mps_dec_mdct2qmf_cos_table_struct ia_mps_dec_mdct2qmfcos_table;
+ ia_mps_dec_wf_ptr_table_struct wf_tab;
+ WORD32 is_first;
+ WORD32 mps_decode;
+ UWORD8 temp_buf[1024];
+ WORD32 heaac_mps_present;
+ WORD32 mps_with_sbr;
+ WORD32 mps_init_done;
+ WORD32 ec_flag;
+ WORD32 frame_ok;
+ WORD32 first_frame;
+
+} ia_heaac_mps_state_struct;
+
+WORD32 ixheaacd_mps_persistent_buffer_sizes();
+
+WORD32 ixheaacd_getsize_mps_persistent();
+
+VOID ixheaacd_set_mps_persistent_buffers(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 *persistent_used,
+ WORD32 num_channel,
+ VOID *persistent_mem);
+
+VOID ixheaacd_set_scratch_buffers(ia_heaac_mps_state_struct *pstr_mps_state,
+ VOID *scratch_mem);
+
+VOID ixheaacd_calc_ana_filt_bank(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD16 *time_in, WORD32 *p_qmf_real,
+ WORD32 *p_qmf_imag, WORD32 channel);
+
+IA_ERRORCODE
+ixheaacd_syn_filt_bank_init(ia_mps_dec_synthesis_interface_handle self,
+ WORD32 resolution);
+#endif /* IXHEAACD_MPS_DEC_H */
diff --git a/decoder/ixheaacd_mps_decor.h b/decoder/ixheaacd_mps_decor.h
index ebfbb2a..2ec6010 100644
--- a/decoder/ixheaacd_mps_decor.h
+++ b/decoder/ixheaacd_mps_decor.h
@@ -24,12 +24,58 @@
#define ONE_MINUS_DECOR_ALPHA (1 - DECOR_ALPHA)
#define DECOR_GAMMA (1.5f)
-IA_ERRORCODE ixheaacd_mps_decor_init(ia_mps_decor_struct_handle, WORD32, WORD32, WORD32);
+#define DUCK_ALPHA (26214)
+#define DUCK_GAMMA (24576)
+#define DUCK_ONEMINUSALPHA (6554)
+
+enum {
+ REVERB_BAND_0 = 0,
+ REVERB_BAND_1 = 1,
+ REVERB_BAND_2 = 2,
+ REVERB_BAND_3 = 3
+};
+
+enum { DECOR_CONFIG_0 = 0, DECOR_CONFIG_1 = 1, DECOR_CONFIG_2 = 2 };
+
+struct ia_mps_dec_ducker_interface {
+ VOID(*apply)
+ (ia_mps_dec_ducker_interface *const self, WORD32 const time_slots,
+ WORD32 const *input_real, WORD32 const *input_imag, WORD32 *output_real,
+ WORD32 *output_imag, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
+ VOID *scratch);
+};
+
+typedef struct {
+ WORD32 hybrid_bands;
+ WORD32 parameter_bands;
+ WORD32 alpha;
+ WORD32 one_minus_alpha;
+ WORD32 gamma;
+ WORD32 abs_thr;
+ WORD16 qalpha;
+ WORD16 qgamma;
+ WORD32 smooth_direct_nrg[MAX_PARAMETER_BANDS];
+ WORD32 smooth_reverb_nrg[MAX_PARAMETER_BANDS];
+ WORD16 q_smooth_direct_nrg[MAX_PARAMETER_BANDS];
+ WORD16 q_smooth_reverb_nrg[MAX_PARAMETER_BANDS];
+} ia_mps_dec_duck_instance_struct;
+
+VOID ixheaacd_decorr_apply(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 length,
+ WORD32 *input_real, WORD32 *input_imag,
+ WORD32 *output_real, WORD32 *output_imag,
+ WORD32 index);
+
+WORD32 ixheaacd_decorr_create(
+ ia_mps_dec_decorr_dec_handle hDecorrDec, WORD32 subbands, WORD32 seed,
+ WORD32 dec_type, WORD32 decorr_config,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table);
+
+IA_ERRORCODE ixheaacd_mps_decor_init(ia_mps_decor_struct *, WORD32, WORD32, WORD32);
VOID ixheaacd_mps_decor_apply(
- ia_mps_decor_struct_handle self,
+ ia_mps_decor_struct *self,
ia_cmplx_flt_struct in[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS],
ia_cmplx_flt_struct out[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS],
WORD32 length, WORD32 res_bands, WORD32 ldmps_present);
-#endif
+#endif /* IXHEAACD_MPS_DECOR_H */
diff --git a/decoder/ixheaacd_mps_decorr.c b/decoder/ixheaacd_mps_decorr.c
index 7351102..fc53039 100644
--- a/decoder/ixheaacd_mps_decorr.c
+++ b/decoder/ixheaacd_mps_decorr.c
@@ -17,19 +17,10 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <math.h>
#include <string.h>
-#include <assert.h>
-
#include "ixheaacd_type_def.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -41,15 +32,18 @@
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_audioobjtypes.h"
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
-#include "ixheaacd_mps_polyphase.h"
-
#include "ixheaacd_mps_decor.h"
#include "ixheaacd_mps_hybfilter.h"
#include "ixheaacd_error_standards.h"
-#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
static const WORD32 ixheaacd_decorr_delay[] = {11, 10, 5, 2};
static const WORD32 ixheaacd_decorr_delay_ldmps[] = {8, 7, 2, 1};
@@ -98,37 +92,37 @@ static const FLOAT32
-0.013000f, 0.034742f, 1.000000f};
static const FLOAT32
- ixheaacd_lattice_coeff_1_filt_num_ldmps[DECORR_FILT_1_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_1_filt_num_ldmps[DECORR_FILTER_ORDER_BAND_1 + 1] = {
(0.3355999887f), (0.0024894588f), (-0.1572290659f), (0.2807503343f),
(-0.1942857355f), (0.3840600252f), (-0.4084388912f), (-0.1750483066f),
(0.5559588671f), (-0.4935829639f), (0.0567415841f), (-0.0658148378f),
(0.3378961682f), (0.2284426540f), (-0.7025330663f), (1.0000000000f)};
static const FLOAT32
- ixheaacd_lattice_coeff_1_filt_den_ldmps[DECORR_FILT_1_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_1_filt_den_ldmps[DECORR_FILTER_ORDER_BAND_1 + 1] = {
(1.0000000000f), (-0.7025330663f), (0.2284426540f), (0.3378961682f),
(-0.0658148378f), (0.0567415841f), (-0.4935829639f), (0.5559588671f),
(-0.1750483066f), (-0.4084388912f), (0.3840600252f), (-0.1942857355f),
(0.2807503343f), (-0.1572290659f), (0.0024894588f), (0.3355999887f)};
static const FLOAT32
- ixheaacd_lattice_coeff_2_filt_num_ldmps[DECORR_FILT_2_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_2_filt_num_ldmps[DECORR_FILTER_ORDER_BAND_2 + 1] = {
(-0.4623999894f), (0.2341193259f), (0.5163637400f), (-0.0253488291f),
(-0.2871030867f), (0.0153170601f), (1.0000000000f)};
static const FLOAT32
- ixheaacd_lattice_coeff_2_filt_den_ldmps[DECORR_FILT_2_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_2_filt_den_ldmps[DECORR_FILTER_ORDER_BAND_2 + 1] = {
(1.0000000000f), (0.0153170601f), (-0.2871030867f), (-0.0253488291f),
(0.5163637400f), (0.2341193259f), (-0.4623999894f)
};
static const FLOAT32
- ixheaacd_lattice_coeff_3_filt_num_ldmps[DECORR_FILT_3_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_3_filt_num_ldmps[DECORR_FILTER_ORDER_BAND_3 + 1] = {
(0.2468000054f), (0.0207958221f), (-0.3898491263f), (1.0000000000f)};
static const FLOAT32
- ixheaacd_lattice_coeff_3_filt_den_ldmps[DECORR_FILT_3_ORD_LD_MPS + 1] = {
+ ixheaacd_lattice_coeff_3_filt_den_ldmps[DECORR_FILTER_ORDER_BAND_3 + 1] = {
(1.0000000000f), (-0.3898491263f), (0.0207958221f), (0.2468000054f)};
extern WORD32
@@ -148,30 +142,30 @@ static const WORD32 ixheaacd_hybrid_to_qmf_map_ldmps[MAX_HYBRID_BANDS_MPS] = {
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70};
-static void ixheaacd_mps_decor_filt_init(ia_mps_decor_filt_struct *self,
+static VOID ixheaacd_mps_decor_filt_init(ia_mps_decor_filt_struct *self,
WORD32 reverb_band,
WORD32 object_type) {
if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD) {
switch (reverb_band) {
case 0:
- self->num_len = self->den_len = DECORR_FILT_0_ORD_LD_MPS + 1;
+ self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_0 + 1;
self->num = NULL;
self->den = NULL;
break;
case 1:
- self->num_len = self->den_len = DECORR_FILT_1_ORD_LD_MPS + 1;
+ self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_1 + 1;
self->num = ixheaacd_lattice_coeff_1_filt_num_ldmps;
self->den = ixheaacd_lattice_coeff_1_filt_den_ldmps;
break;
case 2:
- self->num_len = self->den_len = DECORR_FILT_2_ORD_LD_MPS + 1;
+ self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_2 + 1;
self->num = ixheaacd_lattice_coeff_2_filt_num_ldmps;
self->den = ixheaacd_lattice_coeff_2_filt_den_ldmps;
break;
case 3:
- self->num_len = self->den_len = DECORR_FILT_3_ORD_LD_MPS + 1;
+ self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_3 + 1;
self->num = ixheaacd_lattice_coeff_3_filt_num_ldmps;
self->den = ixheaacd_lattice_coeff_3_filt_den_ldmps;
break;
@@ -205,7 +199,7 @@ static void ixheaacd_mps_decor_filt_init(ia_mps_decor_filt_struct *self,
self->state_len = self->num_len;
memset(self->state, 0,
- sizeof(ia_cmplx_flt_struct) * (MAX_DECORR_FIL_ORDER + 1));
+ sizeof(ia_cmplx_flt_struct) * (MAX_DECORR_FILTER_ORDER + 1));
return;
}
@@ -265,10 +259,7 @@ static VOID ixheaacd_mps_decor_energy_adjustment(
out[i][j].re * out[i][j].re + out[i][j].im * out[i][j].im;
}
- if (ldmps_present == 1)
- loop_counter = MAX_PARAMETER_BANDS;
- else
- loop_counter = MAX_PARAMETER_BANDS_MPS;
+ loop_counter = MAX_PARAMETER_BANDS;
for (k = start_param_band; k < loop_counter; k++) {
self->smooth_in_energy[k] = self->smooth_in_energy[k] * DECOR_ALPHA +
@@ -302,7 +293,7 @@ static VOID ixheaacd_mps_decor_energy_adjustment(
}
}
-IA_ERRORCODE ixheaacd_mps_decor_init(ia_mps_decor_struct_handle self,
+IA_ERRORCODE ixheaacd_mps_decor_init(ia_mps_decor_struct *self,
WORD32 subbands, WORD32 decor_config,
WORD32 object_type) {
WORD32 i, reverb_band;
@@ -362,7 +353,7 @@ IA_ERRORCODE ixheaacd_mps_decor_init(ia_mps_decor_struct_handle self,
}
VOID ixheaacd_mps_decor_apply(
- ia_mps_decor_struct_handle self,
+ ia_mps_decor_struct *self,
ia_cmplx_flt_struct in[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS],
ia_cmplx_flt_struct out[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS],
WORD32 length, WORD32 res_bands, WORD32 ldmps_present) {
@@ -400,3 +391,671 @@ VOID ixheaacd_mps_decor_apply(
res_bands,
ldmps_present);
}
+
+static VOID ixheaacd_convert_lattice_coefs_complex(WORD32 const order,
+ WORD32 const *const rfc_real,
+ WORD32 const *const rfc_imag,
+ WORD32 *const apar_real,
+ WORD32 *const apar_imag) {
+ WORD32 i, j;
+ WORD32 tmp_real[MAX_DECORR_FILTER_ORDER + 1];
+ WORD32 tmp_imag[MAX_DECORR_FILTER_ORDER + 1];
+ WORD64 temp;
+
+ apar_real[0] = 32768;
+ apar_imag[0] = 0;
+
+ for (i = 0; i < order; i++) {
+ apar_real[i + 1] = rfc_real[i];
+ apar_imag[i + 1] = rfc_imag[i];
+ for (j = 0; j < i; j++) {
+ temp = (WORD64)((WORD64)rfc_real[i] * (WORD64)tmp_real[i - j - 1] +
+ (WORD64)rfc_imag[i] * (WORD64)tmp_imag[i - j - 1]);
+ temp >>= 15;
+ apar_real[j + 1] = ixheaacd_add32(tmp_real[j], (WORD32)temp);
+
+ temp = (WORD64)((WORD64)rfc_real[i] * (WORD64)tmp_imag[i - j - 1] +
+ (WORD64)rfc_imag[i] * (WORD64)tmp_real[i - j - 1]);
+ temp >>= 15;
+ apar_imag[j + 1] = ixheaacd_sub32(tmp_imag[j], (WORD32)temp);
+ }
+ for (j = 0; j <= i; j++) {
+ tmp_real[j] = apar_real[j + 1];
+ tmp_imag[j] = apar_imag[j + 1];
+ }
+ }
+}
+
+static IA_ERRORCODE ixheaacd_decorr_filt_create(
+ ia_mps_dec_decorr_filter_instance_struct *self, WORD32 const decorr_seed,
+ WORD32 const qmf_band, WORD32 const reverb_band, WORD32 const dec_type,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table) {
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 i;
+ const WORD32 *lattice_coeff = NULL;
+ WORD32 lattice_coeff_real[MAX_DECORR_FILTER_ORDER];
+ WORD32 lattice_coeff_imag[MAX_DECORR_FILTER_ORDER];
+ WORD32 temp_1;
+
+ if (self == NULL) {
+ error_code = IA_FATAL_ERROR;
+ }
+
+ if (error_code == IA_NO_ERROR) {
+ switch (reverb_band) {
+ case REVERB_BAND_0:
+ self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_0 + 1;
+ lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->lattice_coeff_0[decorr_seed][0]);
+ break;
+ case REVERB_BAND_1:
+ self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_1 + 1;
+ lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->lattice_coeff_1[decorr_seed][0]);
+ break;
+ case REVERB_BAND_2:
+ self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_2 + 1;
+ lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->lattice_coeff_2[decorr_seed][0]);
+ break;
+ case REVERB_BAND_3:
+ self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_3 + 1;
+ lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->lattice_coeff_3[decorr_seed][0]);
+ break;
+ default:
+ return IA_FATAL_ERROR;
+ }
+ self->state_length = (self->num_length > self->den_length)
+ ? self->num_length
+ : self->den_length;
+ }
+
+ if (error_code == IA_NO_ERROR) {
+ const WORD32 *cos_tab =
+ ia_mps_dec_mps_table->hybrid_table_ptr->cosine_array;
+ const WORD32 *sin_tab = ia_mps_dec_mps_table->hybrid_table_ptr->sine_array;
+
+ if (dec_type == 1) {
+ for (i = 0; i < self->num_length - 1; i++) {
+ temp_1 = (qmf_band * ia_mps_dec_mps_table->decor_table_ptr
+ ->lattice_delta_phi[decorr_seed][i]) >>
+ 1;
+ lattice_coeff_real[i] = ixheaacd_mps_mult32_shr_15(
+ ixheaacd_mps_cos(temp_1, cos_tab), lattice_coeff[i]);
+ lattice_coeff_imag[i] = ixheaacd_mps_mult32_shr_15(
+ ixheaacd_mps_sin(temp_1, sin_tab), lattice_coeff[i]);
+ }
+
+ ixheaacd_convert_lattice_coefs_complex(
+ self->num_length - 1, lattice_coeff_real, lattice_coeff_imag,
+ self->denominator_real, self->denominator_imag);
+ for (i = 0; i < self->num_length; i++) {
+ self->numerator_real[i] =
+ self->denominator_real[self->num_length - 1 - i];
+ self->numerator_imag[i] =
+ -self->denominator_imag[self->num_length - 1 - i];
+ }
+
+ self->complex = 1;
+ } else {
+ switch (reverb_band) {
+ case REVERB_BAND_0:
+ self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->den_coef_0[decorr_seed][0]);
+ break;
+ case REVERB_BAND_1:
+ self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->den_coef_1[decorr_seed][0]);
+ break;
+ case REVERB_BAND_2:
+ self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->den_coef_2[decorr_seed][0]);
+ break;
+ case REVERB_BAND_3:
+ self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
+ ->den_coef_3[decorr_seed][0]);
+ break;
+ default:
+ return IA_FATAL_ERROR;
+ }
+
+ for (i = 0; i < self->num_length; i++) {
+ self->numerator_real[i] =
+ self->denominator_real[self->num_length - 1 - i];
+ }
+ self->complex = 0;
+ }
+ }
+ return error_code;
+}
+
+static VOID ixheaacd_decorr_filt_apply(
+ ia_mps_dec_decorr_filter_instance_struct *const self, WORD32 const length,
+ WORD32 const *const input_real, WORD32 const *const input_imag,
+ WORD32 *const p_output_real, WORD32 *const p_output_imag) {
+ WORD32 temp_1, temp_2, temp3, temp4;
+ WORD32 temp5, temp6, temp7, temp8;
+ WORD32 *state_real, *state_imag;
+ WORD32 *numerator_real, *denominator_real;
+ WORD32 *output_real = p_output_real;
+ WORD32 *output_imag = p_output_imag;
+
+ WORD32 common_part;
+ WORD32 i;
+ WORD32 j;
+
+ common_part = self->num_length;
+ state_real = self->state_real;
+ state_imag = self->state_imag;
+ numerator_real = self->numerator_real;
+ denominator_real = self->denominator_real;
+
+ {
+ for (i = 0; i < length; i++) {
+ {
+ temp5 = input_real[i];
+ temp6 = input_imag[i];
+
+ temp_1 = ixheaacd_mps_mult32_shr_14(temp5, numerator_real[0]);
+ temp_2 = ixheaacd_mps_mult32_shr_14(temp6, numerator_real[0]);
+
+ *output_real = temp_1 + state_real[0];
+ *output_imag = temp_2 + state_imag[0];
+
+ temp7 = *output_real;
+ temp8 = *output_imag;
+
+ output_real += MAX_HYBRID_BANDS;
+ output_imag += MAX_HYBRID_BANDS;
+ for (j = 1; j < common_part; j++) {
+ temp_1 = ixheaacd_mps_mult32x16_shr_16(temp5, numerator_real[j]);
+ temp3 = ixheaacd_mps_mult32x16_shr_16(temp6, numerator_real[j]);
+ temp_2 = ixheaacd_mps_mult32x16_shr_16(temp7, denominator_real[j]);
+ temp4 = ixheaacd_mps_mult32x16_shr_16(temp8, denominator_real[j]);
+ temp_1 -= temp_2;
+
+ state_real[j - 1] = state_real[j] + (temp_1 << 2);
+ temp3 -= temp4;
+
+ state_imag[j - 1] = state_imag[j] + (temp3 << 2);
+ }
+ }
+ }
+ }
+}
+
+static VOID ixheaacd_ducker_apply_71(
+ ia_mps_dec_ducker_interface *const face, WORD32 const time_slots,
+ WORD32 const *input_real, WORD32 const *input_imag, WORD32 *output_real,
+ WORD32 *output_imag, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
+ VOID *scratch) {
+ ia_mps_dec_duck_instance_struct *self =
+ (ia_mps_dec_duck_instance_struct *)&face[1];
+ WORD32 *duck_gain;
+ WORD32 gain;
+ WORD16 qgain;
+ WORD64 direct_nrg[28];
+ WORD64 reverb_nrg[28];
+ WORD16 *q_duck_gain;
+ WORD32 ts;
+ WORD32 qs;
+ WORD32 pb;
+ WORD16 qtemp1, qtemp2, qtemp3;
+ WORD32 temp_1, temp_2, temp3;
+ const WORD32 *p_input_real;
+ const WORD32 *p_input_imag;
+ const WORD32 *hybrid_2_param_28 =
+ ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->hybrid_2_param_28;
+ const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
+ WORD32 *smooth_direct_nrg = self->smooth_direct_nrg;
+ WORD16 *q_smooth_direct_nrg = self->q_smooth_direct_nrg;
+
+ WORD32 *smooth_reverb_nrg = self->smooth_reverb_nrg;
+ WORD16 *q_smooth_reverb_nrg = self->q_smooth_reverb_nrg;
+
+ WORD32 parameter_bands = self->parameter_bands;
+
+ WORD32 *p_output_real, *p_output_imag;
+
+ WORD32 num_bands_2 = self->hybrid_bands;
+ WORD32 v1, v2, v3, v4;
+ WORD16 one_by_5 = ONE_BY_FIVE_Q16;
+
+ duck_gain = scratch;
+ q_duck_gain = (WORD16 *)scratch + PARAMETER_BANDSX2;
+
+ p_input_real = input_real;
+ p_input_imag = input_imag;
+
+ p_output_real = output_real;
+ p_output_imag = output_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ memset(direct_nrg, 0, sizeof(direct_nrg));
+ memset(reverb_nrg, 0, sizeof(reverb_nrg));
+
+ for (qs = 0; qs < 55; qs++) {
+ v1 = p_input_real[qs];
+ v2 = p_input_imag[qs];
+ v3 = p_output_real[qs];
+ v4 = p_output_imag[qs];
+
+ pb = hybrid_2_param_28[qs];
+ direct_nrg[pb] +=
+ (WORD64)((WORD64)v1 * (WORD64)v1) + (WORD64)((WORD64)v2 * (WORD64)v2);
+ reverb_nrg[pb] +=
+ (WORD64)((WORD64)v3 * (WORD64)v3) + (WORD64)((WORD64)v4 * (WORD64)v4);
+ }
+
+ for (; qs < num_bands_2; qs++) {
+ v1 = p_input_real[qs];
+ v2 = p_input_imag[qs];
+ v3 = p_output_real[qs];
+ v4 = p_output_imag[qs];
+
+ direct_nrg[27] +=
+ (WORD64)((WORD64)v1 * (WORD64)v1) + (WORD64)((WORD64)v2 * (WORD64)v2);
+ reverb_nrg[27] +=
+ (WORD64)((WORD64)v3 * (WORD64)v3) + (WORD64)((WORD64)v4 * (WORD64)v4);
+ }
+
+ for (pb = 0; pb < parameter_bands; pb++) {
+ WORD16 qtemp, qtemp_1;
+ temp_1 = ixheaacd_mps_narrow(direct_nrg[pb], &qtemp);
+
+ temp_2 = smooth_direct_nrg[pb] << 2;
+ temp3 =
+ ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_direct_nrg[pb]), qtemp);
+ smooth_direct_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
+
+ temp_1 = ixheaacd_mps_narrow(reverb_nrg[pb], &qtemp);
+ temp_2 = smooth_reverb_nrg[pb] << 2;
+
+ temp3 =
+ ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_reverb_nrg[pb]), qtemp);
+ smooth_reverb_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
+
+ qtemp1 = q_smooth_reverb_nrg[pb] - 1;
+ temp_1 = (smooth_reverb_nrg[pb] >> 2) * 3;
+ qtemp = q_smooth_direct_nrg[pb];
+ temp3 = smooth_direct_nrg[pb];
+
+ if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
+ temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
+ qtemp2 = qtemp2 + qtemp - qtemp1;
+ temp3 = (qtemp2) > 28 ? MAX_32 : 4 << qtemp2;
+
+ if (temp_2 > temp3) {
+ *duck_gain = (ONE_IN_Q15 - 1);
+ *q_duck_gain++ = 14;
+ } else {
+ *duck_gain = ixheaacd_mps_sqrt(temp_2, &qtemp2, sqrt_tab);
+ *q_duck_gain++ = qtemp2;
+ }
+ duck_gain++;
+ continue;
+ }
+
+ *duck_gain = ONE_IN_Q14 - 1;
+
+ qtemp = q_smooth_direct_nrg[pb] - 1;
+ temp_1 = (smooth_direct_nrg[pb] >> 2) * 3;
+
+ qtemp_1 = q_smooth_reverb_nrg[pb];
+ temp_2 = smooth_reverb_nrg[pb];
+ if (ixheaacd_mps_comp(temp_2, temp_1, &(qtemp_1), qtemp)) {
+ temp3 = ixheaacd_mps_div_32(temp_1, temp_2, &qtemp3);
+ qtemp3 = qtemp3 + qtemp - qtemp_1;
+
+ *duck_gain = ixheaacd_mps_sqrt(temp3, &qtemp3, sqrt_tab);
+ *q_duck_gain = qtemp3;
+ }
+
+ duck_gain++;
+ q_duck_gain++;
+ }
+ duck_gain -= parameter_bands;
+ q_duck_gain -= parameter_bands;
+
+ for (qs = 0; qs < 55; qs++) {
+ pb = hybrid_2_param_28[qs];
+ gain = duck_gain[pb];
+ if (gain == 16383) {
+ continue;
+ }
+ qgain = q_duck_gain[pb];
+ p_output_real[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
+ p_output_imag[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
+ }
+
+ gain = duck_gain[27];
+
+ if (gain != 16383) {
+ qgain = q_duck_gain[27];
+ for (; qs < num_bands_2; qs++) {
+ p_output_real[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
+ p_output_imag[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
+ }
+ }
+
+ p_input_real += MAX_HYBRID_BANDS;
+ p_input_imag += MAX_HYBRID_BANDS;
+
+ p_output_real += MAX_HYBRID_BANDS;
+ p_output_imag += MAX_HYBRID_BANDS;
+ }
+}
+
+static VOID ixheaacd_ducker_apply(
+ ia_mps_dec_ducker_interface *const face, WORD32 const time_slots,
+ WORD32 const *input_real, WORD32 const *input_imag, WORD32 *output_real,
+ WORD32 *output_imag, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
+ VOID *scratch) {
+ ia_mps_dec_duck_instance_struct *self =
+ (ia_mps_dec_duck_instance_struct *)&face[1];
+ WORD32 *duck_gain;
+ WORD32 gain;
+ WORD16 qgain;
+ WORD64 direct_nrg[28];
+ WORD64 reverb_nrg[28];
+ WORD16 *q_duck_gain;
+ WORD32 ts;
+ WORD32 qs;
+ WORD32 pb;
+ WORD16 qtemp1, qtemp2, qtemp3;
+ WORD32 temp_1, temp_2, temp3;
+ const WORD32 *p_input_real;
+ const WORD32 *p_input_imag;
+ const WORD32 *hybrid_2_param_28 =
+ ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->hybrid_2_param_28;
+ const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
+ WORD32 *smooth_direct_nrg = self->smooth_direct_nrg;
+ WORD16 *q_smooth_direct_nrg = self->q_smooth_direct_nrg;
+
+ WORD32 *smooth_reverb_nrg = self->smooth_reverb_nrg;
+ WORD16 *q_smooth_reverb_nrg = self->q_smooth_reverb_nrg;
+
+ WORD32 parameter_bands = self->parameter_bands;
+
+ WORD32 *p_output_real, *p_output_imag;
+
+ WORD32 num_bands_2 = self->hybrid_bands;
+ WORD32 v1, v2, v3, v4;
+ WORD16 one_by_5 = ONE_BY_FIVE_Q16;
+
+ duck_gain = scratch;
+ q_duck_gain = (WORD16 *)scratch + PARAMETER_BANDSX2;
+
+ p_input_real = input_real;
+ p_input_imag = input_imag;
+
+ p_output_real = output_real;
+ p_output_imag = output_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ memset(direct_nrg, 0, sizeof(direct_nrg));
+ memset(reverb_nrg, 0, sizeof(reverb_nrg));
+
+ for (qs = 0; qs < num_bands_2; qs++) {
+ v1 = p_input_real[qs];
+ v2 = p_input_imag[qs];
+ v3 = p_output_real[qs];
+ v4 = p_output_imag[qs];
+
+ pb = hybrid_2_param_28[qs];
+ direct_nrg[pb] +=
+ (WORD64)((WORD64)v1 * (WORD64)v1) + (WORD64)((WORD64)v2 * (WORD64)v2);
+ reverb_nrg[pb] +=
+ (WORD64)((WORD64)v3 * (WORD64)v3) + (WORD64)((WORD64)v4 * (WORD64)v4);
+ }
+
+ for (pb = 0; pb < parameter_bands; pb++) {
+ WORD16 qtemp, qtemp_1;
+ temp_1 = ixheaacd_mps_narrow(direct_nrg[pb], &qtemp);
+ temp_2 = smooth_direct_nrg[pb] << 2;
+ temp3 =
+ ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_direct_nrg[pb]), qtemp);
+ smooth_direct_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
+
+ temp_1 = ixheaacd_mps_narrow(reverb_nrg[pb], &qtemp);
+ temp_2 = smooth_reverb_nrg[pb] << 2;
+
+ temp3 =
+ ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_reverb_nrg[pb]), qtemp);
+ smooth_reverb_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
+
+ qtemp1 = q_smooth_reverb_nrg[pb] - 1;
+ temp_1 = (smooth_reverb_nrg[pb] >> 2) * 3;
+ qtemp = q_smooth_direct_nrg[pb];
+ temp3 = smooth_direct_nrg[pb];
+
+ if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
+ temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
+ qtemp2 = qtemp2 + qtemp - qtemp1;
+ temp3 = qtemp2 > 28 ? MAX_32 : 4 << qtemp2;
+
+ if (temp_2 > temp3) {
+ *duck_gain = 32767;
+ *q_duck_gain++ = 14;
+ } else {
+ *duck_gain = ixheaacd_mps_sqrt(temp_2, &qtemp2, sqrt_tab);
+ *q_duck_gain++ = qtemp2;
+ }
+ duck_gain++;
+ continue;
+ }
+
+ *duck_gain = 16383;
+
+ qtemp = q_smooth_direct_nrg[pb] - 1;
+ temp_1 = (smooth_direct_nrg[pb] >> 2) * 3;
+
+ qtemp_1 = q_smooth_reverb_nrg[pb];
+ temp_2 = smooth_reverb_nrg[pb];
+ if (ixheaacd_mps_comp(temp_2, temp_1, &(qtemp_1), qtemp)) {
+ temp3 = ixheaacd_mps_div_32(temp_1, temp_2, &qtemp3);
+ qtemp3 = qtemp3 + qtemp - qtemp_1;
+
+ *duck_gain = ixheaacd_mps_sqrt(temp3, &qtemp3, sqrt_tab);
+ *q_duck_gain = qtemp3;
+ }
+
+ duck_gain++;
+ q_duck_gain++;
+ }
+
+ duck_gain -= parameter_bands;
+ q_duck_gain -= parameter_bands;
+
+ for (qs = 0; qs < num_bands_2; qs++) {
+ pb = hybrid_2_param_28[qs];
+ gain = duck_gain[pb];
+ if (gain == 16383) {
+ continue;
+ }
+ qgain = q_duck_gain[pb];
+ p_output_real[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
+ p_output_imag[qs] =
+ ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
+ }
+
+ p_input_real += MAX_HYBRID_BANDS;
+ p_input_imag += MAX_HYBRID_BANDS;
+
+ p_output_real += MAX_HYBRID_BANDS;
+ p_output_imag += MAX_HYBRID_BANDS;
+ }
+}
+
+static IA_ERRORCODE ixheaacd_ducker_create(
+ ia_mps_dec_ducker_interface *const face, WORD32 const hybrid_bands) {
+ ia_mps_dec_duck_instance_struct *self = NULL;
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 i;
+
+ if (face == NULL) {
+ error_code = IA_FATAL_ERROR;
+ }
+
+ if (error_code == IA_NO_ERROR) {
+ self = (ia_mps_dec_duck_instance_struct *)&face[1];
+
+ self->hybrid_bands = hybrid_bands;
+ self->parameter_bands = MAX_PARAMETER_BANDS;
+
+ self->alpha = DUCK_ALPHA;
+ self->one_minus_alpha = DUCK_ONEMINUSALPHA;
+ self->gamma = DUCK_GAMMA;
+ self->abs_thr = ABS_THR_FIX;
+ self->hybrid_bands = hybrid_bands;
+ self->parameter_bands = MAX_PARAMETER_BANDS;
+
+ self->qalpha = 15;
+ self->qgamma = 14;
+
+ if (hybrid_bands == 71)
+ face->apply = ixheaacd_ducker_apply_71;
+ else
+ face->apply = ixheaacd_ducker_apply;
+
+ for (i = 0; i < MAX_PARAMETER_BANDS; i++) {
+ self->q_smooth_direct_nrg[i] = 31;
+ self->q_smooth_reverb_nrg[i] = 31;
+ }
+ }
+
+ return error_code;
+}
+
+IA_ERRORCODE ixheaacd_decorr_create(
+ ia_mps_dec_decorr_dec_handle self, WORD32 subbands, WORD32 seed,
+ WORD32 dec_type, WORD32 decorr_config,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr) {
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+ WORD32 i, reverb_band;
+
+ const WORD32 *rev_split_freq;
+
+ switch (decorr_config) {
+ case DECOR_CONFIG_0:
+ rev_split_freq =
+ ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_0;
+ break;
+ case DECOR_CONFIG_1:
+ rev_split_freq =
+ ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_1;
+ break;
+ case DECOR_CONFIG_2:
+ rev_split_freq =
+ ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_2;
+ break;
+ default:
+ return IA_FATAL_ERROR;
+ break;
+ }
+
+ if (error_code == IA_NO_ERROR) {
+ self->decorr_seed = seed;
+ self->numbins = subbands;
+
+ for (i = 0; i < self->numbins; i++) {
+ reverb_band = 0;
+ while ((reverb_band < 3) &&
+ (ixheaacd_get_qmf_sb(
+ i, ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr) >=
+ (rev_split_freq[reverb_band] - 1)))
+ reverb_band++;
+
+ {
+ self->no_sample_delay[i] =
+ ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table
+ .rev_delay[reverb_band][self->decorr_seed];
+
+ error_code = ixheaacd_decorr_filt_create(
+ self->filter[i], self->decorr_seed,
+ ixheaacd_get_qmf_sb(i,
+ ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr),
+ reverb_band, dec_type, ia_mps_dec_mps_table_ptr);
+ }
+ }
+
+ if (error_code == IA_NO_ERROR) {
+ error_code = ixheaacd_ducker_create(self->ducker, self->numbins);
+ }
+ }
+ return (error_code);
+}
+
+VOID ixheaacd_decorr_apply(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 length,
+ WORD32 *input_real, WORD32 *input_imag,
+ WORD32 *output_real, WORD32 *output_imag,
+ WORD32 index) {
+ WORD32 l = index - pstr_mps_state->num_direct_signals;
+ ia_mps_dec_decorr_dec_handle decorr_ptr = pstr_mps_state->ap_decor[l];
+ WORD32 idx, sb_sample;
+
+ WORD32 *p_input_real, *p_input_re, *p_input_imag, *p_input_im;
+ WORD32 *p_output_real, *p_output_imag, *p_output_re, *p_output_im;
+ WORD32 *delay_buffer_real, *delay_buffer_imag;
+ WORD32 length1;
+ VOID *free_scratch;
+
+ free_scratch = (WORD32 *)pstr_mps_state->mps_scratch_mem_v + MAX_TIMESLOTSX2;
+
+ if (decorr_ptr != NULL) {
+ p_input_real = input_real;
+ p_input_imag = input_imag;
+
+ p_output_real = output_real;
+ p_output_imag = output_imag;
+ for (idx = 0; idx < decorr_ptr->numbins; idx++) {
+ p_input_re = p_input_real;
+ p_input_im = p_input_imag;
+
+ p_output_re = p_output_real;
+ p_output_im = p_output_imag;
+
+ length1 = length - decorr_ptr->no_sample_delay[idx];
+ delay_buffer_real =
+ &decorr_ptr->delay_buffer_real[idx][decorr_ptr->no_sample_delay[idx]];
+ delay_buffer_imag =
+ &decorr_ptr->delay_buffer_imag[idx][decorr_ptr->no_sample_delay[idx]];
+ for (sb_sample = 0; sb_sample < length1; sb_sample++) {
+ delay_buffer_real[sb_sample] = *p_input_re;
+ *delay_buffer_imag++ = *p_input_im;
+ p_input_re += MAX_HYBRID_BANDS;
+ p_input_im += MAX_HYBRID_BANDS;
+ }
+ {
+ ixheaacd_decorr_filt_apply(
+ decorr_ptr->filter[idx], length, decorr_ptr->delay_buffer_real[idx],
+ decorr_ptr->delay_buffer_imag[idx], p_output_re++, p_output_im++);
+ }
+
+ length1 = decorr_ptr->no_sample_delay[idx];
+ delay_buffer_real = &decorr_ptr->delay_buffer_real[idx][0];
+ delay_buffer_imag = &decorr_ptr->delay_buffer_imag[idx][0];
+ for (sb_sample = 0; sb_sample < length1; sb_sample++) {
+ delay_buffer_real[sb_sample] = *p_input_re;
+ p_input_re += MAX_HYBRID_BANDS;
+ *delay_buffer_imag++ = *p_input_im;
+ p_input_im += MAX_HYBRID_BANDS;
+ }
+
+ p_input_real++;
+ p_input_imag++;
+
+ p_output_real++;
+ p_output_imag++;
+ }
+ decorr_ptr->ducker->apply(decorr_ptr->ducker, length, input_real,
+ input_imag, output_real, output_imag,
+ &(pstr_mps_state->ia_mps_dec_mps_table), free_scratch);
+ }
+}
diff --git a/decoder/ixheaacd_mps_defines.h b/decoder/ixheaacd_mps_defines.h
new file mode 100644
index 0000000..aa2a674
--- /dev/null
+++ b/decoder/ixheaacd_mps_defines.h
@@ -0,0 +1,33 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_DEFINES_H
+#define IXHEAACD_MPS_DEFINES_H
+
+#define INV_SQRT2_Q15 23170
+
+#define COS_3PI_BY_8_Q15 12540
+
+#define SQRT2PLUS1_Q13 19777
+
+#define SQRT2MINUS1_Q15 13573
+
+#define COS_PI_BY_8_Q15 30274
+
+#endif /* IXHEAACD_MPS_DEFINES_H */
diff --git a/decoder/ixheaacd_mps_get_index.c b/decoder/ixheaacd_mps_get_index.c
new file mode 100644
index 0000000..4a9b079
--- /dev/null
+++ b/decoder/ixheaacd_mps_get_index.c
@@ -0,0 +1,61 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_reshape_bb_env.h"
+
+VOID ixheaacd_get_ch_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row, WORD32 *index) {
+ switch (pstr_mps_state->temp_shape_config) {
+ case SHAPE_STP:
+ *index = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
+ .row_2_channel_stp[pstr_mps_state->tree_config][row];
+ break;
+ case SHAPE_GES:
+ *index = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
+ .row_2_channel_ges[pstr_mps_state->tree_config][row];
+ break;
+ default:
+ break;
+ }
+
+ return;
+}
+
+WORD32 ixheaacd_get_res_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row) {
+ return pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
+ .row_2_residual[pstr_mps_state->tree_config][row];
+}
diff --git a/decoder/ixheaacd_mps_get_index.h b/decoder/ixheaacd_mps_get_index.h
new file mode 100644
index 0000000..455d730
--- /dev/null
+++ b/decoder/ixheaacd_mps_get_index.h
@@ -0,0 +1,27 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_GET_INDEX_H
+#define IXHEAACD_MPS_GET_INDEX_H
+
+VOID ixheaacd_get_ch_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row, WORD32 *index);
+
+WORD32 ixheaacd_get_res_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row);
+
+#endif /* IXHEAACD_MPS_GET_INDEX_H */
diff --git a/decoder/ixheaacd_mps_huff_tab.h b/decoder/ixheaacd_mps_huff_tab.h
index 20ed1e5..afbe6b8 100644
--- a/decoder/ixheaacd_mps_huff_tab.h
+++ b/decoder/ixheaacd_mps_huff_tab.h
@@ -20,34 +20,34 @@
#ifndef IXHEAACD_MPS_HUFF_TAB_H
#define IXHEAACD_MPS_HUFF_TAB_H
-typedef struct { const WORD32 node_tab[39][2]; } ia_huff_res_nodes_struct;
+typedef struct { WORD32 node_tab[39][2]; } ia_huff_res_nodes_struct;
-typedef struct { const WORD32 node_tab[30][2]; } ia_huff_cld_node_1d_struct;
+typedef struct { WORD32 node_tab[30][2]; } ia_huff_cld_node_1d_struct;
-typedef struct { const WORD32 node_tab[7][2]; } ia_huff_icc_node_1d_struct;
+typedef struct { WORD32 node_tab[7][2]; } ia_huff_icc_node_1d_struct;
-typedef struct { const WORD32 node_tab[50][2]; } HUFF_CPC_NOD_1D;
+typedef struct { WORD32 node_tab[50][2]; } ia_huff_cpc_node_1d_struct;
typedef struct {
- const WORD32 lav3[15][2];
- const WORD32 lav5[35][2];
- const WORD32 lav7[63][2];
- const WORD32 lav9[99][2];
+ WORD32 lav3[15][2];
+ WORD32 lav5[35][2];
+ WORD32 lav7[63][2];
+ WORD32 lav9[99][2];
} ia_huff_cld_node_2d_struct;
typedef struct {
- const WORD32 lav1[3][2];
- const WORD32 lav3[15][2];
- const WORD32 lav5[35][2];
- const WORD32 lav7[63][2];
+ WORD32 lav1[3][2];
+ WORD32 lav3[15][2];
+ WORD32 lav5[35][2];
+ WORD32 lav7[63][2];
} ia_huff_icc_node_2d_struct;
typedef struct {
- const WORD32 lav3[15][2];
- const WORD32 lav6[48][2];
- const WORD32 lav9[99][2];
- const WORD32 lav12[168][2];
-} HUFF_CPC_NOD_2D;
+ WORD32 lav3[15][2];
+ WORD32 lav6[48][2];
+ WORD32 lav9[99][2];
+ WORD32 lav12[168][2];
+} ia_mps_dec_huff_cpc_nod_2d;
typedef struct {
ia_huff_cld_node_1d_struct h_1_dim[3];
@@ -62,27 +62,27 @@ typedef struct {
} ia_huff_icc_nodes_struct;
typedef struct {
- HUFF_CPC_NOD_1D h_1_dim[3];
- HUFF_CPC_NOD_2D h_2_dim[3][2];
+ ia_huff_cpc_node_1d_struct h_1_dim[3];
+ ia_mps_dec_huff_cpc_nod_2d h_2_dim[3][2];
-} HUFF_CPC_NODES;
+} ia_huff_cpc_nodes_struct;
typedef struct {
- const WORD32 cld[30][2];
- const WORD32 icc[7][2];
- const WORD32 cpc[25][2];
+ WORD32 cld[30][2];
+ WORD32 icc[7][2];
+ WORD32 cpc[25][2];
} ia_huff_pt0_nodes_struct;
-typedef struct { const WORD32 node_tab[3][2]; } ia_huff_lav_nodes_struct;
+typedef struct { WORD32 node_tab[3][2]; } ia_huff_lav_nodes_struct;
-typedef struct { const WORD32 node_tab[7][2]; } ia_huff_ipd_node_1d_struct;
+typedef struct { WORD32 node_tab[7][2]; } ia_huff_ipd_node_1d_struct;
typedef struct {
- const WORD32 lav1[3][2];
- const WORD32 lav3[15][2];
- const WORD32 lav5[35][2];
- const WORD32 lav7[63][2];
+ WORD32 lav1[3][2];
+ WORD32 lav3[15][2];
+ WORD32 lav5[35][2];
+ WORD32 lav7[63][2];
} ia_huff_ipd_node_2d_struct;
typedef struct {
@@ -92,4 +92,4 @@ typedef struct {
} ia_huff_ipd_nodes_struct;
-#endif
+#endif /* IXHEAACD_MPS_HUFF_TAB_H */
diff --git a/decoder/ixheaacd_mps_hybfilter.h b/decoder/ixheaacd_mps_hybfilter.h
index 126dee2..06a8ee4 100644
--- a/decoder/ixheaacd_mps_hybfilter.h
+++ b/decoder/ixheaacd_mps_hybfilter.h
@@ -30,7 +30,7 @@ VOID ixheaacd_mps_qmf_hybrid_analysis(
VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
ia_mps_hybrid_filt_struct *handle,
- ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS_NEW][MAX_TIME_SLOTS],
+ ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS][MAX_TIME_SLOTS],
WORD32 num_bands, WORD32 num_samples,
ia_cmplx_flt_struct v[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS]);
@@ -39,4 +39,36 @@ VOID ixheaacd_mps_qmf_hybrid_synthesis(
WORD32 num_bands, WORD32 num_samples,
ia_cmplx_flt_struct in_qmf[MAX_TIME_SLOTS][MAX_NUM_QMF_BANDS_MPS]);
-#endif
+WORD32 ixheaacd_get_qmf_sb(
+ WORD32 hybrid_subband,
+ const ia_mps_dec_mdct2qmf_table_struct *ixheaacd_mps_dec_mdct2qmf_table);
+
+VOID ixheaacd_init_ana_hyb_filt_bank(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state);
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_merge_res_decor(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real,
+ WORD32 *m_qmf_imag, WORD32 nr_bands, WORD32 nr_samples,
+ WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr);
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_create_x(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real,
+ WORD32 *m_qmf_imag, WORD32 nr_bands, WORD32 nr_samples,
+ WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr);
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real,
+ WORD32 *m_qmf_imag, WORD32 nr_bands, WORD32 nr_samples,
+ WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag, SIZE_T *indx, WORD32 res,
+ WORD32 hyb_bands, WORD32 num_parameter_bands, WORD32 *counter,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr);
+
+VOID ixheaacd_8ch_filtering(const WORD32 *p_qmf_real, const WORD32 *p_qmf_imag,
+ WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab);
+
+VOID ixheaacd_2ch_filtering(WORD32 *p_qmf, WORD32 *m_hybrid,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab);
+#endif /* IXHEAACD_MPS_HYBFILTER_H */
diff --git a/decoder/ixheaacd_mps_hybrid_filt.c b/decoder/ixheaacd_mps_hybrid_filt.c
index 458b644..35d7995 100644
--- a/decoder/ixheaacd_mps_hybrid_filt.c
+++ b/decoder/ixheaacd_mps_hybrid_filt.c
@@ -17,15 +17,9 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <math.h>
#include <string.h>
#include "ixheaacd_type_def.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -35,16 +29,16 @@
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
-
-#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_constants.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_dec.h"
#include "ixheaacd_basic_ops32.h"
-
-#include "ixheaacd_mps_hybfilter.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
extern const FLOAT32 ixheaacd_ia_mps_hyb_filter_coeff_8[QMF_HYBRID_FILT_ORDER];
extern const FLOAT32 ixheaacd_mps_hyb_filter_coeff_2[QMF_HYBRID_FILT_ORDER];
@@ -52,11 +46,9 @@ extern const FLOAT32 ixheaacd_mps_hyb_filter_coeff_2[QMF_HYBRID_FILT_ORDER];
extern const FLOAT32 ixheaacd_sine[8][8];
extern const FLOAT32 ixheaacd_cosine[8][8];
-static VOID ixheaacd_mps_hyb_filt_type1(
- ia_cmplx_flt_struct *input, ia_cmplx_flt_struct output[8][MAX_TIME_SLOTS],
- WORD32 num_samples, const FLOAT32 *filt_coeff)
-
-{
+static VOID ixheaacd_mps_hyb_filt_type1(ia_cmplx_flt_struct *input,
+ ia_cmplx_flt_struct output[8][MAX_TIME_SLOTS],
+ WORD32 num_samples, const FLOAT32 *filt_coeff) {
WORD32 i, n, q;
FLOAT32 in_re, in_im;
@@ -66,8 +58,7 @@ static VOID ixheaacd_mps_hyb_filt_type1(
for (i = 0; i < num_samples; i++) {
FLOAT32 x0_re[13], x0_im[13], x0_1_re[8], x0_1_im[8];
FLOAT32 acc_re_val[8], acc_im_val[8];
- for (n = 0; n < QMF_HYBRID_FILT_ORDER; n++) // x0 = x[n]*Cf[n]
- {
+ for (n = 0; n < QMF_HYBRID_FILT_ORDER; n++) {
in_re = input[n + i].re;
in_im = input[n + i].im;
@@ -77,8 +68,6 @@ static VOID ixheaacd_mps_hyb_filt_type1(
x0_im[n] = coeff * in_im;
}
- // x0_2 series
-
x0_1_re[0] = x0_re[6];
x0_1_im[0] = x0_im[6];
@@ -103,7 +92,6 @@ static VOID ixheaacd_mps_hyb_filt_type1(
x0_1_re[7] = -(x0_re[5]);
x0_1_im[7] = -(x0_im[5]);
- // acc_re_im_val
acc_re_val[0] = x0_1_re[0];
acc_re_val[1] = x0_1_re[1] - x0_1_re[7];
acc_re_val[2] = x0_1_re[2] - x0_1_re[6];
@@ -128,7 +116,6 @@ static VOID ixheaacd_mps_hyb_filt_type1(
acc_re_h = 0;
acc_im_h = 0;
- // X_re
acc_re_l += acc_re_val[0];
acc_re_l += acc_re_val[1] * ixheaacd_cosine[q][1];
acc_re_l += acc_re_val[2] * ixheaacd_cosine[q][2];
@@ -143,7 +130,6 @@ static VOID ixheaacd_mps_hyb_filt_type1(
acc_re_h = acc_re_h - (acc_re_l - acc_re_h);
- // X_im
acc_im_l += acc_im_val[0];
acc_im_l += acc_im_val[1] * ixheaacd_cosine[q][1];
acc_im_l += acc_im_val[2] * ixheaacd_cosine[q][2];
@@ -167,11 +153,9 @@ static VOID ixheaacd_mps_hyb_filt_type1(
}
}
-static VOID ixheaacd_mps_hyb_filt_type2(
- ia_cmplx_flt_struct *input, ia_cmplx_flt_struct output[2][MAX_TIME_SLOTS],
- WORD32 num_samples, const FLOAT32 *filt_coeff)
-
-{
+static VOID ixheaacd_mps_hyb_filt_type2(ia_cmplx_flt_struct *input,
+ ia_cmplx_flt_struct output[2][MAX_TIME_SLOTS],
+ WORD32 num_samples, const FLOAT32 *filt_coeff) {
WORD32 i, n;
FLOAT32 in_re, in_im;
@@ -223,15 +207,14 @@ static VOID ixheaacd_mps_hyb_filt_type2(
VOID ixheaacd_mps_qmf_hybrid_analysis_init(ia_mps_hybrid_filt_struct *handle) {
memset(handle->lf_buffer, 0,
QMF_BANDS_TO_HYBRID * BUFFER_LEN_LF_MPS * sizeof(ia_cmplx_w32_struct));
- memset(handle->hf_buffer, 0, MAX_NUM_QMF_BANDS_MPS * BUFFER_LEN_HF_MPS *
- sizeof(ia_cmplx_flt_struct));
+ memset(handle->hf_buffer, 0,
+ MAX_NUM_QMF_BANDS_MPS * BUFFER_LEN_HF_MPS * sizeof(ia_cmplx_flt_struct));
}
VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
ia_mps_hybrid_filt_struct *handle,
- ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS_NEW][MAX_TIME_SLOTS],
- WORD32 num_bands, WORD32 num_samples,
- ia_cmplx_flt_struct v[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS]) {
+ ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS][MAX_TIME_SLOTS], WORD32 num_bands,
+ WORD32 num_samples, ia_cmplx_flt_struct v[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS]) {
WORD32 lf_samples_shift;
WORD32 hf_samples_shift;
WORD32 lf_qmf_bands;
@@ -260,13 +243,13 @@ VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
}
for (k = 0; k < num_bands - lf_qmf_bands; k++) {
- memcpy(&handle->hf_buffer[k][hf_samples_shift].re,
- &in_qmf[k + lf_qmf_bands][0].re, 2 * num_samples * sizeof(FLOAT32));
+ memcpy(&handle->hf_buffer[k][hf_samples_shift].re, &in_qmf[k + lf_qmf_bands][0].re,
+ 2 * num_samples * sizeof(FLOAT32));
}
ixheaacd_mps_hyb_filt_type1(
- &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_ia_mps_hyb_filter_coeff_8);
+ &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_ia_mps_hyb_filter_coeff_8);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -283,8 +266,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
}
ixheaacd_mps_hyb_filt_type2(
- &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_mps_hyb_filter_coeff_2);
+ &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_mps_hyb_filter_coeff_2);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -294,8 +277,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
}
ixheaacd_mps_hyb_filt_type2(
- &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_mps_hyb_filter_coeff_2);
+ &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_mps_hyb_filter_coeff_2);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -314,9 +297,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
VOID ixheaacd_mps_qmf_hybrid_analysis(
ia_mps_hybrid_filt_struct *handle,
- ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS_NEW][MAX_TIME_SLOTS],
- WORD32 num_bands, WORD32 num_samples,
- ia_cmplx_flt_struct hyb[MAX_HYBRID_BANDS_MPS][MAX_TIME_SLOTS]) {
+ ia_cmplx_flt_struct in_qmf[MAX_NUM_QMF_BANDS_MPS_NEW][MAX_TIME_SLOTS], WORD32 num_bands,
+ WORD32 num_samples, ia_cmplx_flt_struct hyb[MAX_HYBRID_BANDS_MPS][MAX_TIME_SLOTS]) {
WORD32 lf_samples_shift;
WORD32 hf_samples_shift;
WORD32 lf_qmf_bands;
@@ -345,13 +327,13 @@ VOID ixheaacd_mps_qmf_hybrid_analysis(
}
for (k = 0; k < num_bands - lf_qmf_bands; k++) {
- memcpy(&handle->hf_buffer[k][hf_samples_shift].re,
- &in_qmf[k + lf_qmf_bands][0].re, 2 * num_samples * sizeof(FLOAT32));
+ memcpy(&handle->hf_buffer[k][hf_samples_shift].re, &in_qmf[k + lf_qmf_bands][0].re,
+ 2 * num_samples * sizeof(FLOAT32));
}
ixheaacd_mps_hyb_filt_type1(
- &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_ia_mps_hyb_filter_coeff_8);
+ &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_ia_mps_hyb_filter_coeff_8);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -368,8 +350,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis(
}
ixheaacd_mps_hyb_filt_type2(
- &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_mps_hyb_filter_coeff_2);
+ &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_mps_hyb_filter_coeff_2);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -379,8 +361,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis(
}
ixheaacd_mps_hyb_filt_type2(
- &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]),
- scratch, num_samples, ixheaacd_mps_hyb_filter_coeff_2);
+ &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
+ ixheaacd_mps_hyb_filter_coeff_2);
for (k = 0; k < 2; k++) {
for (n = 0; n < num_samples; n++) {
@@ -396,9 +378,8 @@ VOID ixheaacd_mps_qmf_hybrid_analysis(
}
VOID ixheaacd_mps_qmf_hybrid_synthesis(
- ia_cmplx_flt_struct hyb[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS],
- WORD32 num_bands, WORD32 num_samples,
- ia_cmplx_flt_struct in_qmf[MAX_TIME_SLOTS][MAX_NUM_QMF_BANDS_MPS]) {
+ ia_cmplx_flt_struct hyb[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS], WORD32 num_bands,
+ WORD32 num_samples, ia_cmplx_flt_struct in_qmf[MAX_TIME_SLOTS][MAX_NUM_QMF_BANDS_MPS]) {
WORD32 k, n;
for (n = 0; n < num_samples; n++) {
@@ -416,7 +397,832 @@ VOID ixheaacd_mps_qmf_hybrid_synthesis(
in_qmf[n][2].re = hyb[n][8].re + hyb[n][9].re;
in_qmf[n][2].im = hyb[n][8].im + hyb[n][9].im;
- memcpy(&in_qmf[n][3].re, &hyb[n][10].re,
- 2 * (num_bands - 3) * sizeof(FLOAT32));
+ memcpy(&in_qmf[n][3].re, &hyb[n][10].re, 2 * (num_bands - 3) * sizeof(FLOAT32));
+ }
+}
+
+VOID ixheaacd_mps_fft(complex *out, LOOPINDEX idx, WORD32 nob,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab) {
+ LOOPINDEX block_per_stage, stage_num, inner;
+ const WORD32 *cosine_array = hyb_tab->cosine_array;
+ const WORD32 *sine_array = hyb_tab->sine_array;
+ WORD32 index_1, index_2, index, tab_modifier;
+ WORD32 len, increment, i;
+
+ WORD32 cos_val;
+ WORD32 sin_val;
+
+ WORD16 index1;
+ WORD32 re_temp;
+ WORD32 im_temp;
+ WORD32 *out1_w32, *out2_w32;
+
+ len = idx;
+ i = 1;
+ increment = 0;
+
+ len = len >> 1;
+ index_1 = 0;
+ increment += 1;
+
+ index = 11 - increment;
+ tab_modifier = ixheaacd_shl32(1, index);
+
+ out1_w32 = (WORD32 *)&out[index_1];
+ out2_w32 = (WORD32 *)&out[index_1 + 1];
+
+ for (block_per_stage = 0; block_per_stage < len; block_per_stage++) {
+ re_temp = out2_w32[0];
+ im_temp = out2_w32[1];
+
+ out2_w32[0] = (out1_w32[0] - re_temp);
+ out2_w32[1] = (out1_w32[1] - im_temp);
+
+ out1_w32[0] = (re_temp + out1_w32[0]);
+ out1_w32[1] = (im_temp + out1_w32[1]);
+
+ out1_w32 += 4;
+ out2_w32 += 4;
+ }
+
+ i <<= 1;
+
+ for (stage_num = 1; stage_num < nob; stage_num++) {
+ len = len >> 1;
+ index_1 = 0;
+ increment += 1;
+
+ index = 11 - increment;
+ tab_modifier = ixheaacd_shl32(1, index);
+
+ for (block_per_stage = 0; block_per_stage < len; block_per_stage++) {
+ index_2 = index_1 + i;
+
+ out1_w32 = (WORD32 *)&out[index_1];
+ out2_w32 = (WORD32 *)&out[index_2];
+
+ re_temp = out1_w32[0];
+ im_temp = out1_w32[1];
+
+ out1_w32[0] = (re_temp + out2_w32[0]) >> 1;
+ out1_w32[1] = (im_temp + out2_w32[1]) >> 1;
+
+ out2_w32[0] = (re_temp - out2_w32[0]) >> 1;
+ out2_w32[1] = (im_temp - out2_w32[1]) >> 1;
+
+ index1 = tab_modifier;
+
+ out1_w32 += 2;
+ out2_w32 += 2;
+
+ for (inner = 0; inner < ((i - 1) << 1); inner += 2) {
+ cos_val = cosine_array[index1];
+ sin_val = sine_array[index1];
+
+ re_temp = ixheaacd_mps_mult32x16_shr_16(out2_w32[inner], cos_val) +
+ ixheaacd_mps_mult32x16_shr_16(out2_w32[inner + 1], sin_val);
+ im_temp = ixheaacd_mps_mult32x16_shr_16(out2_w32[inner + 1], cos_val) -
+ ixheaacd_mps_mult32x16_shr_16(out2_w32[inner], sin_val);
+
+ out1_w32[inner] >>= 1;
+ out1_w32[inner + 1] >>= 1;
+
+ out2_w32[inner] = out1_w32[inner] - re_temp;
+ out2_w32[inner + 1] = out1_w32[inner + 1] - im_temp;
+
+ out1_w32[inner] = (out1_w32[inner] + re_temp);
+ out1_w32[inner + 1] = (out1_w32[inner + 1] + im_temp);
+
+ index1 += tab_modifier;
+ }
+
+ index_1 += ixheaacd_shl32(1, increment);
+ }
+ i <<= 1;
+ }
+}
+
+VOID ixheaacd_8ch_filtering(const WORD32 *p_qmf_real, const WORD32 *p_qmf_imag,
+ WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab) {
+ WORD32 n;
+ WORD32 real, imag;
+ const WORD16 tcos = COS_PI_BY_8;
+ const WORD16 tsin = SIN_PI_BY_8;
+ WORD32 cum[16];
+ WORD32 *p_complex;
+ const WORD16 *p8_13 = hyb_tab->p8_13;
+
+ real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[4], p8_13[4]) +
+ ixheaacd_mult32x16in32(p_qmf_real[12], p8_13[12])),
+ 1);
+ imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[4], p8_13[4]) +
+ ixheaacd_mult32x16in32(p_qmf_imag[12], p8_13[12])),
+ 1);
+
+ cum[5] = imag - real;
+ cum[4] = -(imag + real);
+
+ real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[3], p8_13[3]) +
+ ixheaacd_mult32x16in32(p_qmf_real[11], p8_13[11])),
+ 1);
+ imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[3], p8_13[3]) +
+ ixheaacd_mult32x16in32(p_qmf_imag[11], p8_13[11])),
+ 1);
+
+ cum[13] = ixheaacd_shl32(
+ (ixheaacd_mult32x16in32(imag, tcos) - ixheaacd_mult32x16in32(real, tsin)), 1);
+ cum[12] = ixheaacd_shl32(
+ -((ixheaacd_mult32x16in32(imag, tsin) + ixheaacd_mult32x16in32(real, tcos))), 1);
+
+ cum[2] = ixheaacd_shl32(ixheaacd_mult32x16in32((p_qmf_real[2] - p_qmf_real[10]), p8_13[10]), 1);
+ cum[3] = ixheaacd_shl32(ixheaacd_mult32x16in32((p_qmf_imag[2] - p_qmf_imag[10]), p8_13[2]), 1);
+
+ real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[1], p8_13[1]) +
+ ixheaacd_mult32x16in32(p_qmf_real[9], p8_13[9])),
+ 1);
+ imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[1], p8_13[1]) +
+ ixheaacd_mult32x16in32(p_qmf_imag[9], p8_13[9])),
+ 1);
+
+ cum[11] = ixheaacd_shl32(
+ (ixheaacd_mult32x16in32(imag, tcos) + ixheaacd_mult32x16in32(real, tsin)), 1);
+ cum[10] = ixheaacd_shl32(
+ (ixheaacd_mult32x16in32(imag, tsin) - ixheaacd_mult32x16in32(real, tcos)), 1);
+
+ real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[0], p8_13[0]) +
+ ixheaacd_mult32x16in32(p_qmf_real[8], p8_13[8])),
+ 1);
+ imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[0], p8_13[0]) +
+ ixheaacd_mult32x16in32(p_qmf_imag[8], p8_13[8])),
+ 1);
+
+ cum[7] = imag + real;
+ cum[6] = imag - real;
+
+ cum[15] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[7], p8_13[14]) +
+ ixheaacd_mult32x16in32(p_qmf_real[7], p8_13[13])),
+ 1);
+ cum[14] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[7], p8_13[13]) -
+ ixheaacd_mult32x16in32(p_qmf_real[7], p8_13[14])),
+ 1);
+
+ cum[1] = ixheaacd_shl32(
+ ixheaacd_mult32x16in32(p_qmf_real[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
+ cum[0] = ixheaacd_shl32(
+ ixheaacd_mult32x16in32(p_qmf_imag[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
+
+ cum[9] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[5], p8_13[13]) -
+ ixheaacd_mult32x16in32(p_qmf_imag[5], p8_13[14])),
+ 1);
+ cum[8] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[5], p8_13[14]) +
+ ixheaacd_mult32x16in32(p_qmf_imag[5], p8_13[13])),
+ 1);
+
+ ixheaacd_mps_fft((complex *)cum, 8, 3, hyb_tab);
+
+ p_complex = cum;
+
+ for (n = 0; n < 8; n++) {
+ m_hybrid_imag[n] = *p_complex++;
+ m_hybrid_real[n] = *p_complex++;
+ }
+}
+
+VOID ixheaacd_2ch_filtering(WORD32 *p_qmf, WORD32 *m_hybrid,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
+ WORD32 cum0, cum1;
+ WORD64 temp;
+ const WORD16 *p2_6 = hyb_tab_ptr->p2_6;
+
+ cum0 = (WORD32)p_qmf[HYBRID_FILTER_DELAY] >> 1;
+
+ temp = (WORD64)((WORD64)p2_6[0] * (WORD64)(p_qmf[1] + p_qmf[11]) +
+ (WORD64)p2_6[1] * (WORD64)(p_qmf[3] + p_qmf[9]));
+ temp += (WORD64)p2_6[2] * (WORD64)(p_qmf[5] + p_qmf[7]);
+ cum1 = (WORD32)(temp >> 16);
+
+ m_hybrid[0] = cum0 + cum1;
+ m_hybrid[1] = cum0 - cum1;
+}
+
+WORD32 ixheaacd_get_qmf_sb(
+ WORD32 hybrid_subband,
+ const ia_mps_dec_mdct2qmf_table_struct *ixheaacd_mps_dec_mdct2qmf_table) {
+ return ixheaacd_mps_dec_mdct2qmf_table->hybrid_2_qmf[hybrid_subband];
+}
+
+VOID ixheaacd_init_ana_hyb_filt_bank(ia_mps_dec_thyb_filter_state_struct *hyb_state) {
+ WORD32 k, n;
+
+ for (k = 0; k < QMF_BANDS_TO_HYBRID; k++) {
+ for (n = 0; n < PROTO_LEN - 1 + MAX_TIME_SLOTS; n++) {
+ hyb_state->buffer_lf_real[k][n] = 0;
+ hyb_state->buffer_lf_imag[k][n] = 0;
+ hyb_state->qmf_lf_real[k][n] = 0;
+ hyb_state->qmf_lf_imag[k][n] = 0;
+ }
+ }
+
+ for (k = 0; k < MAX_NUM_QMF_BANDS; k++) {
+ for (n = 0; n < ((PROTO_LEN - 1) >> 1) + MAX_TIME_SLOTS; n++) {
+ hyb_state->buffer_hf_real[k][n] = 0;
+ hyb_state->buffer_hf_imag[k][n] = 0;
+ }
+ }
+}
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_create_x(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real, WORD32 *m_qmf_imag,
+ WORD32 nr_bands, WORD32 nr_samples, WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
+ WORD32 nr_samples_shift_lf;
+ WORD32 nr_qmf_bands_lf;
+ WORD32 k, n;
+ WORD32 time_slot;
+
+ WORD32 proto_len = (PROTO_LEN - 1) >> 1;
+ WORD32 val = nr_samples - proto_len;
+ WORD32 val_xhb = val * MAX_HYBRID_BANDS;
+ WORD32 loop_cnt, loop_cnt_x4;
+ WORD32 *p_qmf_real, *p_qmf_re, *p_qmf_imag, *p_qmf_im;
+
+ WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+ WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+
+ WORD32 *p_hybrid_real = m_hybrid_real + 10;
+ WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
+
+ WORD32 *p_hybrid_re, *p_hybrid_im;
+
+ nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
+
+ nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
+ loop_cnt = nr_bands - nr_qmf_bands_lf;
+ loop_cnt_x4 = (loop_cnt << 2);
+
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ for (n = 0; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
+
+ hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
+ hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
+ }
+ }
+
+ p_qmf_real = m_qmf_real;
+ p_qmf_imag = m_qmf_imag;
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ p_qmf_re = p_qmf_real;
+ p_qmf_im = p_qmf_imag;
+
+ for (n = 0; n < nr_samples; n++) {
+ hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
+ hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
+
+ hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
+ hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
+
+ p_qmf_re += MAX_HYBRID_BANDS;
+ p_qmf_im += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real++;
+ p_qmf_imag++;
+ }
+
+ p_qmf_real = m_qmf_real + nr_qmf_bands_lf + val_xhb;
+ p_qmf_imag = m_qmf_imag + nr_qmf_bands_lf + val_xhb;
+
+ for (n = 0; n < proto_len; n++) {
+ p_qmf_re = p_qmf_real;
+ p_qmf_im = p_qmf_imag;
+
+ p_hybrid_re = p_hybrid_real;
+ p_hybrid_im = p_hybrid_imag;
+
+ for (k = 0; k < loop_cnt; k++) {
+ *p_hybrid_re++ = hyb_state->buffer_hf_real[k][n];
+ *p_hybrid_im++ = hyb_state->buffer_hf_imag[k][n];
+
+ hyb_state->buffer_hf_real[k][n] = *p_qmf_re++;
+ hyb_state->buffer_hf_imag[k][n] = *p_qmf_im++;
+ }
+ p_qmf_real += MAX_HYBRID_BANDS;
+ p_qmf_imag += MAX_HYBRID_BANDS;
+
+ p_hybrid_real += MAX_HYBRID_BANDS;
+ p_hybrid_imag += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real = m_qmf_real;
+ p_qmf_imag = m_qmf_imag;
+
+ p_hybrid_real = m_hybrid_real + 10;
+ p_hybrid_imag = m_hybrid_imag + 10;
+
+ k = proto_len * MAX_HYBRID_BANDS;
+
+ p_hybrid_re = p_hybrid_real + k;
+ p_hybrid_im = p_hybrid_imag + k;
+
+ p_qmf_re = p_qmf_real + nr_qmf_bands_lf;
+ p_qmf_im = p_qmf_imag + nr_qmf_bands_lf;
+
+ for (n = 0; n < val; n++) {
+ memcpy(p_hybrid_re, p_qmf_re, loop_cnt_x4);
+ memcpy(p_hybrid_im, p_qmf_im, loop_cnt_x4);
+
+ p_qmf_re += MAX_HYBRID_BANDS;
+ p_qmf_im += MAX_HYBRID_BANDS;
+
+ p_hybrid_re += MAX_HYBRID_BANDS;
+ p_hybrid_im += MAX_HYBRID_BANDS;
+ }
+
+ p_hybrid_real = m_hybrid_real;
+ p_hybrid_imag = m_hybrid_imag;
+
+ for (time_slot = 0; time_slot < nr_samples; time_slot++) {
+ p_hybrid_re = p_hybrid_real;
+ p_hybrid_im = p_hybrid_imag;
+
+ ixheaacd_8ch_filtering(
+ &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[6];
+ *p_hybrid_re++ = m_temp_output_real[7];
+ *p_hybrid_re++ = m_temp_output_real[0];
+ *p_hybrid_re++ = m_temp_output_real[1];
+ *p_hybrid_re++ = (m_temp_output_real[2] + m_temp_output_real[5]);
+ *p_hybrid_re++ = (m_temp_output_real[3] + m_temp_output_real[4]);
+
+ *p_hybrid_im++ = m_temp_output_imag[6];
+ *p_hybrid_im++ = m_temp_output_imag[7];
+ *p_hybrid_im++ = m_temp_output_imag[0];
+ *p_hybrid_im++ = m_temp_output_imag[1];
+ *p_hybrid_im++ = (m_temp_output_imag[2] + m_temp_output_imag[5]);
+ *p_hybrid_im++ = (m_temp_output_imag[3] + m_temp_output_imag[4]);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[1];
+ *p_hybrid_re++ = m_temp_output_real[0];
+
+ *p_hybrid_im++ = m_temp_output_imag[1];
+ *p_hybrid_im++ = m_temp_output_imag[0];
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[0];
+ *p_hybrid_re++ = m_temp_output_real[1];
+
+ *p_hybrid_im++ = m_temp_output_imag[0];
+ *p_hybrid_im++ = m_temp_output_imag[1];
+
+ p_hybrid_real += MAX_HYBRID_BANDS;
+ p_hybrid_imag += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real = m_qmf_real;
+ p_qmf_imag = m_qmf_imag;
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ p_qmf_re = p_qmf_real;
+ p_qmf_im = p_qmf_imag;
+ for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
+ }
+ for (n = 0; n < nr_samples; n++) {
+ hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
+ hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
+
+ p_qmf_re += MAX_HYBRID_BANDS;
+ p_qmf_im += MAX_HYBRID_BANDS;
+ }
+ p_qmf_real++;
+ p_qmf_imag++;
+ }
+}
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_merge_res_decor(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real, WORD32 *m_qmf_imag,
+ WORD32 nr_bands, WORD32 nr_samples, WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
+ WORD32 nr_samples_shift_lf;
+ WORD32 nr_qmf_bands_lf;
+ WORD32 k, n;
+ WORD32 time_slot;
+
+ WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+ WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+
+ WORD32 proto_len = (PROTO_LEN - 1) >> 1;
+ WORD32 val = nr_samples - proto_len;
+ WORD32 loop_cnt;
+
+ WORD32 *p_qmf_real = m_qmf_real;
+ WORD32 *p_qmf_imag = m_qmf_imag;
+
+ WORD32 *p_hybrid_real = m_hybrid_real + 10;
+ WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
+ WORD32 *p_buffer_lf_real, *p_buffer_lf_imag;
+
+ WORD32 nr_samples_x4 = nr_samples << 2;
+
+ nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
+
+ nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
+ loop_cnt = nr_bands - nr_qmf_bands_lf;
+
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ for (n = 0; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
+
+ hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
+ hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
+ }
+ }
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ WORD32 *qmf_real = p_qmf_real;
+ WORD32 *qmf_imag = p_qmf_imag;
+ for (n = 0; n < nr_samples; n++) {
+ hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *qmf_real;
+ hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag;
+
+ hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag++;
+ hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *qmf_real++;
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+ }
+
+ p_qmf_real = m_qmf_real + nr_qmf_bands_lf * MAX_TIME_SLOTS;
+ p_qmf_imag = m_qmf_imag + nr_qmf_bands_lf * MAX_TIME_SLOTS;
+
+ for (k = 0; k < loop_cnt; k++) {
+ WORD32 *qmf_real = p_qmf_real + val;
+ WORD32 *qmf_imag = p_qmf_imag + val;
+
+ WORD32 *hybrid_real = p_hybrid_real;
+ WORD32 *hybrid_imag = p_hybrid_imag;
+
+ for (n = 0; n < proto_len; n++) {
+ *hybrid_real = hyb_state->buffer_hf_real[k][n];
+ *hybrid_imag = hyb_state->buffer_hf_imag[k][n];
+
+ hyb_state->buffer_hf_real[k][n] = *qmf_real++;
+ hyb_state->buffer_hf_imag[k][n] = *qmf_imag++;
+
+ hybrid_real += MAX_HYBRID_BANDS;
+ hybrid_imag += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_hybrid_real++;
+ p_hybrid_imag++;
+ }
+
+ p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
+ p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
+
+ p_hybrid_real = m_hybrid_real + 10;
+ p_hybrid_imag = m_hybrid_imag + 10;
+
+ for (k = 0; k < loop_cnt; k++) {
+ WORD32 *qmf_real = p_qmf_real;
+ WORD32 *qmf_imag = p_qmf_imag;
+
+ WORD32 *hybrid_real = p_hybrid_real + proto_len * MAX_HYBRID_BANDS;
+ WORD32 *hybrid_imag = p_hybrid_imag + proto_len * MAX_HYBRID_BANDS;
+
+ for (n = 0; n < val; n++) {
+ *hybrid_real = *qmf_real++;
+ *hybrid_imag = *qmf_imag++;
+
+ hybrid_real += MAX_HYBRID_BANDS;
+ hybrid_imag += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_hybrid_real++;
+ p_hybrid_imag++;
+ }
+
+ p_hybrid_real = m_hybrid_real;
+ p_hybrid_imag = m_hybrid_imag;
+
+ for (time_slot = 0; time_slot < nr_samples; time_slot++) {
+ WORD32 *hybrid_real = p_hybrid_real;
+ WORD32 *hybrid_imag = p_hybrid_imag;
+
+ ixheaacd_8ch_filtering(
+ &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
+
+ *hybrid_real++ = m_temp_output_real[6];
+ *hybrid_real++ = m_temp_output_real[7];
+ *hybrid_real++ = m_temp_output_real[0];
+ *hybrid_real++ = m_temp_output_real[1];
+ *hybrid_imag++ = (m_temp_output_imag[2] + m_temp_output_imag[5]);
+ *hybrid_real++ = (m_temp_output_real[3] + m_temp_output_real[4]);
+
+ *hybrid_imag++ = m_temp_output_imag[6];
+ *hybrid_imag++ = m_temp_output_imag[7];
+ *hybrid_imag++ = m_temp_output_imag[0];
+ *hybrid_imag++ = m_temp_output_imag[1];
+ *hybrid_real++ = (m_temp_output_real[2] + m_temp_output_real[5]);
+ *hybrid_imag++ = (m_temp_output_imag[3] + m_temp_output_imag[4]);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *hybrid_real++ = m_temp_output_real[1];
+ *hybrid_real++ = m_temp_output_real[0];
+
+ *hybrid_imag++ = m_temp_output_imag[0];
+ *hybrid_imag++ = m_temp_output_imag[1];
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *hybrid_real++ = m_temp_output_real[0];
+ *hybrid_real++ = m_temp_output_real[1];
+
+ *hybrid_imag++ = m_temp_output_imag[0];
+ *hybrid_imag++ = m_temp_output_imag[1];
+
+ p_hybrid_real += MAX_HYBRID_BANDS;
+ p_hybrid_imag += MAX_HYBRID_BANDS;
+ }
+
+ p_qmf_real = m_qmf_real;
+ p_qmf_imag = m_qmf_imag;
+
+ p_buffer_lf_real = &hyb_state->buffer_lf_real[0][nr_samples_shift_lf];
+ p_buffer_lf_imag = &hyb_state->buffer_lf_imag[0][nr_samples_shift_lf];
+
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
+ }
+ {
+ memcpy(p_buffer_lf_real, p_qmf_real, nr_samples_x4);
+ memcpy(p_buffer_lf_imag, p_qmf_imag, nr_samples_x4);
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_buffer_lf_real += BUFFER_LEN_LF;
+ p_buffer_lf_imag += BUFFER_LEN_LF;
+ }
+}
+
+VOID ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
+ ia_mps_dec_thyb_filter_state_struct *hyb_state, WORD32 *m_qmf_real, WORD32 *m_qmf_imag,
+ WORD32 nr_bands, WORD32 nr_samples, WORD32 *m_hybrid_real, WORD32 *m_hybrid_imag,
+ SIZE_T *indx, WORD32 res, WORD32 hyb_bands, WORD32 num_parameter_bands, WORD32 *counter,
+ const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
+ WORD32 nr_samples_shift_lf;
+ WORD32 nr_qmf_bands_lf;
+ WORD32 k, n, qs;
+ WORD32 time_slot, ch_off_set;
+ SIZE_T *idx = indx;
+
+ WORD32 proto_len = (PROTO_LEN - 1) >> 1;
+ WORD32 val = nr_samples - proto_len;
+
+ WORD32 *p_qmf_real = m_qmf_real;
+ WORD32 *p_qmf_imag = m_qmf_imag;
+ WORD32 loop_cnt;
+
+ WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+ WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
+
+ WORD32 *p_hybrid_real = m_hybrid_real + 10;
+ WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
+
+ WORD32 *p_hybrid_re, *p_hybrid_im;
+
+ WORD32 *p_buffer_lf_real, *p_buffer_lf_imag;
+
+ WORD32 nr_samples_x4 = nr_samples << 2;
+
+ nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
+
+ nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
+ loop_cnt = nr_bands - nr_qmf_bands_lf;
+ ch_off_set = 0;
+
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ for (n = 0; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
+
+ hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
+ hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
+ }
+ }
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ WORD32 *qmf_real = p_qmf_real;
+ WORD32 *qmf_imag = p_qmf_imag;
+
+ for (n = 0; n < nr_samples; n++) {
+ hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *qmf_real;
+ hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag;
+
+ hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag++;
+ hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *qmf_real++;
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+ }
+
+ p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
+ p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
+
+ for (k = 0; k < loop_cnt; k++) {
+ WORD32 *qmf_real = p_qmf_real + val;
+ WORD32 *qmf_imag = p_qmf_imag + val;
+
+ p_hybrid_re = p_hybrid_real;
+ p_hybrid_im = p_hybrid_imag;
+
+ for (n = 0; n < proto_len; n++) {
+ *p_hybrid_re = hyb_state->buffer_hf_real[k][n];
+ *p_hybrid_im = hyb_state->buffer_hf_imag[k][n];
+
+ hyb_state->buffer_hf_real[k][n] = *qmf_real++;
+ hyb_state->buffer_hf_imag[k][n] = *qmf_imag++;
+
+ p_hybrid_re += MAX_HYBRID_BANDS;
+ p_hybrid_im += MAX_HYBRID_BANDS;
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_hybrid_real++;
+ p_hybrid_imag++;
+ }
+
+ p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
+ p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
+
+ p_hybrid_real = m_hybrid_real + 10;
+ p_hybrid_imag = m_hybrid_imag + 10;
+
+ for (k = 0; k < loop_cnt; k++) {
+ WORD32 *qmf_real = p_qmf_real;
+ WORD32 *qmf_imag = p_qmf_imag;
+
+ p_hybrid_re = p_hybrid_real + proto_len * MAX_HYBRID_BANDS;
+ p_hybrid_im = p_hybrid_imag + proto_len * MAX_HYBRID_BANDS;
+
+ for (n = 0; n < val; n++) {
+ *p_hybrid_re = *qmf_real++;
+ *p_hybrid_im = *qmf_imag++;
+
+ p_hybrid_re += MAX_HYBRID_BANDS;
+ p_hybrid_im += MAX_HYBRID_BANDS;
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_hybrid_real++;
+ p_hybrid_imag++;
+ }
+
+ if (res == 1 && (num_parameter_bands == 20 || num_parameter_bands == 28))
+ *counter = 3;
+ else {
+ idx = indx;
+ for (qs = 0; qs < hyb_bands; qs++) {
+ if (*idx++ >= (SIZE_T)res) {
+ *counter = qs;
+ qs = hyb_bands;
+ }
+ }
+ }
+
+ p_hybrid_real = m_hybrid_real;
+ p_hybrid_imag = m_hybrid_imag;
+ for (time_slot = 0; time_slot < nr_samples; time_slot++) {
+ idx = indx;
+ p_hybrid_re = p_hybrid_real;
+ p_hybrid_im = p_hybrid_imag;
+
+ ixheaacd_8ch_filtering(
+ &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[6];
+ *p_hybrid_re++ = m_temp_output_real[7];
+ *p_hybrid_re++ = m_temp_output_real[0];
+
+ *p_hybrid_re++ = m_temp_output_real[1];
+
+ *p_hybrid_im++ = m_temp_output_imag[6];
+ *p_hybrid_im++ = m_temp_output_imag[7];
+ *p_hybrid_im++ = m_temp_output_imag[0];
+ *p_hybrid_im++ = m_temp_output_imag[1];
+
+ if (*counter > 4) {
+ *p_hybrid_re++ = (m_temp_output_real[2] + m_temp_output_real[5]);
+ *p_hybrid_im++ = (m_temp_output_imag[2] + m_temp_output_imag[5]);
+ }
+
+ if (*counter > 5) {
+ *p_hybrid_re++ = (m_temp_output_real[3] + m_temp_output_real[4]);
+ *p_hybrid_im++ = (m_temp_output_imag[3] + m_temp_output_imag[4]);
+ }
+
+ ch_off_set = 6;
+ p_hybrid_re = p_hybrid_real + ch_off_set;
+ p_hybrid_im = p_hybrid_imag + ch_off_set;
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[1];
+ *p_hybrid_re++ = m_temp_output_real[0];
+
+ *p_hybrid_im++ = m_temp_output_imag[1];
+ *p_hybrid_im++ = m_temp_output_imag[0];
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_real, hyb_tab_ptr);
+
+ ixheaacd_2ch_filtering(
+ &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
+ m_temp_output_imag, hyb_tab_ptr);
+
+ *p_hybrid_re++ = m_temp_output_real[0];
+ *p_hybrid_re++ = m_temp_output_real[1];
+
+ *p_hybrid_im++ = m_temp_output_imag[0];
+ *p_hybrid_im++ = m_temp_output_imag[1];
+
+ p_hybrid_real += MAX_HYBRID_BANDS;
+ p_hybrid_imag += MAX_HYBRID_BANDS;
+ }
+ p_qmf_real = m_qmf_real;
+ p_qmf_imag = m_qmf_imag;
+
+ p_buffer_lf_real = &hyb_state->buffer_lf_real[0][nr_samples_shift_lf];
+ p_buffer_lf_imag = &hyb_state->buffer_lf_imag[0][nr_samples_shift_lf];
+
+ for (k = 0; k < nr_qmf_bands_lf; k++) {
+ for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
+ hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
+ hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
+ }
+ {
+ memcpy(p_buffer_lf_real, p_qmf_real, nr_samples_x4);
+ memcpy(p_buffer_lf_imag, p_qmf_imag, nr_samples_x4);
+ }
+ p_qmf_real += MAX_TIME_SLOTS;
+ p_qmf_imag += MAX_TIME_SLOTS;
+
+ p_buffer_lf_real += BUFFER_LEN_LF;
+ p_buffer_lf_imag += BUFFER_LEN_LF;
}
}
diff --git a/decoder/ixheaacd_mps_initfuncs.c b/decoder/ixheaacd_mps_initfuncs.c
new file mode 100644
index 0000000..060a7f5
--- /dev/null
+++ b/decoder/ixheaacd_mps_initfuncs.c
@@ -0,0 +1,1272 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_pns.h"
+#include "ixheaacd_drc_data_struct.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_lpp_tran.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_env_extr.h"
+#include "ixheaacd_audioobjtypes.h"
+#include "ixheaacd_memory_standards.h"
+#include "ixheaacd_latmdemux.h"
+#include "ixheaacd_aacdec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_struct_def.h"
+#include "ixheaacd_mps_decor.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_mdct_2_qmf.h"
+#include "ixheaacd_mps_tonality.h"
+#include "ixheaacd_mps_reshape_bb_env.h"
+#include "ixheaacd_mps_hybfilter.h"
+#include "ixheaacd_mps_blind.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_tables.h"
+
+#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
+
+#define ALIGN_SIZE32(x) ((((x) + 3) >> 2) << 2)
+
+WORD32 ixheaacd_getsize_mps_persistent() { return (ALIGN_SIZE64(sizeof(ia_mps_persistent_mem))); }
+
+static WORD32 ixheaacd_calc_decorr_size() {
+ WORD32 matrix_alloc_size, decorr_filter_size, num_den_size;
+ WORD32 fraction_alloc_size, ducker_create_size, decor_dec_size;
+ WORD32 state_alloc_size, alloc_size, dec_type = 0;
+
+ matrix_alloc_size =
+ 2 * (MAX_HYBRID_BANDS * (MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY) * sizeof(WORD32) +
+ MAX_HYBRID_BANDS * sizeof(VOID *)) *
+ MAX_NO_DECORR_CHANNELS;
+ decorr_filter_size = MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS *
+ sizeof(ia_mps_dec_decorr_filter_instance_struct);
+ num_den_size =
+ (MAX_NUM_DEN_LENGTH) * sizeof(WORD32) * MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS;
+
+ if (dec_type == 1)
+ fraction_alloc_size = 4 * num_den_size;
+ else
+ fraction_alloc_size = 2 * num_den_size;
+
+ state_alloc_size =
+ 2 * (MAX_NUM_DEN_LENGTH) * sizeof(WORD32) * MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS;
+
+ ducker_create_size = MAX_NO_DECORR_CHANNELS * (sizeof(ia_mps_dec_ducker_interface) +
+ sizeof(ia_mps_dec_duck_instance_struct));
+ decor_dec_size = sizeof(ia_mps_dec_decorr_dec_struct) * MAX_NO_DECORR_CHANNELS;
+
+ alloc_size = matrix_alloc_size + decorr_filter_size + fraction_alloc_size + ducker_create_size +
+ decor_dec_size + state_alloc_size;
+
+ return (2 * alloc_size);
+}
+
+WORD32 ixheaacd_mps_persistent_buffer_sizes() {
+ WORD32 buffer_size;
+
+ buffer_size = sizeof(ia_heaac_mps_state_struct);
+
+ buffer_size += PREV_GAINAT;
+
+ buffer_size += ARBDMX_ALPHA;
+
+ buffer_size += M1_PREV;
+
+ buffer_size += M1_PREV;
+
+ buffer_size += M2_PREV_DECOR;
+
+ buffer_size += M2_PREV_DECOR;
+
+ buffer_size += M2_PREV_RESID;
+
+ buffer_size += M2_PREV_RESID;
+
+ buffer_size += QMF_DELAY_INPUT;
+
+ buffer_size += QMF_DELAY_INPUT;
+
+ buffer_size += ANA_BUF_SIZE;
+
+ buffer_size += SYN_BUF_SIZE;
+
+ buffer_size += ixheaacd_calc_decorr_size();
+
+ buffer_size += HYB_FILTER_STATE_SIZE;
+
+ buffer_size += TONALITY_STATE_SIZE;
+
+ buffer_size += SMOOTHING_STATE_SIZE;
+
+ buffer_size += RESHAPE_STATE_SIZE;
+
+ buffer_size += SUBBAND_TP_SIZE;
+
+ buffer_size += BLIND_DECODER_SIZE;
+
+ buffer_size += sizeof(ia_mps_dec_spatial_bs_frame_struct);
+
+ buffer_size += ARRAY_STRUCT_SIZE;
+
+ return buffer_size;
+}
+
+VOID ixheaacd_set_mps_persistent_buffers(ia_heaac_mps_state_struct *pstr_mps_state,
+ WORD32 *persistent_used, WORD32 num_channel,
+ VOID *persistent_mem) {
+ WORD32 used_persistent = *persistent_used;
+
+ struct ia_mps_persistent_mem *mps_persistent_mem = &(pstr_mps_state->mps_persistent_mem);
+
+ WORD32 decorr_size;
+
+ num_channel = max(2, num_channel);
+
+ mps_persistent_mem->prev_gain_at = (WORD32 *)((WORD8 *)persistent_mem);
+
+ memset(mps_persistent_mem->prev_gain_at, 0, PREV_GAINAT);
+
+ used_persistent += PREV_GAINAT;
+
+ mps_persistent_mem->arbdmx_alpha_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->arbdmx_alpha_prev, 0, ARBDMX_ALPHA);
+ used_persistent += ARBDMX_ALPHA;
+
+ mps_persistent_mem->m1_param_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m1_param_real_prev, 0, M1_PREV);
+ used_persistent += M1_PREV;
+
+ mps_persistent_mem->m1_param_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m1_param_imag_prev, 0, M1_PREV);
+ used_persistent += M1_PREV;
+
+ mps_persistent_mem->m2_decor_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m2_decor_real_prev, 0, M2_PREV_DECOR);
+ used_persistent += M2_PREV_DECOR;
+
+ mps_persistent_mem->m2_decor_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m2_decor_imag_prev, 0, M2_PREV_DECOR);
+ used_persistent += M2_PREV_DECOR;
+
+ mps_persistent_mem->m2_resid_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m2_resid_real_prev, 0, M2_PREV_RESID);
+ used_persistent += M2_PREV_RESID;
+
+ mps_persistent_mem->m2_resid_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->m2_resid_imag_prev, 0, M2_PREV_RESID);
+ used_persistent += M2_PREV_RESID;
+
+ mps_persistent_mem->qmf_input_delay_real =
+ (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->qmf_input_delay_real, 0, QMF_DELAY_INPUT);
+ used_persistent += QMF_DELAY_INPUT;
+
+ mps_persistent_mem->qmf_input_delay_imag =
+ (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->qmf_input_delay_imag, 0, QMF_DELAY_INPUT);
+ used_persistent += QMF_DELAY_INPUT;
+
+ mps_persistent_mem->syn_qmf_states_buffer =
+ (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->syn_qmf_states_buffer, 0, SYN_BUF_SIZE);
+ used_persistent += SYN_BUF_SIZE;
+
+ mps_persistent_mem->ana_qmf_states_buffer =
+ (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->ana_qmf_states_buffer, 0, ANA_BUF_SIZE);
+ used_persistent += ANA_BUF_SIZE;
+
+ decorr_size = ixheaacd_calc_decorr_size();
+
+ mps_persistent_mem->decorr_ptr = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->decorr_ptr, 0, decorr_size);
+ used_persistent += decorr_size;
+
+ mps_persistent_mem->hyb_filter_state =
+ (ia_mps_dec_thyb_filter_state_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->hyb_filter_state, 0, HYB_FILTER_STATE_SIZE);
+ used_persistent += HYB_FILTER_STATE_SIZE;
+
+ mps_persistent_mem->ton_state =
+ (ia_mps_dec_tonality_state_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->ton_state, 0, TONALITY_STATE_SIZE);
+ used_persistent += TONALITY_STATE_SIZE;
+
+ mps_persistent_mem->smooth_state =
+ (ia_mps_dec_smoothing_state_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->smooth_state, 0, SMOOTHING_STATE_SIZE);
+ used_persistent += SMOOTHING_STATE_SIZE;
+
+ mps_persistent_mem->reshape_bb_env_state =
+ (ia_mps_dec_reshape_bb_env_state_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->reshape_bb_env_state, 0, RESHAPE_STATE_SIZE);
+ used_persistent += RESHAPE_STATE_SIZE;
+
+ mps_persistent_mem->sub_band_params =
+ (ia_mps_dec_subband_tp_params_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->sub_band_params, 0, SUBBAND_TP_SIZE);
+ used_persistent += SUBBAND_TP_SIZE;
+
+ mps_persistent_mem->blind_decoder =
+ (ia_mps_dec_blind_decoder_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->blind_decoder, 0, BLIND_DECODER_SIZE);
+ used_persistent += BLIND_DECODER_SIZE;
+
+ mps_persistent_mem->p_bs_frame =
+ (ia_mps_dec_spatial_bs_frame_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(mps_persistent_mem->p_bs_frame, 0, sizeof(ia_mps_dec_spatial_bs_frame_struct));
+ used_persistent += sizeof(ia_mps_dec_spatial_bs_frame_struct);
+
+ pstr_mps_state->array_struct =
+ (ia_mps_dec_reuse_array_struct *)((WORD8 *)persistent_mem + used_persistent);
+ memset(pstr_mps_state->array_struct, 0, ARRAY_STRUCT_SIZE);
+ used_persistent += ARRAY_STRUCT_SIZE;
+
+ *persistent_used = used_persistent;
+}
+
+VOID ixheaacd_set_scratch_buffers(ia_heaac_mps_state_struct *pstr_mps_state, VOID *scratch_mem) {
+ WORD32 scratch_used;
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+
+ p_array_struct->qmf_residual_real = scratch_mem;
+ scratch_used = QMF_RES_BUF_SIZE;
+ p_array_struct->qmf_residual_imag = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += QMF_RES_BUF_SIZE;
+
+ p_array_struct->res_mdct = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += MDCT_RES_BUF_SIZE;
+
+ p_array_struct->m_qmf_real = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += QMF_BUF_SIZE;
+ p_array_struct->m_qmf_imag = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += QMF_BUF_SIZE;
+
+ p_array_struct->buf_real = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += BUF_SIZE;
+ p_array_struct->buf_imag = (WORD32 *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += BUF_SIZE;
+
+ p_array_struct->hyb_output_real_dry = p_array_struct->res_mdct;
+ p_array_struct->hyb_output_imag_dry =
+ p_array_struct->res_mdct + MAX_OUTPUT_CHANNELS_AT_MPS * TSXHB;
+
+ p_array_struct->x_real = p_array_struct->hyb_output_real_dry;
+ p_array_struct->x_imag = p_array_struct->hyb_output_imag_dry;
+
+ p_array_struct->time_out = p_array_struct->hyb_output_real_dry;
+
+ p_array_struct->w_dry_real = p_array_struct->m_qmf_real;
+ p_array_struct->w_dry_imag = p_array_struct->m_qmf_imag;
+
+ p_array_struct->env_dmx_0 = p_array_struct->m_qmf_real + TSXHBX5;
+ p_array_struct->env_dmx_1 = p_array_struct->env_dmx_0 + MAX_TIME_SLOTS;
+
+ p_array_struct->qmf_residual_real_pre = p_array_struct->qmf_residual_real;
+ p_array_struct->qmf_residual_real_post = p_array_struct->qmf_residual_real + RES_CHXQMFXTS;
+
+ p_array_struct->qmf_residual_imag_pre = p_array_struct->qmf_residual_imag;
+ p_array_struct->qmf_residual_imag_post = p_array_struct->qmf_residual_imag + RES_CHXQMFXTS;
+
+ p_array_struct->buffer_real = p_array_struct->qmf_residual_real_post;
+ p_array_struct->buffer_imag = p_array_struct->qmf_residual_imag_post;
+
+ p_array_struct->m1_param = (ia_mps_dec_m1_param_struct *)p_array_struct->buffer_real;
+
+ pstr_mps_state->aux_struct =
+ (ia_mps_dec_auxilary_struct *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += sizeof(ia_mps_dec_auxilary_struct);
+
+ pstr_mps_state->aux_struct->m2_param =
+ (ia_mps_dec_m2_param_struct *)((WORD8 *)scratch_mem + scratch_used);
+ scratch_used += sizeof(ia_mps_dec_m2_param_struct);
+
+ pstr_mps_state->mps_scratch_mem_v = (VOID *)((WORD8 *)scratch_mem + scratch_used);
+}
+VOID ixheaacd_ana_filter_bank_init(ia_heaac_mps_state_struct *pstr_mps_state,
+ ia_mps_dec_qmf_ana_filter_bank *qmf_bank) {
+ memset(qmf_bank->qmf_states_buffer, 0,
+ QMF_FILTER_STATE_ANA_SIZE_MPS * sizeof(qmf_bank->qmf_states_buffer[0]));
+ qmf_bank->p_filter_ana =
+ pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr->ia_mps_enc_qmf_64_640;
+ qmf_bank->flag = 0;
+ qmf_bank->offset = 0;
+ qmf_bank->ref_co_eff_ptr_l = qmf_bank->p_filter_ana + 10;
+ qmf_bank->ref_co_eff_ptr_r = qmf_bank->p_filter_ana + QMF_FILTER_STATE_ANA_SIZE_MPS;
+ qmf_bank->offset_l = 5;
+ qmf_bank->offset_r = 5;
+}
+
+VOID ixheaacd_syn_filter_bank_create(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_qmf_syn_filter_bank *qmf_bank = &(pstr_mps_state->syn_qmf_bank);
+
+ memset(qmf_bank->sbr_qmf_states_synthesis, 0, SYN_BUFFER_SIZE);
+ qmf_bank->p_filter_syn =
+ pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->ia_mps_dec_qmf_64_640;
+}
+
+static IA_ERRORCODE ixheaacd_set_m2_params(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ WORD32 up_mix_type = curr_state->up_mix_type;
+
+ switch (curr_state->tree_config) {
+ case TREE_5151:
+ if (up_mix_type == 2) {
+ curr_state->m2_param_imag_present = 1;
+
+ curr_state->m2_param_present[0][1] = 1;
+ curr_state->m2_param_present[1][1] = 1;
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ } else {
+ if (up_mix_type == 3) {
+ curr_state->m2_param_present[0][3] = 1;
+ curr_state->m2_param_present[1][3] = 1;
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[3][0] = 1;
+ } else {
+ curr_state->m2_param_present[0][0] = 3;
+ curr_state->m2_param_present[0][1] = 3;
+ curr_state->m2_param_present[0][2] = 3;
+ curr_state->m2_param_present[0][3] = 3;
+ curr_state->m2_param_present[1][0] = 3;
+ curr_state->m2_param_present[1][1] = 3;
+ curr_state->m2_param_present[1][2] = 3;
+ curr_state->m2_param_present[1][3] = 3;
+ curr_state->m2_param_present[2][0] = 3;
+ curr_state->m2_param_present[2][1] = 3;
+ curr_state->m2_param_present[2][2] = 3;
+ curr_state->m2_param_present[3][0] = 3;
+ curr_state->m2_param_present[4][0] = 3;
+ curr_state->m2_param_present[4][1] = 3;
+ curr_state->m2_param_present[4][4] = 3;
+ curr_state->m2_param_present[5][0] = 3;
+ curr_state->m2_param_present[5][1] = 3;
+ curr_state->m2_param_present[5][4] = 3;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[3][0] = 1;
+ curr_state->m1_param_present[4][0] = 1;
+ }
+ }
+ break;
+ case TREE_5152:
+ if (up_mix_type == 2) {
+ curr_state->m2_param_imag_present = 1;
+
+ curr_state->m2_param_present[0][1] = 1;
+ curr_state->m2_param_present[1][1] = 1;
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ } else {
+ if (up_mix_type == 3) {
+ curr_state->m2_param_present[0][2] = 1;
+ curr_state->m2_param_present[1][2] = 1;
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ } else {
+ curr_state->m2_param_present[0][0] = 3;
+ curr_state->m2_param_present[0][1] = 3;
+ curr_state->m2_param_present[0][2] = 3;
+ curr_state->m2_param_present[0][3] = 3;
+ curr_state->m2_param_present[1][0] = 3;
+ curr_state->m2_param_present[1][1] = 3;
+ curr_state->m2_param_present[1][2] = 3;
+ curr_state->m2_param_present[1][3] = 3;
+ curr_state->m2_param_present[2][0] = 3;
+ curr_state->m2_param_present[2][1] = 3;
+ curr_state->m2_param_present[2][2] = 3;
+ curr_state->m2_param_present[2][4] = 3;
+ curr_state->m2_param_present[3][0] = 3;
+ curr_state->m2_param_present[3][1] = 3;
+ curr_state->m2_param_present[3][2] = 3;
+ curr_state->m2_param_present[3][4] = 3;
+ curr_state->m2_param_present[4][0] = 3;
+ curr_state->m2_param_present[4][1] = 3;
+ curr_state->m2_param_present[5][0] = 3;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[3][0] = 1;
+ curr_state->m1_param_present[4][0] = 1;
+ }
+ }
+ break;
+ case TREE_525:
+ if (up_mix_type == 1) {
+ curr_state->m2_param_present[0][3] = 1;
+ curr_state->m2_param_present[1][3] = 1;
+ curr_state->m2_param_present[2][4] = 1;
+ curr_state->m2_param_present[3][4] = 1;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[2][1] = 2;
+ curr_state->m2_param_present[3][1] = 2;
+ curr_state->m2_param_present[4][2] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[0][2] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[1][2] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ } else if (up_mix_type == 2) {
+ if (curr_state->binaural_quality == 1) {
+ } else {
+ curr_state->m2_param_imag_present = 1;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[0][1] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[1][1] = 2;
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->m2_param_present[0][2] = 2;
+ curr_state->m2_param_present[0][3] = 2;
+ curr_state->m2_param_present[1][2] = 2;
+ curr_state->m2_param_present[1][3] = 2;
+ }
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[3][4] = 1;
+ }
+ } else {
+ curr_state->m2_param_present[0][0] = 3;
+ curr_state->m2_param_present[0][3] = 3;
+ curr_state->m2_param_present[1][0] = 3;
+ curr_state->m2_param_present[1][3] = 3;
+ curr_state->m2_param_present[2][1] = 3;
+ curr_state->m2_param_present[2][4] = 3;
+ curr_state->m2_param_present[3][1] = 3;
+ curr_state->m2_param_present[3][4] = 3;
+ curr_state->m2_param_present[4][2] = 3;
+ curr_state->m2_param_present[5][2] = 3;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[0][2] = 1;
+ curr_state->m1_param_present[0][3] = 1;
+ curr_state->m1_param_present[0][4] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[1][2] = 1;
+ curr_state->m1_param_present[1][3] = 1;
+ curr_state->m1_param_present[1][4] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[2][4] = 1;
+ }
+ break;
+ case TREE_7271:
+ if (up_mix_type == 0) {
+ curr_state->m2_param_present[0][3] = 3;
+ curr_state->m2_param_present[0][6] = 3;
+ curr_state->m2_param_present[1][3] = 3;
+ curr_state->m2_param_present[1][6] = 3;
+ curr_state->m2_param_present[2][3] = 3;
+ curr_state->m2_param_present[3][4] = 3;
+ curr_state->m2_param_present[3][7] = 3;
+ curr_state->m2_param_present[4][4] = 3;
+ curr_state->m2_param_present[4][7] = 3;
+ curr_state->m2_param_present[5][4] = 3;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[2][0] = 2;
+ curr_state->m2_param_present[3][1] = 2;
+ curr_state->m2_param_present[4][1] = 2;
+ curr_state->m2_param_present[5][1] = 2;
+ curr_state->m2_param_present[6][2] = 2;
+ curr_state->m2_param_present[7][2] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[0][2] = 1;
+ curr_state->m1_param_present[0][3] = 1;
+ curr_state->m1_param_present[0][4] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[1][2] = 1;
+ curr_state->m1_param_present[1][3] = 1;
+ curr_state->m1_param_present[1][4] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[2][4] = 1;
+ } else if (up_mix_type == 2) {
+ if (curr_state->binaural_quality == 1) {
+ } else {
+ curr_state->m2_param_imag_present = 1;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[0][1] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[1][1] = 2;
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->m2_param_present[0][2] = 2;
+ curr_state->m2_param_present[0][3] = 2;
+ curr_state->m2_param_present[1][2] = 2;
+ curr_state->m2_param_present[1][3] = 2;
+ }
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[3][4] = 1;
+ }
+ }
+ break;
+ case TREE_7272:
+ if (up_mix_type == 0) {
+ curr_state->m2_param_present[0][3] = 3;
+ curr_state->m2_param_present[1][3] = 3;
+ curr_state->m2_param_present[1][6] = 3;
+ curr_state->m2_param_present[2][3] = 3;
+ curr_state->m2_param_present[2][6] = 3;
+ curr_state->m2_param_present[3][4] = 3;
+ curr_state->m2_param_present[4][4] = 3;
+ curr_state->m2_param_present[4][7] = 3;
+ curr_state->m2_param_present[5][4] = 3;
+ curr_state->m2_param_present[5][7] = 3;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[2][0] = 2;
+ curr_state->m2_param_present[3][1] = 2;
+ curr_state->m2_param_present[4][1] = 2;
+ curr_state->m2_param_present[5][1] = 2;
+ curr_state->m2_param_present[6][2] = 2;
+ curr_state->m2_param_present[7][2] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[0][1] = 1;
+ curr_state->m1_param_present[0][2] = 1;
+ curr_state->m1_param_present[0][3] = 1;
+ curr_state->m1_param_present[0][4] = 1;
+ curr_state->m1_param_present[1][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[1][2] = 1;
+ curr_state->m1_param_present[1][3] = 1;
+ curr_state->m1_param_present[1][4] = 1;
+ curr_state->m1_param_present[2][0] = 1;
+ curr_state->m1_param_present[2][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[2][4] = 1;
+ } else if (up_mix_type == 2) {
+ if (curr_state->binaural_quality == 1) {
+ } else {
+ curr_state->m2_param_imag_present = 1;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[0][1] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[1][1] = 2;
+ if (curr_state->arbitrary_downmix == 2) {
+ curr_state->m2_param_present[0][2] = 2;
+ curr_state->m2_param_present[0][3] = 2;
+ curr_state->m2_param_present[1][2] = 2;
+ curr_state->m2_param_present[1][3] = 2;
+ }
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][3] = 1;
+ curr_state->m1_param_present[3][4] = 1;
+ }
+ }
+ break;
+ case TREE_7571:
+ curr_state->m2_param_present[0][6] = 3;
+ curr_state->m2_param_present[1][6] = 3;
+ curr_state->m2_param_present[3][7] = 3;
+ curr_state->m2_param_present[4][7] = 3;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][0] = 2;
+ curr_state->m2_param_present[2][4] = 2;
+ curr_state->m2_param_present[3][1] = 2;
+ curr_state->m2_param_present[4][1] = 2;
+ curr_state->m2_param_present[5][5] = 2;
+ curr_state->m2_param_present[6][2] = 2;
+ curr_state->m2_param_present[7][3] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ curr_state->m1_param_present[3][3] = 1;
+ curr_state->m1_param_present[4][4] = 1;
+ curr_state->m1_param_present[5][5] = 1;
+ curr_state->m1_param_present[6][0] = 1;
+ curr_state->m1_param_present[7][1] = 1;
+ break;
+ case TREE_7572:
+ curr_state->m2_param_present[1][6] = 3;
+ curr_state->m2_param_present[2][6] = 3;
+ curr_state->m2_param_present[4][7] = 3;
+ curr_state->m2_param_present[5][7] = 3;
+
+ curr_state->m2_param_present[0][0] = 2;
+ curr_state->m2_param_present[1][4] = 2;
+ curr_state->m2_param_present[2][4] = 2;
+ curr_state->m2_param_present[3][1] = 2;
+ curr_state->m2_param_present[4][5] = 2;
+ curr_state->m2_param_present[5][5] = 2;
+ curr_state->m2_param_present[6][2] = 2;
+ curr_state->m2_param_present[7][3] = 2;
+
+ curr_state->m1_param_present[0][0] = 1;
+ curr_state->m1_param_present[1][1] = 1;
+ curr_state->m1_param_present[2][2] = 1;
+ curr_state->m1_param_present[3][3] = 1;
+ curr_state->m1_param_present[4][4] = 1;
+ curr_state->m1_param_present[5][5] = 1;
+ curr_state->m1_param_present[6][4] = 1;
+ curr_state->m1_param_present[7][5] = 1;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
+ break;
+ };
+
+ return IA_NO_ERROR;
+}
+
+VOID ixheaacd_sb_tp_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ch;
+ ia_mps_dec_subband_tp_params_struct *sub_band_tp =
+ pstr_mps_state->mps_persistent_mem.sub_band_params;
+ WORD32 *prev_tp_scale = sub_band_tp->prev_tp_scale;
+ WORD16 *q_prev_tp_scale = sub_band_tp->q_prev_tp_scale;
+
+ WORD32 *old_wet_ener = sub_band_tp->old_wet_ener;
+ WORD16 *q_old_wet_ener = sub_band_tp->q_old_wet_ener;
+
+ WORD32 *run_wet_ener = sub_band_tp->run_wet_ener;
+ WORD16 *q_run_wet_ener = sub_band_tp->q_run_wet_ener;
+
+ for (ch = 0; ch < MAX_OUTPUT_CHANNELS_MPS; ch++) {
+ prev_tp_scale[ch] = ONE_IN_Q15;
+ q_prev_tp_scale[ch] = 15;
+
+ old_wet_ener[ch] = ONE_IN_Q30;
+ q_old_wet_ener[ch] = 0;
+ run_wet_ener[ch] = 0;
+ q_run_wet_ener[ch] = 0;
+ }
+ for (ch = 0; ch < MAX_INPUT_CHANNELS_MPS; ch++) {
+ sub_band_tp->old_dry_ener[ch] = ONE_IN_Q30;
+ sub_band_tp->q_old_dry_ener[ch] = 0;
+ sub_band_tp->run_dry_ener[ch] = 0;
+ sub_band_tp->q_run_dry_ener[ch] = 0;
+ }
+}
+
+VOID ixheaacd_decorr_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ VOID *decorr_persistent = pstr_mps_state->mps_persistent_mem.decorr_ptr;
+ WORD32 i, k;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+ WORD32 dec_type = pstr_mps_state->dec_type;
+
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ pstr_mps_state->ap_decor[k] = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(ia_mps_dec_decorr_dec_struct);
+ }
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ pstr_mps_state->ap_decor[k]->ducker = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(ia_mps_dec_ducker_interface) +
+ sizeof(ia_mps_dec_duck_instance_struct);
+ }
+
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->filter[i] = decorr_persistent;
+ decorr_persistent =
+ (WORD8 *)decorr_persistent + sizeof(ia_mps_dec_decorr_filter_instance_struct);
+ }
+ }
+
+ if (dec_type == 1) {
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->filter[i]->numerator_real = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ pstr_mps_state->ap_decor[k]->filter[i]->denominator_real = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ pstr_mps_state->ap_decor[k]->filter[i]->numerator_imag = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ pstr_mps_state->ap_decor[k]->filter[i]->denominator_imag = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ }
+ }
+ } else {
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->filter[i]->numerator_real = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ pstr_mps_state->ap_decor[k]->filter[i]->denominator_real = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ }
+ }
+ }
+
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->filter[i]->state_real = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ pstr_mps_state->ap_decor[k]->filter[i]->state_imag = decorr_persistent;
+ decorr_persistent = (WORD8 *)decorr_persistent + sizeof(WORD32) * MAX_NUM_DEN_LENGTH;
+ }
+ }
+
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ pstr_mps_state->ap_decor[k]->delay_buffer_real =
+ (WORD32 **)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
+ decorr_persistent = (WORD8 *)decorr_persistent + 8 * hybrid_bands;
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->delay_buffer_real[i] =
+ (WORD32 *)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
+
+ decorr_persistent =
+ (WORD8 *)decorr_persistent + 4 * (MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY);
+ }
+
+ pstr_mps_state->ap_decor[k]->delay_buffer_imag =
+ (WORD32 **)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
+ decorr_persistent = (WORD8 *)decorr_persistent + 8 * hybrid_bands;
+
+ for (i = 0; i < hybrid_bands; i++) {
+ pstr_mps_state->ap_decor[k]->delay_buffer_imag[i] =
+ (WORD32 *)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
+
+ decorr_persistent =
+ (WORD8 *)decorr_persistent + 4 * (MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY);
+ }
+ }
+}
+
+VOID ixheaacd_bs_frame_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_spatial_bs_frame_struct *bs_frame = pstr_mps_state->bs_frame;
+
+ memset(bs_frame->ott_cld_idx_prev, 0,
+ MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_cld_idx_prev[0][0]));
+ memset(bs_frame->ott_icc_idx_prev, 0,
+ MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_icc_idx_prev[0][0]));
+ memset(bs_frame->cmp_ott_cld_idx_prev, 0,
+ MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_cld_idx_prev[0][0]));
+ memset(bs_frame->cmp_ott_icc_idx_prev, 0,
+ MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_icc_idx_prev[0][0]));
+
+ memset(bs_frame->ttt_cpc_1_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_1_idx_prev[0][0]));
+ memset(bs_frame->ttt_cpc_2_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_2_idx_prev[0][0]));
+ memset(bs_frame->ttt_cld_1_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_1_idx_prev[0][0]));
+ memset(bs_frame->ttt_cld_2_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_2_idx_prev[0][0]));
+ memset(bs_frame->ttt_icc_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_icc_idx_prev[0][0]));
+ memset(bs_frame->cmp_ttt_cpc_1_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_1_idx_prev[0][0]));
+ memset(bs_frame->cmp_ttt_cpc_2_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_2_idx_prev[0][0]));
+ memset(bs_frame->cmp_ttt_cld_1_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_1_idx_prev[0][0]));
+ memset(bs_frame->cmp_ttt_cld_2_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_2_idx_prev[0][0]));
+ memset(bs_frame->cmp_ttt_icc_idx_prev, 0,
+ MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_icc_idx_prev[0][0]));
+
+ memset(bs_frame->arbdmx_gain_idx_prev, 0,
+ MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
+ sizeof(bs_frame->arbdmx_gain_idx_prev[0][0]));
+ memset(bs_frame->cmp_arbdmx_gain_idx_prev, 0,
+ MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
+ sizeof(bs_frame->cmp_arbdmx_gain_idx_prev[0][0]));
+}
+
+IA_ERRORCODE ixheaacd_modules_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ ia_mps_dec_thyb_filter_state_struct *hyb_filter_state =
+ pstr_mps_state->mps_persistent_mem.hyb_filter_state;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 in_channels = pstr_mps_state->num_input_channels;
+ WORD32 n_ch;
+ if (pstr_mps_state->smooth_config) ixheaacd_init_tonality(pstr_mps_state);
+
+ if (up_mix_type != 2) {
+ if (pstr_mps_state->temp_shape_config == 2) {
+ ixheaacd_init_bb_env(pstr_mps_state);
+ }
+ }
+
+ if (pstr_mps_state->scaling_enable == 1) ixheaacd_sb_tp_init(pstr_mps_state);
+
+ err_code = ixheaacd_syn_filt_bank_init(pstr_mps_state->syn, pstr_mps_state->qmf_bands);
+
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ for (n_ch = 0; n_ch < in_channels; n_ch++) {
+ ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[n_ch]);
+ }
+
+ for (n_ch = 0; n_ch < in_channels; n_ch++) {
+ pstr_mps_state->aux_struct->arbdmx_alpha[n_ch] = 0;
+ }
+
+ memset(&pstr_mps_state->aux_struct->ttt_cld_1[0], 0, 8 * 28 * sizeof(WORD32));
+
+ if (pstr_mps_state->residual_coding) {
+ WORD32 offset = in_channels;
+ for (n_ch = 0; n_ch < pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes; n_ch++) {
+ if (pstr_mps_state->res_bands[n_ch] > 0) {
+ ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[offset + n_ch]);
+ }
+ }
+ }
+
+ if (pstr_mps_state->arbitrary_downmix == 2) {
+ WORD32 offset = in_channels + pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
+ for (n_ch = 0; n_ch < in_channels; n_ch++) {
+ ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[offset + n_ch]);
+ }
+ }
+ if (up_mix_type == 1) {
+ ixheaacd_init_blind(pstr_mps_state);
+ }
+
+ pstr_mps_state->parse_next_bitstream_frame = 1;
+
+ ixheaacd_bs_frame_init(pstr_mps_state);
+
+ return err_code;
+}
+
+IA_ERRORCODE ixheaacd_header_parse(ia_heaac_mps_state_struct *pstr_mps_state) {
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 sac_header_len, alignment_bits = 0;
+ ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
+
+ if (up_mix_type != 1) {
+ pstr_mps_state->sac_time_align_flag = ixheaacd_read_bits_buf(mps_bit_buf, 1);
+
+ sac_header_len = ixheaacd_read_bits_buf(mps_bit_buf, 7);
+ if (sac_header_len == 127) {
+ sac_header_len += ixheaacd_read_bits_buf(mps_bit_buf, 16);
+ }
+
+ err_code = ixheaacd_parse_specific_config(pstr_mps_state, sac_header_len);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ if (pstr_mps_state->bs_config.bs_temp_shape_config == 1) pstr_mps_state->scaling_enable = 1;
+
+ ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
+ } else {
+ err_code = ixheaacd_default_specific_config(pstr_mps_state, pstr_mps_state->sampling_freq);
+ if (err_code != IA_NO_ERROR) return err_code;
+ }
+ return err_code;
+}
+
+IA_ERRORCODE ixheaacd_aac_mps_create(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 i, j, k;
+ WORD32 *prev_gain_at = pstr_mps_state->mps_persistent_mem.prev_gain_at;
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ WORD32 dec_type = pstr_mps_state->dec_type;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 in_channels = pstr_mps_state->num_input_channels;
+
+ if (pstr_mps_state == 0) return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
+
+ pstr_mps_state->num_parameter_sets = 1;
+
+ for (i = 0; i < MAX_OUTPUT_CHANNELS_AT_MPS; i++) {
+ for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
+ *prev_gain_at++ = ONE_IN_Q15;
+ }
+ }
+
+ for (i = 0; i < in_channels; i++) {
+ ixheaacd_ana_filter_bank_init(pstr_mps_state, &(pstr_mps_state->qmf_bank[i]));
+ }
+
+ ixheaacd_syn_filter_bank_create(pstr_mps_state);
+
+ err_code = ixheaacd_set_current_state_parameters(pstr_mps_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ err_code = ixheaacd_set_m2_params(pstr_mps_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ err_code = ixheaacd_mdct2qmf_create(pstr_mps_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ ixheaacd_decorr_init(pstr_mps_state);
+
+ for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
+ WORD32 idec;
+
+ if (up_mix_type == 3) {
+ idec = 0;
+ } else {
+ idec = k;
+ }
+
+ err_code = ixheaacd_decorr_create((pstr_mps_state->ap_decor[k]), pstr_mps_state->hybrid_bands,
+ idec, dec_type, pstr_mps_state->decorr_config,
+ &(pstr_mps_state->ia_mps_dec_mps_table));
+ if (err_code != IA_NO_ERROR) return err_code;
+ }
+
+ err_code = ixheaacd_modules_init(pstr_mps_state);
+
+ return err_code;
+}
+
+VOID ixheaacd_wf_table_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 const **wf = pstr_mps_state->wf_tab.wf;
+ ia_mps_dec_mps_tables_struct *mps_table_ptr = &pstr_mps_state->ia_mps_dec_mps_table;
+
+ wf[0] = NULL;
+ wf[1] = ixheaacd_mps_dec_wf_tables.wf_02;
+ wf[2] = ixheaacd_mps_dec_wf_tables.wf_03;
+ wf[3] = ixheaacd_mps_dec_wf_tables.wf_04;
+ wf[4] = NULL;
+ wf[5] = NULL;
+ wf[6] = NULL;
+ wf[7] = NULL;
+ wf[8] = NULL;
+ wf[9] = NULL;
+ wf[10] = NULL;
+ wf[11] = NULL;
+ wf[12] = NULL;
+ wf[13] = NULL;
+ wf[14] = ixheaacd_mps_dec_wf_tables.wf_15;
+ wf[15] = ixheaacd_mps_dec_wf_tables.wf_16;
+ wf[16] = NULL;
+ wf[17] = ixheaacd_mps_dec_wf_tables.wf_18;
+ wf[18] = NULL;
+ wf[19] = NULL;
+ wf[20] = NULL;
+ wf[21] = NULL;
+ wf[22] = NULL;
+ wf[23] = ixheaacd_mps_dec_wf_tables.wf_24;
+ wf[24] = NULL;
+ wf[25] = NULL;
+ wf[26] = NULL;
+ wf[27] = NULL;
+ wf[28] = NULL;
+ wf[29] = ixheaacd_mps_dec_wf_tables.wf_30;
+ wf[30] = NULL;
+ wf[31] = ixheaacd_mps_dec_wf_tables.wf_32;
+
+ mps_table_ptr->wf_tab_ptr = &(pstr_mps_state->wf_tab);
+}
+
+VOID ixheaacd_res_huff_tables_init(ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ aac_tables_ptr->code_book[0] = 0;
+ aac_tables_ptr->code_book[1] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_1;
+ aac_tables_ptr->code_book[2] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_2;
+ aac_tables_ptr->code_book[3] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_3;
+ aac_tables_ptr->code_book[4] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_4;
+ aac_tables_ptr->code_book[5] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_5;
+ aac_tables_ptr->code_book[6] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_6;
+ aac_tables_ptr->code_book[7] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_7;
+ aac_tables_ptr->code_book[8] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_8;
+ aac_tables_ptr->code_book[9] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_9;
+ aac_tables_ptr->code_book[10] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
+ aac_tables_ptr->code_book[11] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
+ aac_tables_ptr->code_book[12] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
+
+ aac_tables_ptr->scale_factor_bands_short[0] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
+ aac_tables_ptr->scale_factor_bands_short[1] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
+ aac_tables_ptr->scale_factor_bands_short[2] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
+ aac_tables_ptr->scale_factor_bands_short[3] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
+ aac_tables_ptr->scale_factor_bands_short[4] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
+ aac_tables_ptr->scale_factor_bands_short[5] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
+ aac_tables_ptr->scale_factor_bands_short[6] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_128;
+ aac_tables_ptr->scale_factor_bands_short[7] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_128;
+ aac_tables_ptr->scale_factor_bands_short[8] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
+ aac_tables_ptr->scale_factor_bands_short[9] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
+ aac_tables_ptr->scale_factor_bands_short[10] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
+ aac_tables_ptr->scale_factor_bands_short[11] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_128;
+ aac_tables_ptr->scale_factor_bands_short[12] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
+ aac_tables_ptr->scale_factor_bands_short[13] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
+ aac_tables_ptr->scale_factor_bands_short[14] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
+ aac_tables_ptr->scale_factor_bands_short[15] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
+ aac_tables_ptr->scale_factor_bands_short[16] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
+ aac_tables_ptr->scale_factor_bands_short[17] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
+ aac_tables_ptr->scale_factor_bands_short[18] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_120;
+ aac_tables_ptr->scale_factor_bands_short[19] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_120;
+ aac_tables_ptr->scale_factor_bands_short[20] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
+ aac_tables_ptr->scale_factor_bands_short[21] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
+ aac_tables_ptr->scale_factor_bands_short[22] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
+ aac_tables_ptr->scale_factor_bands_short[23] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_120;
+
+ aac_tables_ptr->scale_factor_bands_long[0] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_1024;
+ aac_tables_ptr->scale_factor_bands_long[1] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_1024;
+ aac_tables_ptr->scale_factor_bands_long[2] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_64_1024;
+ aac_tables_ptr->scale_factor_bands_long[3] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_1024;
+ aac_tables_ptr->scale_factor_bands_long[4] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_1024;
+ aac_tables_ptr->scale_factor_bands_long[5] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_32_1024;
+ aac_tables_ptr->scale_factor_bands_long[6] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_1024;
+ aac_tables_ptr->scale_factor_bands_long[7] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_1024;
+ aac_tables_ptr->scale_factor_bands_long[8] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
+ aac_tables_ptr->scale_factor_bands_long[9] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
+ aac_tables_ptr->scale_factor_bands_long[10] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
+ aac_tables_ptr->scale_factor_bands_long[11] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_1024;
+ aac_tables_ptr->scale_factor_bands_long[12] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_960;
+ aac_tables_ptr->scale_factor_bands_long[13] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_960;
+ aac_tables_ptr->scale_factor_bands_long[14] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_64_960;
+ aac_tables_ptr->scale_factor_bands_long[15] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
+ aac_tables_ptr->scale_factor_bands_long[16] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
+ aac_tables_ptr->scale_factor_bands_long[17] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
+ aac_tables_ptr->scale_factor_bands_long[18] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_960;
+ aac_tables_ptr->scale_factor_bands_long[19] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_960;
+ aac_tables_ptr->scale_factor_bands_long[20] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
+ aac_tables_ptr->scale_factor_bands_long[21] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
+ aac_tables_ptr->scale_factor_bands_long[22] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
+ aac_tables_ptr->scale_factor_bands_long[23] =
+ aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_960;
+}
+
+static VOID ixheaacd_table_ptr_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_mps_tables_struct *mps_table_ptr = &pstr_mps_state->ia_mps_dec_mps_table;
+ ia_mps_dec_residual_aac_tables_struct *aac_table_ptr = &pstr_mps_state->aac_table;
+
+ mps_table_ptr->qmf_table_ptr = (ia_mps_dec_qmf_tables_struct *)&ixheaacd_mps_dec_qmf_tables;
+ mps_table_ptr->common_table_ptr =
+ (ia_mps_dec_common_tables_struct *)&ixheaacd_mps_dec_common_tables;
+ mps_table_ptr->hybrid_table_ptr =
+ (ia_mps_dec_hybrid_tables_struct *)&ixheaacd_mps_dec_hybrid_tables;
+ mps_table_ptr->m1_m2_table_ptr =
+ (ia_mps_dec_m1_m2_tables_struct *)&ixheaacd_mps_dec_m1_m2_tables;
+ mps_table_ptr->decor_table_ptr =
+ (ia_mps_dec_decorr_tables_struct *)&ixheaacd_mps_dec_decorr_tables;
+ mps_table_ptr->tp_process_table_ptr =
+ (ia_mps_dec_tp_process_tables_struct *)&ixheaacd_mps_dec_tp_process_tables;
+
+ mps_table_ptr->mdct2qmf_table_ptr =
+ (ia_mps_dec_mdct2qmf_table_struct *)&ixheaacd_mps_dec_mdct2qmf_table;
+
+ mps_table_ptr->tonality_table_ptr =
+ (ia_mps_dec_tonality_tables_struct *)&ixheaacd_mps_dec_tonality_tables;
+
+ mps_table_ptr->bitdec_table_ptr =
+ (ia_mps_dec_bitdec_tables_struct *)&ixheaacd_mps_dec_bitdec_tables;
+ mps_table_ptr->blind_table_ptr =
+ (ia_mps_dec_blind_tables_struct *)&ixheaacd_mps_dec_blind_tables;
+
+ mps_table_ptr->mdct2qmfcos_table_ptr =
+ (ia_mps_dec_mdct2qmf_tables_struct *)&ixheaacd_mps_dec_mdct2qmf_tables;
+ mps_table_ptr->mdct2qmfcos_tab_ptr =
+ (ia_mps_dec_mdct2qmf_cos_table_struct *)&pstr_mps_state->ia_mps_dec_mdct2qmfcos_table;
+ aac_table_ptr->res_huffmann_tables_ptr =
+ (ia_mps_dec_res_huffmann_tables_struct *)&ixheaacd_mps_dec_res_huffmann_tables;
+ aac_table_ptr->res_block_tables_ptr =
+ (ia_mps_dec_res_block_tables_struct *)&ixheaacd_mps_dec_res_block_tables;
+
+ ixheaacd_res_huff_tables_init(aac_table_ptr);
+
+ mps_table_ptr->aac_tab = aac_table_ptr;
+
+ ixheaacd_wf_table_init(pstr_mps_state);
+}
+
+IA_ERRORCODE ixheaacd_aac_mps_init(ia_exhaacplus_dec_api_struct *p_obj_mps_dec, UWORD8 *databuf,
+ WORD32 buffer_size, WORD32 sample_rate) {
+ WORD32 i;
+
+ VOID *buf_ptr;
+ ia_mps_persistent_mem *persistent_mem =
+ &p_obj_mps_dec->p_state_aac->heaac_mps_handle.mps_persistent_mem;
+
+ IA_ERRORCODE err_code = IA_NO_ERROR;
+ ia_heaac_mps_state_struct *curr_state = &p_obj_mps_dec->p_state_aac->heaac_mps_handle;
+ ia_mps_spatial_bs_config_struct *p_bs_config = &curr_state->bs_config;
+ curr_state->ec_flag = p_obj_mps_dec->p_state_aac->ec_enable;
+ ixheaacd_table_ptr_init(curr_state);
+
+ curr_state->ptr_mps_bit_buff =
+ ixheaacd_create_bit_buf(&curr_state->mps_bit_buf, (UWORD8 *)databuf, buffer_size);
+ curr_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
+
+ curr_state->ptr_mps_bit_buff->xaac_jmp_buf = &p_obj_mps_dec->p_state_aac->xaac_jmp_buf;
+
+ if (sample_rate < 27713) {
+ curr_state->qmf_bands = 32;
+ } else if (sample_rate >= 55426) {
+ curr_state->qmf_bands = 128;
+ } else {
+ curr_state->qmf_bands = 64;
+ }
+
+ curr_state->sampling_freq = sample_rate;
+ curr_state->num_input_channels = p_obj_mps_dec->p_state_aac->p_config->ui_n_channels;
+ curr_state->bits_per_sample = p_obj_mps_dec->p_state_aac->p_config->ui_pcm_wdsz;
+ curr_state->dec_type = p_bs_config->ui_dec_type;
+ curr_state->up_mix_type = p_bs_config->ui_upmix_type;
+ curr_state->binaural_quality = p_bs_config->ui_binaural_quality;
+ curr_state->hrtf_model = p_bs_config->ui_hrtf_model;
+ curr_state->is_buried_flag = p_bs_config->ui_bs_is_buried;
+
+ curr_state->bs_frame = persistent_mem->p_bs_frame;
+
+ buf_ptr = persistent_mem->syn_qmf_states_buffer;
+ curr_state->syn = buf_ptr;
+
+ curr_state->syn_qmf_bank.sbr_qmf_states_synthesis =
+ (WORD32 *)((WORD8 *)buf_ptr + sizeof(ia_mps_dec_synthesis_interface));
+
+ buf_ptr = persistent_mem->ana_qmf_states_buffer;
+
+ memset(curr_state->m2_param_present, 0,
+ MAX_M2_OUTPUT * MAX_M2_INPUT * sizeof(curr_state->m2_param_present[0][0]));
+ memset(&(curr_state->bs_config), 0, sizeof(ia_mps_spatial_bs_config_struct));
+ memset(&(curr_state->res_block_type), 0,
+ sizeof(WORD32) * MAX_RESIDUAL_CHANNELS_MPS * MAX_RESIDUAL_FRAMES);
+
+ curr_state->bs_config.ui_pcm_wdsz = 16;
+ curr_state->bs_config.ui_samp_freq = 48000;
+ curr_state->bs_config.ui_in_channels = 2;
+ curr_state->bs_config.ui_qmf_bands = 64;
+
+ err_code = ixheaacd_header_parse(curr_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ for (i = 0; i < curr_state->num_input_channels; i++) {
+ curr_state->qmf_bank[i].qmf_states_buffer = buf_ptr;
+ buf_ptr = (WORD8 *)buf_ptr + QMF_FILTER_STATE_ANA_SIZE_MPS * sizeof(WORD32);
+ }
+
+ curr_state->i_bytes_consumed_mps = (WORD32)(curr_state->ptr_mps_bit_buff->ptr_read_next -
+ curr_state->ptr_mps_bit_buff->ptr_bit_buf_base);
+
+ curr_state->bytes_remaining = buffer_size - curr_state->i_bytes_consumed_mps;
+
+ if (curr_state->bytes_remaining != 0) {
+ for (WORD32 ii = 0; ii < curr_state->bytes_remaining; ii++) {
+ curr_state->temp_buf[ii] = databuf[ii + curr_state->i_bytes_consumed_mps];
+ }
+ }
+
+ err_code = ixheaacd_aac_mps_create(curr_state);
+ if (err_code != IA_NO_ERROR) return err_code;
+
+ curr_state->mps_init_done = 1;
+ curr_state->first_frame = 1;
+
+ return err_code;
+}
diff --git a/decoder/ixheaacd_mps_interface.h b/decoder/ixheaacd_mps_interface.h
index 0ca9892..664c60b 100644
--- a/decoder/ixheaacd_mps_interface.h
+++ b/decoder/ixheaacd_mps_interface.h
@@ -20,15 +20,21 @@
#ifndef IXHEAACD_MPS_INTERFACE_H
#define IXHEAACD_MPS_INTERFACE_H
-WORD32 ixheaacd_mps_create(ia_mps_dec_state_struct* self, WORD32 bs_frame_len,
+#define FIVE_POINT_ONE_CHANNEL_MASK (0x3F)
+#define SEVEN_POINT_ONE_CHANNEL_MASK1 (0xFF)
+#define SEVEN_POINT_ONE_CHANNEL_MASK2 (0x33F)
+
+IA_ERRORCODE ixheaacd_parse_frame(ia_heaac_mps_state_struct *pstr_mps_state);
+
+WORD32 ixheaacd_mps_create(ia_mps_dec_state_struct *self, WORD32 bs_frame_len,
WORD32 residual_coding,
- ia_usac_dec_mps_config_struct* usac_mps_config);
+ ia_usac_dec_mps_config_struct *usac_mps_config);
IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct* self,
WORD32 independency_flag,
- ia_handle_bit_buf_struct it_bit_buff);
+ ia_bit_buf_struct *it_bit_buff);
-WORD32 ixheaacd_mps_apply(ia_mps_dec_state_struct* self, FLOAT32** pointers[4],
+WORD32 ixheaacd_mps_apply(ia_mps_dec_state_struct *self, FLOAT32 **pointers[4],
FLOAT32 (*out_samples)[4096]);
-#endif
+#endif /* IXHEAACD_MPS_INTERFACE_H */
diff --git a/decoder/ixheaacd_mps_m1m2.h b/decoder/ixheaacd_mps_m1m2.h
new file mode 100644
index 0000000..3cceed5
--- /dev/null
+++ b/decoder/ixheaacd_mps_m1m2.h
@@ -0,0 +1,33 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_M1M2_H
+#define IXHEAACD_MPS_M1M2_H
+
+VOID ixheaacd_calc_m1m2(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_mps_apply_m1(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_apply_m2(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_buffer_m1(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_buffer_m2(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_M1M2_H */
diff --git a/decoder/ixheaacd_mps_m1m2_common.c b/decoder/ixheaacd_mps_m1m2_common.c
new file mode 100644
index 0000000..3febb98
--- /dev/null
+++ b/decoder/ixheaacd_mps_m1m2_common.c
@@ -0,0 +1,281 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_calc_m1m2_tree_config.h"
+
+VOID ixheaacd_buffer_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 pb, row, col;
+
+ ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
+ WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
+ WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
+
+ WORD32 *m1_param_real, *m1_param_imag;
+
+ WORD32 *p_m1_param_real, *p_m1_param_re;
+
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 num_v_channels = pstr_mps_state->num_v_channels;
+ WORD32 num_x_channels = pstr_mps_state->num_x_channels;
+ WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
+
+ WORD32 num_parameter_sets_prev;
+
+ pstr_mps_state->num_parameter_sets_prev = pstr_mps_state->num_parameter_sets;
+ num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
+
+ if (m1_param_imag_present) {
+ WORD32 *p_m1_param_imag = &m1_param->m1_param_imag[0][0][0][0];
+ p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
+ for (row = 0; row < num_v_channels; row++) {
+ WORD32 *p_m1_param_im = p_m1_param_imag;
+ p_m1_param_re = p_m1_param_real;
+
+ for (col = 0; col < num_x_channels; col++) {
+ m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
+ m1_param_imag = p_m1_param_im + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
+
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ *m1_param_real_prev++ = *m1_param_real++;
+ *m1_param_imag_prev++ = *m1_param_imag++;
+ }
+ p_m1_param_re += PBXPS;
+ p_m1_param_im += PBXPS;
+ }
+ p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
+ p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
+ }
+ } else {
+ p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
+ for (row = 0; row < num_v_channels; row++) {
+ p_m1_param_re = p_m1_param_real;
+ for (col = 0; col < num_x_channels; col++) {
+ m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
+ for (pb = 0; pb < num_parameter_bands; pb++) *m1_param_real_prev++ = *m1_param_real++;
+
+ p_m1_param_re += PBXPS;
+ }
+ p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
+ }
+ }
+}
+
+VOID ixheaacd_buffer_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
+ WORD32 pb, row, col, col_counter = num_direct_signals + pstr_mps_state->num_decor_signals;
+
+ ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
+ ia_mps_dec_m2_param_struct *m2_param = pstr_mps_state->aux_struct->m2_param;
+
+ WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
+ WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
+
+ WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
+ WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
+
+ WORD32 *m2_decor_real, *m2_decor_imag, *m2_resid_real, *m2_resid_imag;
+ WORD32 idx = -1;
+
+ WORD32 resid_col_counter;
+
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 num_output_channels = pstr_mps_state->num_output_channels;
+ WORD32 num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
+
+ if (pstr_mps_state->residual_coding)
+ resid_col_counter = col_counter;
+ else
+ resid_col_counter = num_direct_signals;
+
+ if (pstr_mps_state->m2_param_imag_present) {
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (pstr_mps_state->m2_param_present[row][col] & 1) {
+ idx++;
+ m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
+
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
+
+ m2_decor_imag = &m2_param->m2_decor_imag[idx][num_parameter_sets_prev - 1][0];
+
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_imag_prev++ = *m2_decor_imag++;
+ }
+ }
+ }
+
+ idx = -1;
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = 0; col < resid_col_counter; col++) {
+ if (pstr_mps_state->m2_param_present[row][col] & 2) {
+ idx++;
+ m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
+
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
+ m2_resid_imag = &m2_param->m2_resid_imag[idx][num_parameter_sets_prev - 1][0];
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_imag_prev++ = *m2_resid_imag++;
+ }
+ }
+ }
+ } else {
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (pstr_mps_state->m2_param_present[row][col] & 1) {
+ idx++;
+ m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
+
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
+ }
+ }
+ }
+
+ idx = -1;
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = 0; col < resid_col_counter; col++) {
+ if (pstr_mps_state->m2_param_present[row][col] & 2) {
+ idx++;
+ m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
+
+ for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
+ }
+ }
+ }
+ }
+}
+
+static VOID ixheaacd_update_alpha(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 alpha;
+
+ WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *arbdmx_alpha = p_aux_struct->arbdmx_alpha;
+
+ WORD32 n_ch_in = pstr_mps_state->num_input_channels;
+ WORD32 ch;
+
+ for (ch = 0; ch < n_ch_in; ch++) {
+ *arbdmx_alpha_prev++ = arbdmx_alpha[ch];
+
+ if (pstr_mps_state->arbitrary_downmix == 2) {
+ alpha = arbdmx_alpha[ch];
+
+ if (p_aux_struct->arbdmx_residual_abs[ch]) {
+ alpha -= POINT_THREE_THREE_Q15;
+
+ if (alpha < 0) alpha = 0;
+ } else {
+ alpha += POINT_THREE_THREE_Q15;
+
+ if (alpha > ONE_IN_Q15) alpha = ONE_IN_Q15;
+ }
+ } else {
+ alpha = ONE_IN_Q15;
+ }
+
+ arbdmx_alpha[ch] = alpha;
+ }
+}
+
+VOID ixheaacd_calc_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 binaural_quality = pstr_mps_state->binaural_quality;
+
+ if (pstr_mps_state->arbitrary_downmix != 0) {
+ ixheaacd_update_alpha(pstr_mps_state);
+ }
+
+ switch (pstr_mps_state->tree_config) {
+ case TREE_5151: {
+ if (up_mix_type == 3) {
+ ixheaacd_calc_m1m2_51s1(pstr_mps_state);
+ } else {
+ ixheaacd_calc_m1m2_5151(pstr_mps_state);
+ }
+ } break;
+ case TREE_5152: {
+ if (up_mix_type == 3) {
+ ixheaacd_calc_m1m2_51s2(pstr_mps_state);
+ } else {
+ ixheaacd_calc_m1m2_5152(pstr_mps_state);
+ }
+ } break;
+ case TREE_525:
+ if (up_mix_type == 1) {
+ ixheaacd_calc_m1m2_emm(pstr_mps_state);
+ } else if (up_mix_type == 2) {
+ if (binaural_quality == 1) {
+ ixheaacd_calc_m1m2_5227(pstr_mps_state);
+ }
+ } else {
+ ixheaacd_calc_m1m2_5251(pstr_mps_state);
+ }
+ break;
+ case TREE_7271:
+ if (up_mix_type == 0) {
+ ixheaacd_calc_m1m2_7271(pstr_mps_state);
+ } else if (up_mix_type == 2) {
+ if (binaural_quality == 1) {
+ ixheaacd_calc_m1m2_5227(pstr_mps_state);
+ }
+ }
+ break;
+ case TREE_7272:
+ if (up_mix_type == 0) {
+ ixheaacd_calc_m1m2_7272(pstr_mps_state);
+ } else if (up_mix_type == 2) {
+ if (binaural_quality == 1) {
+ ixheaacd_calc_m1m2_5227(pstr_mps_state);
+ }
+ }
+ break;
+ case TREE_7571:
+ ixheaacd_calc_m1m2_7571(pstr_mps_state);
+ break;
+ case TREE_7572:
+ ixheaacd_calc_m1m2_7572(pstr_mps_state);
+ break;
+ default:
+ break;
+ };
+
+ return;
+}
diff --git a/decoder/ixheaacd_mps_macro_def.h b/decoder/ixheaacd_mps_macro_def.h
new file mode 100644
index 0000000..1501716
--- /dev/null
+++ b/decoder/ixheaacd_mps_macro_def.h
@@ -0,0 +1,216 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_MACRO_DEF_H
+#define IXHEAACD_MPS_MACRO_DEF_H
+
+#define SQRT_TWO_Q15 (46341)
+#define SQRT_THREE_Q15 (56784)
+
+#define ONE_BY_THREE_Q15 (10923)
+#define TWO_BY_THREE_Q15 (21845)
+#define MINUS_ONE_BY_THREE_Q15 (-10923)
+#define ONE_BY_SQRT_2_Q15 (23170)
+#define ONE_BY_SQRT_8_Q15 (11585)
+#define ONE_BY_FIVE_Q16 (13107)
+#define TWO_PI_IN_Q15 (205887)
+#define MINUS_PI_BY_EIGHT_Q15 (-12868)
+#define TWO_PI_BY_FIFTEEN_Q15 (13726)
+#define THIRTYONE_BY_TWO_IN_Q25 (520093696)
+
+#define MINUS_ONE_IN_Q15 (-32768)
+#define MINUS_ONE_IN_Q14 (-16384)
+#define ONE_IN_Q13 (8192)
+#define ONE_IN_Q14 (16384)
+#define ONE_IN_Q15 (32768)
+#define ONE_IN_Q16 (65536)
+#define ONE_IN_Q30 (1073741824)
+#define FOUR_IN_Q15 (131072)
+#define ONE_BY_SQRT_3_Q15 (18919)
+#define ONE_BY_NINE_Q16 (7282)
+#define MINUS_SQRT_2_Q30 (-1518500250)
+#define THIRTY_IN_Q16 (1966080)
+
+#define ONE_IN_Q28 (268435456)
+
+#define ONE_IN_Q25 (33554432)
+
+#define ONE_FORTYNINE_Q15 (4882432)
+
+#define MINUS_POINT_NINE_EIGHT_Q15 (-32113)
+
+#define MINUS_POINT_NINE_NINE_Q15 (-32440)
+
+#define POINT_THREE_THREE_Q15 (10813)
+
+#define POINT_EIGHT_Q15 (26214)
+
+#define ONE_BY_SQRT_TWO_Q30 (759250125)
+
+#define POINT_FOUR_TWO_Q15 (13763)
+
+#define POINT_ONE_Q15 (3277)
+
+#define POINT_NINE_Q15 (29491)
+
+#define SUM_SIZE (2048)
+
+#define RES_CHXQMFXTSX4 (184320)
+
+#define RES_CHXQMFXTS (46080)
+
+#define NR_QMF_BANDS_LFXTS (216)
+
+#define QMF_BANDSXTSX6 (27648)
+
+#define LOOP_COUNTER (32)
+
+#define MAX_PSXPB (224)
+
+#define SYN_BUFFER_SIZE (18432)
+
+#define QBXTSX2 (9216)
+
+#define PARAMETER_BANDSX2 (56)
+
+#define PARAMETER_BANDSX3 (84)
+
+#define PARAMETER_BANDSX1_5 (42)
+
+#define QMF_BANDSX8 (512)
+
+#define QBXTS (4608)
+
+#define QBXTSX3 (13824)
+
+#define TWO_BY_TWENTYFIVE_Q16 (5243)
+
+#define QBX48 (3072)
+
+#define TSXHB (5112)
+
+#define MAX_TIMESLOTSX2 (144)
+
+#define RESHAPE_OFFSET_1 (18)
+
+#define RESHAPE_OFFSET_2 (54)
+
+#define PB_OFFSET (9)
+
+#define SCRATCH_OFFSET_SMOOTHING (176)
+
+#define MAX_TIME_SLOTSX12 (864)
+
+#define INPUT_CHX2 (12)
+
+#define INPUT_CHX1_5 (9)
+
+#define OUTPUT_CHX1_5 (20)
+
+#define OUTPUT_CHX3 (41)
+
+#define IN_CH_2XOUT_CH (32)
+
+#define IN_CHXBP_SIZE (150)
+
+#define OUT_CHXQB (512)
+
+#define MAX_PARAMETER_BANDS_PLUS_1 (29)
+
+#define PARAMETER_BANDSX52 (1456)
+
+#define PARAMETER_BANDSX16 (448)
+
+#define PARAMETER_BANDSX18 (504)
+
+#define PARAMETER_BANDSX15 (420)
+
+#define PARAMETER_BANDSX32 (896)
+
+#define PARAMETER_BANDSX12 (336)
+
+#define PARAMETER_BANDSX56 (1568)
+
+#define PARAMETER_BANDSX24 (672)
+
+#define PREV_GAINAT (5824)
+
+#define ARBDMX_ALPHA (24)
+
+#define M1_PREV (5376)
+
+#define M2_PREV_RESID (2128)
+
+#define M2_PREV_DECOR (1680)
+
+#define QMF_DELAY_INPUT (7680)
+
+#define ANA_BUF_SIZE (15360)
+
+#define SYN_BUF_SIZE (18432 + sizeof(ia_mps_dec_synthesis_interface))
+
+#define PBXPS (224)
+
+#define MAX_NUM_DEN_LENGTH (21)
+
+#define HYB_FILTER_STATE_SIZE sizeof(ia_mps_dec_thyb_filter_state_struct) * 16
+
+#define TONALITY_STATE_SIZE sizeof(ia_mps_dec_tonality_state_struct)
+
+#define SMOOTHING_STATE_SIZE sizeof(ia_mps_dec_smoothing_state_struct)
+
+#define RESHAPE_STATE_SIZE sizeof(ia_mps_dec_reshape_bb_env_state_struct)
+
+#define SUBBAND_TP_SIZE sizeof(ia_mps_dec_subband_tp_params_struct)
+
+#define BLIND_DECODER_SIZE sizeof(ia_mps_dec_blind_decoder_struct)
+
+#define ARRAY_STRUCT_SIZE sizeof(ia_mps_dec_reuse_array_struct)
+
+#define QMF_RES_BUF_SIZE (368640)
+
+#define QMF_BUF_SIZE (110592)
+
+#define BUF_SIZE (163584)
+
+#define MDCT_RES_BUF_SIZE (327680)
+
+#define PCXQB (320)
+
+#define RFX2XMDCTCOEF (8192)
+
+#define MDCTCOEFX2 (2048)
+
+#define TSXHBX5 (25560)
+
+#define INCHXPBXPS (1344)
+
+#define ONE_BIT_MASK (0x00000001)
+#define TWO_BIT_MASK (0x00000003)
+#define THREE_BIT_MASK (0x00000007)
+#define FOUR_BIT_MASK (0x0000000F)
+#define FIVE_BIT_MASK (0x0000001F)
+#define SIX_BIT_MASK (0x0000003F)
+#define SEVEN_BIT_MASK (0x0000007F)
+#define WORD_LENGTH (32)
+
+#define COS_PI_BY_8 (0x7642)
+#define SIN_PI_BY_8 (0x30fc)
+
+#endif /* IXHEAACD_MPS_MACRO_DEF_H */
diff --git a/decoder/ixheaacd_mps_mdct_2_qmf.c b/decoder/ixheaacd_mps_mdct_2_qmf.c
new file mode 100644
index 0000000..aa7a555
--- /dev/null
+++ b/decoder/ixheaacd_mps_mdct_2_qmf.c
@@ -0,0 +1,1848 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_mdct_2_qmf.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+
+IA_ERRORCODE ixheaacd_mdct2qmf_tables_init(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 time_slots;
+
+ time_slots = pstr_mps_state->upd_qmf;
+
+ if (32 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
+
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
+ } else {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
+
+ if (30 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
+ } else if (24 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
+ } else if (18 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
+ } else if (16 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
+ } else if (15 == time_slots) {
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
+
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
+ pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] =
+ pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
+ } else {
+ if (pstr_mps_state->residual_coding) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS;
+ }
+ }
+
+ return IA_NO_ERROR;
+}
+
+IA_ERRORCODE ixheaacd_mdct2qmf_create(ia_heaac_mps_state_struct *pstr_mps_state) {
+ IA_ERRORCODE error_code = IA_NO_ERROR;
+
+ WORD32 *qmf_residual_real = pstr_mps_state->array_struct->qmf_residual_real_pre;
+ WORD32 *qmf_residual_imag = pstr_mps_state->array_struct->qmf_residual_imag_pre;
+
+ memset(qmf_residual_real, 0, RES_CHXQMFXTSX4);
+ memset(qmf_residual_imag, 0, RES_CHXQMFXTSX4);
+
+ error_code = ixheaacd_mdct2qmf_tables_init(pstr_mps_state);
+
+ return error_code;
+}
+
+static VOID ixheaacd_local_zero(WORD32 const l, WORD32 *const b) {
+ WORD32 i;
+
+ for (i = 0; i < l; i++) {
+ b[i] = 0;
+ }
+}
+
+static VOID ixheaacd_local_fold_out(WORD32 *const s, WORD32 const lv, WORD32 *const w,
+ WORD32 const l_w, WORD32 *const v_main,
+ WORD32 *const v_slave) {
+ WORD32 n;
+ WORD32 i;
+ WORD32 j;
+ WORD32 k;
+
+ WORD32 temp_1;
+
+ WORD32 *w1;
+ WORD32 *w2;
+ WORD32 *w3;
+ WORD32 *w4;
+ WORD32 *ptr1, *ptr2, *ptr3;
+
+ WORD32 m = l_w >> 1;
+ WORD32 l = lv / m;
+ WORD32 m2w = m >> 1;
+ WORD32 m2a = m - m2w;
+
+ for (i = m; i < lv; i += l_w) {
+ for (n = i + l_w; i < n; i++) {
+ s[i] = -s[i];
+ }
+ }
+
+ w1 = &w[-m2a];
+ w2 = &w[m2w];
+ w3 = &w[m2w];
+ w4 = &w[m + m2w];
+
+ for (n = 0, j = 0, k = m; n < l - 1; n++) {
+ for (i = 0; i < m2a; i++, j++, k++) {
+ v_main[k] = ixheaacd_mps_mult32_shr_30(w2[i], s[k]);
+ v_slave[j] = ixheaacd_mps_mult32_shr_30(w4[i], s[k]);
+ }
+
+ for (; i < m; i++, j++, k++) {
+ v_main[j] = ixheaacd_mps_mult32_shr_30(w3[i], s[j]);
+ v_slave[k] = ixheaacd_mps_mult32_shr_30(w1[i], s[j]);
+ }
+ }
+
+ ptr1 = v_main;
+ ptr2 = v_slave + m - 1;
+ ptr3 = s;
+ for (i = 0; i < m2a; i++) {
+ temp_1 = *ptr3++;
+ *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
+ *ptr2-- = ixheaacd_mps_mult32_shr_30(*w4++, temp_1);
+ }
+
+ j = l * m - m2w;
+ k = l * m - m2a - 1;
+ ptr3 = s + l * m - m;
+ ptr1 = v_main + j;
+ ptr2 = v_slave + k;
+
+ w1 += m2a;
+ for (; i < m; i++, j++) {
+ temp_1 = *ptr3++;
+ *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
+ *ptr2-- = ixheaacd_mps_mult32_shr_30(*w1++, temp_1);
+ }
+}
+
+static VOID ixheaacd_local_imdet(
+ WORD32 *x1, WORD32 *x2, WORD32 *const scale1, WORD32 const val, WORD32 *z_real,
+ WORD32 *z_imag, const ia_mps_dec_mdct2qmf_cos_table_struct *ia_mps_dec_mdct2qmfcos_tab,
+ WORD32 is_long, VOID *scratch) {
+ WORD32 lw = val << 1;
+ WORD32 offset = val - (val >> 1);
+
+ WORD32 temp_1, temp3, temp_2;
+ WORD32 *z_real_2, *z_imag_2;
+ WORD32 *px1, *px2, *px3, *px4;
+ const WORD16 *cp, *sp;
+ WORD32 *scale;
+ WORD32 cnt = val + (val >> 1);
+
+ WORD32 k;
+ WORD32 n, j;
+
+ WORD32 l;
+
+ WORD32 *p_sum = scratch;
+ WORD32 *p_diff = (WORD32 *)scratch + SUM_SIZE;
+
+ z_real_2 = z_real + lw;
+ z_imag_2 = z_imag + lw;
+
+ for (l = 0; l < LOOP_COUNTER; l++) {
+ WORD32 *sum = p_sum;
+ WORD32 *diff = p_diff;
+
+ px1 = x1;
+ px2 = x2 + val - 1;
+ px3 = x2 + val;
+ px4 = x1 + 2 * val - 1;
+
+ for (n = 0; n < val; n++) {
+ *sum++ = *px1 + *px2;
+ *sum++ = *px3 + *px4;
+ *diff++ = *px1++ - *px2--;
+ *diff++ = *px3++ - *px4--;
+ }
+
+ scale = scale1;
+ for (k = 0; k < cnt; k++) {
+ if (1 == is_long) {
+ cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
+ sp = cp + val;
+ } else {
+ cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
+ sp = cp + val;
+ }
+
+ sum = p_sum;
+ diff = p_diff;
+
+ temp_1 = *cp++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real = temp_2;
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real_2 = temp_2;
+
+ temp_1 = *--sp;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag = temp_2;
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag_2 = temp_2;
+ for (n = 1; n < val; n++) {
+ temp_1 = *cp++;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real += temp_2;
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real_2 += temp_2;
+
+ temp_1 = *--sp;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag += temp_2;
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag_2 += temp_2;
+ }
+ z_real++;
+ z_imag++;
+ z_real_2++;
+ z_imag_2++;
+ }
+ z_real -= cnt;
+ z_real_2 -= cnt;
+ z_imag -= cnt;
+ z_imag_2 -= cnt;
+
+ for (j = 0; j < (cnt); j++) {
+ *z_real = ixheaacd_mps_mult32_shr_15(*z_real, *scale);
+ z_real++;
+ *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, *scale);
+ z_imag++;
+ *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, *scale);
+ z_real_2++;
+ *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, *scale);
+ scale++;
+ z_imag_2++;
+ }
+
+ for (; k < lw; k++) {
+ if (1 == is_long) {
+ cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
+ sp = cp + val;
+ } else {
+ cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
+ sp = cp + val;
+ }
+
+ sum = p_sum;
+ diff = p_diff;
+
+ temp_1 = *cp++;
+
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real = temp3;
+
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real_2 = temp3;
+
+ temp_1 = *--sp;
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag = temp3;
+
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag_2 = temp3;
+
+ for (n = 1; n < val; n++) {
+ temp_1 = *cp++;
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real += temp3;
+
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
+ sum++;
+ *z_real_2 += temp3;
+
+ temp_1 = *--sp;
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag += temp3;
+
+ temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
+ diff++;
+ *z_imag_2 += temp3;
+ }
+
+ z_real++;
+ z_imag++;
+ z_real_2++;
+ z_imag_2++;
+ }
+ z_real -= offset;
+ z_real_2 -= offset;
+ z_imag -= offset;
+ z_imag_2 -= offset;
+
+ for (j = 0; j < (offset); j++) {
+ temp_1 = (*scale++) * -1;
+ *z_real = ixheaacd_mps_mult32_shr_15(*z_real, temp_1);
+ z_real++;
+ *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, temp_1);
+ z_imag++;
+ *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, temp_1);
+ z_real_2++;
+ *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, temp_1);
+ z_imag_2++;
+ }
+
+ x1 += lw;
+ x2 += lw;
+
+ z_real += lw;
+ z_imag += lw;
+ z_imag_2 += lw;
+ z_real_2 += lw;
+ }
+}
+
+static VOID ixheaacd_local_hybcmdct2qmf(
+ WORD32 *const v_main, WORD32 *const v_slave, WORD32 *const w, WORD32 const lw, WORD32 *z_real,
+ WORD32 *z_imag, const ia_mps_dec_mdct2qmf_cos_table_struct *ia_mps_dec_mdct2qmfcos_tab,
+ VOID *scratch, WORD32 is_long) {
+ WORD32 i, start = 0;
+ WORD32 m = lw >> 1;
+
+ switch (lw) {
+ case TSX2_4:
+ case TSX2_6:
+ case TSX2_30:
+ case TSX2_36:
+ case TSX2_60:
+ start = 1;
+ break;
+
+ case TSX2_8:
+ case TSX2_32:
+ case TSX2_48:
+ case TSX2_64:
+ start = 0;
+ break;
+
+ default:
+ break;
+ }
+
+ ixheaacd_local_imdet(v_slave, v_main, w, m, z_real, z_imag, ia_mps_dec_mdct2qmfcos_tab, is_long,
+ scratch);
+
+ for (i = start; i < (m << 7); i += 2) {
+ z_imag[i] = -(z_imag[i]);
+ }
+
+ return;
+}
+
+static VOID ixheaacd_local_p_zero_ts15(WORD32 *const b, WORD32 *src, WORD32 l) {
+ WORD32 i;
+
+ for (i = 0; i < 15; i++) {
+ b[i] = *src++;
+ }
+ if (l != 15) {
+ src--;
+ for (; i < l; i++) {
+ b[i] = *--src;
+ }
+ }
+}
+
+static VOID ixheaacd_local_p_nonzero(WORD32 *const b, WORD32 *src, WORD32 l) {
+ WORD32 i;
+
+ for (i = 0; i < l; i++) {
+ b[i] = *src--;
+ }
+}
+
+static VOID ixheaacd_local_p_zero(WORD32 *const b, WORD32 *src, WORD32 l, WORD32 upd_qmf) {
+ WORD32 i;
+
+ for (i = 0; i < upd_qmf; i++) {
+ b[i] = *src++;
+ }
+ if (l != upd_qmf) {
+ for (; i < l; i++) {
+ b[i] = *--src;
+ }
+ }
+}
+
+static VOID ixheaacd_local_sin(WORD32 const t, WORD32 const p, WORD32 const l, WORD32 *const b,
+ ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
+ WORD32 *sin_ptr;
+
+ switch (t) {
+ case TS_2:
+ switch (p) {
+ case ZERO:
+ b[0] = 12540;
+ b[1] = 30274;
+ if (l == TSX2_4) {
+ b[2] = b[1];
+ b[3] = b[0];
+ }
+ break;
+ case TS_2:
+ b[0] = 30274;
+ b[1] = 12540;
+ break;
+ default:
+ break;
+ }
+ break;
+ case TS_4:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_4;
+ b[0] = *sin_ptr++;
+ b[1] = *sin_ptr++;
+ b[2] = *sin_ptr++;
+ b[3] = *sin_ptr;
+ if (l == TSX2_8) {
+ b[4] = *sin_ptr--;
+ b[5] = *sin_ptr--;
+ b[6] = *sin_ptr--;
+ b[7] = *sin_ptr;
+ }
+ break;
+ case TS_4:
+ sin_ptr = &(mdct2qmf_tab->local_sin_4[TS_MINUS_ONE_4]);
+ b[0] = *sin_ptr--;
+ b[1] = *sin_ptr--;
+ b[2] = *sin_ptr--;
+ b[3] = *sin_ptr;
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_15:
+ switch (p) {
+ case ZERO:
+ sin_ptr = &(mdct2qmf_tab->local_sin_15[1]);
+ ixheaacd_local_p_zero_ts15(b, sin_ptr, l);
+ break;
+ case UPD_QMF_15:
+ sin_ptr = &(mdct2qmf_tab->local_sin_15[TS_MINUS_ONE_15]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_16:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_16;
+ ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_16);
+ break;
+ case UPD_QMF_16:
+ sin_ptr = &(mdct2qmf_tab->local_sin_16[TS_MINUS_ONE_16]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_18:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_18;
+ ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_18);
+ break;
+ case UPD_QMF_18:
+ sin_ptr = &(mdct2qmf_tab->local_sin_18[TS_MINUS_ONE_18]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_24:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_24;
+ ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_24);
+ break;
+ case UPD_QMF_24:
+ sin_ptr = &(mdct2qmf_tab->local_sin_24[TS_MINUS_ONE_24]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_30:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_30;
+ ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_30);
+ break;
+ case UPD_QMF_30:
+ sin_ptr = &(mdct2qmf_tab->local_sin_30[TS_MINUS_ONE_30]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+ break;
+ default:
+ break;
+ }
+ break;
+ case UPD_QMF_32:
+ switch (p) {
+ case ZERO:
+ sin_ptr = mdct2qmf_tab->local_sin_32;
+ ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_32);
+ break;
+ case UPD_QMF_32:
+ sin_ptr = &(mdct2qmf_tab->local_sin_32[TS_MINUS_ONE_32]);
+ ixheaacd_local_p_nonzero(b, sin_ptr, l);
+
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
+static VOID ixheaacd_local_one(WORD32 const l, WORD32 *const b) {
+ WORD32 i;
+
+ for (i = 0; i < l; i++) {
+ b[i] = ONE_IN_Q15;
+ }
+}
+
+static VOID ixheaacd_local_freq_win(WORD32 const l, WORD32 *const b, const WORD32 **wf) {
+ WORD32 i;
+ WORD32 odd_length = (l & ONE_BIT_MASK);
+ WORD32 temp_1;
+ WORD32 *b_start, *b_end;
+ b_start = b;
+ b_end = b + 2 * l - 1 - odd_length;
+
+ for (i = 0; i < l - odd_length; i++) {
+ temp_1 = wf[l - 1][i];
+ *b_start++ = temp_1;
+ *b_end-- = temp_1;
+ }
+
+ if (odd_length == 1) {
+ *b_start = wf[l - 1][l - 1];
+ *(b_start + l) = 0;
+ }
+}
+
+static VOID ixheaacd_local_mdct_win(WORD32 upd_qmf, WORD32 const window_type, WORD32 *const wf,
+ WORD32 const **wf_tab, WORD32 *const wt,
+ ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
+ WORD32 length = 0;
+ WORD32 length_right = 0;
+ WORD32 length_left = 0;
+ WORD32 length_const1 = 0;
+ WORD32 length_const2 = 0;
+
+ switch (window_type) {
+ case ONLY_LONG_SEQUENCE:
+ length = upd_qmf;
+ ixheaacd_local_sin(upd_qmf, 0, (length << 1), &wt[0], mdct2qmf_tab);
+ break;
+ case LONG_START_SEQUENCE:
+ switch (upd_qmf) {
+ case UPD_QMF_15:
+ length_const1 = 6;
+ length_const2 = 7;
+ length_right = 2;
+ break;
+ case UPD_QMF_16:
+ case UPD_QMF_32:
+ length_const1 = 7 * (upd_qmf >> 4);
+ length_const2 = length_const1;
+ length_right = upd_qmf >> 3;
+ break;
+ case UPD_QMF_18:
+ length_const1 = 8;
+ length_const2 = length_const1;
+ length_right = 2;
+ break;
+ case UPD_QMF_24:
+ length_const1 = 11;
+ length_const2 = length_const1;
+ length_right = 2;
+ break;
+ case UPD_QMF_30:
+ length_const1 = 14;
+ length_const2 = length_const1;
+ length_right = 2;
+ break;
+ default:
+ length_const1 = 6;
+ length_const2 = 7;
+ length_right = 2;
+ break;
+ }
+
+ ixheaacd_local_sin(upd_qmf, 0, upd_qmf, &wt[0], mdct2qmf_tab);
+ ixheaacd_local_one(length_const1, &wt[upd_qmf]);
+ ixheaacd_local_sin(length_right, length_right, length_right, &wt[upd_qmf + length_const1],
+ mdct2qmf_tab);
+
+ ixheaacd_local_zero(length_const2, &wt[upd_qmf + length_const1 + length_right]);
+ length = upd_qmf;
+ break;
+ case EIGHT_SHORT_SEQUENCE:
+ switch (upd_qmf) {
+ case UPD_QMF_16:
+ case UPD_QMF_32:
+ length = upd_qmf >> 3;
+ break;
+ case UPD_QMF_15:
+ case UPD_QMF_18:
+ case UPD_QMF_30:
+ case UPD_QMF_24:
+ length = 2;
+ break;
+ default:
+ break;
+ }
+ ixheaacd_local_sin(length, 0, 2 * length, &wt[0], mdct2qmf_tab);
+ break;
+ case LONG_STOP_SEQUENCE:
+ switch (upd_qmf) {
+ case UPD_QMF_15:
+ length_const1 = 6;
+ length_const2 = 7;
+ length_left = 2;
+ break;
+ case UPD_QMF_16:
+ case UPD_QMF_32:
+ length_const1 = 7 * (upd_qmf >> 4);
+ length_const2 = length_const1;
+ length_left = upd_qmf >> 3;
+ break;
+ case UPD_QMF_18:
+ length_const1 = 8;
+ length_const2 = length_const1;
+ length_left = 2;
+ break;
+ case UPD_QMF_24:
+ length_const1 = 11;
+ length_const2 = length_const1;
+ length_left = 2;
+ break;
+ case UPD_QMF_30:
+ length_const1 = 14;
+ length_const2 = length_const1;
+ length_left = 2;
+ break;
+ default:
+ break;
+ }
+
+ ixheaacd_local_zero(length_const1, &wt[0]);
+ ixheaacd_local_sin(length_left, 0, length_left, &wt[length_const1], mdct2qmf_tab);
+ ixheaacd_local_one(length_const2, &wt[length_const1 + length_left]);
+ ixheaacd_local_sin(upd_qmf, upd_qmf, upd_qmf,
+ &wt[length_const1 + length_left + length_const2], mdct2qmf_tab);
+ length = upd_qmf;
+ break;
+ default:
+ break;
+ }
+
+ ixheaacd_local_freq_win(length, &wf[0], wf_tab);
+
+ if ((upd_qmf == UPD_QMF_15) && (window_type == EIGHT_SHORT_SEQUENCE)) {
+ WORD32 length2 = 3;
+
+ ixheaacd_local_sin(length, 0, length, &wt[(length << 1)], mdct2qmf_tab);
+ ixheaacd_local_one(1, &wt[3 * length]);
+ ixheaacd_local_sin(length, length, length, &wt[3 * length + 1], mdct2qmf_tab);
+ ixheaacd_local_zero(1, &wt[(length << 2) + 1]);
+
+ ixheaacd_local_freq_win(length2, &wf[(length << 1)], wf_tab);
+ }
+ return;
+}
+
+static VOID ixheaacd_get_gain(WORD32 l, WORD32 *gain) {
+ switch (l) {
+ case TSX2_4:
+ *gain = 16384;
+ break;
+
+ case TSX2_6:
+ *gain = 13377;
+ break;
+
+ case TSX2_8:
+ *gain = 11585;
+ break;
+
+ case TSX2_30:
+ *gain = 5982;
+ break;
+
+ case TSX2_32:
+ *gain = 5792;
+ break;
+
+ case TSX2_36:
+ *gain = 5461;
+ break;
+
+ case TSX2_48:
+ *gain = 4729;
+ break;
+
+ case TSX2_60:
+ *gain = 4230;
+ break;
+
+ case TSX2_64:
+ *gain = 4096;
+ break;
+
+ default:
+ break;
+ }
+
+ return;
+}
+
+VOID ixheaacd_mdct2qmf_process(WORD32 upd_qmf, WORD32 *const mdct_in, WORD32 *qmf_real_pre,
+ WORD32 *qmf_real_post, WORD32 *qmf_imag_pre, WORD32 *qmf_imag_post,
+ WORD32 const window_type, WORD32 qmf_global_offset,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
+ VOID *scratch, WORD32 time_slots) {
+ WORD32 i;
+ WORD32 j;
+ WORD32 k;
+
+ WORD32 l = (upd_qmf << 1);
+
+ WORD32 n = 0;
+ WORD32 *wf;
+ WORD32 *wt;
+
+ WORD32 *v1;
+ WORD32 *v2;
+
+ WORD32 *z1_real;
+ WORD32 *z1_imag;
+
+ WORD32 *twipost_real;
+ WORD32 *twipost_imag;
+
+ WORD32 *mdct_sf, *mdct_sf_ptr;
+ WORD32 *mdct_p, *mdct_p2;
+
+ WORD32 temp_2, temp3, temp4;
+
+ WORD32 *p_qmf_real_pre = qmf_real_pre;
+ WORD32 *p_qmf_real_post = qmf_real_post;
+ WORD32 *p_qmf_imag_pre = qmf_imag_pre;
+ WORD32 *p_qmf_imag_post = qmf_imag_post;
+
+ VOID *free_scratch;
+
+ WORD32 const **wf_tab = ia_mps_dec_mps_table_ptr->wf_tab_ptr->wf;
+
+ WORD32 window_offset = 0;
+
+ WORD32 mdct_offset = 0;
+ WORD32 mdct_shift = AAC_SHORT_FRAME_LENGTH;
+
+ WORD32 qmf_offset = 0;
+ WORD32 qmf_shift = 0;
+
+ WORD32 n_windows = 0;
+
+ WORD32 mdct_length = MDCT_LENGTH_LO;
+
+ WORD32 qmf_bands = 64;
+ const WORD32 *ptr1, *ptr2;
+ WORD32 is_long;
+ WORD32 *zr, *zi;
+
+ WORD32 *a, *scale;
+ WORD32 gain = 0;
+ WORD32 *wp;
+
+ wf = scratch;
+ wt = wf + MAX_TIMESLOTSX2;
+ v1 = wt + MAX_TIMESLOTSX2;
+ v2 = v1 + MDCT_LENGTH_HI;
+ twipost_real = v2 + MDCT_LENGTH_HI;
+ twipost_imag = twipost_real + MAX_NUM_QMF_BANDS;
+ mdct_sf = twipost_imag + MAX_NUM_QMF_BANDS;
+ z1_real = mdct_sf + MDCT_LENGTH_SF;
+ z1_imag = z1_real + QBXTSX2;
+ a = z1_imag + QBXTSX2;
+ free_scratch = (VOID *)((WORD32 *)a + MAX_NUM_QMF_BANDS);
+
+ scale = a;
+
+ ixheaacd_local_mdct_win(upd_qmf, window_type, wf, wf_tab, wt,
+ ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr);
+
+ switch (window_type) {
+ case ONLY_LONG_SEQUENCE:
+ case LONG_START_SEQUENCE:
+ case LONG_STOP_SEQUENCE:
+
+ n = upd_qmf * qmf_bands - MDCT_LENGTH_LO;
+
+ if (n > 0) {
+ ixheaacd_local_zero(n, &mdct_in[MDCT_LENGTH_LO]);
+ }
+ mdct_length += n;
+
+ ixheaacd_local_fold_out(mdct_in, mdct_length, wf, l, v1, v2);
+
+ wp = wt;
+
+ ixheaacd_get_gain(l, &gain);
+
+ for (k = 0; k < l; k++) {
+ *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
+ wp++;
+ }
+ ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
+ ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch, 1);
+
+ ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
+ ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
+
+ if (qmf_global_offset < time_slots) {
+ if (qmf_global_offset + l < time_slots) {
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+ for (j = 0; j < l; j++) {
+ temp3 = *z1_real++;
+ temp4 = *z1_imag++;
+
+ temp_2 = j + qmf_global_offset;
+ p_qmf_real_pre[temp_2] += cos_twi * temp3;
+ p_qmf_real_pre[temp_2] -= sin_twi * temp4;
+ p_qmf_imag_pre[temp_2] += cos_twi * temp4;
+ p_qmf_imag_pre[temp_2] += sin_twi * temp3;
+ }
+ p_qmf_real_pre += MAX_TIME_SLOTS;
+ p_qmf_imag_pre += MAX_TIME_SLOTS;
+ }
+ } else {
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+ for (j = 0; j < l; j++) {
+ temp3 = *z1_real++;
+ temp4 = *z1_imag++;
+
+ temp_2 = j + qmf_global_offset;
+ if (temp_2 < time_slots) {
+ p_qmf_real_pre[temp_2] += cos_twi * temp3;
+ p_qmf_real_pre[temp_2] -= sin_twi * temp4;
+ p_qmf_imag_pre[temp_2] += cos_twi * temp4;
+ p_qmf_imag_pre[temp_2] += sin_twi * temp3;
+ } else {
+ p_qmf_real_post[temp_2 - time_slots] += cos_twi * temp3;
+ p_qmf_real_post[temp_2 - time_slots] -= sin_twi * temp4;
+ p_qmf_imag_post[temp_2 - time_slots] += cos_twi * temp4;
+ p_qmf_imag_post[temp_2 - time_slots] += sin_twi * temp3;
+ }
+ }
+ p_qmf_real_pre += MAX_TIME_SLOTS;
+ p_qmf_real_post += MAX_TIME_SLOTS;
+
+ p_qmf_imag_pre += MAX_TIME_SLOTS;
+ p_qmf_imag_post += MAX_TIME_SLOTS;
+ }
+ }
+ } else {
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+ for (j = 0; j < l; j++) {
+ temp3 = *z1_real++;
+ temp4 = *z1_imag++;
+
+ temp_2 = j + qmf_global_offset;
+
+ p_qmf_real_post[temp_2 - time_slots] += cos_twi * temp3;
+ p_qmf_real_post[temp_2 - time_slots] -= sin_twi * temp4;
+ p_qmf_imag_post[temp_2 - time_slots] += cos_twi * temp4;
+ p_qmf_imag_post[temp_2 - time_slots] += sin_twi * temp3;
+ }
+ p_qmf_real_post += MAX_TIME_SLOTS;
+ p_qmf_imag_post += MAX_TIME_SLOTS;
+ }
+ }
+ break;
+ case EIGHT_SHORT_SEQUENCE:
+
+ switch (upd_qmf) {
+ case UPD_QMF_15:
+ l = 4;
+ mdct_length = AAC_SHORT_FRAME_LENGTH;
+ qmf_offset = 6;
+ qmf_shift = 2;
+ n_windows = 7;
+ break;
+ case UPD_QMF_16:
+ case UPD_QMF_32:
+ n = (upd_qmf - UPD_QMF_16) * 8;
+ mdct_length = AAC_SHORT_FRAME_LENGTH + n;
+ l = 2 * (upd_qmf >> 3);
+ qmf_offset = 7 * upd_qmf >> 4;
+ qmf_shift = upd_qmf >> 3;
+ n_windows = 8;
+ break;
+ case UPD_QMF_18:
+ l = 4;
+ mdct_length = AAC_SHORT_FRAME_LENGTH;
+ qmf_offset = 8;
+ qmf_shift = 2;
+ n_windows = 9;
+ break;
+ case UPD_QMF_24:
+ l = 4;
+ mdct_length = AAC_SHORT_FRAME_LENGTH;
+ qmf_offset = 11;
+ qmf_shift = 2;
+ n_windows = 12;
+ break;
+ case UPD_QMF_30:
+ l = 4;
+ mdct_length = AAC_SHORT_FRAME_LENGTH;
+ qmf_offset = 14;
+ qmf_shift = 2;
+ n_windows = 15;
+ break;
+ default:
+ l = 4;
+ mdct_length = AAC_SHORT_FRAME_LENGTH;
+ qmf_offset = 6;
+ qmf_shift = 2;
+ n_windows = 7;
+ break;
+ }
+
+ wp = wt;
+ ixheaacd_get_gain(l, &gain);
+
+ for (k = 0; k < l; k++) {
+ *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
+ wp++;
+ }
+
+ for (k = 0; k < n_windows; k++) {
+ is_long = 0;
+ mdct_sf_ptr = mdct_sf;
+ switch (upd_qmf) {
+ case UPD_QMF_16:
+ case UPD_QMF_32:
+ mdct_p = mdct_in + mdct_offset;
+ for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
+ *mdct_sf_ptr++ = *mdct_p++;
+ }
+
+ ixheaacd_local_zero(n, &mdct_sf[AAC_SHORT_FRAME_LENGTH]);
+ break;
+ case UPD_QMF_15:
+ if (k < n_windows - 1) {
+ mdct_p = mdct_in + mdct_offset;
+ for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
+ *mdct_sf_ptr++ = *mdct_p++;
+ }
+ } else {
+ window_offset = l;
+ l = 6;
+ mdct_length = 192;
+ is_long = 4;
+ gain = 13377;
+ scale = a;
+ wp = wt + window_offset;
+
+ for (k = 0; k < l; k++) {
+ *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
+ wp++;
+ }
+
+ mdct_p = mdct_in + mdct_offset;
+ mdct_p2 = mdct_in + mdct_offset + AAC_SHORT_FRAME_LENGTH;
+
+ for (i = 0, j = 0; i < mdct_length / 2; i++) {
+ *mdct_sf_ptr++ = *mdct_p++;
+ *mdct_sf_ptr++ = *mdct_p2++;
+ }
+ }
+ break;
+ case UPD_QMF_18:
+ case UPD_QMF_24:
+ case UPD_QMF_30:
+
+ mdct_p = mdct_in + mdct_offset;
+ for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
+ *mdct_sf_ptr++ = *mdct_p++;
+ }
+ break;
+ default:
+ break;
+ }
+ ixheaacd_local_fold_out(mdct_sf, mdct_length, &wf[window_offset], l, v1, v2);
+
+ ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
+ ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch,
+ is_long);
+
+ zr = z1_real;
+ zi = z1_imag;
+
+ ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
+ ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
+ temp_2 = qmf_offset + qmf_global_offset;
+
+ if (temp_2 < time_slots) {
+ if ((temp_2 + l) < time_slots) {
+ p_qmf_real_pre = qmf_real_pre;
+ p_qmf_imag_pre = qmf_imag_pre;
+
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+
+ for (j = 0; j < l; j++) {
+ temp3 = *zr++;
+ temp4 = (*zi++);
+
+ p_qmf_real_pre[temp_2 + j] += cos_twi * temp3;
+ p_qmf_real_pre[temp_2 + j] -= sin_twi * temp4;
+ p_qmf_imag_pre[temp_2 + j] += cos_twi * temp4;
+ p_qmf_imag_pre[temp_2 + j] += sin_twi * temp3;
+ }
+ p_qmf_real_pre += MAX_TIME_SLOTS;
+ p_qmf_imag_pre += MAX_TIME_SLOTS;
+ }
+ } else {
+ p_qmf_real_pre = qmf_real_pre;
+ p_qmf_real_post = qmf_real_post;
+ p_qmf_imag_pre = qmf_imag_pre;
+ p_qmf_imag_post = qmf_imag_post;
+
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+
+ for (j = 0; j < l; j++) {
+ temp3 = *zr++;
+ temp4 = (*zi++);
+
+ if ((temp_2 + j) < time_slots) {
+ p_qmf_real_pre[temp_2 + j] += cos_twi * temp3;
+ p_qmf_real_pre[temp_2 + j] -= sin_twi * temp4;
+ p_qmf_imag_pre[temp_2 + j] += cos_twi * temp4;
+ p_qmf_imag_pre[temp_2 + j] += sin_twi * temp3;
+ } else {
+ p_qmf_real_post[temp_2 + j - time_slots] += cos_twi * temp3;
+ p_qmf_real_post[temp_2 + j - time_slots] -= sin_twi * temp4;
+ p_qmf_imag_post[temp_2 + j - time_slots] += cos_twi * temp4;
+ p_qmf_imag_post[temp_2 + j - time_slots] += sin_twi * temp3;
+ }
+ }
+ p_qmf_real_pre += MAX_TIME_SLOTS;
+ p_qmf_imag_pre += MAX_TIME_SLOTS;
+
+ p_qmf_real_post += MAX_TIME_SLOTS;
+ p_qmf_imag_post += MAX_TIME_SLOTS;
+ }
+ }
+ } else {
+ p_qmf_real_post = qmf_real_post;
+ p_qmf_imag_post = qmf_imag_post;
+
+ for (i = 0; i < qmf_bands; i++) {
+ WORD32 cos_twi = *ptr1++;
+ WORD32 sin_twi = *ptr2++;
+
+ for (j = 0; j < l; j++) {
+ temp3 = *zr++;
+ temp4 = (*zi++);
+ {
+ p_qmf_real_post[temp_2 + j - time_slots] += cos_twi * temp3;
+ p_qmf_real_post[temp_2 + j - time_slots] -= sin_twi * temp4;
+ p_qmf_imag_post[temp_2 + j - time_slots] += cos_twi * temp4;
+ p_qmf_imag_post[temp_2 + j - time_slots] += sin_twi * temp3;
+ }
+ }
+ p_qmf_real_post += MAX_TIME_SLOTS;
+ p_qmf_imag_post += MAX_TIME_SLOTS;
+ }
+ }
+
+ mdct_offset += mdct_shift;
+ qmf_offset += qmf_shift;
+ }
+ break;
+ default:
+ break;
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_mdct_2_qmf.h b/decoder/ixheaacd_mps_mdct_2_qmf.h
new file mode 100644
index 0000000..fb602ab
--- /dev/null
+++ b/decoder/ixheaacd_mps_mdct_2_qmf.h
@@ -0,0 +1,65 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_MDCT_2_QMF_H
+#define IXHEAACD_MPS_MDCT_2_QMF_H
+
+#define AAC_FRAME_LENGTH (1024)
+#define AAC_SHORT_FRAME_LENGTH (128)
+
+#define MDCT_LENGTH_LO (AAC_FRAME_LENGTH)
+#define MDCT_LENGTH_HI (AAC_FRAME_LENGTH << 1)
+#define MDCT_LENGTH_SF (3 * AAC_SHORT_FRAME_LENGTH)
+
+#define UPD_QMF_15 (15)
+#define UPD_QMF_16 (16)
+#define UPD_QMF_18 (18)
+#define UPD_QMF_24 (24)
+#define UPD_QMF_30 (30)
+#define UPD_QMF_32 (32)
+
+#define TSX2_4 (4)
+#define TSX2_6 (6)
+#define TSX2_8 (8)
+#define TSX2_30 (30)
+#define TSX2_32 (32)
+#define TSX2_36 (36)
+#define TSX2_48 (48)
+#define TSX2_60 (60)
+#define TSX2_64 (64)
+#define TS_2 (2)
+#define TS_4 (4)
+#define TS_MINUS_ONE_4 (3)
+#define TS_MINUS_ONE_15 (14)
+#define TS_MINUS_ONE_16 (15)
+#define TS_MINUS_ONE_18 (17)
+#define TS_MINUS_ONE_24 (23)
+#define TS_MINUS_ONE_30 (29)
+#define TS_MINUS_ONE_32 (31)
+#define ZERO (0)
+
+IA_ERRORCODE ixheaacd_mdct2qmf_create(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_mdct2qmf_process(WORD32 upd_qmf, WORD32 *const mdct_in, WORD32 *qmf_real_pre,
+ WORD32 *qmf_real_post, WORD32 *qmf_imag_pre, WORD32 *qmf_imag_post,
+ WORD32 const window_type, WORD32 qmf_global_offset,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
+ VOID *scratch, WORD32 time_slots);
+
+#endif /* IXHEAACD_MPS_MDCT_2_QMF_H */
diff --git a/decoder/ixheaacd_mps_nlc_dec.h b/decoder/ixheaacd_mps_nlc_dec.h
index 65b02b6..786c6a3 100644
--- a/decoder/ixheaacd_mps_nlc_dec.h
+++ b/decoder/ixheaacd_mps_nlc_dec.h
@@ -23,6 +23,7 @@
#define CLD (0)
#define ICC (1)
#define IPD (2)
+#define CPC (3)
#define BACKWARDS (0)
#define FORWARDS (1)
@@ -42,19 +43,19 @@
#define PCM_PLT 0x2
#define MAXPARAM MAX_NUM_PARAMS
-#define MAXSETS MAX_PARAMETER_SETS
#define MAXBANDS MAX_PARAMETER_BANDS
#define ia_huff_node_struct const WORD32(*)[][2]
-WORD32 ixheaacd_mps_ecdatapairdec(ia_handle_bit_buf_struct strm,
- WORD32 aa_out_data[][MAXBANDS],
- WORD32 a_history[MAXBANDS], WORD32 data_type,
- WORD32 set_idx, WORD32 data_bands,
- WORD32 pair_flag, WORD32 coarse_flag,
- WORD32 independency_flag, WORD32 ldmps_flag);
+WORD32 ixheaacd_mps_ecdatapairdec(ia_bit_buf_struct *it_bit_buf, WORD32 aa_out_data[][MAXBANDS],
+ WORD32 a_history[MAXBANDS], WORD32 data_type, WORD32 set_idx,
+ WORD32 start_band, WORD32 data_bands, WORD32 pair_flag,
+ WORD32 coarse_flag, WORD32 independency_flag, WORD32 ldmps_flag,
+ WORD32 heaac_mps_present, WORD32 ec_flag);
-VOID ixheaacd_mps_huff_decode(ia_handle_bit_buf_struct strm, WORD32 *out_data,
+VOID ixheaacd_mps_huff_decode(ia_bit_buf_struct *it_bit_buf, WORD32 *out_data,
WORD32 num_val);
-#endif
+enum { LAV_3 = 3, LAV_5 = 5, LAV_6 = 6, LAV_7 = 7, LAV_9 = 9, LAV_12 = 12 };
+
+#endif /* IXHEAACD_MPS_NLC_DEC_H */
diff --git a/decoder/ixheaacd_mps_parse.c b/decoder/ixheaacd_mps_parse.c
index 7f1f8e8..6b41088 100644
--- a/decoder/ixheaacd_mps_parse.c
+++ b/decoder/ixheaacd_mps_parse.c
@@ -18,15 +18,9 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include <math.h>
-#include <assert.h>
-#include <stdio.h>
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -37,20 +31,15 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_audioobjtypes.h"
-
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_defines.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
#include "ixheaacd_mps_nlc_dec.h"
-#include "ixheaacd_mps_hybfilter.h"
-#include "ixheaacd_error_standards.h"
-
#include "ixheaacd_error_standards.h"
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
static const WORD32 ixheaacd_freq_res_table[] = {0, 28, 20, 14, 10, 7, 5, 4};
static const WORD32 ixheaacd_freq_res_table_ld[] = {0, 23, 15, 12, 9, 7, 5, 4};
@@ -101,73 +90,56 @@ const WORD32
26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_4_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_4_map[MAX_HYBRID_BANDS_MPS] =
{0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3};
+ 3, 3, 3, 3, 3};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_5_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_5_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4};
+ 4, 4, 4, 4, 4};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_7_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_7_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
+ 6, 6, 6, 6, 6};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_9_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_9_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
+ 8, 8, 8, 8, 8};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_12_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_12_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8,
8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11};
+ 11, 11, 11, 11, 11, 11, 11};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_15_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_15_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 10, 10, 11, 11,
11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14};
+ 14, 14, 14, 14, 14, 14, 14};
const WORD32
- ixheaacd_hybrid_band_64_to_processing_band_23_map[MAX_HYBRID_BANDS_MPS_LD] =
+ ixheaacd_hybrid_band_64_to_processing_band_23_map[MAX_HYBRID_BANDS_MPS] =
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 13, 13,
14, 14, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19,
19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22};
+ 22, 22, 22, 22, 22, 22, 22};
static const FLOAT32 ixheaacd_mps_clip_gain_table[] = {
1.000000f, 1.189207f, 1.414213f, 1.681792f,
@@ -204,29 +176,30 @@ static WORD32 bound_check(WORD32 var, WORD32 lower_bound, WORD32 upper_bound) {
return var;
}
-static VOID ixheaacd_longmult1(unsigned short a[], unsigned short b,
- unsigned short d[], int len) {
- int k;
+static VOID ixheaacd_longmult1(UWORD16 a[], UWORD16 b,
+ UWORD16 d[], WORD32 len) {
+ WORD32 k;
UWORD32 tmp;
UWORD32 b0 = (UWORD32)b;
tmp = ((UWORD32)a[0]) * b0;
- d[0] = (unsigned short)tmp;
+ d[0] = (UWORD16)tmp;
for (k = 1; k < len; k++) {
tmp = (tmp >> 16) + ((UWORD32)a[k]) * b0;
- d[k] = (unsigned short)tmp;
+ d[k] = (UWORD16)tmp;
}
}
-static VOID ixheaacd_longdiv(unsigned short b[], unsigned short a,
- unsigned short d[], unsigned short *pr, int len) {
+static VOID ixheaacd_longdiv(UWORD16 b[], UWORD16 a,
+ UWORD16 d[], UWORD16 *pr, WORD32 len) {
UWORD32 r;
UWORD32 tmp;
UWORD32 temp;
- int k;
+ WORD32 k;
- assert(a != 0);
+ if (a == 0)
+ return;
r = 0;
@@ -234,41 +207,44 @@ static VOID ixheaacd_longdiv(unsigned short b[], unsigned short a,
tmp = ((UWORD32)b[k]) + (r << 16);
if (tmp) {
- d[k] = (unsigned short)(tmp / a);
+ d[k] = (UWORD16)(tmp / a);
temp = d[k] * a;
r = tmp - temp;
} else {
d[k] = 0;
}
}
- *pr = (unsigned short)r;
+ *pr = (UWORD16)r;
}
-static VOID ixheaacd_longsub(unsigned short a[], unsigned short b[], int lena,
- int lenb) {
- int h;
+static VOID ixheaacd_longsub(UWORD16 a[], UWORD16 b[], WORD32 lena,
+ WORD32 lenb) {
+ WORD32 h;
WORD32 carry = 0;
- assert(lena >= lenb);
+ if (lenb > lena)
+ return;
+
for (h = 0; h < lenb; h++) {
carry = carry + (WORD32)(a[h] - b[h]);
- a[h] = (unsigned short)carry;
+ a[h] = (UWORD16)carry;
carry = carry >> 16;
}
for (; h < lena; h++) {
carry = ((UWORD32)a[h]) + carry;
- a[h] = (unsigned short)carry;
+ a[h] = (UWORD16)carry;
carry = carry >> 16;
}
- assert(carry == 0);
+ if (carry != 0)
+ return;
return;
}
-static int ixheaacd_longcompare(unsigned short a[], unsigned short b[],
- int len) {
- int i;
+static WORD32 ixheaacd_longcompare(UWORD16 a[], UWORD16 b[],
+ WORD32 len) {
+ WORD32 i;
for (i = len - 1; i > 0; i--) {
if (a[i] != b[i]) break;
@@ -276,9 +252,9 @@ static int ixheaacd_longcompare(unsigned short a[], unsigned short b[],
return (a[i] >= b[i]) ? 1 : 0;
}
-static VOID ixheaacd_mps_coarse2fine(int *data, WORD32 data_type,
- int band_start, int ixheaacd_num_bands) {
- int i;
+static VOID ixheaacd_mps_coarse2fine(WORD32 *data, WORD32 data_type,
+ WORD32 band_start, WORD32 ixheaacd_num_bands) {
+ WORD32 i;
for (i = band_start; i < band_start + ixheaacd_num_bands; i++) {
data[i] <<= 1;
@@ -294,17 +270,17 @@ static VOID ixheaacd_mps_coarse2fine(int *data, WORD32 data_type,
}
}
-static VOID ixheaacd_mps_fine2coarse(int *data, int ixheaacd_num_bands) {
- int i;
+static VOID ixheaacd_mps_fine2coarse(WORD32 *data, WORD32 ixheaacd_num_bands) {
+ WORD32 i;
for (i = 0; i < ixheaacd_num_bands; i++) {
data[i] /= 2;
}
}
-static int ixheaacd_mps_getstridemap(int freq_res_stride, int band_start,
- int band_stop, int *strides) {
- int i, pb, ch_fac, data_bands, start_offset;
+static WORD32 ixheaacd_mps_getstridemap(WORD32 freq_res_stride, WORD32 band_start,
+ WORD32 band_stop, WORD32 *strides) {
+ WORD32 i, pb, ch_fac, data_bands, start_offset;
ch_fac = ixheaacd_mps_stride_table[freq_res_stride];
data_bands = (band_stop - band_start - 1) / ch_fac + 1;
@@ -329,15 +305,15 @@ static int ixheaacd_mps_getstridemap(int freq_res_stride, int band_start,
}
static IA_ERRORCODE ixheaacd_mps_ecdata_decoding(
- ia_mps_dec_state_struct *self, ia_handle_bit_buf_struct bitstream,
- int data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS], int datatype) {
- int i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
- int strides[MAX_PARAMETER_BANDS + 1] = {0};
- int band_stop = 0;
+ ia_mps_dec_state_struct *self, ia_bit_buf_struct *bitstream,
+ WORD32 data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS], WORD32 datatype) {
+ WORD32 i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
+ WORD32 strides[MAX_PARAMETER_BANDS + 1] = {0};
+ WORD32 band_stop = 0;
- int *lastdata = NULL;
+ WORD32 *lastdata = NULL;
ia_mps_data_struct *frame_xxx_data = NULL;
- int default_val = 0;
+ WORD32 default_val = 0;
IA_ERRORCODE err = IA_NO_ERROR;
ia_mps_bs_frame *frame = &(self->bs_frame);
@@ -405,9 +381,9 @@ static IA_ERRORCODE ixheaacd_mps_ecdata_decoding(
}
err = ixheaacd_mps_ecdatapairdec(
- bitstream, data, lastdata, datatype, set_index, data_bands,
- bs_data_pair, frame_xxx_data->bs_quant_coarse_xxx[set_index],
- !(frame->independency_flag && (i == 0)) || (set_index > 0), 0);
+ bitstream, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
+ frame_xxx_data->bs_quant_coarse_xxx[set_index],
+ !(frame->independency_flag && (i == 0)) || (set_index > 0), 0, 0, self->ec_flag);
if (err) return err;
for (pb = 0; pb < data_bands; pb++) {
@@ -440,13 +416,13 @@ static IA_ERRORCODE ixheaacd_mps_ecdata_decoding(
}
IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct *self,
- int usac_independency_flag,
- ia_handle_bit_buf_struct bitstream) {
- int i, bs_frame_type, data_bands, bs_temp_shape_enable, num_of_temp_shape_ch;
- int ps, pg, ts, pb;
- int env_shape_data[MAX_TIME_SLOTS];
+ WORD32 usac_independency_flag,
+ ia_bit_buf_struct *bitstream) {
+ WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable, num_of_temp_shape_ch;
+ WORD32 ps, pg, ts, pb;
+ WORD32 env_shape_data[MAX_TIME_SLOTS];
- int bits_param_slot = 0;
+ WORD32 bits_param_slot = 0;
ia_mps_bs_frame *frame = &(self->bs_frame);
IA_ERRORCODE err = IA_NO_ERROR;
@@ -575,8 +551,8 @@ IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct *self,
ixheaacd_mps_huff_decode(bitstream, env_shape_data,
self->time_slots);
for (ts = 0; ts < self->time_slots; ts++) {
- self->env_shape_data[i][ts] = (float)pow(
- 2, (float)env_shape_data[ts] /
+ self->env_shape_data[i][ts] = (FLOAT32)pow(
+ 2, (FLOAT32)env_shape_data[ts] /
(self->config->bs_env_quant_mode + 2) -
1);
}
@@ -584,26 +560,26 @@ IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct *self,
}
break;
default:
- assert(0);
+ return -1;
}
}
}
if (self->bs_tsd_enable) {
- unsigned short s[4];
+ UWORD16 s[4];
UWORD64 s_64;
- unsigned short c[5];
+ UWORD16 c[5];
UWORD64 c_64;
- unsigned short b;
- unsigned short r[1];
- static const unsigned short table_64[] = {
+ UWORD16 b;
+ UWORD16 r[1];
+ static const UWORD16 table_64[] = {
6, 11, 16, 20, 23, 27, 30, 33, 35, 38, 40, 42, 44, 46, 48, 49,
51, 52, 53, 55, 56, 57, 58, 58, 59, 60, 60, 60, 61, 61, 61, 61};
- static const unsigned short table_32[] = {5, 9, 13, 16, 18, 20, 22, 24,
+ static const UWORD16 table_32[] = {5, 9, 13, 16, 18, 20, 22, 24,
25, 26, 27, 28, 29, 29, 30, 30};
unsigned const short *tab = NULL;
- int k;
- unsigned short h;
+ WORD32 k;
+ UWORD16 h;
WORD32 nbits_tr_slots = 0;
if (self->time_slots == 32) {
@@ -657,7 +633,7 @@ IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct *self,
}
{
- int p = self->tsd_num_tr_slots;
+ WORD32 p = self->tsd_num_tr_slots;
for (i = 0; i < self->time_slots; i++) self->bs_tsd_sep_data[i] = 0;
@@ -699,7 +675,7 @@ IA_ERRORCODE ixheaacd_mps_frame_parsing(ia_mps_dec_state_struct *self,
}
static VOID ixheaacd_ld_mps_ecdata_decoding(
- ia_mps_dec_state_struct *self, ia_handle_bit_buf_struct it_bit_buff,
+ ia_mps_dec_state_struct *self, ia_bit_buf_struct *it_bit_buff,
WORD32 data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS], WORD32 datatype,
WORD32 start_band) {
WORD32 i, j, pb, data_set, set_index, bs_data_pair, data_bands,
@@ -779,9 +755,9 @@ static VOID ixheaacd_ld_mps_ecdata_decoding(
}
ixheaacd_mps_ecdatapairdec(
- it_bit_buff, data, lastdata, datatype, set_index, data_bands,
- bs_data_pair, frame_xxx_data->bs_quant_coarse_xxx[set_index],
- !(frame->independency_flag && (i == 0)) || (set_index > 0), 1);
+ it_bit_buff, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
+ frame_xxx_data->bs_quant_coarse_xxx[set_index],
+ !(frame->independency_flag && (i == 0)) || (set_index > 0), 1, 0, self->ec_flag);
for (pb = 0; pb < data_bands; pb++) {
for (j = strides[pb]; j < strides[pb + 1]; j++) {
@@ -812,7 +788,7 @@ static VOID ixheaacd_ld_mps_ecdata_decoding(
}
IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
- ia_mps_dec_state_struct *self, ia_handle_bit_buf_struct it_bit_buff) {
+ ia_mps_dec_state_struct *self, ia_bit_buf_struct *it_bit_buff) {
WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable,
num_of_temp_shape_ch;
WORD32 ps, pg, ts, ic;
@@ -909,8 +885,8 @@ IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
ixheaacd_mps_huff_decode(it_bit_buff, env_shape_data,
self->time_slots);
for (ts = 0; ts < self->time_slots; ts++) {
- self->env_shape_data[i][ts] = (float)pow(
- 2, (float)env_shape_data[ts] /
+ self->env_shape_data[i][ts] = (FLOAT32)pow(
+ 2, (FLOAT32)env_shape_data[ts] /
(self->ldmps_config.bs_env_quant_mode + 2) -
1);
}
@@ -918,8 +894,11 @@ IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
}
break;
default:
+ if (self->ec_flag == 0) {
return IA_FATAL_ERROR;
}
+ break;
+ }
}
}
@@ -933,17 +912,17 @@ IA_ERRORCODE ixheaacd_ld_mps_frame_parsing(
ixheaacd_byte_align(it_bit_buff, &alignment);
while (it_bit_buff->cnt_bits > 8) {
- ixheaacd_read_bits_buf(it_bit_buff, 8);/*discard*/
+ ixheaacd_read_bits_buf(it_bit_buff, 8);
}
- ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);/*discard*/
+ ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
return IA_NO_ERROR;
}
-static VOID ixheaacd_mps_createmapping(int map[MAX_PARAMETER_BANDS + 1],
- int band_start, int band_stop,
- int ch_fac) {
- int input_bands, out_bands, bands_achived, bands_diff, incr, k, i;
- int vdk[MAX_PARAMETER_BANDS + 1];
+static VOID ixheaacd_mps_createmapping(WORD32 map[MAX_PARAMETER_BANDS + 1],
+ WORD32 band_start, WORD32 band_stop,
+ WORD32 ch_fac) {
+ WORD32 input_bands, out_bands, bands_achived, bands_diff, incr, k, i;
+ WORD32 vdk[MAX_PARAMETER_BANDS + 1];
input_bands = band_stop - band_start;
out_bands = (input_bands - 1) / ch_fac + 1;
if (out_bands < 1) {
@@ -982,10 +961,10 @@ static VOID ixheaacd_mps_createmapping(int map[MAX_PARAMETER_BANDS + 1],
}
}
-static VOID ixheaacd_mps_mapfrequency(int *in, int *out, int *map,
- int data_bands) {
- int i, j, band_start, band_stop, value;
- int start_band_0 = map[0];
+static VOID ixheaacd_mps_mapfrequency(WORD32 *in, WORD32 *out, WORD32 *map,
+ WORD32 data_bands) {
+ WORD32 i, j, band_start, band_stop, value;
+ WORD32 start_band_0 = map[0];
for (i = 0; i < data_bands; i++) {
value = in[i + start_band_0];
@@ -998,7 +977,7 @@ static VOID ixheaacd_mps_mapfrequency(int *in, int *out, int *map,
}
}
-static float ixheaacd_mps_de_quantize(int value, int param_type) {
+static FLOAT32 ixheaacd_mps_de_quantize(WORD32 value, WORD32 param_type) {
switch (param_type) {
case CLD:
return ixheaacd_cld_de_quant_table[(value + 15)];
@@ -1010,31 +989,31 @@ static float ixheaacd_mps_de_quantize(int value, int param_type) {
return ixheaacd_ipd_de_quant_table[(value & 15)];
default:
- assert(0);
- return 0.0;
+ return 0;
+ return 0;
}
}
static IA_ERRORCODE ixheaacd_mps_mapindexdata(
ia_mps_dec_state_struct *self, ia_mps_data_struct *frame_xxx_data,
- float out_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
- int out_idx_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
- int cmp_idx_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
- int idx_prev[MAX_PARAMETER_BANDS], int param_type) {
- int interpolate_local[MAX_PARAMETER_SETS_MPS] = {0};
- int map[MAX_PARAMETER_BANDS + 1];
-
- int set_index, i, band, parm_slot;
- int data_bands, ch_fac;
- int ps;
-
- int i1, i2, x1, xi, x2;
- int band_start = 0;
- int ext_frame_flag = self->ext_frame_flag;
- int *param_slots = self->param_slots;
- int num_parameter_sets = self->num_parameter_sets;
- int band_stop = self->bs_param_bands;
- int default_val = 0;
+ FLOAT32 out_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
+ WORD32 out_idx_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
+ WORD32 cmp_idx_data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS],
+ WORD32 idx_prev[MAX_PARAMETER_BANDS], WORD32 param_type) {
+ WORD32 interpolate_local[MAX_PARAMETER_SETS_MPS] = {0};
+ WORD32 map[MAX_PARAMETER_BANDS + 1];
+
+ WORD32 set_index, i, band, parm_slot;
+ WORD32 data_bands, ch_fac;
+ WORD32 ps;
+
+ WORD32 i1, i2, x1, xi, x2;
+ WORD32 band_start = 0;
+ WORD32 ext_frame_flag = self->ext_frame_flag;
+ WORD32 *param_slots = self->param_slots;
+ WORD32 num_parameter_sets = self->num_parameter_sets;
+ WORD32 band_stop = self->bs_param_bands;
+ WORD32 default_val = 0;
set_index = 0;
@@ -1122,9 +1101,14 @@ static IA_ERRORCODE ixheaacd_mps_mapindexdata(
x2 = param_slots[i2];
if (interpolate_local[i] == 1) {
- if (i2 < num_parameter_sets) return IA_FATAL_ERROR;
+ if (i2 < num_parameter_sets) {
+ if (self->ec_flag == 0) {
+ return IA_FATAL_ERROR;
+ }
+ }
+
for (band = band_start; band < band_stop; band++) {
- int yi, y1, y2;
+ WORD32 yi, y1, y2;
yi = 0;
y1 = out_idx_data[i1][band];
y2 = out_idx_data[i2][band];
@@ -1147,7 +1131,7 @@ static IA_ERRORCODE ixheaacd_mps_mapindexdata(
for (band = band_start; band < band_stop; band++) {
if (param_type == CLD) {
out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], -15, 15);
- } else if (param_type == ICC) // param_type is ICC
+ } else if (param_type == ICC)
{
out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], 0, 7);
}
@@ -1194,7 +1178,7 @@ static IA_ERRORCODE ixheaacd_mps_dec_and_mapframeott(
}
static VOID ixheaacd_mps_dec_and_mapframesmg(ia_mps_dec_state_struct *self) {
- int ps, pb, pg, ch_fac, data_bands, param_band_start, param_band_stop,
+ WORD32 ps, pb, pg, ch_fac, data_bands, param_band_start, param_band_stop,
group_to_band[MAX_PARAMETER_BANDS + 1];
ia_mps_bs_frame *frame = &(self->bs_frame);
for (ps = 0; ps < self->num_parameter_sets; ps++) {
@@ -1280,7 +1264,7 @@ static VOID ixheaacd_mps_dec_and_mapframesmg(ia_mps_dec_state_struct *self) {
}
IA_ERRORCODE ixheaacd_mps_frame_decode(ia_mps_dec_state_struct *self) {
- int i;
+ WORD32 i;
IA_ERRORCODE err_code = 0;
if (self->ldmps_config.ldmps_present_flag != 1)
if (self->parse_nxt_frame == 1) return err_code;
@@ -1298,14 +1282,29 @@ IA_ERRORCODE ixheaacd_mps_frame_decode(ia_mps_dec_state_struct *self) {
self->param_slots[self->num_parameter_sets - 1] = self->time_slots - 1;
}
self->param_slot_diff[0] = self->param_slots[0] + 1;
- self->inv_param_slot_diff[0] = (float)1 / self->param_slot_diff[0];
+ if (MAX_TIME_SLOTS < (self->param_slot_diff[0])) {
+ if (self->ec_flag == 0) {
+ return -1;
+ } else {
+ self->param_slot_diff[0] = MAX_TIME_SLOTS;
+ }
+ }
+ self->inv_param_slot_diff[0] = (FLOAT32)1 / self->param_slot_diff[0];
self->inv_param_slot_diff_Q30[0] =
- (int)floor(self->inv_param_slot_diff[0] * 1073741824 + 0.5);
+ (WORD32)floor(self->inv_param_slot_diff[0] * 1073741824 + 0.5);
for (i = 1; i < self->num_parameter_sets; i++) {
self->param_slot_diff[i] = self->param_slots[i] - self->param_slots[i - 1];
- self->inv_param_slot_diff[i] = (float)1 / self->param_slot_diff[i];
+ if (MAX_TIME_SLOTS < (self->param_slot_diff[0] + self->param_slot_diff[i])) {
+ if (self->ec_flag == 0) {
+ return -1;
+ } else {
+ self->param_slot_diff[i] = 1;
+ self->inv_param_slot_diff[i] = 1;
+ }
+ }
+ self->inv_param_slot_diff[i] = (FLOAT32)1 / self->param_slot_diff[i];
self->inv_param_slot_diff_Q30[i] =
- (int)floor(self->inv_param_slot_diff[i] * 1073741824 + 0.5);
+ (WORD32)floor(self->inv_param_slot_diff[i] * 1073741824 + 0.5);
}
return IA_NO_ERROR;
}
@@ -1456,7 +1455,7 @@ WORD32 ixheaacd_mps_header_decode(ia_mps_dec_state_struct *self) {
self->num_bands_ipd = 10;
break;
default:
- assert(0);
+ return -1;
break;
}
}
diff --git a/decoder/ixheaacd_mps_poly_filt.c b/decoder/ixheaacd_mps_poly_filt.c
index e6f8ad8..c1db952 100644
--- a/decoder/ixheaacd_mps_poly_filt.c
+++ b/decoder/ixheaacd_mps_poly_filt.c
@@ -18,17 +18,10 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_bitbuffer.h"
#include "ixheaacd_interface.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -39,13 +32,10 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_type_def.h"
-#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_config.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-#include "ixheaacd_constants.h"
-#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_function_selector.h"
extern const FLOAT32
@@ -59,13 +49,9 @@ extern const FLOAT32 ixheaacd_ldmps_pre_twid[32];
extern const FLOAT32 ixheaacd_mps_post_re_32[64];
extern const FLOAT32 ixheaacd_mps_post_im_32[64];
-VOID ixheaacd_mps_synt_create(ia_mps_poly_phase_struct *kernel,
- WORD32 resolution) {
- kernel->resolution = resolution;
-}
-VOID ixheaacd_mps_synt_init(ia_mps_poly_phase_synth_struct *self) {
- memset(self->state, 0, sizeof(FLOAT32) * POLY_PHASE_SYNTH_SIZE);
+VOID ixheaacd_mps_synt_init(FLOAT32 state[POLY_PHASE_SYNTH_SIZE]) {
+ memset(state, 0, sizeof(FLOAT32) * POLY_PHASE_SYNTH_SIZE);
}
VOID ixheaacd_mps_synt_post_fft_twiddle_dec(WORD32 resolution, FLOAT32 *fin_re,
@@ -312,8 +298,7 @@ VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct *self) {
FLOAT32 fin_re[64] = {0};
FLOAT32 fin_im[64] = {0};
- ia_mps_poly_phase_struct kernel = self->poly_phase_filt_kernel;
- WORD32 resolution = kernel.resolution;
+ WORD32 resolution = self->resolution;
WORD32 m_resolution = resolution >> 1;
const FLOAT32 *ixheaacd_mps_post_re, *ixheaacd_mps_post_im;
VOID(*ixheaacd_mps_synt_out_calc_pointer)
@@ -332,7 +317,7 @@ VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct *self) {
if (self->qmf_band_count == 32)
{
for (ch = 0; ch < self->out_ch_count; ch++) {
- tmp_state = (&self->qmf_filt_state[ch])->state;
+ tmp_state = self->qmf_filt_state[ch];
state = &tmp_buf[self->time_slots * 2 * resolution];
memcpy(state, tmp_state, sizeof(FLOAT32) * 18 * resolution);
out = &tmp_buf[74 * MAX_NUM_QMF_BANDS_SAC];
@@ -375,7 +360,7 @@ VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct *self) {
else
{
for (ch = 0; ch < self->out_ch_count; ch++) {
- tmp_state = (&self->qmf_filt_state[ch])->state;
+ tmp_state = self->qmf_filt_state[ch];
state = &tmp_buf[self->time_slots * 2 * resolution];
memcpy(state, tmp_state, sizeof(FLOAT32) * 18 * resolution);
out = &tmp_buf[74 * MAX_NUM_QMF_BANDS_SAC];
diff --git a/decoder/ixheaacd_mps_polyphase.c b/decoder/ixheaacd_mps_polyphase.c
new file mode 100644
index 0000000..62aae1d
--- /dev/null
+++ b/decoder/ixheaacd_mps_polyphase.c
@@ -0,0 +1,1182 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_defines.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_error_standards.h"
+
+static VOID ixheaacd_fft32(WORD32 *vec, const WORD16 *fft_c) {
+ WORD32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11, tmp12, tmp13,
+ tmp14, tmp15;
+ WORD32 temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, temp110,
+ temp111, temp112, temp113, temp114, temp115;
+ WORD32 temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28, temp29, temp210,
+ temp211, temp212, temp213, temp214, temp215;
+ WORD32 temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37, temp38, temp39, temp310,
+ temp311, temp312, temp313, temp314, temp315;
+ WORD32 temp316, temp317, temp318, temp319, temp320, temp321, temp322, temp323, temp324, temp325,
+ temp326, temp327, temp328, temp329, temp330, temp331;
+ WORD32 temp40, temp41, temp42, temp43, temp44, temp45, temp46, temp47, temp48, temp49, temp410,
+ temp411, temp412, temp413, temp414, temp415;
+
+ temp20 = ixheaacd_sub32_sat(vec[2], vec[34]);
+ temp21 = ixheaacd_sub32_sat(vec[3], vec[35]);
+ temp30 = ixheaacd_add32_sat(vec[0], vec[32]);
+ temp31 = ixheaacd_add32_sat(vec[1], vec[33]);
+ temp32 = ixheaacd_add32_sat(vec[2], vec[34]);
+ temp33 = ixheaacd_add32_sat(vec[3], vec[35]);
+
+ temp22 = ixheaacd_sub32_sat(vec[6], vec[38]);
+ temp23 = ixheaacd_sub32_sat(vec[7], vec[39]);
+ temp34 = ixheaacd_add32_sat(vec[4], vec[36]);
+ temp35 = ixheaacd_add32_sat(vec[5], vec[37]);
+ temp36 = ixheaacd_add32_sat(vec[6], vec[38]);
+ temp37 = ixheaacd_add32_sat(vec[7], vec[39]);
+
+ temp24 = ixheaacd_sub32_sat(vec[10], vec[42]);
+ temp25 = ixheaacd_sub32_sat(vec[11], vec[43]);
+ temp38 = ixheaacd_add32_sat(vec[8], vec[40]);
+ temp39 = ixheaacd_add32_sat(vec[9], vec[41]);
+ temp310 = ixheaacd_add32_sat(vec[10], vec[42]);
+ temp311 = ixheaacd_add32_sat(vec[11], vec[43]);
+
+ temp26 = ixheaacd_sub32_sat(vec[14], vec[46]);
+ temp27 = ixheaacd_sub32_sat(vec[15], vec[47]);
+ temp312 = ixheaacd_add32_sat(vec[12], vec[44]);
+ temp313 = ixheaacd_add32_sat(vec[13], vec[45]);
+ temp314 = ixheaacd_add32_sat(vec[14], vec[46]);
+ temp315 = ixheaacd_add32_sat(vec[15], vec[47]);
+
+ temp28 = ixheaacd_sub32_sat(vec[18], vec[50]);
+ temp29 = ixheaacd_sub32_sat(vec[19], vec[51]);
+ temp316 = ixheaacd_add32_sat(vec[16], vec[48]);
+ temp317 = ixheaacd_add32_sat(vec[17], vec[49]);
+ temp318 = ixheaacd_add32_sat(vec[18], vec[50]);
+ temp319 = ixheaacd_add32_sat(vec[19], vec[51]);
+
+ temp210 = ixheaacd_sub32_sat(vec[22], vec[54]);
+ temp211 = ixheaacd_sub32_sat(vec[23], vec[55]);
+ temp320 = ixheaacd_add32_sat(vec[20], vec[52]);
+ temp321 = ixheaacd_add32_sat(vec[21], vec[53]);
+ temp322 = ixheaacd_add32_sat(vec[22], vec[54]);
+ temp323 = ixheaacd_add32_sat(vec[23], vec[55]);
+
+ temp212 = ixheaacd_sub32_sat(vec[26], vec[58]);
+ temp213 = ixheaacd_sub32_sat(vec[27], vec[59]);
+ temp324 = ixheaacd_add32_sat(vec[24], vec[56]);
+ temp325 = ixheaacd_add32_sat(vec[25], vec[57]);
+ temp326 = ixheaacd_add32_sat(vec[26], vec[58]);
+ temp327 = ixheaacd_add32_sat(vec[27], vec[59]);
+
+ temp214 = ixheaacd_sub32_sat(vec[30], vec[62]);
+ temp215 = ixheaacd_sub32_sat(vec[31], vec[63]);
+ temp328 = ixheaacd_add32_sat(vec[28], vec[60]);
+ temp329 = ixheaacd_add32_sat(vec[29], vec[61]);
+ temp330 = ixheaacd_add32_sat(vec[30], vec[62]);
+ temp331 = ixheaacd_add32_sat(vec[31], vec[63]);
+
+ temp41 = -ixheaacd_add32_sat(temp20, temp214);
+ temp42 = ixheaacd_sub32_sat(temp20, temp214);
+ temp40 = ixheaacd_add32_sat(temp21, temp215);
+ temp43 = ixheaacd_sub32_sat(temp21, temp215);
+ temp45 = -ixheaacd_add32_sat(temp22, temp212);
+ temp46 = ixheaacd_sub32_sat(temp22, temp212);
+ temp44 = ixheaacd_add32_sat(temp23, temp213);
+ temp47 = ixheaacd_sub32_sat(temp23, temp213);
+ temp49 = -ixheaacd_add32_sat(temp24, temp210);
+ temp410 = ixheaacd_sub32_sat(temp24, temp210);
+ temp48 = ixheaacd_add32_sat(temp25, temp211);
+ temp411 = ixheaacd_sub32_sat(temp25, temp211);
+ temp413 = -ixheaacd_add32_sat(temp26, temp28);
+ temp414 = ixheaacd_sub32_sat(temp26, temp28);
+ temp412 = ixheaacd_add32_sat(temp27, temp29);
+ temp415 = ixheaacd_sub32_sat(temp27, temp29);
+
+ temp20 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp40, fft_c[3]),
+ ixheaacd_mult32x16in32_shl(temp44, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp48, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp412, fft_c[0]));
+
+ temp24 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp40, fft_c[2]),
+ ixheaacd_mult32x16in32_shl(temp44, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp48, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp412, fft_c[1]));
+
+ temp28 = ixheaacd_add32_sat(ixheaacd_sub32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp40, fft_c[1]),
+ ixheaacd_mult32x16in32_shl(temp44, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp48, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp412, fft_c[2]));
+
+ temp212 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp40, fft_c[0]),
+ ixheaacd_mult32x16in32_shl(temp44, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp48, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp412, fft_c[3]));
+
+ temp21 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp41, fft_c[3]),
+ ixheaacd_mult32x16in32_shl(temp45, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp49, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp413, fft_c[0]));
+
+ temp25 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp41, fft_c[2]),
+ ixheaacd_mult32x16in32_shl(temp45, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp49, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp413, fft_c[1]));
+
+ temp29 = ixheaacd_add32_sat(ixheaacd_sub32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp41, fft_c[1]),
+ ixheaacd_mult32x16in32_shl(temp45, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp49, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp413, fft_c[2]));
+
+ temp213 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp41, fft_c[0]),
+ ixheaacd_mult32x16in32_shl(temp45, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp49, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp413, fft_c[3]));
+
+ temp22 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp42, fft_c[0]),
+ ixheaacd_mult32x16in32_shl(temp46, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp410, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp414, fft_c[3]));
+
+ temp26 = ixheaacd_sub32_sat(ixheaacd_sub32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp42, fft_c[1]),
+ ixheaacd_mult32x16in32_shl(temp46, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp410, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp414, fft_c[2]));
+
+ temp210 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp42, fft_c[2]),
+ ixheaacd_mult32x16in32_shl(temp46, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp410, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp414, fft_c[1]));
+
+ temp214 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp42, fft_c[3]),
+ ixheaacd_mult32x16in32_shl(temp46, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp410, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp414, fft_c[0]));
+
+ temp23 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(temp43, fft_c[0]),
+ ixheaacd_mult32x16in32_shl(temp47, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp411, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp415, fft_c[3]));
+
+ temp27 = ixheaacd_sub32_sat(ixheaacd_sub32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp43, fft_c[1]),
+ ixheaacd_mult32x16in32_shl(temp47, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp411, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp415, fft_c[2]));
+
+ temp211 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp43, fft_c[2]),
+ ixheaacd_mult32x16in32_shl(temp47, fft_c[0])),
+ ixheaacd_mult32x16in32_shl(temp411, fft_c[3])),
+ ixheaacd_mult32x16in32_shl(temp415, fft_c[1]));
+
+ temp215 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(temp43, fft_c[3]),
+ ixheaacd_mult32x16in32_shl(temp47, fft_c[2])),
+ ixheaacd_mult32x16in32_shl(temp411, fft_c[1])),
+ ixheaacd_mult32x16in32_shl(temp415, fft_c[0]));
+
+ temp40 = ixheaacd_add32_sat(temp20, temp22);
+ temp414 = ixheaacd_sub32_sat(temp20, temp22);
+ temp41 = ixheaacd_add32_sat(temp21, temp23);
+ temp415 = ixheaacd_sub32_sat(temp21, temp23);
+ temp42 = ixheaacd_add32_sat(temp24, temp26);
+ temp412 = ixheaacd_sub32_sat(temp24, temp26);
+ temp43 = ixheaacd_add32_sat(temp25, temp27);
+ temp413 = ixheaacd_sub32_sat(temp25, temp27);
+ temp44 = ixheaacd_add32_sat(temp28, temp210);
+ temp410 = ixheaacd_sub32_sat(temp28, temp210);
+ temp45 = ixheaacd_add32_sat(temp29, temp211);
+ temp411 = ixheaacd_sub32_sat(temp29, temp211);
+ temp46 = ixheaacd_add32_sat(temp212, temp214);
+ temp48 = ixheaacd_sub32_sat(temp212, temp214);
+ temp47 = ixheaacd_add32_sat(temp213, temp215);
+ temp49 = ixheaacd_sub32_sat(temp213, temp215);
+
+ temp10 = ixheaacd_add32_sat(temp30, temp316);
+ temp11 = ixheaacd_add32_sat(temp31, temp317);
+ temp12 = ixheaacd_add32_sat(temp32, temp318);
+ temp13 = ixheaacd_add32_sat(temp33, temp319);
+ temp14 = ixheaacd_add32_sat(temp34, temp320);
+ temp15 = ixheaacd_add32_sat(temp35, temp321);
+ temp16 = ixheaacd_add32_sat(temp36, temp322);
+ temp17 = ixheaacd_add32_sat(temp37, temp323);
+ temp18 = ixheaacd_add32_sat(temp38, temp324);
+ temp19 = ixheaacd_add32_sat(temp39, temp325);
+ temp110 = ixheaacd_add32_sat(temp310, temp326);
+ temp111 = ixheaacd_add32_sat(temp311, temp327);
+ temp112 = ixheaacd_add32_sat(temp312, temp328);
+ temp113 = ixheaacd_add32_sat(temp313, temp329);
+ temp114 = ixheaacd_add32_sat(temp314, temp330);
+ temp115 = ixheaacd_add32_sat(temp315, temp331);
+
+ tmp0 = ixheaacd_add32_sat(temp10, temp18);
+ tmp2 = ixheaacd_sub32_sat(temp10, temp18);
+ tmp1 = ixheaacd_add32_sat(temp11, temp19);
+ tmp3 = ixheaacd_sub32_sat(temp11, temp19);
+ tmp4 = ixheaacd_add32_sat(temp12, temp110);
+ tmp6 = ixheaacd_sub32_sat(temp12, temp110);
+ tmp5 = ixheaacd_add32_sat(temp13, temp111);
+ tmp7 = ixheaacd_sub32_sat(temp13, temp111);
+ tmp8 = ixheaacd_add32_sat(temp14, temp112);
+ tmp10 = ixheaacd_sub32_sat(temp14, temp112);
+ tmp9 = ixheaacd_add32_sat(temp15, temp113);
+ tmp11 = ixheaacd_sub32_sat(temp15, temp113);
+ tmp12 = ixheaacd_add32_sat(temp16, temp114);
+ tmp14 = ixheaacd_sub32_sat(temp16, temp114);
+ tmp13 = ixheaacd_add32_sat(temp17, temp115);
+ tmp15 = ixheaacd_sub32_sat(temp17, temp115);
+
+ temp20 = ixheaacd_add32_sat(tmp0, tmp8);
+ temp24 = ixheaacd_sub32_sat(tmp0, tmp8);
+ temp21 = ixheaacd_add32_sat(tmp1, tmp9);
+ temp25 = ixheaacd_sub32_sat(tmp1, tmp9);
+ temp28 = ixheaacd_sub32_sat(tmp2, tmp11);
+ temp210 = ixheaacd_add32_sat(tmp2, tmp11);
+ temp29 = ixheaacd_add32_sat(tmp3, tmp10);
+ temp211 = ixheaacd_sub32_sat(tmp3, tmp10);
+ temp22 = ixheaacd_add32_sat(tmp4, tmp12);
+ temp27 = ixheaacd_sub32_sat(tmp4, tmp12);
+ temp23 = ixheaacd_add32_sat(tmp5, tmp13);
+ temp26 = ixheaacd_sub32_sat(tmp13, tmp5);
+
+ tmp1 = ixheaacd_add32_sat(tmp6, tmp14);
+ tmp2 = ixheaacd_sub32_sat(tmp6, tmp14);
+ tmp0 = ixheaacd_add32_sat(tmp7, tmp15);
+ tmp3 = ixheaacd_sub32_sat(tmp7, tmp15);
+
+ temp212 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(tmp0, tmp2), INV_SQRT2_Q15);
+ temp214 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(tmp0, tmp2), INV_SQRT2_Q15);
+ temp213 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(tmp3, tmp1), INV_SQRT2_Q15);
+ temp215 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(tmp1, tmp3), -INV_SQRT2_Q15);
+
+ temp10 = ixheaacd_sub32_sat(temp30, temp316);
+ temp11 = ixheaacd_sub32_sat(temp31, temp317);
+ temp12 = ixheaacd_sub32_sat(temp32, temp318);
+ temp13 = ixheaacd_sub32_sat(temp33, temp319);
+ temp14 = ixheaacd_sub32_sat(temp34, temp320);
+ temp15 = ixheaacd_sub32_sat(temp35, temp321);
+ temp16 = ixheaacd_sub32_sat(temp36, temp322);
+ temp17 = ixheaacd_sub32_sat(temp37, temp323);
+ temp18 = ixheaacd_sub32_sat(temp38, temp324);
+ temp19 = ixheaacd_sub32_sat(temp39, temp325);
+ temp110 = ixheaacd_sub32_sat(temp310, temp326);
+ temp111 = ixheaacd_sub32_sat(temp311, temp327);
+ temp112 = ixheaacd_sub32_sat(temp312, temp328);
+ temp113 = ixheaacd_sub32_sat(temp313, temp329);
+ temp114 = ixheaacd_sub32_sat(temp314, temp330);
+ temp115 = ixheaacd_sub32_sat(temp315, temp331);
+
+ temp30 = ixheaacd_add32_sat(temp20, temp22);
+ temp316 = ixheaacd_sub32_sat(temp20, temp22);
+ temp31 = ixheaacd_add32_sat(temp21, temp23);
+ temp317 = ixheaacd_sub32_sat(temp21, temp23);
+ temp38 = ixheaacd_sub32_sat(temp24, temp26);
+ temp324 = ixheaacd_add32_sat(temp24, temp26);
+ temp39 = ixheaacd_sub32_sat(temp25, temp27);
+ temp325 = ixheaacd_add32_sat(temp25, temp27);
+ temp312 = ixheaacd_add32_sat(temp28, temp214);
+ temp328 = ixheaacd_sub32_sat(temp28, temp214);
+ temp313 = ixheaacd_add32_sat(temp29, temp215);
+ temp329 = ixheaacd_sub32_sat(temp29, temp215);
+ temp34 = ixheaacd_add32_sat(temp210, temp212);
+ temp320 = ixheaacd_sub32_sat(temp210, temp212);
+ temp35 = ixheaacd_add32_sat(temp211, temp213);
+ temp321 = ixheaacd_sub32_sat(temp211, temp213);
+
+ tmp9 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15);
+ tmp10 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15);
+ tmp8 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15);
+ tmp11 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15);
+ tmp5 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp14, temp112), -INV_SQRT2_Q15);
+ tmp6 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp14, temp112), INV_SQRT2_Q15);
+ tmp4 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp15, temp113), INV_SQRT2_Q15);
+ tmp7 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp15, temp113), INV_SQRT2_Q15);
+ tmp13 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15);
+ tmp14 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15);
+ tmp12 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp17, temp111), COS_PI_BY_8_Q15);
+ tmp15 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15);
+
+ temp12 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3),
+ ixheaacd_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15));
+ temp13 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3),
+ ixheaacd_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15));
+ temp14 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15),
+ ixheaacd_shl32(ixheaacd_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3));
+ temp15 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15),
+ ixheaacd_shl32(ixheaacd_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3));
+
+ tmp8 = ixheaacd_add32_sat(tmp8, tmp12);
+ tmp9 = ixheaacd_add32_sat(tmp9, tmp13);
+ tmp10 = ixheaacd_add32_sat(tmp10, tmp14);
+ tmp11 = ixheaacd_add32_sat(tmp11, tmp15);
+ temp16 = ixheaacd_add32_sat(temp10, tmp4);
+ temp110 = ixheaacd_sub32_sat(temp10, tmp4);
+ temp17 = ixheaacd_add32_sat(temp11, tmp5);
+ temp111 = ixheaacd_sub32_sat(temp11, tmp5);
+
+ temp112 = ixheaacd_sub32_sat(tmp6, temp19);
+ temp114 = ixheaacd_add32_sat(tmp6, temp19);
+ temp113 = ixheaacd_add32_sat(temp18, tmp7);
+ temp115 = ixheaacd_sub32_sat(temp18, tmp7);
+
+ tmp0 = ixheaacd_sub32_sat(temp16, temp114);
+ tmp2 = ixheaacd_add32_sat(temp16, temp114);
+ tmp1 = ixheaacd_add32_sat(temp17, temp115);
+ tmp3 = ixheaacd_sub32_sat(temp17, temp115);
+ tmp4 = ixheaacd_add32_sat(temp110, temp112);
+ tmp6 = ixheaacd_sub32_sat(temp110, temp112);
+ tmp5 = ixheaacd_add32_sat(temp111, temp113);
+ tmp7 = ixheaacd_sub32_sat(temp111, temp113);
+
+ temp110 = ixheaacd_add32_sat(tmp8, tmp10);
+ tmp10 = ixheaacd_sub32_sat(tmp8, tmp10);
+ temp111 = ixheaacd_add32_sat(tmp9, tmp11);
+ tmp11 = ixheaacd_sub32_sat(tmp9, tmp11);
+
+ tmp12 = ixheaacd_add32_sat(temp12, temp14);
+ tmp14 = ixheaacd_sub32_sat(temp12, temp14);
+ tmp13 = ixheaacd_add32_sat(temp13, temp15);
+ tmp15 = ixheaacd_sub32_sat(temp13, temp15);
+
+ temp32 = ixheaacd_add32_sat(tmp2, temp110);
+ temp318 = ixheaacd_sub32_sat(tmp2, temp110);
+ temp33 = ixheaacd_add32_sat(tmp3, temp111);
+ temp319 = ixheaacd_sub32_sat(tmp3, temp111);
+ temp36 = ixheaacd_add32_sat(tmp0, tmp12);
+ temp322 = ixheaacd_sub32_sat(tmp0, tmp12);
+ temp37 = ixheaacd_add32_sat(tmp1, tmp13);
+ temp323 = ixheaacd_sub32_sat(tmp1, tmp13);
+ temp314 = ixheaacd_add32_sat(tmp4, tmp10);
+ temp330 = ixheaacd_sub32_sat(tmp4, tmp10);
+ temp315 = ixheaacd_add32_sat(tmp5, tmp11);
+ temp331 = ixheaacd_sub32_sat(tmp5, tmp11);
+ temp310 = ixheaacd_add32_sat(tmp6, tmp14);
+ temp326 = ixheaacd_sub32_sat(tmp6, tmp14);
+ temp311 = ixheaacd_add32_sat(tmp7, tmp15);
+ temp327 = ixheaacd_sub32_sat(tmp7, tmp15);
+
+ temp10 = ixheaacd_sub32_sat(vec[0], vec[32]);
+ temp11 = ixheaacd_sub32_sat(vec[1], vec[33]);
+ temp12 = ixheaacd_sub32_sat(vec[4], vec[36]);
+ temp13 = ixheaacd_sub32_sat(vec[5], vec[37]);
+ temp14 = ixheaacd_sub32_sat(vec[8], vec[40]);
+ temp15 = ixheaacd_sub32_sat(vec[9], vec[41]);
+ temp16 = ixheaacd_sub32_sat(vec[12], vec[44]);
+ temp17 = ixheaacd_sub32_sat(vec[13], vec[45]);
+ temp18 = ixheaacd_sub32_sat(vec[16], vec[48]);
+ temp19 = ixheaacd_sub32_sat(vec[17], vec[49]);
+ temp110 = ixheaacd_sub32_sat(vec[20], vec[52]);
+ temp111 = ixheaacd_sub32_sat(vec[21], vec[53]);
+ temp112 = ixheaacd_sub32_sat(vec[24], vec[56]);
+ temp113 = ixheaacd_sub32_sat(vec[25], vec[57]);
+ temp114 = ixheaacd_sub32_sat(vec[28], vec[60]);
+ temp115 = ixheaacd_sub32_sat(vec[29], vec[61]);
+
+ tmp9 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15);
+ tmp10 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15);
+ tmp8 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15);
+ tmp11 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15);
+ tmp5 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp14, temp112), -INV_SQRT2_Q15);
+ tmp6 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp14, temp112), INV_SQRT2_Q15);
+ tmp4 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp15, temp113), INV_SQRT2_Q15);
+ tmp7 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp15, temp113), INV_SQRT2_Q15);
+ tmp13 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15);
+ tmp14 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15);
+ tmp12 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp17, temp111), COS_PI_BY_8_Q15);
+ tmp15 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15);
+
+ temp12 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3),
+ ixheaacd_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15));
+ temp13 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3),
+ ixheaacd_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15));
+ temp14 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15),
+ ixheaacd_shl32(ixheaacd_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3));
+ temp15 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15),
+ ixheaacd_shl32(ixheaacd_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3));
+
+ tmp8 = ixheaacd_add32_sat(tmp8, tmp12);
+ tmp9 = ixheaacd_add32_sat(tmp9, tmp13);
+ tmp10 = ixheaacd_add32_sat(tmp10, tmp14);
+ tmp11 = ixheaacd_add32_sat(tmp11, tmp15);
+ temp16 = ixheaacd_add32_sat(temp10, tmp4);
+ temp110 = ixheaacd_sub32_sat(temp10, tmp4);
+ temp17 = ixheaacd_add32_sat(temp11, tmp5);
+ temp111 = ixheaacd_sub32_sat(temp11, tmp5);
+
+ temp112 = ixheaacd_sub32_sat(tmp6, temp19);
+ temp114 = ixheaacd_add32_sat(tmp6, temp19);
+ temp113 = ixheaacd_add32_sat(temp18, tmp7);
+ temp115 = ixheaacd_sub32_sat(temp18, tmp7);
+
+ tmp0 = ixheaacd_sub32_sat(temp16, temp114);
+ tmp2 = ixheaacd_add32_sat(temp16, temp114);
+ tmp1 = ixheaacd_add32_sat(temp17, temp115);
+ tmp3 = ixheaacd_sub32_sat(temp17, temp115);
+ tmp4 = ixheaacd_add32_sat(temp110, temp112);
+ tmp6 = ixheaacd_sub32_sat(temp110, temp112);
+ tmp5 = ixheaacd_add32_sat(temp111, temp113);
+ tmp7 = ixheaacd_sub32_sat(temp111, temp113);
+
+ temp110 = ixheaacd_add32_sat(tmp8, tmp10);
+ tmp10 = ixheaacd_sub32_sat(tmp8, tmp10);
+ temp111 = ixheaacd_add32_sat(tmp9, tmp11);
+ tmp11 = ixheaacd_sub32_sat(tmp9, tmp11);
+
+ tmp12 = ixheaacd_add32_sat(temp12, temp14);
+ tmp14 = ixheaacd_sub32_sat(temp12, temp14);
+ tmp13 = ixheaacd_add32_sat(temp13, temp15);
+ tmp15 = ixheaacd_sub32_sat(temp13, temp15);
+
+ temp10 = ixheaacd_add32_sat(tmp2, temp110);
+ temp18 = ixheaacd_sub32_sat(tmp2, temp110);
+ temp11 = ixheaacd_add32_sat(tmp3, temp111);
+ temp19 = ixheaacd_sub32_sat(tmp3, temp111);
+ temp12 = ixheaacd_add32_sat(tmp0, tmp12);
+ temp110 = ixheaacd_sub32_sat(tmp0, tmp12);
+ temp13 = ixheaacd_add32_sat(tmp1, tmp13);
+ temp111 = ixheaacd_sub32_sat(tmp1, tmp13);
+ temp16 = ixheaacd_add32_sat(tmp4, tmp10);
+ temp114 = ixheaacd_sub32_sat(tmp4, tmp10);
+ temp17 = ixheaacd_add32_sat(tmp5, tmp11);
+ temp115 = ixheaacd_sub32_sat(tmp5, tmp11);
+ temp14 = ixheaacd_add32_sat(tmp6, tmp14);
+ temp112 = ixheaacd_sub32_sat(tmp6, tmp14);
+ temp15 = ixheaacd_add32_sat(tmp7, tmp15);
+ temp113 = ixheaacd_sub32_sat(tmp7, tmp15);
+
+ *vec++ = temp30;
+ *vec++ = temp31;
+ *vec++ = ixheaacd_add32_sat(temp10, temp40);
+ *vec++ = ixheaacd_add32_sat(temp11, temp41);
+ *vec++ = temp32;
+ *vec++ = temp33;
+ *vec++ = ixheaacd_add32_sat(temp12, temp42);
+ *vec++ = ixheaacd_add32_sat(temp13, temp43);
+ *vec++ = temp34;
+ *vec++ = temp35;
+ *vec++ = ixheaacd_add32_sat(temp14, temp44);
+ *vec++ = ixheaacd_add32_sat(temp15, temp45);
+ *vec++ = temp36;
+ *vec++ = temp37;
+ *vec++ = ixheaacd_add32_sat(temp16, temp46);
+ *vec++ = ixheaacd_add32_sat(temp17, temp47);
+ *vec++ = temp38;
+ *vec++ = temp39;
+ *vec++ = ixheaacd_add32_sat(temp18, temp48);
+ *vec++ = ixheaacd_add32_sat(temp19, temp49);
+ *vec++ = temp310;
+ *vec++ = temp311;
+ *vec++ = ixheaacd_add32_sat(temp110, temp410);
+ *vec++ = ixheaacd_add32_sat(temp111, temp411);
+ *vec++ = temp312;
+ *vec++ = temp313;
+ *vec++ = ixheaacd_add32_sat(temp112, temp412);
+ *vec++ = ixheaacd_add32_sat(temp113, temp413);
+ *vec++ = temp314;
+ *vec++ = temp315;
+ *vec++ = ixheaacd_add32_sat(temp114, temp414);
+ *vec++ = ixheaacd_add32_sat(temp115, temp415);
+ *vec++ = temp316;
+ *vec++ = temp317;
+ *vec++ = ixheaacd_sub32_sat(temp10, temp40);
+ *vec++ = ixheaacd_sub32_sat(temp11, temp41);
+ *vec++ = temp318;
+ *vec++ = temp319;
+ *vec++ = ixheaacd_sub32_sat(temp12, temp42);
+ *vec++ = ixheaacd_sub32_sat(temp13, temp43);
+ *vec++ = temp320;
+ *vec++ = temp321;
+ *vec++ = ixheaacd_sub32_sat(temp14, temp44);
+ *vec++ = ixheaacd_sub32_sat(temp15, temp45);
+ *vec++ = temp322;
+ *vec++ = temp323;
+ *vec++ = ixheaacd_sub32_sat(temp16, temp46);
+ *vec++ = ixheaacd_sub32_sat(temp17, temp47);
+ *vec++ = temp324;
+ *vec++ = temp325;
+ *vec++ = ixheaacd_sub32_sat(temp18, temp48);
+ *vec++ = ixheaacd_sub32_sat(temp19, temp49);
+ *vec++ = temp326;
+ *vec++ = temp327;
+ *vec++ = ixheaacd_sub32_sat(temp110, temp410);
+ *vec++ = ixheaacd_sub32_sat(temp111, temp411);
+ *vec++ = temp328;
+ *vec++ = temp329;
+ *vec++ = ixheaacd_sub32_sat(temp112, temp412);
+ *vec++ = ixheaacd_sub32_sat(temp113, temp413);
+ *vec++ = temp330;
+ *vec++ = temp331;
+ *vec++ = ixheaacd_sub32_sat(temp114, temp414);
+ *vec++ = ixheaacd_sub32_sat(temp115, temp415);
+}
+
+static VOID ixheaacd_cos_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 i, m;
+ WORD16 wim, wre;
+ WORD32 temp_1;
+ const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
+ WORD32 re1, im1, re2, im2;
+
+ m = WORD_LENGTH;
+ ptr1 = qmf_table_ptr->sbr_sin_twiddle;
+ ptr2 = qmf_table_ptr->sbr_cos_twiddle;
+ ptr3 = qmf_table_ptr->sbr_sin_twiddle + 31;
+ ptr4 = qmf_table_ptr->sbr_cos_twiddle + 31;
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+ re1 = subband[temp_1];
+ im2 = subband[temp_1 + 1];
+ re2 = subband[62 - temp_1];
+ im1 = subband[63 - temp_1];
+
+ wim = *ptr1++;
+ wre = *ptr2++;
+
+ subband[temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre));
+ subband[temp_1 + 1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim));
+
+ wim = *ptr3--;
+ wre = *ptr4--;
+
+ subband[62 - temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre));
+ subband[63 - temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim));
+ }
+
+ ixheaacd_fft32(subband, qmf_table_ptr->fft_c);
+
+ ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
+ ptr2 = qmf_table_ptr->sbr_alt_sin_twiddle + m;
+ wim = *ptr1++;
+ wre = *ptr2--;
+
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+ re1 = subband[temp_1];
+ im1 = subband[temp_1 + 1];
+ re2 = subband[62 - temp_1];
+ im2 = subband[63 - temp_1];
+
+ subband[temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(re1, wre), ixheaacd_mult32x16in32_shl(im1, wim));
+ subband[63 - temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(re1, wim), ixheaacd_mult32x16in32_shl(im1, wre));
+
+ wim = *ptr1++;
+ wre = *ptr2--;
+
+ subband[62 - temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(re2, wim), ixheaacd_mult32x16in32_shl(im2, wre));
+ subband[temp_1 + 1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(re2, wre), ixheaacd_mult32x16in32_shl(im2, wim));
+ }
+}
+
+static VOID ixheaacd_sin_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 i, m;
+ WORD16 wre, wim;
+ WORD32 temp_1;
+ WORD32 re1, im1, re2, im2;
+ const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
+
+ ptr1 = qmf_table_ptr->sbr_sin_twiddle;
+ ptr2 = qmf_table_ptr->sbr_cos_twiddle;
+ ptr3 = qmf_table_ptr->sbr_sin_twiddle + 31;
+ ptr4 = qmf_table_ptr->sbr_cos_twiddle + 31;
+
+ m = WORD_LENGTH;
+
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+
+ re1 = subband[temp_1];
+ im2 = subband[temp_1 + 1];
+ re2 = subband[62 - temp_1];
+ im1 = subband[63 - temp_1];
+
+ wre = *ptr1++;
+ wim = *ptr2++;
+
+ subband[temp_1 + 1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre));
+ subband[temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim));
+
+ wre = *ptr3--;
+ wim = *ptr4--;
+
+ subband[63 - temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre));
+ subband[62 - temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim));
+ }
+
+ ixheaacd_fft32(subband, qmf_table_ptr->fft_c);
+
+ ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
+ ptr2 = qmf_table_ptr->sbr_alt_sin_twiddle + m;
+
+ wim = *ptr1++;
+ wre = *ptr2--;
+
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+ re1 = subband[temp_1];
+ im1 = subband[temp_1 + 1];
+ re2 = subband[62 - temp_1];
+ im2 = subband[63 - temp_1];
+
+ subband[63 - temp_1] = -ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(re1, wre), ixheaacd_mult32x16in32_shl(im1, wim));
+ subband[temp_1] = -ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(re1, wim), ixheaacd_mult32x16in32_shl(im1, wre));
+
+ wim = *ptr1++;
+ wre = *ptr2--;
+
+ subband[temp_1 + 1] = -ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(re2, wim), ixheaacd_mult32x16in32_shl(im2, wre));
+ subband[62 - temp_1] = -ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(re2, wre), ixheaacd_mult32x16in32_shl(im2, wim));
+ }
+}
+
+static VOID ixheaacd_inverse_modulation(WORD32 *qmf_real, WORD32 *qmf_imag,
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 i;
+
+ const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
+ const WORD16 *fft = qmf_table_ptr->fft_c;
+ WORD16 wre, wim;
+ WORD32 re1, im1, re2, im2;
+ WORD32 re12, im12, re22, im22;
+ WORD32 temp_1;
+
+ ptr1 = qmf_table_ptr->sbr_sin_twiddle;
+ ptr2 = qmf_table_ptr->sbr_cos_twiddle;
+ ptr3 = ptr1 + 31;
+ ptr4 = ptr2 + 31;
+
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+
+ re1 = qmf_real[temp_1];
+ im1 = qmf_real[63 - temp_1];
+
+ wim = *ptr1++;
+ wre = *ptr2++;
+
+ qmf_real[temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre));
+
+ re12 = qmf_imag[temp_1];
+ im12 = qmf_imag[63 - temp_1];
+
+ qmf_imag[temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im12, wim), ixheaacd_mult32x16in32_shl(re12, wre));
+
+ im2 = qmf_real[temp_1 + 1];
+
+ qmf_real[temp_1 + 1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim));
+
+ im22 = qmf_imag[temp_1 + 1];
+
+ qmf_imag[temp_1 + 1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im12, wre), ixheaacd_mult32x16in32_shl(re12, wim));
+
+ wim = *ptr3--;
+ wre = *ptr4--;
+
+ re2 = qmf_real[62 - temp_1];
+
+ qmf_real[62 - temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre));
+
+ re22 = qmf_imag[62 - temp_1];
+
+ qmf_imag[62 - temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im22, wim), ixheaacd_mult32x16in32_shl(re22, wre));
+
+ qmf_real[63 - temp_1] = ixheaacd_sub32_sat(
+ ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim));
+ qmf_imag[63 - temp_1] = ixheaacd_add32_sat(
+ ixheaacd_mult32x16in32_shl(im22, wre), ixheaacd_mult32x16in32_shl(re22, wim));
+ }
+
+ ixheaacd_fft32(qmf_real, fft);
+ ixheaacd_fft32(qmf_imag, fft);
+
+ ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
+ ptr2 = ptr1 + 32;
+
+ wim = *ptr1++;
+ wre = *ptr2--;
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 1);
+ re1 = qmf_real[temp_1];
+ im1 = qmf_real[temp_1 + 1];
+ re12 = qmf_imag[temp_1];
+ im12 = qmf_imag[temp_1 + 1];
+
+ qmf_real[temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ im12, re1), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im1, re12), wim));
+ qmf_imag[temp_1] = ixheaacd_add32_sat(ixheaacd_mult32x16in32_shl((ixheaacd_add32_sat(
+ im12, re1)), wre), ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(im1, re12), wim));
+
+ im2 = qmf_real[63 - temp_1];
+ im22 = qmf_imag[63 - temp_1];
+
+ qmf_real[63 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ im1, re12), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im12, re1), wim));
+ qmf_imag[63 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ re1, im12), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im1, re12), wre));
+
+ wim = *ptr1++;
+ wre = *ptr2--;
+ re2 = qmf_real[62 - temp_1];
+ re22 = qmf_imag[62 - temp_1];
+
+ qmf_real[temp_1 + 1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ im2, re22), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im22, re2), wre));
+ qmf_imag[temp_1 + 1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ re2, im22), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im2, re22), wim));
+
+ qmf_real[62 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(
+ im22, re2), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im2, re22), wre));
+ qmf_imag[62 - temp_1] = ixheaacd_add32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(
+ re2, im22), wim), ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(im2, re22), wre));
+ }
+}
+
+VOID ixheaacd_calculate_syn_filt_bank_res64(ia_mps_dec_qmf_syn_filter_bank *syn, WORD32 *sr,
+ WORD32 *si, WORD32 *time_sig, WORD32 channel,
+ WORD32 resolution, WORD32 nr_samples,
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 j, k;
+ WORD32 *synth_buf;
+ WORD32 *syn_buf_p1, *syn_buf_p2, *syn_buf_p3;
+ WORD32 val;
+ const WORD32 *p_filter_1, *p_filter_6;
+ const WORD32 *p_filter_2, *p_filter_7;
+ const WORD32 *p_filter_3, *p_filter_8;
+ const WORD32 *p_filter_4, *p_filter_9;
+ const WORD32 *p_filter_5, *p_filter_10;
+
+ WORD32 *p_sr, *p_si;
+
+ WORD32 *sbr_qmf_states_synthesis = syn->sbr_qmf_states_synthesis;
+ synth_buf = &(sbr_qmf_states_synthesis[channel * QMF_FILTER_STATE_SYN_SIZE_MPS]);
+
+ p_sr = sr;
+ p_si = si;
+ for (k = 0; k < nr_samples; k++) {
+ WORD32 *new_samp = p_si;
+ WORD32 *new_samp1, *new_samp2;
+
+ ixheaacd_inverse_modulation(p_sr, p_si, qmf_table_ptr);
+
+ p_filter_1 = syn->p_filter_syn;
+ p_filter_2 = p_filter_1 + 64;
+ p_filter_3 = p_filter_2 + 65;
+ p_filter_4 = p_filter_3 + 65;
+ p_filter_5 = p_filter_4 + 65;
+
+ syn_buf_p1 = &synth_buf[63];
+ val = *(p_sr);
+
+ {
+ WORD32 val1 = *(p_si + 63);
+ syn_buf_p2 = &synth_buf[63];
+
+ *time_sig++ = ixheaacd_add32_sat(syn_buf_p1[512],
+ ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 65), val));
+ syn_buf_p1[512] = ixheaacd_add32_sat(syn_buf_p2[448],
+ ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 64), val1));
+ syn_buf_p2[448] = ixheaacd_add32_sat(syn_buf_p1[384],
+ ixheaacd_mps_mult32_shr_30(*p_filter_5++, val));
+ syn_buf_p1[384] = ixheaacd_add32_sat(syn_buf_p2[320],
+ ixheaacd_mps_mult32_shr_30(*(p_filter_4 + 64), val1));
+ syn_buf_p2[320] = ixheaacd_add32_sat(syn_buf_p1[256],
+ ixheaacd_mps_mult32_shr_30(*p_filter_4++, val));
+ syn_buf_p1[256] = ixheaacd_add32_sat(syn_buf_p2[192],
+ ixheaacd_mps_mult32_shr_30(*(p_filter_3 + 64), val1));
+ syn_buf_p2[192] = ixheaacd_add32_sat(syn_buf_p1[128],
+ ixheaacd_mps_mult32_shr_30(*p_filter_3++, val));
+ syn_buf_p1[128] = ixheaacd_add32_sat(syn_buf_p2[64],
+ ixheaacd_mps_mult32_shr_30(*(p_filter_2 + 64), val1));
+ syn_buf_p2[64] = ixheaacd_add32_sat(syn_buf_p1[0],
+ ixheaacd_mps_mult32_shr_30(*p_filter_2++, val));
+ syn_buf_p1[0] = ixheaacd_mps_mult32_shr_30(*(p_filter_1 + 63), val1);
+ }
+ p_filter_6 = p_filter_1 + 62;
+ p_filter_7 = p_filter_2 + 62;
+ p_filter_8 = p_filter_3 + 62;
+ p_filter_9 = p_filter_4 + 62;
+ p_filter_10 = p_filter_5 + 62;
+ time_sig += 62;
+
+ syn_buf_p2 = synth_buf;
+ syn_buf_p3 = syn_buf_p2;
+ new_samp1 = p_sr + 1;
+ new_samp2 = p_sr + 63;
+ for (j = 0; j < resolution - 1; j++) {
+ *time_sig-- = ixheaacd_add32_sat(syn_buf_p3[512],
+ ixheaacd_mps_mult32_shr_30(*p_filter_6--, (*new_samp2)));
+ syn_buf_p3[512] = ixheaacd_add32_sat(syn_buf_p2[448],
+ ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp)));
+ syn_buf_p2[448] = ixheaacd_add32_sat(syn_buf_p3[384],
+ ixheaacd_mps_mult32_shr_30(*p_filter_7--, (*new_samp2)));
+ syn_buf_p3[384] = ixheaacd_add32_sat(syn_buf_p2[320],
+ ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp)));
+ syn_buf_p2[320] = ixheaacd_add32_sat(syn_buf_p3[256],
+ ixheaacd_mps_mult32_shr_30(*p_filter_8--, (*new_samp2)));
+ syn_buf_p3[256] = ixheaacd_add32_sat(syn_buf_p2[192],
+ ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp)));
+ syn_buf_p2[192] = ixheaacd_add32_sat(syn_buf_p3[128],
+ ixheaacd_mps_mult32_shr_30(*p_filter_9--, (*new_samp2)));
+ syn_buf_p3[128] = ixheaacd_add32_sat(syn_buf_p2[64],
+ ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp)));
+ syn_buf_p2[64] = ixheaacd_add32_sat(syn_buf_p3[0],
+ ixheaacd_mps_mult32_shr_30(*p_filter_10--, (*new_samp2)));
+ syn_buf_p3[0] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp));
+
+ new_samp++;
+ syn_buf_p2++;
+
+ new_samp1++;
+ new_samp2--;
+ syn_buf_p3++;
+ }
+
+ time_sig += 64;
+
+ p_sr += MAX_HYBRID_BANDS;
+ p_si += MAX_HYBRID_BANDS;
+ }
+}
+
+VOID ixheaacd_calculate_syn_filt_bank(ia_mps_dec_qmf_syn_filter_bank *syn, WORD32 *sr, WORD32 *si,
+ WORD32 *time_sig, WORD32 channel, WORD32 resolution,
+ WORD32 nr_samples,
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 j, k;
+ WORD32 *synth_buf;
+ WORD32 *p_sr, *p_si;
+ WORD32 *buf_ptr;
+ WORD32 resx2 = resolution << 1;
+ WORD32 *sbr_qmf_states_synthesis = syn->sbr_qmf_states_synthesis;
+
+ synth_buf = &(sbr_qmf_states_synthesis[channel * QMF_FILTER_STATE_SYN_SIZE_MPS]);
+
+ p_sr = sr;
+ p_si = si;
+ for (k = 0; k < nr_samples; k++) {
+ WORD32 *new_samp = p_si + 63;
+
+ const WORD32 *p_filter_1 = syn->p_filter_syn;
+ const WORD32 *p_filter_2 = p_filter_1 + 65;
+ const WORD32 *p_filter_3 = p_filter_2 + 65;
+ const WORD32 *p_filter_4 = p_filter_3 + 65;
+ const WORD32 *p_filter_5 = p_filter_4 + 65;
+
+ ixheaacd_inverse_modulation(p_sr, p_si, qmf_table_ptr);
+
+ for (j = 0; j < resolution; j++) {
+ synth_buf[j] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp));
+ synth_buf[resx2 + j] = ixheaacd_add32_sat(synth_buf[resx2 + j],
+ ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp)));
+ synth_buf[resx2 * 2 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 2 + j],
+ ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp)));
+ synth_buf[resx2 * 3 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 3 + j],
+ ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp)));
+ synth_buf[resx2 * 4 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 4 + j],
+ ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp)));
+
+ new_samp--;
+ }
+
+ synth_buf[resx2 - 1] = ixheaacd_add32_sat(synth_buf[resx2 - 1],
+ ixheaacd_mps_mult32_shr_30(*p_filter_1++, *p_sr));
+ synth_buf[resx2 * 2 - 1] = ixheaacd_add32_sat(synth_buf[resx2 * 2 - 1],
+ ixheaacd_mps_mult32_shr_30(*p_filter_2++, *p_sr));
+ synth_buf[3 * resx2 - 1] = ixheaacd_add32_sat(synth_buf[3 * resx2 - 1],
+ ixheaacd_mps_mult32_shr_30(*p_filter_3++, *p_sr));
+ synth_buf[4 * resx2 - 1] = ixheaacd_add32_sat(synth_buf[4 * resx2 - 1],
+ ixheaacd_mps_mult32_shr_30(*p_filter_4++, *p_sr));
+ *time_sig++ = ixheaacd_add32_sat(synth_buf[5 * resx2 - 1],
+ ixheaacd_mps_mult32_shr_30(*p_filter_5++, *p_sr));
+
+ p_filter_1 -= 2;
+ p_filter_2 -= 2;
+ p_filter_3 -= 2;
+ p_filter_4 -= 2;
+ p_filter_5 -= 2;
+
+ new_samp = p_sr + resolution - 1;
+
+ for (j = 0; j < resolution - 1; j++) {
+ synth_buf[resolution + j] = ixheaacd_add32_sat(synth_buf[resolution + j],
+ ixheaacd_mps_mult32_shr_30(*--p_filter_5, (*new_samp)));
+ synth_buf[resolution * (3) + j] =
+ ixheaacd_add32_sat(synth_buf[resolution * (3) + j],
+ ixheaacd_mps_mult32_shr_30(*--p_filter_4, (*new_samp)));
+ synth_buf[resolution * (5) + j] =
+ ixheaacd_add32_sat(synth_buf[resolution * (5) + j],
+ ixheaacd_mps_mult32_shr_30(*--p_filter_3, (*new_samp)));
+ synth_buf[resolution * (7) + j] =
+ ixheaacd_add32_sat(synth_buf[resolution * (7) + j],
+ ixheaacd_mps_mult32_shr_30(*--p_filter_2, (*new_samp)));
+ synth_buf[resolution * (9) + j] =
+ ixheaacd_add32_sat(synth_buf[resolution * (9) + j],
+ ixheaacd_mps_mult32_shr_30(*--p_filter_1, (*new_samp)));
+ new_samp--;
+ }
+
+ buf_ptr = synth_buf + 9 * resolution + resolution - 2;
+ for (j = 0; j < resolution - 1; j++) {
+ *time_sig++ = *buf_ptr--;
+ }
+
+ memmove((synth_buf + resolution), synth_buf, (9 * resolution) * sizeof(WORD32));
+
+ p_sr += MAX_HYBRID_BANDS;
+ p_si += MAX_HYBRID_BANDS;
+ }
+}
+
+IA_ERRORCODE
+ixheaacd_syn_filt_bank_init(ia_mps_dec_synthesis_interface_handle self, WORD32 resolution) {
+ switch (resolution) {
+ case QMF_BANDS_32:
+ self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank;
+ break;
+ case QMF_BANDS_64:
+ self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank_res64;
+ break;
+ case QMF_BANDS_128:
+ self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank;
+ break;
+ default:
+ return IA_XHEAAC_MPS_DEC_INIT_NONFATAL_INVALID_QMF_BAND;
+ break;
+ }
+ return IA_NO_ERROR;
+}
+
+static VOID ia_mps_enc_fwd_mod(WORD32 *time_in, WORD32 *r_subband, WORD32 *i_subband,
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
+ WORD32 i;
+
+ for (i = 0; i < 64; i++) {
+ r_subband[i] = time_in[i] - time_in[127 - i];
+ i_subband[i] = time_in[i] + time_in[127 - i];
+ }
+ ixheaacd_cos_mod(r_subband, qmf_table_ptr);
+ ixheaacd_sin_mod(i_subband, qmf_table_ptr);
+}
+
+VOID ixheaacd_calc_ana_filt_bank(ia_heaac_mps_state_struct *pstr_mps_state, WORD16 *time_in,
+ WORD32 *r_analysis, WORD32 *i_analysis, WORD32 channel) {
+ ia_mps_dec_qmf_ana_filter_bank *qmf_bank = &pstr_mps_state->qmf_bank[channel];
+ ia_mps_dec_qmf_tables_struct *qmf_table_ptr =
+ pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr;
+ WORD32 i, k, m;
+
+ WORD32 *syn_buffer = pstr_mps_state->mps_scratch_mem_v;
+ WORD64 accu1 = 0, accu2 = 0;
+ WORD16 flag;
+ WORD32 *fp1;
+ WORD32 *fp2;
+ WORD32 *temp;
+ const WORD32 *start_co_eff_ptr_l;
+ const WORD32 *start_co_eff_ptr_r;
+ const WORD32 *ptr_pf_l, *ptr_pf_r;
+ WORD32 *qmf_states_curr_pos;
+ WORD32 offset = 0;
+ WORD32 n_channels = pstr_mps_state->num_input_channels;
+ WORD32 nr_samples = pstr_mps_state->time_slots;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 shift = pstr_mps_state->bits_per_sample - 16;
+ WORD32 gain = pstr_mps_state->clip_protect_gain;
+
+ WORD32 *p_ana_real = r_analysis;
+ WORD32 *p_ana_imag = i_analysis;
+
+ WORD32 *p_ana_re, *p_ana_im;
+
+ flag = qmf_bank->flag;
+ if (!flag) {
+ fp1 = qmf_bank->qmf_states_buffer;
+ fp2 = qmf_bank->qmf_states_buffer + qmf_bands;
+ } else {
+ fp2 = qmf_bank->qmf_states_buffer;
+ fp1 = qmf_bank->qmf_states_buffer + qmf_bands;
+ }
+
+ qmf_bank->qmf_states_curr_pos =
+ ((WORD32 *)(qmf_bank->qmf_states_buffer) + (qmf_bank->offset * qmf_bands));
+
+ offset = qmf_bank->offset;
+ start_co_eff_ptr_l = qmf_bank->ref_co_eff_ptr_l + qmf_bank->offset_l;
+ start_co_eff_ptr_r = qmf_bank->ref_co_eff_ptr_r - qmf_bank->offset_r;
+
+ for (i = 0; i < nr_samples; i++) {
+ const WORD16 *pcoz = qmf_table_ptr->ia_qmf_anl_addt_cos,
+ *psin = qmf_table_ptr->ia_qmf_anl_addt_sin;
+ qmf_states_curr_pos = qmf_bank->qmf_states_curr_pos;
+
+ p_ana_re = p_ana_real;
+ p_ana_im = p_ana_imag;
+
+ temp = fp1;
+ fp1 = fp2;
+ fp2 = temp;
+
+ if (flag) {
+ start_co_eff_ptr_l--;
+
+ if (start_co_eff_ptr_l == qmf_bank->ref_co_eff_ptr_l) start_co_eff_ptr_l += 5;
+ } else {
+ start_co_eff_ptr_r++;
+ if (start_co_eff_ptr_r == qmf_bank->ref_co_eff_ptr_r) start_co_eff_ptr_r -= 5;
+ }
+
+ flag++;
+ if ((flag & ONE_BIT_MASK) == 0) flag = 0;
+
+ if (shift == 0) {
+ for (k = 0; k < qmf_bands; k++) {
+ qmf_states_curr_pos[k] = ixheaacd_mps_mult32_shr_15(
+ (WORD32)time_in[n_channels * (i * qmf_bands + k) + channel], gain);
+ }
+ } else {
+ for (k = 0; k < qmf_bands; k++) {
+ WORD32 temp;
+ temp = ixheaacd_mps_mult32_shr_15(
+ (WORD32)time_in[n_channels * (i * qmf_bands + k) + channel], gain);
+
+ qmf_states_curr_pos[k] = temp >> shift;
+ }
+ }
+
+ ptr_pf_l = start_co_eff_ptr_l;
+ ptr_pf_r = start_co_eff_ptr_r;
+
+ for (k = 0; k < qmf_bands; k++) {
+ {
+ accu1 = (WORD64)((WORD64)ptr_pf_l[0] * (WORD64)fp1[k]);
+ accu1 += (WORD64)((WORD64)ptr_pf_l[1] * (WORD64)fp1[128 + k]);
+ accu1 += (WORD64)((WORD64)ptr_pf_l[2] * (WORD64)fp1[256 + k]);
+ accu1 += (WORD64)((WORD64)ptr_pf_l[3] * (WORD64)fp1[384 + k]);
+ accu1 += (WORD64)((WORD64)ptr_pf_l[4] * (WORD64)fp1[512 + k]);
+
+ accu2 = (WORD64)((WORD64)ptr_pf_r[-1] * (WORD64)fp2[k]);
+ accu2 += (WORD64)((WORD64)ptr_pf_r[-2] * (WORD64)fp2[128 + k]);
+ accu2 += (WORD64)((WORD64)ptr_pf_r[-3] * (WORD64)fp2[256 + k]);
+ accu2 += (WORD64)((WORD64)ptr_pf_r[-4] * (WORD64)fp2[384 + k]);
+ accu2 += (WORD64)((WORD64)ptr_pf_r[-5] * (WORD64)fp2[512 + k]);
+ }
+ syn_buffer[(qmf_bands << 1) - 1 - k] = (WORD32)((WORD64)accu1 >> 21);
+ syn_buffer[qmf_bands - 1 - k] = (WORD32)((WORD64)accu2 >> 21);
+ ptr_pf_l += 10;
+ ptr_pf_r -= 10;
+ }
+
+ ia_mps_enc_fwd_mod(syn_buffer, p_ana_re, p_ana_im, qmf_table_ptr);
+
+ for (m = 0; m < (qmf_bands >> 1); m++) {
+ WORD32 a_cos, b_cos, a_sin, b_sin;
+ WORD32 a_cos1, b_cos1, a_sin1, b_sin1;
+
+ WORD16 coz = *pcoz++, sin = *psin++;
+
+ a_cos = ixheaacd_mult32x16in32(p_ana_re[m], coz);
+ b_sin = ixheaacd_mult32x16in32(p_ana_im[m], sin);
+ b_cos = ixheaacd_mult32x16in32(p_ana_im[m], coz);
+ a_sin = ixheaacd_mult32x16in32(p_ana_re[m], sin);
+
+ p_ana_re[m] = ((a_cos + b_sin) << 1);
+ p_ana_im[m] = ((b_cos - a_sin) << 1);
+
+ a_cos1 = ixheaacd_mult32x16in32(p_ana_re[qmf_bands - 1 - m], coz);
+ b_sin1 = ixheaacd_mult32x16in32(p_ana_im[qmf_bands - 1 - m], sin);
+
+ a_sin1 = ixheaacd_mult32x16in32(p_ana_re[qmf_bands - 1 - m], sin);
+ p_ana_re[qmf_bands - 1 - m] = ((-a_cos1 + b_sin1) << 1);
+ b_cos1 = ixheaacd_mult32x16in32(p_ana_im[qmf_bands - 1 - m], coz);
+
+ p_ana_im[qmf_bands - 1 - m] = ((-b_cos1 - a_sin1) << 1);
+ }
+
+ qmf_bank->qmf_states_curr_pos = qmf_bank->qmf_states_curr_pos + qmf_bands;
+ offset++;
+ if (offset == 10) {
+ offset = 0;
+ qmf_bank->qmf_states_curr_pos = qmf_bank->qmf_states_buffer;
+ }
+
+ p_ana_real += MAX_NUM_QMF_BANDS;
+ p_ana_imag += MAX_NUM_QMF_BANDS;
+ }
+
+ qmf_bank->offset_l = (WORD32)(start_co_eff_ptr_l - qmf_bank->ref_co_eff_ptr_l);
+ qmf_bank->offset_r = (WORD32)(qmf_bank->ref_co_eff_ptr_r - start_co_eff_ptr_r);
+
+ qmf_bank->flag = flag;
+ qmf_bank->offset = offset;
+}
diff --git a/decoder/ixheaacd_mps_polyphase.h b/decoder/ixheaacd_mps_polyphase.h
index 79e2c8e..8144455 100644
--- a/decoder/ixheaacd_mps_polyphase.h
+++ b/decoder/ixheaacd_mps_polyphase.h
@@ -21,19 +21,11 @@
#define IXHEAACD_MPS_POLYPHASE_H
#define MAX_NUM_QMF_BANDS_SAC (128)
-#define POLY_PHASE_SYNTH_SIZE (1152)
+#define POLY_PHASE_SYNTH_SIZE (1280)
+#define QMF_BANDS_32 (32)
+#define QMF_BANDS_64 (64)
+#define QMF_BANDS_128 (128)
-typedef struct ia_mps_poly_phase_synth_struct {
- FLOAT32 state[POLY_PHASE_SYNTH_SIZE];
-} ia_mps_poly_phase_synth_struct;
+VOID ixheaacd_mps_synt_init(FLOAT32 state[POLY_PHASE_SYNTH_SIZE]);
-typedef struct ia_mps_poly_phase_struct {
- int resolution;
-} ia_mps_poly_phase_struct;
-
-VOID ixheaacd_mps_synt_create(ia_mps_poly_phase_struct *kernel,
- WORD32 resolution);
-
-VOID ixheaacd_mps_synt_init(ia_mps_poly_phase_synth_struct *self);
-
-#endif
+#endif /* IXHEAACD_MPS_POLYPHASE_H */
diff --git a/decoder/ixheaacd_mps_pre_mix.c b/decoder/ixheaacd_mps_pre_mix.c
index ffbf1e1..1406973 100644
--- a/decoder/ixheaacd_mps_pre_mix.c
+++ b/decoder/ixheaacd_mps_pre_mix.c
@@ -18,16 +18,11 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include <math.h>
-#include <memory.h>
+#include <string.h>
#include <assert.h>
#include "ixheaacd_type_def.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -38,32 +33,17 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
-
-#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
-#include "ixheaacd_type_def.h"
#include "ixheaacd_constants.h"
-#include "ixheaacd_basic_ops32.h"
-#include "ixheaacd_basic_ops40.h"
-
-#undef ABS_THR
-#define ABS_THR 1.0e-9f
-
-#define ICC_FIX
-#define UNSINGULARIZE_FIX
-#define QUANTIZE_PARS_FIX
-
-#define PI 3.14159265358979f
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_dec.h"
#define ONE_IN_Q28 (268435456)
-#define MINUS_ONE_IN_Q28 (-268435456)
-#define PI_Q28 (843314856)
-#define PI_Q27 (421657428)
#define PI_BY_8_Q28 (105414352)
#define P_PI 3.1415926535897932
#define PI_IN_Q28 843314880
-
+#define MULT(a, b) (a * b)
#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
@@ -121,14 +101,6 @@ static VOID ixheaacd_mps_buffer_pre_and_mix_matrix(
}
}
-VOID ixheaacd_fix_to_float_int(WORD32 *inp, FLOAT32 *out, WORD32 length,
- FLOAT32 q_fac) {
- WORD32 i;
- FLOAT32 m_qfac = 1.0f / q_fac;
-
- for (i = 0; i < length; i++) out[i] = (FLOAT32)(inp[i]) * m_qfac;
-}
-
VOID ixheaacd_pre_and_mix_matrix_calculation(ia_mps_dec_state_struct *self) {
WORD32 ps, pb;
ia_mps_bs_frame *curr_bit_stream = &(self->bs_frame);
@@ -211,7 +183,7 @@ static VOID ixheaacd_mps_par2umx_ps_core(WORD32 cld[MAX_PARAMETER_BANDS],
c_l_temp = (ixheaacd_c_l_table[cld_idx]);
c_r_temp = (ixheaacd_c_l_table[30 - cld_idx]);
-#define MULT(a, b) (a * b)
+
temp = ixheaacd_cos_table[icc_idx][cld_idx];
*h_real++ = MULT(temp, c_l_temp);
@@ -335,7 +307,7 @@ VOID ixheaacd_mps_par2umx_pred(ia_mps_dec_state_struct *self,
im_weight = ixheaacd_im_weight[0][icc_idx][cld_idx];
}
- *h_real++ = weight - re_weight; // h_real[0] = weight - re_weight
+ *h_real++ = weight - re_weight;
*h_imag++ = -im_weight;
*h_real++ = weight + re_weight;
*h_imag++ = im_weight;
@@ -356,15 +328,12 @@ VOID ixheaacd_mps_par2umx_pred(ia_mps_dec_state_struct *self,
}
}
-WORD32 ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
+VOID ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
WORD32 ts, qs, row;
- WORD32 err = 0;
if (self->pre_mix_req) {
- err = ixheaacd_mps_upmix_interp_type1(
+ ixheaacd_mps_upmix_interp_type1(
self->m1_param_re, self->r_out_re_in_m1, self->m1_param_re_prev,
- (self->dir_sig_count + self->decor_sig_count), 1, self,
- self->bs_high_rate_mode);
- if (err < 0) return err;
+ (self->dir_sig_count + self->decor_sig_count), 1, self, self->bs_high_rate_mode);
for (ts = 0; ts < self->time_slots; ts++) {
for (qs = 0; qs < 2; qs++) {
@@ -406,42 +375,30 @@ WORD32 ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_apply_mix_matrix(ia_mps_dec_state_struct *self) {
+VOID ixheaacd_mps_apply_mix_matrix(ia_mps_dec_state_struct *self) {
WORD32 ts, qs, row, col;
WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
- WORD32 err = 0;
WORD32 num_col_iters = 0;
+ ixheaacd_mps_upmix_interp(self->m2_decor_re, self->r_out_diff_re_in_m2, self->m2_decor_re_prev,
+ self->out_ch_count, (self->dir_sig_count + self->decor_sig_count),
+ self, 1);
- err = ixheaacd_mps_upmix_interp(
- self->m2_decor_re, self->r_out_diff_re_in_m2, self->m2_decor_re_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self, 1);
- if (err < 0)
- return err;
- err = ixheaacd_mps_upmix_interp(
- self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self, 1);
- if (err < 0)
- return err;
+ ixheaacd_mps_upmix_interp(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
+ self->out_ch_count, (self->dir_sig_count + self->decor_sig_count),
+ self, 1);
if (complex_m2 && !phase_interpolation) {
- err = ixheaacd_mps_upmix_interp(self->m2_decor_im, self->r_out_diff_im_in_m2,
+ ixheaacd_mps_upmix_interp(self->m2_decor_im, self->r_out_diff_im_in_m2,
self->m2_decor_im_prev, self->out_ch_count,
- (self->dir_sig_count + self->decor_sig_count),
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
+ ixheaacd_mps_upmix_interp(self->m2_resid_im, self->r_out_im_in_m2, self->m2_resid_im_prev,
+ self->out_ch_count, (self->dir_sig_count + self->decor_sig_count),
self, 1);
- if (err < 0)
- return err;
- err = ixheaacd_mps_upmix_interp(self->m2_resid_im, self->r_out_im_in_m2,
- self->m2_resid_im_prev, self->out_ch_count,
- (self->dir_sig_count + self->decor_sig_count),
- self, 1);
- if (err < 0)
- return err;
-
}
if (phase_interpolation) {
@@ -624,22 +581,17 @@ WORD32 ixheaacd_mps_apply_mix_matrix(ia_mps_dec_state_struct *self) {
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
+VOID ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
WORD32 ts, qs, row;
- WORD32 err = 0;
- err = ixheaacd_mps_upmix_interp_type2(
- self->m2_decor_re, self->r_out_diff_re_in_m2, self->m2_decor_re_prev,
- self->out_ch_count, self, 1);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
+ self->m2_decor_re_prev, self->out_ch_count, self, 1);
- err = ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2,
- self->m2_resid_re_prev,
- self->out_ch_count, self, 0);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
+ self->out_ch_count, self, 0);
for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
WORD32 indx = self->hyb_band_to_processing_band_table[qs];
@@ -658,39 +610,29 @@ WORD32 ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
+VOID ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
WORD32 ts, qs, row, col;
WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
- WORD32 err = 0;
WORD32 num_col_iters = 0;
- err = ixheaacd_mps_upmix_interp_type1(
- self->m2_decor_re, self->r_out_diff_re_in_m2, self->m2_decor_re_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self,
- 1);
- if (err < 0)
- return err;
- err = ixheaacd_mps_upmix_interp_type1(
- self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self,
- 1);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type1(self->m2_decor_re, self->r_out_diff_re_in_m2,
+ self->m2_decor_re_prev, self->out_ch_count,
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
+ ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
+ self->out_ch_count,
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
if (complex_m2 && !phase_interpolation) {
- err = ixheaacd_mps_upmix_interp_type1(
- self->m2_decor_im, self->r_out_diff_im_in_m2, self->m2_decor_im_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self,
- 1);
- if (err < 0) return err;
- err = ixheaacd_mps_upmix_interp_type1(
- self->m2_resid_im, self->r_out_im_in_m2, self->m2_resid_im_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self,
- 1);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type1(self->m2_decor_im, self->r_out_diff_im_in_m2,
+ self->m2_decor_im_prev, self->out_ch_count,
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
+ ixheaacd_mps_upmix_interp_type1(self->m2_resid_im, self->r_out_im_in_m2,
+ self->m2_resid_im_prev, self->out_ch_count,
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
}
if (phase_interpolation) {
@@ -869,42 +811,33 @@ WORD32 ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
+VOID ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
WORD32 ts, qs, row, col;
WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
- WORD32 err = 0;
WORD32 num_col_iters = 0;
if (self->res_bands != 28) {
- err = ixheaacd_mps_upmix_interp_type2(
- self->m2_decor_re, self->r_out_diff_re_in_m2, self->m2_decor_re_prev,
- self->out_ch_count, self, 1);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
+ self->m2_decor_re_prev, self->out_ch_count, self, 1);
}
if (self->res_bands == 0) {
num_col_iters = self->dir_sig_count;
- err = ixheaacd_mps_upmix_interp_type2(
- self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
- self->out_ch_count, self, 0);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2,
+ self->m2_resid_re_prev, self->out_ch_count, self, 0);
} else {
num_col_iters = (self->dir_sig_count + self->decor_sig_count);
- err = ixheaacd_mps_upmix_interp_type1(
- self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
- self->out_ch_count, (self->dir_sig_count + self->decor_sig_count), self,
- 1);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2,
+ self->m2_resid_re_prev, self->out_ch_count,
+ (self->dir_sig_count + self->decor_sig_count), self, 1);
}
if (complex_m2 && !phase_interpolation) {
- err = ixheaacd_mps_upmix_interp_type2(
- self->m2_resid_im, self->r_out_im_in_m2, self->m2_resid_im_prev,
- self->out_ch_count, self, 0);
- if (err < 0) return err;
+ ixheaacd_mps_upmix_interp_type2(self->m2_resid_im, self->r_out_im_in_m2,
+ self->m2_resid_im_prev, self->out_ch_count, self, 0);
}
if (phase_interpolation) {
@@ -1196,7 +1129,7 @@ WORD32 ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
}
}
} else {
- int num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
+ WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
? 1
: (self->dir_sig_count + self->decor_sig_count);
for (ts = 0; ts < self->time_slots; ts++) {
@@ -1233,23 +1166,18 @@ WORD32 ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_upmix_interp(
- FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
- WORD32 num_rows, WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode) {
+VOID ixheaacd_mps_upmix_interp(
+ FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT], WORD32 num_rows,
+ WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode) {
WORD32 ts, ps, pb, row, col, i;
FLOAT32 ks, ms, ls;
FLOAT32 fl_step, fl_base;
- if (MAX_TIME_SLOTS < (self->param_slot_diff[0]))
- return -1;
-
for (pb = 0; pb < self->bs_param_bands; pb++) {
for (row = 0; row < num_rows; row++) {
for (col = 0; col < num_cols; col++) {
@@ -1268,8 +1196,6 @@ WORD32 ixheaacd_mps_upmix_interp(
}
if (bs_high_rate_mode) {
for (ps = 1; ps < self->num_parameter_sets; ps++) {
- if (MAX_TIME_SLOTS < (ts + self->param_slot_diff[ps]))
- return -1;
ks = self->inv_param_slot_diff[ps];
ms = m_matrix[ps][pb][row][col];
ls = m_matrix[ps - 1][pb][row][col];
@@ -1286,23 +1212,18 @@ WORD32 ixheaacd_mps_upmix_interp(
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_upmix_interp_type1(
- FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
- WORD32 num_rows, WORD32 num_cols, ia_mps_dec_state_struct *self,
- WORD32 bs_high_rate_mode) {
+VOID ixheaacd_mps_upmix_interp_type1(
+ FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT], WORD32 num_rows,
+ WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode) {
WORD32 ts, ps, pb, row, col, i;
FLOAT32 ks, ms, ls;
FLOAT32 fl_step, fl_base;
- if (MAX_TIME_SLOTS < (self->param_slot_diff[0])) return -1;
-
for (pb = 0; pb < self->bs_param_bands; pb++) {
for (row = 0; row < num_rows; row++) {
for (col = 0; col < num_cols; col++) {
@@ -1321,14 +1242,13 @@ WORD32 ixheaacd_mps_upmix_interp_type1(
}
if (bs_high_rate_mode) {
for (ps = 1; ps < self->num_parameter_sets; ps++) {
- if (MAX_TIME_SLOTS < (ts + self->param_slot_diff[ps])) return -1;
ks = self->inv_param_slot_diff[ps];
ms = m_matrix[ps][pb][row][col];
ls = m_matrix[ps - 1][pb][row][col];
fl_step = ks * (ms - ls);
fl_base = ls + fl_step;
- for (i = 1; i <= (WORD32)self->param_slot_diff[ps]; i++) {
+ for (i = 1; i <= self->param_slot_diff[ps]; i++) {
r_matrix_float[ts][pb][row][col] = fl_base;
fl_base += fl_step;
ts++;
@@ -1338,22 +1258,18 @@ WORD32 ixheaacd_mps_upmix_interp_type1(
}
}
}
- return 0;
+ return;
}
-WORD32 ixheaacd_mps_upmix_interp_type2(
- FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT]
- [MAX_M_INPUT],
- FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
- WORD32 num_rows, ia_mps_dec_state_struct *self, WORD32 col) {
+VOID ixheaacd_mps_upmix_interp_type2(
+ FLOAT32 m_matrix[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 r_matrix_float[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT],
+ FLOAT32 m_matrix_prev[MAX_PARAMETER_BANDS][MAX_M_OUTPUT][MAX_M_INPUT], WORD32 num_rows,
+ ia_mps_dec_state_struct *self, WORD32 col) {
WORD32 ts, ps, pb, row, i;
FLOAT32 ks, ms, ls;
FLOAT32 fl_step, fl_base;
- if (MAX_TIME_SLOTS < (self->param_slot_diff[0])) return -1;
-
for (pb = 0; pb < self->bs_param_bands; pb++) {
for (row = 0; row < num_rows; row++) {
ts = 0;
@@ -1370,7 +1286,6 @@ WORD32 ixheaacd_mps_upmix_interp_type2(
ts++;
}
for (ps = 1; ps < self->num_parameter_sets; ps++) {
- if (MAX_TIME_SLOTS < (ts + self->param_slot_diff[ps])) return -1;
ks = self->inv_param_slot_diff[ps];
ms = m_matrix[ps][pb][row][col];
ls = m_matrix[ps - 1][pb][row][col];
@@ -1385,15 +1300,17 @@ WORD32 ixheaacd_mps_upmix_interp_type2(
}
}
}
- return 0;
+ return;
}
static FLOAT32 ixheaacd_mps_angle_interpolation(FLOAT32 angle1, FLOAT32 angle2,
FLOAT32 alpha, FLOAT32 *step) {
- while (angle2 - angle1 > (FLOAT32)P_PI)
+ while (angle2 - angle1 > (FLOAT32)P_PI) {
angle1 = angle1 + 2.0f * (FLOAT32)P_PI;
- while (angle1 - angle2 > (FLOAT32)P_PI)
+ }
+ while (angle1 - angle2 > (FLOAT32)P_PI) {
angle2 = angle2 + 2.0f * (FLOAT32)P_PI;
+ }
*step = angle2 - angle1;
return (1 - alpha) * angle1 + alpha * angle2;
}
@@ -1438,13 +1355,15 @@ VOID ixheaacd_mps_phase_interpolation(
step_l *= alpha;
step_r *= alpha;
for (i = 1; i <= self->param_slot_diff[ps]; i++) {
- r_re[ts][pb][0] = (FLOAT32)cos(tl);
- r_im[ts][pb][0] = (FLOAT32)sin(tl);
- tl += step_l;
-
- r_re[ts][pb][1] = (FLOAT32)cos(tr);
- r_im[ts][pb][1] = (FLOAT32)sin(tr);
- tr += step_r;
+ if (ts < 72 && pb < 28) {
+ r_re[ts][pb][0] = (FLOAT32)cos(tl);
+ r_im[ts][pb][0] = (FLOAT32)sin(tl);
+ tl += step_l;
+
+ r_re[ts][pb][1] = (FLOAT32)cos(tr);
+ r_im[ts][pb][1] = (FLOAT32)sin(tr);
+ tr += step_r;
+ }
ts++;
if (ts > 71) {
diff --git a/decoder/ixheaacd_mps_process.c b/decoder/ixheaacd_mps_process.c
new file mode 100644
index 0000000..5a4a5dd
--- /dev/null
+++ b/decoder/ixheaacd_mps_process.c
@@ -0,0 +1,379 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_memory_standards.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_decor.h"
+#include "ixheaacd_mps_hybfilter.h"
+#include "ixheaacd_mps_mdct_2_qmf.h"
+#include "ixheaacd_mps_get_index.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_error_standards.h"
+
+VOID ixheaacd_mdct_2_qmf(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ WORD32 ch, rfpsf, qb;
+ WORD32 qmf_global_offset;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 time_slots_x4 = (time_slots << 2);
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 *p_qmf_residual_real_post, *p_qmf_residual_imag_post;
+ VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
+
+ if (pstr_mps_state->up_mix_type != 2) {
+ WORD32 num_ch = pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
+ WORD32 rfpsf_max = pstr_mps_state->residual_frames_per_spatial_frame;
+ WORD32 upd_qmf = pstr_mps_state->upd_qmf;
+
+ WORD32 *qmf_residual_real_pre = p_array_struct->qmf_residual_real_pre;
+ WORD32 *qmf_residual_real_post = p_array_struct->qmf_residual_real_post;
+
+ WORD32 *qmf_residual_imag_pre = p_array_struct->qmf_residual_imag_pre;
+ WORD32 *qmf_residual_imag_post = p_array_struct->qmf_residual_imag_post;
+
+ WORD32 *p_res_mdct = p_array_struct->res_mdct;
+
+ for (ch = 0; ch < num_ch; ch++) {
+ if (pstr_mps_state->bs_config.bs_residual_present[ch]) {
+ WORD32 *res_mdct = p_res_mdct;
+ qmf_global_offset = 0;
+
+ p_qmf_residual_real_post = qmf_residual_real_post;
+ p_qmf_residual_imag_post = qmf_residual_imag_post;
+ for (qb = 0; qb < qmf_bands; qb++) {
+ memset(p_qmf_residual_real_post, 0, time_slots_x4);
+ memset(p_qmf_residual_imag_post, 0, time_slots_x4);
+
+ p_qmf_residual_real_post += MAX_TIME_SLOTS;
+ p_qmf_residual_imag_post += MAX_TIME_SLOTS;
+ }
+
+ for (rfpsf = 0; rfpsf < rfpsf_max; rfpsf++) {
+ ixheaacd_mdct2qmf_process(upd_qmf, res_mdct, qmf_residual_real_pre,
+ qmf_residual_real_post, qmf_residual_imag_pre,
+ qmf_residual_imag_post,
+ pstr_mps_state->res_block_type[ch][rfpsf], qmf_global_offset,
+ &(pstr_mps_state->ia_mps_dec_mps_table), scratch, time_slots);
+ qmf_global_offset += upd_qmf;
+ res_mdct += MDCTCOEFX2;
+ }
+ }
+
+ qmf_residual_real_pre += QBXTS;
+ qmf_residual_imag_pre += QBXTS;
+
+ qmf_residual_real_post += QBXTS;
+ qmf_residual_imag_post += QBXTS;
+
+ p_res_mdct += RFX2XMDCTCOEF;
+ }
+ }
+
+ if (pstr_mps_state->arbitrary_downmix == 2) {
+ WORD32 arbdmx_upd_qmf = pstr_mps_state->arbdmx_upd_qmf;
+ WORD32 offset = pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
+ WORD32 in_ch = pstr_mps_state->num_input_channels;
+ WORD32 rfpsf_max = pstr_mps_state->arbdmx_frames_per_spatial_frame;
+
+ WORD32 *qmf_residual_real_pre = p_array_struct->qmf_residual_real_pre + offset * QBXTS;
+ WORD32 *qmf_residual_imag_pre = p_array_struct->qmf_residual_imag_pre + offset * QBXTS;
+
+ WORD32 *qmf_residual_real_post = p_array_struct->qmf_residual_real_post + offset * QBXTS;
+ WORD32 *qmf_residual_imag_post = p_array_struct->qmf_residual_imag_post + offset * QBXTS;
+
+ WORD32 *p_res_mdct = p_array_struct->res_mdct + offset * RFX2XMDCTCOEF;
+
+ for (ch = 0; ch < in_ch; ch++) {
+ WORD32 *res_mdct = p_res_mdct;
+ qmf_global_offset = 0;
+
+ p_qmf_residual_real_post = qmf_residual_real_post;
+ p_qmf_residual_imag_post = qmf_residual_imag_post;
+ for (qb = 0; qb < qmf_bands; qb++) {
+ memset(p_qmf_residual_real_post, 0, time_slots_x4);
+ memset(p_qmf_residual_imag_post, 0, time_slots_x4);
+
+ p_qmf_residual_real_post += MAX_TIME_SLOTS;
+ p_qmf_residual_imag_post += MAX_TIME_SLOTS;
+ }
+
+ for (rfpsf = 0; rfpsf < rfpsf_max; rfpsf++) {
+ ixheaacd_mdct2qmf_process(
+ arbdmx_upd_qmf, res_mdct, qmf_residual_real_pre, qmf_residual_real_post,
+ qmf_residual_imag_pre, qmf_residual_imag_post,
+ pstr_mps_state->res_block_type[offset + ch][rfpsf], qmf_global_offset,
+ &(pstr_mps_state->ia_mps_dec_mps_table), scratch, time_slots);
+ qmf_global_offset += arbdmx_upd_qmf;
+ res_mdct += MDCTCOEFX2;
+ }
+
+ qmf_residual_real_pre += QBXTS;
+ qmf_residual_imag_pre += QBXTS;
+
+ qmf_residual_imag_post += QBXTS;
+ qmf_residual_real_post += QBXTS;
+
+ p_res_mdct += RFX2XMDCTCOEF;
+ }
+ }
+ return;
+}
+
+VOID ixheaacd_hybrid_qmf_analysis(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ch;
+ WORD32 in_ch = pstr_mps_state->num_input_channels;
+ WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
+ WORD32 num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
+ WORD32 num_input_channels = in_ch;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ SIZE_T *kernels = pstr_mps_state->kernels;
+ WORD32 *res_bands = pstr_mps_state->res_bands;
+ WORD32 *index = pstr_mps_state->index;
+
+ ia_mps_dec_thyb_filter_state_struct *hyb_filter_state =
+ pstr_mps_state->mps_persistent_mem.hyb_filter_state;
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+
+ ia_mps_dec_hybrid_tables_struct *hybrid_table_ptr =
+ pstr_mps_state->ia_mps_dec_mps_table.hybrid_table_ptr;
+
+ WORD32 *p_buf_real = p_array_struct->buf_real;
+ WORD32 *p_buf_imag = p_array_struct->buf_imag;
+
+ WORD32 *p_x_real = p_array_struct->x_real;
+ WORD32 *p_x_imag = p_array_struct->x_imag;
+
+ for (ch = 0; ch < in_ch; ch++) {
+ ixheaacd_apply_ana_hyb_filt_bank_create_x(&hyb_filter_state[ch], p_buf_real, p_buf_imag,
+ qmf_bands, time_slots, p_x_real, p_x_imag,
+ hybrid_table_ptr);
+ pstr_mps_state->index[ch] = hybrid_bands;
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ }
+
+ if ((pstr_mps_state->residual_coding) && (pstr_mps_state->up_mix_type != 2)) {
+ WORD32 *qmf_residual_real = p_array_struct->qmf_residual_real_pre;
+ WORD32 *qmf_residual_imag = p_array_struct->qmf_residual_imag_pre;
+
+ WORD32 *p_dry_real = p_array_struct->w_dry_real;
+ WORD32 *p_dry_imag = p_array_struct->w_dry_imag;
+
+ for (ch = 0; ch < num_ott_boxes; ch++) {
+ if (res_bands[ch] > 0) {
+ ixheaacd_apply_ana_hyb_filt_bank_merge_res_decor(
+ &hyb_filter_state[ch + num_input_channels], qmf_residual_real, qmf_residual_imag,
+ qmf_bands, time_slots, p_dry_real, p_dry_imag, hybrid_table_ptr);
+ }
+ qmf_residual_real += QBXTS;
+ qmf_residual_imag += QBXTS;
+
+ p_dry_real += TSXHB;
+ p_dry_imag += TSXHB;
+ }
+
+ for (ch = num_ott_boxes; ch < num_ott_boxes + num_ttt_boxes; ch++, in_ch++) {
+ if (res_bands[ch] > 0) {
+ ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
+ &hyb_filter_state[ch + num_input_channels], qmf_residual_real, qmf_residual_imag,
+ qmf_bands, time_slots, p_x_real, p_x_imag, kernels, res_bands[ch], hybrid_bands,
+ num_parameter_bands, &index[in_ch], hybrid_table_ptr);
+ } else
+ index[in_ch] = 0;
+
+ qmf_residual_real += QBXTS;
+ qmf_residual_imag += QBXTS;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ }
+ }
+
+ in_ch = num_input_channels + num_ttt_boxes;
+ if (pstr_mps_state->arbitrary_downmix == 2) {
+ WORD32 offset = num_ott_boxes + num_ttt_boxes;
+
+ WORD32 *qmf_residual_real = p_array_struct->qmf_residual_real_pre + offset * QBXTS;
+ WORD32 *qmf_residual_imag = p_array_struct->qmf_residual_imag_pre + offset * QBXTS;
+
+ p_x_real = p_array_struct->x_real + in_ch * TSXHB;
+ p_x_imag = p_array_struct->x_imag + in_ch * TSXHB;
+ for (ch = 0; ch < num_input_channels; ch++, in_ch++) {
+ ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
+ &hyb_filter_state[offset + ch + num_input_channels], qmf_residual_real,
+ qmf_residual_imag, qmf_bands, time_slots, p_x_real, p_x_imag, kernels,
+ pstr_mps_state->arbdmx_residual_bands, hybrid_bands, num_parameter_bands, &index[in_ch],
+ hybrid_table_ptr);
+
+ qmf_residual_real += QBXTS;
+ qmf_residual_imag += QBXTS;
+
+ p_x_real += TSXHB;
+ p_x_imag += TSXHB;
+ }
+ }
+}
+
+VOID ixheaacd_merge_res_decor(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ts, qs, row, res;
+
+ WORD32 temp_1;
+ SIZE_T *idx;
+
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+ WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
+ WORD32 num_w_channels = pstr_mps_state->num_w_channels;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ SIZE_T *kernels_ptr = pstr_mps_state->kernels;
+
+ WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
+ WORD32 *buf_real_ch4, *buf_imag_ch4;
+ WORD32 *buf_real_ch3, *buf_imag_ch3;
+
+ p_buf_real = p_array_struct->buffer_real + TSXHBX5;
+ p_buf_imag = p_array_struct->buffer_imag + TSXHBX5;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+
+ buf_real_ch4 = p_buf_real - TSXHB;
+ buf_imag_ch4 = p_buf_imag - TSXHB;
+
+ buf_real_ch3 = buf_real_ch4 - TSXHB;
+ buf_imag_ch3 = buf_imag_ch4 - TSXHB;
+
+ for (qs = 0; qs < hybrid_bands; qs++) {
+ if ((kernels_ptr[qs] < ((UWORD32)(p_aux_struct->ttt_config[0][0].stop_band)) &&
+ p_aux_struct->ttt_config[0][0].use_ttt_decorr) ||
+ (kernels_ptr[qs] >= ((UWORD32)p_aux_struct->ttt_config[1][0].start_band) &&
+ p_aux_struct->ttt_config[1][0].use_ttt_decorr)) {
+ temp_1 = (WORD32)ONE_BY_SQRT_TWO_Q30;
+
+ *p_buf_re = ixheaacd_mps_mult32_shr_30(*p_buf_re, temp_1);
+ *p_buf_re += (*buf_real_ch3 + *buf_real_ch4);
+
+ *p_buf_im = ixheaacd_mps_mult32_shr_30(*p_buf_im, temp_1);
+ *p_buf_im += (*buf_imag_ch3 + *buf_imag_ch4);
+ }
+ p_buf_re++;
+ p_buf_im++;
+
+ buf_real_ch4++;
+ buf_imag_ch4++;
+
+ buf_real_ch3++;
+ buf_imag_ch3++;
+ }
+ p_buf_real += MAX_HYBRID_BANDS;
+ p_buf_imag += MAX_HYBRID_BANDS;
+ }
+
+ if (pstr_mps_state->residual_coding) {
+ for (row = num_direct_signals; row < num_w_channels; row++) {
+ WORD32 resband;
+ res = ixheaacd_get_res_idx(pstr_mps_state, row);
+ resband = pstr_mps_state->res_bands[res];
+
+ if (resband == 1 && (num_parameter_bands == 20 || num_parameter_bands == 28))
+ pstr_mps_state->index[res] = 3;
+ else {
+ idx = &kernels_ptr[0];
+ for (qs = 0; qs < hybrid_bands; qs++) {
+ if (*idx++ >= (SIZE_T)resband) {
+ pstr_mps_state->index[res] = qs;
+ qs = hybrid_bands;
+ }
+ }
+ }
+ }
+ }
+}
+
+VOID ixheaacd_create_w(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 k;
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
+ WORD32 counter = num_direct_signals + pstr_mps_state->num_decor_signals;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 offset = num_direct_signals * TSXHB;
+ WORD32 *p_buffer_real = p_array_struct->buf_real + offset;
+ WORD32 *p_buffer_imag = p_array_struct->buf_imag + offset;
+
+ WORD32 *p_buf_real = p_array_struct->buffer_real + offset;
+ WORD32 *p_buf_imag = p_array_struct->buffer_imag + offset;
+
+ for (k = num_direct_signals; k < counter; k++) {
+ ixheaacd_decorr_apply(pstr_mps_state, time_slots, p_buffer_real, p_buffer_imag, p_buf_real,
+ p_buf_imag, k);
+
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+ }
+ ixheaacd_merge_res_decor(pstr_mps_state);
+}
+
+VOID ixheaacd_update_buffers(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ WORD32 *temp_addr = p_array_struct->qmf_residual_real_post;
+ p_array_struct->qmf_residual_real_post = p_array_struct->qmf_residual_real_pre;
+ p_array_struct->qmf_residual_real_pre = temp_addr;
+
+ temp_addr = p_array_struct->qmf_residual_imag_post;
+ p_array_struct->qmf_residual_imag_post = p_array_struct->qmf_residual_imag_pre;
+ p_array_struct->qmf_residual_imag_pre = temp_addr;
+
+ p_array_struct->buffer_real = p_array_struct->qmf_residual_real_post;
+ p_array_struct->buffer_imag = p_array_struct->qmf_residual_imag_post;
+
+ p_array_struct->m1_param = (ia_mps_dec_m1_param_struct *)p_array_struct->buffer_real;
+}
diff --git a/decoder/ixheaacd_mps_process.h b/decoder/ixheaacd_mps_process.h
index 40555fa..edf0580 100644
--- a/decoder/ixheaacd_mps_process.h
+++ b/decoder/ixheaacd_mps_process.h
@@ -20,15 +20,18 @@
#ifndef IXHEAACD_MPS_PROCESS_H
#define IXHEAACD_MPS_PROCESS_H
-VOID ixheaacd_mps_res_buf_copy(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_qmf_hyb_analysis(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_qmf_hyb_synthesis(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_decor(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_create_w(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_create_x(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_mix_res_decor(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_buffer_update(ia_mps_dec_state_struct* self);
-VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct* self);
+VOID ixheaacd_mps_qmf_hyb_analysis(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_qmf_hyb_synthesis(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_decor(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_create_w(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_mix_res_decor(ia_mps_dec_state_struct *self);
+VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct *self);
-#endif
+VOID ixheaacd_mdct_2_qmf(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_hybrid_qmf_analysis(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_create_w(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_merge_res_decor(ia_heaac_mps_state_struct *pstr_mps_state);
+VOID ixheaacd_update_buffers(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_PROCESS_H */
diff --git a/decoder/ixheaacd_mps_res.h b/decoder/ixheaacd_mps_res.h
new file mode 100644
index 0000000..b84043b
--- /dev/null
+++ b/decoder/ixheaacd_mps_res.h
@@ -0,0 +1,34 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_H
+#define IXHEAACD_MPS_RES_H
+
+#include "ixheaacd_error_codes.h"
+
+#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
+#define AAC_DEC_INVALID_CODE_BOOK IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK
+#define AAC_DEC_PREDICTION_NOT_SUPPORTED_IN_LC_AAC \
+ IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT
+#define AAC_DEC_UNIMPLEMENTED_GAIN_CONTROL_DATA \
+ IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT
+#define AAC_DEC_TNS_RANGE_ERROR IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR
+#define AAC_DEC_TNS_ORDER_ERROR IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR
+
+#endif /* IXHEAACD_MPS_RES_H */
diff --git a/decoder/ixheaacd_mps_res_block.c b/decoder/ixheaacd_mps_res_block.c
new file mode 100644
index 0000000..e4444fd
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_block.c
@@ -0,0 +1,1064 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_basic_ops.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_basic_op.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_res_block.h"
+#include "ixheaacd_mps_res_huffman.h"
+
+static PLATFORM_INLINE WORD32 ixheaacd_res_extract_symbol(WORD32 value, WORD32 l_shift,
+ WORD32 r_shift, WORD32 *pow_table_q17) {
+ WORD32 out;
+ out = (WORD16)((value << l_shift) >> r_shift);
+
+ if (out < 0) {
+ out = -out;
+ out = pow_table_q17[out];
+ out = -out;
+ } else
+ out = pow_table_q17[out];
+
+ return out;
+}
+
+static PLATFORM_INLINE WORD32 ixheaacd_res_extract_signed_symbol(WORD32 value, WORD32 l_shift,
+ WORD32 r_shift,
+ WORD32 *pow_table_q17,
+ WORD32 *temp_word,
+ WORD32 *pr_bit_pos) {
+ WORD32 out;
+ out = ixheaacd_extu(value, l_shift, r_shift);
+ if (out) {
+ WORD32 bit_pos = *pr_bit_pos;
+ out = pow_table_q17[out];
+ if (*temp_word & 0x80000000) {
+ out = -out;
+ }
+ *temp_word = *temp_word << 1;
+ bit_pos++;
+ *pr_bit_pos = bit_pos;
+ }
+ return out;
+}
+
+VOID ixheaacd_res_inverse_quant_lb(WORD32 *x_invquant, WORD t_bands, WORD32 *pow_table_q17,
+ WORD8 *pulse_data) {
+ WORD32 j;
+ WORD32 temp;
+ WORD32 q_abs;
+
+ for (j = t_bands - 1; j >= 0; j--) {
+ q_abs = *pulse_data++;
+ temp = (pow_table_q17[q_abs]);
+ *x_invquant++ = -temp;
+ }
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1(
+ ia_bit_buf_struct *it_bit_buf, WORD32 *qp, WORD16 *offsets, WORD no_bands, WORD group_no,
+ const UWORD16 *h_ori, WORD32 *pow_table_q17, WORD32 maximum_bins_short) {
+ WORD32 sp1, sp2;
+ WORD32 flush_cw;
+ WORD32 i, value, norm_val, off;
+ WORD idx, grp_idx;
+ WORD32 out1, out2;
+ WORD32 err_code = 0;
+ WORD len_idx = 0;
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = it_bit_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+
+ do {
+ len_idx = offsets[1] - offsets[0];
+ grp_idx = group_no;
+ do {
+ qp = qp + offsets[0];
+ idx = len_idx;
+ do {
+ {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+ value = sign_ret_val & (0x07FF);
+ }
+ out1 = (value & 0x3E0) >> 5;
+ out2 = value & 0x1F;
+
+ flush_cw = read_word << bit_pos;
+
+ sp1 = out1;
+ sp2 = out2;
+
+ if (out1) {
+ if (flush_cw & 0x80000000) {
+ out1 = -out1;
+ }
+ bit_pos++;
+ flush_cw = (WORD32)flush_cw << 1;
+ }
+
+ if (out2) {
+ bit_pos++;
+ if (flush_cw & 0x80000000) {
+ out2 = -out2;
+ }
+ }
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ if (sp1 == 16) {
+ i = 4;
+ value = ixheaacd_extu(read_word, bit_pos, 23);
+ value = value | 0xfffffe00;
+ norm_val = ixheaacd_norm32(value);
+
+ i += (norm_val - 22);
+ bit_pos += (norm_val - 21);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ off = ixheaacd_extu(read_word, bit_pos, 32 - i);
+
+ bit_pos += i;
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ i = off + ((WORD32)1 << i);
+
+ if (i <= IQ_TABLE_SIZE_HALF)
+ i = pow_table_q17[i];
+ else {
+ err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
+ }
+
+ if (out1 < 0) {
+ out1 = -i;
+ } else {
+ out1 = i;
+ }
+ *qp++ = out1;
+ } else {
+ if (out1 <= 0) {
+ out1 = -out1;
+ out1 = pow_table_q17[out1];
+ *qp++ = -out1;
+ } else {
+ out1 = pow_table_q17[out1];
+ *qp++ = out1;
+ }
+ }
+ if (sp2 == 16) {
+ i = 4;
+ value = ixheaacd_extu(read_word, bit_pos, 23);
+ value = value | 0xfffffe00;
+ norm_val = ixheaacd_norm32(value);
+
+ i += (norm_val - 22);
+
+ bit_pos += (norm_val - 21);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ off = ixheaacd_extu(read_word, bit_pos, 32 - i);
+
+ bit_pos += i;
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+
+ i = off + ((WORD32)1 << i);
+
+ if (i <= IQ_TABLE_SIZE_HALF)
+ i = pow_table_q17[i];
+ else {
+ err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
+ }
+
+ if (out2 < 0) {
+ out2 = -i;
+ } else {
+ out2 = i;
+ }
+ *qp++ = out2;
+ } else {
+ if (out2 <= 0) {
+ out2 = -out2;
+ out2 = pow_table_q17[out2];
+ *qp++ = -out2;
+ } else {
+ out2 = pow_table_q17[out2];
+ *qp++ = out2;
+ }
+ }
+
+ idx -= 2;
+ } while (idx != 0);
+
+ qp += (maximum_bins_short - offsets[1]);
+ grp_idx--;
+ } while (grp_idx != 0);
+
+ offsets++;
+ qp -= (maximum_bins_short * group_no);
+ no_bands--;
+ } while (no_bands >= 0);
+
+ it_bit_buf->bit_pos = bit_pos;
+ it_bit_buf->ptr_read_next = ptr_read_next - 4;
+
+ return err_code;
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1_lb(
+ ia_bit_buf_struct *it_bif_buf, WORD32 len, const UWORD16 *h_ori, WORD32 *x_invquant,
+ WORD32 *pow_table_q17, WORD8 *p_pul_arr) {
+ WORD32 sp1, sp2;
+ WORD32 flush_cw;
+ WORD32 i, value, norm_val, off;
+ WORD idx;
+ WORD32 out1, out2;
+ WORD32 err_code = 0;
+ UWORD8 *ptr_read_next = it_bif_buf->ptr_read_next;
+ WORD32 bit_pos = it_bif_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+
+ for (idx = len; idx != 0; idx -= 2) {
+ {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+ value = sign_ret_val & (0x07FF);
+ }
+
+ flush_cw = read_word << bit_pos;
+
+ out1 = (value & 0x3E0) >> 5;
+ out2 = value & 0x1F;
+
+ sp1 = out1;
+
+ if (out1) {
+ if (flush_cw & 0x80000000) {
+ out1 = -out1;
+ }
+
+ bit_pos++;
+ flush_cw = (WORD32)flush_cw << 1;
+ }
+
+ sp2 = out2;
+ if (out2) {
+ bit_pos++;
+ if (flush_cw & 0x80000000) {
+ out2 = -out2;
+ }
+ }
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+
+ if (sp1 == 16) {
+ i = 4;
+ value = ixheaacd_extu(read_word, bit_pos, 23);
+ value = value | 0xfffffe00;
+ norm_val = ixheaacd_norm32(value);
+ i += (norm_val - 22);
+ bit_pos += (norm_val - 21);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+
+ off = ixheaacd_extu(read_word, bit_pos, 32 - i);
+
+ bit_pos += i;
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ value = *p_pul_arr++;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ i = off + ((WORD32)1 << i);
+ i = add_d(i, value);
+
+ if (i <= IQ_TABLE_SIZE_HALF)
+ i = pow_table_q17[i];
+ else {
+ err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
+ }
+ if (out1 < 0) {
+ i = -i;
+ }
+ *x_invquant++ = i;
+ } else {
+ WORD8 temp = *p_pul_arr++;
+ if (out1 <= 0) {
+ out1 = sub_d(temp, out1);
+ out1 = pow_table_q17[out1];
+ *x_invquant++ = -out1;
+ } else {
+ out1 = add_d(out1, temp);
+ out1 = pow_table_q17[out1];
+ *x_invquant++ = out1;
+ }
+ }
+
+ if (sp2 == 16) {
+ i = 4;
+ value = ixheaacd_extu(read_word, bit_pos, 23);
+ value = value | 0xfffffe00;
+ norm_val = ixheaacd_norm32(value);
+
+ i += (norm_val - 22);
+
+ bit_pos += (norm_val - 21);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+
+ off = ixheaacd_extu(read_word, bit_pos, 32 - i);
+
+ bit_pos += i;
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ value = *p_pul_arr++;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+
+ i = off + ((WORD32)1 << i);
+ i = add_d(i, value);
+ if (i <= IQ_TABLE_SIZE_HALF)
+ i = pow_table_q17[i];
+ else {
+ err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
+ }
+
+ if (out2 < 0) {
+ i = -i;
+ }
+ *x_invquant++ = i;
+ } else {
+ WORD8 temp = *p_pul_arr++;
+ if (out2 <= 0) {
+ out2 = sub_d(temp, out2);
+ out2 = pow_table_q17[out2];
+ *x_invquant++ = -out2;
+ } else {
+ out2 = add_d(out2, temp);
+ out2 = pow_table_q17[out2];
+ *x_invquant++ = out2;
+ }
+ }
+ }
+
+ it_bif_buf->ptr_read_next = ptr_read_next - 4;
+ it_bif_buf->bit_pos = bit_pos;
+
+ return err_code;
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4(
+ ia_bit_buf_struct *it_bit_buf, WORD32 *qp, WORD16 *offsets, WORD no_bands, WORD group_no,
+ const UWORD16 *h_ori, WORD32 *pow_table_q17, WORD32 sign, WORD32 maximum_bins_short) {
+ WORD32 value;
+ WORD idx, grp_idx;
+ WORD idx_len;
+ WORD32 *qp_org;
+
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = it_bit_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+ qp_org = qp;
+ do {
+ idx_len = offsets[1] - offsets[0];
+ grp_idx = group_no;
+
+ do {
+ qp = qp + offsets[0];
+ idx = idx_len;
+ do {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+ value = sign_ret_val & (0x07FF);
+
+ if (sign) {
+ WORD32 temp_word;
+ temp_word = read_word << bit_pos;
+
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 24, 30, pow_table_q17, &temp_word,
+ &bit_pos);
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 26, 30, pow_table_q17, &temp_word,
+ &bit_pos);
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 28, 30, pow_table_q17, &temp_word,
+ &bit_pos);
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 30, 30, pow_table_q17, &temp_word,
+ &bit_pos);
+ } else {
+ *qp++ = ixheaacd_res_extract_symbol(value, 24, 30, pow_table_q17);
+ *qp++ = ixheaacd_res_extract_symbol(value, 26, 30, pow_table_q17);
+ *qp++ = ixheaacd_res_extract_symbol(value, 28, 30, pow_table_q17);
+ *qp++ = ixheaacd_res_extract_symbol(value, 30, 30, pow_table_q17);
+ }
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ idx -= 4;
+ } while (idx != 0);
+
+ qp += (maximum_bins_short - offsets[1]);
+ grp_idx--;
+ } while (grp_idx != 0);
+ offsets++;
+ qp = qp_org;
+ no_bands--;
+ } while (no_bands >= 0);
+
+ it_bit_buf->ptr_read_next = ptr_read_next - 4;
+ it_bit_buf->bit_pos = bit_pos;
+
+ return 0;
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4_lb(
+ ia_bit_buf_struct *it_bit_buf, WORD32 len, const UWORD16 *h_ori, WORD32 *x_invquant,
+ WORD32 *pow_table_q17, WORD8 *p_pul_arr, WORD32 sign) {
+ WORD32 value;
+ WORD idx;
+
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = it_bit_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+
+ for (idx = len; idx != 0; idx -= 4) {
+ WORD32 res;
+ WORD32 ampres, ampres1;
+ WORD32 ampres2, ampres3;
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+
+ value = sign_ret_val & (0x07FF);
+
+ if (sign) {
+ WORD32 out0, out1, out2, out3;
+ WORD32 ampout0, ampout1, ampout2, ampout3;
+ WORD32 temp_word;
+ temp_word = read_word << bit_pos;
+
+ out0 = (ixheaacd_extu(value, 24, 30));
+ ampout0 = add_d(out0, *p_pul_arr++);
+ ampout0 = pow_table_q17[ampout0];
+
+ if (out0) {
+ if (temp_word & 0x80000000) {
+ ampout0 = -ampout0;
+ }
+ temp_word = temp_word << 1;
+ bit_pos++;
+ } else {
+ ampout0 = -ampout0;
+ }
+
+ out1 = (ixheaacd_extu(value, 26, 30));
+ ampout1 = add_d(out1, *p_pul_arr++);
+ ampout1 = pow_table_q17[ampout1];
+ if (out1) {
+ if (temp_word & 0x80000000) {
+ ampout1 = -(ampout1);
+ }
+ temp_word = temp_word << 1;
+ bit_pos++;
+ } else {
+ ampout1 = -ampout1;
+ }
+ out2 = (ixheaacd_extu(value, 28, 30));
+ ampout2 = add_d(out2, *p_pul_arr++);
+ ampout2 = pow_table_q17[ampout2];
+ if (out2) {
+ if (temp_word & 0x80000000) {
+ ampout2 = -(ampout2);
+ }
+ temp_word = temp_word << 1;
+ bit_pos++;
+ } else {
+ ampout2 = -ampout2;
+ }
+
+ *x_invquant++ = ampout0;
+ *x_invquant++ = ampout1;
+ *x_invquant++ = ampout2;
+
+ out3 = (ixheaacd_extu(value, 30, 30));
+ ampout3 = add_d(out3, *p_pul_arr++);
+ ampout3 = pow_table_q17[ampout3];
+ if (out3) {
+ if (temp_word & 0x80000000) {
+ ampout3 = -(ampout3);
+ }
+ temp_word = temp_word << 1;
+ bit_pos++;
+ } else {
+ ampout3 = -ampout3;
+ }
+
+ *x_invquant++ = ampout3;
+ } else {
+ ampres = *p_pul_arr++;
+ res = (ixheaacd_res_exts(value, 24, 30));
+ if (res > 0) {
+ ampres = add_d(res, ampres);
+ ampres = pow_table_q17[ampres];
+ } else {
+ ampres = sub_d(ampres, res);
+ ampres = pow_table_q17[ampres];
+ ampres = -ampres;
+ }
+ res = (ixheaacd_res_exts(value, 26, 30));
+ ampres1 = *p_pul_arr++;
+ if (res > 0) {
+ ampres1 = add_d(res, ampres1);
+ ampres1 = pow_table_q17[ampres1];
+ } else {
+ ampres1 = sub_d(ampres1, res);
+ ampres1 = pow_table_q17[ampres1];
+ ampres1 = -ampres1;
+ }
+ res = (ixheaacd_res_exts(value, 28, 30));
+ ampres2 = *p_pul_arr++;
+ if (res > 0) {
+ ampres2 = add_d(res, ampres2);
+ ampres2 = pow_table_q17[ampres2];
+ } else {
+ ampres2 = sub_d(ampres2, res);
+ ampres2 = pow_table_q17[ampres2];
+ ampres2 = -ampres2;
+ }
+ res = (ixheaacd_res_exts(value, 30, 30));
+ ampres3 = *p_pul_arr++;
+ if (res > 0) {
+ ampres3 = add_d(res, ampres3);
+ ampres3 = pow_table_q17[ampres3];
+ } else {
+ ampres3 = sub_d(ampres3, res);
+ ampres3 = pow_table_q17[ampres3];
+ ampres3 = -ampres3;
+ }
+ *x_invquant++ = ampres;
+ *x_invquant++ = ampres1;
+ *x_invquant++ = ampres2;
+ *x_invquant++ = ampres3;
+ }
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ }
+
+ it_bit_buf->ptr_read_next = ptr_read_next - 4;
+ it_bit_buf->bit_pos = bit_pos;
+
+ return 0;
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_2(
+ ia_bit_buf_struct *it_bif_buf, WORD32 *qp, WORD16 *offsets, WORD no_bands, WORD group_no,
+ const UWORD16 *h_ori, WORD32 *pow_table_q17, WORD32 sign, WORD32 maximum_bins_short)
+
+{
+ WORD32 value;
+ WORD idx, grp_idx;
+ WORD len_idx;
+
+ WORD32 *qp_org = qp;
+
+ UWORD8 *ptr_read_next = it_bif_buf->ptr_read_next;
+ WORD32 bit_pos = it_bif_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+
+ do {
+ len_idx = offsets[1] - offsets[0];
+ grp_idx = group_no;
+ do {
+ qp += offsets[0];
+ idx = len_idx;
+ do {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+ value = sign_ret_val & (0x07FF);
+
+ if (sign) {
+ WORD32 temp_word;
+ temp_word = read_word << bit_pos;
+
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 24, 28, pow_table_q17, &temp_word,
+ &bit_pos);
+ *qp++ = ixheaacd_res_extract_signed_symbol(value, 28, 28, pow_table_q17, &temp_word,
+ &bit_pos);
+ } else {
+ *qp++ = ixheaacd_res_extract_symbol(value, 24, 28, pow_table_q17);
+ *qp++ = ixheaacd_res_extract_symbol(value, 28, 28, pow_table_q17);
+ }
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bif_buf->ptr_bit_buf_end);
+ idx -= 2;
+ } while (idx != 0);
+
+ qp += (maximum_bins_short - offsets[1]);
+ grp_idx--;
+ } while (grp_idx != 0);
+
+ offsets++;
+ qp = qp_org;
+ no_bands--;
+ } while (no_bands >= 0);
+
+ it_bif_buf->ptr_read_next = ptr_read_next - 4;
+ it_bif_buf->bit_pos = bit_pos;
+
+ return 0;
+}
+
+static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_2_lb(
+ ia_bit_buf_struct *it_bit_buf, WORD32 len, const UWORD16 *h_ori, WORD32 *x_invquant,
+ WORD32 *pow_table_q17, WORD8 *p_pul_arr, WORD32 sign) {
+ WORD32 value, res, ampres;
+ WORD idx;
+
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = it_bit_buf->bit_pos;
+ WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ ptr_read_next += 4;
+
+ for (idx = len; idx != 0; idx -= 2) {
+ {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+ UWORD16 *h;
+
+ read_word1 = read_word << bit_pos;
+
+ h = (UWORD16 *)h_ori;
+ h += (read_word1) >> (27);
+ sign_ret_val = *h;
+
+ first_offset = 5;
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+
+ value = sign_ret_val & (0x07FF);
+ }
+
+ if (sign) {
+ WORD32 out0, out1, temp_word;
+ WORD32 ampout0, ampout1;
+
+ ampout0 = *p_pul_arr++;
+ ampout1 = *p_pul_arr++;
+
+ out0 = value & 0xf0;
+
+ ampout0 = add_d(ampout0, (UWORD32)out0 >> 4);
+ ampout0 = pow_table_q17[ampout0];
+
+ out1 = value & 0xf;
+ ampout1 = add_d(out1, ampout1);
+ ampout1 = pow_table_q17[ampout1];
+
+ temp_word = read_word << bit_pos;
+ if (out0) {
+ if (temp_word & 0x80000000) {
+ ampout0 = -(ampout0);
+ }
+ bit_pos++;
+ temp_word = temp_word << 1;
+ } else {
+ ampout0 = -(ampout0);
+ }
+ if (out1) {
+ if (temp_word & 0x80000000) {
+ ampout1 = -(ampout1);
+ }
+ bit_pos++;
+ } else {
+ ampout1 = -(ampout1);
+ }
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ *x_invquant++ = ampout0;
+ *x_invquant++ = ampout1;
+ } else {
+ res = ((value << 24) >> 28);
+ ampres = *p_pul_arr++;
+ if (res > 0) {
+ ampres = add_d(res, ampres);
+ *x_invquant++ = pow_table_q17[ampres];
+ } else {
+ ampres = sub_d(ampres, res);
+ ampres = pow_table_q17[ampres];
+ *x_invquant++ = -ampres;
+ }
+
+ res = ((value << 28) >> 28);
+ value = *p_pul_arr++;
+ if (res > 0) {
+ ampres = add_d(res, value);
+ *x_invquant++ = pow_table_q17[ampres];
+ } else {
+ ampres = sub_d(value, res);
+ ampres = pow_table_q17[ampres];
+ *x_invquant++ = -ampres;
+ }
+ }
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ }
+ it_bit_buf->ptr_read_next = ptr_read_next - 4;
+ it_bit_buf->bit_pos = bit_pos;
+
+ return 0;
+}
+
+WORD ixheaacd_res_c_block_decode_huff_word_all(
+ ia_bit_buf_struct *it_bit_buf, WORD32 code_no, WORD32 *quantized_coef, WORD16 *band_offsets,
+ WORD start, WORD band, WORD group_no, ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr,
+ WORD32 maximum_bins_short) {
+ WORD ret_val = 0;
+ WORD start_bit_pos = it_bit_buf->bit_pos;
+ UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
+ const UWORD16 *h_ori = (UWORD16 *)(aac_tables_ptr->code_book[code_no]);
+ WORD32 *pow_table = (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17;
+ WORD32 no_bands = band - start - 1;
+ WORD16 *p_band_off = band_offsets + start;
+
+ if (code_no == 11) {
+ const UWORD16 *h_ori = aac_tables_ptr->res_huffmann_tables_ptr->huffman_codebook_11;
+ ret_val =
+ ixheaacd_res_c_block_decode_huff_word1(it_bit_buf, quantized_coef, p_band_off, no_bands,
+ group_no, h_ori, pow_table, maximum_bins_short);
+ } else if (code_no <= 4) {
+ WORD32 sign = 0;
+
+ if (code_no > 2) sign = 1;
+ ret_val = ixheaacd_res_c_block_decode_huff_word2_4(it_bit_buf, quantized_coef, p_band_off,
+ no_bands, group_no, h_ori, pow_table, sign,
+ maximum_bins_short);
+ }
+
+ else if (code_no <= 10) {
+ WORD32 sign = 0;
+
+ if (code_no > 6) sign = 1;
+ ret_val = ixheaacd_res_c_block_decode_huff_word2_2(it_bit_buf, quantized_coef, p_band_off,
+ no_bands, group_no, h_ori, pow_table, sign,
+ maximum_bins_short);
+ }
+ {
+ WORD bits_cons;
+ bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
+ (it_bit_buf->bit_pos - start_bit_pos));
+ it_bit_buf->cnt_bits -= bits_cons;
+ }
+ return ret_val;
+}
+
+WORD ixheaacd_res_c_block_decode_huff_word_all_lb(
+ ia_bit_buf_struct *it_bit_buf, WORD32 code_no, WORD32 len,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD32 *x_invquant, WORD8 *p_pul_arr) {
+ WORD ret_val = 0;
+ WORD start_bit_pos = it_bit_buf->bit_pos;
+ WORD32 *pow_table = (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17;
+ UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
+
+ const UWORD16 *h_ori = (UWORD16 *)(aac_tables_ptr->code_book[code_no]);
+
+ if (code_no == 11) {
+ const UWORD16 *h_ori = aac_tables_ptr->res_huffmann_tables_ptr->huffman_codebook_11;
+ ret_val = ixheaacd_res_c_block_decode_huff_word1_lb(it_bit_buf, len, h_ori, x_invquant,
+ pow_table, p_pul_arr);
+ } else if (code_no <= 4) {
+ WORD32 sign = 0;
+ if (code_no > 2) sign = 1;
+ ret_val = ixheaacd_res_c_block_decode_huff_word2_4_lb(it_bit_buf, len, h_ori, x_invquant,
+ pow_table, p_pul_arr, sign);
+ } else if (code_no <= 10) {
+ WORD32 sign = 0;
+ if (code_no > 6) sign = 1;
+ ret_val = ixheaacd_res_c_block_decode_huff_word2_2_lb(it_bit_buf, len, h_ori, x_invquant,
+ pow_table, p_pul_arr, sign);
+ }
+
+ {
+ WORD bits_cons;
+ if (it_bit_buf->bit_pos <= 7) {
+ bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
+ (it_bit_buf->bit_pos - start_bit_pos));
+ it_bit_buf->cnt_bits -= bits_cons;
+ } else {
+ it_bit_buf->ptr_read_next += (it_bit_buf->bit_pos) >> 3;
+ it_bit_buf->bit_pos = it_bit_buf->bit_pos & 0x7;
+
+ bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
+ ((it_bit_buf->bit_pos - start_bit_pos)));
+ it_bit_buf->cnt_bits -= bits_cons;
+ }
+ }
+ return ret_val;
+}
+
+static VOID ixheaacd_res_apply_one_scf(WORD32 scale_factor, WORD32 *x_invquant, WORD32 end,
+ WORD32 *scale_table_ptr) {
+ WORD32 j;
+
+ WORD32 temp_1;
+ WORD32 q_factor;
+ WORD32 buffer1;
+ WORD16 scale_short;
+
+ if (scale_factor < 24) {
+ for (j = end; j > 0; j--) {
+ *x_invquant++ = 0;
+ }
+ } else {
+ WORD32 shift;
+ q_factor = 37 - (scale_factor >> 2);
+
+ scale_short = scale_table_ptr[(scale_factor & 0x0003)];
+
+ shift = q_factor;
+
+ if (shift > 0) {
+ if (scale_short == (WORD16)0x8000) {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+
+ buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short);
+ buffer1 = ixheaacd_shr32(buffer1, shift);
+ *x_invquant++ = buffer1;
+ }
+ } else {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+
+ buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short);
+
+ buffer1 = ixheaacd_shr32(buffer1, shift);
+ *x_invquant++ = buffer1;
+ }
+ }
+ } else {
+ shift = -shift;
+ if (shift > 0) {
+ if (scale_short == (WORD16)0x8000) {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+ temp_1 = ixheaacd_shl32(temp_1, shift - 1);
+
+ buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short);
+
+ buffer1 = ixheaacd_shl32(buffer1, 1);
+ *x_invquant++ = buffer1;
+ }
+ } else {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+ temp_1 = ixheaacd_shl32(temp_1, shift - 1);
+
+ buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short);
+
+ buffer1 = ixheaacd_shl32(buffer1, 1);
+ *x_invquant++ = buffer1;
+ }
+ }
+ } else {
+ if (scale_short == (WORD16)0x8000) {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+
+ buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short);
+
+ *x_invquant++ = buffer1;
+ }
+ } else {
+ for (j = end; j > 0; j--) {
+ temp_1 = *x_invquant;
+
+ buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short);
+
+ *x_invquant++ = buffer1;
+ }
+ }
+ }
+ }
+ }
+}
+
+VOID ixheaacd_res_apply_scfs(WORD32 *x_invquant, WORD16 *sc_factor, WORD t_bands, WORD8 *offset,
+ WORD32 *scale_table_ptr) {
+ WORD32 i;
+ WORD16 scale_factor;
+
+ for (i = t_bands - 1; i >= 0; i--) {
+ scale_factor = *sc_factor++;
+ ixheaacd_res_apply_one_scf(scale_factor, x_invquant, *offset, scale_table_ptr);
+ x_invquant += *offset;
+ offset++;
+ }
+}
diff --git a/decoder/ixheaacd_mps_res_block.h b/decoder/ixheaacd_mps_res_block.h
new file mode 100644
index 0000000..f3b56b5
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_block.h
@@ -0,0 +1,56 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_BLOCK_H
+#define IXHEAACD_MPS_RES_BLOCK_H
+
+#define IQ_TABLE_SIZE_HALF 128
+
+VOID ixheaacd_res_inverse_quant_lb(WORD32 *x_invquant, WORD t_bands, WORD32 *pow_table_q17,
+ WORD8 *pulse_data);
+
+VOID ixheaacd_res_apply_scfs(WORD32 *x_invquant, WORD16 *sc_factor, WORD t_bands, WORD8 *offset,
+ WORD32 *scale_tables_ptr);
+
+WORD ixheaacd_res_c_block_decode_huff_word_all(
+ ia_bit_buf_struct *it_bit_buf, WORD32 code_no, WORD32 *qp, WORD16 *offsets, WORD start_band,
+ WORD endBand, WORD group_no, ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr,
+ WORD32 maximum_bins_short);
+
+WORD ixheaacd_res_c_block_decode_huff_word_all_lb(
+ ia_bit_buf_struct *it_bit_buf, WORD32 code_no, WORD32 len,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD32 *x_invquant, WORD8 *p_pul_arr);
+
+VOID ixheaacd_res_c_block_read_scf_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info, WORD16 global_gain,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+WORD16 ixheaacd_res_c_block_read_spec_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+WORD16 ixheaacd_c_block_read_section_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info);
+
+WORD32 ixheaacd_res_inv_quant(WORD32 *x_quant, WORD32 *pow_table_q17);
+
+#endif /* IXHEAACD_MPS_RES_BLOCK_H */
diff --git a/decoder/ixheaacd_mps_res_channel.c b/decoder/ixheaacd_mps_res_channel.c
new file mode 100644
index 0000000..a4c1c2f
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_channel.c
@@ -0,0 +1,393 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_basic_ops.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_res_pulsedata.h"
+#include "ixheaacd_mps_res_channelinfo.h"
+#include "ixheaacd_mps_res_block.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_mps_res_channel.h"
+#include "ixheaacd_basic_op.h"
+#include "ixheaacd_mps_res_tns.h"
+#include "ixheaacd_mps_res.h"
+#include "ixheaacd_mps_res_huffman.h"
+
+UWORD32 ixheaacd_res_aac_showbits_32(UWORD8 *p_read_next) {
+ UWORD8 *v = p_read_next;
+ UWORD32 b = 0;
+
+ _SWAP(v, b);
+ return b;
+}
+
+static WORD16 ixheaacd_res_c_block_read(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info, WORD16 global_gain,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr)
+
+{
+ FLAG gain_control_data_present;
+ WORD16 error_status = AAC_DEC_OK;
+
+ if (p_aac_decoder_channel_info->ics_info.window_sequence == EIGHT_SHORT_SEQUENCE) {
+ memset(p_aac_decoder_channel_info->p_scale_factor, 0, MAX_WINDOWS * MAX_SFB_SHORT * 3);
+ }
+
+ error_status = ixheaacd_c_block_read_section_data(it_bit_buf, p_aac_decoder_channel_info);
+
+ if (error_status) return error_status;
+
+ ixheaacd_res_c_block_read_scf_data(it_bit_buf, p_aac_decoder_channel_info, global_gain,
+ aac_tables_ptr);
+
+ error_status = ixheaacd_res_c_pulse_data_read(
+ it_bit_buf, &p_aac_decoder_channel_info->pulse_data, aac_tables_ptr);
+ if (error_status) return error_status;
+
+ p_aac_decoder_channel_info->tns_data.tns_data_present =
+ (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
+
+ error_status = ixheaacd_res_c_tns_read(it_bit_buf, p_aac_decoder_channel_info);
+ if (error_status) {
+ return error_status;
+ }
+
+ gain_control_data_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
+
+ if (gain_control_data_present) {
+ return (WORD16)((WORD32)AAC_DEC_UNIMPLEMENTED_GAIN_CONTROL_DATA);
+ }
+
+ {
+ it_bit_buf->bit_pos = (7 - it_bit_buf->bit_pos);
+
+ error_status = ixheaacd_res_c_block_read_spec_data(it_bit_buf, p_aac_decoder_channel_info,
+ aac_tables_ptr);
+
+ it_bit_buf->bit_pos = (7 - it_bit_buf->bit_pos);
+ }
+
+ return error_status;
+}
+
+WORD16 ixheaacd_res_read_ics(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info[CHANNELS], WORD32 num_ch,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD8 tot_sf_bands_ls[2]) {
+ WORD16 error_status = AAC_DEC_OK;
+ WORD32 ch;
+
+ for (ch = 0; ch < num_ch; ch++) {
+ ia_mps_dec_residual_channel_info_struct *p_aac_dec_ch_info = p_aac_decoder_channel_info[ch];
+ ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_dec_ch_info->ics_info;
+
+ p_aac_dec_ch_info->global_gain = (WORD16)ixheaacd_read_bits_buf(it_bit_buf, 8);
+
+ if (!p_aac_decoder_channel_info[LEFT]->common_window) {
+ error_status = ixheaacd_res_ics_read(it_bit_buf, p_ics_info, tot_sf_bands_ls);
+ if (error_status) {
+ if (it_bit_buf->cnt_bits < 0)
+ error_status = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ return error_status;
+ }
+ }
+
+ error_status = ixheaacd_res_c_block_read(it_bit_buf, p_aac_dec_ch_info,
+ p_aac_dec_ch_info->global_gain, aac_tables_ptr);
+ if (error_status) {
+ if (it_bit_buf->cnt_bits < 0)
+ error_status = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+
+ return error_status;
+ }
+ }
+
+ return error_status;
+}
+
+VOID ixheaacd_res_c_pulse_data_apply(ia_mps_dec_residual_pulse_data_struct *pulse_data,
+ WORD8 *p_pulse_arr,
+ const WORD16 *p_scale_factor_band_offsets) {
+ WORD i, number_pulse;
+ WORD32 k;
+
+ memset(p_pulse_arr, 0, sizeof(WORD32) * 256);
+
+ if (pulse_data->pulse_data_present) {
+ k = p_scale_factor_band_offsets[pulse_data->pulse_start_band];
+ number_pulse = pulse_data->number_pulse;
+
+ for (i = 0; i <= number_pulse; i++) {
+ k = add_d(k, pulse_data->pulse_offset[i]);
+ p_pulse_arr[k] = pulse_data->pulse_amp[i];
+ }
+ }
+}
+
+WORD16 ixheaacd_res_c_block_read_spec_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ WORD band, tot_bands, tot_groups = 0;
+ WORD group, groupwin, groupoffset;
+
+ WORD index;
+ WORD8 *p_code_book, *p_codebook_tmp;
+ WORD16 *p_scale_factor;
+ WORD32 *p_spectral_coefficient;
+ ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
+ WORD16 *band_offsets;
+ WORD32 maximum_bins_short = ixheaacd_shr16_dir_sat(p_ics_info->frame_length, 3);
+
+ WORD32 *p_spec_coeff_out;
+
+ p_code_book = p_aac_decoder_channel_info->p_code_book;
+ p_scale_factor = p_aac_decoder_channel_info->p_scale_factor;
+ p_spectral_coefficient = p_aac_decoder_channel_info->p_spectral_coefficient;
+ tot_groups = p_ics_info->window_groups;
+ tot_bands = p_ics_info->max_sf_bands;
+ band_offsets = (WORD16 *)ixheaacd_res_get_sfb_offsets(p_ics_info, aac_tables_ptr);
+
+ if (p_aac_decoder_channel_info->ics_info.window_sequence != EIGHT_SHORT_SEQUENCE) {
+ WORD8 *p_pul_arr = (WORD8 *)p_aac_decoder_channel_info->p_tns_scratch;
+ ixheaacd_res_c_pulse_data_apply(&p_aac_decoder_channel_info->pulse_data, p_pul_arr,
+ band_offsets);
+
+ p_spec_coeff_out = &p_spectral_coefficient[0];
+ for (band = 0; band < tot_bands;) {
+ WORD ret_val;
+ WORD32 len;
+ WORD32 code_no = p_code_book[band];
+ WORD start = band;
+
+ for (; band < tot_bands && (p_code_book[band] == code_no); band++)
+ ;
+
+ len = band_offsets[band] - band_offsets[start];
+
+ if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
+ ret_val = ixheaacd_res_c_block_decode_huff_word_all_lb(
+ it_bit_buf, code_no, len, aac_tables_ptr, p_spec_coeff_out, p_pul_arr);
+
+ if (ret_val != 0)
+ return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
+ } else {
+ if (p_aac_decoder_channel_info->pulse_data.pulse_data_present)
+ ixheaacd_res_inverse_quant_lb(
+ p_spec_coeff_out, len,
+ (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17, p_pul_arr);
+ else
+ memset(p_spec_coeff_out, 0, sizeof(WORD32) * len);
+ }
+ p_pul_arr += len;
+ p_spec_coeff_out += len;
+ }
+
+ index = 1024 - band_offsets[tot_bands];
+ memset(p_spec_coeff_out, 0, sizeof(WORD32) * index);
+ } else {
+ memset(p_spectral_coefficient, 0, sizeof(WORD32) * 1024);
+
+ groupoffset = 0;
+
+ for (group = 0; group < tot_groups; group++) {
+ WORD grp_win = p_ics_info->window_group_length[group];
+ p_codebook_tmp = &p_code_book[group * MAX_SFB_SHORT];
+ p_spec_coeff_out = &p_spectral_coefficient[groupoffset * maximum_bins_short];
+
+ for (band = 0; band < tot_bands;) {
+ WORD code_no = *p_codebook_tmp;
+ WORD start = band;
+ WORD ret_val;
+
+ for (; band < tot_bands && (*p_codebook_tmp == code_no); band++, p_codebook_tmp++)
+ ;
+
+ if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
+ ret_val = ixheaacd_res_c_block_decode_huff_word_all(
+ it_bit_buf, code_no, p_spec_coeff_out, (WORD16 *)band_offsets, start, band, grp_win,
+ aac_tables_ptr, maximum_bins_short);
+
+ if (ret_val != 0)
+ return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
+ }
+ }
+ groupoffset = (groupoffset + grp_win);
+ }
+ }
+
+ {
+ WORD8 *p_win_grp_len = &p_ics_info->window_group_length[0];
+ WORD8 *psfb_width = (WORD8 *)ixheaacd_res_get_sfb_width(p_ics_info, aac_tables_ptr);
+ WORD32 *scale_table_ptr;
+ if (120 == maximum_bins_short) {
+ scale_table_ptr = aac_tables_ptr->res_block_tables_ptr->scale_table_960;
+ } else {
+ scale_table_ptr = aac_tables_ptr->res_block_tables_ptr->scale_table;
+ }
+ do {
+ groupwin = *p_win_grp_len++;
+ do {
+ ixheaacd_res_apply_scfs(&p_spectral_coefficient[0], &p_scale_factor[0], tot_bands,
+ (WORD8 *)psfb_width, scale_table_ptr);
+
+ p_spectral_coefficient += maximum_bins_short;
+ groupwin--;
+ } while (groupwin != 0);
+
+ p_scale_factor += MAX_SFB_SHORT;
+ tot_groups--;
+ } while (tot_groups != 0);
+ }
+
+ return AAC_DEC_OK;
+}
+
+WORD16
+ixheaacd_res_c_tns_read(ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info) {
+ WORD window, window_per_frame;
+ WORD n_filt_bits, len_bits, order_bits;
+ WORD32 next_stop_band_tmp;
+
+ ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
+ ia_mps_dec_residual_tns_data *p_tns_data = &p_aac_decoder_channel_info->tns_data;
+
+ if (!p_tns_data->tns_data_present) return AAC_DEC_OK;
+
+ if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
+ n_filt_bits = 2;
+ len_bits = 6;
+ order_bits = 5;
+ window_per_frame = 1;
+ } else {
+ n_filt_bits = 1;
+ len_bits = 4;
+ order_bits = 3;
+ window_per_frame = 8;
+ }
+
+ next_stop_band_tmp = p_ics_info->total_sf_bands;
+
+ for (window = 0; window < window_per_frame; window++) {
+ WORD n_filt;
+ WORD length, coef_res;
+ p_tns_data->number_of_filters[window] = n_filt =
+ (WORD16)ixheaacd_read_bits_buf(it_bit_buf, n_filt_bits);
+
+ if (n_filt) {
+ WORD32 accu;
+ WORD index;
+ WORD nextstopband;
+
+ coef_res = ixheaacd_read_bits_buf(it_bit_buf, 1);
+
+ nextstopband = next_stop_band_tmp;
+ for (index = 0; index < n_filt; index++) {
+ WORD order;
+ ia_mps_dec_residual_filter_struct *filter = &p_tns_data->filter[window][index];
+ length = ixheaacd_read_bits_buf(it_bit_buf, len_bits);
+
+ filter->start_band = nextstopband - length;
+ filter->stop_band = nextstopband;
+
+ nextstopband = filter->start_band;
+
+ if (filter->start_band < 0) {
+ filter->order = -1;
+ return (WORD16)((WORD32)AAC_DEC_TNS_RANGE_ERROR);
+ }
+
+ filter->order = order = ixheaacd_read_bits_buf(it_bit_buf, order_bits);
+ accu = order - MAX_ORDER_LONG;
+
+ if (accu > 0) return (WORD16)((WORD32)AAC_DEC_TNS_ORDER_ERROR);
+
+ if (order) {
+ WORD i;
+ WORD32 coef, coef_compress;
+ WORD resolution, shift;
+
+ filter->direction = (WORD8)(ixheaacd_read_bits_buf(it_bit_buf, 1) ? -1 : 1);
+
+ coef_compress = ixheaacd_read_bits_buf(it_bit_buf, 1);
+
+ filter->resolution = coef_res;
+ resolution = coef_res + 3 - coef_compress;
+ shift = 32 - resolution;
+
+ for (i = 0; i < order; i++) {
+ coef = ixheaacd_read_bits_buf(it_bit_buf, resolution);
+ coef = coef << shift;
+ filter->coeff[i] = (WORD8)(coef >> shift);
+ }
+ }
+ }
+ }
+ }
+ return AAC_DEC_OK;
+}
+
+WORD32 ixheaacd_res_inv_quant(WORD32 *px_quant, WORD32 *pow_table_q17)
+
+{
+ WORD32 q1;
+ WORD32 temp;
+ WORD32 q_abs;
+ WORD16 interp;
+ WORD32 shift;
+
+ q_abs = *px_quant;
+
+ if (q_abs > (8191 + 32)) return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
+
+ if (q_abs < 1024)
+ shift = 3;
+ else
+ shift = 6;
+
+ q1 = (q_abs) >> shift;
+
+ interp = q_abs - (q1 << shift);
+
+ temp = pow_table_q17[q1 + 1] - pow_table_q17[q1];
+
+ temp = (WORD32)(temp * (WORD32)interp);
+
+ temp = temp + (pow_table_q17[q1] << shift);
+
+ if (shift == 3)
+ temp = temp << 1;
+ else
+ temp = temp << 2;
+
+ *px_quant = temp;
+
+ return 0;
+}
diff --git a/decoder/ixheaacd_mps_res_channel.h b/decoder/ixheaacd_mps_res_channel.h
new file mode 100644
index 0000000..d5adf2c
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_channel.h
@@ -0,0 +1,30 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_CHANNEL_H
+#define IXHEAACD_MPS_RES_CHANNEL_H
+
+#define LEFT 0
+
+WORD16 ixheaacd_res_read_ics(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info[CHANNELS], WORD32 num_ch,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD8 tot_sf_bands_ls[2]);
+
+#endif /* IXHEAACD_MPS_RES_CHANNEL_H */
diff --git a/decoder/ixheaacd_mps_res_channel_info.c b/decoder/ixheaacd_mps_res_channel_info.c
new file mode 100644
index 0000000..543ab03
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_channel_info.c
@@ -0,0 +1,97 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_basic_op.h"
+#include "ixheaacd_mps_res.h"
+
+const WORD16 *ixheaacd_res_get_sfb_offsets(
+ ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
+ return aac_tables_ptr->sfb_index_long;
+ } else {
+ return aac_tables_ptr->sfb_index_short;
+ }
+}
+
+const WORD8 *ixheaacd_res_get_sfb_width(ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
+ return aac_tables_ptr->sfb_index_long_width;
+ } else {
+ return aac_tables_ptr->sfb_index_short_width;
+ }
+}
+
+WORD16 ixheaacd_res_ics_read(ia_bit_buf_struct *it_bif_buf,
+ ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ WORD8 tot_sf_bands_ls[2]) {
+ WORD i;
+ WORD mask;
+ WORD tmp = 0;
+
+ tmp = ixheaacd_read_bits_buf(it_bif_buf, 4);
+ p_ics_info->window_sequence = (WORD16)((tmp & 0x6) >> 1);
+
+ if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
+ p_ics_info->total_sf_bands = tot_sf_bands_ls[0];
+
+ p_ics_info->window_groups = 1;
+ p_ics_info->window_group_length[0] = 1;
+
+ tmp = ixheaacd_read_bits_buf(it_bif_buf, 7);
+ p_ics_info->max_sf_bands = (tmp & 0x7E) >> 1;
+
+ if (tmp & 1) {
+ return (WORD16)((WORD32)AAC_DEC_PREDICTION_NOT_SUPPORTED_IN_LC_AAC);
+ }
+ } else {
+ WORD32 win_grp = 0, tmp2;
+ p_ics_info->total_sf_bands = tot_sf_bands_ls[1];
+
+ tmp = ixheaacd_read_bits_buf(it_bif_buf, 11);
+ p_ics_info->max_sf_bands = (tmp & 0x780) >> 7;
+
+ tmp2 = (tmp & 0x7F);
+
+ for (i = 0; i < 7; i++) {
+ mask = (1 << sub_d(6, i));
+ p_ics_info->window_group_length[i] = 1;
+ if (tmp2 & mask) {
+ p_ics_info->window_group_length[win_grp] =
+ add_d(p_ics_info->window_group_length[win_grp], 1);
+ } else {
+ win_grp = add_d(win_grp, 1);
+ }
+ }
+
+ p_ics_info->window_group_length[7] = 1;
+ p_ics_info->window_groups = add_d(win_grp, 1);
+ }
+
+ if (p_ics_info->max_sf_bands > p_ics_info->total_sf_bands)
+ return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
+
+ return AAC_DEC_OK;
+}
diff --git a/decoder/ixheaacd_mps_res_channelinfo.h b/decoder/ixheaacd_mps_res_channelinfo.h
new file mode 100644
index 0000000..c4fb24f
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_channelinfo.h
@@ -0,0 +1,33 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_CHANNELINFO_H
+#define IXHEAACD_MPS_RES_CHANNELINFO_H
+
+WORD16 ixheaacd_res_ics_read(ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ WORD8 tot_sf_bands_ls[2]);
+
+const WORD16 *ixheaacd_res_get_sfb_offsets(ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+const WORD8 *ixheaacd_res_get_sfb_width(ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+#endif /* IXHEAACD_MPS_RES_CHANNELINFO_H */
diff --git a/decoder/ixheaacd_mps_res_huffman.h b/decoder/ixheaacd_mps_res_huffman.h
new file mode 100644
index 0000000..b062a2c
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_huffman.h
@@ -0,0 +1,59 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_HUFFMAN_H
+#define IXHEAACD_MPS_RES_HUFFMAN_H
+
+#define _SWAP(a, b) \
+ (b = (((WORD32)a[0] << 24) | ((WORD32)a[1] << 16) | ((WORD32)a[2] << 8) | ((WORD32)a[3])))
+
+extern UWORD32 ixheaacd_res_aac_showbits_32(UWORD8 *p_read_next);
+
+static PLATFORM_INLINE WORD32 ixheaacd_res_exts(UWORD32 a, WORD32 shift_left,
+ WORD32 shift_right) {
+ WORD32 x;
+ x = (UWORD32)a << shift_left;
+ x = (WORD32)x >> shift_right;
+
+ return x;
+}
+
+static PLATFORM_INLINE UWORD32 ixheaacd_aac_read_2bytes(UWORD8 **p_read_next, WORD32 *r_bit_pos,
+ WORD32 *readword) {
+ UWORD8 *v = *p_read_next;
+ WORD32 bits_consumed = *r_bit_pos;
+
+ if ((bits_consumed - 16) >= 0) {
+ *readword = (*readword << 8) | *v;
+ v++;
+ *readword = (*readword << 8) | *v;
+ v++;
+ bits_consumed -= 16;
+ } else if ((bits_consumed - 8) >= 0) {
+ *readword = (*readword << 8) | *v;
+ v++;
+ bits_consumed -= 8;
+ }
+
+ *r_bit_pos = bits_consumed;
+ *p_read_next = v;
+ return 1;
+}
+
+#endif /* IXHEAACD_MPS_RES_HUFFMAN_H */
diff --git a/decoder/ixheaacd_mps_res_longblock.c b/decoder/ixheaacd_mps_res_longblock.c
new file mode 100644
index 0000000..eb755f7
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_longblock.c
@@ -0,0 +1,233 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_res.h"
+#include "ixheaacd_mps_res_huffman.h"
+
+#define LONG_BLOCK_SECT_LEN 5
+#define SHORT_BLOCK_SECT_LEN 3
+
+WORD16 ixheaacd_c_block_read_section_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info) {
+ WORD band;
+ WORD sect_cb;
+ WORD sect_len;
+ WORD sect_len_incr;
+ WORD sect_esc_val;
+ ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
+ WORD sfb_transmitted = p_ics_info->max_sf_bands;
+ WORD win_group = p_ics_info->window_groups;
+
+ WORD8 *p_code_book = p_aac_decoder_channel_info->p_code_book;
+ WORD8 *p_code_book_temp = p_code_book;
+ WORD32 sect_bitlen = LONG_BLOCK_SECT_LEN;
+
+ if (p_aac_decoder_channel_info->ics_info.window_sequence == EIGHT_SHORT_SEQUENCE)
+ sect_bitlen = SHORT_BLOCK_SECT_LEN;
+
+ sect_esc_val = (1 << sect_bitlen) - 1;
+
+ do {
+ band = 0;
+
+ while (band < sfb_transmitted) {
+ WORD32 temp_word;
+ sect_len = 0;
+ temp_word = ixheaacd_read_bits_buf(it_bit_buf, 4 + sect_bitlen);
+ sect_cb = temp_word >> sect_bitlen;
+ sect_len_incr = temp_word & sect_esc_val;
+
+ while (sect_len_incr == sect_esc_val) {
+ sect_len = (sect_len + sect_esc_val);
+ sect_len_incr = ixheaacd_read_bits_buf(it_bit_buf, sect_bitlen);
+ }
+
+ sect_len = (sect_len + sect_len_incr);
+
+ band = (band + sect_len);
+ if (band > sfb_transmitted) {
+ return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED);
+ }
+
+ if (sect_cb == BOOKSCL) {
+ return (WORD16)((WORD32)AAC_DEC_INVALID_CODE_BOOK);
+ }
+
+ sect_len = sect_len - 1;
+ for (; sect_len >= 0; sect_len--) {
+ *p_code_book_temp++ = sect_cb;
+ }
+ }
+ p_code_book += MAX_SFB_SHORT;
+ p_code_book_temp = p_code_book;
+ win_group--;
+ } while (win_group != 0);
+ return AAC_DEC_OK;
+}
+
+VOID ixheaacd_res_c_block_read_scf_data(
+ ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info, WORD16 global_gain,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ WORD band;
+ WORD16 position = 0;
+ WORD group;
+ WORD16 factor = global_gain;
+ WORD8 *p_code_book, *p_codebook_tmp;
+ WORD16 *p_scale_factor, *p_scale_factor_tmp;
+ WORD16 norm_value;
+ ia_mps_dec_residual_ics_info_struct *p_ics_info;
+ WORD window_groups, sfb_transmitted;
+ UWORD16 *h;
+
+ const UWORD16 *hscf = &aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_scl[1];
+
+ WORD start_bit_pos = it_bit_buf->bit_pos;
+ UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = 7 - it_bit_buf->bit_pos;
+
+ WORD32 read_word;
+ WORD32 diffbytes;
+
+ diffbytes = (WORD32)(it_bit_buf->ptr_bit_buf_end - ptr_read_next);
+ diffbytes++;
+ if (diffbytes >= 4) {
+ read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
+ diffbytes = 4;
+ ptr_read_next = it_bit_buf->ptr_read_next + 4;
+ } else {
+ WORD32 ii;
+ read_word = 0;
+ for (ii = 0; ii < diffbytes; ii++) {
+ read_word = (read_word << 8) | (*ptr_read_next);
+ ptr_read_next++;
+ }
+ read_word <<= ((4 - diffbytes) << 3);
+ }
+ p_code_book = p_aac_decoder_channel_info->p_code_book;
+
+ p_ics_info = &p_aac_decoder_channel_info->ics_info;
+ sfb_transmitted = p_ics_info->max_sf_bands;
+
+ p_scale_factor = p_aac_decoder_channel_info->p_scale_factor;
+ window_groups = p_ics_info->window_groups;
+ band = sfb_transmitted - 1;
+
+ for (group = 0; group < window_groups; group++) {
+ p_codebook_tmp = &p_code_book[group * MAX_SFB_SHORT];
+ p_scale_factor_tmp = &p_scale_factor[group * MAX_SFB_SHORT];
+ for (band = sfb_transmitted - 1; band >= 0; band--) {
+ WORD32 cb_num = *p_codebook_tmp++;
+
+ if (cb_num == ZERO_HCB)
+ *p_scale_factor_tmp++ = 0;
+ else {
+ {
+ WORD32 flag = 1;
+ WORD pns_band;
+ ia_mps_dec_residual_pns_data_struct *p_pns_data = &p_aac_decoder_channel_info->pns_data;
+ if (cb_num == NOISE_HCB && (p_pns_data->pns_active != 1)) flag = 0;
+
+ if (flag) {
+ UWORD16 first_offset;
+ WORD16 sign_ret_val;
+ UWORD32 read_word1;
+
+ read_word1 = read_word << bit_pos;
+ h = (UWORD16 *)(hscf);
+ first_offset = 7;
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+
+ while (sign_ret_val > 0) {
+ bit_pos += first_offset;
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ read_word1 = (read_word1) << (first_offset);
+
+ first_offset = (sign_ret_val >> 11);
+ first_offset = (sign_ret_val >> 11);
+ h += sign_ret_val & (0x07FF);
+ h += (read_word1) >> (32 - first_offset);
+ sign_ret_val = *h;
+ }
+
+ bit_pos += ((sign_ret_val & 0x7fff) >> 11);
+
+ ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
+ it_bit_buf->ptr_bit_buf_end);
+ norm_value = (sign_ret_val & (0x07FF)) - 60;
+ } else {
+ WORD32 noise_start_value;
+ UWORD32 temp;
+ temp = (read_word << bit_pos);
+ temp = ((UWORD32)temp >> (32 - 9));
+ noise_start_value = temp;
+ bit_pos += 9;
+
+ ixheaacd_aac_read_2bytes(&ptr_read_next, &bit_pos, &read_word);
+
+ norm_value = noise_start_value - 256;
+ p_pns_data->pns_active = 1;
+
+ p_pns_data->current_energy = global_gain - NOISE_OFFSET;
+ }
+
+ if (cb_num > NOISE_HCB) {
+ position = position + norm_value;
+ *p_scale_factor_tmp++ = -position;
+ } else if (cb_num < NOISE_HCB) {
+ factor = factor + norm_value;
+ *p_scale_factor_tmp++ = factor;
+ } else {
+ p_pns_data->current_energy =
+ ixheaacd_add16_sat(p_pns_data->current_energy, norm_value);
+
+ pns_band = (group << 4) + sfb_transmitted - band - 1;
+ p_aac_decoder_channel_info->p_scale_factor[pns_band] = p_pns_data->current_energy;
+
+ p_pns_data->pns_used[pns_band] = 1;
+ p_scale_factor_tmp++;
+ }
+ }
+ }
+ }
+ }
+
+ it_bit_buf->ptr_read_next = ptr_read_next - diffbytes;
+
+ it_bit_buf->bit_pos = 7 - bit_pos;
+ {
+ WORD bits_cons;
+ bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
+ (start_bit_pos - it_bit_buf->bit_pos));
+ it_bit_buf->cnt_bits -= bits_cons;
+ }
+}
diff --git a/decoder/ixheaacd_mps_res_pns_js_thumb.c b/decoder/ixheaacd_mps_res_pns_js_thumb.c
new file mode 100644
index 0000000..dc45f73
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_pns_js_thumb.c
@@ -0,0 +1,175 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_res_channelinfo.h"
+#include "ixheaacd_mps_res_tns.h"
+
+static PLATFORM_INLINE WORD16 ixheaacd_res_get_maximum_tns_bands(
+ ia_mps_dec_residual_ics_info_struct *p_ics_info,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD32 *win_len) {
+ WORD32 i = 0;
+ *win_len = 1;
+
+ if (p_ics_info->window_sequence == EIGHT_SHORT_SEQUENCE) {
+ *win_len = 8;
+ i = 1;
+ }
+
+ return aac_tables_ptr->res_block_tables_ptr
+ ->tns_max_bands_tbl[p_ics_info->sampling_rate_index][i];
+}
+
+VOID ixheaacd_res_tns_decode_coeffs_32x16(const ia_mps_dec_residual_filter_struct *filter,
+ WORD16 *a,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ WORD tmp;
+ WORD16 *aptr = a;
+ WORD16 *tns_coeff_ptr;
+ WORD8 offset = 4;
+ WORD8 *p_coeff = (WORD8 *)&filter->coeff[0];
+ WORD32 tmp1;
+
+ tmp = filter->resolution;
+ tns_coeff_ptr = aac_tables_ptr->res_block_tables_ptr->tns_coeff3_16;
+ if (tmp) {
+ tns_coeff_ptr = aac_tables_ptr->res_block_tables_ptr->tns_coeff4_16;
+ offset = offset << 1;
+ }
+ tmp1 = filter->order;
+ do {
+ WORD8 temp = *p_coeff++;
+ *aptr++ = tns_coeff_ptr[temp + offset];
+ tmp1--;
+ } while (tmp1 != 0);
+}
+
+VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info,
+ WORD16 max_sfb,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ WORD i;
+ WORD16 scale_lpc;
+
+ ia_mps_dec_residual_tns_data *p_tns_data = &p_aac_decoder_channel_info->tns_data;
+ WORD32 *p_spectrum = p_aac_decoder_channel_info->p_spectral_coefficient;
+
+ WORD window, index, start, stop, size, scale_spec;
+ ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
+ WORD win_len, tns_max_bands;
+ WORD16 maximum_bins_short = ixheaacd_shr16_dir_sat(p_ics_info->frame_length, 3);
+
+ WORD32 coeff_parc[MAX_ORDER + 1];
+ WORD32 lpc[MAX_ORDER + 1];
+
+ const WORD16 *scale_factor_bands_tbl;
+
+ if (!p_tns_data->tns_data_present) return;
+
+ tns_max_bands = ixheaacd_res_get_maximum_tns_bands(p_ics_info, aac_tables_ptr, &win_len);
+
+ scale_factor_bands_tbl =
+ ixheaacd_res_get_sfb_offsets(&p_aac_decoder_channel_info->ics_info, aac_tables_ptr);
+
+ for (window = 0; window < win_len; window++) {
+ WORD ind_len = p_tns_data->number_of_filters[window];
+
+ for (index = 0; index < ind_len; index++) {
+ ia_mps_dec_residual_filter_struct *filter = &p_tns_data->filter[window][index];
+
+ if (filter->order <= 0) continue;
+
+ ixheaacd_res_tns_decode_coeffs_32x16(filter, (WORD16 *)coeff_parc, aac_tables_ptr);
+
+ start = ixheaacd_min32(ixheaacd_min32(filter->start_band, tns_max_bands), max_sfb);
+
+ start = scale_factor_bands_tbl[start];
+
+ stop = ixheaacd_min32(ixheaacd_min32(filter->stop_band, tns_max_bands), max_sfb);
+
+ stop = scale_factor_bands_tbl[stop];
+
+ size = (stop - start);
+ if (size <= 0) continue;
+
+ ixheaacd_res_tns_parcor_2_lpc_32x16((WORD16 *)coeff_parc, (WORD16 *)lpc, &scale_lpc,
+ filter->order);
+ {
+ WORD32 *p_tmp = p_spectrum + (window * maximum_bins_short) + start;
+ scale_spec = ixheaacd_res_calc_max_spectral_line(p_tmp, size);
+ }
+
+ scale_spec = ((scale_spec - 4) - scale_lpc);
+
+ if (scale_spec > 0) {
+ WORD shift;
+
+ scale_spec = ixheaacd_min32(scale_spec, 31);
+
+ if (filter->direction == -1)
+ shift = stop - 1;
+ else
+ shift = start;
+
+ ixheaacd_res_tns_ar_filter_fixed_32x16(&p_spectrum[(window * maximum_bins_short) + shift],
+ size, filter->direction, (WORD16 *)lpc,
+ filter->order, (WORD32)scale_lpc, scale_spec);
+ } else {
+ WORD shift;
+ WORD32 *p_tmp = p_spectrum + (window * maximum_bins_short) + start;
+
+ scale_spec = -scale_spec;
+ scale_spec = ixheaacd_min32(scale_spec, 31);
+
+ for (i = size; i != 0; i--) {
+ *p_tmp = (*p_tmp >> scale_spec);
+ p_tmp++;
+ }
+
+ if (filter->direction == -1)
+ shift = stop - 1;
+ else
+ shift = start;
+
+ {
+ WORD32 shift_val = scale_lpc;
+
+ ixheaacd_res_tns_ar_filter_fixed_32x16(
+ &p_spectrum[(window * maximum_bins_short) + shift], size, filter->direction,
+ (WORD16 *)lpc, filter->order, shift_val, 0);
+ }
+ {
+ p_tmp = p_spectrum + (window * maximum_bins_short) + start;
+ i = size;
+ do {
+ *p_tmp = (*p_tmp << scale_spec);
+ p_tmp++;
+ i--;
+ } while (i != 0);
+ }
+ }
+ }
+ }
+}
diff --git a/decoder/ixheaacd_mps_res_pulsedata.c b/decoder/ixheaacd_mps_res_pulsedata.c
new file mode 100644
index 0000000..4cd2662
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_pulsedata.c
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_error_codes.h"
+
+WORD32 ixheaacd_res_c_pulse_data_read(ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_pulse_data_struct *pulse_data,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
+ WORD32 i, k;
+ WORD32 error = 0;
+ pulse_data->pulse_data_present = (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
+ if (pulse_data->pulse_data_present) {
+ WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 8);
+ pulse_data->number_pulse = tmp >> 6;
+ pulse_data->pulse_start_band = tmp & 0x3F;
+
+ if (pulse_data->pulse_start_band >= 52) {
+ return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
+ }
+
+ k = aac_tables_ptr->sfb_index_long[pulse_data->pulse_start_band];
+
+ for (i = 0; i <= pulse_data->number_pulse; i++) {
+ WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 9);
+ pulse_data->pulse_offset[i] = tmp >> 4;
+ pulse_data->pulse_amp[i] = tmp & 0xF;
+
+ k += pulse_data->pulse_offset[i];
+ if (k >= 1024) error = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
+ }
+ }
+
+ return error;
+}
diff --git a/decoder/ixheaacd_mps_res_pulsedata.h b/decoder/ixheaacd_mps_res_pulsedata.h
new file mode 100644
index 0000000..ccc3079
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_pulsedata.h
@@ -0,0 +1,27 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_PULSEDATA_H
+#define IXHEAACD_MPS_RES_PULSEDATA_H
+
+WORD32 ixheaacd_res_c_pulse_data_read(ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_pulse_data_struct *pulse_data,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+#endif /* IXHEAACD_MPS_RES_PULSEDATA_H */
diff --git a/decoder/ixheaacd_mps_res_rom.h b/decoder/ixheaacd_mps_res_rom.h
new file mode 100644
index 0000000..cc60be7
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_rom.h
@@ -0,0 +1,89 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_ROM_H
+#define IXHEAACD_MPS_RES_ROM_H
+
+typedef struct {
+ WORD32 pow_table_q17[129];
+ WORD32 scale_table[4];
+ WORD32 scale_table_960[4];
+ WORD8 tns_max_bands_tbl[12][2];
+ WORD16 tns_coeff3_16[8];
+ WORD16 tns_coeff4_16[16];
+} ia_mps_dec_res_block_tables_struct;
+
+extern const ia_mps_dec_res_block_tables_struct ixheaacd_mps_dec_res_block_tables;
+
+typedef struct {
+ WORD8 sfb_96_1024[42 + 1];
+ WORD8 sfb_96_128[13 + 1];
+ WORD8 sfb_64_1024[48 + 1];
+ WORD8 sfb_48_1024[50 + 1];
+ WORD8 sfb_48_128[15 + 1];
+ WORD8 sfb_32_1024[52 + 1];
+ WORD8 sfb_24_1024[48 + 1];
+ WORD8 sfb_24_128[16 + 1];
+ WORD8 sfb_16_1024[44 + 1];
+ WORD8 sfb_16_128[16 + 1];
+ WORD8 sfb_8_1024[41 + 1];
+ WORD8 sfb_8_128[16 + 1];
+ WORD8 sfb_96_960[40 + 1];
+ WORD8 sfb_96_120[12 + 1];
+ WORD8 sfb_64_960[46 + 1];
+ WORD8 sfb_48_960[49 + 1];
+ WORD8 sfb_48_120[14 + 1];
+ WORD8 sfb_24_960[46 + 1];
+ WORD8 sfb_24_120[15 + 1];
+ WORD8 sfb_16_960[42 + 1];
+ WORD8 sfb_16_120[15 + 1];
+ WORD8 sfb_8_960[40 + 1];
+ WORD8 sfb_8_120[15 + 1];
+
+ UWORD16 huffman_code_book_1[108];
+ UWORD16 huffman_code_book_2[110];
+ UWORD16 huffman_code_book_3[136];
+ UWORD16 huffman_code_book_4[116];
+ UWORD16 huffman_code_book_5[126];
+ UWORD16 huffman_code_book_6[120];
+ UWORD16 huffman_code_book_7[112];
+ UWORD16 huffman_code_book_8[92];
+ UWORD16 huffman_code_book_9[236];
+ UWORD16 huffman_code_book_10[218];
+ UWORD16 huffman_codebook_11[344];
+ UWORD16 huffman_code_book_scl[273];
+
+} ia_mps_dec_res_huffmann_tables_struct;
+
+extern const ia_mps_dec_res_huffmann_tables_struct ixheaacd_mps_dec_res_huffmann_tables;
+
+typedef struct {
+ ia_mps_dec_res_block_tables_struct *res_block_tables_ptr;
+ ia_mps_dec_res_huffmann_tables_struct *res_huffmann_tables_ptr;
+ WORD8 *scale_factor_bands_long[24];
+ WORD8 *scale_factor_bands_short[24];
+ WORD16 *sfb_index_long;
+ WORD16 *sfb_index_short;
+ WORD8 *sfb_index_long_width;
+ WORD8 *sfb_index_short_width;
+ UWORD16 *code_book[13];
+
+} ia_mps_dec_residual_aac_tables_struct;
+
+#endif /* IXHEAACD_MPS_RES_ROM_H */
diff --git a/decoder/ixheaacd_mps_res_tns.c b/decoder/ixheaacd_mps_res_tns.c
new file mode 100644
index 0000000..b34414c
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_tns.c
@@ -0,0 +1,152 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_basic_ops.h"
+#include "ixheaacd_defines.h"
+
+VOID ixheaacd_res_tns_parcor_2_lpc_32x16(WORD16 *parcor, WORD16 *lpc, WORD16 *scale, WORD order)
+
+{
+ WORD i, j, status;
+ WORD32 z1;
+ WORD16 z[MAX_ORDER + 1];
+ WORD16 w[MAX_ORDER + 1];
+ WORD32 accu1, accu2;
+
+ status = 1;
+ *scale = 0;
+ while (status) {
+ status = 0;
+
+ for (i = MAX_ORDER; i >= 0; i--) {
+ z[i] = 0;
+ w[i] = 0;
+ }
+
+ accu1 = (0x7fffffff >> *scale);
+
+ for (i = 0; i <= order; i++) {
+ z1 = accu1;
+
+ for (j = 0; j < order; j++) {
+ w[j] = ixheaacd_round16(accu1);
+
+ accu1 = ixheaacd_mac16x16in32_shl_sat(accu1, parcor[j], z[j]);
+ if (ixheaacd_abs32_sat(accu1) == 0x7fffffff) status = 1;
+ }
+ for (j = (order - 1); j >= 0; j--) {
+ accu2 = ixheaacd_deposit16h_in32(z[j]);
+ accu2 = ixheaacd_mac16x16in32_shl_sat(accu2, parcor[j], w[j]);
+ z[j + 1] = ixheaacd_round16(accu2);
+ if (ixheaacd_abs32_sat(accu2) == 0x7fffffff) status = 1;
+ }
+
+ z[0] = ixheaacd_round16(z1);
+ lpc[i] = ixheaacd_round16(accu1);
+ accu1 = 0;
+ }
+ accu1 = (status - 1);
+ if (accu1 == 0) {
+ *scale = *scale + 1;
+ }
+ }
+}
+
+VOID ixheaacd_res_tns_ar_filter_fixed_32x16(WORD32 *spectrum, WORD32 size, WORD32 inc,
+ WORD16 *lpc, WORD32 order, WORD32 shift_value,
+ WORD scale_spec) {
+ WORD32 i, j;
+ WORD32 y, state[MAX_ORDER + 1];
+
+ if ((order & 3) != 0) {
+ for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
+ lpc[i] = 0;
+ }
+ lpc[i] = 0;
+ order = ((order & 0xfffffffc) + 4);
+ order = order & 31;
+ }
+
+ for (i = 0; i < order; i++) {
+ y = (*spectrum) << scale_spec;
+ for (j = i; j > 0; j--) {
+ y = ixheaacd_sub32_sat(y, ixheaacd_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
+ state[j] = state[j - 1];
+ }
+
+ state[0] = ixheaacd_shl32_dir_sat_limit(y, shift_value);
+ *spectrum = y >> scale_spec;
+ spectrum += inc;
+ }
+
+ for (i = order; i < size; i++) {
+ y = (*spectrum) << scale_spec;
+
+ for (j = order; j > 0; j--) {
+ y = ixheaacd_sub32_sat(y, ixheaacd_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
+ state[j] = state[j - 1];
+ }
+
+ state[0] = ixheaacd_shl32_dir_sat_limit(y, shift_value);
+ *spectrum = y >> scale_spec;
+ spectrum += inc;
+ }
+}
+
+WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size) {
+ WORD32 max_spectral_line = 0, i;
+ WORD count, remaining, temp_1, temp_2, temp3, temp4;
+
+ count = size >> 3;
+ for (i = count; i--;) {
+ temp_1 = *p_tmp++;
+ temp_2 = *p_tmp++;
+ temp3 = *p_tmp++;
+ temp4 = *p_tmp++;
+
+ max_spectral_line = ixheaacd_abs32_nrm(temp_1) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp_2) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp3) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp4) | max_spectral_line;
+ temp_1 = *p_tmp++;
+ temp_2 = *p_tmp++;
+ temp3 = *p_tmp++;
+ temp4 = *p_tmp++;
+
+ max_spectral_line = ixheaacd_abs32_nrm(temp_1) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp_2) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp3) | max_spectral_line;
+ max_spectral_line = ixheaacd_abs32_nrm(temp4) | max_spectral_line;
+ }
+
+ remaining = size - (count << 3);
+ if (remaining) {
+ for (i = remaining; i--;) {
+ max_spectral_line = ixheaacd_abs32_nrm(*p_tmp) | max_spectral_line;
+ p_tmp++;
+ }
+ }
+
+ return ixheaacd_norm32(max_spectral_line);
+}
diff --git a/decoder/ixheaacd_mps_res_tns.h b/decoder/ixheaacd_mps_res_tns.h
new file mode 100644
index 0000000..3ef5346
--- /dev/null
+++ b/decoder/ixheaacd_mps_res_tns.h
@@ -0,0 +1,39 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RES_TNS_H
+#define IXHEAACD_MPS_RES_TNS_H
+
+VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info,
+ WORD16 max_sfb,
+ ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr);
+
+WORD16
+ixheaacd_res_c_tns_read(ia_bit_buf_struct *it_bit_buf,
+ ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info);
+
+WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size);
+
+VOID ixheaacd_res_tns_parcor_2_lpc_32x16(WORD16 *parcor, WORD16 *lpc, WORD16 *scale, WORD order);
+
+VOID ixheaacd_res_tns_ar_filter_fixed_32x16(WORD32 *spectrum, WORD32 size, WORD32 inc,
+ WORD16 *lpc, WORD32 order, WORD32 shift_value,
+ WORD scale_spec);
+
+#endif /* IXHEAACD_MPS_RES_TNS_H */
diff --git a/decoder/ixheaacd_mps_reshape_bb_env.c b/decoder/ixheaacd_mps_reshape_bb_env.c
new file mode 100644
index 0000000..773722a
--- /dev/null
+++ b/decoder/ixheaacd_mps_reshape_bb_env.c
@@ -0,0 +1,587 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_reshape_bb_env.h"
+#include "ixheaacd_error_standards.h"
+
+#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
+
+VOID ixheaacd_init_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 k, j;
+ ia_mps_dec_reshape_bb_env_state_struct *reshape_bb_env_state =
+ pstr_mps_state->mps_persistent_mem.reshape_bb_env_state;
+
+ for (k = 0; k < 2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS; k++) {
+ reshape_bb_env_state->norm_nrg_prev[k] = ONE_IN_Q30;
+ reshape_bb_env_state->frame_nrg_prev[k] = 0;
+ reshape_bb_env_state->q_frame_nrg_prev[k] = 30;
+ reshape_bb_env_state->q_norm_nrg_prev[k] = 30;
+ for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
+ reshape_bb_env_state->part_nrg_prev[k][j] = 0;
+ reshape_bb_env_state->q_part_nrg_prev[k][j] = 30;
+ }
+ }
+}
+
+static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 inp,
+ WORD32 ch, WORD32 *env, VOID *scratch, WORD32 flag) {
+ ia_mps_dec_reshape_bb_env_state_struct *reshape_bb_env_state =
+ pstr_mps_state->mps_persistent_mem.reshape_bb_env_state;
+ WORD64 *slot_nrg_fix, *slot_nrg;
+ WORD16 *q_slot_nrg_fix, *q_slot_nrg;
+ WORD32 *part_nrg_fix;
+ WORD16 *q_part_nrg_fix;
+
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
+ WORD32 ts, qs, pb;
+
+ WORD32 start_p = 10;
+ WORD32 end_p = 18;
+ WORD32 env_fix_l;
+ WORD16 q_env_fix_l;
+
+ WORD16 alpha_fix = ALPHA_Q15;
+ WORD16 beta_fix = BETA_Q15;
+
+ WORD16 one_min_alpha_fix = ONE_MINUS_ALPHA_Q16;
+ WORD16 one_min_beta_fix = ONE_MINUS_BETA_Q16;
+ WORD16 one_by_nine = ONE_BY_NINE_Q16;
+ WORD32 frame_nrg_fix = 0;
+ WORD32 *norm_nrg_fix;
+ WORD16 q_frame_nrg_fix = 0;
+ WORD16 *q_norm_nrg_fix;
+ WORD32 temp_1, temp4;
+ WORD16 qtemp1, q_env;
+
+ WORD32 prev_ch_offs;
+ WORD32 cnt = min(42, pstr_mps_state->hybrid_bands);
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ WORD32 *hyb_output_real_dry, *n_slot_nrg;
+ WORD32 *hyb_output_imag_dry;
+
+ const WORD32 *bb_env_kernels =
+ pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->kernel_table.bb_env_kernels;
+
+ q_slot_nrg_fix = (WORD16 *)scratch;
+ n_slot_nrg = (WORD32 *)((WORD8 *)scratch + RESHAPE_OFFSET_1);
+ slot_nrg_fix = (WORD64 *)ALIGN_SIZE64((SIZE_T)((WORD8 *)scratch + RESHAPE_OFFSET_2));
+ switch (inp) {
+ WORD32 frame_nrg_prev;
+ WORD16 q_frame_nrg_prev;
+ WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag;
+
+ case INP_DRY_WET:
+ frame_nrg_prev = reshape_bb_env_state->frame_nrg_prev[ch];
+ q_frame_nrg_prev = reshape_bb_env_state->q_frame_nrg_prev[ch];
+
+ part_nrg_fix = &reshape_bb_env_state->part_nrg_prev[ch][0];
+ q_part_nrg_fix = &reshape_bb_env_state->q_part_nrg_prev[ch][0];
+
+ norm_nrg_fix = &reshape_bb_env_state->norm_nrg_prev[ch];
+ q_norm_nrg_fix = &reshape_bb_env_state->q_norm_nrg_prev[ch];
+
+ p_buffer_real = pstr_mps_state->array_struct->buf_real + ch * TSXHB + 12;
+ p_buffer_imag = pstr_mps_state->array_struct->buf_imag + ch * TSXHB + 12;
+
+ p_hyb_out_dry_real = pstr_mps_state->array_struct->hyb_output_real_dry + ch * TSXHB + 12;
+ p_hyb_out_dry_imag = pstr_mps_state->array_struct->hyb_output_imag_dry + ch * TSXHB + 12;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ WORD32 prev_idx = 10;
+
+ slot_nrg = slot_nrg_fix + 4;
+ for (pb = 14; pb <= end_p; pb++) *slot_nrg++ = 0;
+
+ slot_nrg = slot_nrg_fix;
+
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ hyb_output_real_dry = p_hyb_out_dry_real;
+ hyb_output_imag_dry = p_hyb_out_dry_imag;
+
+ for (qs = 12; qs < 16; qs++) {
+ temp_1 = (*hyb_output_real_dry + *p_buffer_re);
+ temp4 = (*hyb_output_imag_dry + *p_buffer_im);
+
+ *slot_nrg++ = (WORD64)temp_1 * (WORD64)temp_1 + (WORD64)temp4 * (WORD64)temp4;
+
+ p_buffer_re++;
+ p_buffer_im++;
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+ prev_idx = 14;
+ for (; qs < 30; qs++) {
+ WORD32 idx = bb_env_kernels[qs];
+ if (prev_idx != idx) {
+ slot_nrg++;
+ prev_idx = idx;
+ }
+ temp_1 = (*hyb_output_real_dry + *p_buffer_re);
+ temp4 = (*hyb_output_imag_dry + *p_buffer_im);
+
+ *slot_nrg += (WORD64)temp_1 * (WORD64)temp_1 + (WORD64)temp4 * (WORD64)temp4;
+
+ p_buffer_re++;
+ p_buffer_im++;
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+ slot_nrg++;
+ for (; qs < cnt; qs++) {
+ temp_1 = (*hyb_output_real_dry + *p_buffer_re);
+ temp4 = (*hyb_output_imag_dry + *p_buffer_im);
+
+ *slot_nrg += (WORD64)temp_1 * (WORD64)temp_1 + (WORD64)temp4 * (WORD64)temp4;
+
+ p_buffer_re++;
+ p_buffer_im++;
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+
+ slot_nrg = slot_nrg_fix;
+ q_slot_nrg = q_slot_nrg_fix;
+
+ frame_nrg_fix = 0;
+ q_frame_nrg_fix = 30;
+ for (pb = start_p; pb <= end_p; pb++) {
+ *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg);
+ slot_nrg++;
+ temp_1 = ixheaacd_mult32x16in32(*n_slot_nrg, one_min_alpha_fix);
+ temp4 = ixheaacd_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix);
+ part_nrg_fix[pb] =
+ ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg);
+
+ frame_nrg_fix = ixheaacd_mps_reshape_add32(frame_nrg_fix, *n_slot_nrg++,
+ &q_frame_nrg_fix, *q_slot_nrg++);
+ }
+
+ frame_nrg_fix = ixheaacd_mult32x16in32(frame_nrg_fix, one_by_nine);
+
+ temp_1 = ixheaacd_mult32x16in32(frame_nrg_fix, one_min_alpha_fix);
+ temp4 = ixheaacd_mult32x16in32((frame_nrg_prev) << 1, alpha_fix);
+ frame_nrg_fix =
+ ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev);
+
+ frame_nrg_prev = frame_nrg_fix;
+ q_frame_nrg_prev = q_frame_nrg_fix;
+
+ env_fix_l = 0;
+ q_env_fix_l = 30;
+ q_slot_nrg = q_slot_nrg_fix;
+
+ n_slot_nrg -= PB_OFFSET;
+ for (pb = start_p; pb <= end_p; pb++) {
+ temp_1 = ixheaacd_mps_div_32(*n_slot_nrg++, part_nrg_fix[pb], &qtemp1);
+ qtemp1 = *q_slot_nrg++ + qtemp1 - q_part_nrg_fix[pb];
+ env_fix_l = ixheaacd_mps_reshape_add32(env_fix_l, temp_1, &q_env_fix_l, qtemp1);
+ }
+ n_slot_nrg -= PB_OFFSET;
+
+ env_fix_l =
+ ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix);
+
+ temp_1 = ixheaacd_mult32x16in32(env_fix_l, one_min_beta_fix);
+ temp4 = ixheaacd_mult32x16in32((*norm_nrg_fix) << 1, beta_fix);
+ *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l);
+
+ if (flag) {
+ temp_1 = ixheaacd_mps_div_32(env_fix_l, *norm_nrg_fix, &qtemp1);
+ q_env = q_env_fix_l + qtemp1 - *q_norm_nrg_fix;
+ env[ts] = ixheaacd_mps_sqrt(temp_1, &(q_env), sqrt_tab);
+ env[ts] = ixheaacd_mps_convert_to_qn(env[ts], q_env, 15);
+ }
+
+ p_buffer_real += MAX_HYBRID_BANDS;
+ p_buffer_imag += MAX_HYBRID_BANDS;
+
+ p_hyb_out_dry_real += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_imag += MAX_HYBRID_BANDS;
+ }
+ reshape_bb_env_state->frame_nrg_prev[ch] = frame_nrg_prev;
+ reshape_bb_env_state->q_frame_nrg_prev[ch] = q_frame_nrg_prev;
+
+ break;
+ case INP_DMX:
+ prev_ch_offs = ch + pstr_mps_state->num_output_channels;
+
+ frame_nrg_prev = reshape_bb_env_state->frame_nrg_prev[prev_ch_offs];
+ q_frame_nrg_prev = reshape_bb_env_state->q_frame_nrg_prev[prev_ch_offs];
+
+ part_nrg_fix = &reshape_bb_env_state->part_nrg_prev[prev_ch_offs][0];
+ q_part_nrg_fix = &reshape_bb_env_state->q_part_nrg_prev[prev_ch_offs][0];
+
+ norm_nrg_fix = &reshape_bb_env_state->norm_nrg_prev[prev_ch_offs];
+ q_norm_nrg_fix = &reshape_bb_env_state->q_norm_nrg_prev[prev_ch_offs];
+
+ p_buffer_real = pstr_mps_state->array_struct->x_real + ch * TSXHB + 12;
+ p_buffer_imag = pstr_mps_state->array_struct->x_imag + ch * TSXHB + 12;
+ for (ts = 0; ts < time_slots; ts++) {
+ WORD32 prev_idx;
+
+ slot_nrg = slot_nrg_fix + 4;
+ for (pb = 14; pb <= end_p; pb++) *slot_nrg++ = 0;
+
+ slot_nrg = slot_nrg_fix;
+
+ hyb_output_real_dry = p_buffer_real;
+ hyb_output_imag_dry = p_buffer_imag;
+
+ for (qs = 12; qs < 16; qs++) {
+ *slot_nrg++ = ((WORD64)(*hyb_output_real_dry) * (WORD64)(*hyb_output_real_dry)) +
+ ((WORD64)(*hyb_output_imag_dry) * (WORD64)(*hyb_output_imag_dry));
+
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+ prev_idx = 14;
+ for (; qs < 30; qs++) {
+ WORD32 idx = bb_env_kernels[qs];
+ if (prev_idx != idx) {
+ slot_nrg++;
+ prev_idx = idx;
+ }
+
+ *slot_nrg += ((WORD64)(*hyb_output_real_dry) * (WORD64)(*hyb_output_real_dry)) +
+ ((WORD64)(*hyb_output_imag_dry) * (WORD64)(*hyb_output_imag_dry));
+
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+ slot_nrg++;
+ for (; qs < cnt; qs++) {
+ *slot_nrg += ((WORD64)(*hyb_output_real_dry) * (WORD64)(*hyb_output_real_dry)) +
+ ((WORD64)(*hyb_output_imag_dry) * (WORD64)(*hyb_output_imag_dry));
+
+ hyb_output_real_dry++;
+ hyb_output_imag_dry++;
+ }
+
+ slot_nrg = slot_nrg_fix;
+ q_slot_nrg = q_slot_nrg_fix;
+
+ frame_nrg_fix = 0;
+ q_frame_nrg_fix = 30;
+ for (pb = start_p; pb <= end_p; pb++) {
+ *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg);
+ slot_nrg++;
+ temp_1 = ixheaacd_mult32x16in32(*n_slot_nrg, one_min_alpha_fix);
+ temp4 = ixheaacd_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix);
+ part_nrg_fix[pb] =
+ ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg);
+ frame_nrg_fix = ixheaacd_mps_reshape_add32(frame_nrg_fix, *n_slot_nrg++,
+ &q_frame_nrg_fix, *q_slot_nrg++);
+ }
+
+ frame_nrg_fix = ixheaacd_mult32x16in32(frame_nrg_fix, one_by_nine);
+
+ temp_1 = ixheaacd_mult32x16in32(frame_nrg_fix, one_min_alpha_fix);
+ temp4 = ixheaacd_mult32x16in32((frame_nrg_prev) << 1, alpha_fix);
+ frame_nrg_fix =
+ ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev);
+
+ frame_nrg_prev = frame_nrg_fix;
+ q_frame_nrg_prev = q_frame_nrg_fix;
+
+ env_fix_l = 0;
+ q_env_fix_l = 30;
+
+ q_slot_nrg = q_slot_nrg_fix;
+ n_slot_nrg -= PB_OFFSET;
+ for (pb = start_p; pb <= end_p; pb++) {
+ temp_1 = ixheaacd_mps_div_32(*n_slot_nrg++, part_nrg_fix[pb], &qtemp1);
+ qtemp1 = *q_slot_nrg++ + qtemp1 - q_part_nrg_fix[pb];
+ env_fix_l = ixheaacd_mps_reshape_add32(env_fix_l, temp_1, &q_env_fix_l, qtemp1);
+ }
+ n_slot_nrg -= PB_OFFSET;
+
+ env_fix_l =
+ ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix);
+
+ temp_1 = ixheaacd_mult32x16in32(env_fix_l, one_min_beta_fix);
+ temp4 = ixheaacd_mult32x16in32((*norm_nrg_fix) << 1, beta_fix);
+ *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l);
+
+ temp_1 = ixheaacd_mps_div_32(env_fix_l, *norm_nrg_fix, &qtemp1);
+ q_env = q_env_fix_l + qtemp1 - *q_norm_nrg_fix;
+ env[ts] = ixheaacd_mps_sqrt(temp_1, &(q_env), sqrt_tab);
+ env[ts] = ixheaacd_mps_convert_to_qn(env[ts], q_env, 15);
+
+ p_buffer_real += MAX_HYBRID_BANDS;
+ p_buffer_imag += MAX_HYBRID_BANDS;
+ }
+ reshape_bb_env_state->frame_nrg_prev[prev_ch_offs] = frame_nrg_prev;
+ reshape_bb_env_state->q_frame_nrg_prev[prev_ch_offs] = q_frame_nrg_prev;
+
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
+VOID ixheaacd_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 *env_dry;
+ WORD32 *env_dmx_0, *env_dmx_1;
+
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
+ WORD32 *hyb_output_real_wet, *hyb_output_imag_wet;
+
+ WORD32 temp_1, temp_2;
+ WORD16 qtemp1, qtemp2;
+ WORD32 tmp, dry_fac, slot_amp_dry, slot_amp_wet;
+ WORD16 q_dry_fac, q_slot_amp_dry, q_slot_amp_wet;
+
+ WORD32 slot_amp_ratio;
+ WORD16 q_slot_amp_ratio;
+ WORD32 ch, ch2, ts, qs;
+ WORD32 *hyb_output_real_dry, *hyb_out_dry_real;
+ WORD32 *hyb_output_imag_dry, *hyb_out_dry_imag;
+ WORD64 *inter;
+
+ VOID *free_scratch;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ WORD32 *temp_shape_enable_channel_ges = p_aux_struct->temp_shape_enable_channel_ges;
+
+ WORD32 start_hsb;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 num_output_channels = pstr_mps_state->num_output_channels;
+ WORD32 tree_config = pstr_mps_state->tree_config;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+
+ const WORD32 *ch_idx = &pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
+ .row_2_channel_ges[tree_config][0];
+ WORD64 acc, acc2;
+ start_hsb = 6;
+
+ free_scratch = pstr_mps_state->mps_scratch_mem_v;
+ env_dry = free_scratch;
+ env_dmx_0 = pstr_mps_state->array_struct->env_dmx_0;
+ env_dmx_1 = pstr_mps_state->array_struct->env_dmx_1;
+ inter = (WORD64 *)((WORD8 *)free_scratch + MAX_TIME_SLOTSX12);
+ free_scratch = inter + MAX_TIME_SLOTS;
+
+ p_buffer_real = pstr_mps_state->array_struct->buf_real + start_hsb;
+ p_buffer_imag = pstr_mps_state->array_struct->buf_imag + start_hsb;
+
+ for (ch = 0; ch < num_output_channels; ch++) {
+ ch2 = ch_idx[ch];
+
+ if (ch2 == -1) continue;
+
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ ixheaacd_extract_bb_env(pstr_mps_state, INP_DRY_WET, ch, env_dry, free_scratch,
+ temp_shape_enable_channel_ges[ch2]);
+
+ if (temp_shape_enable_channel_ges[ch2]) {
+ WORD32 *env = &p_aux_struct->env_shape_data[ch2][0];
+ switch (tree_config) {
+ case TREE_5151:
+ case TREE_5152:
+ for (ts = 0; ts < time_slots; ts++) {
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
+ }
+ break;
+
+ case TREE_525:
+ case TREE_7271:
+ case TREE_7272:
+
+ switch (ch2) {
+ case 0:
+ case 3:
+ case 5:
+
+ for (ts = 0; ts < time_slots; ts++) {
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
+ }
+ break;
+ case 1:
+ case 4:
+ case 6:
+
+ for (ts = 0; ts < time_slots; ts++) {
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_1[ts]);
+ }
+ break;
+ case 2:
+
+ for (ts = 0; ts < time_slots; ts++) {
+ temp_2 = (env_dmx_0[ts] + env_dmx_1[ts]) >> 1;
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)temp_2);
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+
+ case TREE_7571:
+ case TREE_7572:
+ switch (ch2) {
+ case 0:
+ case 2:
+ for (ts = 0; ts < time_slots; ts++) {
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
+ }
+
+ break;
+ case 1:
+ case 3:
+ for (ts = 0; ts < time_slots; ts++) {
+ inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_1[ts]);
+ }
+ break;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+
+ hyb_out_dry_real =
+ pstr_mps_state->array_struct->hyb_output_real_dry + ch * TSXHB + start_hsb;
+ hyb_out_dry_imag =
+ pstr_mps_state->array_struct->hyb_output_imag_dry + ch * TSXHB + start_hsb;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ tmp = ixheaacd_mps_narrow(inter[ts], &qtemp1);
+
+ if (env_dry[ts] == 0) {
+ q_dry_fac = 0;
+ dry_fac = MAX_32;
+ } else {
+ dry_fac = ixheaacd_mps_div_32(tmp, env_dry[ts], &q_dry_fac);
+ q_dry_fac += qtemp1 - 5;
+ }
+
+ hyb_output_real_wet = p_buffer_re;
+ hyb_output_imag_wet = p_buffer_im;
+
+ hyb_output_real_dry = hyb_out_dry_real;
+ hyb_output_imag_dry = hyb_out_dry_imag;
+ acc = 0;
+ acc2 = 0;
+
+ for (qs = start_hsb; qs < hybrid_bands; qs++) {
+ acc += (WORD64)(*hyb_output_real_dry) * (WORD64)(*hyb_output_real_dry);
+ hyb_output_real_dry++;
+ acc += (WORD64)(*hyb_output_imag_dry) * (WORD64)(*hyb_output_imag_dry);
+ hyb_output_imag_dry++;
+
+ acc2 += (WORD64)(*hyb_output_real_wet) * (WORD64)(*hyb_output_real_wet);
+ hyb_output_real_wet++;
+ acc2 += (WORD64)(*hyb_output_imag_wet) * (WORD64)(*hyb_output_imag_wet);
+ hyb_output_imag_wet++;
+ }
+ slot_amp_dry = ixheaacd_mps_narrow(acc, &q_slot_amp_dry);
+ slot_amp_wet = ixheaacd_mps_narrow(acc2, &q_slot_amp_wet);
+
+ qtemp1 = q_slot_amp_dry;
+
+ temp_1 = ixheaacd_mps_add32(slot_amp_dry, ABS_THR_FIX, &qtemp1, 15);
+ temp_2 = ixheaacd_mps_div_32(slot_amp_wet, temp_1, &qtemp2);
+ q_slot_amp_ratio = qtemp2 + q_slot_amp_wet - qtemp1;
+ slot_amp_ratio = ixheaacd_mps_sqrt(temp_2, &q_slot_amp_ratio, sqrt_tab);
+
+ temp_1 = ixheaacd_mps_convert_to_qn(dry_fac, q_dry_fac, 15);
+ temp_1 -= ONE_IN_Q15;
+ temp_1 = ixheaacd_mps_mult32_shr_16(temp_1, slot_amp_ratio);
+ q_slot_amp_ratio -= 1;
+
+ temp_1 = ixheaacd_mps_add32(temp_1, dry_fac, &q_slot_amp_ratio, q_dry_fac);
+
+ temp_1 = ixheaacd_mps_convert_to_qn(temp_1, q_slot_amp_ratio, 15);
+ temp_1 = max(ONE_IN_Q13, temp_1);
+ dry_fac = min(FOUR_IN_Q15, temp_1);
+
+ hyb_output_real_dry = hyb_out_dry_real;
+ hyb_output_imag_dry = hyb_out_dry_imag;
+
+ for (qs = start_hsb; qs < hybrid_bands; qs++) {
+ *hyb_output_real_dry = ixheaacd_mps_mult32_shr_15(*hyb_output_real_dry, dry_fac);
+ hyb_output_real_dry++;
+ *hyb_output_imag_dry = ixheaacd_mps_mult32_shr_15(*hyb_output_imag_dry, dry_fac);
+ hyb_output_imag_dry++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+ hyb_out_dry_real += MAX_HYBRID_BANDS;
+ hyb_out_dry_imag += MAX_HYBRID_BANDS;
+ }
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ return;
+}
+
+VOID ixheaacd_pre_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 *env_dmx_0, *env_dmx_1;
+
+ VOID *free_scratch;
+
+ WORD32 tree_config = pstr_mps_state->tree_config;
+
+ free_scratch = pstr_mps_state->mps_scratch_mem_v;
+ env_dmx_0 = pstr_mps_state->array_struct->env_dmx_0;
+ env_dmx_1 = pstr_mps_state->array_struct->env_dmx_1;
+
+ switch (tree_config) {
+ case TREE_7572:
+ ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 0 + 4, env_dmx_0, free_scratch, 0);
+ ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 1 + 4, env_dmx_1, free_scratch, 0);
+ break;
+ default:
+ ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 0, env_dmx_0, free_scratch, 0);
+ if (min(pstr_mps_state->num_input_channels, 2) == 2) {
+ ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 1, env_dmx_1, free_scratch, 0);
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_reshape_bb_env.h b/decoder/ixheaacd_mps_reshape_bb_env.h
new file mode 100644
index 0000000..ca92d44
--- /dev/null
+++ b/decoder/ixheaacd_mps_reshape_bb_env.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_RESHAPE_BB_ENV_H
+#define IXHEAACD_MPS_RESHAPE_BB_ENV_H
+
+#define INP_DRY_WET (0)
+#define INP_DMX (1)
+
+#define ALPHA_Q15 (32649)
+#define BETA_Q15 (31600)
+#define ONE_MINUS_ALPHA_Q16 (238)
+#define ONE_MINUS_BETA_Q16 (2336)
+
+#define SHAPE_STP (1)
+#define SHAPE_GES (2)
+
+VOID ixheaacd_init_bb_env(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_pre_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_RESHAPE_BB_ENV_H */
diff --git a/decoder/ixheaacd_mps_rom.c b/decoder/ixheaacd_mps_rom.c
index 49628ff..a73f255 100644
--- a/decoder/ixheaacd_mps_rom.c
+++ b/decoder/ixheaacd_mps_rom.c
@@ -17,19 +17,10 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_mps_struct_def.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -39,30 +30,25 @@
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
-
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
-#include "ixheaacd_mps_nlc_dec.h"
#include "ixheaacd_mps_huff_tab.h"
const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
- {{{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6},
- {-7, 7}, {-8, 8}, {-9, 9}, {-10, 10}, {-11, 11}, {-12, 12},
- {-13, 13}, {15, 14}, {-14, 16}, {-15, 17}, {-16, 18}, {-17, 19},
- {-18, 20}, {-19, 21}, {-20, -21}, {-23, 22}, {-22, 23}, {-24, 24},
- {-25, 25}, {27, 26}, {29, 28}, {-30, -31}, {-28, -29}, {-26, -27}}},
- {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6},
- {-7, 7}, {9, 8}, {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13},
- {-12, 14}, {-13, 15}, {-14, 16}, {-15, 17}, {-16, 18}, {-17, 19},
- {-18, 20}, {-19, -20}, {-21, 21}, {-22, 22}, {-23, 23}, {25, 24},
- {-24, 26}, {-25, 27}, {29, 28}, {-26, -31}, {-29, -30}, {-27, -28}}},
- {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6},
- {-7, 7}, {9, 8}, {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13},
- {-12, 14}, {-13, 15}, {-14, 16}, {-15, 17}, {-16, 18}, {-17, 19},
- {-18, 20}, {-19, -20}, {-21, 21}, {-22, 22}, {-23, 23}, {25, 24},
- {-24, 26}, {-25, 27}, {29, 28}, {-26, -31}, {-29, -30}, {-27, -28}}}},
+ {{{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, 7}, {-8, 8},
+ {-9, 9}, {-10, 10}, {-11, 11}, {-12, 12}, {-13, 13}, {15, 14}, {-14, 16}, {-15, 17},
+ {-16, 18}, {-17, 19}, {-18, 20}, {-19, 21}, {-20, -21}, {-23, 22}, {-22, 23}, {-24, 24},
+ {-25, 25}, {27, 26}, {29, 28}, {-30, -31}, {-28, -29}, {-26, -27}}},
+ {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, 7}, {9, 8},
+ {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13}, {-12, 14}, {-13, 15}, {-14, 16}, {-15, 17},
+ {-16, 18}, {-17, 19}, {-18, 20}, {-19, -20}, {-21, 21}, {-22, 22}, {-23, 23}, {25, 24},
+ {-24, 26}, {-25, 27}, {29, 28}, {-26, -31}, {-29, -30}, {-27, -28}}},
+ {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, 7}, {9, 8},
+ {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13}, {-12, 14}, {-13, 15}, {-14, 16}, {-15, 17},
+ {-16, 18}, {-17, 19}, {-18, 20}, {-19, -20}, {-21, 21}, {-22, 22}, {-23, 23}, {25, 24},
+ {-24, 26}, {-25, 27}, {29, 28}, {-26, -31}, {-29, -30}, {-27, -28}}}},
{{{{{2, 1},
{-1, -52},
{4, 3},
@@ -78,45 +64,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-4, 13},
{-33, 14},
{-20, -49}},
- {{2, 1}, {4, 3}, {-86, 5}, {7, 6}, {9, 8}, {-1, -2},
- {-85, 10}, {-18, 11}, {-17, 12}, {14, 13}, {-70, 15}, {17, 16},
- {-19, -69}, {-84, 18}, {-3, 19}, {21, 20}, {-34, -68}, {-20, 22},
- {-35, 23}, {-83, 24}, {-33, 25}, {-4, 26}, {-53, 27}, {-54, -67},
- {-36, 28}, {-21, -52}, {-82, 29}, {-5, -50}, {-51, 30}, {-38, 31},
- {-37, -49}, {-6, 32}, {-66, 33}, {-65, 34}, {-22, -81}},
- {{2, 1}, {4, 3}, {-120, 5}, {7, 6}, {9, 8},
- {11, 10}, {-1, 12}, {-18, -119}, {-2, 13}, {15, 14},
- {-17, 16}, {-104, 17}, {19, 18}, {-19, 20}, {-103, 21},
- {-118, 22}, {24, 23}, {-3, 25}, {27, 26}, {-34, 28},
- {-102, 29}, {-20, 30}, {-35, 31}, {33, 32}, {-117, 34},
- {-33, 35}, {-88, 36}, {-4, 37}, {-87, 38}, {40, 39},
- {-36, -101}, {-86, 41}, {-21, -37}, {-85, -100}, {-52, 42},
- {-22, 43}, {-116, 44}, {-50, 45}, {47, 46}, {-5, -51},
- {-115, 48}, {-70, 49}, {-84, 50}, {-38, -49}, {-72, -99},
- {-53, 51}, {-69, -71}, {-23, 52}, {-6, -67}, {-114, 53},
- {-7, 54}, {-66, -68}, {-55, 55}, {57, 56}, {-54, -65},
- {-8, -56}, {-82, -83}, {59, 58}, {-39, -40}, {-81, 60},
- {-98, 61}, {-97, 62}, {-24, -113}},
- {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8},
- {11, 10}, {13, 12}, {15, 14}, {-18, 16}, {-153, 17},
- {-1, -2}, {19, 18}, {-138, 20}, {-17, 21}, {23, 22},
- {25, 24}, {-19, -137}, {27, 26}, {-152, 28}, {30, 29},
- {-3, -34}, {32, 31}, {34, 33}, {36, 35}, {-136, 37},
- {-35, 38}, {-20, 39}, {-122, 40}, {-151, 41}, {-33, 42},
- {-121, 43}, {45, 44}, {47, 46}, {-4, 48}, {-36, -120},
- {-135, 49}, {51, 50}, {-21, 52}, {54, 53}, {56, 55},
- {-50, -150}, {58, 57}, {-51, 59}, {61, 60}, {-119, 62},
- {-52, 63}, {-5, 64}, {-37, 65}, {-117, -134}, {-39, -54},
- {-22, 66}, {-106, 67}, {-69, -102}, {-132, 68}, {-105, 69},
- {-49, 70}, {-149, 71}, {-24, -104}, {73, 72}, {-53, 74},
- {-38, -118}, {-103, 75}, {-6, 76}, {-66, -87}, {-133, -147},
- {-23, 77}, {-67, 78}, {-68, -86}, {-70, -101}, {-40, -148},
- {-116, 79}, {-55, 80}, {-84, -131}, {82, 81}, {-89, -90},
- {-7, -25}, {-85, -88}, {-65, 83}, {-72, -146}, {85, 84},
- {-9, -71}, {-83, 86}, {-82, 87}, {-8, 88}, {-100, 89},
- {-74, -99}, {-73, 90}, {-10, -81}, {-56, 91}, {-57, -98},
- {93, 92}, {-58, -114}, {-97, -115}, {95, 94}, {-41, 96},
- {-42, 97}, {-26, -129}, {-113, 98}, {-130, -145}}},
+ {{2, 1}, {4, 3}, {-86, 5}, {7, 6}, {9, 8}, {-1, -2}, {-85, 10},
+ {-18, 11}, {-17, 12}, {14, 13}, {-70, 15}, {17, 16}, {-19, -69}, {-84, 18},
+ {-3, 19}, {21, 20}, {-34, -68}, {-20, 22}, {-35, 23}, {-83, 24}, {-33, 25},
+ {-4, 26}, {-53, 27}, {-54, -67}, {-36, 28}, {-21, -52}, {-82, 29}, {-5, -50},
+ {-51, 30}, {-38, 31}, {-37, -49}, {-6, 32}, {-66, 33}, {-65, 34}, {-22, -81}},
+ {{2, 1}, {4, 3}, {-120, 5}, {7, 6}, {9, 8}, {11, 10}, {-1, 12},
+ {-18, -119}, {-2, 13}, {15, 14}, {-17, 16}, {-104, 17}, {19, 18}, {-19, 20},
+ {-103, 21}, {-118, 22}, {24, 23}, {-3, 25}, {27, 26}, {-34, 28}, {-102, 29},
+ {-20, 30}, {-35, 31}, {33, 32}, {-117, 34}, {-33, 35}, {-88, 36}, {-4, 37},
+ {-87, 38}, {40, 39}, {-36, -101}, {-86, 41}, {-21, -37}, {-85, -100}, {-52, 42},
+ {-22, 43}, {-116, 44}, {-50, 45}, {47, 46}, {-5, -51}, {-115, 48}, {-70, 49},
+ {-84, 50}, {-38, -49}, {-72, -99}, {-53, 51}, {-69, -71}, {-23, 52}, {-6, -67},
+ {-114, 53}, {-7, 54}, {-66, -68}, {-55, 55}, {57, 56}, {-54, -65}, {-8, -56},
+ {-82, -83}, {59, 58}, {-39, -40}, {-81, 60}, {-98, 61}, {-97, 62}, {-24, -113}},
+ {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8}, {11, 10},
+ {13, 12}, {15, 14}, {-18, 16}, {-153, 17}, {-1, -2}, {19, 18},
+ {-138, 20}, {-17, 21}, {23, 22}, {25, 24}, {-19, -137}, {27, 26},
+ {-152, 28}, {30, 29}, {-3, -34}, {32, 31}, {34, 33}, {36, 35},
+ {-136, 37}, {-35, 38}, {-20, 39}, {-122, 40}, {-151, 41}, {-33, 42},
+ {-121, 43}, {45, 44}, {47, 46}, {-4, 48}, {-36, -120}, {-135, 49},
+ {51, 50}, {-21, 52}, {54, 53}, {56, 55}, {-50, -150}, {58, 57},
+ {-51, 59}, {61, 60}, {-119, 62}, {-52, 63}, {-5, 64}, {-37, 65},
+ {-117, -134}, {-39, -54}, {-22, 66}, {-106, 67}, {-69, -102}, {-132, 68},
+ {-105, 69}, {-49, 70}, {-149, 71}, {-24, -104}, {73, 72}, {-53, 74},
+ {-38, -118}, {-103, 75}, {-6, 76}, {-66, -87}, {-133, -147}, {-23, 77},
+ {-67, 78}, {-68, -86}, {-70, -101}, {-40, -148}, {-116, 79}, {-55, 80},
+ {-84, -131}, {82, 81}, {-89, -90}, {-7, -25}, {-85, -88}, {-65, 83},
+ {-72, -146}, {85, 84}, {-9, -71}, {-83, 86}, {-82, 87}, {-8, 88},
+ {-100, 89}, {-74, -99}, {-73, 90}, {-10, -81}, {-56, 91}, {-57, -98},
+ {93, 92}, {-58, -114}, {-97, -115}, {95, 94}, {-41, 96}, {-42, 97},
+ {-26, -129}, {-113, 98}, {-130, -145}}},
{{{-1, 1},
{-52, 2},
{-17, 3},
@@ -132,45 +110,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8},
- {10, 9}, {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15},
- {-38, 16}, {-49, 17}, {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65},
- {-22, 21}, {-66, 22}, {-19, 23}, {-37, 24}, {-35, -81}, {-3, 25},
- {-51, 26}, {-68, -84}, {-52, 27}, {29, 28}, {-20, 30}, {-4, -36},
- {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
- {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8},
- {-1, -104}, {10, 9}, {12, 11}, {-18, 13}, {-33, -88},
- {15, 14}, {17, 16}, {-2, 18}, {-34, 19}, {-72, 20},
- {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25},
- {-65, 26}, {28, 27}, {-40, -87}, {-66, 29}, {-82, 30},
- {32, 31}, {-19, -81}, {-71, 33}, {-97, 34}, {-35, -55},
- {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
- {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83},
- {44, 43}, {-20, -54}, {-52, 45}, {-36, 46}, {-4, 47},
- {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50}, {52, 51},
- {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56},
- {-84, 57}, {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60},
- {-23, 61}, {-7, 62}, {-114, 0}},
- {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8},
- {-17, 10}, {-138, 11}, {-1, 12}, {14, 13}, {16, 15},
- {-33, -122}, {-18, 17}, {19, 18}, {-34, 20}, {-2, 21},
- {-106, 22}, {-49, 23}, {25, 24}, {-50, 26}, {-153, 27},
- {-90, 28}, {-137, 29}, {-65, 30}, {32, 31}, {-66, 33},
- {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
- {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43},
- {-97, 44}, {46, 45}, {-129, 47}, {-26, -89}, {-57, -98},
- {-51, 48}, {-3, 49}, {-113, 50}, {-130, 51}, {-152, 52},
- {-67, -73}, {-99, -136}, {-145, 53}, {-120, 54}, {-41, 55},
- {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59}, {-20, 60},
- {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
- {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68},
- {-69, -119}, {-103, 70}, {-71, 71}, {73, 72}, {-21, 74},
- {-85, 75}, {-37, -53}, {-86, 76}, {78, 77}, {-102, -150},
- {-5, 79}, {-134, 80}, {-118, 81}, {-54, -117}, {83, 82},
- {-38, -70}, {-22, 84}, {-6, 85}, {87, 86}, {-55, 88},
- {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
- {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95},
- {-40, 0}, {0, 0}, {0, 0}, {0, 0}}}},
+ {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8}, {10, 9},
+ {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15}, {-38, 16}, {-49, 17},
+ {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65}, {-22, 21}, {-66, 22}, {-19, 23},
+ {-37, 24}, {-35, -81}, {-3, 25}, {-51, 26}, {-68, -84}, {-52, 27}, {29, 28},
+ {-20, 30}, {-4, -36}, {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
+ {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8}, {-1, -104}, {10, 9},
+ {12, 11}, {-18, 13}, {-33, -88}, {15, 14}, {17, 16}, {-2, 18}, {-34, 19},
+ {-72, 20}, {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25}, {-65, 26},
+ {28, 27}, {-40, -87}, {-66, 29}, {-82, 30}, {32, 31}, {-19, -81}, {-71, 33},
+ {-97, 34}, {-35, -55}, {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
+ {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83}, {44, 43}, {-20, -54},
+ {-52, 45}, {-36, 46}, {-4, 47}, {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50},
+ {52, 51}, {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56}, {-84, 57},
+ {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60}, {-23, 61}, {-7, 62}, {-114, 0}},
+ {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8}, {-17, 10},
+ {-138, 11}, {-1, 12}, {14, 13}, {16, 15}, {-33, -122}, {-18, 17},
+ {19, 18}, {-34, 20}, {-2, 21}, {-106, 22}, {-49, 23}, {25, 24},
+ {-50, 26}, {-153, 27}, {-90, 28}, {-137, 29}, {-65, 30}, {32, 31},
+ {-66, 33}, {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
+ {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43}, {-97, 44},
+ {46, 45}, {-129, 47}, {-26, -89}, {-57, -98}, {-51, 48}, {-3, 49},
+ {-113, 50}, {-130, 51}, {-152, 52}, {-67, -73}, {-99, -136}, {-145, 53},
+ {-120, 54}, {-41, 55}, {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59},
+ {-20, 60}, {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
+ {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68}, {-69, -119},
+ {-103, 70}, {-71, 71}, {73, 72}, {-21, 74}, {-85, 75}, {-37, -53},
+ {-86, 76}, {78, 77}, {-102, -150}, {-5, 79}, {-134, 80}, {-118, 81},
+ {-54, -117}, {83, 82}, {-38, -70}, {-22, 84}, {-6, 85}, {87, 86},
+ {-55, 88}, {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
+ {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95}, {-40, 0},
+ {0, 0}, {0, 0}, {0, 0}}}},
{{{{-1, 1},
{-52, 2},
{-17, 3},
@@ -186,45 +156,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-3, 13},
{-49, 14},
{-4, -50}},
- {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8},
- {-2, -18}, {10, 9}, {12, 11}, {-85, 13}, {-33, 14}, {-34, -54},
- {16, 15}, {-69, 17}, {19, 18}, {-50, -53}, {-19, 20}, {-38, 21},
- {-35, -49}, {-3, 22}, {24, 23}, {-68, 25}, {-84, 26}, {-65, 27},
- {-51, -66}, {-22, -37}, {-52, 28}, {-20, 29}, {-36, 30}, {-81, 31},
- {-4, -83}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
- {{2, 1}, {-120, 3}, {-1, 4}, {6, 5}, {-17, 7},
- {-104, 8}, {-18, 9}, {-2, 10}, {12, 11}, {14, 13},
- {-119, 15}, {-33, 16}, {-34, -88}, {-103, 17}, {19, 18},
- {21, 20}, {23, 22}, {25, 24}, {-19, -72}, {-50, 26},
- {-49, 27}, {-87, 28}, {30, 29}, {32, 31}, {-3, -35},
- {34, 33}, {-56, 35}, {-65, -66}, {-40, 36}, {-82, -118},
- {-71, 37}, {-55, 38}, {-67, -102}, {-51, 39}, {-70, 40},
- {42, 41}, {-81, 43}, {-86, 44}, {-52, -97}, {-98, 45},
- {-24, -39}, {-20, 46}, {-54, -83}, {-36, 47}, {-85, 48},
- {-68, 49}, {-4, 50}, {-69, -113}, {-117, 51}, {-37, -101},
- {-53, 52}, {-21, 53}, {55, 54}, {-84, -100}, {-5, 56},
- {-116, 57}, {-22, 58}, {-38, -115}, {60, 59}, {-6, -99},
- {-23, 61}, {-114, 62}, {-7, -8}},
- {{2, 1}, {-154, 3}, {5, 4}, {-1, 6}, {8, 7},
- {-17, 9}, {-138, 10}, {-18, 11}, {-2, 12}, {14, 13},
- {16, 15}, {-153, 17}, {-34, 18}, {-33, -122}, {20, 19},
- {22, 21}, {-137, 23}, {25, 24}, {27, 26}, {-106, 28},
- {30, 29}, {-50, 31}, {-19, 32}, {-49, -121}, {34, 33},
- {36, 35}, {-35, 37}, {-90, 38}, {-66, 39}, {-3, 40},
- {42, 41}, {-65, 43}, {-105, 44}, {46, 45}, {-74, 47},
- {-51, 48}, {-82, -152}, {-136, 49}, {-81, 50}, {-42, -89},
- {-114, 51}, {53, 52}, {-57, -58}, {-120, 54}, {-98, 55},
- {-67, 56}, {-97, 57}, {59, 58}, {-99, 60}, {-73, -104},
- {-72, 61}, {-113, 62}, {-20, -83}, {-84, -130}, {-36, 63},
- {-26, 64}, {-41, 65}, {-52, -129}, {-87, -88}, {67, 66},
- {-115, 68}, {-68, 69}, {-56, -69}, {-4, -100}, {-151, 70},
- {-135, 71}, {-103, -119}, {73, 72}, {-71, -145}, {-102, 74},
- {76, 75}, {-53, -85}, {-37, 77}, {-21, -86}, {79, 78},
- {-5, 80}, {-54, -134}, {-150, 81}, {-118, 82}, {-70, 83},
- {-117, 84}, {-22, -38}, {-101, 85}, {-55, 86}, {-149, 87},
- {-39, 88}, {-133, 89}, {-6, 90}, {-116, 91}, {-24, 92},
- {-7, -132}, {-23, 93}, {-40, 94}, {-131, -148}, {-25, 95},
- {-147, 96}, {-146, 97}, {-8, 0}, {0, 0}}},
+ {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8}, {-2, -18},
+ {10, 9}, {12, 11}, {-85, 13}, {-33, 14}, {-34, -54}, {16, 15}, {-69, 17},
+ {19, 18}, {-50, -53}, {-19, 20}, {-38, 21}, {-35, -49}, {-3, 22}, {24, 23},
+ {-68, 25}, {-84, 26}, {-65, 27}, {-51, -66}, {-22, -37}, {-52, 28}, {-20, 29},
+ {-36, 30}, {-81, 31}, {-4, -83}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
+ {{2, 1}, {-120, 3}, {-1, 4}, {6, 5}, {-17, 7}, {-104, 8}, {-18, 9},
+ {-2, 10}, {12, 11}, {14, 13}, {-119, 15}, {-33, 16}, {-34, -88}, {-103, 17},
+ {19, 18}, {21, 20}, {23, 22}, {25, 24}, {-19, -72}, {-50, 26}, {-49, 27},
+ {-87, 28}, {30, 29}, {32, 31}, {-3, -35}, {34, 33}, {-56, 35}, {-65, -66},
+ {-40, 36}, {-82, -118}, {-71, 37}, {-55, 38}, {-67, -102}, {-51, 39}, {-70, 40},
+ {42, 41}, {-81, 43}, {-86, 44}, {-52, -97}, {-98, 45}, {-24, -39}, {-20, 46},
+ {-54, -83}, {-36, 47}, {-85, 48}, {-68, 49}, {-4, 50}, {-69, -113}, {-117, 51},
+ {-37, -101}, {-53, 52}, {-21, 53}, {55, 54}, {-84, -100}, {-5, 56}, {-116, 57},
+ {-22, 58}, {-38, -115}, {60, 59}, {-6, -99}, {-23, 61}, {-114, 62}, {-7, -8}},
+ {{2, 1}, {-154, 3}, {5, 4}, {-1, 6}, {8, 7}, {-17, 9},
+ {-138, 10}, {-18, 11}, {-2, 12}, {14, 13}, {16, 15}, {-153, 17},
+ {-34, 18}, {-33, -122}, {20, 19}, {22, 21}, {-137, 23}, {25, 24},
+ {27, 26}, {-106, 28}, {30, 29}, {-50, 31}, {-19, 32}, {-49, -121},
+ {34, 33}, {36, 35}, {-35, 37}, {-90, 38}, {-66, 39}, {-3, 40},
+ {42, 41}, {-65, 43}, {-105, 44}, {46, 45}, {-74, 47}, {-51, 48},
+ {-82, -152}, {-136, 49}, {-81, 50}, {-42, -89}, {-114, 51}, {53, 52},
+ {-57, -58}, {-120, 54}, {-98, 55}, {-67, 56}, {-97, 57}, {59, 58},
+ {-99, 60}, {-73, -104}, {-72, 61}, {-113, 62}, {-20, -83}, {-84, -130},
+ {-36, 63}, {-26, 64}, {-41, 65}, {-52, -129}, {-87, -88}, {67, 66},
+ {-115, 68}, {-68, 69}, {-56, -69}, {-4, -100}, {-151, 70}, {-135, 71},
+ {-103, -119}, {73, 72}, {-71, -145}, {-102, 74}, {76, 75}, {-53, -85},
+ {-37, 77}, {-21, -86}, {79, 78}, {-5, 80}, {-54, -134}, {-150, 81},
+ {-118, 82}, {-70, 83}, {-117, 84}, {-22, -38}, {-101, 85}, {-55, 86},
+ {-149, 87}, {-39, 88}, {-133, 89}, {-6, 90}, {-116, 91}, {-24, 92},
+ {-7, -132}, {-23, 93}, {-40, 94}, {-131, -148}, {-25, 95}, {-147, 96},
+ {-146, 97}, {-8, 0}, {0, 0}}},
{{{-1, 1},
{-52, 2},
{4, 3},
@@ -240,45 +202,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-20, 13},
{-50, 14},
{-4, -49}},
- {{2, 1}, {-86, 3}, {5, 4}, {-1, 6}, {8, 7}, {-17, -18},
- {-2, 9}, {-70, 10}, {-85, 11}, {13, 12}, {-69, 14}, {-34, 15},
- {17, 16}, {-19, 18}, {-33, -35}, {-54, 19}, {-53, 20}, {-3, 21},
- {-68, 22}, {-84, 23}, {-50, 24}, {-52, 25}, {-51, 26}, {-20, -36},
- {-49, 27}, {-38, 28}, {-37, 29}, {-4, -83}, {-67, 30}, {-66, 31},
- {-21, 32}, {-22, -65}, {-5, 33}, {-82, 34}, {-6, -81}},
- {{2, 1}, {4, 3}, {-120, 5}, {7, 6}, {9, 8},
- {-1, 10}, {-18, 11}, {-17, 12}, {-2, -104}, {-119, 13},
- {15, 14}, {-103, 16}, {18, 17}, {-34, 19}, {-19, 20},
- {22, 21}, {-35, 23}, {-33, 24}, {-88, 25}, {-87, 26},
- {28, 27}, {-3, -102}, {-86, 29}, {-52, -118}, {31, 30},
- {-50, 32}, {-51, 33}, {-70, 34}, {-36, 35}, {-85, 36},
- {-20, 37}, {39, 38}, {-69, -71}, {-72, 40}, {-49, -67},
- {42, 41}, {-68, 43}, {-4, -101}, {-53, -117}, {-37, 44},
- {-66, 45}, {-55, 46}, {48, 47}, {-54, 49}, {-21, 50},
- {-84, -100}, {-56, -65}, {52, 51}, {-82, -83}, {54, 53},
- {-5, -116}, {-22, 55}, {-38, 56}, {-39, -40}, {58, 57},
- {-81, -115}, {-98, -99}, {-6, 59}, {-23, 60}, {-24, 61},
- {-7, -97}, {-114, 62}, {-8, -113}},
- {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {9, 8},
- {11, 10}, {-1, 12}, {-18, 13}, {-17, 14}, {-2, -138},
- {16, 15}, {-153, 17}, {-137, 18}, {20, 19}, {22, 21},
- {-34, 23}, {-19, 24}, {-35, 25}, {27, 26}, {29, 28},
- {-121, 30}, {-120, 31}, {-136, 32}, {-33, -122}, {34, 33},
- {-152, 35}, {-3, 36}, {-51, 37}, {-52, 38}, {-69, 39},
- {-36, 40}, {-50, 41}, {43, 42}, {-20, 44}, {-104, 45},
- {-103, 46}, {-87, 47}, {-119, 48}, {-105, 49}, {-86, 50},
- {-102, 51}, {-106, 52}, {-49, -135}, {-68, 53}, {55, 54},
- {-53, 56}, {-67, -151}, {-4, 57}, {-84, 58}, {-85, 59},
- {-66, 60}, {-37, 61}, {-70, 62}, {-54, -88}, {-21, 63},
- {65, 64}, {-89, 66}, {-118, 67}, {-72, 68}, {-90, 69},
- {-71, 70}, {-65, -134}, {-150, 71}, {-83, 72}, {-5, 73},
- {-101, -117}, {-82, 74}, {76, 75}, {-99, 77}, {-38, 78},
- {-100, 79}, {-22, 80}, {-73, 81}, {-39, -74}, {83, 82},
- {-55, -81}, {-57, 84}, {-133, -149}, {-56, 85}, {-6, 86},
- {-98, 87}, {-132, 88}, {-23, 89}, {-114, 90}, {-116, 91},
- {-58, -115}, {-24, 92}, {-97, -148}, {-40, -41}, {-7, -42},
- {-147, 93}, {95, 94}, {-131, 96}, {-8, -130}, {-25, -113},
- {-9, 97}, {-26, -129}, {-146, 98}, {-10, -145}}}},
+ {{2, 1}, {-86, 3}, {5, 4}, {-1, 6}, {8, 7}, {-17, -18}, {-2, 9},
+ {-70, 10}, {-85, 11}, {13, 12}, {-69, 14}, {-34, 15}, {17, 16}, {-19, 18},
+ {-33, -35}, {-54, 19}, {-53, 20}, {-3, 21}, {-68, 22}, {-84, 23}, {-50, 24},
+ {-52, 25}, {-51, 26}, {-20, -36}, {-49, 27}, {-38, 28}, {-37, 29}, {-4, -83},
+ {-67, 30}, {-66, 31}, {-21, 32}, {-22, -65}, {-5, 33}, {-82, 34}, {-6, -81}},
+ {{2, 1}, {4, 3}, {-120, 5}, {7, 6}, {9, 8}, {-1, 10}, {-18, 11},
+ {-17, 12}, {-2, -104}, {-119, 13}, {15, 14}, {-103, 16}, {18, 17}, {-34, 19},
+ {-19, 20}, {22, 21}, {-35, 23}, {-33, 24}, {-88, 25}, {-87, 26}, {28, 27},
+ {-3, -102}, {-86, 29}, {-52, -118}, {31, 30}, {-50, 32}, {-51, 33}, {-70, 34},
+ {-36, 35}, {-85, 36}, {-20, 37}, {39, 38}, {-69, -71}, {-72, 40}, {-49, -67},
+ {42, 41}, {-68, 43}, {-4, -101}, {-53, -117}, {-37, 44}, {-66, 45}, {-55, 46},
+ {48, 47}, {-54, 49}, {-21, 50}, {-84, -100}, {-56, -65}, {52, 51}, {-82, -83},
+ {54, 53}, {-5, -116}, {-22, 55}, {-38, 56}, {-39, -40}, {58, 57}, {-81, -115},
+ {-98, -99}, {-6, 59}, {-23, 60}, {-24, 61}, {-7, -97}, {-114, 62}, {-8, -113}},
+ {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {9, 8}, {11, 10},
+ {-1, 12}, {-18, 13}, {-17, 14}, {-2, -138}, {16, 15}, {-153, 17},
+ {-137, 18}, {20, 19}, {22, 21}, {-34, 23}, {-19, 24}, {-35, 25},
+ {27, 26}, {29, 28}, {-121, 30}, {-120, 31}, {-136, 32}, {-33, -122},
+ {34, 33}, {-152, 35}, {-3, 36}, {-51, 37}, {-52, 38}, {-69, 39},
+ {-36, 40}, {-50, 41}, {43, 42}, {-20, 44}, {-104, 45}, {-103, 46},
+ {-87, 47}, {-119, 48}, {-105, 49}, {-86, 50}, {-102, 51}, {-106, 52},
+ {-49, -135}, {-68, 53}, {55, 54}, {-53, 56}, {-67, -151}, {-4, 57},
+ {-84, 58}, {-85, 59}, {-66, 60}, {-37, 61}, {-70, 62}, {-54, -88},
+ {-21, 63}, {65, 64}, {-89, 66}, {-118, 67}, {-72, 68}, {-90, 69},
+ {-71, 70}, {-65, -134}, {-150, 71}, {-83, 72}, {-5, 73}, {-101, -117},
+ {-82, 74}, {76, 75}, {-99, 77}, {-38, 78}, {-100, 79}, {-22, 80},
+ {-73, 81}, {-39, -74}, {83, 82}, {-55, -81}, {-57, 84}, {-133, -149},
+ {-56, 85}, {-6, 86}, {-98, 87}, {-132, 88}, {-23, 89}, {-114, 90},
+ {-116, 91}, {-58, -115}, {-24, 92}, {-97, -148}, {-40, -41}, {-7, -42},
+ {-147, 93}, {95, 94}, {-131, 96}, {-8, -130}, {-25, -113}, {-9, 97},
+ {-26, -129}, {-146, 98}, {-10, -145}}}},
{{{{-1, 1},
{-52, 2},
{-17, 3},
@@ -294,45 +248,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8},
- {10, 9}, {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15},
- {-38, 16}, {-49, 17}, {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65},
- {-22, 21}, {-66, 22}, {-19, 23}, {-37, 24}, {-35, -81}, {-3, 25},
- {-51, 26}, {-68, -84}, {-52, 27}, {29, 28}, {-20, 30}, {-4, -36},
- {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
- {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8},
- {-1, -104}, {10, 9}, {12, 11}, {-18, 13}, {-33, -88},
- {15, 14}, {17, 16}, {-2, 18}, {-34, 19}, {-72, 20},
- {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25},
- {-65, 26}, {28, 27}, {-40, -87}, {-66, 29}, {-82, 30},
- {32, 31}, {-19, -81}, {-71, 33}, {-97, 34}, {-35, -55},
- {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
- {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83},
- {44, 43}, {-20, -54}, {-52, 45}, {-36, 46}, {-4, 47},
- {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50}, {52, 51},
- {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56},
- {-84, 57}, {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60},
- {-23, 61}, {-7, 62}, {-114, 0}},
- {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8},
- {-17, 10}, {-138, 11}, {-1, 12}, {14, 13}, {16, 15},
- {-33, -122}, {-18, 17}, {19, 18}, {-34, 20}, {-2, 21},
- {-106, 22}, {-49, 23}, {25, 24}, {-50, 26}, {-153, 27},
- {-90, 28}, {-137, 29}, {-65, 30}, {32, 31}, {-66, 33},
- {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
- {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43},
- {-97, 44}, {46, 45}, {-129, 47}, {-26, -89}, {-57, -98},
- {-51, 48}, {-3, 49}, {-113, 50}, {-130, 51}, {-152, 52},
- {-67, -73}, {-99, -136}, {-145, 53}, {-120, 54}, {-41, 55},
- {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59}, {-20, 60},
- {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
- {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68},
- {-69, -119}, {-103, 70}, {-71, 71}, {73, 72}, {-21, 74},
- {-85, 75}, {-37, -53}, {-86, 76}, {78, 77}, {-102, -150},
- {-5, 79}, {-134, 80}, {-118, 81}, {-54, -117}, {83, 82},
- {-38, -70}, {-22, 84}, {-6, 85}, {87, 86}, {-55, 88},
- {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
- {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95},
- {-40, 0}, {0, 0}, {0, 0}, {0, 0}}},
+ {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8}, {10, 9},
+ {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15}, {-38, 16}, {-49, 17},
+ {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65}, {-22, 21}, {-66, 22}, {-19, 23},
+ {-37, 24}, {-35, -81}, {-3, 25}, {-51, 26}, {-68, -84}, {-52, 27}, {29, 28},
+ {-20, 30}, {-4, -36}, {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
+ {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8}, {-1, -104}, {10, 9},
+ {12, 11}, {-18, 13}, {-33, -88}, {15, 14}, {17, 16}, {-2, 18}, {-34, 19},
+ {-72, 20}, {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25}, {-65, 26},
+ {28, 27}, {-40, -87}, {-66, 29}, {-82, 30}, {32, 31}, {-19, -81}, {-71, 33},
+ {-97, 34}, {-35, -55}, {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
+ {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83}, {44, 43}, {-20, -54},
+ {-52, 45}, {-36, 46}, {-4, 47}, {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50},
+ {52, 51}, {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56}, {-84, 57},
+ {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60}, {-23, 61}, {-7, 62}, {-114, 0}},
+ {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8}, {-17, 10},
+ {-138, 11}, {-1, 12}, {14, 13}, {16, 15}, {-33, -122}, {-18, 17},
+ {19, 18}, {-34, 20}, {-2, 21}, {-106, 22}, {-49, 23}, {25, 24},
+ {-50, 26}, {-153, 27}, {-90, 28}, {-137, 29}, {-65, 30}, {32, 31},
+ {-66, 33}, {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
+ {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43}, {-97, 44},
+ {46, 45}, {-129, 47}, {-26, -89}, {-57, -98}, {-51, 48}, {-3, 49},
+ {-113, 50}, {-130, 51}, {-152, 52}, {-67, -73}, {-99, -136}, {-145, 53},
+ {-120, 54}, {-41, 55}, {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59},
+ {-20, 60}, {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
+ {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68}, {-69, -119},
+ {-103, 70}, {-71, 71}, {73, 72}, {-21, 74}, {-85, 75}, {-37, -53},
+ {-86, 76}, {78, 77}, {-102, -150}, {-5, 79}, {-134, 80}, {-118, 81},
+ {-54, -117}, {83, 82}, {-38, -70}, {-22, 84}, {-6, 85}, {87, 86},
+ {-55, 88}, {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
+ {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95}, {-40, 0},
+ {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1},
{-52, 2},
{-17, 3},
@@ -348,45 +294,37 @@ const ia_huff_cld_nodes_struct ixheaacd_huff_cld_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8},
- {10, 9}, {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15},
- {-38, 16}, {-49, 17}, {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65},
- {-22, 21}, {-66, 22}, {-19, 23}, {-37, 24}, {-35, -81}, {-3, 25},
- {-51, 26}, {-68, -84}, {-52, 27}, {29, 28}, {-20, 30}, {-4, -36},
- {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
- {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8},
- {-1, -104}, {10, 9}, {12, 11}, {-18, 13}, {-33, -88},
- {15, 14}, {17, 16}, {-2, 18}, {-34, 19}, {-72, 20},
- {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25},
- {-65, 26}, {28, 27}, {-40, -87}, {-66, 29}, {-82, 30},
- {32, 31}, {-19, -81}, {-71, 33}, {-97, 34}, {-35, -55},
- {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
- {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83},
- {44, 43}, {-20, -54}, {-52, 45}, {-36, 46}, {-4, 47},
- {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50}, {52, 51},
- {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56},
- {-84, 57}, {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60},
- {-23, 61}, {-7, 62}, {-114, 0}},
- {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8},
- {-17, 10}, {-138, 11}, {-1, 12}, {14, 13}, {16, 15},
- {-33, -122}, {-18, 17}, {19, 18}, {-34, 20}, {-2, 21},
- {-106, 22}, {-49, 23}, {25, 24}, {-50, 26}, {-153, 27},
- {-90, 28}, {-137, 29}, {-65, 30}, {32, 31}, {-66, 33},
- {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
- {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43},
- {-97, 44}, {46, 45}, {-129, 47}, {-26, -89}, {-57, -98},
- {-51, 48}, {-3, 49}, {-113, 50}, {-130, 51}, {-152, 52},
- {-67, -73}, {-99, -136}, {-145, 53}, {-120, 54}, {-41, 55},
- {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59}, {-20, 60},
- {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
- {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68},
- {-69, -119}, {-103, 70}, {-71, 71}, {73, 72}, {-21, 74},
- {-85, 75}, {-37, -53}, {-86, 76}, {78, 77}, {-102, -150},
- {-5, 79}, {-134, 80}, {-118, 81}, {-54, -117}, {83, 82},
- {-38, -70}, {-22, 84}, {-6, 85}, {87, 86}, {-55, 88},
- {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
- {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95},
- {-40, 0}, {0, 0}, {0, 0}, {0, 0}}}}}};
+ {{2, 1}, {4, 3}, {-86, 5}, {-1, 6}, {-17, 7}, {-70, 8}, {10, 9},
+ {-18, 11}, {-33, 12}, {-54, 13}, {-2, 14}, {-34, 15}, {-38, 16}, {-49, 17},
+ {-85, 18}, {-50, 19}, {-69, 20}, {-53, -65}, {-22, 21}, {-66, 22}, {-19, 23},
+ {-37, 24}, {-35, -81}, {-3, 25}, {-51, 26}, {-68, -84}, {-52, 27}, {29, 28},
+ {-20, 30}, {-4, -36}, {-83, 31}, {-67, 32}, {-21, 33}, {-5, 34}, {-6, -82}},
+ {{2, 1}, {4, 3}, {6, 5}, {-120, 7}, {-17, 8}, {-1, -104}, {10, 9},
+ {12, 11}, {-18, 13}, {-33, -88}, {15, 14}, {17, 16}, {-2, 18}, {-34, 19},
+ {-72, 20}, {-49, 21}, {-119, 22}, {-50, 23}, {-103, 24}, {-56, 25}, {-65, 26},
+ {28, 27}, {-40, -87}, {-66, 29}, {-82, 30}, {32, 31}, {-19, -81}, {-71, 33},
+ {-97, 34}, {-35, -55}, {-24, 35}, {37, 36}, {-3, -98}, {-51, 38}, {-67, 39},
+ {-39, -118}, {-113, 40}, {-102, 41}, {-86, 42}, {-70, -83}, {44, 43}, {-20, -54},
+ {-52, 45}, {-36, 46}, {-4, 47}, {-68, 48}, {-85, 49}, {-101, -117}, {-69, 50},
+ {52, 51}, {-21, -37}, {-53, 53}, {55, 54}, {-5, -100}, {-116, 56}, {-84, 57},
+ {-38, 58}, {-22, -99}, {-115, 59}, {-6, 60}, {-23, 61}, {-7, 62}, {-114, 0}},
+ {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8}, {-17, 10},
+ {-138, 11}, {-1, 12}, {14, 13}, {16, 15}, {-33, -122}, {-18, 17},
+ {19, 18}, {-34, 20}, {-2, 21}, {-106, 22}, {-49, 23}, {25, 24},
+ {-50, 26}, {-153, 27}, {-90, 28}, {-137, 29}, {-65, 30}, {32, 31},
+ {-66, 33}, {-121, 34}, {-74, 35}, {-81, 36}, {38, 37}, {-42, 39},
+ {-82, 40}, {-105, 41}, {-19, -114}, {-58, 42}, {-35, 43}, {-97, 44},
+ {46, 45}, {-129, 47}, {-26, -89}, {-57, -98}, {-51, 48}, {-3, 49},
+ {-113, 50}, {-130, 51}, {-152, 52}, {-67, -73}, {-99, -136}, {-145, 53},
+ {-120, 54}, {-41, 55}, {-83, 56}, {-72, 57}, {-104, 58}, {-115, 59},
+ {-20, 60}, {62, 61}, {-36, -88}, {-84, 63}, {-52, -56}, {65, 64},
+ {-4, -87}, {-68, 66}, {-151, 67}, {-100, -135}, {69, 68}, {-69, -119},
+ {-103, 70}, {-71, 71}, {73, 72}, {-21, 74}, {-85, 75}, {-37, -53},
+ {-86, 76}, {78, 77}, {-102, -150}, {-5, 79}, {-134, 80}, {-118, 81},
+ {-54, -117}, {83, 82}, {-38, -70}, {-22, 84}, {-6, 85}, {87, 86},
+ {-55, 88}, {-101, 89}, {-133, -149}, {-24, -39}, {91, 90}, {-132, 92},
+ {-23, 93}, {-7, 94}, {-147, -148}, {-116, -131}, {-25, 95}, {-40, 0},
+ {0, 0}, {0, 0}, {0, 0}}}}}};
const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{{{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, -8}}},
@@ -408,23 +346,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-34, 13},
{-33, 14},
{-20, -49}},
- {{2, 1}, {-86, 3}, {-1, 4}, {6, 5}, {-2, 7}, {-85, 8},
- {-18, 9}, {11, 10}, {-17, 12}, {14, 13}, {-70, 15}, {-3, -19},
- {-69, 16}, {-84, 17}, {-68, 18}, {-20, -35}, {-34, -83}, {20, 19},
- {-4, 21}, {-33, 22}, {-5, 23}, {-53, 24}, {-36, -52}, {-67, 25},
- {-21, -82}, {-54, 26}, {-6, 27}, {-51, 28}, {-50, 29}, {-49, 30},
- {-37, 31}, {-38, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{2, 1}, {4, 3}, {-1, -120}, {6, 5}, {8, 7}, {-18, 9},
- {-2, 10}, {12, 11}, {14, 13}, {-17, -119}, {16, 15}, {-103, 17},
- {-104, 18}, {-52, 19}, {21, 20}, {-69, 22}, {24, 23}, {-3, -35},
- {-19, 25}, {-34, -85}, {27, 26}, {-86, 28}, {-118, 29}, {-37, 30},
- {32, 31}, {-102, 33}, {-20, -22}, {-4, -117}, {-87, 34}, {-100, 35},
- {-33, -36}, {37, 36}, {-70, -88}, {-101, 38}, {-5, 39}, {-51, -53},
- {-50, 40}, {-115, 41}, {-21, 42}, {-116, 43}, {-38, 44}, {-23, -84},
- {-49, -99}, {46, 45}, {-6, -114}, {-7, -72}, {-71, 47}, {-8, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{2, 1}, {-86, 3}, {-1, 4}, {6, 5}, {-2, 7}, {-85, 8}, {-18, 9},
+ {11, 10}, {-17, 12}, {14, 13}, {-70, 15}, {-3, -19}, {-69, 16}, {-84, 17},
+ {-68, 18}, {-20, -35}, {-34, -83}, {20, 19}, {-4, 21}, {-33, 22}, {-5, 23},
+ {-53, 24}, {-36, -52}, {-67, 25}, {-21, -82}, {-54, 26}, {-6, 27}, {-51, 28},
+ {-50, 29}, {-49, 30}, {-37, 31}, {-38, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{2, 1}, {4, 3}, {-1, -120}, {6, 5}, {8, 7}, {-18, 9}, {-2, 10},
+ {12, 11}, {14, 13}, {-17, -119}, {16, 15}, {-103, 17}, {-104, 18}, {-52, 19},
+ {21, 20}, {-69, 22}, {24, 23}, {-3, -35}, {-19, 25}, {-34, -85}, {27, 26},
+ {-86, 28}, {-118, 29}, {-37, 30}, {32, 31}, {-102, 33}, {-20, -22}, {-4, -117},
+ {-87, 34}, {-100, 35}, {-33, -36}, {37, 36}, {-70, -88}, {-101, 38}, {-5, 39},
+ {-51, -53}, {-50, 40}, {-115, 41}, {-21, 42}, {-116, 43}, {-38, 44}, {-23, -84},
+ {-49, -99}, {46, 45}, {-6, -114}, {-7, -72}, {-71, 47}, {-8, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-2, -17}},
{{2, 1},
{-1, -52},
@@ -441,25 +376,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8},
- {-33, 9}, {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14},
- {-34, -65}, {-85, 15}, {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19},
- {21, 20}, {-19, -81}, {-66, 22}, {-3, -35}, {24, 23}, {-37, 25},
- {-68, -84}, {-51, 26}, {28, 27}, {-20, -52}, {30, 29}, {-4, -36},
- {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
- {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6},
- {-104, 8}, {-33, 9}, {11, 10}, {13, 12}, {-49, 14},
- {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17}, {-2, -72},
- {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22},
- {-50, 24}, {-82, -119}, {-24, -103}, {26, 25}, {28, 27},
- {30, 29}, {-55, -87}, {-66, 31}, {33, 32}, {-98, 34},
- {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
- {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69},
- {-54, -83}, {44, 43}, {-102, 45}, {-101, 46}, {-68, -85},
- {-36, -53}, {-5, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}},
+ {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8}, {-33, 9},
+ {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14}, {-34, -65}, {-85, 15},
+ {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19}, {21, 20}, {-19, -81}, {-66, 22},
+ {-3, -35}, {24, 23}, {-37, 25}, {-68, -84}, {-51, 26}, {28, 27}, {-20, -52},
+ {30, 29}, {-4, -36}, {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
+ {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6}, {-104, 8}, {-33, 9},
+ {11, 10}, {13, 12}, {-49, 14}, {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17},
+ {-2, -72}, {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22}, {-50, 24},
+ {-82, -119}, {-24, -103}, {26, 25}, {28, 27}, {30, 29}, {-55, -87}, {-66, 31},
+ {33, 32}, {-98, 34}, {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
+ {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69}, {-54, -83}, {44, 43},
+ {-102, 45}, {-101, 46}, {-68, -85}, {-36, -53}, {-5, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}},
{{{{-1, 1}, {-18, 2}, {-2, -17}},
{{-52, 1},
{-1, 2},
@@ -476,25 +406,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-3, 13},
{-49, 14},
{-4, -50}},
- {{-1, 1}, {-86, 2}, {4, 3}, {-17, 5}, {-2, 6}, {-18, 7},
- {-70, 8}, {-85, 9}, {11, 10}, {13, 12}, {-33, 14}, {16, 15},
- {-34, -54}, {-69, 17}, {-38, 18}, {-50, 19}, {-35, -53}, {-49, 20},
- {-19, 21}, {-3, 22}, {-65, 23}, {-68, 24}, {-22, 25}, {-81, -84},
- {-66, 26}, {-37, 27}, {-20, -51}, {29, 28}, {-52, 30}, {-4, -83},
- {-36, 31}, {-67, 32}, {-5, 33}, {-82, 34}, {-21, 0}},
- {{-1, 1}, {-120, 2}, {4, 3}, {-17, 5}, {-2, 6},
- {8, 7}, {-18, 9}, {-104, 10}, {12, 11}, {14, 13},
- {16, 15}, {-119, 17}, {-81, 18}, {20, 19}, {-33, 21},
- {-88, 22}, {-103, 23}, {-34, 24}, {-56, 25}, {-72, 26},
- {-49, 27}, {-82, 28}, {-50, 29}, {-65, 30}, {-55, -87},
- {-19, 31}, {-67, 32}, {-35, -40}, {34, 33}, {-52, -71},
- {-66, 35}, {-70, 36}, {38, 37}, {-51, -97}, {-86, -102},
- {-3, 39}, {-118, 40}, {42, 41}, {-24, -85}, {-54, 43},
- {-39, 44}, {-98, -113}, {-36, -37}, {-20, -69}, {-4, 45},
- {-5, 46}, {-21, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{-1, 1}, {-86, 2}, {4, 3}, {-17, 5}, {-2, 6}, {-18, 7}, {-70, 8},
+ {-85, 9}, {11, 10}, {13, 12}, {-33, 14}, {16, 15}, {-34, -54}, {-69, 17},
+ {-38, 18}, {-50, 19}, {-35, -53}, {-49, 20}, {-19, 21}, {-3, 22}, {-65, 23},
+ {-68, 24}, {-22, 25}, {-81, -84}, {-66, 26}, {-37, 27}, {-20, -51}, {29, 28},
+ {-52, 30}, {-4, -83}, {-36, 31}, {-67, 32}, {-5, 33}, {-82, 34}, {-21, 0}},
+ {{-1, 1}, {-120, 2}, {4, 3}, {-17, 5}, {-2, 6}, {8, 7}, {-18, 9},
+ {-104, 10}, {12, 11}, {14, 13}, {16, 15}, {-119, 17}, {-81, 18}, {20, 19},
+ {-33, 21}, {-88, 22}, {-103, 23}, {-34, 24}, {-56, 25}, {-72, 26}, {-49, 27},
+ {-82, 28}, {-50, 29}, {-65, 30}, {-55, -87}, {-19, 31}, {-67, 32}, {-35, -40},
+ {34, 33}, {-52, -71}, {-66, 35}, {-70, 36}, {38, 37}, {-51, -97}, {-86, -102},
+ {-3, 39}, {-118, 40}, {42, 41}, {-24, -85}, {-54, 43}, {-39, 44}, {-98, -113},
+ {-36, -37}, {-20, -69}, {-4, 45}, {-5, 46}, {-21, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-2, -17}},
{{-52, 1},
{-1, 2},
@@ -511,23 +436,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-50, 13},
{-20, 14},
{-4, -49}},
- {{2, 1}, {-86, 3}, {-1, 4}, {6, 5}, {-18, 7}, {-2, -17},
- {9, 8}, {-70, 10}, {-69, -85}, {-35, 11}, {13, 12}, {-34, 14},
- {-19, 15}, {-53, 16}, {-68, 17}, {-33, 18}, {-3, -52}, {20, 19},
- {-54, 21}, {-84, 22}, {-50, 23}, {-20, -51}, {-36, 24}, {26, 25},
- {-83, 27}, {-4, -38}, {-49, 28}, {-37, 29}, {-67, 30}, {-5, 31},
- {-21, 32}, {-65, -66}, {-82, 33}, {-22, 34}, {-6, -81}},
- {{2, 1}, {-1, -120}, {4, 3}, {6, 5}, {-18, 7}, {9, 8},
- {-17, 10}, {-2, 11}, {-103, 12}, {-52, 13}, {-35, -104}, {-119, 14},
- {16, 15}, {-69, -86}, {18, 17}, {-34, 19}, {-19, 20}, {22, 21},
- {-70, 23}, {-87, 24}, {-102, 25}, {-85, 26}, {-33, 27}, {-36, 28},
- {-3, 29}, {-88, 30}, {-51, 31}, {-118, 32}, {34, 33}, {-68, 35},
- {-53, 36}, {-67, 37}, {-20, 38}, {-101, 39}, {-50, 40}, {42, 41},
- {-37, 43}, {-116, 44}, {-117, 45}, {-49, 46}, {-21, -100}, {48, 47},
- {-55, -71}, {-4, 49}, {-22, -84}, {-115, 50}, {-66, -82}, {-72, 51},
- {-5, -6}, {-54, 52}, {-38, 53}, {-83, 54}, {-40, 55}, {-39, 56},
- {-99, 57}, {-23, -56}, {-7, 58}, {-65, -97}, {-8, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}},
+ {{2, 1}, {-86, 3}, {-1, 4}, {6, 5}, {-18, 7}, {-2, -17}, {9, 8},
+ {-70, 10}, {-69, -85}, {-35, 11}, {13, 12}, {-34, 14}, {-19, 15}, {-53, 16},
+ {-68, 17}, {-33, 18}, {-3, -52}, {20, 19}, {-54, 21}, {-84, 22}, {-50, 23},
+ {-20, -51}, {-36, 24}, {26, 25}, {-83, 27}, {-4, -38}, {-49, 28}, {-37, 29},
+ {-67, 30}, {-5, 31}, {-21, 32}, {-65, -66}, {-82, 33}, {-22, 34}, {-6, -81}},
+ {{2, 1}, {-1, -120}, {4, 3}, {6, 5}, {-18, 7}, {9, 8}, {-17, 10},
+ {-2, 11}, {-103, 12}, {-52, 13}, {-35, -104}, {-119, 14}, {16, 15}, {-69, -86},
+ {18, 17}, {-34, 19}, {-19, 20}, {22, 21}, {-70, 23}, {-87, 24}, {-102, 25},
+ {-85, 26}, {-33, 27}, {-36, 28}, {-3, 29}, {-88, 30}, {-51, 31}, {-118, 32},
+ {34, 33}, {-68, 35}, {-53, 36}, {-67, 37}, {-20, 38}, {-101, 39}, {-50, 40},
+ {42, 41}, {-37, 43}, {-116, 44}, {-117, 45}, {-49, 46}, {-21, -100}, {48, 47},
+ {-55, -71}, {-4, 49}, {-22, -84}, {-115, 50}, {-66, -82}, {-72, 51}, {-5, -6},
+ {-54, 52}, {-38, 53}, {-83, 54}, {-40, 55}, {-39, 56}, {-99, 57}, {-23, -56},
+ {-7, 58}, {-65, -97}, {-8, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}},
{{{{-1, 1}, {-18, 2}, {-2, -17}},
{{2, 1},
{-1, -52},
@@ -544,25 +466,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8},
- {-33, 9}, {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14},
- {-34, -65}, {-85, 15}, {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19},
- {21, 20}, {-19, -81}, {-66, 22}, {-3, -35}, {24, 23}, {-37, 25},
- {-68, -84}, {-51, 26}, {28, 27}, {-20, -52}, {30, 29}, {-4, -36},
- {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
- {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6},
- {-104, 8}, {-33, 9}, {11, 10}, {13, 12}, {-49, 14},
- {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17}, {-2, -72},
- {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22},
- {-50, 24}, {-82, -119}, {-24, -103}, {26, 25}, {28, 27},
- {30, 29}, {-55, -87}, {-66, 31}, {33, 32}, {-98, 34},
- {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
- {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69},
- {-54, -83}, {44, 43}, {-102, 45}, {-101, 46}, {-68, -85},
- {-36, -53}, {-5, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8}, {-33, 9},
+ {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14}, {-34, -65}, {-85, 15},
+ {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19}, {21, 20}, {-19, -81}, {-66, 22},
+ {-3, -35}, {24, 23}, {-37, 25}, {-68, -84}, {-51, 26}, {28, 27}, {-20, -52},
+ {30, 29}, {-4, -36}, {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
+ {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6}, {-104, 8}, {-33, 9},
+ {11, 10}, {13, 12}, {-49, 14}, {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17},
+ {-2, -72}, {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22}, {-50, 24},
+ {-82, -119}, {-24, -103}, {26, 25}, {28, 27}, {30, 29}, {-55, -87}, {-66, 31},
+ {33, 32}, {-98, 34}, {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
+ {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69}, {-54, -83}, {44, 43},
+ {-102, 45}, {-101, 46}, {-68, -85}, {-36, -53}, {-5, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-2, -17}},
{{2, 1},
{-1, -52},
@@ -579,25 +496,20 @@ const ia_huff_icc_nodes_struct ixheaacd_huff_icc_nodes = {
{-19, 13},
{-3, 14},
{-4, -50}},
- {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8},
- {-33, 9}, {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14},
- {-34, -65}, {-85, 15}, {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19},
- {21, 20}, {-19, -81}, {-66, 22}, {-3, -35}, {24, 23}, {-37, 25},
- {-68, -84}, {-51, 26}, {28, 27}, {-20, -52}, {30, 29}, {-4, -36},
- {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
- {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6},
- {-104, 8}, {-33, 9}, {11, 10}, {13, 12}, {-49, 14},
- {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17}, {-2, -72},
- {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22},
- {-50, 24}, {-82, -119}, {-24, -103}, {26, 25}, {28, 27},
- {30, 29}, {-55, -87}, {-66, 31}, {33, 32}, {-98, 34},
- {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
- {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69},
- {-54, -83}, {44, 43}, {-102, 45}, {-101, 46}, {-68, -85},
- {-36, -53}, {-5, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}}}};
+ {{2, 1}, {-86, 3}, {-1, 4}, {-17, 5}, {7, 6}, {-70, 8}, {-33, 9},
+ {-18, 10}, {-2, 11}, {-54, 12}, {-49, 13}, {-38, 14}, {-34, -65}, {-85, 15},
+ {-50, 16}, {-69, 17}, {-22, 18}, {-53, 19}, {21, 20}, {-19, -81}, {-66, 22},
+ {-3, -35}, {24, 23}, {-37, 25}, {-68, -84}, {-51, 26}, {28, 27}, {-20, -52},
+ {30, 29}, {-4, -36}, {-83, 31}, {-67, 32}, {-82, 33}, {-21, 34}, {-5, -6}},
+ {{2, 1}, {-1, 3}, {-120, 4}, {-17, 5}, {7, 6}, {-104, 8}, {-33, 9},
+ {11, 10}, {13, 12}, {-49, 14}, {-88, 15}, {-18, -97}, {-65, 16}, {-40, 17},
+ {-2, -72}, {19, 18}, {-113, 20}, {-34, 21}, {-56, -81}, {23, 22}, {-50, 24},
+ {-82, -119}, {-24, -103}, {26, 25}, {28, 27}, {30, 29}, {-55, -87}, {-66, 31},
+ {33, 32}, {-98, 34}, {-35, -67}, {-19, 35}, {-70, 36}, {-71, 37}, {-51, -52},
+ {-3, 38}, {40, 39}, {-86, -118}, {42, 41}, {-39, -69}, {-54, -83}, {44, 43},
+ {-102, 45}, {-101, 46}, {-68, -85}, {-36, -53}, {-5, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}}}};
const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{{{-1, 1}, {-8, 2}, {-2, 3}, {5, 4}, {-7, 6}, {-3, -5}, {-4, -6}}},
@@ -620,23 +532,20 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8},
- {11, 10}, {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15},
- {-53, 16}, {-35, 17}, {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19},
- {-34, -65}, {-81, 20}, {-54, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8},
- {10, 9}, {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16},
- {-67, 17}, {19, 18}, {-17, 20}, {-113, 21}, {23, 22}, {-83, 24},
- {-24, 25}, {-103, -104}, {-51, -55}, {27, 26}, {-71, 28}, {-86, 29},
- {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98}, {-72, 32}, {-56, -87},
- {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35}, {-81, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8}, {11, 10},
+ {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15}, {-53, 16}, {-35, 17},
+ {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19}, {-34, -65}, {-81, 20}, {-54, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8}, {10, 9},
+ {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16}, {-67, 17}, {19, 18},
+ {-17, 20}, {-113, 21}, {23, 22}, {-83, 24}, {-24, 25}, {-103, -104}, {-51, -55},
+ {27, 26}, {-71, 28}, {-86, 29}, {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98},
+ {-72, 32}, {-56, -87}, {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35},
+ {-81, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-17, 0}},
{{-1, 1},
{-36, 2},
@@ -653,23 +562,20 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8},
- {11, 10}, {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15},
- {-53, 16}, {-35, 17}, {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19},
- {-34, -65}, {-81, 20}, {-54, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8},
- {10, 9}, {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16},
- {-67, 17}, {19, 18}, {-17, 20}, {-113, 21}, {23, 22}, {-83, 24},
- {-24, 25}, {-103, -104}, {-51, -55}, {27, 26}, {-71, 28}, {-86, 29},
- {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98}, {-72, 32}, {-56, -87},
- {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35}, {-81, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}},
+ {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8}, {11, 10},
+ {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15}, {-53, 16}, {-35, 17},
+ {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19}, {-34, -65}, {-81, 20}, {-54, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8}, {10, 9},
+ {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16}, {-67, 17}, {19, 18},
+ {-17, 20}, {-113, 21}, {23, 22}, {-83, 24}, {-24, 25}, {-103, -104}, {-51, -55},
+ {27, 26}, {-71, 28}, {-86, 29}, {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98},
+ {-72, 32}, {-56, -87}, {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35},
+ {-81, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}},
{{{{-1, 1}, {-18, 2}, {-17, 0}},
{{-1, 1},
{3, 2},
@@ -686,23 +592,20 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {-52, 4}, {-86, 5}, {-35, 6}, {-53, 7},
- {-70, 8}, {-17, 9}, {-37, 10}, {12, 11}, {-38, -66}, {-18, 13},
- {-51, 14}, {16, 15}, {-34, -69}, {18, 17}, {-54, -65}, {-50, 19},
- {-33, -49}, {-22, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{-1, 1}, {-69, 2}, {4, 3}, {-120, 5}, {7, 6}, {-113, 8},
- {-68, 9}, {11, 10}, {-17, 12}, {-52, 13}, {-24, 14}, {-18, 15},
- {17, 16}, {-104, 18}, {20, 19}, {-54, -70}, {22, 21}, {24, 23},
- {-86, -97}, {-103, 25}, {-83, 26}, {-35, 27}, {-34, -98}, {-40, 28},
- {-39, -67}, {30, 29}, {-33, -51}, {-87, 31}, {-88, 32}, {-82, 33},
- {-55, -81}, {-56, -71}, {-72, 34}, {-50, -66}, {-65, 35}, {-49, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{-1, 1}, {3, 2}, {-52, 4}, {-86, 5}, {-35, 6}, {-53, 7}, {-70, 8},
+ {-17, 9}, {-37, 10}, {12, 11}, {-38, -66}, {-18, 13}, {-51, 14}, {16, 15},
+ {-34, -69}, {18, 17}, {-54, -65}, {-50, 19}, {-33, -49}, {-22, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{-1, 1}, {-69, 2}, {4, 3}, {-120, 5}, {7, 6}, {-113, 8}, {-68, 9},
+ {11, 10}, {-17, 12}, {-52, 13}, {-24, 14}, {-18, 15}, {17, 16}, {-104, 18},
+ {20, 19}, {-54, -70}, {22, 21}, {24, 23}, {-86, -97}, {-103, 25}, {-83, 26},
+ {-35, 27}, {-34, -98}, {-40, 28}, {-39, -67}, {30, 29}, {-33, -51}, {-87, 31},
+ {-88, 32}, {-82, 33}, {-55, -81}, {-56, -71}, {-72, 34}, {-50, -66}, {-65, 35},
+ {-49, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-17, 0}},
{{-1, 1},
{3, 2},
@@ -719,23 +622,20 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {-52, 4}, {-86, 5}, {-35, 6}, {-53, 7},
- {-70, 8}, {-17, 9}, {-37, 10}, {12, 11}, {-38, -66}, {-18, 13},
- {-51, 14}, {16, 15}, {-34, -69}, {18, 17}, {-54, -65}, {-50, 19},
- {-33, -49}, {-22, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{-1, 1}, {-69, 2}, {4, 3}, {-120, 5}, {7, 6}, {-113, 8},
- {-68, 9}, {11, 10}, {-17, 12}, {-52, 13}, {-24, 14}, {-18, 15},
- {17, 16}, {-104, 18}, {20, 19}, {-54, -70}, {22, 21}, {24, 23},
- {-86, -97}, {-103, 25}, {-83, 26}, {-35, 27}, {-34, -98}, {-40, 28},
- {-39, -67}, {30, 29}, {-33, -51}, {-87, 31}, {-88, 32}, {-82, 33},
- {-55, -81}, {-56, -71}, {-72, 34}, {-50, -66}, {-65, 35}, {-49, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}},
+ {{-1, 1}, {3, 2}, {-52, 4}, {-86, 5}, {-35, 6}, {-53, 7}, {-70, 8},
+ {-17, 9}, {-37, 10}, {12, 11}, {-38, -66}, {-18, 13}, {-51, 14}, {16, 15},
+ {-34, -69}, {18, 17}, {-54, -65}, {-50, 19}, {-33, -49}, {-22, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{-1, 1}, {-69, 2}, {4, 3}, {-120, 5}, {7, 6}, {-113, 8}, {-68, 9},
+ {11, 10}, {-17, 12}, {-52, 13}, {-24, 14}, {-18, 15}, {17, 16}, {-104, 18},
+ {20, 19}, {-54, -70}, {22, 21}, {24, 23}, {-86, -97}, {-103, 25}, {-83, 26},
+ {-35, 27}, {-34, -98}, {-40, 28}, {-39, -67}, {30, 29}, {-33, -51}, {-87, 31},
+ {-88, 32}, {-82, 33}, {-55, -81}, {-56, -71}, {-72, 34}, {-50, -66}, {-65, 35},
+ {-49, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}},
{{{{-1, 1}, {-18, 2}, {-17, 0}},
{{-1, 1},
{-36, 2},
@@ -752,23 +652,20 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8},
- {11, 10}, {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15},
- {-53, 16}, {-35, 17}, {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19},
- {-34, -65}, {-81, 20}, {-54, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8},
- {10, 9}, {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16},
- {-67, 17}, {19, 18}, {-17, 20}, {-113, 21}, {23, 22}, {-83, 24},
- {-24, 25}, {-103, -104}, {-51, -55}, {27, 26}, {-71, 28}, {-86, 29},
- {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98}, {-72, 32}, {-56, -87},
- {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35}, {-81, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}},
+ {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8}, {11, 10},
+ {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15}, {-53, 16}, {-35, 17},
+ {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19}, {-34, -65}, {-81, 20}, {-54, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8}, {10, 9},
+ {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16}, {-67, 17}, {19, 18},
+ {-17, 20}, {-113, 21}, {23, 22}, {-83, 24}, {-24, 25}, {-103, -104}, {-51, -55},
+ {27, 26}, {-71, 28}, {-86, 29}, {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98},
+ {-72, 32}, {-56, -87}, {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35},
+ {-81, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}},
{{{-1, 1}, {-18, 2}, {-17, 0}},
{{-1, 1},
{-36, 2},
@@ -785,4296 +682,3443 @@ const ia_huff_ipd_nodes_struct ixheaacd_huff_ipd_nodes = {
{0, 0},
{0, 0},
{0, 0}},
- {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8},
- {11, 10}, {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15},
- {-53, 16}, {-35, 17}, {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19},
- {-34, -65}, {-81, 20}, {-54, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
- {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8},
- {10, 9}, {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16},
- {-67, 17}, {19, 18}, {-17, 20}, {-113, 21}, {23, 22}, {-83, 24},
- {-24, 25}, {-103, -104}, {-51, -55}, {27, 26}, {-71, 28}, {-86, 29},
- {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98}, {-72, 32}, {-56, -87},
- {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35}, {-81, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}}}}}};
+ {{-1, 1}, {3, 2}, {5, 4}, {-86, 6}, {-66, 7}, {9, 8}, {11, 10},
+ {-18, 12}, {-51, 13}, {-37, -52}, {-69, 14}, {-38, 15}, {-53, 16}, {-35, 17},
+ {-50, -70}, {-22, -49}, {-33, 18}, {-17, 19}, {-34, -65}, {-81, 20}, {-54, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
+ {{2, 1}, {4, 3}, {-1, 5}, {-69, 6}, {-120, 7}, {-68, 8}, {10, 9},
+ {12, 11}, {14, 13}, {-52, -54}, {-18, 15}, {-70, 16}, {-67, 17}, {19, 18},
+ {-17, 20}, {-113, 21}, {23, 22}, {-83, 24}, {-24, 25}, {-103, -104}, {-51, -55},
+ {27, 26}, {-71, 28}, {-86, 29}, {-35, 30}, {-66, 31}, {-39, -50}, {-82, -98},
+ {-72, 32}, {-56, -87}, {-34, 33}, {-33, -88}, {-40, -97}, {-65, 34}, {-49, 35},
+ {-81, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
+ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}}}};
const ia_huff_pt0_nodes_struct ixheaacd_huff_part0_nodes = {
- {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {10, 9}, {12, 11},
- {14, 13}, {-8, 15}, {-9, 16}, {-10, 17}, {-18, 18}, {-17, -19},
- {-16, 19}, {-11, -20}, {-15, -21}, {-7, 20}, {-22, 21}, {-12, -14},
- {-13, -23}, {23, 22}, {-24, -31}, {-6, 24}, {-25, -26}, {26, 25},
- {-5, -27}, {-28, 27}, {-4, 28}, {-29, 29}, {-1, -30}, {-2, -3}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {10, 9}, {12, 11}, {14, 13}, {-8, 15},
+ {-9, 16}, {-10, 17}, {-18, 18}, {-17, -19}, {-16, 19}, {-11, -20}, {-15, -21}, {-7, 20},
+ {-22, 21}, {-12, -14}, {-13, -23}, {23, 22}, {-24, -31}, {-6, 24}, {-25, -26}, {26, 25},
+ {-5, -27}, {-28, 27}, {-4, 28}, {-29, 29}, {-1, -30}, {-2, -3}},
{{2, 1}, {-5, 3}, {-4, -6}, {-3, 4}, {-2, 5}, {-1, 6}, {-7, -8}},
- {{2, 1}, {4, 3}, {6, 5}, {-15, 7}, {-14, -16},
- {-13, 8}, {-12, 9}, {-11, 10}, {-10, 11}, {-8, -9},
- {-17, 12}, {14, 13}, {-7, 15}, {-18, 16}, {-6, 17},
- {-5, 18}, {-4, -19}, {-3, 19}, {-1, 20}, {-2, -20},
- {22, 21}, {-21, 23}, {-22, -26}, {-23, 24}, {-24, -25}}};
+ {{2, 1}, {4, 3}, {6, 5}, {-15, 7}, {-14, -16}, {-13, 8}, {-12, 9},
+ {-11, 10}, {-10, 11}, {-8, -9}, {-17, 12}, {14, 13}, {-7, 15}, {-18, 16},
+ {-6, 17}, {-5, 18}, {-4, -19}, {-3, 19}, {-1, 20}, {-2, -20}, {22, 21},
+ {-21, 23}, {-22, -26}, {-23, 24}, {-24, -25}}};
const ia_huff_pt0_nodes_struct ixheaacd_huff_pilot_nodes = {
- {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {10, 9}, {12, 11},
- {14, 13}, {-8, 15}, {-9, 16}, {-10, 17}, {-18, 18}, {-17, -19},
- {-16, 19}, {-11, -20}, {-15, -21}, {-7, 20}, {-22, 21}, {-12, -14},
- {-13, -23}, {23, 22}, {-24, -31}, {-6, 24}, {-25, -26}, {26, 25},
- {-5, -27}, {-28, 27}, {-4, 28}, {-29, 29}, {-1, -30}, {-2, -3}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {10, 9}, {12, 11}, {14, 13}, {-8, 15},
+ {-9, 16}, {-10, 17}, {-18, 18}, {-17, -19}, {-16, 19}, {-11, -20}, {-15, -21}, {-7, 20},
+ {-22, 21}, {-12, -14}, {-13, -23}, {23, 22}, {-24, -31}, {-6, 24}, {-25, -26}, {26, 25},
+ {-5, -27}, {-28, 27}, {-4, 28}, {-29, 29}, {-1, -30}, {-2, -3}},
{{2, 1}, {-5, 3}, {-4, -6}, {-3, 4}, {-2, 5}, {-1, 6}, {-7, -8}},
- {{2, 1}, {4, 3}, {6, 5}, {-15, 7}, {-14, -16},
- {-13, 8}, {-12, 9}, {-11, 10}, {-10, 11}, {-8, -9},
- {-17, 12}, {14, 13}, {-7, 15}, {-18, 16}, {-6, 17},
- {-5, 18}, {-4, -19}, {-3, 19}, {-1, 20}, {-2, -20},
- {22, 21}, {-21, 23}, {-22, -26}, {-23, 24}, {-24, -25}}};
+ {{2, 1}, {4, 3}, {6, 5}, {-15, 7}, {-14, -16}, {-13, 8}, {-12, 9},
+ {-11, 10}, {-10, 11}, {-8, -9}, {-17, 12}, {14, 13}, {-7, 15}, {-18, 16},
+ {-6, 17}, {-5, 18}, {-4, -19}, {-3, 19}, {-1, 20}, {-2, -20}, {22, 21},
+ {-21, 23}, {-22, -26}, {-23, 24}, {-24, -25}}};
-const ia_huff_lav_nodes_struct ixheaacd_huff_lav_idx_nodes = {
- {{-1, 1}, {-2, 2}, {-3, -4}}};
+const ia_huff_lav_nodes_struct ixheaacd_huff_lav_idx_nodes = {{{-1, 1}, {-2, 2}, {-3, -4}}};
const ia_huff_res_nodes_struct ixheaacd_huff_reshape_nodes = {
- {{2, 1}, {4, 3}, {6, 5}, {-33, 7}, {-17, 8}, {-49, 9},
- {-34, 10}, {12, 11}, {-18, -35}, {-50, 13}, {15, 14}, {-40, 16},
- {-36, 17}, {-19, 18}, {-1, -37}, {-51, 19}, {21, 20}, {-38, -65},
- {-2, -39}, {-20, 22}, {-52, 23}, {25, 24}, {-21, 26}, {-66, 27},
- {-53, 28}, {-3, 29}, {31, 30}, {-22, 32}, {-54, 33}, {-4, 34},
- {-56, 35}, {-24, -67}, {-23, -55}, {-8, -72}, {-5, 36}, {-68, 37},
- {-6, 38}, {-7, -69}, {-70, -71}}};
+ {{2, 1}, {4, 3}, {6, 5}, {-33, 7}, {-17, 8}, {-49, 9}, {-34, 10}, {12, 11},
+ {-18, -35}, {-50, 13}, {15, 14}, {-40, 16}, {-36, 17}, {-19, 18}, {-1, -37}, {-51, 19},
+ {21, 20}, {-38, -65}, {-2, -39}, {-20, 22}, {-52, 23}, {25, 24}, {-21, 26}, {-66, 27},
+ {-53, 28}, {-3, 29}, {31, 30}, {-22, 32}, {-54, 33}, {-4, 34}, {-56, 35}, {-24, -67},
+ {-23, -55}, {-8, -72}, {-5, 36}, {-68, 37}, {-6, 38}, {-7, -69}, {-70, -71}}};
const FLOAT32 ixheaacd_im_weight[16][8][31] = {
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f}},
{
- {-0.0000000112f, -0.0021408275f, -0.0037915856f, -0.0066939779f,
- -0.0117513090f, -0.0204205140f, -0.0282191336f, -0.0386330411f,
- -0.0521795079f, -0.0691007078f, -0.0889061838f, -0.1028472632f,
- -0.1162045002f, -0.1275303215f, -0.1352165043f, -0.1379496902f,
- -0.1352165043f, -0.1275303215f, -0.1162045151f, -0.1028472632f,
- -0.0889061838f, -0.0691007152f, -0.0521795042f, -0.0386330411f,
- -0.0282191373f, -0.0204205140f, -0.0117513090f, -0.0066939779f,
- -0.0037915856f, -0.0021408275f, -0.0000000112f},
- {-0.0000000112f, -0.0020066053f, -0.0035547465f, -0.0062785484f,
- -0.0110301562f, -0.0191908441f, -0.0265479907f, -0.0363945216f,
- -0.0492380410f, -0.0653315485f, -0.0842306316f, -0.0975688994f,
- -0.1103724390f, -0.1212451607f, -0.1286316365f, -0.1312596500f,
- -0.1286316365f, -0.1212451607f, -0.1103724539f, -0.0975688994f,
- -0.0842306316f, -0.0653315485f, -0.0492380410f, -0.0363945179f,
- -0.0265479945f, -0.0191908441f, -0.0110301562f, -0.0062785484f,
- -0.0035547465f, -0.0020066053f, -0.0000000112f},
- {-0.0000000112f, -0.0018022917f, -0.0031940117f, -0.0056451149f,
- -0.0099285468f, -0.0173068047f, -0.0239810087f, -0.0329449996f,
- -0.0446879528f, -0.0594761744f, -0.0769355893f, -0.0893112868f,
- -0.1012277678f, -0.1113727987f, -0.1182772070f, -0.1207359731f,
- -0.1182772145f, -0.1113727987f, -0.1012277678f, -0.0893112868f,
- -0.0769355893f, -0.0594761670f, -0.0446879528f, -0.0329449996f,
- -0.0239810087f, -0.0173068047f, -0.0099285468f, -0.0056451149f,
- -0.0031940117f, -0.0018022917f, -0.0000000112f},
- {-0.0000000075f, -0.0012891144f, -0.0022867322f, -0.0040483177f,
- -0.0071406178f, -0.0125075802f, -0.0174052790f, -0.0240450911f,
- -0.0328458101f, -0.0440842398f, -0.0575582460f, -0.0672323778f,
- -0.0766361356f, -0.0847055018f, -0.0902284831f, -0.0922011584f,
- -0.0902284905f, -0.0847054794f, -0.0766361505f, -0.0672323853f,
- -0.0575582460f, -0.0440842435f, -0.0328458101f, -0.0240450911f,
- -0.0174052827f, -0.0125075765f, -0.0071406178f, -0.0040483177f,
- -0.0022867322f, -0.0012891144f, -0.0000000075f},
- {-0.0000000037f, -0.0007896237f, -0.0014020018f, -0.0024860986f,
- -0.0043976195f, -0.0077406205f, -0.0108190365f, -0.0150338411f,
- -0.0206919834f, -0.0280320831f, -0.0369941890f, -0.0435322672f,
- -0.0499662980f, -0.0555463918f, -0.0593958311f, -0.0607765391f,
- -0.0593958348f, -0.0555463918f, -0.0499663055f, -0.0435322709f,
- -0.0369941890f, -0.0280320831f, -0.0206919834f, -0.0150338374f,
- -0.0108190365f, -0.0077406205f, -0.0043976195f, -0.0024860986f,
- -0.0014020018f, -0.0007896237f, -0.0000000037f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000075f, 0.0012713782f, 0.0022661425f, 0.0040463172f,
- 0.0072463304f, 0.0130392574f, 0.0186092220f, 0.0266334303f,
- 0.0382109210f, 0.0548328981f, 0.0785857737f, 0.1031111330f,
- 0.1333933324f, 0.1665901542f, 0.1946617961f, 0.2060326636f,
- 0.1946618259f, 0.1665901244f, 0.1333933473f, 0.1031111330f,
- 0.0785857737f, 0.0548328906f, 0.0382109210f, 0.0266334265f,
- 0.0186092220f, 0.0130392574f, 0.0072463304f, 0.0040463172f,
- 0.0022661425f, 0.0012713782f, 0.0000000075f},
- {0.0000000112f, 0.0021414421f, 0.0038233139f, 0.0068472549f,
- 0.0123301037f, 0.0224180110f, 0.0323300436f, 0.0470142886f,
- 0.0691649169f, 0.1103344262f, 0.1914317459f, 0.2921350002f,
- 0.4732147753f, 0.8167075515f, 1.4096112251f, 1.8493235111f,
- 1.4096120596f, 0.8167073727f, 0.4732148349f, 0.2921350002f,
- 0.1914317757f, 0.1103344262f, 0.0691649169f, 0.0470142849f,
- 0.0323300473f, 0.0224180073f, 0.0123301037f, 0.0068472549f,
- 0.0038233139f, 0.0021414421f, 0.0000000112f}},
+ {-0.0000000112f, -0.0021408275f, -0.0037915856f, -0.0066939779f, -0.0117513090f,
+ -0.0204205140f, -0.0282191336f, -0.0386330411f, -0.0521795079f, -0.0691007078f,
+ -0.0889061838f, -0.1028472632f, -0.1162045002f, -0.1275303215f, -0.1352165043f,
+ -0.1379496902f, -0.1352165043f, -0.1275303215f, -0.1162045151f, -0.1028472632f,
+ -0.0889061838f, -0.0691007152f, -0.0521795042f, -0.0386330411f, -0.0282191373f,
+ -0.0204205140f, -0.0117513090f, -0.0066939779f, -0.0037915856f, -0.0021408275f,
+ -0.0000000112f},
+ {-0.0000000112f, -0.0020066053f, -0.0035547465f, -0.0062785484f, -0.0110301562f,
+ -0.0191908441f, -0.0265479907f, -0.0363945216f, -0.0492380410f, -0.0653315485f,
+ -0.0842306316f, -0.0975688994f, -0.1103724390f, -0.1212451607f, -0.1286316365f,
+ -0.1312596500f, -0.1286316365f, -0.1212451607f, -0.1103724539f, -0.0975688994f,
+ -0.0842306316f, -0.0653315485f, -0.0492380410f, -0.0363945179f, -0.0265479945f,
+ -0.0191908441f, -0.0110301562f, -0.0062785484f, -0.0035547465f, -0.0020066053f,
+ -0.0000000112f},
+ {-0.0000000112f, -0.0018022917f, -0.0031940117f, -0.0056451149f, -0.0099285468f,
+ -0.0173068047f, -0.0239810087f, -0.0329449996f, -0.0446879528f, -0.0594761744f,
+ -0.0769355893f, -0.0893112868f, -0.1012277678f, -0.1113727987f, -0.1182772070f,
+ -0.1207359731f, -0.1182772145f, -0.1113727987f, -0.1012277678f, -0.0893112868f,
+ -0.0769355893f, -0.0594761670f, -0.0446879528f, -0.0329449996f, -0.0239810087f,
+ -0.0173068047f, -0.0099285468f, -0.0056451149f, -0.0031940117f, -0.0018022917f,
+ -0.0000000112f},
+ {-0.0000000075f, -0.0012891144f, -0.0022867322f, -0.0040483177f, -0.0071406178f,
+ -0.0125075802f, -0.0174052790f, -0.0240450911f, -0.0328458101f, -0.0440842398f,
+ -0.0575582460f, -0.0672323778f, -0.0766361356f, -0.0847055018f, -0.0902284831f,
+ -0.0922011584f, -0.0902284905f, -0.0847054794f, -0.0766361505f, -0.0672323853f,
+ -0.0575582460f, -0.0440842435f, -0.0328458101f, -0.0240450911f, -0.0174052827f,
+ -0.0125075765f, -0.0071406178f, -0.0040483177f, -0.0022867322f, -0.0012891144f,
+ -0.0000000075f},
+ {-0.0000000037f, -0.0007896237f, -0.0014020018f, -0.0024860986f, -0.0043976195f,
+ -0.0077406205f, -0.0108190365f, -0.0150338411f, -0.0206919834f, -0.0280320831f,
+ -0.0369941890f, -0.0435322672f, -0.0499662980f, -0.0555463918f, -0.0593958311f,
+ -0.0607765391f, -0.0593958348f, -0.0555463918f, -0.0499663055f, -0.0435322709f,
+ -0.0369941890f, -0.0280320831f, -0.0206919834f, -0.0150338374f, -0.0108190365f,
+ -0.0077406205f, -0.0043976195f, -0.0024860986f, -0.0014020018f, -0.0007896237f,
+ -0.0000000037f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000075f, 0.0012713782f, 0.0022661425f, 0.0040463172f, 0.0072463304f, 0.0130392574f,
+ 0.0186092220f, 0.0266334303f, 0.0382109210f, 0.0548328981f, 0.0785857737f, 0.1031111330f,
+ 0.1333933324f, 0.1665901542f, 0.1946617961f, 0.2060326636f, 0.1946618259f, 0.1665901244f,
+ 0.1333933473f, 0.1031111330f, 0.0785857737f, 0.0548328906f, 0.0382109210f, 0.0266334265f,
+ 0.0186092220f, 0.0130392574f, 0.0072463304f, 0.0040463172f, 0.0022661425f, 0.0012713782f,
+ 0.0000000075f},
+ {0.0000000112f, 0.0021414421f, 0.0038233139f, 0.0068472549f, 0.0123301037f, 0.0224180110f,
+ 0.0323300436f, 0.0470142886f, 0.0691649169f, 0.1103344262f, 0.1914317459f, 0.2921350002f,
+ 0.4732147753f, 0.8167075515f, 1.4096112251f, 1.8493235111f, 1.4096120596f, 0.8167073727f,
+ 0.4732148349f, 0.2921350002f, 0.1914317757f, 0.1103344262f, 0.0691649169f, 0.0470142849f,
+ 0.0323300473f, 0.0224180073f, 0.0123301037f, 0.0068472549f, 0.0038233139f, 0.0021414421f,
+ 0.0000000112f}},
{
- {-0.0000000224f, -0.0039605126f, -0.0070208944f, -0.0124152638f,
- -0.0218554586f, -0.0381546505f, -0.0529386774f, -0.0728518367f,
- -0.0990312099f, -0.1321374029f, -0.1714010537f, -0.1993359923f,
- -0.2263071835f, -0.2493202984f, -0.2650071084f, -0.2705980539f,
- -0.2650071084f, -0.2493202686f, -0.2263071984f, -0.1993360072f,
- -0.1714010835f, -0.1321374029f, -0.0990312099f, -0.0728518218f,
- -0.0529386811f, -0.0381546505f, -0.0218554623f, -0.0124152638f,
- -0.0070208944f, -0.0039605126f, -0.0000000224f},
- {-0.0000000224f, -0.0037119202f, -0.0065814704f, -0.0116420984f,
- -0.0205062106f, -0.0358339138f, -0.0497612022f, -0.0685553476f,
- -0.0933211446f, -0.1247262210f, -0.1620853394f, -0.1887322366f,
- -0.2145074457f, -0.2365338504f, -0.2515646219f, -0.2569248080f,
- -0.2515646219f, -0.2365338504f, -0.2145074606f, -0.1887322664f,
- -0.1620853394f, -0.1247262210f, -0.0933211446f, -0.0685553402f,
- -0.0497612059f, -0.0358339138f, -0.0205062106f, -0.0116420984f,
- -0.0065814704f, -0.0037119202f, -0.0000000224f},
- {-0.0000000186f, -0.0033335909f, -0.0059123859f, -0.0104638673f,
- -0.0184471272f, -0.0322837904f, -0.0448903739f, -0.0619516075f,
- -0.0845159143f, -0.1132542193f, -0.1476069838f, -0.1722094864f,
- -0.1960791647f, -0.2165289074f, -0.2305092514f, -0.2354996800f,
- -0.2305092812f, -0.2165289074f, -0.1960791945f, -0.1722095013f,
- -0.1476069987f, -0.1132542193f, -0.0845159143f, -0.0619516037f,
- -0.0448903739f, -0.0322837941f, -0.0184471309f, -0.0104638673f,
- -0.0059123859f, -0.0033335909f, -0.0000000186f},
- {-0.0000000149f, -0.0023837052f, -0.0042307824f, -0.0074973591f,
- -0.0132469125f, -0.0232715160f, -0.0324691795f, -0.0450118184f,
- -0.0617620312f, -0.0833501816f, -0.1095077544f, -0.1284611970f,
- -0.1470141709f, -0.1630301923f, -0.1740406305f, -0.1779824793f,
- -0.1740406305f, -0.1630301923f, -0.1470141858f, -0.1284611970f,
- -0.1095077544f, -0.0833501816f, -0.0617620312f, -0.0450118184f,
- -0.0324691832f, -0.0232715160f, -0.0132469125f, -0.0074973591f,
- -0.0042307824f, -0.0023837052f, -0.0000000149f},
- {-0.0000000075f, -0.0014596879f, -0.0025926158f, -0.0046001561f,
- -0.0081458427f, -0.0143647529f, -0.0201114044f, -0.0280098952f,
- -0.0386673734f, -0.0525827743f, -0.0697054639f, -0.0822848827f,
- -0.0947335809f, -0.1055838689f, -0.1130971760f, -0.1157975048f,
- -0.1130971834f, -0.1055838689f, -0.0947335884f, -0.0822848827f,
- -0.0697054639f, -0.0525827669f, -0.0386673696f, -0.0280098915f,
- -0.0201114081f, -0.0143647529f, -0.0081458427f, -0.0046001561f,
- -0.0025926158f, -0.0014596879f, -0.0000000075f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000149f, 0.0023475029f, 0.0041818954f, 0.0074593760f,
- 0.0133338906f, 0.0239118338f, 0.0340123922f, 0.0484390482f,
- 0.0689862818f, 0.0979072377f, 0.1372926533f, 0.1694079041f,
- 0.2086421102f, 0.2509776056f, 0.2844191492f, 0.2973977327f,
- 0.2844191492f, 0.2509775758f, 0.2086421251f, 0.1694079340f,
- 0.1372926682f, 0.0979072377f, 0.0689862818f, 0.0484390408f,
- 0.0340123959f, 0.0239118338f, 0.0133338906f, 0.0074593760f,
- 0.0041818954f, 0.0023475029f, 0.0000000149f},
- {0.0000000224f, 0.0039520524f, 0.0070491731f, 0.0126024745f,
- 0.0226208717f, 0.0408787355f, 0.0585894026f, 0.0843905658f,
- 0.1222686619f, 0.1781808585f, 0.2806743085f, 0.3863530755f,
- 0.5320819616f, 0.7150993347f, 0.8931091428f, 0.9723875523f,
- 0.8931093216f, 0.7150993347f, 0.5320819616f, 0.3863530755f,
- 0.2806743681f, 0.1781808585f, 0.1222686619f, 0.0843905583f,
- 0.0585894100f, 0.0408787355f, 0.0226208754f, 0.0126024783f,
- 0.0070491731f, 0.0039520524f, 0.0000000224f}},
+ {-0.0000000224f, -0.0039605126f, -0.0070208944f, -0.0124152638f, -0.0218554586f,
+ -0.0381546505f, -0.0529386774f, -0.0728518367f, -0.0990312099f, -0.1321374029f,
+ -0.1714010537f, -0.1993359923f, -0.2263071835f, -0.2493202984f, -0.2650071084f,
+ -0.2705980539f, -0.2650071084f, -0.2493202686f, -0.2263071984f, -0.1993360072f,
+ -0.1714010835f, -0.1321374029f, -0.0990312099f, -0.0728518218f, -0.0529386811f,
+ -0.0381546505f, -0.0218554623f, -0.0124152638f, -0.0070208944f, -0.0039605126f,
+ -0.0000000224f},
+ {-0.0000000224f, -0.0037119202f, -0.0065814704f, -0.0116420984f, -0.0205062106f,
+ -0.0358339138f, -0.0497612022f, -0.0685553476f, -0.0933211446f, -0.1247262210f,
+ -0.1620853394f, -0.1887322366f, -0.2145074457f, -0.2365338504f, -0.2515646219f,
+ -0.2569248080f, -0.2515646219f, -0.2365338504f, -0.2145074606f, -0.1887322664f,
+ -0.1620853394f, -0.1247262210f, -0.0933211446f, -0.0685553402f, -0.0497612059f,
+ -0.0358339138f, -0.0205062106f, -0.0116420984f, -0.0065814704f, -0.0037119202f,
+ -0.0000000224f},
+ {-0.0000000186f, -0.0033335909f, -0.0059123859f, -0.0104638673f, -0.0184471272f,
+ -0.0322837904f, -0.0448903739f, -0.0619516075f, -0.0845159143f, -0.1132542193f,
+ -0.1476069838f, -0.1722094864f, -0.1960791647f, -0.2165289074f, -0.2305092514f,
+ -0.2354996800f, -0.2305092812f, -0.2165289074f, -0.1960791945f, -0.1722095013f,
+ -0.1476069987f, -0.1132542193f, -0.0845159143f, -0.0619516037f, -0.0448903739f,
+ -0.0322837941f, -0.0184471309f, -0.0104638673f, -0.0059123859f, -0.0033335909f,
+ -0.0000000186f},
+ {-0.0000000149f, -0.0023837052f, -0.0042307824f, -0.0074973591f, -0.0132469125f,
+ -0.0232715160f, -0.0324691795f, -0.0450118184f, -0.0617620312f, -0.0833501816f,
+ -0.1095077544f, -0.1284611970f, -0.1470141709f, -0.1630301923f, -0.1740406305f,
+ -0.1779824793f, -0.1740406305f, -0.1630301923f, -0.1470141858f, -0.1284611970f,
+ -0.1095077544f, -0.0833501816f, -0.0617620312f, -0.0450118184f, -0.0324691832f,
+ -0.0232715160f, -0.0132469125f, -0.0074973591f, -0.0042307824f, -0.0023837052f,
+ -0.0000000149f},
+ {-0.0000000075f, -0.0014596879f, -0.0025926158f, -0.0046001561f, -0.0081458427f,
+ -0.0143647529f, -0.0201114044f, -0.0280098952f, -0.0386673734f, -0.0525827743f,
+ -0.0697054639f, -0.0822848827f, -0.0947335809f, -0.1055838689f, -0.1130971760f,
+ -0.1157975048f, -0.1130971834f, -0.1055838689f, -0.0947335884f, -0.0822848827f,
+ -0.0697054639f, -0.0525827669f, -0.0386673696f, -0.0280098915f, -0.0201114081f,
+ -0.0143647529f, -0.0081458427f, -0.0046001561f, -0.0025926158f, -0.0014596879f,
+ -0.0000000075f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000149f, 0.0023475029f, 0.0041818954f, 0.0074593760f, 0.0133338906f, 0.0239118338f,
+ 0.0340123922f, 0.0484390482f, 0.0689862818f, 0.0979072377f, 0.1372926533f, 0.1694079041f,
+ 0.2086421102f, 0.2509776056f, 0.2844191492f, 0.2973977327f, 0.2844191492f, 0.2509775758f,
+ 0.2086421251f, 0.1694079340f, 0.1372926682f, 0.0979072377f, 0.0689862818f, 0.0484390408f,
+ 0.0340123959f, 0.0239118338f, 0.0133338906f, 0.0074593760f, 0.0041818954f, 0.0023475029f,
+ 0.0000000149f},
+ {0.0000000224f, 0.0039520524f, 0.0070491731f, 0.0126024745f, 0.0226208717f, 0.0408787355f,
+ 0.0585894026f, 0.0843905658f, 0.1222686619f, 0.1781808585f, 0.2806743085f, 0.3863530755f,
+ 0.5320819616f, 0.7150993347f, 0.8931091428f, 0.9723875523f, 0.8931093216f, 0.7150993347f,
+ 0.5320819616f, 0.3863530755f, 0.2806743681f, 0.1781808585f, 0.1222686619f, 0.0843905583f,
+ 0.0585894100f, 0.0408787355f, 0.0226208754f, 0.0126024783f, 0.0070491731f, 0.0039520524f,
+ 0.0000000224f}},
{
- {-0.0000000298f, -0.0051840469f, -0.0092027225f, -0.0163133591f,
- -0.0288398713f, -0.0507133082f, -0.0708183646f, -0.0982891619f,
- -0.1350691319f, -0.1826232225f, -0.2404572219f, -0.2825006247f,
- -0.3237607479f, -0.3594581187f, -0.3840393722f, -0.3928474486f,
- -0.3840393722f, -0.3594581187f, -0.3237607479f, -0.2825005651f,
- -0.2404572070f, -0.1826232225f, -0.1350691319f, -0.0982891619f,
- -0.0708183795f, -0.0507133119f, -0.0288398750f, -0.0163133591f,
- -0.0092027225f, -0.0051840469f, -0.0000000298f},
- {-0.0000000261f, -0.0048581101f, -0.0086250156f, -0.0152920857f,
- -0.0270430781f, -0.0475800671f, -0.0664762110f, -0.0923245847f,
- -0.1269837022f, -0.1718791127f, -0.2265993804f, -0.2664566636f,
- -0.3056311905f, -0.3395695388f, -0.3629629016f, -0.3713498116f,
- -0.3629629016f, -0.3395695090f, -0.3056312203f, -0.2664566636f,
- -0.2265993953f, -0.1718791127f, -0.1269837171f, -0.0923245698f,
- -0.0664762333f, -0.0475800708f, -0.0270430781f, -0.0152920857f,
- -0.0086250156f, -0.0048581101f, -0.0000000261f},
- {-0.0000000261f, -0.0043622032f, -0.0077458210f, -0.0137371235f,
- -0.0243051313f, -0.0427990705f, -0.0598423555f, -0.0831969902f,
- -0.1145843118f, -0.1553593576f, -0.2052282989f, -0.2416637540f,
- -0.2775619924f, -0.3087284863f, -0.3302457929f, -0.3379668295f,
- -0.3302457929f, -0.3087284863f, -0.2775620222f, -0.2416637540f,
- -0.2052282989f, -0.1553593576f, -0.1145842969f, -0.0831969753f,
- -0.0598423593f, -0.0427990742f, -0.0243051313f, -0.0137371235f,
- -0.0077458210f, -0.0043622032f, -0.0000000261f},
- {-0.0000000186f, -0.0031178668f, -0.0055385008f, -0.0098293871f,
- -0.0174126737f, -0.0307279304f, -0.0430483781f, -0.0600074269f,
- -0.0829356760f, -0.1129490435f, -0.1499940902f, -0.1772867739f,
- -0.2043576390f, -0.2280011624f, -0.2443988174f, -0.2502972782f,
- -0.2443988174f, -0.2280011177f, -0.2043576539f, -0.1772867888f,
- -0.1499940902f, -0.1129490361f, -0.0829356685f, -0.0600074232f,
- -0.0430483781f, -0.0307279266f, -0.0174126774f, -0.0098293871f,
- -0.0055385008f, -0.0031178668f, -0.0000000186f},
- {-0.0000000112f, -0.0019084513f, -0.0033914447f, -0.0060230605f,
- -0.0106827281f, -0.0188915879f, -0.0265177265f, -0.0370627642f,
- -0.0514063872f, -0.0703314394f, -0.0939192176f, -0.1114559472f,
- -0.1289804578f, -0.1443904936f, -0.1551341563f, -0.1590099633f,
- -0.1551341563f, -0.1443904787f, -0.1289804578f, -0.1114559621f,
- -0.0939192176f, -0.0703314394f, -0.0514063835f, -0.0370627567f,
- -0.0265177302f, -0.0188915879f, -0.0106827319f, -0.0060230605f,
- -0.0033914447f, -0.0019084513f, -0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000186f, 0.0030638538f, 0.0054534115f, 0.0097127110f,
- 0.0173145495f, 0.0308970734f, 0.0437387861f, 0.0618620813f,
- 0.0872256160f, 0.1220206320f, 0.1676785648f, 0.2034175098f,
- 0.2407984287f, 0.2751578987f, 0.2999968529f, 0.3091448545f,
- 0.2999968529f, 0.2751578689f, 0.2407984734f, 0.2034175098f,
- 0.1676785648f, 0.1220206320f, 0.0872256160f, 0.0618620738f,
- 0.0437387899f, 0.0308970734f, 0.0173145495f, 0.0097127147f,
- 0.0054534115f, 0.0030638538f, 0.0000000186f},
- {0.0000000298f, 0.0051542334f, 0.0091803372f, 0.0163703524f,
- 0.0292467400f, 0.0523967445f, 0.0744579434f, 0.1058912277f,
- 0.1504984796f, 0.2129460871f, 0.2973079085f, 0.3654728234f,
- 0.4390078187f, 0.5227220654f, 0.5883262753f, 0.6135464311f,
- 0.5883263350f, 0.5227220654f, 0.4390078485f, 0.3654727936f,
- 0.2973079383f, 0.2129460573f, 0.1504984647f, 0.1058912203f,
- 0.0744579583f, 0.0523967408f, 0.0292467475f, 0.0163703524f,
- 0.0091803372f, 0.0051542334f, 0.0000000298f}},
+ {-0.0000000298f, -0.0051840469f, -0.0092027225f, -0.0163133591f, -0.0288398713f,
+ -0.0507133082f, -0.0708183646f, -0.0982891619f, -0.1350691319f, -0.1826232225f,
+ -0.2404572219f, -0.2825006247f, -0.3237607479f, -0.3594581187f, -0.3840393722f,
+ -0.3928474486f, -0.3840393722f, -0.3594581187f, -0.3237607479f, -0.2825005651f,
+ -0.2404572070f, -0.1826232225f, -0.1350691319f, -0.0982891619f, -0.0708183795f,
+ -0.0507133119f, -0.0288398750f, -0.0163133591f, -0.0092027225f, -0.0051840469f,
+ -0.0000000298f},
+ {-0.0000000261f, -0.0048581101f, -0.0086250156f, -0.0152920857f, -0.0270430781f,
+ -0.0475800671f, -0.0664762110f, -0.0923245847f, -0.1269837022f, -0.1718791127f,
+ -0.2265993804f, -0.2664566636f, -0.3056311905f, -0.3395695388f, -0.3629629016f,
+ -0.3713498116f, -0.3629629016f, -0.3395695090f, -0.3056312203f, -0.2664566636f,
+ -0.2265993953f, -0.1718791127f, -0.1269837171f, -0.0923245698f, -0.0664762333f,
+ -0.0475800708f, -0.0270430781f, -0.0152920857f, -0.0086250156f, -0.0048581101f,
+ -0.0000000261f},
+ {-0.0000000261f, -0.0043622032f, -0.0077458210f, -0.0137371235f, -0.0243051313f,
+ -0.0427990705f, -0.0598423555f, -0.0831969902f, -0.1145843118f, -0.1553593576f,
+ -0.2052282989f, -0.2416637540f, -0.2775619924f, -0.3087284863f, -0.3302457929f,
+ -0.3379668295f, -0.3302457929f, -0.3087284863f, -0.2775620222f, -0.2416637540f,
+ -0.2052282989f, -0.1553593576f, -0.1145842969f, -0.0831969753f, -0.0598423593f,
+ -0.0427990742f, -0.0243051313f, -0.0137371235f, -0.0077458210f, -0.0043622032f,
+ -0.0000000261f},
+ {-0.0000000186f, -0.0031178668f, -0.0055385008f, -0.0098293871f, -0.0174126737f,
+ -0.0307279304f, -0.0430483781f, -0.0600074269f, -0.0829356760f, -0.1129490435f,
+ -0.1499940902f, -0.1772867739f, -0.2043576390f, -0.2280011624f, -0.2443988174f,
+ -0.2502972782f, -0.2443988174f, -0.2280011177f, -0.2043576539f, -0.1772867888f,
+ -0.1499940902f, -0.1129490361f, -0.0829356685f, -0.0600074232f, -0.0430483781f,
+ -0.0307279266f, -0.0174126774f, -0.0098293871f, -0.0055385008f, -0.0031178668f,
+ -0.0000000186f},
+ {-0.0000000112f, -0.0019084513f, -0.0033914447f, -0.0060230605f, -0.0106827281f,
+ -0.0188915879f, -0.0265177265f, -0.0370627642f, -0.0514063872f, -0.0703314394f,
+ -0.0939192176f, -0.1114559472f, -0.1289804578f, -0.1443904936f, -0.1551341563f,
+ -0.1590099633f, -0.1551341563f, -0.1443904787f, -0.1289804578f, -0.1114559621f,
+ -0.0939192176f, -0.0703314394f, -0.0514063835f, -0.0370627567f, -0.0265177302f,
+ -0.0188915879f, -0.0106827319f, -0.0060230605f, -0.0033914447f, -0.0019084513f,
+ -0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000186f, 0.0030638538f, 0.0054534115f, 0.0097127110f, 0.0173145495f, 0.0308970734f,
+ 0.0437387861f, 0.0618620813f, 0.0872256160f, 0.1220206320f, 0.1676785648f, 0.2034175098f,
+ 0.2407984287f, 0.2751578987f, 0.2999968529f, 0.3091448545f, 0.2999968529f, 0.2751578689f,
+ 0.2407984734f, 0.2034175098f, 0.1676785648f, 0.1220206320f, 0.0872256160f, 0.0618620738f,
+ 0.0437387899f, 0.0308970734f, 0.0173145495f, 0.0097127147f, 0.0054534115f, 0.0030638538f,
+ 0.0000000186f},
+ {0.0000000298f, 0.0051542334f, 0.0091803372f, 0.0163703524f, 0.0292467400f, 0.0523967445f,
+ 0.0744579434f, 0.1058912277f, 0.1504984796f, 0.2129460871f, 0.2973079085f, 0.3654728234f,
+ 0.4390078187f, 0.5227220654f, 0.5883262753f, 0.6135464311f, 0.5883263350f, 0.5227220654f,
+ 0.4390078485f, 0.3654727936f, 0.2973079383f, 0.2129460573f, 0.1504984647f, 0.1058912203f,
+ 0.0744579583f, 0.0523967408f, 0.0292467475f, 0.0163703524f, 0.0091803372f, 0.0051542334f,
+ 0.0000000298f}},
{
- {-0.0000000298f, -0.0056232363f, -0.0099989995f, -0.0177771710f,
- -0.0315911807f, -0.0560568646f, -0.0789347738f, -0.1108068749f,
- -0.1546058059f, -0.2131874412f, -0.2874797881f, -0.3436433673f,
- -0.4005688727f, -0.4512940049f, -0.4870319068f, -0.5000000596f,
- -0.4870318770f, -0.4512940049f, -0.4005689025f, -0.3436433673f,
- -0.2874797881f, -0.2131874263f, -0.1546057910f, -0.1108068675f,
- -0.0789347813f, -0.0560568646f, -0.0315911844f, -0.0177771710f,
- -0.0099989995f, -0.0056232363f, -0.0000000298f},
- {-0.0000000298f, -0.0052689724f, -0.0093690604f, -0.0166572109f,
- -0.0296009369f, -0.0525252819f, -0.0739618763f, -0.1038260460f,
- -0.1448656321f, -0.1997566223f, -0.2693685591f, -0.3219937980f,
- -0.3753330112f, -0.4228624403f, -0.4563488960f, -0.4685000181f,
- -0.4563488662f, -0.4228624701f, -0.3753330410f, -0.3219938278f,
- -0.2693685591f, -0.1997566223f, -0.1448656321f, -0.1038260311f,
- -0.0739618912f, -0.0525252856f, -0.0296009406f, -0.0166572109f,
- -0.0093690641f, -0.0052689724f, -0.0000000298f},
- {-0.0000000261f, -0.0047301538f, -0.0084109604f, -0.0149538033f,
- -0.0265738703f, -0.0471539162f, -0.0663983598f, -0.0932085291f,
- -0.1300513148f, -0.1793290079f, -0.2418222427f, -0.2890659571f,
- -0.3369505107f, -0.3796194792f, -0.4096814692f, -0.4205900431f,
- -0.4096814990f, -0.3796194792f, -0.3369505405f, -0.2890659273f,
- -0.2418222576f, -0.1793290079f, -0.1300513148f, -0.0932085216f,
- -0.0663983598f, -0.0471539162f, -0.0265738703f, -0.0149538033f,
- -0.0084109604f, -0.0047301538f, -0.0000000261f},
- {-0.0000000186f, -0.0033791140f, -0.0060085990f, -0.0106826574f,
- -0.0189837739f, -0.0336856917f, -0.0474334881f, -0.0665860698f,
- -0.0929057151f, -0.1281086057f, -0.1727523506f, -0.2065021843f,
- -0.2407098413f, -0.2711915970f, -0.2926672101f, -0.3004600108f,
- -0.2926672101f, -0.2711915672f, -0.2407098711f, -0.2065021843f,
- -0.1727523655f, -0.1281086057f, -0.0929057226f, -0.0665860623f,
- -0.0474334918f, -0.0336856917f, -0.0189837739f, -0.0106826574f,
- -0.0060085990f, -0.0033791140f, -0.0000000186f},
- {-0.0000000112f, -0.0020673275f, -0.0036760308f, -0.0065355971f,
- -0.0116141811f, -0.0206087455f, -0.0290195793f, -0.0407370403f,
- -0.0568392761f, -0.0783762336f, -0.1056890637f, -0.1263370365f,
- -0.1472651362f, -0.1659137160f, -0.1790523976f, -0.1838199943f,
- -0.1790523976f, -0.1659137160f, -0.1472651511f, -0.1263370514f,
- -0.1056890711f, -0.0783762261f, -0.0568392724f, -0.0407370329f,
- -0.0290195830f, -0.0206087418f, -0.0116141811f, -0.0065356009f,
- -0.0036760308f, -0.0020673275f, -0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000186f, 0.0033120848f, 0.0058894120f, 0.0104707554f,
- 0.0186072066f, 0.0330174938f, 0.0464925803f, 0.0652652532f,
- 0.0910628140f, 0.1255674064f, 0.1693255901f, 0.2024059296f,
- 0.2359350473f, 0.2658121586f, 0.2868617475f, 0.2944999933f,
- 0.2868617773f, 0.2658121288f, 0.2359350622f, 0.2024059445f,
- 0.1693255901f, 0.1255674064f, 0.0910628140f, 0.0652652457f,
- 0.0464925840f, 0.0330174938f, 0.0186072066f, 0.0104707554f,
- 0.0058894120f, 0.0033120848f, 0.0000000186f},
- {0.0000000298f, 0.0055670030f, 0.0098990090f, 0.0175994001f,
- 0.0312752686f, 0.0554962978f, 0.0781454220f, 0.1096988022f,
- 0.1530597508f, 0.2110555619f, 0.2846049964f, 0.3402069509f,
- 0.3965631723f, 0.4467810690f, 0.4821615815f, 0.4950000048f,
- 0.4821615815f, 0.4467810690f, 0.3965632021f, 0.3402069509f,
- 0.2846049964f, 0.2110555619f, 0.1530597359f, 0.1096988022f,
- 0.0781454295f, 0.0554962978f, 0.0312752724f, 0.0175994039f,
- 0.0098990090f, 0.0055670030f, 0.0000000298f}},
+ {-0.0000000298f, -0.0056232363f, -0.0099989995f, -0.0177771710f, -0.0315911807f,
+ -0.0560568646f, -0.0789347738f, -0.1108068749f, -0.1546058059f, -0.2131874412f,
+ -0.2874797881f, -0.3436433673f, -0.4005688727f, -0.4512940049f, -0.4870319068f,
+ -0.5000000596f, -0.4870318770f, -0.4512940049f, -0.4005689025f, -0.3436433673f,
+ -0.2874797881f, -0.2131874263f, -0.1546057910f, -0.1108068675f, -0.0789347813f,
+ -0.0560568646f, -0.0315911844f, -0.0177771710f, -0.0099989995f, -0.0056232363f,
+ -0.0000000298f},
+ {-0.0000000298f, -0.0052689724f, -0.0093690604f, -0.0166572109f, -0.0296009369f,
+ -0.0525252819f, -0.0739618763f, -0.1038260460f, -0.1448656321f, -0.1997566223f,
+ -0.2693685591f, -0.3219937980f, -0.3753330112f, -0.4228624403f, -0.4563488960f,
+ -0.4685000181f, -0.4563488662f, -0.4228624701f, -0.3753330410f, -0.3219938278f,
+ -0.2693685591f, -0.1997566223f, -0.1448656321f, -0.1038260311f, -0.0739618912f,
+ -0.0525252856f, -0.0296009406f, -0.0166572109f, -0.0093690641f, -0.0052689724f,
+ -0.0000000298f},
+ {-0.0000000261f, -0.0047301538f, -0.0084109604f, -0.0149538033f, -0.0265738703f,
+ -0.0471539162f, -0.0663983598f, -0.0932085291f, -0.1300513148f, -0.1793290079f,
+ -0.2418222427f, -0.2890659571f, -0.3369505107f, -0.3796194792f, -0.4096814692f,
+ -0.4205900431f, -0.4096814990f, -0.3796194792f, -0.3369505405f, -0.2890659273f,
+ -0.2418222576f, -0.1793290079f, -0.1300513148f, -0.0932085216f, -0.0663983598f,
+ -0.0471539162f, -0.0265738703f, -0.0149538033f, -0.0084109604f, -0.0047301538f,
+ -0.0000000261f},
+ {-0.0000000186f, -0.0033791140f, -0.0060085990f, -0.0106826574f, -0.0189837739f,
+ -0.0336856917f, -0.0474334881f, -0.0665860698f, -0.0929057151f, -0.1281086057f,
+ -0.1727523506f, -0.2065021843f, -0.2407098413f, -0.2711915970f, -0.2926672101f,
+ -0.3004600108f, -0.2926672101f, -0.2711915672f, -0.2407098711f, -0.2065021843f,
+ -0.1727523655f, -0.1281086057f, -0.0929057226f, -0.0665860623f, -0.0474334918f,
+ -0.0336856917f, -0.0189837739f, -0.0106826574f, -0.0060085990f, -0.0033791140f,
+ -0.0000000186f},
+ {-0.0000000112f, -0.0020673275f, -0.0036760308f, -0.0065355971f, -0.0116141811f,
+ -0.0206087455f, -0.0290195793f, -0.0407370403f, -0.0568392761f, -0.0783762336f,
+ -0.1056890637f, -0.1263370365f, -0.1472651362f, -0.1659137160f, -0.1790523976f,
+ -0.1838199943f, -0.1790523976f, -0.1659137160f, -0.1472651511f, -0.1263370514f,
+ -0.1056890711f, -0.0783762261f, -0.0568392724f, -0.0407370329f, -0.0290195830f,
+ -0.0206087418f, -0.0116141811f, -0.0065356009f, -0.0036760308f, -0.0020673275f,
+ -0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000186f, 0.0033120848f, 0.0058894120f, 0.0104707554f, 0.0186072066f, 0.0330174938f,
+ 0.0464925803f, 0.0652652532f, 0.0910628140f, 0.1255674064f, 0.1693255901f, 0.2024059296f,
+ 0.2359350473f, 0.2658121586f, 0.2868617475f, 0.2944999933f, 0.2868617773f, 0.2658121288f,
+ 0.2359350622f, 0.2024059445f, 0.1693255901f, 0.1255674064f, 0.0910628140f, 0.0652652457f,
+ 0.0464925840f, 0.0330174938f, 0.0186072066f, 0.0104707554f, 0.0058894120f, 0.0033120848f,
+ 0.0000000186f},
+ {0.0000000298f, 0.0055670030f, 0.0098990090f, 0.0175994001f, 0.0312752686f, 0.0554962978f,
+ 0.0781454220f, 0.1096988022f, 0.1530597508f, 0.2110555619f, 0.2846049964f, 0.3402069509f,
+ 0.3965631723f, 0.4467810690f, 0.4821615815f, 0.4950000048f, 0.4821615815f, 0.4467810690f,
+ 0.3965632021f, 0.3402069509f, 0.2846049964f, 0.2110555619f, 0.1530597359f, 0.1096988022f,
+ 0.0781454295f, 0.0554962978f, 0.0312752724f, 0.0175994039f, 0.0098990090f, 0.0055670030f,
+ 0.0000000298f}},
{
- {-0.0000000298f, -0.0052064098f, -0.0092734247f, -0.0165368542f,
- -0.0295458250f, -0.0529378690f, -0.0752342194f, -0.1070103794f,
- -0.1521206498f, -0.2153066695f, -0.3007343411f, -0.3698226213f,
- -0.4447503388f, -0.5307881832f, -0.5978006721f, -0.6235857010f,
- -0.5978006721f, -0.5307881236f, -0.4447503388f, -0.3698226511f,
- -0.3007343411f, -0.2153066695f, -0.1521206498f, -0.1070103645f,
- -0.0752342343f, -0.0529378653f, -0.0295458287f, -0.0165368542f,
- -0.0092734247f, -0.0052064098f, -0.0000000298f},
- {-0.0000000261f, -0.0048777387f, -0.0086870864f, -0.0154883042f,
- -0.0276628584f, -0.0495328866f, -0.0703521222f, -0.0999773294f,
- -0.1419382244f, -0.2005145401f, -0.2793169618f, -0.3426927924f,
- -0.4107417464f, -0.4813471735f, -0.5399245620f, -0.5623379350f,
- -0.5399245620f, -0.4813471735f, -0.4107417464f, -0.3426928222f,
- -0.2793169916f, -0.2005145550f, -0.1419382244f, -0.0999773145f,
- -0.0703521222f, -0.0495328903f, -0.0276628584f, -0.0154883042f,
- -0.0086870864f, -0.0048777387f, -0.0000000261f},
- {-0.0000000261f, -0.0043780245f, -0.0077958480f, -0.0138952583f,
- -0.0248045996f, -0.0443725996f, -0.0629648566f, -0.0893598348f,
- -0.1266185045f, -0.1783709079f, -0.2474884093f, -0.3026292324f,
- -0.3613662124f, -0.4163920283f, -0.4594896138f, -0.4775324762f,
- -0.4594896734f, -0.4163920283f, -0.3613662422f, -0.3026292324f,
- -0.2474884093f, -0.1783709079f, -0.1266184896f, -0.0893598348f,
- -0.0629648566f, -0.0443725996f, -0.0248045996f, -0.0138952583f,
- -0.0077958442f, -0.0043780245f, -0.0000000261f},
- {-0.0000000186f, -0.0031259395f, -0.0055640303f, -0.0099100843f,
- -0.0176675394f, -0.0315306410f, -0.0446406342f, -0.0631476343f,
- -0.0890584141f, -0.1246242076f, -0.1713303179f, -0.2079202831f,
- -0.2462213635f, -0.2814548314f, -0.3069431484f, -0.3163340688f,
- -0.3069431186f, -0.2814547718f, -0.2462213486f, -0.2079202682f,
- -0.1713303477f, -0.1246242002f, -0.0890584067f, -0.0631476343f,
- -0.0446406379f, -0.0315306373f, -0.0176675431f, -0.0099100843f,
- -0.0055640303f, -0.0031259395f, -0.0000000186f},
- {-0.0000000112f, -0.0019114725f, -0.0034010001f, -0.0060532652f,
- -0.0107781142f, -0.0191919580f, -0.0271133929f, -0.0382369235f,
- -0.0536935478f, -0.0746848807f, -0.1018501967f, -0.1228085682f,
- -0.1444384754f, -0.1640539616f, -0.1780739129f, -0.1832032204f,
- -0.1780739427f, -0.1640539765f, -0.1444384903f, -0.1228085831f,
- -0.1018502116f, -0.0746848732f, -0.0536935404f, -0.0382369198f,
- -0.0271133929f, -0.0191919580f, -0.0107781179f, -0.0060532652f,
- -0.0034010001f, -0.0019114725f, -0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000186f, 0.0030560978f, 0.0054288842f, 0.0096351840f,
- 0.0170697011f, 0.0301259123f, 0.0422091261f, 0.0588454232f,
- 0.0813441202f, 0.1108067334f, 0.1471893340f, 0.1740057766f,
- 0.2006137222f, 0.2238604128f, 0.2399868369f, 0.2457885146f,
- 0.2399868369f, 0.2238603979f, 0.2006137520f, 0.1740057617f,
- 0.1471893340f, 0.1108067334f, 0.0813441128f, 0.0588454120f,
- 0.0422091298f, 0.0301259123f, 0.0170697011f, 0.0096351840f,
- 0.0054288842f, 0.0030560978f, 0.0000000186f},
- {0.0000000298f, 0.0051323175f, 0.0091110431f, 0.0161513090f,
- 0.0285548456f, 0.0502165109f, 0.0701301694f, 0.0973443240f,
- 0.1337892562f, 0.1809239388f, 0.2382676303f, 0.2799672484f,
- 0.3208998740f, 0.3563212454f, 0.3807162344f, 0.3894583583f,
- 0.3807162642f, 0.3563212454f, 0.3208998740f, 0.2799672484f,
- 0.2382676452f, 0.1809239388f, 0.1337892562f, 0.0973443240f,
- 0.0701301768f, 0.0502165109f, 0.0285548493f, 0.0161513127f,
- 0.0091110431f, 0.0051323175f, 0.0000000298f}},
+ {-0.0000000298f, -0.0052064098f, -0.0092734247f, -0.0165368542f, -0.0295458250f,
+ -0.0529378690f, -0.0752342194f, -0.1070103794f, -0.1521206498f, -0.2153066695f,
+ -0.3007343411f, -0.3698226213f, -0.4447503388f, -0.5307881832f, -0.5978006721f,
+ -0.6235857010f, -0.5978006721f, -0.5307881236f, -0.4447503388f, -0.3698226511f,
+ -0.3007343411f, -0.2153066695f, -0.1521206498f, -0.1070103645f, -0.0752342343f,
+ -0.0529378653f, -0.0295458287f, -0.0165368542f, -0.0092734247f, -0.0052064098f,
+ -0.0000000298f},
+ {-0.0000000261f, -0.0048777387f, -0.0086870864f, -0.0154883042f, -0.0276628584f,
+ -0.0495328866f, -0.0703521222f, -0.0999773294f, -0.1419382244f, -0.2005145401f,
+ -0.2793169618f, -0.3426927924f, -0.4107417464f, -0.4813471735f, -0.5399245620f,
+ -0.5623379350f, -0.5399245620f, -0.4813471735f, -0.4107417464f, -0.3426928222f,
+ -0.2793169916f, -0.2005145550f, -0.1419382244f, -0.0999773145f, -0.0703521222f,
+ -0.0495328903f, -0.0276628584f, -0.0154883042f, -0.0086870864f, -0.0048777387f,
+ -0.0000000261f},
+ {-0.0000000261f, -0.0043780245f, -0.0077958480f, -0.0138952583f, -0.0248045996f,
+ -0.0443725996f, -0.0629648566f, -0.0893598348f, -0.1266185045f, -0.1783709079f,
+ -0.2474884093f, -0.3026292324f, -0.3613662124f, -0.4163920283f, -0.4594896138f,
+ -0.4775324762f, -0.4594896734f, -0.4163920283f, -0.3613662422f, -0.3026292324f,
+ -0.2474884093f, -0.1783709079f, -0.1266184896f, -0.0893598348f, -0.0629648566f,
+ -0.0443725996f, -0.0248045996f, -0.0138952583f, -0.0077958442f, -0.0043780245f,
+ -0.0000000261f},
+ {-0.0000000186f, -0.0031259395f, -0.0055640303f, -0.0099100843f, -0.0176675394f,
+ -0.0315306410f, -0.0446406342f, -0.0631476343f, -0.0890584141f, -0.1246242076f,
+ -0.1713303179f, -0.2079202831f, -0.2462213635f, -0.2814548314f, -0.3069431484f,
+ -0.3163340688f, -0.3069431186f, -0.2814547718f, -0.2462213486f, -0.2079202682f,
+ -0.1713303477f, -0.1246242002f, -0.0890584067f, -0.0631476343f, -0.0446406379f,
+ -0.0315306373f, -0.0176675431f, -0.0099100843f, -0.0055640303f, -0.0031259395f,
+ -0.0000000186f},
+ {-0.0000000112f, -0.0019114725f, -0.0034010001f, -0.0060532652f, -0.0107781142f,
+ -0.0191919580f, -0.0271133929f, -0.0382369235f, -0.0536935478f, -0.0746848807f,
+ -0.1018501967f, -0.1228085682f, -0.1444384754f, -0.1640539616f, -0.1780739129f,
+ -0.1832032204f, -0.1780739427f, -0.1640539765f, -0.1444384903f, -0.1228085831f,
+ -0.1018502116f, -0.0746848732f, -0.0536935404f, -0.0382369198f, -0.0271133929f,
+ -0.0191919580f, -0.0107781179f, -0.0060532652f, -0.0034010001f, -0.0019114725f,
+ -0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000186f, 0.0030560978f, 0.0054288842f, 0.0096351840f, 0.0170697011f, 0.0301259123f,
+ 0.0422091261f, 0.0588454232f, 0.0813441202f, 0.1108067334f, 0.1471893340f, 0.1740057766f,
+ 0.2006137222f, 0.2238604128f, 0.2399868369f, 0.2457885146f, 0.2399868369f, 0.2238603979f,
+ 0.2006137520f, 0.1740057617f, 0.1471893340f, 0.1108067334f, 0.0813441128f, 0.0588454120f,
+ 0.0422091298f, 0.0301259123f, 0.0170697011f, 0.0096351840f, 0.0054288842f, 0.0030560978f,
+ 0.0000000186f},
+ {0.0000000298f, 0.0051323175f, 0.0091110431f, 0.0161513090f, 0.0285548456f, 0.0502165109f,
+ 0.0701301694f, 0.0973443240f, 0.1337892562f, 0.1809239388f, 0.2382676303f, 0.2799672484f,
+ 0.3208998740f, 0.3563212454f, 0.3807162344f, 0.3894583583f, 0.3807162642f, 0.3563212454f,
+ 0.3208998740f, 0.2799672484f, 0.2382676452f, 0.1809239388f, 0.1337892562f, 0.0973443240f,
+ 0.0701301768f, 0.0502165109f, 0.0285548493f, 0.0161513127f, 0.0091110431f, 0.0051323175f,
+ 0.0000000298f}},
{
- {-0.0000000224f, -0.0039921328f, -0.0071208887f, -0.0127314143f,
- -0.0228547081f, -0.0413094275f, -0.0592183881f, -0.0853221565f,
- -0.1236763671f, -0.1803686619f, -0.2854516804f, -0.3939453363f,
- -0.5444797277f, -0.7350655198f, -0.9220947623f, -1.0059221983f,
- -0.9220948815f, -0.7350654006f, -0.5444797873f, -0.3939453661f,
- -0.2854517102f, -0.1803686619f, -0.1236763671f, -0.0853221565f,
- -0.0592183881f, -0.0413094275f, -0.0228547081f, -0.0127314143f,
- -0.0071208887f, -0.0039921328f, -0.0000000224f},
- {-0.0000000224f, -0.0037396848f, -0.0066692568f, -0.0119196586f,
- -0.0213833861f, -0.0386023782f, -0.0552692898f, -0.0794829726f,
- -0.1148765832f, -0.1667534262f, -0.2564018369f, -0.3483759165f,
- -0.4713715911f, -0.6198635101f, -0.7582825422f, -0.8181172013f,
- -0.7582825422f, -0.6198634505f, -0.4713717401f, -0.3483759463f,
- -0.2564018667f, -0.1667534411f, -0.1148765981f, -0.0794829652f,
- -0.0552692972f, -0.0386023745f, -0.0213833861f, -0.0119196586f,
- -0.0066692568f, -0.0037396848f, -0.0000000224f},
- {-0.0000000186f, -0.0033559687f, -0.0059831366f, -0.0106875487f,
- -0.0191539265f, -0.0345134847f, -0.0493235812f, -0.0707350969f,
- -0.1017966494f, -0.1467751563f, -0.2165540755f, -0.2881157100f,
- -0.3792885542f, -0.4829951525f, -0.5739276409f, -0.6116424799f,
- -0.5739278197f, -0.4829950929f, -0.3792886436f, -0.2881157100f,
- -0.2165541053f, -0.1467751563f, -0.1017966419f, -0.0707350895f,
- -0.0493235812f, -0.0345134847f, -0.0191539265f, -0.0106875487f,
- -0.0059831366f, -0.0033559650f, -0.0000000186f},
- {-0.0000000149f, -0.0023951232f, -0.0042668879f, -0.0076114945f,
- -0.0136074573f, -0.0244078562f, -0.0347254649f, -0.0494702719f,
- -0.0704879165f, -0.1001076326f, -0.1405195594f, -0.1735420525f,
- -0.2150437981f, -0.2592166960f, -0.2942399085f, -0.3078633845f,
- -0.2942398787f, -0.2592166662f, -0.2150438130f, -0.1735420525f,
- -0.1405195594f, -0.1001076251f, -0.0704879165f, -0.0494702719f,
- -0.0347254686f, -0.0244078562f, -0.0136074610f, -0.0076114945f,
- -0.0042668879f, -0.0023951232f, -0.0000000149f},
- {-0.0000000075f, -0.0014639609f, -0.0026061311f, -0.0046428740f,
- -0.0082807541f, -0.0147897042f, -0.0209544301f, -0.0296728536f,
- -0.0419111885f, -0.0587732308f, -0.0810343996f, -0.0985725969f,
- -0.1170293614f, -0.1341015100f, -0.1465103477f, -0.1510950923f,
- -0.1465103626f, -0.1341015100f, -0.1170293689f, -0.0985725969f,
- -0.0810344145f, -0.0587732270f, -0.0419111885f, -0.0296728499f,
- -0.0209544301f, -0.0147897005f, -0.0082807541f, -0.0046428740f,
- -0.0026061311f, -0.0014639609f, -0.0000000075f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000149f, 0.0023365319f, 0.0041472092f, 0.0073497258f,
- 0.0129875094f, 0.0228201896f, 0.0318449698f, 0.0441566631f,
- 0.0606067479f, 0.0818213895f, 0.1075451672f, 0.1261962205f,
- 0.1444622874f, 0.1602374464f, 0.1710857302f, 0.1749702245f,
- 0.1710857451f, 0.1602374315f, 0.1444623023f, 0.1261962354f,
- 0.1075451672f, 0.0818213820f, 0.0606067516f, 0.0441566594f,
- 0.0318449736f, 0.0228201896f, 0.0129875094f, 0.0073497258f,
- 0.0041472055f, 0.0023365319f, 0.0000000149f},
- {0.0000000224f, 0.0039210618f, 0.0069511682f, 0.0122926161f,
- 0.0216415301f, 0.0377869830f, 0.0524356216f, 0.0721722171f,
- 0.0981289670f, 0.1309677958f, 0.1699328423f, 0.1976661384f,
- 0.2244503647f, 0.2473092973f, 0.2628936768f, 0.2684486508f,
- 0.2628937066f, 0.2473092973f, 0.2244503349f, 0.1976661384f,
- 0.1699328423f, 0.1309678108f, 0.0981289595f, 0.0721722171f,
- 0.0524356328f, 0.0377869830f, 0.0216415338f, 0.0122926198f,
- 0.0069511719f, 0.0039210618f, 0.0000000224f}},
+ {-0.0000000224f, -0.0039921328f, -0.0071208887f, -0.0127314143f, -0.0228547081f,
+ -0.0413094275f, -0.0592183881f, -0.0853221565f, -0.1236763671f, -0.1803686619f,
+ -0.2854516804f, -0.3939453363f, -0.5444797277f, -0.7350655198f, -0.9220947623f,
+ -1.0059221983f, -0.9220948815f, -0.7350654006f, -0.5444797873f, -0.3939453661f,
+ -0.2854517102f, -0.1803686619f, -0.1236763671f, -0.0853221565f, -0.0592183881f,
+ -0.0413094275f, -0.0228547081f, -0.0127314143f, -0.0071208887f, -0.0039921328f,
+ -0.0000000224f},
+ {-0.0000000224f, -0.0037396848f, -0.0066692568f, -0.0119196586f, -0.0213833861f,
+ -0.0386023782f, -0.0552692898f, -0.0794829726f, -0.1148765832f, -0.1667534262f,
+ -0.2564018369f, -0.3483759165f, -0.4713715911f, -0.6198635101f, -0.7582825422f,
+ -0.8181172013f, -0.7582825422f, -0.6198634505f, -0.4713717401f, -0.3483759463f,
+ -0.2564018667f, -0.1667534411f, -0.1148765981f, -0.0794829652f, -0.0552692972f,
+ -0.0386023745f, -0.0213833861f, -0.0119196586f, -0.0066692568f, -0.0037396848f,
+ -0.0000000224f},
+ {-0.0000000186f, -0.0033559687f, -0.0059831366f, -0.0106875487f, -0.0191539265f,
+ -0.0345134847f, -0.0493235812f, -0.0707350969f, -0.1017966494f, -0.1467751563f,
+ -0.2165540755f, -0.2881157100f, -0.3792885542f, -0.4829951525f, -0.5739276409f,
+ -0.6116424799f, -0.5739278197f, -0.4829950929f, -0.3792886436f, -0.2881157100f,
+ -0.2165541053f, -0.1467751563f, -0.1017966419f, -0.0707350895f, -0.0493235812f,
+ -0.0345134847f, -0.0191539265f, -0.0106875487f, -0.0059831366f, -0.0033559650f,
+ -0.0000000186f},
+ {-0.0000000149f, -0.0023951232f, -0.0042668879f, -0.0076114945f, -0.0136074573f,
+ -0.0244078562f, -0.0347254649f, -0.0494702719f, -0.0704879165f, -0.1001076326f,
+ -0.1405195594f, -0.1735420525f, -0.2150437981f, -0.2592166960f, -0.2942399085f,
+ -0.3078633845f, -0.2942398787f, -0.2592166662f, -0.2150438130f, -0.1735420525f,
+ -0.1405195594f, -0.1001076251f, -0.0704879165f, -0.0494702719f, -0.0347254686f,
+ -0.0244078562f, -0.0136074610f, -0.0076114945f, -0.0042668879f, -0.0023951232f,
+ -0.0000000149f},
+ {-0.0000000075f, -0.0014639609f, -0.0026061311f, -0.0046428740f, -0.0082807541f,
+ -0.0147897042f, -0.0209544301f, -0.0296728536f, -0.0419111885f, -0.0587732308f,
+ -0.0810343996f, -0.0985725969f, -0.1170293614f, -0.1341015100f, -0.1465103477f,
+ -0.1510950923f, -0.1465103626f, -0.1341015100f, -0.1170293689f, -0.0985725969f,
+ -0.0810344145f, -0.0587732270f, -0.0419111885f, -0.0296728499f, -0.0209544301f,
+ -0.0147897005f, -0.0082807541f, -0.0046428740f, -0.0026061311f, -0.0014639609f,
+ -0.0000000075f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000149f, 0.0023365319f, 0.0041472092f, 0.0073497258f, 0.0129875094f, 0.0228201896f,
+ 0.0318449698f, 0.0441566631f, 0.0606067479f, 0.0818213895f, 0.1075451672f, 0.1261962205f,
+ 0.1444622874f, 0.1602374464f, 0.1710857302f, 0.1749702245f, 0.1710857451f, 0.1602374315f,
+ 0.1444623023f, 0.1261962354f, 0.1075451672f, 0.0818213820f, 0.0606067516f, 0.0441566594f,
+ 0.0318449736f, 0.0228201896f, 0.0129875094f, 0.0073497258f, 0.0041472055f, 0.0023365319f,
+ 0.0000000149f},
+ {0.0000000224f, 0.0039210618f, 0.0069511682f, 0.0122926161f, 0.0216415301f, 0.0377869830f,
+ 0.0524356216f, 0.0721722171f, 0.0981289670f, 0.1309677958f, 0.1699328423f, 0.1976661384f,
+ 0.2244503647f, 0.2473092973f, 0.2628936768f, 0.2684486508f, 0.2628937066f, 0.2473092973f,
+ 0.2244503349f, 0.1976661384f, 0.1699328423f, 0.1309678108f, 0.0981289595f, 0.0721722171f,
+ 0.0524356328f, 0.0377869830f, 0.0216415338f, 0.0122926198f, 0.0069511719f, 0.0039210618f,
+ 0.0000000224f}},
{
- {-0.0000000112f, -0.0021631867f, -0.0038622990f, -0.0069175921f,
- -0.0124585107f, -0.0226575360f, -0.0326844864f, -0.0475502796f,
- -0.0700031072f, -0.1121732816f, -0.1955563724f, -0.3002188802f,
- -0.4916101098f, -0.8663685918f, -1.5518788099f, -2.0947244167f,
- -1.5518796444f, -0.8663682938f, -0.4916102588f, -0.3002189398f,
- -0.1955564171f, -0.1121732742f, -0.0700031072f, -0.0475502722f,
- -0.0326844901f, -0.0226575360f, -0.0124585107f, -0.0069175921f,
- -0.0038622990f, -0.0021631867f, -0.0000000112f},
- {-0.0000000112f, -0.0020262375f, -0.0036168285f, -0.0064748600f,
- -0.0116508976f, -0.0211532563f, -0.0304619446f, -0.0441976115f,
- -0.0647818893f, -0.1009719074f, -0.1710277349f, -0.2535219491f,
- -0.3905530870f, -0.6167426109f, -0.9282656312f, -1.1122730970f,
- -0.9282659292f, -0.6167425513f, -0.3905532360f, -0.2535219789f,
- -0.1710277349f, -0.1009719074f, -0.0647818893f, -0.0441976078f,
- -0.0304619484f, -0.0211532563f, -0.0116508938f, -0.0064748600f,
- -0.0036168285f, -0.0020262338f, -0.0000000112f},
- {-0.0000000112f, -0.0018181130f, -0.0032440424f, -0.0058033094f,
- -0.0104286373f, -0.0188865587f, -0.0271281414f, -0.0392048433f,
- -0.0570997782f, -0.0855292380f, -0.1394104958f, -0.1978724152f,
- -0.2847256064f, -0.4054927230f, -0.5376322865f, -0.6018701792f,
- -0.5376325250f, -0.4054926634f, -0.2847256958f, -0.1978724003f,
- -0.1394105256f, -0.0855292305f, -0.0570997708f, -0.0392048396f,
- -0.0271281451f, -0.0188865587f, -0.0104286410f, -0.0058033094f,
- -0.0032440424f, -0.0018181130f, -0.0000000112f},
- {-0.0000000075f, -0.0012971871f, -0.0023122653f, -0.0041290335f,
- -0.0073956437f, -0.0133119002f, -0.0190039128f, -0.0272102170f,
- -0.0390642770f, -0.0561143979f, -0.0809218660f, -0.1064853594f,
- -0.1382554770f, -0.1733478010f, -0.2032405138f, -0.2154063880f,
- -0.2032405138f, -0.1733477712f, -0.1382555068f, -0.1064853594f,
- -0.0809218735f, -0.0561144017f, -0.0390642807f, -0.0272102132f,
- -0.0190039128f, -0.0133119002f, -0.0073956437f, -0.0041290298f,
- -0.0023122653f, -0.0012971871f, -0.0000000075f},
- {-0.0000000037f, -0.0007926486f, -0.0014115572f, -0.0025163069f,
- -0.0044930279f, -0.0080412179f, -0.0114155896f, -0.0162114650f,
- -0.0229923278f, -0.0324336179f, -0.0450868085f, -0.0552201346f,
- -0.0660551935f, -0.0763022304f, -0.0853320658f, -0.0887728930f,
- -0.0853320807f, -0.0763022304f, -0.0660551935f, -0.0552201308f,
- -0.0450868122f, -0.0324336141f, -0.0229923241f, -0.0162114613f,
- -0.0114155896f, -0.0080412179f, -0.0044930279f, -0.0025163069f,
- -0.0014115609f, -0.0007926486f, -0.0000000037f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000075f, 0.0012636185f, 0.0022416152f, 0.0039687753f,
- 0.0070013292f, 0.0122666061f, 0.0170736760f, 0.0235937759f,
- 0.0322411545f, 0.0432920381f, 0.0565523952f, 0.0660799965f,
- 0.0753463656f, 0.0833015144f, 0.0887481645f, 0.0906939134f,
- 0.0887481719f, 0.0833015069f, 0.0753463805f, 0.0660799891f,
- 0.0565523952f, 0.0432920381f, 0.0322411582f, 0.0235937759f,
- 0.0170736797f, 0.0122666061f, 0.0070013292f, 0.0039687753f,
- 0.0022416152f, 0.0012636185f, 0.0000000075f},
- {0.0000000112f, 0.0021195263f, 0.0037540123f, 0.0066280924f,
- 0.0116370060f, 0.0202258043f, 0.0279547423f, 0.0382792614f,
- 0.0517152064f, 0.0685065836f, 0.0881702006f, 0.1020170972f,
- 0.1152879074f, 0.1265430748f, 0.1341825128f, 0.1368993223f,
- 0.1341825277f, 0.1265430599f, 0.1152879149f, 0.1020170972f,
- 0.0881702006f, 0.0685065836f, 0.0517152064f, 0.0382792577f,
- 0.0279547460f, 0.0202258043f, 0.0116370060f, 0.0066280924f,
- 0.0037540123f, 0.0021195263f, 0.0000000112f}},
+ {-0.0000000112f, -0.0021631867f, -0.0038622990f, -0.0069175921f, -0.0124585107f,
+ -0.0226575360f, -0.0326844864f, -0.0475502796f, -0.0700031072f, -0.1121732816f,
+ -0.1955563724f, -0.3002188802f, -0.4916101098f, -0.8663685918f, -1.5518788099f,
+ -2.0947244167f, -1.5518796444f, -0.8663682938f, -0.4916102588f, -0.3002189398f,
+ -0.1955564171f, -0.1121732742f, -0.0700031072f, -0.0475502722f, -0.0326844901f,
+ -0.0226575360f, -0.0124585107f, -0.0069175921f, -0.0038622990f, -0.0021631867f,
+ -0.0000000112f},
+ {-0.0000000112f, -0.0020262375f, -0.0036168285f, -0.0064748600f, -0.0116508976f,
+ -0.0211532563f, -0.0304619446f, -0.0441976115f, -0.0647818893f, -0.1009719074f,
+ -0.1710277349f, -0.2535219491f, -0.3905530870f, -0.6167426109f, -0.9282656312f,
+ -1.1122730970f, -0.9282659292f, -0.6167425513f, -0.3905532360f, -0.2535219789f,
+ -0.1710277349f, -0.1009719074f, -0.0647818893f, -0.0441976078f, -0.0304619484f,
+ -0.0211532563f, -0.0116508938f, -0.0064748600f, -0.0036168285f, -0.0020262338f,
+ -0.0000000112f},
+ {-0.0000000112f, -0.0018181130f, -0.0032440424f, -0.0058033094f, -0.0104286373f,
+ -0.0188865587f, -0.0271281414f, -0.0392048433f, -0.0570997782f, -0.0855292380f,
+ -0.1394104958f, -0.1978724152f, -0.2847256064f, -0.4054927230f, -0.5376322865f,
+ -0.6018701792f, -0.5376325250f, -0.4054926634f, -0.2847256958f, -0.1978724003f,
+ -0.1394105256f, -0.0855292305f, -0.0570997708f, -0.0392048396f, -0.0271281451f,
+ -0.0188865587f, -0.0104286410f, -0.0058033094f, -0.0032440424f, -0.0018181130f,
+ -0.0000000112f},
+ {-0.0000000075f, -0.0012971871f, -0.0023122653f, -0.0041290335f, -0.0073956437f,
+ -0.0133119002f, -0.0190039128f, -0.0272102170f, -0.0390642770f, -0.0561143979f,
+ -0.0809218660f, -0.1064853594f, -0.1382554770f, -0.1733478010f, -0.2032405138f,
+ -0.2154063880f, -0.2032405138f, -0.1733477712f, -0.1382555068f, -0.1064853594f,
+ -0.0809218735f, -0.0561144017f, -0.0390642807f, -0.0272102132f, -0.0190039128f,
+ -0.0133119002f, -0.0073956437f, -0.0041290298f, -0.0023122653f, -0.0012971871f,
+ -0.0000000075f},
+ {-0.0000000037f, -0.0007926486f, -0.0014115572f, -0.0025163069f, -0.0044930279f,
+ -0.0080412179f, -0.0114155896f, -0.0162114650f, -0.0229923278f, -0.0324336179f,
+ -0.0450868085f, -0.0552201346f, -0.0660551935f, -0.0763022304f, -0.0853320658f,
+ -0.0887728930f, -0.0853320807f, -0.0763022304f, -0.0660551935f, -0.0552201308f,
+ -0.0450868122f, -0.0324336141f, -0.0229923241f, -0.0162114613f, -0.0114155896f,
+ -0.0080412179f, -0.0044930279f, -0.0025163069f, -0.0014115609f, -0.0007926486f,
+ -0.0000000037f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000075f, 0.0012636185f, 0.0022416152f, 0.0039687753f, 0.0070013292f, 0.0122666061f,
+ 0.0170736760f, 0.0235937759f, 0.0322411545f, 0.0432920381f, 0.0565523952f, 0.0660799965f,
+ 0.0753463656f, 0.0833015144f, 0.0887481645f, 0.0906939134f, 0.0887481719f, 0.0833015069f,
+ 0.0753463805f, 0.0660799891f, 0.0565523952f, 0.0432920381f, 0.0322411582f, 0.0235937759f,
+ 0.0170736797f, 0.0122666061f, 0.0070013292f, 0.0039687753f, 0.0022416152f, 0.0012636185f,
+ 0.0000000075f},
+ {0.0000000112f, 0.0021195263f, 0.0037540123f, 0.0066280924f, 0.0116370060f, 0.0202258043f,
+ 0.0279547423f, 0.0382792614f, 0.0517152064f, 0.0685065836f, 0.0881702006f, 0.1020170972f,
+ 0.1152879074f, 0.1265430748f, 0.1341825128f, 0.1368993223f, 0.1341825277f, 0.1265430599f,
+ 0.1152879149f, 0.1020170972f, 0.0881702006f, 0.0685065836f, 0.0517152064f, 0.0382792577f,
+ 0.0279547460f, 0.0202258043f, 0.0116370060f, 0.0066280924f, 0.0037540123f, 0.0021195263f,
+ 0.0000000112f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000037f, 0.0000000037f, 0.0000000075f, 0.0000000112f,
- 0.0000000149f, 0.0000000261f, 0.0000000484f, 0.0000000782f,
- 0.0000001453f, 0.0000003390f, 0.0000013672f, -3.2000000477f,
- 0.0000013672f, 0.0000003390f, 0.0000001453f, 0.0000000782f,
- 0.0000000484f, 0.0000000261f, 0.0000000149f, 0.0000000112f,
- 0.0000000075f, 0.0000000037f, 0.0000000037f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000037f, 0.0000000037f, 0.0000000075f, 0.0000000112f,
- 0.0000000149f, 0.0000000261f, 0.0000000410f, 0.0000000671f,
- 0.0000001080f, 0.0000002012f, 0.0000003800f, 0.0000005402f,
- 0.0000003800f, 0.0000002012f, 0.0000001080f, 0.0000000671f,
- 0.0000000410f, 0.0000000261f, 0.0000000149f, 0.0000000112f,
- 0.0000000075f, 0.0000000037f, 0.0000000037f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000037f, 0.0000000037f, 0.0000000075f, 0.0000000075f,
- 0.0000000149f, 0.0000000186f, 0.0000000335f, 0.0000000484f,
- 0.0000000745f, 0.0000001155f, 0.0000001639f, 0.0000001937f,
- 0.0000001639f, 0.0000001155f, 0.0000000745f, 0.0000000484f,
- 0.0000000335f, 0.0000000186f, 0.0000000149f, 0.0000000075f,
- 0.0000000075f, 0.0000000037f, 0.0000000037f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000037f, 0.0000000037f, 0.0000000075f,
- 0.0000000075f, 0.0000000112f, 0.0000000186f, 0.0000000261f,
- 0.0000000335f, 0.0000000447f, 0.0000000522f, 0.0000000559f,
- 0.0000000522f, 0.0000000447f, 0.0000000335f, 0.0000000261f,
- 0.0000000186f, 0.0000000112f, 0.0000000075f, 0.0000000075f,
- 0.0000000037f, 0.0000000037f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000037f, 0.0000000037f,
- 0.0000000037f, 0.0000000075f, 0.0000000112f, 0.0000000112f,
- 0.0000000149f, 0.0000000186f, 0.0000000186f, 0.0000000224f,
- 0.0000000186f, 0.0000000186f, 0.0000000149f, 0.0000000112f,
- 0.0000000112f, 0.0000000075f, 0.0000000037f, 0.0000000037f,
- 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, -0.0000000037f, -0.0000000037f, -0.0000000037f,
- -0.0000000075f, -0.0000000112f, -0.0000000112f, -0.0000000149f,
- -0.0000000186f, -0.0000000186f, -0.0000000186f, -0.0000000186f,
- -0.0000000186f, -0.0000000186f, -0.0000000186f, -0.0000000149f,
- -0.0000000112f, -0.0000000112f, -0.0000000075f, -0.0000000037f,
- -0.0000000037f, -0.0000000037f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- -0.0000000037f, -0.0000000037f, -0.0000000075f, -0.0000000075f,
- -0.0000000112f, -0.0000000149f, -0.0000000186f, -0.0000000224f,
- -0.0000000261f, -0.0000000298f, -0.0000000298f, -0.0000000298f,
- -0.0000000298f, -0.0000000298f, -0.0000000261f, -0.0000000224f,
- -0.0000000186f, -0.0000000149f, -0.0000000112f, -0.0000000075f,
- -0.0000000075f, -0.0000000037f, -0.0000000037f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000037f,
+ 0.0000000037f, 0.0000000075f, 0.0000000112f, 0.0000000149f, 0.0000000261f,
+ 0.0000000484f, 0.0000000782f, 0.0000001453f, 0.0000003390f, 0.0000013672f,
+ -3.2000000477f, 0.0000013672f, 0.0000003390f, 0.0000001453f, 0.0000000782f,
+ 0.0000000484f, 0.0000000261f, 0.0000000149f, 0.0000000112f, 0.0000000075f,
+ 0.0000000037f, 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000037f, 0.0000000037f,
+ 0.0000000075f, 0.0000000112f, 0.0000000149f, 0.0000000261f, 0.0000000410f, 0.0000000671f,
+ 0.0000001080f, 0.0000002012f, 0.0000003800f, 0.0000005402f, 0.0000003800f, 0.0000002012f,
+ 0.0000001080f, 0.0000000671f, 0.0000000410f, 0.0000000261f, 0.0000000149f, 0.0000000112f,
+ 0.0000000075f, 0.0000000037f, 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000037f, 0.0000000037f,
+ 0.0000000075f, 0.0000000075f, 0.0000000149f, 0.0000000186f, 0.0000000335f, 0.0000000484f,
+ 0.0000000745f, 0.0000001155f, 0.0000001639f, 0.0000001937f, 0.0000001639f, 0.0000001155f,
+ 0.0000000745f, 0.0000000484f, 0.0000000335f, 0.0000000186f, 0.0000000149f, 0.0000000075f,
+ 0.0000000075f, 0.0000000037f, 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000037f,
+ 0.0000000037f, 0.0000000075f, 0.0000000075f, 0.0000000112f, 0.0000000186f, 0.0000000261f,
+ 0.0000000335f, 0.0000000447f, 0.0000000522f, 0.0000000559f, 0.0000000522f, 0.0000000447f,
+ 0.0000000335f, 0.0000000261f, 0.0000000186f, 0.0000000112f, 0.0000000075f, 0.0000000075f,
+ 0.0000000037f, 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000037f, 0.0000000037f, 0.0000000037f, 0.0000000075f, 0.0000000112f, 0.0000000112f,
+ 0.0000000149f, 0.0000000186f, 0.0000000186f, 0.0000000224f, 0.0000000186f, 0.0000000186f,
+ 0.0000000149f, 0.0000000112f, 0.0000000112f, 0.0000000075f, 0.0000000037f, 0.0000000037f,
+ 0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ -0.0000000037f, -0.0000000037f, -0.0000000037f, -0.0000000075f, -0.0000000112f,
+ -0.0000000112f, -0.0000000149f, -0.0000000186f, -0.0000000186f, -0.0000000186f,
+ -0.0000000186f, -0.0000000186f, -0.0000000186f, -0.0000000186f, -0.0000000149f,
+ -0.0000000112f, -0.0000000112f, -0.0000000075f, -0.0000000037f, -0.0000000037f,
+ -0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, -0.0000000037f,
+ -0.0000000037f, -0.0000000075f, -0.0000000075f, -0.0000000112f, -0.0000000149f,
+ -0.0000000186f, -0.0000000224f, -0.0000000261f, -0.0000000298f, -0.0000000298f,
+ -0.0000000298f, -0.0000000298f, -0.0000000298f, -0.0000000261f, -0.0000000224f,
+ -0.0000000186f, -0.0000000149f, -0.0000000112f, -0.0000000075f, -0.0000000075f,
+ -0.0000000037f, -0.0000000037f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f}},
{
- {0.0000000112f, 0.0021631867f, 0.0038622953f, 0.0069175921f,
- 0.0124585070f, 0.0226575322f, 0.0326844826f, 0.0475502722f,
- 0.0700030923f, 0.1121732593f, 0.1955563575f, 0.3002188206f,
- 0.4916100204f, 0.8663684726f, 1.5518785715f, 2.0947239399f,
- 1.5518792868f, 0.8663681746f, 0.4916101992f, 0.3002188802f,
- 0.1955563724f, 0.1121732593f, 0.0700030923f, 0.0475502647f,
- 0.0326844826f, 0.0226575322f, 0.0124585107f, 0.0069175921f,
- 0.0038622990f, 0.0021631867f, 0.0000000112f},
- {0.0000000112f, 0.0020262338f, 0.0036168285f, 0.0064748600f,
- 0.0116508938f, 0.0211532526f, 0.0304619409f, 0.0441976078f,
- 0.0647818819f, 0.1009718925f, 0.1710277200f, 0.2535218894f,
- 0.3905530572f, 0.6167424917f, 0.9282655120f, 1.1122729778f,
- 0.9282657504f, 0.6167424321f, 0.3905531764f, 0.2535219491f,
- 0.1710277200f, 0.1009718925f, 0.0647818893f, 0.0441976003f,
- 0.0304619446f, 0.0211532526f, 0.0116508938f, 0.0064748600f,
- 0.0036168285f, 0.0020262338f, 0.0000000112f},
- {0.0000000112f, 0.0018181130f, 0.0032440424f, 0.0058033094f,
- 0.0104286373f, 0.0188865550f, 0.0271281339f, 0.0392048396f,
- 0.0570997633f, 0.0855292231f, 0.1394104809f, 0.1978723854f,
- 0.2847255766f, 0.4054926634f, 0.5376322269f, 0.6018700600f,
- 0.5376324654f, 0.4054926336f, 0.2847256362f, 0.1978723705f,
- 0.1394104958f, 0.0855292156f, 0.0570997633f, 0.0392048359f,
- 0.0271281414f, 0.0188865550f, 0.0104286373f, 0.0058033094f,
- 0.0032440424f, 0.0018181130f, 0.0000000112f},
- {0.0000000075f, 0.0012971871f, 0.0023122616f, 0.0041290298f,
- 0.0073956437f, 0.0133119002f, 0.0190039091f, 0.0272102095f,
- 0.0390642695f, 0.0561143905f, 0.0809218511f, 0.1064853519f,
- 0.1382554471f, 0.1733477712f, 0.2032404840f, 0.2154063582f,
- 0.2032404691f, 0.1733477414f, 0.1382554919f, 0.1064853519f,
- 0.0809218585f, 0.0561143905f, 0.0390642732f, 0.0272102095f,
- 0.0190039091f, 0.0133118965f, 0.0073956437f, 0.0041290298f,
- 0.0023122616f, 0.0012971871f, 0.0000000075f},
- {0.0000000037f, 0.0007926486f, 0.0014115572f, 0.0025163032f,
- 0.0044930279f, 0.0080412142f, 0.0114155896f, 0.0162114613f,
- 0.0229923241f, 0.0324336104f, 0.0450868048f, 0.0552201271f,
- 0.0660551786f, 0.0763022155f, 0.0853320509f, 0.0887728706f,
- 0.0853320658f, 0.0763022155f, 0.0660551861f, 0.0552201271f,
- 0.0450868085f, 0.0324336104f, 0.0229923204f, 0.0162114613f,
- 0.0114155896f, 0.0080412142f, 0.0044930279f, 0.0025163069f,
- 0.0014115572f, 0.0007926486f, 0.0000000037f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000075f, -0.0012636185f, -0.0022416152f, -0.0039687753f,
- -0.0070013292f, -0.0122666024f, -0.0170736760f, -0.0235937759f,
- -0.0322411507f, -0.0432920344f, -0.0565523803f, -0.0660799891f,
- -0.0753463581f, -0.0833015069f, -0.0887481570f, -0.0906938910f,
- -0.0887481570f, -0.0833014995f, -0.0753463656f, -0.0660799891f,
- -0.0565523840f, -0.0432920344f, -0.0322411507f, -0.0235937722f,
- -0.0170736760f, -0.0122666024f, -0.0070013292f, -0.0039687753f,
- -0.0022416152f, -0.0012636185f, -0.0000000075f},
- {-0.0000000112f, -0.0021195263f, -0.0037540086f, -0.0066280887f,
- -0.0116370022f, -0.0202258006f, -0.0279547386f, -0.0382792503f,
- -0.0517151989f, -0.0685065687f, -0.0881701857f, -0.1020170897f,
- -0.1152879000f, -0.1265430450f, -0.1341824830f, -0.1368992925f,
- -0.1341824979f, -0.1265430450f, -0.1152879000f, -0.1020170897f,
- -0.0881701857f, -0.0685065687f, -0.0517151989f, -0.0382792465f,
- -0.0279547423f, -0.0202258006f, -0.0116370060f, -0.0066280887f,
- -0.0037540086f, -0.0021195263f, -0.0000000112f}},
+ {0.0000000112f, 0.0021631867f, 0.0038622953f, 0.0069175921f, 0.0124585070f, 0.0226575322f,
+ 0.0326844826f, 0.0475502722f, 0.0700030923f, 0.1121732593f, 0.1955563575f, 0.3002188206f,
+ 0.4916100204f, 0.8663684726f, 1.5518785715f, 2.0947239399f, 1.5518792868f, 0.8663681746f,
+ 0.4916101992f, 0.3002188802f, 0.1955563724f, 0.1121732593f, 0.0700030923f, 0.0475502647f,
+ 0.0326844826f, 0.0226575322f, 0.0124585107f, 0.0069175921f, 0.0038622990f, 0.0021631867f,
+ 0.0000000112f},
+ {0.0000000112f, 0.0020262338f, 0.0036168285f, 0.0064748600f, 0.0116508938f, 0.0211532526f,
+ 0.0304619409f, 0.0441976078f, 0.0647818819f, 0.1009718925f, 0.1710277200f, 0.2535218894f,
+ 0.3905530572f, 0.6167424917f, 0.9282655120f, 1.1122729778f, 0.9282657504f, 0.6167424321f,
+ 0.3905531764f, 0.2535219491f, 0.1710277200f, 0.1009718925f, 0.0647818893f, 0.0441976003f,
+ 0.0304619446f, 0.0211532526f, 0.0116508938f, 0.0064748600f, 0.0036168285f, 0.0020262338f,
+ 0.0000000112f},
+ {0.0000000112f, 0.0018181130f, 0.0032440424f, 0.0058033094f, 0.0104286373f, 0.0188865550f,
+ 0.0271281339f, 0.0392048396f, 0.0570997633f, 0.0855292231f, 0.1394104809f, 0.1978723854f,
+ 0.2847255766f, 0.4054926634f, 0.5376322269f, 0.6018700600f, 0.5376324654f, 0.4054926336f,
+ 0.2847256362f, 0.1978723705f, 0.1394104958f, 0.0855292156f, 0.0570997633f, 0.0392048359f,
+ 0.0271281414f, 0.0188865550f, 0.0104286373f, 0.0058033094f, 0.0032440424f, 0.0018181130f,
+ 0.0000000112f},
+ {0.0000000075f, 0.0012971871f, 0.0023122616f, 0.0041290298f, 0.0073956437f, 0.0133119002f,
+ 0.0190039091f, 0.0272102095f, 0.0390642695f, 0.0561143905f, 0.0809218511f, 0.1064853519f,
+ 0.1382554471f, 0.1733477712f, 0.2032404840f, 0.2154063582f, 0.2032404691f, 0.1733477414f,
+ 0.1382554919f, 0.1064853519f, 0.0809218585f, 0.0561143905f, 0.0390642732f, 0.0272102095f,
+ 0.0190039091f, 0.0133118965f, 0.0073956437f, 0.0041290298f, 0.0023122616f, 0.0012971871f,
+ 0.0000000075f},
+ {0.0000000037f, 0.0007926486f, 0.0014115572f, 0.0025163032f, 0.0044930279f, 0.0080412142f,
+ 0.0114155896f, 0.0162114613f, 0.0229923241f, 0.0324336104f, 0.0450868048f, 0.0552201271f,
+ 0.0660551786f, 0.0763022155f, 0.0853320509f, 0.0887728706f, 0.0853320658f, 0.0763022155f,
+ 0.0660551861f, 0.0552201271f, 0.0450868085f, 0.0324336104f, 0.0229923204f, 0.0162114613f,
+ 0.0114155896f, 0.0080412142f, 0.0044930279f, 0.0025163069f, 0.0014115572f, 0.0007926486f,
+ 0.0000000037f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000075f, -0.0012636185f, -0.0022416152f, -0.0039687753f, -0.0070013292f,
+ -0.0122666024f, -0.0170736760f, -0.0235937759f, -0.0322411507f, -0.0432920344f,
+ -0.0565523803f, -0.0660799891f, -0.0753463581f, -0.0833015069f, -0.0887481570f,
+ -0.0906938910f, -0.0887481570f, -0.0833014995f, -0.0753463656f, -0.0660799891f,
+ -0.0565523840f, -0.0432920344f, -0.0322411507f, -0.0235937722f, -0.0170736760f,
+ -0.0122666024f, -0.0070013292f, -0.0039687753f, -0.0022416152f, -0.0012636185f,
+ -0.0000000075f},
+ {-0.0000000112f, -0.0021195263f, -0.0037540086f, -0.0066280887f, -0.0116370022f,
+ -0.0202258006f, -0.0279547386f, -0.0382792503f, -0.0517151989f, -0.0685065687f,
+ -0.0881701857f, -0.1020170897f, -0.1152879000f, -0.1265430450f, -0.1341824830f,
+ -0.1368992925f, -0.1341824979f, -0.1265430450f, -0.1152879000f, -0.1020170897f,
+ -0.0881701857f, -0.0685065687f, -0.0517151989f, -0.0382792465f, -0.0279547423f,
+ -0.0202258006f, -0.0116370060f, -0.0066280887f, -0.0037540086f, -0.0021195263f,
+ -0.0000000112f}},
{
- {0.0000000224f, 0.0039921328f, 0.0071208850f, 0.0127314143f,
- 0.0228547044f, 0.0413094237f, 0.0592183806f, 0.0853221565f,
- 0.1236763671f, 0.1803686619f, 0.2854516804f, 0.3939453363f,
- 0.5444797277f, 0.7350655198f, 0.9220948815f, 1.0059223175f,
- 0.9220950603f, 0.7350654006f, 0.5444797873f, 0.3939453959f,
- 0.2854517102f, 0.1803686470f, 0.1236763671f, 0.0853221416f,
- 0.0592183881f, 0.0413094237f, 0.0228547081f, 0.0127314143f,
- 0.0071208850f, 0.0039921328f, 0.0000000224f},
- {0.0000000224f, 0.0037396848f, 0.0066692568f, 0.0119196586f,
- 0.0213833824f, 0.0386023745f, 0.0552692823f, 0.0794829652f,
- 0.1148765832f, 0.1667534113f, 0.2564018667f, 0.3483759165f,
- 0.4713715911f, 0.6198635101f, 0.7582825422f, 0.8181172609f,
- 0.7582826018f, 0.6198634505f, 0.4713717401f, 0.3483759463f,
- 0.2564018369f, 0.1667534262f, 0.1148765832f, 0.0794829577f,
- 0.0552692935f, 0.0386023745f, 0.0213833824f, 0.0119196586f,
- 0.0066692568f, 0.0037396848f, 0.0000000224f},
- {0.0000000186f, 0.0033559650f, 0.0059831366f, 0.0106875487f,
- 0.0191539228f, 0.0345134847f, 0.0493235774f, 0.0707350895f,
- 0.1017966419f, 0.1467751414f, 0.2165540457f, 0.2881157100f,
- 0.3792885542f, 0.4829951525f, 0.5739276409f, 0.6116424799f,
- 0.5739278197f, 0.4829950929f, 0.3792886436f, 0.2881156802f,
- 0.2165541053f, 0.1467751414f, 0.1017966270f, 0.0707350820f,
- 0.0493235849f, 0.0345134847f, 0.0191539265f, 0.0106875449f,
- 0.0059831366f, 0.0033559650f, 0.0000000186f},
- {0.0000000149f, 0.0023951232f, 0.0042668879f, 0.0076114945f,
- 0.0136074573f, 0.0244078524f, 0.0347254612f, 0.0494702682f,
- 0.0704879165f, 0.1001076251f, 0.1405195445f, 0.1735420227f,
- 0.2150437981f, 0.2592166960f, 0.2942399085f, 0.3078634143f,
- 0.2942398787f, 0.2592166662f, 0.2150438130f, 0.1735420525f,
- 0.1405195594f, 0.1001076251f, 0.0704879165f, 0.0494702682f,
- 0.0347254649f, 0.0244078524f, 0.0136074573f, 0.0076114945f,
- 0.0042668879f, 0.0023951232f, 0.0000000149f},
- {0.0000000075f, 0.0014639609f, 0.0026061311f, 0.0046428703f,
- 0.0082807541f, 0.0147897005f, 0.0209544264f, 0.0296728499f,
- 0.0419111848f, 0.0587732270f, 0.0810343996f, 0.0985725895f,
- 0.1170293465f, 0.1341015100f, 0.1465103328f, 0.1510950923f,
- 0.1465103626f, 0.1341015100f, 0.1170293614f, 0.0985725969f,
- 0.0810344070f, 0.0587732270f, 0.0419111848f, 0.0296728462f,
- 0.0209544301f, 0.0147897005f, 0.0082807541f, 0.0046428740f,
- 0.0026061311f, 0.0014639609f, 0.0000000075f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000149f, -0.0023365319f, -0.0041472055f, -0.0073497221f,
- -0.0129875094f, -0.0228201896f, -0.0318449698f, -0.0441566557f,
- -0.0606067441f, -0.0818213820f, -0.1075451598f, -0.1261962205f,
- -0.1444622725f, -0.1602374315f, -0.1710857153f, -0.1749702245f,
- -0.1710857302f, -0.1602374166f, -0.1444622725f, -0.1261962205f,
- -0.1075451523f, -0.0818213746f, -0.0606067479f, -0.0441566557f,
- -0.0318449698f, -0.0228201859f, -0.0129875094f, -0.0073497221f,
- -0.0041472055f, -0.0023365319f, -0.0000000149f},
- {-0.0000000224f, -0.0039210618f, -0.0069511682f, -0.0122926161f,
- -0.0216415301f, -0.0377869830f, -0.0524356179f, -0.0721722096f,
- -0.0981289595f, -0.1309677958f, -0.1699328125f, -0.1976661086f,
- -0.2244503498f, -0.2473092675f, -0.2628936768f, -0.2684485912f,
- -0.2628936768f, -0.2473092675f, -0.2244503498f, -0.1976661086f,
- -0.1699328125f, -0.1309677958f, -0.0981289521f, -0.0721722096f,
- -0.0524356291f, -0.0377869792f, -0.0216415301f, -0.0122926198f,
- -0.0069511682f, -0.0039210618f, -0.0000000224f}},
+ {0.0000000224f, 0.0039921328f, 0.0071208850f, 0.0127314143f, 0.0228547044f, 0.0413094237f,
+ 0.0592183806f, 0.0853221565f, 0.1236763671f, 0.1803686619f, 0.2854516804f, 0.3939453363f,
+ 0.5444797277f, 0.7350655198f, 0.9220948815f, 1.0059223175f, 0.9220950603f, 0.7350654006f,
+ 0.5444797873f, 0.3939453959f, 0.2854517102f, 0.1803686470f, 0.1236763671f, 0.0853221416f,
+ 0.0592183881f, 0.0413094237f, 0.0228547081f, 0.0127314143f, 0.0071208850f, 0.0039921328f,
+ 0.0000000224f},
+ {0.0000000224f, 0.0037396848f, 0.0066692568f, 0.0119196586f, 0.0213833824f, 0.0386023745f,
+ 0.0552692823f, 0.0794829652f, 0.1148765832f, 0.1667534113f, 0.2564018667f, 0.3483759165f,
+ 0.4713715911f, 0.6198635101f, 0.7582825422f, 0.8181172609f, 0.7582826018f, 0.6198634505f,
+ 0.4713717401f, 0.3483759463f, 0.2564018369f, 0.1667534262f, 0.1148765832f, 0.0794829577f,
+ 0.0552692935f, 0.0386023745f, 0.0213833824f, 0.0119196586f, 0.0066692568f, 0.0037396848f,
+ 0.0000000224f},
+ {0.0000000186f, 0.0033559650f, 0.0059831366f, 0.0106875487f, 0.0191539228f, 0.0345134847f,
+ 0.0493235774f, 0.0707350895f, 0.1017966419f, 0.1467751414f, 0.2165540457f, 0.2881157100f,
+ 0.3792885542f, 0.4829951525f, 0.5739276409f, 0.6116424799f, 0.5739278197f, 0.4829950929f,
+ 0.3792886436f, 0.2881156802f, 0.2165541053f, 0.1467751414f, 0.1017966270f, 0.0707350820f,
+ 0.0493235849f, 0.0345134847f, 0.0191539265f, 0.0106875449f, 0.0059831366f, 0.0033559650f,
+ 0.0000000186f},
+ {0.0000000149f, 0.0023951232f, 0.0042668879f, 0.0076114945f, 0.0136074573f, 0.0244078524f,
+ 0.0347254612f, 0.0494702682f, 0.0704879165f, 0.1001076251f, 0.1405195445f, 0.1735420227f,
+ 0.2150437981f, 0.2592166960f, 0.2942399085f, 0.3078634143f, 0.2942398787f, 0.2592166662f,
+ 0.2150438130f, 0.1735420525f, 0.1405195594f, 0.1001076251f, 0.0704879165f, 0.0494702682f,
+ 0.0347254649f, 0.0244078524f, 0.0136074573f, 0.0076114945f, 0.0042668879f, 0.0023951232f,
+ 0.0000000149f},
+ {0.0000000075f, 0.0014639609f, 0.0026061311f, 0.0046428703f, 0.0082807541f, 0.0147897005f,
+ 0.0209544264f, 0.0296728499f, 0.0419111848f, 0.0587732270f, 0.0810343996f, 0.0985725895f,
+ 0.1170293465f, 0.1341015100f, 0.1465103328f, 0.1510950923f, 0.1465103626f, 0.1341015100f,
+ 0.1170293614f, 0.0985725969f, 0.0810344070f, 0.0587732270f, 0.0419111848f, 0.0296728462f,
+ 0.0209544301f, 0.0147897005f, 0.0082807541f, 0.0046428740f, 0.0026061311f, 0.0014639609f,
+ 0.0000000075f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000149f, -0.0023365319f, -0.0041472055f, -0.0073497221f, -0.0129875094f,
+ -0.0228201896f, -0.0318449698f, -0.0441566557f, -0.0606067441f, -0.0818213820f,
+ -0.1075451598f, -0.1261962205f, -0.1444622725f, -0.1602374315f, -0.1710857153f,
+ -0.1749702245f, -0.1710857302f, -0.1602374166f, -0.1444622725f, -0.1261962205f,
+ -0.1075451523f, -0.0818213746f, -0.0606067479f, -0.0441566557f, -0.0318449698f,
+ -0.0228201859f, -0.0129875094f, -0.0073497221f, -0.0041472055f, -0.0023365319f,
+ -0.0000000149f},
+ {-0.0000000224f, -0.0039210618f, -0.0069511682f, -0.0122926161f, -0.0216415301f,
+ -0.0377869830f, -0.0524356179f, -0.0721722096f, -0.0981289595f, -0.1309677958f,
+ -0.1699328125f, -0.1976661086f, -0.2244503498f, -0.2473092675f, -0.2628936768f,
+ -0.2684485912f, -0.2628936768f, -0.2473092675f, -0.2244503498f, -0.1976661086f,
+ -0.1699328125f, -0.1309677958f, -0.0981289521f, -0.0721722096f, -0.0524356291f,
+ -0.0377869792f, -0.0216415301f, -0.0122926198f, -0.0069511682f, -0.0039210618f,
+ -0.0000000224f}},
{
- {0.0000000298f, 0.0052064098f, 0.0092734247f, 0.0165368505f,
- 0.0295458250f, 0.0529378653f, 0.0752342194f, 0.1070103794f,
- 0.1521206498f, 0.2153066397f, 0.3007343411f, 0.3698226213f,
- 0.4447503686f, 0.5307883024f, 0.5978007317f, 0.6235858798f,
- 0.5978007913f, 0.5307883024f, 0.4447503686f, 0.3698226511f,
- 0.3007343411f, 0.2153066397f, 0.1521206498f, 0.1070103645f,
- 0.0752342343f, 0.0529378615f, 0.0295458250f, 0.0165368505f,
- 0.0092734247f, 0.0052064061f, 0.0000000298f},
- {0.0000000261f, 0.0048777387f, 0.0086870864f, 0.0154883042f,
- 0.0276628546f, 0.0495328866f, 0.0703521222f, 0.0999773145f,
- 0.1419382244f, 0.2005145401f, 0.2793169618f, 0.3426927626f,
- 0.4107417464f, 0.4813472927f, 0.5399246812f, 0.5623379946f,
- 0.5399246812f, 0.4813472331f, 0.4107417464f, 0.3426927924f,
- 0.2793169618f, 0.2005145401f, 0.1419382244f, 0.0999772996f,
- 0.0703521222f, 0.0495328866f, 0.0276628546f, 0.0154883005f,
- 0.0086870864f, 0.0048777387f, 0.0000000261f},
- {0.0000000261f, 0.0043780245f, 0.0077958442f, 0.0138952583f,
- 0.0248045959f, 0.0443725958f, 0.0629648566f, 0.0893598348f,
- 0.1266184896f, 0.1783709228f, 0.2474883795f, 0.3026292324f,
- 0.3613662124f, 0.4163920283f, 0.4594897032f, 0.4775325954f,
- 0.4594897032f, 0.4163919985f, 0.3613662422f, 0.3026292324f,
- 0.2474884391f, 0.1783709079f, 0.1266184747f, 0.0893598199f,
- 0.0629648566f, 0.0443725996f, 0.0248045996f, 0.0138952583f,
- 0.0077958442f, 0.0043780245f, 0.0000000261f},
- {0.0000000186f, 0.0031259395f, 0.0055640303f, 0.0099100843f,
- 0.0176675394f, 0.0315306373f, 0.0446406342f, 0.0631476343f,
- 0.0890584067f, 0.1246242076f, 0.1713303179f, 0.2079202831f,
- 0.2462213188f, 0.2814548016f, 0.3069431484f, 0.3163340688f,
- 0.3069431484f, 0.2814548016f, 0.2462213784f, 0.2079202831f,
- 0.1713303179f, 0.1246242076f, 0.0890584141f, 0.0631476343f,
- 0.0446406342f, 0.0315306373f, 0.0176675394f, 0.0099100843f,
- 0.0055640303f, 0.0031259395f, 0.0000000186f},
- {0.0000000112f, 0.0019114725f, 0.0034010001f, 0.0060532652f,
- 0.0107781142f, 0.0191919580f, 0.0271133892f, 0.0382369235f,
- 0.0536935441f, 0.0746848807f, 0.1018502042f, 0.1228085682f,
- 0.1444384903f, 0.1640539765f, 0.1780739427f, 0.1832032055f,
- 0.1780739427f, 0.1640539765f, 0.1444384903f, 0.1228085682f,
- 0.1018502042f, 0.0746848658f, 0.0536935441f, 0.0382369198f,
- 0.0271133929f, 0.0191919580f, 0.0107781179f, 0.0060532652f,
- 0.0034010001f, 0.0019114725f, 0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000186f, -0.0030560978f, -0.0054288842f, -0.0096351840f,
- -0.0170696974f, -0.0301259086f, -0.0422091223f, -0.0588454194f,
- -0.0813441128f, -0.1108067334f, -0.1471893191f, -0.1740057468f,
- -0.2006137222f, -0.2238603830f, -0.2399867922f, -0.2457885146f,
- -0.2399868220f, -0.2238603532f, -0.2006137371f, -0.1740057468f,
- -0.1471893340f, -0.1108067334f, -0.0813441128f, -0.0588454083f,
- -0.0422091298f, -0.0301259086f, -0.0170696974f, -0.0096351840f,
- -0.0054288842f, -0.0030560978f, -0.0000000186f},
- {-0.0000000298f, -0.0051323175f, -0.0091110431f, -0.0161513090f,
- -0.0285548419f, -0.0502165072f, -0.0701301694f, -0.0973443240f,
- -0.1337892413f, -0.1809239089f, -0.2382676005f, -0.2799672186f,
- -0.3208998442f, -0.3563211858f, -0.3807161450f, -0.3894582987f,
- -0.3807161450f, -0.3563212156f, -0.3208998442f, -0.2799672484f,
- -0.2382676005f, -0.1809239089f, -0.1337892264f, -0.0973443091f,
- -0.0701301768f, -0.0502165109f, -0.0285548456f, -0.0161513090f,
- -0.0091110431f, -0.0051323175f, -0.0000000298f}},
+ {0.0000000298f, 0.0052064098f, 0.0092734247f, 0.0165368505f, 0.0295458250f, 0.0529378653f,
+ 0.0752342194f, 0.1070103794f, 0.1521206498f, 0.2153066397f, 0.3007343411f, 0.3698226213f,
+ 0.4447503686f, 0.5307883024f, 0.5978007317f, 0.6235858798f, 0.5978007913f, 0.5307883024f,
+ 0.4447503686f, 0.3698226511f, 0.3007343411f, 0.2153066397f, 0.1521206498f, 0.1070103645f,
+ 0.0752342343f, 0.0529378615f, 0.0295458250f, 0.0165368505f, 0.0092734247f, 0.0052064061f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0048777387f, 0.0086870864f, 0.0154883042f, 0.0276628546f, 0.0495328866f,
+ 0.0703521222f, 0.0999773145f, 0.1419382244f, 0.2005145401f, 0.2793169618f, 0.3426927626f,
+ 0.4107417464f, 0.4813472927f, 0.5399246812f, 0.5623379946f, 0.5399246812f, 0.4813472331f,
+ 0.4107417464f, 0.3426927924f, 0.2793169618f, 0.2005145401f, 0.1419382244f, 0.0999772996f,
+ 0.0703521222f, 0.0495328866f, 0.0276628546f, 0.0154883005f, 0.0086870864f, 0.0048777387f,
+ 0.0000000261f},
+ {0.0000000261f, 0.0043780245f, 0.0077958442f, 0.0138952583f, 0.0248045959f, 0.0443725958f,
+ 0.0629648566f, 0.0893598348f, 0.1266184896f, 0.1783709228f, 0.2474883795f, 0.3026292324f,
+ 0.3613662124f, 0.4163920283f, 0.4594897032f, 0.4775325954f, 0.4594897032f, 0.4163919985f,
+ 0.3613662422f, 0.3026292324f, 0.2474884391f, 0.1783709079f, 0.1266184747f, 0.0893598199f,
+ 0.0629648566f, 0.0443725996f, 0.0248045996f, 0.0138952583f, 0.0077958442f, 0.0043780245f,
+ 0.0000000261f},
+ {0.0000000186f, 0.0031259395f, 0.0055640303f, 0.0099100843f, 0.0176675394f, 0.0315306373f,
+ 0.0446406342f, 0.0631476343f, 0.0890584067f, 0.1246242076f, 0.1713303179f, 0.2079202831f,
+ 0.2462213188f, 0.2814548016f, 0.3069431484f, 0.3163340688f, 0.3069431484f, 0.2814548016f,
+ 0.2462213784f, 0.2079202831f, 0.1713303179f, 0.1246242076f, 0.0890584141f, 0.0631476343f,
+ 0.0446406342f, 0.0315306373f, 0.0176675394f, 0.0099100843f, 0.0055640303f, 0.0031259395f,
+ 0.0000000186f},
+ {0.0000000112f, 0.0019114725f, 0.0034010001f, 0.0060532652f, 0.0107781142f, 0.0191919580f,
+ 0.0271133892f, 0.0382369235f, 0.0536935441f, 0.0746848807f, 0.1018502042f, 0.1228085682f,
+ 0.1444384903f, 0.1640539765f, 0.1780739427f, 0.1832032055f, 0.1780739427f, 0.1640539765f,
+ 0.1444384903f, 0.1228085682f, 0.1018502042f, 0.0746848658f, 0.0536935441f, 0.0382369198f,
+ 0.0271133929f, 0.0191919580f, 0.0107781179f, 0.0060532652f, 0.0034010001f, 0.0019114725f,
+ 0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000186f, -0.0030560978f, -0.0054288842f, -0.0096351840f, -0.0170696974f,
+ -0.0301259086f, -0.0422091223f, -0.0588454194f, -0.0813441128f, -0.1108067334f,
+ -0.1471893191f, -0.1740057468f, -0.2006137222f, -0.2238603830f, -0.2399867922f,
+ -0.2457885146f, -0.2399868220f, -0.2238603532f, -0.2006137371f, -0.1740057468f,
+ -0.1471893340f, -0.1108067334f, -0.0813441128f, -0.0588454083f, -0.0422091298f,
+ -0.0301259086f, -0.0170696974f, -0.0096351840f, -0.0054288842f, -0.0030560978f,
+ -0.0000000186f},
+ {-0.0000000298f, -0.0051323175f, -0.0091110431f, -0.0161513090f, -0.0285548419f,
+ -0.0502165072f, -0.0701301694f, -0.0973443240f, -0.1337892413f, -0.1809239089f,
+ -0.2382676005f, -0.2799672186f, -0.3208998442f, -0.3563211858f, -0.3807161450f,
+ -0.3894582987f, -0.3807161450f, -0.3563212156f, -0.3208998442f, -0.2799672484f,
+ -0.2382676005f, -0.1809239089f, -0.1337892264f, -0.0973443091f, -0.0701301768f,
+ -0.0502165109f, -0.0285548456f, -0.0161513090f, -0.0091110431f, -0.0051323175f,
+ -0.0000000298f}},
{
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000298f, 0.0052689724f, 0.0093690641f, 0.0166572109f,
- 0.0296009369f, 0.0525252819f, 0.0739618763f, 0.1038260460f,
- 0.1448656321f, 0.1997566223f, 0.2693685591f, 0.3219937980f,
- 0.3753330112f, 0.4228624403f, 0.4563488662f, 0.4684999883f,
- 0.4563488662f, 0.4228624403f, 0.3753330410f, 0.3219938278f,
- 0.2693685591f, 0.1997566223f, 0.1448656321f, 0.1038260311f,
- 0.0739618912f, 0.0525252856f, 0.0296009406f, 0.0166572109f,
- 0.0093690641f, 0.0052689724f, 0.0000000298f},
- {0.0000000261f, 0.0047301538f, 0.0084109604f, 0.0149538033f,
- 0.0265738741f, 0.0471539162f, 0.0663983598f, 0.0932085291f,
- 0.1300513148f, 0.1793290079f, 0.2418222427f, 0.2890659571f,
- 0.3369505107f, 0.3796194792f, 0.4096814692f, 0.4205900133f,
- 0.4096814990f, 0.3796194792f, 0.3369505405f, 0.2890659273f,
- 0.2418222576f, 0.1793290079f, 0.1300513148f, 0.0932085216f,
- 0.0663983598f, 0.0471539162f, 0.0265738741f, 0.0149538033f,
- 0.0084109604f, 0.0047301538f, 0.0000000261f},
- {0.0000000186f, 0.0033791140f, 0.0060085990f, 0.0106826574f,
- 0.0189837739f, 0.0336856917f, 0.0474334881f, 0.0665860698f,
- 0.0929057151f, 0.1281086057f, 0.1727523506f, 0.2065021843f,
- 0.2407098413f, 0.2711915970f, 0.2926672101f, 0.3004600108f,
- 0.2926672101f, 0.2711915672f, 0.2407098711f, 0.2065021843f,
- 0.1727523655f, 0.1281086057f, 0.0929057226f, 0.0665860623f,
- 0.0474334918f, 0.0336856917f, 0.0189837776f, 0.0106826574f,
- 0.0060085990f, 0.0033791140f, 0.0000000186f},
- {0.0000000112f, 0.0020673275f, 0.0036760308f, 0.0065356009f,
- 0.0116141811f, 0.0206087455f, 0.0290195793f, 0.0407370403f,
- 0.0568392761f, 0.0783762336f, 0.1056890637f, 0.1263370365f,
- 0.1472651362f, 0.1659137160f, 0.1790523976f, 0.1838199943f,
- 0.1790523976f, 0.1659137160f, 0.1472651511f, 0.1263370514f,
- 0.1056890711f, 0.0783762261f, 0.0568392724f, 0.0407370329f,
- 0.0290195830f, 0.0206087455f, 0.0116141848f, 0.0065356009f,
- 0.0036760308f, 0.0020673275f, 0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000186f, -0.0033120848f, -0.0058894120f, -0.0104707517f,
- -0.0186072066f, -0.0330174938f, -0.0464925803f, -0.0652652532f,
- -0.0910628140f, -0.1255674064f, -0.1693255901f, -0.2024059296f,
- -0.2359350473f, -0.2658121586f, -0.2868617475f, -0.2944999933f,
- -0.2868617773f, -0.2658121288f, -0.2359350622f, -0.2024059445f,
- -0.1693255901f, -0.1255674064f, -0.0910628140f, -0.0652652457f,
- -0.0464925840f, -0.0330174938f, -0.0186072066f, -0.0104707554f,
- -0.0058894120f, -0.0033120848f, -0.0000000186f},
- {-0.0000000298f, -0.0055670030f, -0.0098990090f, -0.0175994001f,
- -0.0312752686f, -0.0554962978f, -0.0781454220f, -0.1096988022f,
- -0.1530597508f, -0.2110555619f, -0.2846049964f, -0.3402069509f,
- -0.3965631723f, -0.4467810690f, -0.4821615517f, -0.4950000048f,
- -0.4821615815f, -0.4467810392f, -0.3965632021f, -0.3402069509f,
- -0.2846049964f, -0.2110555619f, -0.1530597359f, -0.1096988022f,
- -0.0781454295f, -0.0554962978f, -0.0312752724f, -0.0175994001f,
- -0.0098990090f, -0.0055670030f, -0.0000000298f}},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0052689724f, 0.0093690641f, 0.0166572109f, 0.0296009369f, 0.0525252819f,
+ 0.0739618763f, 0.1038260460f, 0.1448656321f, 0.1997566223f, 0.2693685591f, 0.3219937980f,
+ 0.3753330112f, 0.4228624403f, 0.4563488662f, 0.4684999883f, 0.4563488662f, 0.4228624403f,
+ 0.3753330410f, 0.3219938278f, 0.2693685591f, 0.1997566223f, 0.1448656321f, 0.1038260311f,
+ 0.0739618912f, 0.0525252856f, 0.0296009406f, 0.0166572109f, 0.0093690641f, 0.0052689724f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0047301538f, 0.0084109604f, 0.0149538033f, 0.0265738741f, 0.0471539162f,
+ 0.0663983598f, 0.0932085291f, 0.1300513148f, 0.1793290079f, 0.2418222427f, 0.2890659571f,
+ 0.3369505107f, 0.3796194792f, 0.4096814692f, 0.4205900133f, 0.4096814990f, 0.3796194792f,
+ 0.3369505405f, 0.2890659273f, 0.2418222576f, 0.1793290079f, 0.1300513148f, 0.0932085216f,
+ 0.0663983598f, 0.0471539162f, 0.0265738741f, 0.0149538033f, 0.0084109604f, 0.0047301538f,
+ 0.0000000261f},
+ {0.0000000186f, 0.0033791140f, 0.0060085990f, 0.0106826574f, 0.0189837739f, 0.0336856917f,
+ 0.0474334881f, 0.0665860698f, 0.0929057151f, 0.1281086057f, 0.1727523506f, 0.2065021843f,
+ 0.2407098413f, 0.2711915970f, 0.2926672101f, 0.3004600108f, 0.2926672101f, 0.2711915672f,
+ 0.2407098711f, 0.2065021843f, 0.1727523655f, 0.1281086057f, 0.0929057226f, 0.0665860623f,
+ 0.0474334918f, 0.0336856917f, 0.0189837776f, 0.0106826574f, 0.0060085990f, 0.0033791140f,
+ 0.0000000186f},
+ {0.0000000112f, 0.0020673275f, 0.0036760308f, 0.0065356009f, 0.0116141811f, 0.0206087455f,
+ 0.0290195793f, 0.0407370403f, 0.0568392761f, 0.0783762336f, 0.1056890637f, 0.1263370365f,
+ 0.1472651362f, 0.1659137160f, 0.1790523976f, 0.1838199943f, 0.1790523976f, 0.1659137160f,
+ 0.1472651511f, 0.1263370514f, 0.1056890711f, 0.0783762261f, 0.0568392724f, 0.0407370329f,
+ 0.0290195830f, 0.0206087455f, 0.0116141848f, 0.0065356009f, 0.0036760308f, 0.0020673275f,
+ 0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000186f, -0.0033120848f, -0.0058894120f, -0.0104707517f, -0.0186072066f,
+ -0.0330174938f, -0.0464925803f, -0.0652652532f, -0.0910628140f, -0.1255674064f,
+ -0.1693255901f, -0.2024059296f, -0.2359350473f, -0.2658121586f, -0.2868617475f,
+ -0.2944999933f, -0.2868617773f, -0.2658121288f, -0.2359350622f, -0.2024059445f,
+ -0.1693255901f, -0.1255674064f, -0.0910628140f, -0.0652652457f, -0.0464925840f,
+ -0.0330174938f, -0.0186072066f, -0.0104707554f, -0.0058894120f, -0.0033120848f,
+ -0.0000000186f},
+ {-0.0000000298f, -0.0055670030f, -0.0098990090f, -0.0175994001f, -0.0312752686f,
+ -0.0554962978f, -0.0781454220f, -0.1096988022f, -0.1530597508f, -0.2110555619f,
+ -0.2846049964f, -0.3402069509f, -0.3965631723f, -0.4467810690f, -0.4821615517f,
+ -0.4950000048f, -0.4821615815f, -0.4467810392f, -0.3965632021f, -0.3402069509f,
+ -0.2846049964f, -0.2110555619f, -0.1530597359f, -0.1096988022f, -0.0781454295f,
+ -0.0554962978f, -0.0312752724f, -0.0175994001f, -0.0098990090f, -0.0055670030f,
+ -0.0000000298f}},
{
- {0.0000000298f, 0.0051840469f, 0.0092027225f, 0.0163133591f,
- 0.0288398713f, 0.0507133044f, 0.0708183646f, 0.0982891619f,
- 0.1350691319f, 0.1826231927f, 0.2404571772f, 0.2825005352f,
- 0.3237606883f, 0.3594580293f, 0.3840392828f, 0.3928474188f,
- 0.3840392828f, 0.3594580293f, 0.3237607181f, 0.2825005352f,
- 0.2404572070f, 0.1826231927f, 0.1350691170f, 0.0982891470f,
- 0.0708183646f, 0.0507133044f, 0.0288398750f, 0.0163133591f,
- 0.0092027225f, 0.0051840469f, 0.0000000298f},
- {0.0000000261f, 0.0048581101f, 0.0086250156f, 0.0152920857f,
- 0.0270430744f, 0.0475800633f, 0.0664762184f, 0.0923245773f,
- 0.1269837022f, 0.1718790978f, 0.2265993506f, 0.2664566338f,
- 0.3056311607f, 0.3395694792f, 0.3629627824f, 0.3713497519f,
- 0.3629627824f, 0.3395694792f, 0.3056311607f, 0.2664566338f,
- 0.2265993655f, 0.1718791127f, 0.1269836873f, 0.0923245549f,
- 0.0664762259f, 0.0475800633f, 0.0270430781f, 0.0152920857f,
- 0.0086250156f, 0.0048581101f, 0.0000000261f},
- {0.0000000261f, 0.0043622032f, 0.0077458210f, 0.0137371235f,
- 0.0243051276f, 0.0427990668f, 0.0598423518f, 0.0831969753f,
- 0.1145843044f, 0.1553593576f, 0.2052282989f, 0.2416637242f,
- 0.2775619626f, 0.3087284565f, 0.3302457333f, 0.3379667401f,
- 0.3302457333f, 0.3087284565f, 0.2775619924f, 0.2416636944f,
- 0.2052282989f, 0.1553593576f, 0.1145842969f, 0.0831969678f,
- 0.0598423555f, 0.0427990705f, 0.0243051313f, 0.0137371235f,
- 0.0077458210f, 0.0043622032f, 0.0000000261f},
- {0.0000000186f, 0.0031178668f, 0.0055385008f, 0.0098293871f,
- 0.0174126737f, 0.0307279304f, 0.0430483744f, 0.0600074232f,
- 0.0829356611f, 0.1129490286f, 0.1499940604f, 0.1772867441f,
- 0.2043576241f, 0.2280011177f, 0.2443987727f, 0.2502972782f,
- 0.2443987727f, 0.2280010879f, 0.2043576539f, 0.1772867590f,
- 0.1499940753f, 0.1129490286f, 0.0829356611f, 0.0600074194f,
- 0.0430483781f, 0.0307279266f, 0.0174126774f, 0.0098293871f,
- 0.0055385008f, 0.0031178668f, 0.0000000186f},
- {0.0000000112f, 0.0019084513f, 0.0033914447f, 0.0060230605f,
- 0.0106827281f, 0.0188915879f, 0.0265177228f, 0.0370627567f,
- 0.0514063723f, 0.0703314394f, 0.0939192027f, 0.1114559397f,
- 0.1289804429f, 0.1443904638f, 0.1551341414f, 0.1590099335f,
- 0.1551341563f, 0.1443904638f, 0.1289804578f, 0.1114559397f,
- 0.0939192176f, 0.0703314245f, 0.0514063723f, 0.0370627530f,
- 0.0265177265f, 0.0188915879f, 0.0106827281f, 0.0060230605f,
- 0.0033914447f, 0.0019084513f, 0.0000000112f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000186f, -0.0030638538f, -0.0054534115f, -0.0097127110f,
- -0.0173145495f, -0.0308970734f, -0.0437387861f, -0.0618620813f,
- -0.0872256160f, -0.1220206320f, -0.1676785499f, -0.2034175098f,
- -0.2407984585f, -0.2751578987f, -0.2999968529f, -0.3091448545f,
- -0.2999968827f, -0.2751578689f, -0.2407984585f, -0.2034175098f,
- -0.1676785499f, -0.1220206320f, -0.0872256160f, -0.0618620738f,
- -0.0437387861f, -0.0308970734f, -0.0173145495f, -0.0097127110f,
- -0.0054534115f, -0.0030638538f, -0.0000000186f},
- {-0.0000000298f, -0.0051542334f, -0.0091803335f, -0.0163703524f,
- -0.0292467363f, -0.0523967445f, -0.0744579434f, -0.1058912203f,
- -0.1504984796f, -0.2129460722f, -0.2973079383f, -0.3654728234f,
- -0.4390078187f, -0.5227221847f, -0.5883264542f, -0.6135464907f,
- -0.5883265138f, -0.5227221251f, -0.4390078783f, -0.3654728234f,
- -0.2973079383f, -0.2129460722f, -0.1504984796f, -0.1058912128f,
- -0.0744579583f, -0.0523967408f, -0.0292467438f, -0.0163703524f,
- -0.0091803372f, -0.0051542334f, -0.0000000298f}},
+ {0.0000000298f, 0.0051840469f, 0.0092027225f, 0.0163133591f, 0.0288398713f, 0.0507133044f,
+ 0.0708183646f, 0.0982891619f, 0.1350691319f, 0.1826231927f, 0.2404571772f, 0.2825005352f,
+ 0.3237606883f, 0.3594580293f, 0.3840392828f, 0.3928474188f, 0.3840392828f, 0.3594580293f,
+ 0.3237607181f, 0.2825005352f, 0.2404572070f, 0.1826231927f, 0.1350691170f, 0.0982891470f,
+ 0.0708183646f, 0.0507133044f, 0.0288398750f, 0.0163133591f, 0.0092027225f, 0.0051840469f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0048581101f, 0.0086250156f, 0.0152920857f, 0.0270430744f, 0.0475800633f,
+ 0.0664762184f, 0.0923245773f, 0.1269837022f, 0.1718790978f, 0.2265993506f, 0.2664566338f,
+ 0.3056311607f, 0.3395694792f, 0.3629627824f, 0.3713497519f, 0.3629627824f, 0.3395694792f,
+ 0.3056311607f, 0.2664566338f, 0.2265993655f, 0.1718791127f, 0.1269836873f, 0.0923245549f,
+ 0.0664762259f, 0.0475800633f, 0.0270430781f, 0.0152920857f, 0.0086250156f, 0.0048581101f,
+ 0.0000000261f},
+ {0.0000000261f, 0.0043622032f, 0.0077458210f, 0.0137371235f, 0.0243051276f, 0.0427990668f,
+ 0.0598423518f, 0.0831969753f, 0.1145843044f, 0.1553593576f, 0.2052282989f, 0.2416637242f,
+ 0.2775619626f, 0.3087284565f, 0.3302457333f, 0.3379667401f, 0.3302457333f, 0.3087284565f,
+ 0.2775619924f, 0.2416636944f, 0.2052282989f, 0.1553593576f, 0.1145842969f, 0.0831969678f,
+ 0.0598423555f, 0.0427990705f, 0.0243051313f, 0.0137371235f, 0.0077458210f, 0.0043622032f,
+ 0.0000000261f},
+ {0.0000000186f, 0.0031178668f, 0.0055385008f, 0.0098293871f, 0.0174126737f, 0.0307279304f,
+ 0.0430483744f, 0.0600074232f, 0.0829356611f, 0.1129490286f, 0.1499940604f, 0.1772867441f,
+ 0.2043576241f, 0.2280011177f, 0.2443987727f, 0.2502972782f, 0.2443987727f, 0.2280010879f,
+ 0.2043576539f, 0.1772867590f, 0.1499940753f, 0.1129490286f, 0.0829356611f, 0.0600074194f,
+ 0.0430483781f, 0.0307279266f, 0.0174126774f, 0.0098293871f, 0.0055385008f, 0.0031178668f,
+ 0.0000000186f},
+ {0.0000000112f, 0.0019084513f, 0.0033914447f, 0.0060230605f, 0.0106827281f, 0.0188915879f,
+ 0.0265177228f, 0.0370627567f, 0.0514063723f, 0.0703314394f, 0.0939192027f, 0.1114559397f,
+ 0.1289804429f, 0.1443904638f, 0.1551341414f, 0.1590099335f, 0.1551341563f, 0.1443904638f,
+ 0.1289804578f, 0.1114559397f, 0.0939192176f, 0.0703314245f, 0.0514063723f, 0.0370627530f,
+ 0.0265177265f, 0.0188915879f, 0.0106827281f, 0.0060230605f, 0.0033914447f, 0.0019084513f,
+ 0.0000000112f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000186f, -0.0030638538f, -0.0054534115f, -0.0097127110f, -0.0173145495f,
+ -0.0308970734f, -0.0437387861f, -0.0618620813f, -0.0872256160f, -0.1220206320f,
+ -0.1676785499f, -0.2034175098f, -0.2407984585f, -0.2751578987f, -0.2999968529f,
+ -0.3091448545f, -0.2999968827f, -0.2751578689f, -0.2407984585f, -0.2034175098f,
+ -0.1676785499f, -0.1220206320f, -0.0872256160f, -0.0618620738f, -0.0437387861f,
+ -0.0308970734f, -0.0173145495f, -0.0097127110f, -0.0054534115f, -0.0030638538f,
+ -0.0000000186f},
+ {-0.0000000298f, -0.0051542334f, -0.0091803335f, -0.0163703524f, -0.0292467363f,
+ -0.0523967445f, -0.0744579434f, -0.1058912203f, -0.1504984796f, -0.2129460722f,
+ -0.2973079383f, -0.3654728234f, -0.4390078187f, -0.5227221847f, -0.5883264542f,
+ -0.6135464907f, -0.5883265138f, -0.5227221251f, -0.4390078783f, -0.3654728234f,
+ -0.2973079383f, -0.2129460722f, -0.1504984796f, -0.1058912128f, -0.0744579583f,
+ -0.0523967408f, -0.0292467438f, -0.0163703524f, -0.0091803372f, -0.0051542334f,
+ -0.0000000298f}},
{
- {0.0000000224f, 0.0039605126f, 0.0070208944f, 0.0124152638f,
- 0.0218554623f, 0.0381546579f, 0.0529386885f, 0.0728518516f,
- 0.0990312248f, 0.1321374178f, 0.1714010984f, 0.1993360221f,
- 0.2263072431f, 0.2493203282f, 0.2650071383f, 0.2705981135f,
- 0.2650071681f, 0.2493203282f, 0.2263072580f, 0.1993360221f,
- 0.1714010984f, 0.1321374327f, 0.0990312248f, 0.0728518367f,
- 0.0529386923f, 0.0381546579f, 0.0218554661f, 0.0124152638f,
- 0.0070208944f, 0.0039605126f, 0.0000000224f},
- {0.0000000224f, 0.0037119240f, 0.0065814704f, 0.0116420984f,
- 0.0205062144f, 0.0358339176f, 0.0497612096f, 0.0685553625f,
- 0.0933211744f, 0.1247262433f, 0.1620853692f, 0.1887322813f,
- 0.2145074904f, 0.2365339100f, 0.2515646815f, 0.2569248676f,
- 0.2515646815f, 0.2365339100f, 0.2145075202f, 0.1887322962f,
- 0.1620853692f, 0.1247262433f, 0.0933211744f, 0.0685553551f,
- 0.0497612134f, 0.0358339213f, 0.0205062144f, 0.0116420984f,
- 0.0065814704f, 0.0037119202f, 0.0000000224f},
- {0.0000000186f, 0.0033335947f, 0.0059123896f, 0.0104638711f,
- 0.0184471309f, 0.0322837941f, 0.0448903851f, 0.0619516149f,
- 0.0845159292f, 0.1132542491f, 0.1476069987f, 0.1722095311f,
- 0.1960792094f, 0.2165289670f, 0.2305093110f, 0.2354997098f,
- 0.2305093408f, 0.2165289521f, 0.1960792243f, 0.1722095460f,
- 0.1476070136f, 0.1132542342f, 0.0845159292f, 0.0619516112f,
- 0.0448903851f, 0.0322837979f, 0.0184471346f, 0.0104638711f,
- 0.0059123859f, 0.0033335947f, 0.0000000186f},
- {0.0000000149f, 0.0023837052f, 0.0042307861f, 0.0074973591f,
- 0.0132469125f, 0.0232715197f, 0.0324691869f, 0.0450118259f,
- 0.0617620423f, 0.0833501965f, 0.1095077693f, 0.1284612119f,
- 0.1470142007f, 0.1630302370f, 0.1740406454f, 0.1779825240f,
- 0.1740406454f, 0.1630302221f, 0.1470142156f, 0.1284612268f,
- 0.1095077768f, 0.0833501965f, 0.0617620423f, 0.0450118259f,
- 0.0324691869f, 0.0232715197f, 0.0132469162f, 0.0074973591f,
- 0.0042307861f, 0.0023837052f, 0.0000000149f},
- {0.0000000075f, 0.0014596879f, 0.0025926158f, 0.0046001561f,
- 0.0081458427f, 0.0143647566f, 0.0201114081f, 0.0280098990f,
- 0.0386673771f, 0.0525827818f, 0.0697054788f, 0.0822848827f,
- 0.0947335958f, 0.1055838838f, 0.1130971909f, 0.1157975346f,
- 0.1130971909f, 0.1055838838f, 0.0947336033f, 0.0822848976f,
- 0.0697054863f, 0.0525827743f, 0.0386673771f, 0.0280098990f,
- 0.0201114118f, 0.0143647566f, 0.0081458464f, 0.0046001561f,
- 0.0025926158f, 0.0014596879f, 0.0000000075f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000149f, -0.0023475029f, -0.0041818954f, -0.0074593760f,
- -0.0133338906f, -0.0239118375f, -0.0340123996f, -0.0484390557f,
- -0.0689862818f, -0.0979072601f, -0.1372926533f, -0.1694079638f,
- -0.2086421251f, -0.2509776056f, -0.2844191492f, -0.2973977327f,
- -0.2844191790f, -0.2509775758f, -0.2086421549f, -0.1694079638f,
- -0.1372926831f, -0.0979072601f, -0.0689862967f, -0.0484390482f,
- -0.0340124033f, -0.0239118375f, -0.0133338906f, -0.0074593797f,
- -0.0041818954f, -0.0023475029f, -0.0000000149f},
- {-0.0000000224f, -0.0039520524f, -0.0070491731f, -0.0126024783f,
- -0.0226208754f, -0.0408787429f, -0.0585894138f, -0.0843905732f,
- -0.1222686917f, -0.1781808734f, -0.2806743383f, -0.3863531053f,
- -0.5320819616f, -0.7150993347f, -0.8931089044f, -0.9723873734f,
- -0.8931091428f, -0.7150992155f, -0.5320819616f, -0.3863530755f,
- -0.2806743681f, -0.1781808734f, -0.1222686768f, -0.0843905732f,
- -0.0585894212f, -0.0408787429f, -0.0226208791f, -0.0126024783f,
- -0.0070491731f, -0.0039520524f, -0.0000000224f}},
+ {0.0000000224f, 0.0039605126f, 0.0070208944f, 0.0124152638f, 0.0218554623f, 0.0381546579f,
+ 0.0529386885f, 0.0728518516f, 0.0990312248f, 0.1321374178f, 0.1714010984f, 0.1993360221f,
+ 0.2263072431f, 0.2493203282f, 0.2650071383f, 0.2705981135f, 0.2650071681f, 0.2493203282f,
+ 0.2263072580f, 0.1993360221f, 0.1714010984f, 0.1321374327f, 0.0990312248f, 0.0728518367f,
+ 0.0529386923f, 0.0381546579f, 0.0218554661f, 0.0124152638f, 0.0070208944f, 0.0039605126f,
+ 0.0000000224f},
+ {0.0000000224f, 0.0037119240f, 0.0065814704f, 0.0116420984f, 0.0205062144f, 0.0358339176f,
+ 0.0497612096f, 0.0685553625f, 0.0933211744f, 0.1247262433f, 0.1620853692f, 0.1887322813f,
+ 0.2145074904f, 0.2365339100f, 0.2515646815f, 0.2569248676f, 0.2515646815f, 0.2365339100f,
+ 0.2145075202f, 0.1887322962f, 0.1620853692f, 0.1247262433f, 0.0933211744f, 0.0685553551f,
+ 0.0497612134f, 0.0358339213f, 0.0205062144f, 0.0116420984f, 0.0065814704f, 0.0037119202f,
+ 0.0000000224f},
+ {0.0000000186f, 0.0033335947f, 0.0059123896f, 0.0104638711f, 0.0184471309f, 0.0322837941f,
+ 0.0448903851f, 0.0619516149f, 0.0845159292f, 0.1132542491f, 0.1476069987f, 0.1722095311f,
+ 0.1960792094f, 0.2165289670f, 0.2305093110f, 0.2354997098f, 0.2305093408f, 0.2165289521f,
+ 0.1960792243f, 0.1722095460f, 0.1476070136f, 0.1132542342f, 0.0845159292f, 0.0619516112f,
+ 0.0448903851f, 0.0322837979f, 0.0184471346f, 0.0104638711f, 0.0059123859f, 0.0033335947f,
+ 0.0000000186f},
+ {0.0000000149f, 0.0023837052f, 0.0042307861f, 0.0074973591f, 0.0132469125f, 0.0232715197f,
+ 0.0324691869f, 0.0450118259f, 0.0617620423f, 0.0833501965f, 0.1095077693f, 0.1284612119f,
+ 0.1470142007f, 0.1630302370f, 0.1740406454f, 0.1779825240f, 0.1740406454f, 0.1630302221f,
+ 0.1470142156f, 0.1284612268f, 0.1095077768f, 0.0833501965f, 0.0617620423f, 0.0450118259f,
+ 0.0324691869f, 0.0232715197f, 0.0132469162f, 0.0074973591f, 0.0042307861f, 0.0023837052f,
+ 0.0000000149f},
+ {0.0000000075f, 0.0014596879f, 0.0025926158f, 0.0046001561f, 0.0081458427f, 0.0143647566f,
+ 0.0201114081f, 0.0280098990f, 0.0386673771f, 0.0525827818f, 0.0697054788f, 0.0822848827f,
+ 0.0947335958f, 0.1055838838f, 0.1130971909f, 0.1157975346f, 0.1130971909f, 0.1055838838f,
+ 0.0947336033f, 0.0822848976f, 0.0697054863f, 0.0525827743f, 0.0386673771f, 0.0280098990f,
+ 0.0201114118f, 0.0143647566f, 0.0081458464f, 0.0046001561f, 0.0025926158f, 0.0014596879f,
+ 0.0000000075f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000149f, -0.0023475029f, -0.0041818954f, -0.0074593760f, -0.0133338906f,
+ -0.0239118375f, -0.0340123996f, -0.0484390557f, -0.0689862818f, -0.0979072601f,
+ -0.1372926533f, -0.1694079638f, -0.2086421251f, -0.2509776056f, -0.2844191492f,
+ -0.2973977327f, -0.2844191790f, -0.2509775758f, -0.2086421549f, -0.1694079638f,
+ -0.1372926831f, -0.0979072601f, -0.0689862967f, -0.0484390482f, -0.0340124033f,
+ -0.0239118375f, -0.0133338906f, -0.0074593797f, -0.0041818954f, -0.0023475029f,
+ -0.0000000149f},
+ {-0.0000000224f, -0.0039520524f, -0.0070491731f, -0.0126024783f, -0.0226208754f,
+ -0.0408787429f, -0.0585894138f, -0.0843905732f, -0.1222686917f, -0.1781808734f,
+ -0.2806743383f, -0.3863531053f, -0.5320819616f, -0.7150993347f, -0.8931089044f,
+ -0.9723873734f, -0.8931091428f, -0.7150992155f, -0.5320819616f, -0.3863530755f,
+ -0.2806743681f, -0.1781808734f, -0.1222686768f, -0.0843905732f, -0.0585894212f,
+ -0.0408787429f, -0.0226208791f, -0.0126024783f, -0.0070491731f, -0.0039520524f,
+ -0.0000000224f}},
{
- {0.0000000112f, 0.0021408275f, 0.0037915856f, 0.0066939741f,
- 0.0117513053f, 0.0204205140f, 0.0282191299f, 0.0386330411f,
- 0.0521795005f, 0.0691007078f, 0.0889061689f, 0.1028472483f,
- 0.1162044853f, 0.1275303066f, 0.1352164894f, 0.1379496753f,
- 0.1352164894f, 0.1275303066f, 0.1162045002f, 0.1028472483f,
- 0.0889061838f, 0.0691007078f, 0.0521795005f, 0.0386330374f,
- 0.0282191336f, 0.0204205140f, 0.0117513090f, 0.0066939741f,
- 0.0037915856f, 0.0021408275f, 0.0000000112f},
- {0.0000000112f, 0.0020066053f, 0.0035547465f, 0.0062785484f,
- 0.0110301524f, 0.0191908441f, 0.0265479870f, 0.0363945179f,
- 0.0492380373f, 0.0653315485f, 0.0842306241f, 0.0975688770f,
- 0.1103724316f, 0.1212451532f, 0.1286316216f, 0.1312596500f,
- 0.1286316216f, 0.1212451532f, 0.1103724390f, 0.0975688845f,
- 0.0842306241f, 0.0653315485f, 0.0492380373f, 0.0363945141f,
- 0.0265479907f, 0.0191908441f, 0.0110301562f, 0.0062785484f,
- 0.0035547465f, 0.0020066053f, 0.0000000112f},
- {0.0000000112f, 0.0018022917f, 0.0031940117f, 0.0056451149f,
- 0.0099285431f, 0.0173068047f, 0.0239810050f, 0.0329449996f,
- 0.0446879491f, 0.0594761632f, 0.0769355893f, 0.0893112868f,
- 0.1012277603f, 0.1113727987f, 0.1182771921f, 0.1207359582f,
- 0.1182772070f, 0.1113727987f, 0.1012277603f, 0.0893112868f,
- 0.0769355893f, 0.0594761632f, 0.0446879491f, 0.0329449959f,
- 0.0239810087f, 0.0173068047f, 0.0099285431f, 0.0056451149f,
- 0.0031940117f, 0.0018022917f, 0.0000000112f},
- {0.0000000075f, 0.0012891144f, 0.0022867322f, 0.0040483177f,
- 0.0071406178f, 0.0125075765f, 0.0174052790f, 0.0240450874f,
- 0.0328458026f, 0.0440842360f, 0.0575582422f, 0.0672323704f,
- 0.0766361356f, 0.0847054869f, 0.0902284831f, 0.0922011435f,
- 0.0902284831f, 0.0847054794f, 0.0766361356f, 0.0672323704f,
- 0.0575582422f, 0.0440842398f, 0.0328458063f, 0.0240450874f,
- 0.0174052827f, 0.0125075765f, 0.0071406178f, 0.0040483177f,
- 0.0022867322f, 0.0012891144f, 0.0000000075f},
- {0.0000000037f, 0.0007896237f, 0.0014020018f, 0.0024860986f,
- 0.0043976195f, 0.0077406205f, 0.0108190365f, 0.0150338374f,
- 0.0206919834f, 0.0280320831f, 0.0369941816f, 0.0435322635f,
- 0.0499662943f, 0.0555463880f, 0.0593958236f, 0.0607765317f,
- 0.0593958311f, 0.0555463880f, 0.0499663018f, 0.0435322635f,
- 0.0369941816f, 0.0280320793f, 0.0206919834f, 0.0150338374f,
- 0.0108190365f, 0.0077406205f, 0.0043976195f, 0.0024860986f,
- 0.0014020018f, 0.0007896237f, 0.0000000037f},
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {-0.0000000075f, -0.0012713782f, -0.0022661425f, -0.0040463172f,
- -0.0072463304f, -0.0130392574f, -0.0186092220f, -0.0266334265f,
- -0.0382109173f, -0.0548328906f, -0.0785857737f, -0.1031111181f,
- -0.1333933324f, -0.1665901542f, -0.1946617961f, -0.2060326487f,
- -0.1946618110f, -0.1665901244f, -0.1333933473f, -0.1031111181f,
- -0.0785857663f, -0.0548328944f, -0.0382109173f, -0.0266334228f,
- -0.0186092220f, -0.0130392574f, -0.0072463304f, -0.0040463172f,
- -0.0022661425f, -0.0012713782f, -0.0000000075f},
- {-0.0000000112f, -0.0021414421f, -0.0038233139f, -0.0068472512f,
- -0.0123300999f, -0.0224180073f, -0.0323300436f, -0.0470142849f,
- -0.0691649169f, -0.1103344113f, -0.1914317608f, -0.2921350002f,
- -0.4732148349f, -0.8167076707f, -1.4096118212f, -1.8493247032f,
- -1.4096126556f, -0.8167075515f, -0.4732148647f, -0.2921350002f,
- -0.1914317757f, -0.1103344113f, -0.0691649020f, -0.0470142812f,
- -0.0323300473f, -0.0224180073f, -0.0123301037f, -0.0068472549f,
- -0.0038233139f, -0.0021414421f, -0.0000000112f}}};
+ {0.0000000112f, 0.0021408275f, 0.0037915856f, 0.0066939741f, 0.0117513053f, 0.0204205140f,
+ 0.0282191299f, 0.0386330411f, 0.0521795005f, 0.0691007078f, 0.0889061689f, 0.1028472483f,
+ 0.1162044853f, 0.1275303066f, 0.1352164894f, 0.1379496753f, 0.1352164894f, 0.1275303066f,
+ 0.1162045002f, 0.1028472483f, 0.0889061838f, 0.0691007078f, 0.0521795005f, 0.0386330374f,
+ 0.0282191336f, 0.0204205140f, 0.0117513090f, 0.0066939741f, 0.0037915856f, 0.0021408275f,
+ 0.0000000112f},
+ {0.0000000112f, 0.0020066053f, 0.0035547465f, 0.0062785484f, 0.0110301524f, 0.0191908441f,
+ 0.0265479870f, 0.0363945179f, 0.0492380373f, 0.0653315485f, 0.0842306241f, 0.0975688770f,
+ 0.1103724316f, 0.1212451532f, 0.1286316216f, 0.1312596500f, 0.1286316216f, 0.1212451532f,
+ 0.1103724390f, 0.0975688845f, 0.0842306241f, 0.0653315485f, 0.0492380373f, 0.0363945141f,
+ 0.0265479907f, 0.0191908441f, 0.0110301562f, 0.0062785484f, 0.0035547465f, 0.0020066053f,
+ 0.0000000112f},
+ {0.0000000112f, 0.0018022917f, 0.0031940117f, 0.0056451149f, 0.0099285431f, 0.0173068047f,
+ 0.0239810050f, 0.0329449996f, 0.0446879491f, 0.0594761632f, 0.0769355893f, 0.0893112868f,
+ 0.1012277603f, 0.1113727987f, 0.1182771921f, 0.1207359582f, 0.1182772070f, 0.1113727987f,
+ 0.1012277603f, 0.0893112868f, 0.0769355893f, 0.0594761632f, 0.0446879491f, 0.0329449959f,
+ 0.0239810087f, 0.0173068047f, 0.0099285431f, 0.0056451149f, 0.0031940117f, 0.0018022917f,
+ 0.0000000112f},
+ {0.0000000075f, 0.0012891144f, 0.0022867322f, 0.0040483177f, 0.0071406178f, 0.0125075765f,
+ 0.0174052790f, 0.0240450874f, 0.0328458026f, 0.0440842360f, 0.0575582422f, 0.0672323704f,
+ 0.0766361356f, 0.0847054869f, 0.0902284831f, 0.0922011435f, 0.0902284831f, 0.0847054794f,
+ 0.0766361356f, 0.0672323704f, 0.0575582422f, 0.0440842398f, 0.0328458063f, 0.0240450874f,
+ 0.0174052827f, 0.0125075765f, 0.0071406178f, 0.0040483177f, 0.0022867322f, 0.0012891144f,
+ 0.0000000075f},
+ {0.0000000037f, 0.0007896237f, 0.0014020018f, 0.0024860986f, 0.0043976195f, 0.0077406205f,
+ 0.0108190365f, 0.0150338374f, 0.0206919834f, 0.0280320831f, 0.0369941816f, 0.0435322635f,
+ 0.0499662943f, 0.0555463880f, 0.0593958236f, 0.0607765317f, 0.0593958311f, 0.0555463880f,
+ 0.0499663018f, 0.0435322635f, 0.0369941816f, 0.0280320793f, 0.0206919834f, 0.0150338374f,
+ 0.0108190365f, 0.0077406205f, 0.0043976195f, 0.0024860986f, 0.0014020018f, 0.0007896237f,
+ 0.0000000037f},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {-0.0000000075f, -0.0012713782f, -0.0022661425f, -0.0040463172f, -0.0072463304f,
+ -0.0130392574f, -0.0186092220f, -0.0266334265f, -0.0382109173f, -0.0548328906f,
+ -0.0785857737f, -0.1031111181f, -0.1333933324f, -0.1665901542f, -0.1946617961f,
+ -0.2060326487f, -0.1946618110f, -0.1665901244f, -0.1333933473f, -0.1031111181f,
+ -0.0785857663f, -0.0548328944f, -0.0382109173f, -0.0266334228f, -0.0186092220f,
+ -0.0130392574f, -0.0072463304f, -0.0040463172f, -0.0022661425f, -0.0012713782f,
+ -0.0000000075f},
+ {-0.0000000112f, -0.0021414421f, -0.0038233139f, -0.0068472512f, -0.0123300999f,
+ -0.0224180073f, -0.0323300436f, -0.0470142849f, -0.0691649169f, -0.1103344113f,
+ -0.1914317608f, -0.2921350002f, -0.4732148349f, -0.8167076707f, -1.4096118212f,
+ -1.8493247032f, -1.4096126556f, -0.8167075515f, -0.4732148647f, -0.2921350002f,
+ -0.1914317757f, -0.1103344113f, -0.0691649020f, -0.0470142812f, -0.0323300473f,
+ -0.0224180073f, -0.0123301037f, -0.0068472549f, -0.0038233139f, -0.0021414421f,
+ -0.0000000112f}}};
const FLOAT32 ixheaacd_re_weight[16][8][31] = {
{
- {0.5000000000f, 0.4971804619f, 0.4949752390f, 0.4910309315f,
- 0.4839466512f, 0.4711385369f, 0.4588382840f, 0.4411309958f,
- 0.4155683815f, 0.3786902130f, 0.3259756267f, 0.2796038389f,
- 0.2229698598f, 0.1560545117f, 0.0805236399f, 0.0000000000f,
- -0.0805236399f, -0.1560545266f, -0.2229698896f, -0.2796038687f,
- -0.3259756267f, -0.3786902130f, -0.4155683815f, -0.4411309958f,
- -0.4588383138f, -0.4711385369f, -0.4839466512f, -0.4910309613f,
- -0.4949752688f, -0.4971804321f, -0.5000000000f},
- {0.5000000000f, 0.4973547161f, 0.4952812195f, 0.4915628731f,
- 0.4848551154f, 0.4726418555f, 0.4608217478f, 0.4436736703f,
- 0.4186950922f, 0.3823071420f, 0.3297900558f, 0.2832620144f,
- 0.2261611372f, 0.1584401429f, 0.0818051845f, 0.0000000000f,
- -0.0818051845f, -0.1584401578f, -0.2261611372f, -0.2832620144f,
- -0.3297900856f, -0.3823071420f, -0.4186950922f, -0.4436736703f,
- -0.4608217478f, -0.4726418853f, -0.4848551452f, -0.4915628731f,
- -0.4952812195f, -0.4973546565f, -0.5000000000f},
- {0.5000000000f, 0.4976201355f, 0.4957476556f, 0.4923752248f,
- 0.4862467945f, 0.4749561548f, 0.4638883471f, 0.4476265609f,
- 0.4235888422f, 0.3880125880f, 0.3358573616f, 0.2891118824f,
- 0.2312888801f, 0.1622879505f, 0.0838772804f, 0.0000000000f,
- -0.0838772804f, -0.1622879654f, -0.2312888950f, -0.2891118526f,
- -0.3358573914f, -0.3880126476f, -0.4235888422f, -0.4476265907f,
- -0.4638883471f, -0.4749561548f, -0.4862467945f, -0.4923752248f,
- -0.4957476854f, -0.4976201057f, -0.5000000000f},
- {0.5000000000f, 0.4982874393f, 0.4969230890f, 0.4944299161f,
- 0.4897895753f, 0.4809119105f, 0.4718552828f, 0.4580222666f,
- 0.4366562366f, 0.4035232663f, 0.3526770473f, 0.3055384457f,
- 0.2458558977f, 0.1733215600f, 0.0898552686f, 0.0000000000f,
- -0.0898552686f, -0.1733215749f, -0.2458558679f, -0.3055384457f,
- -0.3526770473f, -0.4035232663f, -0.4366561770f, -0.4580222666f,
- -0.4718553126f, -0.4809119105f, -0.4897895753f, -0.4944299459f,
- -0.4969231188f, -0.4982874393f, -0.5000000000f},
- {0.5000000000f, 0.4989379942f, 0.4980724454f, 0.4964498281f,
- 0.4933045506f, 0.4869143069f, 0.4799970984f, 0.4688419700f,
- 0.4505754411f, 0.4205142260f, 0.3716892004f, 0.3245028853f,
- 0.2630047202f, 0.1865197271f, 0.0970816985f, 0.0000000000f,
- -0.0970816985f, -0.1865197271f, -0.2630047202f, -0.3245028257f,
- -0.3716892302f, -0.4205142260f, -0.4505754411f, -0.4688419998f,
- -0.4799970984f, -0.4869143367f, -0.4933045506f, -0.4964498281f,
- -0.4980724454f, -0.4989379644f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000596f, 0.5016326308f, 0.5028703809f, 0.5049995780f,
- 0.5085534453f, 0.5141122937f, 0.5184206367f, 0.5228864551f,
- 0.5257800817f, 0.5226357579f, 0.5154753923f, 0.5085130334f,
- 0.4721691608f, 0.3829773664f, 0.2211726457f, 0.0000000000f,
- -0.2211726457f, -0.3829773664f, -0.4721692204f, -0.5085130334f,
- -0.5154754519f, -0.5226357579f, -0.5257800817f, -0.5228864551f,
- -0.5184206963f, -0.5141122937f, -0.5085535049f, -0.5049996376f,
- -0.5028703809f, -0.5016326308f, -0.5000000596f},
- {0.5000000596f, 0.5027751923f, 0.5049232244f, 0.5087171793f,
- 0.5153799057f, 0.5269514322f, 0.5375180840f, 0.5518481731f,
- 0.5710597038f, 0.6521918178f, 0.7913578749f, 0.9470402002f,
- 1.2054057121f, 1.6852766275f, 2.6426265240f, 0.0000000000f,
- -2.6426310539f, -1.6852763891f, -1.2054058313f, -0.9470402002f,
- -0.7913579345f, -0.6521918178f, -0.5710596442f, -0.5518481135f,
- -0.5375181437f, -0.5269514322f, -0.5153799057f, -0.5087171793f,
- -0.5049232244f, -0.5027751923f, -0.5000000596f}},
+ {0.5000000000f, 0.4971804619f, 0.4949752390f, 0.4910309315f, 0.4839466512f,
+ 0.4711385369f, 0.4588382840f, 0.4411309958f, 0.4155683815f, 0.3786902130f,
+ 0.3259756267f, 0.2796038389f, 0.2229698598f, 0.1560545117f, 0.0805236399f,
+ 0.0000000000f, -0.0805236399f, -0.1560545266f, -0.2229698896f, -0.2796038687f,
+ -0.3259756267f, -0.3786902130f, -0.4155683815f, -0.4411309958f, -0.4588383138f,
+ -0.4711385369f, -0.4839466512f, -0.4910309613f, -0.4949752688f, -0.4971804321f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4973547161f, 0.4952812195f, 0.4915628731f, 0.4848551154f,
+ 0.4726418555f, 0.4608217478f, 0.4436736703f, 0.4186950922f, 0.3823071420f,
+ 0.3297900558f, 0.2832620144f, 0.2261611372f, 0.1584401429f, 0.0818051845f,
+ 0.0000000000f, -0.0818051845f, -0.1584401578f, -0.2261611372f, -0.2832620144f,
+ -0.3297900856f, -0.3823071420f, -0.4186950922f, -0.4436736703f, -0.4608217478f,
+ -0.4726418853f, -0.4848551452f, -0.4915628731f, -0.4952812195f, -0.4973546565f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4976201355f, 0.4957476556f, 0.4923752248f, 0.4862467945f,
+ 0.4749561548f, 0.4638883471f, 0.4476265609f, 0.4235888422f, 0.3880125880f,
+ 0.3358573616f, 0.2891118824f, 0.2312888801f, 0.1622879505f, 0.0838772804f,
+ 0.0000000000f, -0.0838772804f, -0.1622879654f, -0.2312888950f, -0.2891118526f,
+ -0.3358573914f, -0.3880126476f, -0.4235888422f, -0.4476265907f, -0.4638883471f,
+ -0.4749561548f, -0.4862467945f, -0.4923752248f, -0.4957476854f, -0.4976201057f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4982874393f, 0.4969230890f, 0.4944299161f, 0.4897895753f,
+ 0.4809119105f, 0.4718552828f, 0.4580222666f, 0.4366562366f, 0.4035232663f,
+ 0.3526770473f, 0.3055384457f, 0.2458558977f, 0.1733215600f, 0.0898552686f,
+ 0.0000000000f, -0.0898552686f, -0.1733215749f, -0.2458558679f, -0.3055384457f,
+ -0.3526770473f, -0.4035232663f, -0.4366561770f, -0.4580222666f, -0.4718553126f,
+ -0.4809119105f, -0.4897895753f, -0.4944299459f, -0.4969231188f, -0.4982874393f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4989379942f, 0.4980724454f, 0.4964498281f, 0.4933045506f,
+ 0.4869143069f, 0.4799970984f, 0.4688419700f, 0.4505754411f, 0.4205142260f,
+ 0.3716892004f, 0.3245028853f, 0.2630047202f, 0.1865197271f, 0.0970816985f,
+ 0.0000000000f, -0.0970816985f, -0.1865197271f, -0.2630047202f, -0.3245028257f,
+ -0.3716892302f, -0.4205142260f, -0.4505754411f, -0.4688419998f, -0.4799970984f,
+ -0.4869143367f, -0.4933045506f, -0.4964498281f, -0.4980724454f, -0.4989379644f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000596f, 0.5016326308f, 0.5028703809f, 0.5049995780f, 0.5085534453f,
+ 0.5141122937f, 0.5184206367f, 0.5228864551f, 0.5257800817f, 0.5226357579f,
+ 0.5154753923f, 0.5085130334f, 0.4721691608f, 0.3829773664f, 0.2211726457f,
+ 0.0000000000f, -0.2211726457f, -0.3829773664f, -0.4721692204f, -0.5085130334f,
+ -0.5154754519f, -0.5226357579f, -0.5257800817f, -0.5228864551f, -0.5184206963f,
+ -0.5141122937f, -0.5085535049f, -0.5049996376f, -0.5028703809f, -0.5016326308f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5027751923f, 0.5049232244f, 0.5087171793f, 0.5153799057f,
+ 0.5269514322f, 0.5375180840f, 0.5518481731f, 0.5710597038f, 0.6521918178f,
+ 0.7913578749f, 0.9470402002f, 1.2054057121f, 1.6852766275f, 2.6426265240f,
+ 0.0000000000f, -2.6426310539f, -1.6852763891f, -1.2054058313f, -0.9470402002f,
+ -0.7913579345f, -0.6521918178f, -0.5710596442f, -0.5518481135f, -0.5375181437f,
+ -0.5269514322f, -0.5153799057f, -0.5087171793f, -0.5049232244f, -0.5027751923f,
+ -0.5000000596f}},
{
- {0.5000000000f, 0.4973910451f, 0.4953450263f, 0.4916738272f,
- 0.4850449860f, 0.4729567766f, 0.4612380564f, 0.4442087412f,
- 0.4193551540f, 0.3830735385f, 0.3306015134f, 0.2840420902f,
- 0.2268431634f, 0.1589508802f, 0.0820798650f, 0.0000000000f,
- -0.0820798576f, -0.1589508951f, -0.2268431783f, -0.2840420902f,
- -0.3306015134f, -0.3830735683f, -0.4193551242f, -0.4442086816f,
- -0.4612380862f, -0.4729567766f, -0.4850450158f, -0.4916738570f,
- -0.4953449965f, -0.4973909855f, -0.5000000000f},
- {0.5000000000f, 0.4975522459f, 0.4956282973f, 0.4921671450f,
- 0.4858898818f, 0.4743613005f, 0.4630986154f, 0.4466060102f,
- 0.4223214984f, 0.3865298629f, 0.3342745602f, 0.2875820398f,
- 0.2299449295f, 0.1612776965f, 0.0833326429f, 0.0000000000f,
- -0.0833326355f, -0.1612777114f, -0.2299449295f, -0.2875820100f,
- -0.3342745602f, -0.3865298331f, -0.4223214984f, -0.4466060400f,
- -0.4630986452f, -0.4743613005f, -0.4858898818f, -0.4921671748f,
- -0.4956283271f, -0.4975521863f, -0.5000000000f},
- {0.5000000000f, 0.4977977276f, 0.4960601032f, 0.4929202795f,
- 0.4871834517f, 0.4765217602f, 0.4659720957f, 0.4503277540f,
- 0.4269563556f, 0.3919708133f, 0.3401035368f, 0.2932292819f,
- 0.2349164933f, 0.1650211811f, 0.0853530467f, 0.0000000000f,
- -0.0853530392f, -0.1650211811f, -0.2349164784f, -0.2932292819f,
- -0.3401035368f, -0.3919707835f, -0.4269563556f, -0.4503277540f,
- -0.4659721255f, -0.4765217602f, -0.4871834517f, -0.4929203391f,
- -0.4960601330f, -0.4977976680f, -0.5000000000f},
- {0.5000000000f, 0.4984147847f, 0.4971478283f, 0.4948240519f,
- 0.4904728234f, 0.4820713699f, 0.4734190702f, 0.4600848258f,
- 0.4392839074f, 0.4066926241f, 0.3561752141f, 0.3089951873f,
- 0.2489543557f, 0.1756889224f, 0.0911452249f, 0.0000000000f,
- -0.0911452249f, -0.1756889224f, -0.2489543557f, -0.3089951873f,
- -0.3561752439f, -0.4066926539f, -0.4392838776f, -0.4600848556f,
- -0.4734191597f, -0.4820713401f, -0.4904728830f, -0.4948240817f,
- -0.4971478581f, -0.4984148145f, -0.5000000000f},
- {0.5000000000f, 0.4990161359f, 0.4982108474f, 0.4966937900f,
- 0.4937312901f, 0.4876496494f, 0.4810023904f, 0.4701921344f,
- 0.4523362219f, 0.4227000475f, 0.3741825819f, 0.3270231485f,
- 0.2653121948f, 0.1883139759f, 0.0980708972f, 0.0000000000f,
- -0.0980708972f, -0.1883139908f, -0.2653121948f, -0.3270231485f,
- -0.3741825819f, -0.4227000475f, -0.4523362219f, -0.4701920748f,
- -0.4810024500f, -0.4876496494f, -0.4937313497f, -0.4966937602f,
- -0.4982108474f, -0.4990161359f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000596f, 0.5015053153f, 0.5026424527f, 0.5045889616f,
- 0.5078070164f, 0.5127342939f, 0.5164096355f, 0.5199240446f,
- 0.5213798285f, 0.5160900950f, 0.4961368442f, 0.4834818840f,
- 0.4421011508f, 0.3525197506f, 0.2006191462f, 0.0000000000f,
- -0.2006191611f, -0.3525197506f, -0.4421012104f, -0.4834818840f,
- -0.4961368442f, -0.5160900354f, -0.5213798285f, -0.5199240446f,
- -0.5164096951f, -0.5127342939f, -0.5078070164f, -0.5045889020f,
- -0.5026424527f, -0.5015053153f, -0.5000000596f},
- {0.5000000596f, 0.5025598407f, 0.5045354366f, 0.5080122352f,
- 0.5140760541f, 0.5244651437f, 0.5337679982f, 0.5460379124f,
- 0.5614778399f, 0.6178392172f, 0.7190375924f, 0.8149638772f,
- 0.9330949783f, 1.0282076597f, 0.8643130064f, 0.0000000000f,
- -0.8643135428f, -1.0282076597f, -0.9330950975f, -0.8149638772f,
- -0.7190377116f, -0.6178392172f, -0.5614778399f, -0.5460379124f,
- -0.5337680578f, -0.5244650841f, -0.5140760541f, -0.5080122352f,
- -0.5045354962f, -0.5025598407f, -0.5000000596f}},
+ {0.5000000000f, 0.4973910451f, 0.4953450263f, 0.4916738272f, 0.4850449860f,
+ 0.4729567766f, 0.4612380564f, 0.4442087412f, 0.4193551540f, 0.3830735385f,
+ 0.3306015134f, 0.2840420902f, 0.2268431634f, 0.1589508802f, 0.0820798650f,
+ 0.0000000000f, -0.0820798576f, -0.1589508951f, -0.2268431783f, -0.2840420902f,
+ -0.3306015134f, -0.3830735683f, -0.4193551242f, -0.4442086816f, -0.4612380862f,
+ -0.4729567766f, -0.4850450158f, -0.4916738570f, -0.4953449965f, -0.4973909855f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4975522459f, 0.4956282973f, 0.4921671450f, 0.4858898818f,
+ 0.4743613005f, 0.4630986154f, 0.4466060102f, 0.4223214984f, 0.3865298629f,
+ 0.3342745602f, 0.2875820398f, 0.2299449295f, 0.1612776965f, 0.0833326429f,
+ 0.0000000000f, -0.0833326355f, -0.1612777114f, -0.2299449295f, -0.2875820100f,
+ -0.3342745602f, -0.3865298331f, -0.4223214984f, -0.4466060400f, -0.4630986452f,
+ -0.4743613005f, -0.4858898818f, -0.4921671748f, -0.4956283271f, -0.4975521863f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4977977276f, 0.4960601032f, 0.4929202795f, 0.4871834517f,
+ 0.4765217602f, 0.4659720957f, 0.4503277540f, 0.4269563556f, 0.3919708133f,
+ 0.3401035368f, 0.2932292819f, 0.2349164933f, 0.1650211811f, 0.0853530467f,
+ 0.0000000000f, -0.0853530392f, -0.1650211811f, -0.2349164784f, -0.2932292819f,
+ -0.3401035368f, -0.3919707835f, -0.4269563556f, -0.4503277540f, -0.4659721255f,
+ -0.4765217602f, -0.4871834517f, -0.4929203391f, -0.4960601330f, -0.4977976680f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4984147847f, 0.4971478283f, 0.4948240519f, 0.4904728234f,
+ 0.4820713699f, 0.4734190702f, 0.4600848258f, 0.4392839074f, 0.4066926241f,
+ 0.3561752141f, 0.3089951873f, 0.2489543557f, 0.1756889224f, 0.0911452249f,
+ 0.0000000000f, -0.0911452249f, -0.1756889224f, -0.2489543557f, -0.3089951873f,
+ -0.3561752439f, -0.4066926539f, -0.4392838776f, -0.4600848556f, -0.4734191597f,
+ -0.4820713401f, -0.4904728830f, -0.4948240817f, -0.4971478581f, -0.4984148145f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4990161359f, 0.4982108474f, 0.4966937900f, 0.4937312901f,
+ 0.4876496494f, 0.4810023904f, 0.4701921344f, 0.4523362219f, 0.4227000475f,
+ 0.3741825819f, 0.3270231485f, 0.2653121948f, 0.1883139759f, 0.0980708972f,
+ 0.0000000000f, -0.0980708972f, -0.1883139908f, -0.2653121948f, -0.3270231485f,
+ -0.3741825819f, -0.4227000475f, -0.4523362219f, -0.4701920748f, -0.4810024500f,
+ -0.4876496494f, -0.4937313497f, -0.4966937602f, -0.4982108474f, -0.4990161359f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000596f, 0.5015053153f, 0.5026424527f, 0.5045889616f, 0.5078070164f,
+ 0.5127342939f, 0.5164096355f, 0.5199240446f, 0.5213798285f, 0.5160900950f,
+ 0.4961368442f, 0.4834818840f, 0.4421011508f, 0.3525197506f, 0.2006191462f,
+ 0.0000000000f, -0.2006191611f, -0.3525197506f, -0.4421012104f, -0.4834818840f,
+ -0.4961368442f, -0.5160900354f, -0.5213798285f, -0.5199240446f, -0.5164096951f,
+ -0.5127342939f, -0.5078070164f, -0.5045889020f, -0.5026424527f, -0.5015053153f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5025598407f, 0.5045354366f, 0.5080122352f, 0.5140760541f,
+ 0.5244651437f, 0.5337679982f, 0.5460379124f, 0.5614778399f, 0.6178392172f,
+ 0.7190375924f, 0.8149638772f, 0.9330949783f, 1.0282076597f, 0.8643130064f,
+ 0.0000000000f, -0.8643135428f, -1.0282076597f, -0.9330950975f, -0.8149638772f,
+ -0.7190377116f, -0.6178392172f, -0.5614778399f, -0.5460379124f, -0.5337680578f,
+ -0.5244650841f, -0.5140760541f, -0.5080122352f, -0.5045354962f, -0.5025598407f,
+ -0.5000000596f}},
{
- {0.5000000000f, 0.4979922175f, 0.4964025617f, 0.4935186803f,
- 0.4882142544f, 0.4782521725f, 0.4682838917f, 0.4533392787f,
- 0.4307335615f, 0.3964424431f, 0.3449379802f, 0.2979410589f,
- 0.2390869260f, 0.1681751311f, 0.0870600939f, 0.0000000000f,
- -0.0870600939f, -0.1681751609f, -0.2390869260f, -0.2979410589f,
- -0.3449379802f, -0.3964424133f, -0.4307335615f, -0.4533392191f,
- -0.4682839215f, -0.4782522023f, -0.4882142544f, -0.4935186505f,
- -0.4964025617f, -0.4979921579f, -0.5000000000f},
- {0.5000000000f, 0.4981160462f, 0.4966207743f, 0.4939002991f,
- 0.4888732731f, 0.4793626070f, 0.4697723091f, 0.4552863240f,
- 0.4331887662f, 0.3993673325f, 0.3481221497f, 0.3010586798f,
- 0.2418578863f, 0.1702777445f, 0.0882006139f, 0.0000000000f,
- -0.0882006139f, -0.1702777445f, -0.2418578863f, -0.3010587096f,
- -0.3481221497f, -0.3993673027f, -0.4331887662f, -0.4552863240f,
- -0.4697723091f, -0.4793626070f, -0.4888732731f, -0.4939003289f,
- -0.4966207743f, -0.4981160164f, -0.5000000000f},
- {0.5000000000f, 0.4983044863f, 0.4969531596f, 0.4944825768f,
- 0.4898807108f, 0.4810664356f, 0.4720634520f, 0.4582964182f,
- 0.4370048046f, 0.4039427042f, 0.3531388044f, 0.3059939146f,
- 0.2462634444f, 0.1736325473f, 0.0900245756f, 0.0000000000f,
- -0.0900245681f, -0.1736325473f, -0.2462634742f, -0.3059939146f,
- -0.3531388342f, -0.4039427042f, -0.4370048046f, -0.4582964182f,
- -0.4720634818f, -0.4810664058f, -0.4898807704f, -0.4944825768f,
- -0.4969531298f, -0.4983044863f, -0.5000000000f},
- {0.5000000000f, 0.4987780154f, 0.4977895021f, 0.4959515929f,
- 0.4924345016f, 0.4854198098f, 0.4779591858f, 0.4661146402f,
- 0.4470350742f, 0.4161445498f, 0.3667378426f, 0.3195213675f,
- 0.2584639788f, 0.1830018759f, 0.0951471180f, 0.0000000000f,
- -0.0951471031f, -0.1830018908f, -0.2584639490f, -0.3195213974f,
- -0.3667378426f, -0.4161445200f, -0.4470350742f, -0.4661146402f,
- -0.4779591858f, -0.4854198396f, -0.4924345613f, -0.4959515929f,
- -0.4977895021f, -0.4987780452f, -0.5000000000f},
- {0.5000000000f, 0.4992391467f, 0.4986056089f, 0.4973905385f,
- 0.4949527979f, 0.4897618592f, 0.4839001894f, 0.4741017818f,
- 0.4574657679f, 0.4291163385f, 0.3815677166f, 0.3345352709f,
- 0.2722316980f, 0.1937220246f, 0.1010626405f, 0.0000000000f,
- -0.1010626331f, -0.1937220395f, -0.2722316980f, -0.3345352709f,
- -0.3815677166f, -0.4291163385f, -0.4574657679f, -0.4741017818f,
- -0.4839001894f, -0.4897618592f, -0.4949527979f, -0.4973905683f,
- -0.4986056685f, -0.4992391169f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.5011434555f, 0.5019949079f, 0.5034251213f,
- 0.5056989789f, 0.5088702440f, 0.5108083487f, 0.5117562413f,
- 0.5094295144f, 0.4987166524f, 0.4690935910f, 0.4298956990f,
- 0.3742347956f, 0.2874245048f, 0.1586372554f, 0.0000000000f,
- -0.1586372554f, -0.2874245346f, -0.3742347956f, -0.4298956990f,
- -0.4690936506f, -0.4987166524f, -0.5094294548f, -0.5117561817f,
- -0.5108084679f, -0.5088702440f, -0.5056990385f, -0.5034251213f,
- -0.5019949675f, -0.5011434555f, -0.5000000000f},
- {0.5000000596f, 0.5019482374f, 0.5034363270f, 0.5060207844f,
- 0.5104164481f, 0.5175731182f, 0.5235039592f, 0.5304464698f,
- 0.5371760726f, 0.5399831533f, 0.5705516934f, 0.5833024383f,
- 0.5678070188f, 0.4872314930f, 0.2963677347f, 0.0000000000f,
- -0.2963677943f, -0.4872314930f, -0.5678070784f, -0.5833024383f,
- -0.5705517530f, -0.5399830937f, -0.5371760130f, -0.5304464102f,
- -0.5235040188f, -0.5175731182f, -0.5104165077f, -0.5060207844f,
- -0.5034362674f, -0.5019482374f, -0.5000000596f}},
+ {0.5000000000f, 0.4979922175f, 0.4964025617f, 0.4935186803f, 0.4882142544f,
+ 0.4782521725f, 0.4682838917f, 0.4533392787f, 0.4307335615f, 0.3964424431f,
+ 0.3449379802f, 0.2979410589f, 0.2390869260f, 0.1681751311f, 0.0870600939f,
+ 0.0000000000f, -0.0870600939f, -0.1681751609f, -0.2390869260f, -0.2979410589f,
+ -0.3449379802f, -0.3964424133f, -0.4307335615f, -0.4533392191f, -0.4682839215f,
+ -0.4782522023f, -0.4882142544f, -0.4935186505f, -0.4964025617f, -0.4979921579f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4981160462f, 0.4966207743f, 0.4939002991f, 0.4888732731f,
+ 0.4793626070f, 0.4697723091f, 0.4552863240f, 0.4331887662f, 0.3993673325f,
+ 0.3481221497f, 0.3010586798f, 0.2418578863f, 0.1702777445f, 0.0882006139f,
+ 0.0000000000f, -0.0882006139f, -0.1702777445f, -0.2418578863f, -0.3010587096f,
+ -0.3481221497f, -0.3993673027f, -0.4331887662f, -0.4552863240f, -0.4697723091f,
+ -0.4793626070f, -0.4888732731f, -0.4939003289f, -0.4966207743f, -0.4981160164f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4983044863f, 0.4969531596f, 0.4944825768f, 0.4898807108f,
+ 0.4810664356f, 0.4720634520f, 0.4582964182f, 0.4370048046f, 0.4039427042f,
+ 0.3531388044f, 0.3059939146f, 0.2462634444f, 0.1736325473f, 0.0900245756f,
+ 0.0000000000f, -0.0900245681f, -0.1736325473f, -0.2462634742f, -0.3059939146f,
+ -0.3531388342f, -0.4039427042f, -0.4370048046f, -0.4582964182f, -0.4720634818f,
+ -0.4810664058f, -0.4898807704f, -0.4944825768f, -0.4969531298f, -0.4983044863f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4987780154f, 0.4977895021f, 0.4959515929f, 0.4924345016f,
+ 0.4854198098f, 0.4779591858f, 0.4661146402f, 0.4470350742f, 0.4161445498f,
+ 0.3667378426f, 0.3195213675f, 0.2584639788f, 0.1830018759f, 0.0951471180f,
+ 0.0000000000f, -0.0951471031f, -0.1830018908f, -0.2584639490f, -0.3195213974f,
+ -0.3667378426f, -0.4161445200f, -0.4470350742f, -0.4661146402f, -0.4779591858f,
+ -0.4854198396f, -0.4924345613f, -0.4959515929f, -0.4977895021f, -0.4987780452f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4992391467f, 0.4986056089f, 0.4973905385f, 0.4949527979f,
+ 0.4897618592f, 0.4839001894f, 0.4741017818f, 0.4574657679f, 0.4291163385f,
+ 0.3815677166f, 0.3345352709f, 0.2722316980f, 0.1937220246f, 0.1010626405f,
+ 0.0000000000f, -0.1010626331f, -0.1937220395f, -0.2722316980f, -0.3345352709f,
+ -0.3815677166f, -0.4291163385f, -0.4574657679f, -0.4741017818f, -0.4839001894f,
+ -0.4897618592f, -0.4949527979f, -0.4973905683f, -0.4986056685f, -0.4992391169f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5011434555f, 0.5019949079f, 0.5034251213f, 0.5056989789f,
+ 0.5088702440f, 0.5108083487f, 0.5117562413f, 0.5094295144f, 0.4987166524f,
+ 0.4690935910f, 0.4298956990f, 0.3742347956f, 0.2874245048f, 0.1586372554f,
+ 0.0000000000f, -0.1586372554f, -0.2874245346f, -0.3742347956f, -0.4298956990f,
+ -0.4690936506f, -0.4987166524f, -0.5094294548f, -0.5117561817f, -0.5108084679f,
+ -0.5088702440f, -0.5056990385f, -0.5034251213f, -0.5019949675f, -0.5011434555f,
+ -0.5000000000f},
+ {0.5000000596f, 0.5019482374f, 0.5034363270f, 0.5060207844f, 0.5104164481f,
+ 0.5175731182f, 0.5235039592f, 0.5304464698f, 0.5371760726f, 0.5399831533f,
+ 0.5705516934f, 0.5833024383f, 0.5678070188f, 0.4872314930f, 0.2963677347f,
+ 0.0000000000f, -0.2963677943f, -0.4872314930f, -0.5678070784f, -0.5833024383f,
+ -0.5705517530f, -0.5399830937f, -0.5371760130f, -0.5304464102f, -0.5235040188f,
+ -0.5175731182f, -0.5104165077f, -0.5060207844f, -0.5034362674f, -0.5019482374f,
+ -0.5000000596f}},
{
- {0.5000000000f, 0.4988959730f, 0.4979980290f, 0.4963187873f,
- 0.4930755794f, 0.4865204096f, 0.4794592559f, 0.4681210220f,
- 0.4496374130f, 0.4193532467f, 0.3703693151f, 0.3231719732f,
- 0.2617889345f, 0.1855761409f, 0.0965621769f, 0.0000000000f,
- -0.0965621769f, -0.1855761558f, -0.2617889643f, -0.3231719434f,
- -0.3703693151f, -0.4193532169f, -0.4496374130f, -0.4681210220f,
- -0.4794593155f, -0.4865204692f, -0.4930756390f, -0.4963187873f,
- -0.4979980290f, -0.4988959432f, -0.5000000000f},
- {0.5000000000f, 0.4989632964f, 0.4981172681f, 0.4965288043f,
- 0.4934426546f, 0.4871520996f, 0.4803220332f, 0.4692780674f,
- 0.4511435628f, 0.4212186337f, 0.3724914491f, 0.3253129125f,
- 0.2637456059f, 0.1870953441f, 0.0973988697f, 0.0000000000f,
- -0.0973988622f, -0.1870953441f, -0.2637456357f, -0.3253129125f,
- -0.3724914491f, -0.4212185740f, -0.4511435628f, -0.4692780375f,
- -0.4803220928f, -0.4871521592f, -0.4934426844f, -0.4965288043f,
- -0.4981172979f, -0.4989632666f, -0.5000000000f},
- {0.5000000000f, 0.4990658462f, 0.4982986450f, 0.4968487024f,
- 0.4940025806f, 0.4881176353f, 0.4816432893f, 0.4710545242f,
- 0.4534637034f, 0.4241041243f, 0.3757902384f, 0.3286524117f,
- 0.2668075860f, 0.1894792169f, 0.0987142026f, 0.0000000000f,
- -0.0987141877f, -0.1894792318f, -0.2668076158f, -0.3286524117f,
- -0.3757902086f, -0.4241041243f, -0.4534636736f, -0.4710544348f,
- -0.4816432893f, -0.4881176651f, -0.4940025806f, -0.4968487322f,
- -0.4982987046f, -0.4990658164f, -0.5000000000f},
- {0.5000000000f, 0.4993230999f, 0.4987545311f, 0.4976536036f,
- 0.4954148531f, 0.4905641079f, 0.4850046337f, 0.4755989015f,
- 0.4594423771f, 0.4316084087f, 0.3844630718f, 0.3375001550f,
- 0.2749801576f, 0.1958818436f, 0.1022618562f, 0.0000000000f,
- -0.1022618562f, -0.1958818585f, -0.2749801576f, -0.3375001550f,
- -0.3844630718f, -0.4316083491f, -0.4594423175f, -0.4755989015f,
- -0.4850046337f, -0.4905640781f, -0.4954148829f, -0.4976535738f,
- -0.4987545311f, -0.4993230700f, -0.5000000000f},
- {0.5000000000f, 0.4995733500f, 0.4991982579f, 0.4984387755f,
- 0.4967978001f, 0.4929749966f, 0.4883366227f, 0.4801396132f,
- 0.4654795825f, 0.4392894208f, 0.3934856355f, 0.3468125761f,
- 0.2836796939f, 0.2027634680f, 0.1061001420f, 0.0000000000f,
- -0.1061001420f, -0.2027634680f, -0.2836797237f, -0.3468125761f,
- -0.3934856355f, -0.4392894208f, -0.4654795825f, -0.4801395833f,
- -0.4883366823f, -0.4929749668f, -0.4967978299f, -0.4984387755f,
- -0.4991982877f, -0.4995733202f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.5006032586f, 0.5010305047f, 0.5016981363f,
- 0.5025926232f, 0.5032470226f, 0.5027559996f, 0.5002208352f,
- 0.4929866195f, 0.4757096469f, 0.4384897351f, 0.3950820863f,
- 0.3305715621f, 0.2411795557f, 0.1280656606f, 0.0000000000f,
- -0.1280656606f, -0.2411795706f, -0.3305716217f, -0.3950820863f,
- -0.4384897351f, -0.4757096469f, -0.4929866195f, -0.5002207756f,
- -0.5027559996f, -0.5032470226f, -0.5025926232f, -0.5016981959f,
- -0.5010305047f, -0.5006032586f, -0.5000000000f},
- {0.5000000000f, 0.5010370016f, 0.5018045902f, 0.5030835867f,
- 0.5050826669f, 0.5077480078f, 0.5091921091f, 0.5094215274f,
- 0.5060614347f, 0.4939221144f, 0.4625603855f, 0.4223127365f,
- 0.3585619032f, 0.2725897431f, 0.1494219303f, 0.0000000000f,
- -0.1494219303f, -0.2725897431f, -0.3585619330f, -0.4223127365f,
- -0.4625604451f, -0.4939220548f, -0.5060613751f, -0.5094215274f,
- -0.5091921091f, -0.5077479482f, -0.5050827861f, -0.5030835867f,
- -0.5018045902f, -0.5010369420f, -0.5000000000f}},
+ {0.5000000000f, 0.4988959730f, 0.4979980290f, 0.4963187873f, 0.4930755794f,
+ 0.4865204096f, 0.4794592559f, 0.4681210220f, 0.4496374130f, 0.4193532467f,
+ 0.3703693151f, 0.3231719732f, 0.2617889345f, 0.1855761409f, 0.0965621769f,
+ 0.0000000000f, -0.0965621769f, -0.1855761558f, -0.2617889643f, -0.3231719434f,
+ -0.3703693151f, -0.4193532169f, -0.4496374130f, -0.4681210220f, -0.4794593155f,
+ -0.4865204692f, -0.4930756390f, -0.4963187873f, -0.4979980290f, -0.4988959432f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4989632964f, 0.4981172681f, 0.4965288043f, 0.4934426546f,
+ 0.4871520996f, 0.4803220332f, 0.4692780674f, 0.4511435628f, 0.4212186337f,
+ 0.3724914491f, 0.3253129125f, 0.2637456059f, 0.1870953441f, 0.0973988697f,
+ 0.0000000000f, -0.0973988622f, -0.1870953441f, -0.2637456357f, -0.3253129125f,
+ -0.3724914491f, -0.4212185740f, -0.4511435628f, -0.4692780375f, -0.4803220928f,
+ -0.4871521592f, -0.4934426844f, -0.4965288043f, -0.4981172979f, -0.4989632666f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4990658462f, 0.4982986450f, 0.4968487024f, 0.4940025806f,
+ 0.4881176353f, 0.4816432893f, 0.4710545242f, 0.4534637034f, 0.4241041243f,
+ 0.3757902384f, 0.3286524117f, 0.2668075860f, 0.1894792169f, 0.0987142026f,
+ 0.0000000000f, -0.0987141877f, -0.1894792318f, -0.2668076158f, -0.3286524117f,
+ -0.3757902086f, -0.4241041243f, -0.4534636736f, -0.4710544348f, -0.4816432893f,
+ -0.4881176651f, -0.4940025806f, -0.4968487322f, -0.4982987046f, -0.4990658164f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4993230999f, 0.4987545311f, 0.4976536036f, 0.4954148531f,
+ 0.4905641079f, 0.4850046337f, 0.4755989015f, 0.4594423771f, 0.4316084087f,
+ 0.3844630718f, 0.3375001550f, 0.2749801576f, 0.1958818436f, 0.1022618562f,
+ 0.0000000000f, -0.1022618562f, -0.1958818585f, -0.2749801576f, -0.3375001550f,
+ -0.3844630718f, -0.4316083491f, -0.4594423175f, -0.4755989015f, -0.4850046337f,
+ -0.4905640781f, -0.4954148829f, -0.4976535738f, -0.4987545311f, -0.4993230700f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4995733500f, 0.4991982579f, 0.4984387755f, 0.4967978001f,
+ 0.4929749966f, 0.4883366227f, 0.4801396132f, 0.4654795825f, 0.4392894208f,
+ 0.3934856355f, 0.3468125761f, 0.2836796939f, 0.2027634680f, 0.1061001420f,
+ 0.0000000000f, -0.1061001420f, -0.2027634680f, -0.2836797237f, -0.3468125761f,
+ -0.3934856355f, -0.4392894208f, -0.4654795825f, -0.4801395833f, -0.4883366823f,
+ -0.4929749668f, -0.4967978299f, -0.4984387755f, -0.4991982877f, -0.4995733202f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5006032586f, 0.5010305047f, 0.5016981363f, 0.5025926232f,
+ 0.5032470226f, 0.5027559996f, 0.5002208352f, 0.4929866195f, 0.4757096469f,
+ 0.4384897351f, 0.3950820863f, 0.3305715621f, 0.2411795557f, 0.1280656606f,
+ 0.0000000000f, -0.1280656606f, -0.2411795706f, -0.3305716217f, -0.3950820863f,
+ -0.4384897351f, -0.4757096469f, -0.4929866195f, -0.5002207756f, -0.5027559996f,
+ -0.5032470226f, -0.5025926232f, -0.5016981959f, -0.5010305047f, -0.5006032586f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5010370016f, 0.5018045902f, 0.5030835867f, 0.5050826669f,
+ 0.5077480078f, 0.5091921091f, 0.5094215274f, 0.5060614347f, 0.4939221144f,
+ 0.4625603855f, 0.4223127365f, 0.3585619032f, 0.2725897431f, 0.1494219303f,
+ 0.0000000000f, -0.1494219303f, -0.2725897431f, -0.3585619330f, -0.4223127365f,
+ -0.4625604451f, -0.4939220548f, -0.5060613751f, -0.5094215274f, -0.5091921091f,
+ -0.5077479482f, -0.5050827861f, -0.5030835867f, -0.5018045902f, -0.5010369420f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368354f, 0.0000000000f,
- -0.1131368279f, -0.2152527720f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368354f, 0.0000000000f,
- -0.1131368279f, -0.2152527720f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368354f, 0.0000000000f,
- -0.1131368279f, -0.2152527869f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f}},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368354f,
+ 0.0000000000f, -0.1131368279f, -0.2152527720f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368354f,
+ 0.0000000000f, -0.1131368279f, -0.2152527720f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368354f,
+ 0.0000000000f, -0.1131368279f, -0.2152527869f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.5010477901f, 0.5018239021f, 0.5031182766f,
- 0.5051452518f, 0.5078617930f, 0.5093557239f, 0.5096575022f,
- 0.5064008832f, 0.4944033921f, 0.4632124305f, 0.4230656624f,
- 0.3596195877f, 0.2740280628f, 0.1503099203f, 0.0000000000f,
- -0.1503099054f, -0.2740280628f, -0.3596195877f, -0.4230656624f,
- -0.4632123709f, -0.4944033921f, -0.5064008832f, -0.5096574426f,
- -0.5093557239f, -0.5078617930f, -0.5051453114f, -0.5031182766f,
- -0.5018239021f, -0.5010477304f, -0.5000000000f},
- {0.5000000000f, 0.5009795427f, 0.5017020702f, 0.5028998852f,
- 0.5047514439f, 0.5071461797f, 0.5083272457f, 0.5081763268f,
- 0.5042734742f, 0.4913944900f, 0.4591502845f, 0.4183884561f,
- 0.3544511199f, 0.2652116716f, 0.1448854357f, 0.0000000000f,
- -0.1448854357f, -0.2652117014f, -0.3544511199f, -0.4183884561f,
- -0.4591503441f, -0.4913944900f, -0.5042734742f, -0.5081762671f,
- -0.5083272457f, -0.5071461797f, -0.5047514439f, -0.5028998852f,
- -0.5017020702f, -0.5009795427f, -0.5000000000f},
- {0.5000000000f, 0.5008758903f, 0.5015168786f, 0.5025681257f,
- 0.5041542053f, 0.5060635209f, 0.5067747831f, 0.5059480071f,
- 0.5010886192f, 0.4869216383f, 0.4531719685f, 0.4115628898f,
- 0.3473646939f, 0.2555567026f, 0.1373466253f, 0.0000000000f,
- -0.1373466253f, -0.2555567324f, -0.3473647237f, -0.4115628898f,
- -0.4531719685f, -0.4869215786f, -0.5010885596f, -0.5059480071f,
- -0.5067747831f, -0.5060635209f, -0.5041542053f, -0.5025681257f,
- -0.5015168786f, -0.5008758307f, -0.5000000000f},
- {0.5000000000f, 0.5006161928f, 0.5010534525f, 0.5017392039f,
- 0.5026661158f, 0.5033791661f, 0.5029437542f, 0.5004871488f,
- 0.4933607578f, 0.4762222767f, 0.4391518533f, 0.3958169818f,
- 0.3313112259f, 0.2418053150f, 0.1284317821f, 0.0000000000f,
- -0.1284317672f, -0.2418053150f, -0.3313111961f, -0.3958169818f,
- -0.4391519129f, -0.4762222767f, -0.4933606982f, -0.5004870892f,
- -0.5029437542f, -0.5033791065f, -0.5026661158f, -0.5017392635f,
- -0.5010534525f, -0.5006161332f, -0.5000000000f},
- {0.5000000000f, 0.5003644228f, 0.5006047487f, 0.5009382963f,
- 0.5012336969f, 0.5008131266f, 0.4993060529f, 0.4953505993f,
- 0.4861895740f, 0.4664809406f, 0.4267134070f, 0.3821379840f,
- 0.3176780939f, 0.2303762883f, 0.1217892319f, 0.0000000000f,
- -0.1217892170f, -0.2303763181f, -0.3176780939f, -0.3821379840f,
- -0.4267134368f, -0.4664809406f, -0.4861895442f, -0.4953505993f,
- -0.4993061125f, -0.5008131266f, -0.5012336969f, -0.5009382963f,
- -0.5006047487f, -0.5003644228f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4993358850f, 0.4987771511f, 0.4976935983f,
- 0.4954852760f, 0.4906864166f, 0.4851732254f, 0.4758279026f,
- 0.4597451985f, 0.4319911301f, 0.3849090934f, 0.3379579186f,
- 0.2754054368f, 0.1962166280f, 0.1024479866f, 0.0000000000f,
- -0.1024479717f, -0.1962166429f, -0.2754054368f, -0.3379579186f,
- -0.3849091232f, -0.4319911599f, -0.4597451687f, -0.4758278131f,
- -0.4851732850f, -0.4906864166f, -0.4954852760f, -0.4976935983f,
- -0.4987771511f, -0.4993358552f, -0.5000000000f},
- {0.5000000000f, 0.4989066720f, 0.4980169535f, 0.4963521063f,
- 0.4931337833f, 0.4866205156f, 0.4795958996f, 0.4683040977f,
- 0.4498755038f, 0.4196476638f, 0.3707037568f, 0.3235089481f,
- 0.2620966136f, 0.1858148128f, 0.0966935381f, 0.0000000000f,
- -0.0966935307f, -0.1858148277f, -0.2620966136f, -0.3235089481f,
- -0.3707037866f, -0.4196476638f, -0.4498754740f, -0.4683040380f,
- -0.4795959294f, -0.4866205454f, -0.4931338131f, -0.4963521063f,
- -0.4980169237f, -0.4989066422f, -0.5000000000f}},
+ {0.5000000000f, 0.5010477901f, 0.5018239021f, 0.5031182766f, 0.5051452518f,
+ 0.5078617930f, 0.5093557239f, 0.5096575022f, 0.5064008832f, 0.4944033921f,
+ 0.4632124305f, 0.4230656624f, 0.3596195877f, 0.2740280628f, 0.1503099203f,
+ 0.0000000000f, -0.1503099054f, -0.2740280628f, -0.3596195877f, -0.4230656624f,
+ -0.4632123709f, -0.4944033921f, -0.5064008832f, -0.5096574426f, -0.5093557239f,
+ -0.5078617930f, -0.5051453114f, -0.5031182766f, -0.5018239021f, -0.5010477304f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5009795427f, 0.5017020702f, 0.5028998852f, 0.5047514439f,
+ 0.5071461797f, 0.5083272457f, 0.5081763268f, 0.5042734742f, 0.4913944900f,
+ 0.4591502845f, 0.4183884561f, 0.3544511199f, 0.2652116716f, 0.1448854357f,
+ 0.0000000000f, -0.1448854357f, -0.2652117014f, -0.3544511199f, -0.4183884561f,
+ -0.4591503441f, -0.4913944900f, -0.5042734742f, -0.5081762671f, -0.5083272457f,
+ -0.5071461797f, -0.5047514439f, -0.5028998852f, -0.5017020702f, -0.5009795427f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5008758903f, 0.5015168786f, 0.5025681257f, 0.5041542053f,
+ 0.5060635209f, 0.5067747831f, 0.5059480071f, 0.5010886192f, 0.4869216383f,
+ 0.4531719685f, 0.4115628898f, 0.3473646939f, 0.2555567026f, 0.1373466253f,
+ 0.0000000000f, -0.1373466253f, -0.2555567324f, -0.3473647237f, -0.4115628898f,
+ -0.4531719685f, -0.4869215786f, -0.5010885596f, -0.5059480071f, -0.5067747831f,
+ -0.5060635209f, -0.5041542053f, -0.5025681257f, -0.5015168786f, -0.5008758307f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5006161928f, 0.5010534525f, 0.5017392039f, 0.5026661158f,
+ 0.5033791661f, 0.5029437542f, 0.5004871488f, 0.4933607578f, 0.4762222767f,
+ 0.4391518533f, 0.3958169818f, 0.3313112259f, 0.2418053150f, 0.1284317821f,
+ 0.0000000000f, -0.1284317672f, -0.2418053150f, -0.3313111961f, -0.3958169818f,
+ -0.4391519129f, -0.4762222767f, -0.4933606982f, -0.5004870892f, -0.5029437542f,
+ -0.5033791065f, -0.5026661158f, -0.5017392635f, -0.5010534525f, -0.5006161332f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5003644228f, 0.5006047487f, 0.5009382963f, 0.5012336969f,
+ 0.5008131266f, 0.4993060529f, 0.4953505993f, 0.4861895740f, 0.4664809406f,
+ 0.4267134070f, 0.3821379840f, 0.3176780939f, 0.2303762883f, 0.1217892319f,
+ 0.0000000000f, -0.1217892170f, -0.2303763181f, -0.3176780939f, -0.3821379840f,
+ -0.4267134368f, -0.4664809406f, -0.4861895442f, -0.4953505993f, -0.4993061125f,
+ -0.5008131266f, -0.5012336969f, -0.5009382963f, -0.5006047487f, -0.5003644228f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4993358850f, 0.4987771511f, 0.4976935983f, 0.4954852760f,
+ 0.4906864166f, 0.4851732254f, 0.4758279026f, 0.4597451985f, 0.4319911301f,
+ 0.3849090934f, 0.3379579186f, 0.2754054368f, 0.1962166280f, 0.1024479866f,
+ 0.0000000000f, -0.1024479717f, -0.1962166429f, -0.2754054368f, -0.3379579186f,
+ -0.3849091232f, -0.4319911599f, -0.4597451687f, -0.4758278131f, -0.4851732850f,
+ -0.4906864166f, -0.4954852760f, -0.4976935983f, -0.4987771511f, -0.4993358552f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4989066720f, 0.4980169535f, 0.4963521063f, 0.4931337833f,
+ 0.4866205156f, 0.4795958996f, 0.4683040977f, 0.4498755038f, 0.4196476638f,
+ 0.3707037568f, 0.3235089481f, 0.2620966136f, 0.1858148128f, 0.0966935381f,
+ 0.0000000000f, -0.0966935307f, -0.1858148277f, -0.2620966136f, -0.3235089481f,
+ -0.3707037866f, -0.4196476638f, -0.4498754740f, -0.4683040380f, -0.4795959294f,
+ -0.4866205454f, -0.4931338131f, -0.4963521063f, -0.4980169237f, -0.4989066422f,
+ -0.5000000000f}},
{
- {0.5000000596f, 0.5019683242f, 0.5034724474f, 0.5060860515f,
- 0.5105357766f, 0.5177959800f, 0.5238327980f, 0.5309391022f,
- 0.5379270315f, 0.5411472321f, 0.5744604468f, 0.5888173580f,
- 0.5752269030f, 0.4958270490f, 0.3029264808f, 0.0000000000f,
- -0.3029264808f, -0.4958269894f, -0.5752269030f, -0.5888173580f,
- -0.5744604468f, -0.5411472321f, -0.5379270315f, -0.5309391022f,
- -0.5238327980f, -0.5177959800f, -0.5105358362f, -0.5060860515f,
- -0.5034723878f, -0.5019683242f, -0.5000000596f},
- {0.5000000596f, 0.5018416047f, 0.5032451153f, 0.5056754351f,
- 0.5097854137f, 0.5163972378f, 0.5217715502f, 0.5278583169f,
- 0.5332472920f, 0.5339364409f, 0.5506924391f, 0.5557163954f,
- 0.5314731002f, 0.4462319613f, 0.2658600509f, 0.0000000000f,
- -0.2658600509f, -0.4462319613f, -0.5314732194f, -0.5557163954f,
- -0.5506924391f, -0.5339364409f, -0.5332472920f, -0.5278582573f,
- -0.5217716098f, -0.5163972378f, -0.5097853541f, -0.5056754351f,
- -0.5032451153f, -0.5018416047f, -0.5000000596f},
- {0.5000000596f, 0.5016490817f, 0.5028999448f, 0.5050527453f,
- 0.5086503625f, 0.5142914653f, 0.5186827183f, 0.5232735872f,
- 0.5263579488f, 0.5235015154f, 0.5180896521f, 0.5119441748f,
- 0.4763633013f, 0.3873093724f, 0.2241453975f, 0.0000000000f,
- -0.2241454273f, -0.3873093724f, -0.4763633311f, -0.5119441748f,
- -0.5180897117f, -0.5235014558f, -0.5263578892f, -0.5232735872f,
- -0.5186827183f, -0.5142914653f, -0.5086504221f, -0.5050527453f,
- -0.5028999448f, -0.5016490817f, -0.5000000596f},
- {0.5000000000f, 0.5011672974f, 0.5020375848f, 0.5035016537f,
- 0.5058373213f, 0.5091226101f, 0.5111725330f, 0.5122836232f,
- 0.5101932287f, 0.4998099208f, 0.4705953598f, 0.4316509366f,
- 0.3780660629f, 0.2909714878f, 0.1608594358f, 0.0000000000f,
- -0.1608594209f, -0.2909714878f, -0.3780660927f, -0.4316509366f,
- -0.4705953598f, -0.4998098612f, -0.5101932287f, -0.5122836232f,
- -0.5111725926f, -0.5091226101f, -0.5058373213f, -0.5035016537f,
- -0.5020375848f, -0.5011672974f, -0.5000000000f},
- {0.5000000000f, 0.5007008314f, 0.5012044907f, 0.5020091534f,
- 0.5031501055f, 0.5042502880f, 0.5041841865f, 0.5022494197f,
- 0.4958427250f, 0.4796353579f, 0.4435822964f, 0.4007542133f,
- 0.3363020420f, 0.2460453212f, 0.1309203655f, 0.0000000000f,
- -0.1309203506f, -0.2460453212f, -0.3363020718f, -0.4007542133f,
- -0.4435823560f, -0.4796352983f, -0.4958426654f, -0.5022494197f,
- -0.5041842461f, -0.5042502880f, -0.5031501651f, -0.5020092130f,
- -0.5012044907f, -0.5007008314f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4988015890f, 0.4978311360f, 0.4960248172f,
- 0.4925622642f, 0.4856388867f, 0.4782574177f, 0.4665130377f,
- 0.4475508630f, 0.4167790711f, 0.3674541414f, 0.3202401102f,
- 0.2591174543f, 0.1835071146f, 0.0954245627f, 0.0000000000f,
- -0.0954245627f, -0.1835071146f, -0.2591174543f, -0.3202401102f,
- -0.3674541414f, -0.4167790413f, -0.4475508630f, -0.4665130079f,
- -0.4782574475f, -0.4856388569f, -0.4925622940f, -0.4960248470f,
- -0.4978311062f, -0.4988015294f, -0.5000000000f},
- {0.5000000000f, 0.4980117977f, 0.4964371324f, 0.4935791790f,
- 0.4883186519f, 0.4784279168f, 0.4685191810f, 0.4536466599f,
- 0.4311205149f, 0.3969023824f, 0.3454375863f, 0.2984294593f,
- 0.2395204306f, 0.1685037017f, 0.0872381777f, 0.0000000000f,
- -0.0872381777f, -0.1685037017f, -0.2395204306f, -0.2984294891f,
- -0.3454375863f, -0.3969023824f, -0.4311204851f, -0.4536466599f,
- -0.4685192108f, -0.4784279168f, -0.4883186519f, -0.4935792387f,
- -0.4964371920f, -0.4980118275f, -0.5000000000f}},
+ {0.5000000596f, 0.5019683242f, 0.5034724474f, 0.5060860515f, 0.5105357766f,
+ 0.5177959800f, 0.5238327980f, 0.5309391022f, 0.5379270315f, 0.5411472321f,
+ 0.5744604468f, 0.5888173580f, 0.5752269030f, 0.4958270490f, 0.3029264808f,
+ 0.0000000000f, -0.3029264808f, -0.4958269894f, -0.5752269030f, -0.5888173580f,
+ -0.5744604468f, -0.5411472321f, -0.5379270315f, -0.5309391022f, -0.5238327980f,
+ -0.5177959800f, -0.5105358362f, -0.5060860515f, -0.5034723878f, -0.5019683242f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5018416047f, 0.5032451153f, 0.5056754351f, 0.5097854137f,
+ 0.5163972378f, 0.5217715502f, 0.5278583169f, 0.5332472920f, 0.5339364409f,
+ 0.5506924391f, 0.5557163954f, 0.5314731002f, 0.4462319613f, 0.2658600509f,
+ 0.0000000000f, -0.2658600509f, -0.4462319613f, -0.5314732194f, -0.5557163954f,
+ -0.5506924391f, -0.5339364409f, -0.5332472920f, -0.5278582573f, -0.5217716098f,
+ -0.5163972378f, -0.5097853541f, -0.5056754351f, -0.5032451153f, -0.5018416047f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5016490817f, 0.5028999448f, 0.5050527453f, 0.5086503625f,
+ 0.5142914653f, 0.5186827183f, 0.5232735872f, 0.5263579488f, 0.5235015154f,
+ 0.5180896521f, 0.5119441748f, 0.4763633013f, 0.3873093724f, 0.2241453975f,
+ 0.0000000000f, -0.2241454273f, -0.3873093724f, -0.4763633311f, -0.5119441748f,
+ -0.5180897117f, -0.5235014558f, -0.5263578892f, -0.5232735872f, -0.5186827183f,
+ -0.5142914653f, -0.5086504221f, -0.5050527453f, -0.5028999448f, -0.5016490817f,
+ -0.5000000596f},
+ {0.5000000000f, 0.5011672974f, 0.5020375848f, 0.5035016537f, 0.5058373213f,
+ 0.5091226101f, 0.5111725330f, 0.5122836232f, 0.5101932287f, 0.4998099208f,
+ 0.4705953598f, 0.4316509366f, 0.3780660629f, 0.2909714878f, 0.1608594358f,
+ 0.0000000000f, -0.1608594209f, -0.2909714878f, -0.3780660927f, -0.4316509366f,
+ -0.4705953598f, -0.4998098612f, -0.5101932287f, -0.5122836232f, -0.5111725926f,
+ -0.5091226101f, -0.5058373213f, -0.5035016537f, -0.5020375848f, -0.5011672974f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5007008314f, 0.5012044907f, 0.5020091534f, 0.5031501055f,
+ 0.5042502880f, 0.5041841865f, 0.5022494197f, 0.4958427250f, 0.4796353579f,
+ 0.4435822964f, 0.4007542133f, 0.3363020420f, 0.2460453212f, 0.1309203655f,
+ 0.0000000000f, -0.1309203506f, -0.2460453212f, -0.3363020718f, -0.4007542133f,
+ -0.4435823560f, -0.4796352983f, -0.4958426654f, -0.5022494197f, -0.5041842461f,
+ -0.5042502880f, -0.5031501651f, -0.5020092130f, -0.5012044907f, -0.5007008314f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4988015890f, 0.4978311360f, 0.4960248172f, 0.4925622642f,
+ 0.4856388867f, 0.4782574177f, 0.4665130377f, 0.4475508630f, 0.4167790711f,
+ 0.3674541414f, 0.3202401102f, 0.2591174543f, 0.1835071146f, 0.0954245627f,
+ 0.0000000000f, -0.0954245627f, -0.1835071146f, -0.2591174543f, -0.3202401102f,
+ -0.3674541414f, -0.4167790413f, -0.4475508630f, -0.4665130079f, -0.4782574475f,
+ -0.4856388569f, -0.4925622940f, -0.4960248470f, -0.4978311062f, -0.4988015294f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4980117977f, 0.4964371324f, 0.4935791790f, 0.4883186519f,
+ 0.4784279168f, 0.4685191810f, 0.4536466599f, 0.4311205149f, 0.3969023824f,
+ 0.3454375863f, 0.2984294593f, 0.2395204306f, 0.1685037017f, 0.0872381777f,
+ 0.0000000000f, -0.0872381777f, -0.1685037017f, -0.2395204306f, -0.2984294891f,
+ -0.3454375863f, -0.3969023824f, -0.4311204851f, -0.4536466599f, -0.4685192108f,
+ -0.4784279168f, -0.4883186519f, -0.4935792387f, -0.4964371920f, -0.4980118275f,
+ -0.5000000000f}},
{
- {0.5000000596f, 0.5025862455f, 0.5045830011f, 0.5080985427f,
- 0.5142353773f, 0.5247681141f, 0.5342236161f, 0.5467404723f,
- 0.5625994205f, 0.6218548417f, 0.7271847725f, 0.8291400671f,
- 0.9596735835f, 1.0798219442f, 0.9420299530f, 0.0000000000f,
- -0.9420303106f, -1.0798217058f, -0.9596738815f, -0.8291401863f,
- -0.7271848917f, -0.6218547821f, -0.5625994205f, -0.5467404127f,
- -0.5342236161f, -0.5247680545f, -0.5142353773f, -0.5080985427f,
- -0.5045830011f, -0.5025862455f, -0.5000000596f},
- {0.5000000596f, 0.5024200678f, 0.5042841434f, 0.5075557828f,
- 0.5132341385f, 0.5228683949f, 0.5313730240f, 0.5423596501f,
- 0.5556432009f, 0.5973936319f, 0.6787342429f, 0.7472499609f,
- 0.8136605620f, 0.8203776479f, 0.6013670564f, 0.0000000000f,
- -0.6013671160f, -0.8203776479f, -0.8136607409f, -0.7472500801f,
- -0.6787342429f, -0.5973935723f, -0.5556432009f, -0.5423595905f,
- -0.5313730240f, -0.5228683949f, -0.5132341385f, -0.5075558424f,
- -0.5042841434f, -0.5024200678f, -0.5000000596f},
- {0.5000000596f, 0.5021677613f, 0.5038304925f, 0.5067336559f,
- 0.5117224455f, 0.5200182796f, 0.5271236300f, 0.5358940363f,
- 0.5455409884f, 0.5636704564f, 0.6162818074f, 0.6496601105f,
- 0.6607547998f, 0.6008188725f, 0.3879746199f, 0.0000000000f,
- -0.3879747093f, -0.6008188725f, -0.6607549191f, -0.6496600509f,
- -0.6162818670f, -0.5636703968f, -0.5455409288f, -0.5358939767f,
- -0.5271236897f, -0.5200182796f, -0.5117224455f, -0.5067337155f,
- -0.5038304925f, -0.5021677017f, -0.5000000596f},
- {0.5000000596f, 0.5015365481f, 0.5026984215f, 0.5046897531f,
- 0.5079899430f, 0.5130717754f, 0.5169013739f, 0.5206471086f,
- 0.5224504471f, 0.5176750422f, 0.5007511973f, 0.4893990755f,
- 0.4491262436f, 0.3595432043f, 0.2053054571f, 0.0000000000f,
- -0.2053054571f, -0.3595432043f, -0.4491263032f, -0.4893990755f,
- -0.5007511973f, -0.5176750422f, -0.5224504471f, -0.5206470490f,
- -0.5169014335f, -0.5130717754f, -0.5079900026f, -0.5046896935f,
- -0.5026984215f, -0.5015365481f, -0.5000000596f},
- {0.5000000000f, 0.5009260774f, 0.5016064644f, 0.5027285814f,
- 0.5044430494f, 0.5065867305f, 0.5075244904f, 0.5070229173f,
- 0.5026227236f, 0.4890713692f, 0.4560364485f, 0.4148247242f,
- 0.3507413268f, 0.2586806417f, 0.1408952773f, 0.0000000000f,
- -0.1408952773f, -0.2586806417f, -0.3507413268f, -0.4148246944f,
- -0.4560364783f, -0.4890713692f, -0.5026226640f, -0.5070229173f,
- -0.5075244904f, -0.5065867305f, -0.5044430494f, -0.5027285814f,
- -0.5016064644f, -0.5009260178f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4984455407f, 0.4972019792f, 0.4949190915f,
- 0.4906377792f, 0.4823517799f, 0.4737979174f, 0.4605855942f,
- 0.4399236441f, 0.4074669182f, 0.3570330739f, 0.3098451197f,
- 0.2497179806f, 0.1762735248f, 0.0914641768f, 0.0000000000f,
- -0.0914641768f, -0.1762735248f, -0.2497179955f, -0.3098450899f,
- -0.3570331335f, -0.4074669182f, -0.4399236441f, -0.4605855346f,
- -0.4737979472f, -0.4823517799f, -0.4906377792f, -0.4949190915f,
- -0.4972020090f, -0.4984455109f, -0.5000000000f},
- {0.5000000000f, 0.4974165857f, 0.4953899384f, 0.4917520583f,
- 0.4851788282f, 0.4731788635f, 0.4615318775f, 0.4445866942f,
- 0.4198218584f, 0.3836160004f, 0.3311764300f, 0.2845952809f,
- 0.2273271382f, 0.1593134999f, 0.0822749436f, 0.0000000000f,
- -0.0822749436f, -0.1593135148f, -0.2273271531f, -0.2845952809f,
- -0.3311764300f, -0.3836159706f, -0.4198218286f, -0.4445866644f,
- -0.4615319073f, -0.4731788635f, -0.4851788580f, -0.4917520583f,
- -0.4953899384f, -0.4974165857f, -0.5000000000f}},
+ {0.5000000596f, 0.5025862455f, 0.5045830011f, 0.5080985427f, 0.5142353773f,
+ 0.5247681141f, 0.5342236161f, 0.5467404723f, 0.5625994205f, 0.6218548417f,
+ 0.7271847725f, 0.8291400671f, 0.9596735835f, 1.0798219442f, 0.9420299530f,
+ 0.0000000000f, -0.9420303106f, -1.0798217058f, -0.9596738815f, -0.8291401863f,
+ -0.7271848917f, -0.6218547821f, -0.5625994205f, -0.5467404127f, -0.5342236161f,
+ -0.5247680545f, -0.5142353773f, -0.5080985427f, -0.5045830011f, -0.5025862455f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5024200678f, 0.5042841434f, 0.5075557828f, 0.5132341385f,
+ 0.5228683949f, 0.5313730240f, 0.5423596501f, 0.5556432009f, 0.5973936319f,
+ 0.6787342429f, 0.7472499609f, 0.8136605620f, 0.8203776479f, 0.6013670564f,
+ 0.0000000000f, -0.6013671160f, -0.8203776479f, -0.8136607409f, -0.7472500801f,
+ -0.6787342429f, -0.5973935723f, -0.5556432009f, -0.5423595905f, -0.5313730240f,
+ -0.5228683949f, -0.5132341385f, -0.5075558424f, -0.5042841434f, -0.5024200678f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5021677613f, 0.5038304925f, 0.5067336559f, 0.5117224455f,
+ 0.5200182796f, 0.5271236300f, 0.5358940363f, 0.5455409884f, 0.5636704564f,
+ 0.6162818074f, 0.6496601105f, 0.6607547998f, 0.6008188725f, 0.3879746199f,
+ 0.0000000000f, -0.3879747093f, -0.6008188725f, -0.6607549191f, -0.6496600509f,
+ -0.6162818670f, -0.5636703968f, -0.5455409288f, -0.5358939767f, -0.5271236897f,
+ -0.5200182796f, -0.5117224455f, -0.5067337155f, -0.5038304925f, -0.5021677017f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5015365481f, 0.5026984215f, 0.5046897531f, 0.5079899430f,
+ 0.5130717754f, 0.5169013739f, 0.5206471086f, 0.5224504471f, 0.5176750422f,
+ 0.5007511973f, 0.4893990755f, 0.4491262436f, 0.3595432043f, 0.2053054571f,
+ 0.0000000000f, -0.2053054571f, -0.3595432043f, -0.4491263032f, -0.4893990755f,
+ -0.5007511973f, -0.5176750422f, -0.5224504471f, -0.5206470490f, -0.5169014335f,
+ -0.5130717754f, -0.5079900026f, -0.5046896935f, -0.5026984215f, -0.5015365481f,
+ -0.5000000596f},
+ {0.5000000000f, 0.5009260774f, 0.5016064644f, 0.5027285814f, 0.5044430494f,
+ 0.5065867305f, 0.5075244904f, 0.5070229173f, 0.5026227236f, 0.4890713692f,
+ 0.4560364485f, 0.4148247242f, 0.3507413268f, 0.2586806417f, 0.1408952773f,
+ 0.0000000000f, -0.1408952773f, -0.2586806417f, -0.3507413268f, -0.4148246944f,
+ -0.4560364783f, -0.4890713692f, -0.5026226640f, -0.5070229173f, -0.5075244904f,
+ -0.5065867305f, -0.5044430494f, -0.5027285814f, -0.5016064644f, -0.5009260178f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4984455407f, 0.4972019792f, 0.4949190915f, 0.4906377792f,
+ 0.4823517799f, 0.4737979174f, 0.4605855942f, 0.4399236441f, 0.4074669182f,
+ 0.3570330739f, 0.3098451197f, 0.2497179806f, 0.1762735248f, 0.0914641768f,
+ 0.0000000000f, -0.0914641768f, -0.1762735248f, -0.2497179955f, -0.3098450899f,
+ -0.3570331335f, -0.4074669182f, -0.4399236441f, -0.4605855346f, -0.4737979472f,
+ -0.4823517799f, -0.4906377792f, -0.4949190915f, -0.4972020090f, -0.4984455109f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4974165857f, 0.4953899384f, 0.4917520583f, 0.4851788282f,
+ 0.4731788635f, 0.4615318775f, 0.4445866942f, 0.4198218584f, 0.3836160004f,
+ 0.3311764300f, 0.2845952809f, 0.2273271382f, 0.1593134999f, 0.0822749436f,
+ 0.0000000000f, -0.0822749436f, -0.1593135148f, -0.2273271531f, -0.2845952809f,
+ -0.3311764300f, -0.3836159706f, -0.4198218286f, -0.4445866644f, -0.4615319073f,
+ -0.4731788635f, -0.4851788580f, -0.4917520583f, -0.4953899384f, -0.4974165857f,
+ -0.5000000000f}},
{
- {0.5000000596f, 0.5028037429f, 0.5049747825f, 0.5088109374f,
- 0.5155536532f, 0.5272840858f, 0.5380216837f, 0.5526331663f,
- 0.5736158490f, 0.6570396423f, 0.8020626903f, 0.9678543210f,
- 1.2539665699f, 1.8414286375f, 3.6350917816f, -3.2000000477f,
- -3.6350977421f, -1.8414278030f, -1.2539669275f, -0.9678544402f,
- -0.8020627499f, -0.6570395231f, -0.5736158490f, -0.5526331663f,
- -0.5380217433f, -0.5272840261f, -0.5155536532f, -0.5088109374f,
- -0.5049747825f, -0.5028037429f, -0.5000000596f},
- {0.5000000596f, 0.5026236773f, 0.5046505332f, 0.5082210898f,
- 0.5144618750f, 0.5251991153f, 0.5348724723f, 0.5477427244f,
- 0.5642039180f, 0.6276481748f, 0.7390776277f, 0.8501415253f,
- 1.0001310110f, 1.1627105474f, 1.0799337626f, 0.0000000000f,
- -1.0799342394f, -1.1627105474f, -1.0001313686f, -0.8501416445f,
- -0.7390776873f, -0.6276481152f, -0.5642039180f, -0.5477426648f,
- -0.5348724723f, -0.5251991153f, -0.5144618750f, -0.5082210898f,
- -0.5046504736f, -0.5026236773f, -0.5000000596f},
- {0.5000000596f, 0.5023502707f, 0.5041584373f, 0.5073279142f,
- 0.5128144622f, 0.5220750570f, 0.5301869512f, 0.5405472517f,
- 0.5527920127f, 0.5876652598f, 0.6602216363f, 0.7174301744f,
- 0.7646963000f, 0.7450429201f, 0.5219343901f, 0.0000000000f,
- -0.5219346285f, -0.7450428605f, -0.7646964192f, -0.7174301744f,
- -0.6602216959f, -0.5876652002f, -0.5527919531f, -0.5405471921f,
- -0.5301870108f, -0.5220750570f, -0.5128144622f, -0.5073279142f,
- -0.5041584969f, -0.5023502111f, -0.5000000596f},
- {0.5000000596f, 0.5016664267f, 0.5029309988f, 0.5051088333f,
- 0.5087524056f, 0.5144805312f, 0.5189592838f, 0.5236825943f,
- 0.5269688368f, 0.5244184136f, 0.5208731890f, 0.5156101584f,
- 0.4808640778f, 0.3919814229f, 0.2273655832f, 0.0000000000f,
- -0.2273655832f, -0.3919814229f, -0.4808641970f, -0.5156101584f,
- -0.5208732486f, -0.5244183540f, -0.5269688368f, -0.5236825347f,
- -0.5189592838f, -0.5144804716f, -0.5087524652f, -0.5051088929f,
- -0.5029310584f, -0.5016664267f, -0.5000000596f},
- {0.5000000000f, 0.5010051727f, 0.5017478466f, 0.5029819608f,
- 0.5048993826f, 0.5074149370f, 0.5087133050f, 0.5087317824f,
- 0.5050703287f, 0.4925194979f, 0.4606651962f, 0.4201289415f,
- 0.3562709987f, 0.2684594989f, 0.1468786299f, 0.0000000000f,
- -0.1468786299f, -0.2684595585f, -0.3562710285f, -0.4201289117f,
- -0.4606651962f, -0.4925194383f, -0.5050702691f, -0.5087317824f,
- -0.5087133050f, -0.5074148774f, -0.5048993826f, -0.5029820204f,
- -0.5017478466f, -0.5010051727f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4983206391f, 0.4969816804f, 0.4945325255f,
- 0.4899673164f, 0.4812132120f, 0.4722613096f, 0.4585570693f,
- 0.4373364151f, 0.4043420255f, 0.3535786867f, 0.3064280450f,
- 0.2466521561f, 0.1739292294f, 0.0901861414f, 0.0000000000f,
- -0.0901861340f, -0.1739292443f, -0.2466521412f, -0.3064280450f,
- -0.3535786867f, -0.4043420255f, -0.4373364449f, -0.4585570395f,
- -0.4722613096f, -0.4812132120f, -0.4899673462f, -0.4945325553f,
- -0.4969816506f, -0.4983206391f, -0.5000000000f},
- {0.5000000000f, 0.4972080886f, 0.4950237870f, 0.4911153018f,
- 0.4840905368f, 0.4713762403f, 0.4591514468f, 0.4415317178f,
- 0.4160600305f, 0.3792575300f, 0.3265722692f, 0.2801750302f,
- 0.2234674245f, 0.1564260125f, 0.0807230473f, 0.0000000000f,
- -0.0807230398f, -0.1564260125f, -0.2234674245f, -0.2801750600f,
- -0.3265722394f, -0.3792575002f, -0.4160600007f, -0.4415317178f,
- -0.4591514468f, -0.4713762403f, -0.4840905368f, -0.4911153018f,
- -0.4950237870f, -0.4972080886f, -0.5000000000f}},
+ {0.5000000596f, 0.5028037429f, 0.5049747825f, 0.5088109374f, 0.5155536532f,
+ 0.5272840858f, 0.5380216837f, 0.5526331663f, 0.5736158490f, 0.6570396423f,
+ 0.8020626903f, 0.9678543210f, 1.2539665699f, 1.8414286375f, 3.6350917816f,
+ -3.2000000477f, -3.6350977421f, -1.8414278030f, -1.2539669275f, -0.9678544402f,
+ -0.8020627499f, -0.6570395231f, -0.5736158490f, -0.5526331663f, -0.5380217433f,
+ -0.5272840261f, -0.5155536532f, -0.5088109374f, -0.5049747825f, -0.5028037429f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5026236773f, 0.5046505332f, 0.5082210898f, 0.5144618750f,
+ 0.5251991153f, 0.5348724723f, 0.5477427244f, 0.5642039180f, 0.6276481748f,
+ 0.7390776277f, 0.8501415253f, 1.0001310110f, 1.1627105474f, 1.0799337626f,
+ 0.0000000000f, -1.0799342394f, -1.1627105474f, -1.0001313686f, -0.8501416445f,
+ -0.7390776873f, -0.6276481152f, -0.5642039180f, -0.5477426648f, -0.5348724723f,
+ -0.5251991153f, -0.5144618750f, -0.5082210898f, -0.5046504736f, -0.5026236773f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5023502707f, 0.5041584373f, 0.5073279142f, 0.5128144622f,
+ 0.5220750570f, 0.5301869512f, 0.5405472517f, 0.5527920127f, 0.5876652598f,
+ 0.6602216363f, 0.7174301744f, 0.7646963000f, 0.7450429201f, 0.5219343901f,
+ 0.0000000000f, -0.5219346285f, -0.7450428605f, -0.7646964192f, -0.7174301744f,
+ -0.6602216959f, -0.5876652002f, -0.5527919531f, -0.5405471921f, -0.5301870108f,
+ -0.5220750570f, -0.5128144622f, -0.5073279142f, -0.5041584969f, -0.5023502111f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5016664267f, 0.5029309988f, 0.5051088333f, 0.5087524056f,
+ 0.5144805312f, 0.5189592838f, 0.5236825943f, 0.5269688368f, 0.5244184136f,
+ 0.5208731890f, 0.5156101584f, 0.4808640778f, 0.3919814229f, 0.2273655832f,
+ 0.0000000000f, -0.2273655832f, -0.3919814229f, -0.4808641970f, -0.5156101584f,
+ -0.5208732486f, -0.5244183540f, -0.5269688368f, -0.5236825347f, -0.5189592838f,
+ -0.5144804716f, -0.5087524652f, -0.5051088929f, -0.5029310584f, -0.5016664267f,
+ -0.5000000596f},
+ {0.5000000000f, 0.5010051727f, 0.5017478466f, 0.5029819608f, 0.5048993826f,
+ 0.5074149370f, 0.5087133050f, 0.5087317824f, 0.5050703287f, 0.4925194979f,
+ 0.4606651962f, 0.4201289415f, 0.3562709987f, 0.2684594989f, 0.1468786299f,
+ 0.0000000000f, -0.1468786299f, -0.2684595585f, -0.3562710285f, -0.4201289117f,
+ -0.4606651962f, -0.4925194383f, -0.5050702691f, -0.5087317824f, -0.5087133050f,
+ -0.5074148774f, -0.5048993826f, -0.5029820204f, -0.5017478466f, -0.5010051727f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4983206391f, 0.4969816804f, 0.4945325255f, 0.4899673164f,
+ 0.4812132120f, 0.4722613096f, 0.4585570693f, 0.4373364151f, 0.4043420255f,
+ 0.3535786867f, 0.3064280450f, 0.2466521561f, 0.1739292294f, 0.0901861414f,
+ 0.0000000000f, -0.0901861340f, -0.1739292443f, -0.2466521412f, -0.3064280450f,
+ -0.3535786867f, -0.4043420255f, -0.4373364449f, -0.4585570395f, -0.4722613096f,
+ -0.4812132120f, -0.4899673462f, -0.4945325553f, -0.4969816506f, -0.4983206391f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4972080886f, 0.4950237870f, 0.4911153018f, 0.4840905368f,
+ 0.4713762403f, 0.4591514468f, 0.4415317178f, 0.4160600305f, 0.3792575300f,
+ 0.3265722692f, 0.2801750302f, 0.2234674245f, 0.1564260125f, 0.0807230473f,
+ 0.0000000000f, -0.0807230398f, -0.1564260125f, -0.2234674245f, -0.2801750600f,
+ -0.3265722394f, -0.3792575002f, -0.4160600007f, -0.4415317178f, -0.4591514468f,
+ -0.4713762403f, -0.4840905368f, -0.4911153018f, -0.4950237870f, -0.4972080886f,
+ -0.5000000000f}},
{
- {0.5000000596f, 0.5025862455f, 0.5045830011f, 0.5080985427f,
- 0.5142353773f, 0.5247681141f, 0.5342236161f, 0.5467404723f,
- 0.5625994205f, 0.6218548417f, 0.7271847725f, 0.8291400671f,
- 0.9596735835f, 1.0798219442f, 0.9420299530f, 0.0000000000f,
- -0.9420303106f, -1.0798217058f, -0.9596738815f, -0.8291401863f,
- -0.7271848917f, -0.6218547821f, -0.5625994205f, -0.5467404127f,
- -0.5342236161f, -0.5247680545f, -0.5142353773f, -0.5080985427f,
- -0.5045830011f, -0.5025862455f, -0.5000000596f},
- {0.5000000596f, 0.5024200678f, 0.5042841434f, 0.5075557828f,
- 0.5132341385f, 0.5228683949f, 0.5313730240f, 0.5423596501f,
- 0.5556432009f, 0.5973936319f, 0.6787342429f, 0.7472499609f,
- 0.8136605620f, 0.8203776479f, 0.6013670564f, 0.0000000000f,
- -0.6013671160f, -0.8203776479f, -0.8136607409f, -0.7472500801f,
- -0.6787342429f, -0.5973935723f, -0.5556432009f, -0.5423595905f,
- -0.5313730240f, -0.5228683949f, -0.5132341385f, -0.5075558424f,
- -0.5042841434f, -0.5024200678f, -0.5000000596f},
- {0.5000000596f, 0.5021677613f, 0.5038304925f, 0.5067336559f,
- 0.5117224455f, 0.5200182796f, 0.5271236300f, 0.5358940363f,
- 0.5455409884f, 0.5636704564f, 0.6162818074f, 0.6496601105f,
- 0.6607547998f, 0.6008188725f, 0.3879746199f, 0.0000000000f,
- -0.3879747093f, -0.6008188725f, -0.6607549191f, -0.6496600509f,
- -0.6162818670f, -0.5636703968f, -0.5455409288f, -0.5358939767f,
- -0.5271236897f, -0.5200182796f, -0.5117224455f, -0.5067337155f,
- -0.5038304925f, -0.5021677017f, -0.5000000596f},
- {0.5000000596f, 0.5015365481f, 0.5026984215f, 0.5046897531f,
- 0.5079899430f, 0.5130717754f, 0.5169013739f, 0.5206471086f,
- 0.5224504471f, 0.5176750422f, 0.5007511973f, 0.4893990755f,
- 0.4491262436f, 0.3595432043f, 0.2053054571f, 0.0000000000f,
- -0.2053054571f, -0.3595432043f, -0.4491263032f, -0.4893990755f,
- -0.5007511973f, -0.5176750422f, -0.5224504471f, -0.5206470490f,
- -0.5169014335f, -0.5130717754f, -0.5079900026f, -0.5046896935f,
- -0.5026984215f, -0.5015365481f, -0.5000000596f},
- {0.5000000000f, 0.5009260774f, 0.5016064644f, 0.5027285814f,
- 0.5044430494f, 0.5065867305f, 0.5075244904f, 0.5070229173f,
- 0.5026227236f, 0.4890713692f, 0.4560364485f, 0.4148247242f,
- 0.3507413268f, 0.2586806417f, 0.1408952773f, 0.0000000000f,
- -0.1408952773f, -0.2586806417f, -0.3507413268f, -0.4148246944f,
- -0.4560364783f, -0.4890713692f, -0.5026226640f, -0.5070229173f,
- -0.5075244904f, -0.5065867305f, -0.5044430494f, -0.5027285814f,
- -0.5016064644f, -0.5009260178f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4984455407f, 0.4972019792f, 0.4949190915f,
- 0.4906377792f, 0.4823517799f, 0.4737979174f, 0.4605855942f,
- 0.4399236441f, 0.4074669182f, 0.3570330739f, 0.3098451197f,
- 0.2497179806f, 0.1762735248f, 0.0914641768f, 0.0000000000f,
- -0.0914641768f, -0.1762735248f, -0.2497179955f, -0.3098450899f,
- -0.3570331335f, -0.4074669182f, -0.4399236441f, -0.4605855346f,
- -0.4737979472f, -0.4823517799f, -0.4906377792f, -0.4949190915f,
- -0.4972020090f, -0.4984455109f, -0.5000000000f},
- {0.5000000000f, 0.4974165857f, 0.4953899384f, 0.4917520583f,
- 0.4851788282f, 0.4731788635f, 0.4615318775f, 0.4445866942f,
- 0.4198218584f, 0.3836160004f, 0.3311764300f, 0.2845952809f,
- 0.2273271382f, 0.1593134999f, 0.0822749436f, 0.0000000000f,
- -0.0822749436f, -0.1593135148f, -0.2273271531f, -0.2845952809f,
- -0.3311764300f, -0.3836159706f, -0.4198218286f, -0.4445866644f,
- -0.4615319073f, -0.4731788635f, -0.4851788580f, -0.4917520583f,
- -0.4953899384f, -0.4974165857f, -0.5000000000f}},
+ {0.5000000596f, 0.5025862455f, 0.5045830011f, 0.5080985427f, 0.5142353773f,
+ 0.5247681141f, 0.5342236161f, 0.5467404723f, 0.5625994205f, 0.6218548417f,
+ 0.7271847725f, 0.8291400671f, 0.9596735835f, 1.0798219442f, 0.9420299530f,
+ 0.0000000000f, -0.9420303106f, -1.0798217058f, -0.9596738815f, -0.8291401863f,
+ -0.7271848917f, -0.6218547821f, -0.5625994205f, -0.5467404127f, -0.5342236161f,
+ -0.5247680545f, -0.5142353773f, -0.5080985427f, -0.5045830011f, -0.5025862455f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5024200678f, 0.5042841434f, 0.5075557828f, 0.5132341385f,
+ 0.5228683949f, 0.5313730240f, 0.5423596501f, 0.5556432009f, 0.5973936319f,
+ 0.6787342429f, 0.7472499609f, 0.8136605620f, 0.8203776479f, 0.6013670564f,
+ 0.0000000000f, -0.6013671160f, -0.8203776479f, -0.8136607409f, -0.7472500801f,
+ -0.6787342429f, -0.5973935723f, -0.5556432009f, -0.5423595905f, -0.5313730240f,
+ -0.5228683949f, -0.5132341385f, -0.5075558424f, -0.5042841434f, -0.5024200678f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5021677613f, 0.5038304925f, 0.5067336559f, 0.5117224455f,
+ 0.5200182796f, 0.5271236300f, 0.5358940363f, 0.5455409884f, 0.5636704564f,
+ 0.6162818074f, 0.6496601105f, 0.6607547998f, 0.6008188725f, 0.3879746199f,
+ 0.0000000000f, -0.3879747093f, -0.6008188725f, -0.6607549191f, -0.6496600509f,
+ -0.6162818670f, -0.5636703968f, -0.5455409288f, -0.5358939767f, -0.5271236897f,
+ -0.5200182796f, -0.5117224455f, -0.5067337155f, -0.5038304925f, -0.5021677017f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5015365481f, 0.5026984215f, 0.5046897531f, 0.5079899430f,
+ 0.5130717754f, 0.5169013739f, 0.5206471086f, 0.5224504471f, 0.5176750422f,
+ 0.5007511973f, 0.4893990755f, 0.4491262436f, 0.3595432043f, 0.2053054571f,
+ 0.0000000000f, -0.2053054571f, -0.3595432043f, -0.4491263032f, -0.4893990755f,
+ -0.5007511973f, -0.5176750422f, -0.5224504471f, -0.5206470490f, -0.5169014335f,
+ -0.5130717754f, -0.5079900026f, -0.5046896935f, -0.5026984215f, -0.5015365481f,
+ -0.5000000596f},
+ {0.5000000000f, 0.5009260774f, 0.5016064644f, 0.5027285814f, 0.5044430494f,
+ 0.5065867305f, 0.5075244904f, 0.5070229173f, 0.5026227236f, 0.4890713692f,
+ 0.4560364485f, 0.4148247242f, 0.3507413268f, 0.2586806417f, 0.1408952773f,
+ 0.0000000000f, -0.1408952773f, -0.2586806417f, -0.3507413268f, -0.4148246944f,
+ -0.4560364783f, -0.4890713692f, -0.5026226640f, -0.5070229173f, -0.5075244904f,
+ -0.5065867305f, -0.5044430494f, -0.5027285814f, -0.5016064644f, -0.5009260178f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4984455407f, 0.4972019792f, 0.4949190915f, 0.4906377792f,
+ 0.4823517799f, 0.4737979174f, 0.4605855942f, 0.4399236441f, 0.4074669182f,
+ 0.3570330739f, 0.3098451197f, 0.2497179806f, 0.1762735248f, 0.0914641768f,
+ 0.0000000000f, -0.0914641768f, -0.1762735248f, -0.2497179955f, -0.3098450899f,
+ -0.3570331335f, -0.4074669182f, -0.4399236441f, -0.4605855346f, -0.4737979472f,
+ -0.4823517799f, -0.4906377792f, -0.4949190915f, -0.4972020090f, -0.4984455109f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4974165857f, 0.4953899384f, 0.4917520583f, 0.4851788282f,
+ 0.4731788635f, 0.4615318775f, 0.4445866942f, 0.4198218584f, 0.3836160004f,
+ 0.3311764300f, 0.2845952809f, 0.2273271382f, 0.1593134999f, 0.0822749436f,
+ 0.0000000000f, -0.0822749436f, -0.1593135148f, -0.2273271531f, -0.2845952809f,
+ -0.3311764300f, -0.3836159706f, -0.4198218286f, -0.4445866644f, -0.4615319073f,
+ -0.4731788635f, -0.4851788580f, -0.4917520583f, -0.4953899384f, -0.4974165857f,
+ -0.5000000000f}},
{
- {0.5000000596f, 0.5019683242f, 0.5034724474f, 0.5060860515f,
- 0.5105357766f, 0.5177959800f, 0.5238327980f, 0.5309391022f,
- 0.5379270911f, 0.5411472321f, 0.5744605064f, 0.5888174176f,
- 0.5752269030f, 0.4958270788f, 0.3029264808f, 0.0000000000f,
- -0.3029265106f, -0.4958270490f, -0.5752269626f, -0.5888174772f,
- -0.5744605064f, -0.5411472321f, -0.5379270911f, -0.5309391022f,
- -0.5238327980f, -0.5177959800f, -0.5105358362f, -0.5060860515f,
- -0.5034723878f, -0.5019683242f, -0.5000000596f},
- {0.5000000596f, 0.5018416047f, 0.5032451153f, 0.5056754351f,
- 0.5097854137f, 0.5163972378f, 0.5217715502f, 0.5278583169f,
- 0.5332472920f, 0.5339364409f, 0.5506924391f, 0.5557163954f,
- 0.5314732194f, 0.4462319911f, 0.2658600807f, 0.0000000000f,
- -0.2658601105f, -0.4462319911f, -0.5314732790f, -0.5557164550f,
- -0.5506924391f, -0.5339364409f, -0.5332472920f, -0.5278582573f,
- -0.5217716098f, -0.5163972378f, -0.5097853541f, -0.5056754351f,
- -0.5032451153f, -0.5018416047f, -0.5000000596f},
- {0.5000000596f, 0.5016490817f, 0.5028999448f, 0.5050527453f,
- 0.5086503625f, 0.5142914653f, 0.5186827183f, 0.5232735872f,
- 0.5263579488f, 0.5235015154f, 0.5180896521f, 0.5119442344f,
- 0.4763633311f, 0.3873094022f, 0.2241454273f, 0.0000000000f,
- -0.2241454422f, -0.3873094022f, -0.4763633311f, -0.5119441748f,
- -0.5180897117f, -0.5235014558f, -0.5263578892f, -0.5232735872f,
- -0.5186827779f, -0.5142914653f, -0.5086504221f, -0.5050527453f,
- -0.5028999448f, -0.5016490817f, -0.5000000596f},
- {0.5000000000f, 0.5011672974f, 0.5020375848f, 0.5035016537f,
- 0.5058373213f, 0.5091226101f, 0.5111725330f, 0.5122836232f,
- 0.5101932287f, 0.4998099208f, 0.4705953300f, 0.4316509366f,
- 0.3780660927f, 0.2909715176f, 0.1608594507f, 0.0000000000f,
- -0.1608594358f, -0.2909715474f, -0.3780661225f, -0.4316509366f,
- -0.4705953598f, -0.4998098910f, -0.5101932287f, -0.5122836232f,
- -0.5111725926f, -0.5091226101f, -0.5058373213f, -0.5035016537f,
- -0.5020375848f, -0.5011672974f, -0.5000000000f},
- {0.5000000000f, 0.5007008314f, 0.5012044907f, 0.5020091534f,
- 0.5031501055f, 0.5042502880f, 0.5041841865f, 0.5022494197f,
- 0.4958427250f, 0.4796353281f, 0.4435823262f, 0.4007542133f,
- 0.3363020718f, 0.2460453361f, 0.1309203655f, 0.0000000000f,
- -0.1309203655f, -0.2460453361f, -0.3363020718f, -0.4007542133f,
- -0.4435823560f, -0.4796353281f, -0.4958426654f, -0.5022494197f,
- -0.5041842461f, -0.5042502880f, -0.5031501651f, -0.5020092130f,
- -0.5012044907f, -0.5007008314f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4988015890f, 0.4978311360f, 0.4960248172f,
- 0.4925622642f, 0.4856388867f, 0.4782574177f, 0.4665130079f,
- 0.4475508630f, 0.4167790711f, 0.3674541414f, 0.3202401102f,
- 0.2591174543f, 0.1835071146f, 0.0954245627f, 0.0000000000f,
- -0.0954245627f, -0.1835071146f, -0.2591174543f, -0.3202401102f,
- -0.3674541116f, -0.4167790413f, -0.4475508630f, -0.4665130079f,
- -0.4782574475f, -0.4856388569f, -0.4925622940f, -0.4960248470f,
- -0.4978311062f, -0.4988015294f, -0.5000000000f},
- {0.5000000000f, 0.4980117977f, 0.4964371324f, 0.4935791790f,
- 0.4883186519f, 0.4784279168f, 0.4685191810f, 0.4536466300f,
- 0.4311205149f, 0.3969023824f, 0.3454375863f, 0.2984294593f,
- 0.2395204306f, 0.1685037017f, 0.0872381777f, 0.0000000000f,
- -0.0872381777f, -0.1685037017f, -0.2395204306f, -0.2984294593f,
- -0.3454375863f, -0.3969023526f, -0.4311204851f, -0.4536466599f,
- -0.4685192108f, -0.4784279168f, -0.4883186519f, -0.4935792387f,
- -0.4964371920f, -0.4980118275f, -0.5000000000f}},
+ {0.5000000596f, 0.5019683242f, 0.5034724474f, 0.5060860515f, 0.5105357766f,
+ 0.5177959800f, 0.5238327980f, 0.5309391022f, 0.5379270911f, 0.5411472321f,
+ 0.5744605064f, 0.5888174176f, 0.5752269030f, 0.4958270788f, 0.3029264808f,
+ 0.0000000000f, -0.3029265106f, -0.4958270490f, -0.5752269626f, -0.5888174772f,
+ -0.5744605064f, -0.5411472321f, -0.5379270911f, -0.5309391022f, -0.5238327980f,
+ -0.5177959800f, -0.5105358362f, -0.5060860515f, -0.5034723878f, -0.5019683242f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5018416047f, 0.5032451153f, 0.5056754351f, 0.5097854137f,
+ 0.5163972378f, 0.5217715502f, 0.5278583169f, 0.5332472920f, 0.5339364409f,
+ 0.5506924391f, 0.5557163954f, 0.5314732194f, 0.4462319911f, 0.2658600807f,
+ 0.0000000000f, -0.2658601105f, -0.4462319911f, -0.5314732790f, -0.5557164550f,
+ -0.5506924391f, -0.5339364409f, -0.5332472920f, -0.5278582573f, -0.5217716098f,
+ -0.5163972378f, -0.5097853541f, -0.5056754351f, -0.5032451153f, -0.5018416047f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5016490817f, 0.5028999448f, 0.5050527453f, 0.5086503625f,
+ 0.5142914653f, 0.5186827183f, 0.5232735872f, 0.5263579488f, 0.5235015154f,
+ 0.5180896521f, 0.5119442344f, 0.4763633311f, 0.3873094022f, 0.2241454273f,
+ 0.0000000000f, -0.2241454422f, -0.3873094022f, -0.4763633311f, -0.5119441748f,
+ -0.5180897117f, -0.5235014558f, -0.5263578892f, -0.5232735872f, -0.5186827779f,
+ -0.5142914653f, -0.5086504221f, -0.5050527453f, -0.5028999448f, -0.5016490817f,
+ -0.5000000596f},
+ {0.5000000000f, 0.5011672974f, 0.5020375848f, 0.5035016537f, 0.5058373213f,
+ 0.5091226101f, 0.5111725330f, 0.5122836232f, 0.5101932287f, 0.4998099208f,
+ 0.4705953300f, 0.4316509366f, 0.3780660927f, 0.2909715176f, 0.1608594507f,
+ 0.0000000000f, -0.1608594358f, -0.2909715474f, -0.3780661225f, -0.4316509366f,
+ -0.4705953598f, -0.4998098910f, -0.5101932287f, -0.5122836232f, -0.5111725926f,
+ -0.5091226101f, -0.5058373213f, -0.5035016537f, -0.5020375848f, -0.5011672974f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5007008314f, 0.5012044907f, 0.5020091534f, 0.5031501055f,
+ 0.5042502880f, 0.5041841865f, 0.5022494197f, 0.4958427250f, 0.4796353281f,
+ 0.4435823262f, 0.4007542133f, 0.3363020718f, 0.2460453361f, 0.1309203655f,
+ 0.0000000000f, -0.1309203655f, -0.2460453361f, -0.3363020718f, -0.4007542133f,
+ -0.4435823560f, -0.4796353281f, -0.4958426654f, -0.5022494197f, -0.5041842461f,
+ -0.5042502880f, -0.5031501651f, -0.5020092130f, -0.5012044907f, -0.5007008314f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4988015890f, 0.4978311360f, 0.4960248172f, 0.4925622642f,
+ 0.4856388867f, 0.4782574177f, 0.4665130079f, 0.4475508630f, 0.4167790711f,
+ 0.3674541414f, 0.3202401102f, 0.2591174543f, 0.1835071146f, 0.0954245627f,
+ 0.0000000000f, -0.0954245627f, -0.1835071146f, -0.2591174543f, -0.3202401102f,
+ -0.3674541116f, -0.4167790413f, -0.4475508630f, -0.4665130079f, -0.4782574475f,
+ -0.4856388569f, -0.4925622940f, -0.4960248470f, -0.4978311062f, -0.4988015294f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4980117977f, 0.4964371324f, 0.4935791790f, 0.4883186519f,
+ 0.4784279168f, 0.4685191810f, 0.4536466300f, 0.4311205149f, 0.3969023824f,
+ 0.3454375863f, 0.2984294593f, 0.2395204306f, 0.1685037017f, 0.0872381777f,
+ 0.0000000000f, -0.0872381777f, -0.1685037017f, -0.2395204306f, -0.2984294593f,
+ -0.3454375863f, -0.3969023526f, -0.4311204851f, -0.4536466599f, -0.4685192108f,
+ -0.4784279168f, -0.4883186519f, -0.4935792387f, -0.4964371920f, -0.4980118275f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.5010477901f, 0.5018239021f, 0.5031182766f,
- 0.5051453114f, 0.5078617930f, 0.5093557239f, 0.5096575022f,
- 0.5064009428f, 0.4944033921f, 0.4632124305f, 0.4230656624f,
- 0.3596196771f, 0.2740281522f, 0.1503099501f, 0.0000000000f,
- -0.1503099501f, -0.2740281820f, -0.3596196771f, -0.4230656624f,
- -0.4632124305f, -0.4944033921f, -0.5064008832f, -0.5096575022f,
- -0.5093557835f, -0.5078617930f, -0.5051452518f, -0.5031182766f,
- -0.5018239021f, -0.5010477304f, -0.5000000000f},
- {0.5000000000f, 0.5009795427f, 0.5017020702f, 0.5028998852f,
- 0.5047514439f, 0.5071461797f, 0.5083272457f, 0.5081763268f,
- 0.5042734742f, 0.4913944900f, 0.4591503739f, 0.4183884263f,
- 0.3544511497f, 0.2652117610f, 0.1448854804f, 0.0000000000f,
- -0.1448854804f, -0.2652117610f, -0.3544511199f, -0.4183884561f,
- -0.4591503739f, -0.4913944900f, -0.5042735338f, -0.5081762671f,
- -0.5083272457f, -0.5071461797f, -0.5047514439f, -0.5028998256f,
- -0.5017020702f, -0.5009795427f, -0.5000000000f},
- {0.5000000000f, 0.5008758903f, 0.5015168786f, 0.5025681257f,
- 0.5041542053f, 0.5060635209f, 0.5067747831f, 0.5059480071f,
- 0.5010885596f, 0.4869216979f, 0.4531719685f, 0.4115628898f,
- 0.3473647535f, 0.2555567026f, 0.1373466700f, 0.0000000000f,
- -0.1373466551f, -0.2555567324f, -0.3473647535f, -0.4115628600f,
- -0.4531720281f, -0.4869216383f, -0.5010885596f, -0.5059480071f,
- -0.5067747831f, -0.5060635209f, -0.5041542649f, -0.5025681257f,
- -0.5015168786f, -0.5008758307f, -0.5000000000f},
- {0.5000000000f, 0.5006161928f, 0.5010533929f, 0.5017392039f,
- 0.5026661158f, 0.5033791661f, 0.5029437542f, 0.5004872084f,
- 0.4933607578f, 0.4762223363f, 0.4391518831f, 0.3958170116f,
- 0.3313111961f, 0.2418053001f, 0.1284317970f, 0.0000000000f,
- -0.1284317821f, -0.2418053001f, -0.3313112259f, -0.3958170116f,
- -0.4391518831f, -0.4762222767f, -0.4933607578f, -0.5004871488f,
- -0.5029437542f, -0.5033791065f, -0.5026661158f, -0.5017392635f,
- -0.5010534525f, -0.5006161332f, -0.5000000000f},
- {0.5000000000f, 0.5003644228f, 0.5006047487f, 0.5009382963f,
- 0.5012336969f, 0.5008131266f, 0.4993060529f, 0.4953506589f,
- 0.4861895740f, 0.4664809704f, 0.4267134368f, 0.3821379840f,
- 0.3176781237f, 0.2303763181f, 0.1217892319f, 0.0000000000f,
- -0.1217892319f, -0.2303763330f, -0.3176781535f, -0.3821379840f,
- -0.4267134368f, -0.4664809406f, -0.4861895740f, -0.4953505993f,
- -0.4993061125f, -0.5008131266f, -0.5012336969f, -0.5009382963f,
- -0.5006047487f, -0.5003644228f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4993358850f, 0.4987771511f, 0.4976935983f,
- 0.4954852164f, 0.4906864166f, 0.4851732254f, 0.4758279026f,
- 0.4597451985f, 0.4319911599f, 0.3849090934f, 0.3379579186f,
- 0.2754054070f, 0.1962166131f, 0.1024479717f, 0.0000000000f,
- -0.1024479717f, -0.1962166280f, -0.2754054070f, -0.3379579186f,
- -0.3849091530f, -0.4319911599f, -0.4597451687f, -0.4758278131f,
- -0.4851732850f, -0.4906864166f, -0.4954852462f, -0.4976935983f,
- -0.4987771511f, -0.4993358850f, -0.5000000000f},
- {0.5000000000f, 0.4989066720f, 0.4980169535f, 0.4963521063f,
- 0.4931337833f, 0.4866205156f, 0.4795958996f, 0.4683040977f,
- 0.4498754740f, 0.4196476638f, 0.3707037270f, 0.3235089183f,
- 0.2620966136f, 0.1858147979f, 0.0966935307f, 0.0000000000f,
- -0.0966935158f, -0.1858148128f, -0.2620966136f, -0.3235089481f,
- -0.3707037270f, -0.4196476340f, -0.4498754442f, -0.4683040380f,
- -0.4795959294f, -0.4866205454f, -0.4931338131f, -0.4963521063f,
- -0.4980169237f, -0.4989066422f, -0.5000000000f}},
+ {0.5000000000f, 0.5010477901f, 0.5018239021f, 0.5031182766f, 0.5051453114f,
+ 0.5078617930f, 0.5093557239f, 0.5096575022f, 0.5064009428f, 0.4944033921f,
+ 0.4632124305f, 0.4230656624f, 0.3596196771f, 0.2740281522f, 0.1503099501f,
+ 0.0000000000f, -0.1503099501f, -0.2740281820f, -0.3596196771f, -0.4230656624f,
+ -0.4632124305f, -0.4944033921f, -0.5064008832f, -0.5096575022f, -0.5093557835f,
+ -0.5078617930f, -0.5051452518f, -0.5031182766f, -0.5018239021f, -0.5010477304f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5009795427f, 0.5017020702f, 0.5028998852f, 0.5047514439f,
+ 0.5071461797f, 0.5083272457f, 0.5081763268f, 0.5042734742f, 0.4913944900f,
+ 0.4591503739f, 0.4183884263f, 0.3544511497f, 0.2652117610f, 0.1448854804f,
+ 0.0000000000f, -0.1448854804f, -0.2652117610f, -0.3544511199f, -0.4183884561f,
+ -0.4591503739f, -0.4913944900f, -0.5042735338f, -0.5081762671f, -0.5083272457f,
+ -0.5071461797f, -0.5047514439f, -0.5028998256f, -0.5017020702f, -0.5009795427f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5008758903f, 0.5015168786f, 0.5025681257f, 0.5041542053f,
+ 0.5060635209f, 0.5067747831f, 0.5059480071f, 0.5010885596f, 0.4869216979f,
+ 0.4531719685f, 0.4115628898f, 0.3473647535f, 0.2555567026f, 0.1373466700f,
+ 0.0000000000f, -0.1373466551f, -0.2555567324f, -0.3473647535f, -0.4115628600f,
+ -0.4531720281f, -0.4869216383f, -0.5010885596f, -0.5059480071f, -0.5067747831f,
+ -0.5060635209f, -0.5041542649f, -0.5025681257f, -0.5015168786f, -0.5008758307f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5006161928f, 0.5010533929f, 0.5017392039f, 0.5026661158f,
+ 0.5033791661f, 0.5029437542f, 0.5004872084f, 0.4933607578f, 0.4762223363f,
+ 0.4391518831f, 0.3958170116f, 0.3313111961f, 0.2418053001f, 0.1284317970f,
+ 0.0000000000f, -0.1284317821f, -0.2418053001f, -0.3313112259f, -0.3958170116f,
+ -0.4391518831f, -0.4762222767f, -0.4933607578f, -0.5004871488f, -0.5029437542f,
+ -0.5033791065f, -0.5026661158f, -0.5017392635f, -0.5010534525f, -0.5006161332f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5003644228f, 0.5006047487f, 0.5009382963f, 0.5012336969f,
+ 0.5008131266f, 0.4993060529f, 0.4953506589f, 0.4861895740f, 0.4664809704f,
+ 0.4267134368f, 0.3821379840f, 0.3176781237f, 0.2303763181f, 0.1217892319f,
+ 0.0000000000f, -0.1217892319f, -0.2303763330f, -0.3176781535f, -0.3821379840f,
+ -0.4267134368f, -0.4664809406f, -0.4861895740f, -0.4953505993f, -0.4993061125f,
+ -0.5008131266f, -0.5012336969f, -0.5009382963f, -0.5006047487f, -0.5003644228f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4993358850f, 0.4987771511f, 0.4976935983f, 0.4954852164f,
+ 0.4906864166f, 0.4851732254f, 0.4758279026f, 0.4597451985f, 0.4319911599f,
+ 0.3849090934f, 0.3379579186f, 0.2754054070f, 0.1962166131f, 0.1024479717f,
+ 0.0000000000f, -0.1024479717f, -0.1962166280f, -0.2754054070f, -0.3379579186f,
+ -0.3849091530f, -0.4319911599f, -0.4597451687f, -0.4758278131f, -0.4851732850f,
+ -0.4906864166f, -0.4954852462f, -0.4976935983f, -0.4987771511f, -0.4993358850f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4989066720f, 0.4980169535f, 0.4963521063f, 0.4931337833f,
+ 0.4866205156f, 0.4795958996f, 0.4683040977f, 0.4498754740f, 0.4196476638f,
+ 0.3707037270f, 0.3235089183f, 0.2620966136f, 0.1858147979f, 0.0966935307f,
+ 0.0000000000f, -0.0966935158f, -0.1858148128f, -0.2620966136f, -0.3235089481f,
+ -0.3707037270f, -0.4196476340f, -0.4498754442f, -0.4683040380f, -0.4795959294f,
+ -0.4866205454f, -0.4931338131f, -0.4963521063f, -0.4980169237f, -0.4989066422f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f}},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.4988959730f, 0.4979980290f, 0.4963187873f,
- 0.4930755794f, 0.4865204096f, 0.4794592559f, 0.4681210220f,
- 0.4496374130f, 0.4193531871f, 0.3703692853f, 0.3231719136f,
- 0.2617889047f, 0.1855761111f, 0.0965621620f, 0.0000000000f,
- -0.0965621546f, -0.1855761409f, -0.2617889345f, -0.3231719136f,
- -0.3703693151f, -0.4193531871f, -0.4496374130f, -0.4681210220f,
- -0.4794592857f, -0.4865204096f, -0.4930756390f, -0.4963187873f,
- -0.4979980290f, -0.4988959432f, -0.5000000000f},
- {0.5000000000f, 0.4989632964f, 0.4981172681f, 0.4965288043f,
- 0.4934426546f, 0.4871520996f, 0.4803220332f, 0.4692780674f,
- 0.4511435628f, 0.4212186337f, 0.3724914193f, 0.3253129125f,
- 0.2637456059f, 0.1870953143f, 0.0973988548f, 0.0000000000f,
- -0.0973988473f, -0.1870953292f, -0.2637456059f, -0.3253128827f,
- -0.3724914193f, -0.4212186038f, -0.4511435330f, -0.4692780375f,
- -0.4803220928f, -0.4871520996f, -0.4934426844f, -0.4965288043f,
- -0.4981172979f, -0.4989632666f, -0.5000000000f},
- {0.5000000000f, 0.4990658462f, 0.4982986450f, 0.4968487024f,
- 0.4940025806f, 0.4881176353f, 0.4816432595f, 0.4710544348f,
- 0.4534637332f, 0.4241041243f, 0.3757902384f, 0.3286523819f,
- 0.2668075860f, 0.1894792318f, 0.0987142026f, 0.0000000000f,
- -0.0987141877f, -0.1894792318f, -0.2668075860f, -0.3286523819f,
- -0.3757902384f, -0.4241040945f, -0.4534636736f, -0.4710544348f,
- -0.4816432893f, -0.4881176651f, -0.4940026104f, -0.4968487322f,
- -0.4982987046f, -0.4990658164f, -0.5000000000f},
- {0.5000000000f, 0.4993230999f, 0.4987545311f, 0.4976536036f,
- 0.4954148531f, 0.4905641079f, 0.4850046337f, 0.4755989015f,
- 0.4594423175f, 0.4316083491f, 0.3844630420f, 0.3375000954f,
- 0.2749801576f, 0.1958818436f, 0.1022618562f, 0.0000000000f,
- -0.1022618413f, -0.1958818436f, -0.2749801576f, -0.3375000954f,
- -0.3844630718f, -0.4316083491f, -0.4594423175f, -0.4755989015f,
- -0.4850046337f, -0.4905640781f, -0.4954148829f, -0.4976535738f,
- -0.4987545311f, -0.4993230700f, -0.5000000000f},
- {0.5000000000f, 0.4995733500f, 0.4991982579f, 0.4984387755f,
- 0.4967978001f, 0.4929749966f, 0.4883366227f, 0.4801396132f,
- 0.4654795229f, 0.4392894208f, 0.3934856057f, 0.3468125761f,
- 0.2836797237f, 0.2027634382f, 0.1061001420f, 0.0000000000f,
- -0.1061001420f, -0.2027634382f, -0.2836797237f, -0.3468125463f,
- -0.3934856355f, -0.4392894208f, -0.4654795229f, -0.4801395833f,
- -0.4883366823f, -0.4929749668f, -0.4967978299f, -0.4984387755f,
- -0.4991982877f, -0.4995733202f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.5006032586f, 0.5010305047f, 0.5016981363f,
- 0.5025926232f, 0.5032470226f, 0.5027559996f, 0.5002208352f,
- 0.4929866195f, 0.4757096469f, 0.4384897351f, 0.3950820863f,
- 0.3305716217f, 0.2411795706f, 0.1280656755f, 0.0000000000f,
- -0.1280656755f, -0.2411796004f, -0.3305716217f, -0.3950820863f,
- -0.4384897351f, -0.4757096469f, -0.4929866195f, -0.5002207756f,
- -0.5027559996f, -0.5032470226f, -0.5025926828f, -0.5016981959f,
- -0.5010305047f, -0.5006032586f, -0.5000000000f},
- {0.5000000000f, 0.5010370016f, 0.5018045902f, 0.5030835867f,
- 0.5050826669f, 0.5077480078f, 0.5091921091f, 0.5094215274f,
- 0.5060614347f, 0.4939221144f, 0.4625604451f, 0.4223127663f,
- 0.3585619628f, 0.2725898027f, 0.1494219899f, 0.0000000000f,
- -0.1494219750f, -0.2725898027f, -0.3585619926f, -0.4223127961f,
- -0.4625605047f, -0.4939221144f, -0.5060614347f, -0.5094215274f,
- -0.5091921091f, -0.5077480078f, -0.5050827861f, -0.5030835867f,
- -0.5018045902f, -0.5010369420f, -0.5000000000f}},
+ {0.5000000000f, 0.4988959730f, 0.4979980290f, 0.4963187873f, 0.4930755794f,
+ 0.4865204096f, 0.4794592559f, 0.4681210220f, 0.4496374130f, 0.4193531871f,
+ 0.3703692853f, 0.3231719136f, 0.2617889047f, 0.1855761111f, 0.0965621620f,
+ 0.0000000000f, -0.0965621546f, -0.1855761409f, -0.2617889345f, -0.3231719136f,
+ -0.3703693151f, -0.4193531871f, -0.4496374130f, -0.4681210220f, -0.4794592857f,
+ -0.4865204096f, -0.4930756390f, -0.4963187873f, -0.4979980290f, -0.4988959432f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4989632964f, 0.4981172681f, 0.4965288043f, 0.4934426546f,
+ 0.4871520996f, 0.4803220332f, 0.4692780674f, 0.4511435628f, 0.4212186337f,
+ 0.3724914193f, 0.3253129125f, 0.2637456059f, 0.1870953143f, 0.0973988548f,
+ 0.0000000000f, -0.0973988473f, -0.1870953292f, -0.2637456059f, -0.3253128827f,
+ -0.3724914193f, -0.4212186038f, -0.4511435330f, -0.4692780375f, -0.4803220928f,
+ -0.4871520996f, -0.4934426844f, -0.4965288043f, -0.4981172979f, -0.4989632666f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4990658462f, 0.4982986450f, 0.4968487024f, 0.4940025806f,
+ 0.4881176353f, 0.4816432595f, 0.4710544348f, 0.4534637332f, 0.4241041243f,
+ 0.3757902384f, 0.3286523819f, 0.2668075860f, 0.1894792318f, 0.0987142026f,
+ 0.0000000000f, -0.0987141877f, -0.1894792318f, -0.2668075860f, -0.3286523819f,
+ -0.3757902384f, -0.4241040945f, -0.4534636736f, -0.4710544348f, -0.4816432893f,
+ -0.4881176651f, -0.4940026104f, -0.4968487322f, -0.4982987046f, -0.4990658164f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4993230999f, 0.4987545311f, 0.4976536036f, 0.4954148531f,
+ 0.4905641079f, 0.4850046337f, 0.4755989015f, 0.4594423175f, 0.4316083491f,
+ 0.3844630420f, 0.3375000954f, 0.2749801576f, 0.1958818436f, 0.1022618562f,
+ 0.0000000000f, -0.1022618413f, -0.1958818436f, -0.2749801576f, -0.3375000954f,
+ -0.3844630718f, -0.4316083491f, -0.4594423175f, -0.4755989015f, -0.4850046337f,
+ -0.4905640781f, -0.4954148829f, -0.4976535738f, -0.4987545311f, -0.4993230700f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4995733500f, 0.4991982579f, 0.4984387755f, 0.4967978001f,
+ 0.4929749966f, 0.4883366227f, 0.4801396132f, 0.4654795229f, 0.4392894208f,
+ 0.3934856057f, 0.3468125761f, 0.2836797237f, 0.2027634382f, 0.1061001420f,
+ 0.0000000000f, -0.1061001420f, -0.2027634382f, -0.2836797237f, -0.3468125463f,
+ -0.3934856355f, -0.4392894208f, -0.4654795229f, -0.4801395833f, -0.4883366823f,
+ -0.4929749668f, -0.4967978299f, -0.4984387755f, -0.4991982877f, -0.4995733202f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5006032586f, 0.5010305047f, 0.5016981363f, 0.5025926232f,
+ 0.5032470226f, 0.5027559996f, 0.5002208352f, 0.4929866195f, 0.4757096469f,
+ 0.4384897351f, 0.3950820863f, 0.3305716217f, 0.2411795706f, 0.1280656755f,
+ 0.0000000000f, -0.1280656755f, -0.2411796004f, -0.3305716217f, -0.3950820863f,
+ -0.4384897351f, -0.4757096469f, -0.4929866195f, -0.5002207756f, -0.5027559996f,
+ -0.5032470226f, -0.5025926828f, -0.5016981959f, -0.5010305047f, -0.5006032586f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5010370016f, 0.5018045902f, 0.5030835867f, 0.5050826669f,
+ 0.5077480078f, 0.5091921091f, 0.5094215274f, 0.5060614347f, 0.4939221144f,
+ 0.4625604451f, 0.4223127663f, 0.3585619628f, 0.2725898027f, 0.1494219899f,
+ 0.0000000000f, -0.1494219750f, -0.2725898027f, -0.3585619926f, -0.4223127961f,
+ -0.4625605047f, -0.4939221144f, -0.5060614347f, -0.5094215274f, -0.5091921091f,
+ -0.5077480078f, -0.5050827861f, -0.5030835867f, -0.5018045902f, -0.5010369420f,
+ -0.5000000000f}},
{
- {0.5000000000f, 0.4979922175f, 0.4964025617f, 0.4935186803f,
- 0.4882142544f, 0.4782521725f, 0.4682838917f, 0.4533392787f,
- 0.4307336509f, 0.3964424431f, 0.3449379802f, 0.2979410589f,
- 0.2390869260f, 0.1681751311f, 0.0870600939f, 0.0000000000f,
- -0.0870600939f, -0.1681751460f, -0.2390869558f, -0.2979410589f,
- -0.3449379802f, -0.3964424431f, -0.4307335615f, -0.4533392787f,
- -0.4682839215f, -0.4782521725f, -0.4882142544f, -0.4935186505f,
- -0.4964025617f, -0.4979921579f, -0.5000000000f},
- {0.5000000000f, 0.4981160462f, 0.4966207743f, 0.4939002991f,
- 0.4888732731f, 0.4793626070f, 0.4697723091f, 0.4552863240f,
- 0.4331888258f, 0.3993673325f, 0.3481221795f, 0.3010587096f,
- 0.2418579161f, 0.1702777445f, 0.0882006139f, 0.0000000000f,
- -0.0882006139f, -0.1702777743f, -0.2418579161f, -0.3010587096f,
- -0.3481221795f, -0.3993673027f, -0.4331887960f, -0.4552863240f,
- -0.4697723091f, -0.4793626070f, -0.4888732731f, -0.4939003289f,
- -0.4966207743f, -0.4981160164f, -0.5000000000f},
- {0.5000000000f, 0.4983044863f, 0.4969531596f, 0.4944825768f,
- 0.4898807108f, 0.4810664356f, 0.4720634520f, 0.4582964182f,
- 0.4370048046f, 0.4039427638f, 0.3531388044f, 0.3059939146f,
- 0.2462634593f, 0.1736325473f, 0.0900245756f, 0.0000000000f,
- -0.0900245681f, -0.1736325473f, -0.2462634593f, -0.3059939146f,
- -0.3531388342f, -0.4039427042f, -0.4370048046f, -0.4582964182f,
- -0.4720634818f, -0.4810664356f, -0.4898807704f, -0.4944825768f,
- -0.4969531298f, -0.4983044863f, -0.5000000000f},
- {0.5000000000f, 0.4987780154f, 0.4977895021f, 0.4959515929f,
- 0.4924345016f, 0.4854198098f, 0.4779591858f, 0.4661146402f,
- 0.4470350742f, 0.4161445498f, 0.3667378426f, 0.3195213675f,
- 0.2584639788f, 0.1830018908f, 0.0951471180f, 0.0000000000f,
- -0.0951471031f, -0.1830018908f, -0.2584639788f, -0.3195213974f,
- -0.3667378724f, -0.4161445200f, -0.4470350742f, -0.4661146402f,
- -0.4779591858f, -0.4854198396f, -0.4924345613f, -0.4959515929f,
- -0.4977895319f, -0.4987780452f, -0.5000000000f},
- {0.5000000000f, 0.4992391467f, 0.4986056089f, 0.4973905385f,
- 0.4949527979f, 0.4897618592f, 0.4839001894f, 0.4741017818f,
- 0.4574657679f, 0.4291163385f, 0.3815677166f, 0.3345352709f,
- 0.2722316682f, 0.1937220246f, 0.1010626405f, 0.0000000000f,
- -0.1010626331f, -0.1937220395f, -0.2722316980f, -0.3345352709f,
- -0.3815677166f, -0.4291163385f, -0.4574657679f, -0.4741017818f,
- -0.4839001894f, -0.4897618592f, -0.4949527979f, -0.4973905683f,
- -0.4986056685f, -0.4992391169f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000000f, 0.5011434555f, 0.5019949079f, 0.5034251213f,
- 0.5056989789f, 0.5088702440f, 0.5108084083f, 0.5117562413f,
- 0.5094295144f, 0.4987166524f, 0.4690935910f, 0.4298956990f,
- 0.3742347658f, 0.2874245048f, 0.1586372405f, 0.0000000000f,
- -0.1586372405f, -0.2874245048f, -0.3742347956f, -0.4298956990f,
- -0.4690936506f, -0.4987166524f, -0.5094294548f, -0.5117561817f,
- -0.5108084679f, -0.5088702440f, -0.5056990385f, -0.5034251213f,
- -0.5019949675f, -0.5011434555f, -0.5000000000f},
- {0.5000000596f, 0.5019482374f, 0.5034363270f, 0.5060207844f,
- 0.5104164481f, 0.5175731182f, 0.5235039592f, 0.5304464102f,
- 0.5371760726f, 0.5399830937f, 0.5705516338f, 0.5833023787f,
- 0.5678069592f, 0.4872313440f, 0.2963676453f, 0.0000000000f,
- -0.2963677049f, -0.4872313440f, -0.5678069592f, -0.5833023787f,
- -0.5705516338f, -0.5399830341f, -0.5371760726f, -0.5304464102f,
- -0.5235040188f, -0.5175731182f, -0.5104165077f, -0.5060207844f,
- -0.5034362674f, -0.5019482374f, -0.5000000596f}},
+ {0.5000000000f, 0.4979922175f, 0.4964025617f, 0.4935186803f, 0.4882142544f,
+ 0.4782521725f, 0.4682838917f, 0.4533392787f, 0.4307336509f, 0.3964424431f,
+ 0.3449379802f, 0.2979410589f, 0.2390869260f, 0.1681751311f, 0.0870600939f,
+ 0.0000000000f, -0.0870600939f, -0.1681751460f, -0.2390869558f, -0.2979410589f,
+ -0.3449379802f, -0.3964424431f, -0.4307335615f, -0.4533392787f, -0.4682839215f,
+ -0.4782521725f, -0.4882142544f, -0.4935186505f, -0.4964025617f, -0.4979921579f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4981160462f, 0.4966207743f, 0.4939002991f, 0.4888732731f,
+ 0.4793626070f, 0.4697723091f, 0.4552863240f, 0.4331888258f, 0.3993673325f,
+ 0.3481221795f, 0.3010587096f, 0.2418579161f, 0.1702777445f, 0.0882006139f,
+ 0.0000000000f, -0.0882006139f, -0.1702777743f, -0.2418579161f, -0.3010587096f,
+ -0.3481221795f, -0.3993673027f, -0.4331887960f, -0.4552863240f, -0.4697723091f,
+ -0.4793626070f, -0.4888732731f, -0.4939003289f, -0.4966207743f, -0.4981160164f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4983044863f, 0.4969531596f, 0.4944825768f, 0.4898807108f,
+ 0.4810664356f, 0.4720634520f, 0.4582964182f, 0.4370048046f, 0.4039427638f,
+ 0.3531388044f, 0.3059939146f, 0.2462634593f, 0.1736325473f, 0.0900245756f,
+ 0.0000000000f, -0.0900245681f, -0.1736325473f, -0.2462634593f, -0.3059939146f,
+ -0.3531388342f, -0.4039427042f, -0.4370048046f, -0.4582964182f, -0.4720634818f,
+ -0.4810664356f, -0.4898807704f, -0.4944825768f, -0.4969531298f, -0.4983044863f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4987780154f, 0.4977895021f, 0.4959515929f, 0.4924345016f,
+ 0.4854198098f, 0.4779591858f, 0.4661146402f, 0.4470350742f, 0.4161445498f,
+ 0.3667378426f, 0.3195213675f, 0.2584639788f, 0.1830018908f, 0.0951471180f,
+ 0.0000000000f, -0.0951471031f, -0.1830018908f, -0.2584639788f, -0.3195213974f,
+ -0.3667378724f, -0.4161445200f, -0.4470350742f, -0.4661146402f, -0.4779591858f,
+ -0.4854198396f, -0.4924345613f, -0.4959515929f, -0.4977895319f, -0.4987780452f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4992391467f, 0.4986056089f, 0.4973905385f, 0.4949527979f,
+ 0.4897618592f, 0.4839001894f, 0.4741017818f, 0.4574657679f, 0.4291163385f,
+ 0.3815677166f, 0.3345352709f, 0.2722316682f, 0.1937220246f, 0.1010626405f,
+ 0.0000000000f, -0.1010626331f, -0.1937220395f, -0.2722316980f, -0.3345352709f,
+ -0.3815677166f, -0.4291163385f, -0.4574657679f, -0.4741017818f, -0.4839001894f,
+ -0.4897618592f, -0.4949527979f, -0.4973905683f, -0.4986056685f, -0.4992391169f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000000f, 0.5011434555f, 0.5019949079f, 0.5034251213f, 0.5056989789f,
+ 0.5088702440f, 0.5108084083f, 0.5117562413f, 0.5094295144f, 0.4987166524f,
+ 0.4690935910f, 0.4298956990f, 0.3742347658f, 0.2874245048f, 0.1586372405f,
+ 0.0000000000f, -0.1586372405f, -0.2874245048f, -0.3742347956f, -0.4298956990f,
+ -0.4690936506f, -0.4987166524f, -0.5094294548f, -0.5117561817f, -0.5108084679f,
+ -0.5088702440f, -0.5056990385f, -0.5034251213f, -0.5019949675f, -0.5011434555f,
+ -0.5000000000f},
+ {0.5000000596f, 0.5019482374f, 0.5034363270f, 0.5060207844f, 0.5104164481f,
+ 0.5175731182f, 0.5235039592f, 0.5304464102f, 0.5371760726f, 0.5399830937f,
+ 0.5705516338f, 0.5833023787f, 0.5678069592f, 0.4872313440f, 0.2963676453f,
+ 0.0000000000f, -0.2963677049f, -0.4872313440f, -0.5678069592f, -0.5833023787f,
+ -0.5705516338f, -0.5399830341f, -0.5371760726f, -0.5304464102f, -0.5235040188f,
+ -0.5175731182f, -0.5104165077f, -0.5060207844f, -0.5034362674f, -0.5019482374f,
+ -0.5000000596f}},
{
- {0.5000000000f, 0.4973910451f, 0.4953450263f, 0.4916738272f,
- 0.4850449860f, 0.4729567766f, 0.4612380564f, 0.4442087412f,
- 0.4193551242f, 0.3830735385f, 0.3306014538f, 0.2840420604f,
- 0.2268431634f, 0.1589508802f, 0.0820798650f, 0.0000000000f,
- -0.0820798576f, -0.1589508951f, -0.2268431783f, -0.2840420604f,
- -0.3306014538f, -0.3830735683f, -0.4193551242f, -0.4442086816f,
- -0.4612380564f, -0.4729567766f, -0.4850450158f, -0.4916738570f,
- -0.4953449965f, -0.4973909855f, -0.5000000000f},
- {0.5000000000f, 0.4975522459f, 0.4956282973f, 0.4921671450f,
- 0.4858898818f, 0.4743613005f, 0.4630986154f, 0.4466060102f,
- 0.4223214984f, 0.3865298629f, 0.3342745304f, 0.2875820100f,
- 0.2299449295f, 0.1612776965f, 0.0833326429f, 0.0000000000f,
- -0.0833326355f, -0.1612777114f, -0.2299449295f, -0.2875820100f,
- -0.3342745602f, -0.3865298331f, -0.4223214984f, -0.4466060400f,
- -0.4630986452f, -0.4743613005f, -0.4858898818f, -0.4921671748f,
- -0.4956283271f, -0.4975521863f, -0.5000000000f},
- {0.5000000000f, 0.4977977276f, 0.4960601032f, 0.4929202795f,
- 0.4871834517f, 0.4765217602f, 0.4659720957f, 0.4503277540f,
- 0.4269563556f, 0.3919707835f, 0.3401035368f, 0.2932292819f,
- 0.2349164933f, 0.1650211811f, 0.0853530467f, 0.0000000000f,
- -0.0853530392f, -0.1650211811f, -0.2349164784f, -0.2932292819f,
- -0.3401035368f, -0.3919707835f, -0.4269563556f, -0.4503277242f,
- -0.4659721255f, -0.4765217602f, -0.4871834517f, -0.4929203391f,
- -0.4960601330f, -0.4977976680f, -0.5000000000f},
- {0.5000000000f, 0.4984147847f, 0.4971478283f, 0.4948240519f,
- 0.4904728234f, 0.4820713699f, 0.4734190702f, 0.4600848258f,
- 0.4392839074f, 0.4066926241f, 0.3561752141f, 0.3089951873f,
- 0.2489543557f, 0.1756889224f, 0.0911452249f, 0.0000000000f,
- -0.0911452249f, -0.1756889224f, -0.2489543557f, -0.3089951873f,
- -0.3561752439f, -0.4066926539f, -0.4392838776f, -0.4600848556f,
- -0.4734191597f, -0.4820713401f, -0.4904728830f, -0.4948240817f,
- -0.4971478581f, -0.4984148145f, -0.5000000000f},
- {0.5000000000f, 0.4990161359f, 0.4982108474f, 0.4966937900f,
- 0.4937312901f, 0.4876496494f, 0.4810023904f, 0.4701921344f,
- 0.4523362219f, 0.4227000475f, 0.3741825819f, 0.3270231485f,
- 0.2653121948f, 0.1883139759f, 0.0980708972f, 0.0000000000f,
- -0.0980708972f, -0.1883139908f, -0.2653121948f, -0.3270231187f,
- -0.3741825819f, -0.4227000475f, -0.4523362219f, -0.4701920748f,
- -0.4810024500f, -0.4876495600f, -0.4937313497f, -0.4966937602f,
- -0.4982108474f, -0.4990161359f, -0.5000000000f},
- {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f,
- 0.4990009665f, 0.4968476892f, 0.4937299490f, 0.4875672758f,
- 0.4754966497f, 0.4522733092f, 0.4090909064f, 0.3631930947f,
- 0.2992399931f, 0.2152527571f, 0.1131368279f, 0.0000000000f,
- -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
- -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f,
- -0.4937299788f, -0.4968476892f, -0.4990009964f, -0.4996838868f,
- -0.4999000132f, -0.4999683797f, -0.5000000000f},
- {0.5000000596f, 0.5015053153f, 0.5026424527f, 0.5045889616f,
- 0.5078070164f, 0.5127342939f, 0.5164096355f, 0.5199240446f,
- 0.5213798285f, 0.5160900950f, 0.4961368442f, 0.4834818840f,
- 0.4421011508f, 0.3525198102f, 0.2006191760f, 0.0000000000f,
- -0.2006191611f, -0.3525197804f, -0.4421012104f, -0.4834818840f,
- -0.4961368442f, -0.5160900950f, -0.5213798285f, -0.5199240446f,
- -0.5164096951f, -0.5127342939f, -0.5078070164f, -0.5045889616f,
- -0.5026424527f, -0.5015053153f, -0.5000000596f},
- {0.5000000596f, 0.5025598407f, 0.5045354962f, 0.5080122352f,
- 0.5140760541f, 0.5244651437f, 0.5337679982f, 0.5460379124f,
- 0.5614778399f, 0.6178392172f, 0.7190376520f, 0.8149639368f,
- 0.9330952168f, 1.0282080173f, 0.8643135428f, 0.0000000000f,
- -0.8643140197f, -1.0282078981f, -0.9330952764f, -0.8149639368f,
- -0.7190377116f, -0.6178392172f, -0.5614778399f, -0.5460379124f,
- -0.5337680578f, -0.5244650841f, -0.5140760541f, -0.5080122352f,
- -0.5045354962f, -0.5025598407f, -0.5000000596f}}
+ {0.5000000000f, 0.4973910451f, 0.4953450263f, 0.4916738272f, 0.4850449860f,
+ 0.4729567766f, 0.4612380564f, 0.4442087412f, 0.4193551242f, 0.3830735385f,
+ 0.3306014538f, 0.2840420604f, 0.2268431634f, 0.1589508802f, 0.0820798650f,
+ 0.0000000000f, -0.0820798576f, -0.1589508951f, -0.2268431783f, -0.2840420604f,
+ -0.3306014538f, -0.3830735683f, -0.4193551242f, -0.4442086816f, -0.4612380564f,
+ -0.4729567766f, -0.4850450158f, -0.4916738570f, -0.4953449965f, -0.4973909855f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4975522459f, 0.4956282973f, 0.4921671450f, 0.4858898818f,
+ 0.4743613005f, 0.4630986154f, 0.4466060102f, 0.4223214984f, 0.3865298629f,
+ 0.3342745304f, 0.2875820100f, 0.2299449295f, 0.1612776965f, 0.0833326429f,
+ 0.0000000000f, -0.0833326355f, -0.1612777114f, -0.2299449295f, -0.2875820100f,
+ -0.3342745602f, -0.3865298331f, -0.4223214984f, -0.4466060400f, -0.4630986452f,
+ -0.4743613005f, -0.4858898818f, -0.4921671748f, -0.4956283271f, -0.4975521863f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4977977276f, 0.4960601032f, 0.4929202795f, 0.4871834517f,
+ 0.4765217602f, 0.4659720957f, 0.4503277540f, 0.4269563556f, 0.3919707835f,
+ 0.3401035368f, 0.2932292819f, 0.2349164933f, 0.1650211811f, 0.0853530467f,
+ 0.0000000000f, -0.0853530392f, -0.1650211811f, -0.2349164784f, -0.2932292819f,
+ -0.3401035368f, -0.3919707835f, -0.4269563556f, -0.4503277242f, -0.4659721255f,
+ -0.4765217602f, -0.4871834517f, -0.4929203391f, -0.4960601330f, -0.4977976680f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4984147847f, 0.4971478283f, 0.4948240519f, 0.4904728234f,
+ 0.4820713699f, 0.4734190702f, 0.4600848258f, 0.4392839074f, 0.4066926241f,
+ 0.3561752141f, 0.3089951873f, 0.2489543557f, 0.1756889224f, 0.0911452249f,
+ 0.0000000000f, -0.0911452249f, -0.1756889224f, -0.2489543557f, -0.3089951873f,
+ -0.3561752439f, -0.4066926539f, -0.4392838776f, -0.4600848556f, -0.4734191597f,
+ -0.4820713401f, -0.4904728830f, -0.4948240817f, -0.4971478581f, -0.4984148145f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4990161359f, 0.4982108474f, 0.4966937900f, 0.4937312901f,
+ 0.4876496494f, 0.4810023904f, 0.4701921344f, 0.4523362219f, 0.4227000475f,
+ 0.3741825819f, 0.3270231485f, 0.2653121948f, 0.1883139759f, 0.0980708972f,
+ 0.0000000000f, -0.0980708972f, -0.1883139908f, -0.2653121948f, -0.3270231187f,
+ -0.3741825819f, -0.4227000475f, -0.4523362219f, -0.4701920748f, -0.4810024500f,
+ -0.4876495600f, -0.4937313497f, -0.4966937602f, -0.4982108474f, -0.4990161359f,
+ -0.5000000000f},
+ {0.5000000000f, 0.4999683797f, 0.4999000132f, 0.4996838570f, 0.4990009665f,
+ 0.4968476892f, 0.4937299490f, 0.4875672758f, 0.4754966497f, 0.4522733092f,
+ 0.4090909064f, 0.3631930947f, 0.2992399931f, 0.2152527571f, 0.1131368279f,
+ 0.0000000000f, -0.1131368279f, -0.2152527571f, -0.2992399931f, -0.3631930947f,
+ -0.4090909064f, -0.4522732794f, -0.4754966199f, -0.4875672758f, -0.4937299788f,
+ -0.4968476892f, -0.4990009964f, -0.4996838868f, -0.4999000132f, -0.4999683797f,
+ -0.5000000000f},
+ {0.5000000596f, 0.5015053153f, 0.5026424527f, 0.5045889616f, 0.5078070164f,
+ 0.5127342939f, 0.5164096355f, 0.5199240446f, 0.5213798285f, 0.5160900950f,
+ 0.4961368442f, 0.4834818840f, 0.4421011508f, 0.3525198102f, 0.2006191760f,
+ 0.0000000000f, -0.2006191611f, -0.3525197804f, -0.4421012104f, -0.4834818840f,
+ -0.4961368442f, -0.5160900950f, -0.5213798285f, -0.5199240446f, -0.5164096951f,
+ -0.5127342939f, -0.5078070164f, -0.5045889616f, -0.5026424527f, -0.5015053153f,
+ -0.5000000596f},
+ {0.5000000596f, 0.5025598407f, 0.5045354962f, 0.5080122352f, 0.5140760541f,
+ 0.5244651437f, 0.5337679982f, 0.5460379124f, 0.5614778399f, 0.6178392172f,
+ 0.7190376520f, 0.8149639368f, 0.9330952168f, 1.0282080173f, 0.8643135428f,
+ 0.0000000000f, -0.8643140197f, -1.0282078981f, -0.9330952764f, -0.8149639368f,
+ -0.7190377116f, -0.6178392172f, -0.5614778399f, -0.5460379124f, -0.5337680578f,
+ -0.5244650841f, -0.5140760541f, -0.5080122352f, -0.5045354962f, -0.5025598407f,
+ -0.5000000596f}}
};
const FLOAT32 ixheaacd_beta[16][8][31] = {
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019540936f, 0.0034606718f, 0.0061091632f,
- 0.0107228868f, 0.0186282881f, 0.0257363543f, 0.0352233760f,
- 0.0475566611f, 0.0629518107f, 0.0809580833f, 0.0936254412f,
- 0.1057573855f, 0.1160409376f, 0.1230182052f, 0.1254990250f,
- 0.1230182126f, 0.1160409376f, 0.1057573855f, 0.0936254412f,
- 0.0809580907f, 0.0629518107f, 0.0475566611f, 0.0352233723f,
- 0.0257363543f, 0.0186282881f, 0.0107228868f, 0.0061091632f,
- 0.0034606718f, 0.0019540936f, 0.0000000112f},
- {0.0000000186f, 0.0030265115f, 0.0053620972f, 0.0094724931f,
- 0.0166464634f, 0.0289774239f, 0.0401044935f, 0.0550108925f,
- 0.0744772330f, 0.0989024863f, 0.1276271343f, 0.1479234397f,
- 0.1674221754f, 0.1839915216f, 0.1952533126f, 0.1992611140f,
- 0.1952533126f, 0.1839915067f, 0.1674221903f, 0.1479234397f,
- 0.1276271492f, 0.0989024863f, 0.0744772330f, 0.0550108925f,
- 0.0401044972f, 0.0289774239f, 0.0166464634f, 0.0094724931f,
- 0.0053620972f, 0.0030265115f, 0.0000000186f},
- {0.0000000261f, 0.0044795908f, 0.0079446994f, 0.0140600502f,
- 0.0247849934f, 0.0433696434f, 0.0602979437f, 0.0832019523f,
- 0.1134835035f, 0.1520351619f, 0.1980977207f, 0.2310739607f,
- 0.2630588710f, 0.2904545665f, 0.3091802299f, 0.3158638775f,
- 0.3091802299f, 0.2904545665f, 0.2630588710f, 0.2310739756f,
- 0.1980977207f, 0.1520351619f, 0.1134835035f, 0.0832019523f,
- 0.0602979474f, 0.0433696434f, 0.0247849971f, 0.0140600502f,
- 0.0079446994f, 0.0044795908f, 0.0000000261f},
- {0.0000000298f, 0.0052186511f, 0.0092647560f, 0.0164252073f,
- 0.0290434174f, 0.0510888547f, 0.0713650510f, 0.0990892947f,
- 0.1362429261f, 0.1843356937f, 0.2429044843f, 0.2855334580f,
- 0.3274079263f, 0.3636668324f, 0.3886501491f, 0.3976052999f,
- 0.3886501789f, 0.3636668026f, 0.3274079263f, 0.2855334580f,
- 0.2429044992f, 0.1843357086f, 0.1362429261f, 0.0990892947f,
- 0.0713650584f, 0.0510888584f, 0.0290434174f, 0.0164252073f,
- 0.0092647560f, 0.0052186511f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045594499f, 0.0081285350f, 0.0145191513f,
- 0.0260186046f, 0.0468755513f, 0.0669798329f, 0.0960334241f,
- 0.1381545961f, 0.1990868747f, 0.2927374542f, 0.3888260126f,
- 0.5107848644f, 0.6488836408f, 0.7694273591f, 0.8192751408f,
- 0.7694274187f, 0.6488835216f, 0.5107849240f, 0.3888260126f,
- 0.2927374840f, 0.1990868896f, 0.1381545961f, 0.0960334167f,
- 0.0669798404f, 0.0468755476f, 0.0260186046f, 0.0145191513f,
- 0.0081285350f, 0.0045594499f, 0.0000000261f},
- {0.0000000037f, 0.0007977076f, 0.0014247037f, 0.0025531128f,
- 0.0046027601f, 0.0083869211f, 0.0121226721f, 0.0176920481f,
- 0.0261930563f, 0.0433672927f, 0.0784488842f, 0.1264052540f,
- 0.2276235074f, 0.4984348118f, 1.6047799587f, 5.8778095245f,
- 1.6047828197f, 0.4984346628f, 0.2276235521f, 0.1264052540f,
- 0.0784488916f, 0.0433672965f, 0.0261930563f, 0.0176920481f,
- 0.0121226721f, 0.0083869211f, 0.0046027601f, 0.0025531128f,
- 0.0014247037f, 0.0007977076f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019540936f, 0.0034606718f, 0.0061091632f, 0.0107228868f, 0.0186282881f,
+ 0.0257363543f, 0.0352233760f, 0.0475566611f, 0.0629518107f, 0.0809580833f, 0.0936254412f,
+ 0.1057573855f, 0.1160409376f, 0.1230182052f, 0.1254990250f, 0.1230182126f, 0.1160409376f,
+ 0.1057573855f, 0.0936254412f, 0.0809580907f, 0.0629518107f, 0.0475566611f, 0.0352233723f,
+ 0.0257363543f, 0.0186282881f, 0.0107228868f, 0.0061091632f, 0.0034606718f, 0.0019540936f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030265115f, 0.0053620972f, 0.0094724931f, 0.0166464634f, 0.0289774239f,
+ 0.0401044935f, 0.0550108925f, 0.0744772330f, 0.0989024863f, 0.1276271343f, 0.1479234397f,
+ 0.1674221754f, 0.1839915216f, 0.1952533126f, 0.1992611140f, 0.1952533126f, 0.1839915067f,
+ 0.1674221903f, 0.1479234397f, 0.1276271492f, 0.0989024863f, 0.0744772330f, 0.0550108925f,
+ 0.0401044972f, 0.0289774239f, 0.0166464634f, 0.0094724931f, 0.0053620972f, 0.0030265115f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044795908f, 0.0079446994f, 0.0140600502f, 0.0247849934f, 0.0433696434f,
+ 0.0602979437f, 0.0832019523f, 0.1134835035f, 0.1520351619f, 0.1980977207f, 0.2310739607f,
+ 0.2630588710f, 0.2904545665f, 0.3091802299f, 0.3158638775f, 0.3091802299f, 0.2904545665f,
+ 0.2630588710f, 0.2310739756f, 0.1980977207f, 0.1520351619f, 0.1134835035f, 0.0832019523f,
+ 0.0602979474f, 0.0433696434f, 0.0247849971f, 0.0140600502f, 0.0079446994f, 0.0044795908f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052186511f, 0.0092647560f, 0.0164252073f, 0.0290434174f, 0.0510888547f,
+ 0.0713650510f, 0.0990892947f, 0.1362429261f, 0.1843356937f, 0.2429044843f, 0.2855334580f,
+ 0.3274079263f, 0.3636668324f, 0.3886501491f, 0.3976052999f, 0.3886501789f, 0.3636668026f,
+ 0.3274079263f, 0.2855334580f, 0.2429044992f, 0.1843357086f, 0.1362429261f, 0.0990892947f,
+ 0.0713650584f, 0.0510888584f, 0.0290434174f, 0.0164252073f, 0.0092647560f, 0.0052186511f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045594499f, 0.0081285350f, 0.0145191513f, 0.0260186046f, 0.0468755513f,
+ 0.0669798329f, 0.0960334241f, 0.1381545961f, 0.1990868747f, 0.2927374542f, 0.3888260126f,
+ 0.5107848644f, 0.6488836408f, 0.7694273591f, 0.8192751408f, 0.7694274187f, 0.6488835216f,
+ 0.5107849240f, 0.3888260126f, 0.2927374840f, 0.1990868896f, 0.1381545961f, 0.0960334167f,
+ 0.0669798404f, 0.0468755476f, 0.0260186046f, 0.0145191513f, 0.0081285350f, 0.0045594499f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007977076f, 0.0014247037f, 0.0025531128f, 0.0046027601f, 0.0083869211f,
+ 0.0121226721f, 0.0176920481f, 0.0261930563f, 0.0433672927f, 0.0784488842f, 0.1264052540f,
+ 0.2276235074f, 0.4984348118f, 1.6047799587f, 5.8778095245f, 1.6047828197f, 0.4984346628f,
+ 0.2276235521f, 0.1264052540f, 0.0784488916f, 0.0433672965f, 0.0261930563f, 0.0176920481f,
+ 0.0121226721f, 0.0083869211f, 0.0046027601f, 0.0025531128f, 0.0014247037f, 0.0007977076f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019548684f, 0.0034630969f, 0.0061166696f,
- 0.0107457712f, 0.0186960548f, 0.0258635134f, 0.0354561731f,
- 0.0479685590f, 0.0636471361f, 0.0820589513f, 0.0950533152f,
- 0.1075267568f, 0.1181191504f, 0.1253151745f, 0.1278754473f,
- 0.1253151745f, 0.1181191429f, 0.1075267643f, 0.0950533152f,
- 0.0820589513f, 0.0636471361f, 0.0479685590f, 0.0354561731f,
- 0.0258635171f, 0.0186960548f, 0.0107457712f, 0.0061166734f,
- 0.0034630969f, 0.0019548684f, 0.0000000112f},
- {0.0000000186f, 0.0030275919f, 0.0053654797f, 0.0094829798f,
- 0.0166785270f, 0.0290729403f, 0.0402846411f, 0.0553428568f,
- 0.0750693232f, 0.0999114066f, 0.1292407066f, 0.1500300914f,
- 0.1700480729f, 0.1870902777f, 0.1986886710f, 0.2028190643f,
- 0.1986886710f, 0.1870902628f, 0.1700480729f, 0.1500300914f,
- 0.1292407066f, 0.0999113992f, 0.0750693232f, 0.0553428531f,
- 0.0402846411f, 0.0290729403f, 0.0166785270f, 0.0094829798f,
- 0.0053654797f, 0.0030275919f, 0.0000000186f},
- {0.0000000261f, 0.0044807382f, 0.0079482906f, 0.0140712596f,
- 0.0248195715f, 0.0434742048f, 0.0604977794f, 0.0835766271f,
- 0.1141664237f, 0.1532292813f, 0.2000626326f, 0.2336882651f,
- 0.2663741410f, 0.2944218218f, 0.3136188090f, 0.3204754591f,
- 0.3136188090f, 0.2944217920f, 0.2663741708f, 0.2336882651f,
- 0.2000626326f, 0.1532292962f, 0.1141664162f, 0.0835766271f,
- 0.0604977906f, 0.0434742048f, 0.0248195753f, 0.0140712596f,
- 0.0079482906f, 0.0044807382f, 0.0000000261f},
- {0.0000000298f, 0.0052194707f, 0.0092673339f, 0.0164332762f,
- 0.0290685408f, 0.0511660054f, 0.0715145171f, 0.0993746519f,
- 0.1367753297f, 0.1852938682f, 0.2445339411f, 0.2877510786f,
- 0.3302804232f, 0.3671652079f, 0.3926102221f, 0.4017367959f,
- 0.3926102519f, 0.3671651781f, 0.3302804828f, 0.2877510786f,
- 0.2445339262f, 0.1852938682f, 0.1367753297f, 0.0993746296f,
- 0.0715145245f, 0.0511660054f, 0.0290685445f, 0.0164332762f,
- 0.0092673302f, 0.0052194707f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045582913f, 0.0081248507f, 0.0145073459f,
- 0.0259804092f, 0.0467499122f, 0.0667200089f, 0.0954893604f,
- 0.1369983852f, 0.1965934485f, 0.2817551196f, 0.3696863651f,
- 0.4782577753f, 0.5972789526f, 0.6979247928f, 0.7386929393f,
- 0.6979249120f, 0.5972788334f, 0.4782578349f, 0.3696863651f,
- 0.2817551494f, 0.1965934336f, 0.1369983703f, 0.0954893529f,
- 0.0667200163f, 0.0467499122f, 0.0259804130f, 0.0145073459f,
- 0.0081248507f, 0.0045582913f, 0.0000000261f},
- {0.0000000037f, 0.0007973649f, 0.0014236122f, 0.0025495738f,
- 0.0045911148f, 0.0083473474f, 0.0120380968f, 0.0175057761f,
- 0.0257535614f, 0.0410830304f, 0.0712796226f, 0.1087764874f,
- 0.1762015671f, 0.3041011095f, 0.5248688459f, 0.6885957122f,
- 0.5248691440f, 0.3041010499f, 0.1762015820f, 0.1087764949f,
- 0.0712796375f, 0.0410830304f, 0.0257535614f, 0.0175057724f,
- 0.0120380968f, 0.0083473474f, 0.0045911148f, 0.0025495775f,
- 0.0014236122f, 0.0007973649f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019548684f, 0.0034630969f, 0.0061166696f, 0.0107457712f, 0.0186960548f,
+ 0.0258635134f, 0.0354561731f, 0.0479685590f, 0.0636471361f, 0.0820589513f, 0.0950533152f,
+ 0.1075267568f, 0.1181191504f, 0.1253151745f, 0.1278754473f, 0.1253151745f, 0.1181191429f,
+ 0.1075267643f, 0.0950533152f, 0.0820589513f, 0.0636471361f, 0.0479685590f, 0.0354561731f,
+ 0.0258635171f, 0.0186960548f, 0.0107457712f, 0.0061166734f, 0.0034630969f, 0.0019548684f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030275919f, 0.0053654797f, 0.0094829798f, 0.0166785270f, 0.0290729403f,
+ 0.0402846411f, 0.0553428568f, 0.0750693232f, 0.0999114066f, 0.1292407066f, 0.1500300914f,
+ 0.1700480729f, 0.1870902777f, 0.1986886710f, 0.2028190643f, 0.1986886710f, 0.1870902628f,
+ 0.1700480729f, 0.1500300914f, 0.1292407066f, 0.0999113992f, 0.0750693232f, 0.0553428531f,
+ 0.0402846411f, 0.0290729403f, 0.0166785270f, 0.0094829798f, 0.0053654797f, 0.0030275919f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044807382f, 0.0079482906f, 0.0140712596f, 0.0248195715f, 0.0434742048f,
+ 0.0604977794f, 0.0835766271f, 0.1141664237f, 0.1532292813f, 0.2000626326f, 0.2336882651f,
+ 0.2663741410f, 0.2944218218f, 0.3136188090f, 0.3204754591f, 0.3136188090f, 0.2944217920f,
+ 0.2663741708f, 0.2336882651f, 0.2000626326f, 0.1532292962f, 0.1141664162f, 0.0835766271f,
+ 0.0604977906f, 0.0434742048f, 0.0248195753f, 0.0140712596f, 0.0079482906f, 0.0044807382f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052194707f, 0.0092673339f, 0.0164332762f, 0.0290685408f, 0.0511660054f,
+ 0.0715145171f, 0.0993746519f, 0.1367753297f, 0.1852938682f, 0.2445339411f, 0.2877510786f,
+ 0.3302804232f, 0.3671652079f, 0.3926102221f, 0.4017367959f, 0.3926102519f, 0.3671651781f,
+ 0.3302804828f, 0.2877510786f, 0.2445339262f, 0.1852938682f, 0.1367753297f, 0.0993746296f,
+ 0.0715145245f, 0.0511660054f, 0.0290685445f, 0.0164332762f, 0.0092673302f, 0.0052194707f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045582913f, 0.0081248507f, 0.0145073459f, 0.0259804092f, 0.0467499122f,
+ 0.0667200089f, 0.0954893604f, 0.1369983852f, 0.1965934485f, 0.2817551196f, 0.3696863651f,
+ 0.4782577753f, 0.5972789526f, 0.6979247928f, 0.7386929393f, 0.6979249120f, 0.5972788334f,
+ 0.4782578349f, 0.3696863651f, 0.2817551494f, 0.1965934336f, 0.1369983703f, 0.0954893529f,
+ 0.0667200163f, 0.0467499122f, 0.0259804130f, 0.0145073459f, 0.0081248507f, 0.0045582913f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007973649f, 0.0014236122f, 0.0025495738f, 0.0045911148f, 0.0083473474f,
+ 0.0120380968f, 0.0175057761f, 0.0257535614f, 0.0410830304f, 0.0712796226f, 0.1087764874f,
+ 0.1762015671f, 0.3041011095f, 0.5248688459f, 0.6885957122f, 0.5248691440f, 0.3041010499f,
+ 0.1762015820f, 0.1087764949f, 0.0712796375f, 0.0410830304f, 0.0257535614f, 0.0175057724f,
+ 0.0120380968f, 0.0083473474f, 0.0045911148f, 0.0025495775f, 0.0014236122f, 0.0007973649f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019570850f, 0.0034700334f, 0.0061382130f,
- 0.0108117498f, 0.0188931711f, 0.0262362324f, 0.0361453071f,
- 0.0492028967f, 0.0657609925f, 0.0854583159f, 0.0995077044f,
- 0.1130974889f, 0.1247107610f, 0.1326356083f, 0.1354617327f,
- 0.1326356083f, 0.1247107461f, 0.1130974963f, 0.0995077044f,
- 0.0854583159f, 0.0657609925f, 0.0492028967f, 0.0361453034f,
- 0.0262362324f, 0.0188931711f, 0.0108117498f, 0.0061382130f,
- 0.0034700334f, 0.0019570850f, 0.0000000112f},
- {0.0000000186f, 0.0030306727f, 0.0053751357f, 0.0095130354f,
- 0.0167708695f, 0.0293502137f, 0.0408112556f, 0.0563221611f,
- 0.0768360794f, 0.1029629856f, 0.1341941655f, 0.1565610915f,
- 0.1782617569f, 0.1968532801f, 0.2095632553f, 0.2141001821f,
- 0.2095632553f, 0.1968532652f, 0.1782617867f, 0.1565610915f,
- 0.1341941804f, 0.1029629931f, 0.0768360794f, 0.0563221574f,
- 0.0408112593f, 0.0293502137f, 0.0167708695f, 0.0095130354f,
- 0.0053751357f, 0.0030306727f, 0.0000000186f},
- {0.0000000261f, 0.0044840015f, 0.0079585500f, 0.0141033232f,
- 0.0249188393f, 0.0437761769f, 0.0610779524f, 0.0846719742f,
- 0.1161808893f, 0.1567904651f, 0.2059956193f, 0.2416490465f,
- 0.2765491605f, 0.3066769838f, 0.3273887634f, 0.3348038197f,
- 0.3273887634f, 0.3066769540f, 0.2765491605f, 0.2416490614f,
- 0.2059956342f, 0.1567904651f, 0.1161808893f, 0.0846719667f,
- 0.0610779561f, 0.0437761769f, 0.0249188431f, 0.0141033232f,
- 0.0079585500f, 0.0044840015f, 0.0000000261f},
- {0.0000000298f, 0.0052218027f, 0.0092746764f, 0.0164563321f,
- 0.0291404575f, 0.0513876304f, 0.0719453543f, 0.1002009511f,
- 0.1383263767f, 0.1881065071f, 0.2493602335f, 0.2943610847f,
- 0.3388943374f, 0.3777095377f, 0.4045871496f, 0.4142471850f,
- 0.4045871794f, 0.3777095079f, 0.3388943672f, 0.2943610847f,
- 0.2493602186f, 0.1881065071f, 0.1383263767f, 0.1002009436f,
- 0.0719453618f, 0.0513876304f, 0.0291404612f, 0.0164563321f,
- 0.0092746764f, 0.0052218027f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045550019f, 0.0081143826f, 0.0144738853f,
- 0.0258725621f, 0.0463975929f, 0.0659963265f, 0.0939892456f,
- 0.1338583082f, 0.1899754107f, 0.2663972974f, 0.3287125528f,
- 0.4048410654f, 0.4869871736f, 0.5518758893f, 0.5770590305f,
- 0.5518758893f, 0.4869871438f, 0.4048411250f, 0.3287125528f,
- 0.2663973570f, 0.1899754107f, 0.1338582933f, 0.0939892307f,
- 0.0659963414f, 0.0463975891f, 0.0258725658f, 0.0144738853f,
- 0.0081143863f, 0.0045550019f, 0.0000000261f},
- {0.0000000037f, 0.0007963963f, 0.0014205091f, 0.0025395826f,
- 0.0045584328f, 0.0082376562f, 0.0118066110f, 0.0170059167f,
- 0.0246388987f, 0.0359060131f, 0.0565599240f, 0.0778557137f,
- 0.1072221845f, 0.1441028267f, 0.1799743623f, 0.1959501207f,
- 0.1799744070f, 0.1441028118f, 0.1072221920f, 0.0778557137f,
- 0.0565599315f, 0.0359060131f, 0.0246388987f, 0.0170059167f,
- 0.0118066110f, 0.0082376562f, 0.0045584328f, 0.0025395826f,
- 0.0014205091f, 0.0007963963f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019570850f, 0.0034700334f, 0.0061382130f, 0.0108117498f, 0.0188931711f,
+ 0.0262362324f, 0.0361453071f, 0.0492028967f, 0.0657609925f, 0.0854583159f, 0.0995077044f,
+ 0.1130974889f, 0.1247107610f, 0.1326356083f, 0.1354617327f, 0.1326356083f, 0.1247107461f,
+ 0.1130974963f, 0.0995077044f, 0.0854583159f, 0.0657609925f, 0.0492028967f, 0.0361453034f,
+ 0.0262362324f, 0.0188931711f, 0.0108117498f, 0.0061382130f, 0.0034700334f, 0.0019570850f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030306727f, 0.0053751357f, 0.0095130354f, 0.0167708695f, 0.0293502137f,
+ 0.0408112556f, 0.0563221611f, 0.0768360794f, 0.1029629856f, 0.1341941655f, 0.1565610915f,
+ 0.1782617569f, 0.1968532801f, 0.2095632553f, 0.2141001821f, 0.2095632553f, 0.1968532652f,
+ 0.1782617867f, 0.1565610915f, 0.1341941804f, 0.1029629931f, 0.0768360794f, 0.0563221574f,
+ 0.0408112593f, 0.0293502137f, 0.0167708695f, 0.0095130354f, 0.0053751357f, 0.0030306727f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044840015f, 0.0079585500f, 0.0141033232f, 0.0249188393f, 0.0437761769f,
+ 0.0610779524f, 0.0846719742f, 0.1161808893f, 0.1567904651f, 0.2059956193f, 0.2416490465f,
+ 0.2765491605f, 0.3066769838f, 0.3273887634f, 0.3348038197f, 0.3273887634f, 0.3066769540f,
+ 0.2765491605f, 0.2416490614f, 0.2059956342f, 0.1567904651f, 0.1161808893f, 0.0846719667f,
+ 0.0610779561f, 0.0437761769f, 0.0249188431f, 0.0141033232f, 0.0079585500f, 0.0044840015f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052218027f, 0.0092746764f, 0.0164563321f, 0.0291404575f, 0.0513876304f,
+ 0.0719453543f, 0.1002009511f, 0.1383263767f, 0.1881065071f, 0.2493602335f, 0.2943610847f,
+ 0.3388943374f, 0.3777095377f, 0.4045871496f, 0.4142471850f, 0.4045871794f, 0.3777095079f,
+ 0.3388943672f, 0.2943610847f, 0.2493602186f, 0.1881065071f, 0.1383263767f, 0.1002009436f,
+ 0.0719453618f, 0.0513876304f, 0.0291404612f, 0.0164563321f, 0.0092746764f, 0.0052218027f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045550019f, 0.0081143826f, 0.0144738853f, 0.0258725621f, 0.0463975929f,
+ 0.0659963265f, 0.0939892456f, 0.1338583082f, 0.1899754107f, 0.2663972974f, 0.3287125528f,
+ 0.4048410654f, 0.4869871736f, 0.5518758893f, 0.5770590305f, 0.5518758893f, 0.4869871438f,
+ 0.4048411250f, 0.3287125528f, 0.2663973570f, 0.1899754107f, 0.1338582933f, 0.0939892307f,
+ 0.0659963414f, 0.0463975891f, 0.0258725658f, 0.0144738853f, 0.0081143863f, 0.0045550019f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007963963f, 0.0014205091f, 0.0025395826f, 0.0045584328f, 0.0082376562f,
+ 0.0118066110f, 0.0170059167f, 0.0246388987f, 0.0359060131f, 0.0565599240f, 0.0778557137f,
+ 0.1072221845f, 0.1441028267f, 0.1799743623f, 0.1959501207f, 0.1799744070f, 0.1441028118f,
+ 0.1072221920f, 0.0778557137f, 0.0565599315f, 0.0359060131f, 0.0246388987f, 0.0170059167f,
+ 0.0118066110f, 0.0082376562f, 0.0045584328f, 0.0025395826f, 0.0014205091f, 0.0007963963f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019604117f, 0.0034804866f, 0.0061708763f,
- 0.0109128021f, 0.0192001797f, 0.0268254243f, 0.0372561179f,
- 0.0512422584f, 0.0693590865f, 0.0914405808f, 0.1075243503f,
- 0.1233326197f, 0.1370278895f, 0.1464678943f, 0.1498523057f,
- 0.1464678943f, 0.1370278746f, 0.1233326346f, 0.1075243577f,
- 0.0914405808f, 0.0693590865f, 0.0512422584f, 0.0372561105f,
- 0.0268254280f, 0.0192001797f, 0.0109128058f, 0.0061708800f,
- 0.0034804903f, 0.0019604117f, 0.0000000112f},
- {0.0000000186f, 0.0030353032f, 0.0053896904f, 0.0095585547f,
- 0.0169119760f, 0.0297804140f, 0.0416394584f, 0.0578900613f,
- 0.0797299594f, 0.1081020311f, 0.1428017914f, 0.1681542695f,
- 0.1931329519f, 0.2148192078f, 0.2297913432f, 0.2351637930f,
- 0.2297913432f, 0.2148192078f, 0.1931329817f, 0.1681542695f,
- 0.1428017914f, 0.1081020311f, 0.0797299519f, 0.0578900538f,
- 0.0416394621f, 0.0297804177f, 0.0169119798f, 0.0095585547f,
- 0.0053896904f, 0.0030353032f, 0.0000000186f},
- {0.0000000261f, 0.0044889040f, 0.0079739802f, 0.0141517222f,
- 0.0250696540f, 0.0442400984f, 0.0619782880f, 0.0863948390f,
- 0.1194054559f, 0.1626167744f, 0.2159518450f, 0.2552461028f,
- 0.2942210138f, 0.3282614052f, 0.3518697023f, 0.3603619337f,
- 0.3518697023f, 0.3282613754f, 0.2942210138f, 0.2552461028f,
- 0.2159518450f, 0.1626167595f, 0.1194054410f, 0.0863948315f,
- 0.0619782880f, 0.0442400984f, 0.0250696540f, 0.0141517222f,
- 0.0079739802f, 0.0044889040f, 0.0000000261f},
- {0.0000000298f, 0.0052252971f, 0.0092856996f, 0.0164910108f,
- 0.0292490833f, 0.0517247654f, 0.0726049617f, 0.1014770418f,
- 0.1407495737f, 0.1925659627f, 0.2571487725f, 0.3051639795f,
- 0.3531456888f, 0.3953380585f, 0.4247539937f, 0.4353658557f,
- 0.4247539937f, 0.3953380287f, 0.3531457186f, 0.3051640093f,
- 0.2571487725f, 0.1925659627f, 0.1407495588f, 0.1014770344f,
- 0.0726049691f, 0.0517247617f, 0.0292490870f, 0.0164910108f,
- 0.0092856996f, 0.0052252971f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045500919f, 0.0080987960f, 0.0144242346f,
- 0.0257136337f, 0.0458848849f, 0.0649559572f, 0.0918706506f,
- 0.1295377314f, 0.1812113971f, 0.2490174621f, 0.3020929396f,
- 0.3576069176f, 0.4086337388f, 0.4455217719f, 0.4591073692f,
- 0.4455218017f, 0.4086337090f, 0.3576069772f, 0.3020929396f,
- 0.2490174621f, 0.1812113971f, 0.1295377314f, 0.0918706357f,
- 0.0649559572f, 0.0458848849f, 0.0257136375f, 0.0144242346f,
- 0.0080987960f, 0.0045500919f, 0.0000000261f},
- {0.0000000037f, 0.0007949509f, 0.0014159046f, 0.0025248416f,
- 0.0045107976f, 0.0080812797f, 0.0114838332f, 0.0163318664f,
- 0.0232117511f, 0.0328431986f, 0.0458545312f, 0.0563677698f,
- 0.0677092522f, 0.0806207210f, 0.0907390118f, 0.0946287736f,
- 0.0907390192f, 0.0806207135f, 0.0677092597f, 0.0563677736f,
- 0.0458545350f, 0.0328431949f, 0.0232117511f, 0.0163318627f,
- 0.0114838332f, 0.0080812797f, 0.0045107976f, 0.0025248416f,
- 0.0014159046f, 0.0007949509f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019604117f, 0.0034804866f, 0.0061708763f, 0.0109128021f, 0.0192001797f,
+ 0.0268254243f, 0.0372561179f, 0.0512422584f, 0.0693590865f, 0.0914405808f, 0.1075243503f,
+ 0.1233326197f, 0.1370278895f, 0.1464678943f, 0.1498523057f, 0.1464678943f, 0.1370278746f,
+ 0.1233326346f, 0.1075243577f, 0.0914405808f, 0.0693590865f, 0.0512422584f, 0.0372561105f,
+ 0.0268254280f, 0.0192001797f, 0.0109128058f, 0.0061708800f, 0.0034804903f, 0.0019604117f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030353032f, 0.0053896904f, 0.0095585547f, 0.0169119760f, 0.0297804140f,
+ 0.0416394584f, 0.0578900613f, 0.0797299594f, 0.1081020311f, 0.1428017914f, 0.1681542695f,
+ 0.1931329519f, 0.2148192078f, 0.2297913432f, 0.2351637930f, 0.2297913432f, 0.2148192078f,
+ 0.1931329817f, 0.1681542695f, 0.1428017914f, 0.1081020311f, 0.0797299519f, 0.0578900538f,
+ 0.0416394621f, 0.0297804177f, 0.0169119798f, 0.0095585547f, 0.0053896904f, 0.0030353032f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044889040f, 0.0079739802f, 0.0141517222f, 0.0250696540f, 0.0442400984f,
+ 0.0619782880f, 0.0863948390f, 0.1194054559f, 0.1626167744f, 0.2159518450f, 0.2552461028f,
+ 0.2942210138f, 0.3282614052f, 0.3518697023f, 0.3603619337f, 0.3518697023f, 0.3282613754f,
+ 0.2942210138f, 0.2552461028f, 0.2159518450f, 0.1626167595f, 0.1194054410f, 0.0863948315f,
+ 0.0619782880f, 0.0442400984f, 0.0250696540f, 0.0141517222f, 0.0079739802f, 0.0044889040f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052252971f, 0.0092856996f, 0.0164910108f, 0.0292490833f, 0.0517247654f,
+ 0.0726049617f, 0.1014770418f, 0.1407495737f, 0.1925659627f, 0.2571487725f, 0.3051639795f,
+ 0.3531456888f, 0.3953380585f, 0.4247539937f, 0.4353658557f, 0.4247539937f, 0.3953380287f,
+ 0.3531457186f, 0.3051640093f, 0.2571487725f, 0.1925659627f, 0.1407495588f, 0.1014770344f,
+ 0.0726049691f, 0.0517247617f, 0.0292490870f, 0.0164910108f, 0.0092856996f, 0.0052252971f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045500919f, 0.0080987960f, 0.0144242346f, 0.0257136337f, 0.0458848849f,
+ 0.0649559572f, 0.0918706506f, 0.1295377314f, 0.1812113971f, 0.2490174621f, 0.3020929396f,
+ 0.3576069176f, 0.4086337388f, 0.4455217719f, 0.4591073692f, 0.4455218017f, 0.4086337090f,
+ 0.3576069772f, 0.3020929396f, 0.2490174621f, 0.1812113971f, 0.1295377314f, 0.0918706357f,
+ 0.0649559572f, 0.0458848849f, 0.0257136375f, 0.0144242346f, 0.0080987960f, 0.0045500919f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007949509f, 0.0014159046f, 0.0025248416f, 0.0045107976f, 0.0080812797f,
+ 0.0114838332f, 0.0163318664f, 0.0232117511f, 0.0328431986f, 0.0458545312f, 0.0563677698f,
+ 0.0677092522f, 0.0806207210f, 0.0907390118f, 0.0946287736f, 0.0907390192f, 0.0806207135f,
+ 0.0677092597f, 0.0563677736f, 0.0458545350f, 0.0328431949f, 0.0232117511f, 0.0163318627f,
+ 0.0114838332f, 0.0080812797f, 0.0045107976f, 0.0025248416f, 0.0014159046f, 0.0007949509f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019643605f, 0.0034929439f, 0.0062100887f,
- 0.0110357292f, 0.0195823126f, 0.0275742412f, 0.0387081020f,
- 0.0540083535f, 0.0744726434f, 0.1004251465f, 0.1200447381f,
- 0.1399304867f, 0.1576502621f, 0.1701345742f, 0.1746647209f,
- 0.1701345742f, 0.1576502770f, 0.1399305016f, 0.1200447381f,
- 0.1004251465f, 0.0744726434f, 0.0540083535f, 0.0387080982f,
- 0.0275742412f, 0.0195823126f, 0.0110357292f, 0.0062100887f,
- 0.0034929439f, 0.0019643605f, 0.0000000112f},
- {0.0000000186f, 0.0030407943f, 0.0054070093f, 0.0096130967f,
- 0.0170830972f, 0.0303130411f, 0.0426843874f, 0.0599193908f,
- 0.0836038888f, 0.1152822077f, 0.1554561853f, 0.1858269274f,
- 0.2166096866f, 0.2440395653f, 0.2633650005f, 0.2703776062f,
- 0.2633650303f, 0.2440395504f, 0.2166097015f, 0.1858269274f,
- 0.1554561853f, 0.1152822077f, 0.0836038888f, 0.0599193871f,
- 0.0426843911f, 0.0303130411f, 0.0170830972f, 0.0096130967f,
- 0.0054070130f, 0.0030407943f, 0.0000000186f},
- {0.0000000261f, 0.0044947043f, 0.0079922937f, 0.0142094567f,
- 0.0252511203f, 0.0448067673f, 0.0630932897f, 0.0885689482f,
- 0.1235778332f, 0.1704026759f, 0.2297852188f, 0.2746772766f,
- 0.3201783597f, 0.3607234061f, 0.3892890215f, 0.3996545672f,
- 0.3892890513f, 0.3607234061f, 0.3201783895f, 0.2746773064f,
- 0.2297852337f, 0.1704026610f, 0.1235778257f, 0.0885689408f,
- 0.0630932897f, 0.0448067635f, 0.0252511241f, 0.0142094567f,
- 0.0079922937f, 0.0044947043f, 0.0000000261f},
- {0.0000000298f, 0.0052294321f, 0.0092987530f, 0.0165322050f,
- 0.0293787941f, 0.0521311015f, 0.0734068304f, 0.1030468717f,
- 0.1437784731f, 0.1982575357f, 0.2673470378f, 0.3195773959f,
- 0.3725163043f, 0.4196890593f, 0.4529241323f, 0.4649840891f,
- 0.4529241621f, 0.4196890295f, 0.3725163341f, 0.3195773959f,
- 0.2673470676f, 0.1982575357f, 0.1437784731f, 0.1030468568f,
- 0.0734068379f, 0.0521311015f, 0.0293787979f, 0.0165322050f,
- 0.0092987530f, 0.0052294284f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045443214f, 0.0080805235f, 0.0143663213f,
- 0.0255298801f, 0.0453014039f, 0.0637897998f, 0.0895466954f,
- 0.1249420568f, 0.1722838134f, 0.2323219031f, 0.2777095437f,
- 0.3237129450f, 0.3647055924f, 0.3935865462f, 0.4040665329f,
- 0.3935865760f, 0.3647055626f, 0.3237129450f, 0.2777095735f,
- 0.2323219180f, 0.1722838134f, 0.1249420494f, 0.0895466879f,
- 0.0637898073f, 0.0453014039f, 0.0255298801f, 0.0143663213f,
- 0.0080805235f, 0.0045443214f, 0.0000000261f},
- {0.0000000037f, 0.0007932559f, 0.0014105327f, 0.0025077760f,
- 0.0044564828f, 0.0079077892f, 0.0111351162f, 0.0156312287f,
- 0.0218098238f, 0.0300737768f, 0.0405539945f, 0.0484768376f,
- 0.0565071665f, 0.0636628196f, 0.0687042698f, 0.0705336481f,
- 0.0687042698f, 0.0636628196f, 0.0565071702f, 0.0484768413f,
- 0.0405539945f, 0.0300737731f, 0.0218098238f, 0.0156312250f,
- 0.0111351162f, 0.0079077892f, 0.0044564828f, 0.0025077760f,
- 0.0014105327f, 0.0007932559f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019643605f, 0.0034929439f, 0.0062100887f, 0.0110357292f, 0.0195823126f,
+ 0.0275742412f, 0.0387081020f, 0.0540083535f, 0.0744726434f, 0.1004251465f, 0.1200447381f,
+ 0.1399304867f, 0.1576502621f, 0.1701345742f, 0.1746647209f, 0.1701345742f, 0.1576502770f,
+ 0.1399305016f, 0.1200447381f, 0.1004251465f, 0.0744726434f, 0.0540083535f, 0.0387080982f,
+ 0.0275742412f, 0.0195823126f, 0.0110357292f, 0.0062100887f, 0.0034929439f, 0.0019643605f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030407943f, 0.0054070093f, 0.0096130967f, 0.0170830972f, 0.0303130411f,
+ 0.0426843874f, 0.0599193908f, 0.0836038888f, 0.1152822077f, 0.1554561853f, 0.1858269274f,
+ 0.2166096866f, 0.2440395653f, 0.2633650005f, 0.2703776062f, 0.2633650303f, 0.2440395504f,
+ 0.2166097015f, 0.1858269274f, 0.1554561853f, 0.1152822077f, 0.0836038888f, 0.0599193871f,
+ 0.0426843911f, 0.0303130411f, 0.0170830972f, 0.0096130967f, 0.0054070130f, 0.0030407943f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044947043f, 0.0079922937f, 0.0142094567f, 0.0252511203f, 0.0448067673f,
+ 0.0630932897f, 0.0885689482f, 0.1235778332f, 0.1704026759f, 0.2297852188f, 0.2746772766f,
+ 0.3201783597f, 0.3607234061f, 0.3892890215f, 0.3996545672f, 0.3892890513f, 0.3607234061f,
+ 0.3201783895f, 0.2746773064f, 0.2297852337f, 0.1704026610f, 0.1235778257f, 0.0885689408f,
+ 0.0630932897f, 0.0448067635f, 0.0252511241f, 0.0142094567f, 0.0079922937f, 0.0044947043f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052294321f, 0.0092987530f, 0.0165322050f, 0.0293787941f, 0.0521311015f,
+ 0.0734068304f, 0.1030468717f, 0.1437784731f, 0.1982575357f, 0.2673470378f, 0.3195773959f,
+ 0.3725163043f, 0.4196890593f, 0.4529241323f, 0.4649840891f, 0.4529241621f, 0.4196890295f,
+ 0.3725163341f, 0.3195773959f, 0.2673470676f, 0.1982575357f, 0.1437784731f, 0.1030468568f,
+ 0.0734068379f, 0.0521311015f, 0.0293787979f, 0.0165322050f, 0.0092987530f, 0.0052294284f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045443214f, 0.0080805235f, 0.0143663213f, 0.0255298801f, 0.0453014039f,
+ 0.0637897998f, 0.0895466954f, 0.1249420568f, 0.1722838134f, 0.2323219031f, 0.2777095437f,
+ 0.3237129450f, 0.3647055924f, 0.3935865462f, 0.4040665329f, 0.3935865760f, 0.3647055626f,
+ 0.3237129450f, 0.2777095735f, 0.2323219180f, 0.1722838134f, 0.1249420494f, 0.0895466879f,
+ 0.0637898073f, 0.0453014039f, 0.0255298801f, 0.0143663213f, 0.0080805235f, 0.0045443214f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007932559f, 0.0014105327f, 0.0025077760f, 0.0044564828f, 0.0079077892f,
+ 0.0111351162f, 0.0156312287f, 0.0218098238f, 0.0300737768f, 0.0405539945f, 0.0484768376f,
+ 0.0565071665f, 0.0636628196f, 0.0687042698f, 0.0705336481f, 0.0687042698f, 0.0636628196f,
+ 0.0565071702f, 0.0484768413f, 0.0405539945f, 0.0300737731f, 0.0218098238f, 0.0156312250f,
+ 0.0111351162f, 0.0079077892f, 0.0044564828f, 0.0025077760f, 0.0014105327f, 0.0007932559f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019683354f, 0.0035055354f, 0.0062500574f,
- 0.0111629069f, 0.0199882090f, 0.0283894800f, 0.0403442569f,
- 0.0572769120f, 0.0809144527f, 0.1127139181f, 0.1382882297f,
- 0.1657482833f, 0.1942400038f, 0.2178779542f, 0.2269225121f,
- 0.2178779691f, 0.1942399889f, 0.1657482982f, 0.1382882297f,
- 0.1127139181f, 0.0809144527f, 0.0572769120f, 0.0403442495f,
- 0.0283894837f, 0.0199882090f, 0.0111629069f, 0.0062500574f,
- 0.0035055354f, 0.0019683354f, 0.0000000112f},
- {0.0000000186f, 0.0030463114f, 0.0054244995f, 0.0096685886f,
- 0.0172595158f, 0.0308753066f, 0.0438121483f, 0.0621782839f,
- 0.0881035775f, 0.1241138950f, 0.1722071767f, 0.2105752081f,
- 0.2514455318f, 0.2897335589f, 0.3197216690f, 0.3322762251f,
- 0.3197216988f, 0.2897335291f, 0.2514455616f, 0.2105752230f,
- 0.1722071767f, 0.1241138950f, 0.0881035626f, 0.0621782765f,
- 0.0438121520f, 0.0308753066f, 0.0172595158f, 0.0096685886f,
- 0.0054244995f, 0.0030463114f, 0.0000000186f},
- {0.0000000261f, 0.0045005269f, 0.0080107339f, 0.0142679065f,
- 0.0254365876f, 0.0453957841f, 0.0642707124f, 0.0909159034f,
- 0.1282205731f, 0.1794259250f, 0.2466703653f, 0.2993502319f,
- 0.3544936478f, 0.4052205384f, 0.4419169724f, 0.4554374516f,
- 0.4419169724f, 0.4052204788f, 0.3544936478f, 0.2993502319f,
- 0.2466703951f, 0.1794259101f, 0.1282205582f, 0.0909158960f,
- 0.0642707199f, 0.0453957841f, 0.0254365914f, 0.0142679065f,
- 0.0080107339f, 0.0045005269f, 0.0000000261f},
- {0.0000000298f, 0.0052335747f, 0.0093118623f, 0.0165737085f,
- 0.0295102485f, 0.0525471680f, 0.0742358714f, 0.1046918705f,
- 0.1470117569f, 0.2044855654f, 0.2788636088f, 0.3362472057f,
- 0.3954694271f, 0.4491761923f, 0.4875625372f, 0.5016064644f,
- 0.4875625372f, 0.4491761923f, 0.3954694569f, 0.3362472057f,
- 0.2788636386f, 0.2044855654f, 0.1470117420f, 0.1046918631f,
- 0.0742358789f, 0.0525471680f, 0.0295102522f, 0.0165737085f,
- 0.0093118623f, 0.0052335709f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045385733f, 0.0080623738f, 0.0143091008f,
- 0.0253500082f, 0.0447396338f, 0.0626842678f, 0.0873906389f,
- 0.1208031848f, 0.1645577550f, 0.2185891271f, 0.2584138811f,
- 0.2979290783f, 0.3324524164f, 0.3564015925f, 0.3650175929f,
- 0.3564015925f, 0.3324524164f, 0.2979291081f, 0.2584138811f,
- 0.2185891271f, 0.1645577699f, 0.1208031774f, 0.0873906240f,
- 0.0626842752f, 0.0447396338f, 0.0253500082f, 0.0143091008f,
- 0.0080623738f, 0.0045385733f, 0.0000000261f},
- {0.0000000037f, 0.0007915683f, 0.0014052205f, 0.0024910569f,
- 0.0044040829f, 0.0077450164f, 0.0108163506f, 0.0150136538f,
- 0.0206346437f, 0.0279043429f, 0.0367485993f, 0.0431800336f,
- 0.0494931713f, 0.0549563020f, 0.0587187968f, 0.0600671209f,
- 0.0587188005f, 0.0549563020f, 0.0494931713f, 0.0431800373f,
- 0.0367486030f, 0.0279043429f, 0.0206346437f, 0.0150136538f,
- 0.0108163506f, 0.0077450164f, 0.0044040829f, 0.0024910569f,
- 0.0014052168f, 0.0007915683f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019683354f, 0.0035055354f, 0.0062500574f, 0.0111629069f, 0.0199882090f,
+ 0.0283894800f, 0.0403442569f, 0.0572769120f, 0.0809144527f, 0.1127139181f, 0.1382882297f,
+ 0.1657482833f, 0.1942400038f, 0.2178779542f, 0.2269225121f, 0.2178779691f, 0.1942399889f,
+ 0.1657482982f, 0.1382882297f, 0.1127139181f, 0.0809144527f, 0.0572769120f, 0.0403442495f,
+ 0.0283894837f, 0.0199882090f, 0.0111629069f, 0.0062500574f, 0.0035055354f, 0.0019683354f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030463114f, 0.0054244995f, 0.0096685886f, 0.0172595158f, 0.0308753066f,
+ 0.0438121483f, 0.0621782839f, 0.0881035775f, 0.1241138950f, 0.1722071767f, 0.2105752081f,
+ 0.2514455318f, 0.2897335589f, 0.3197216690f, 0.3322762251f, 0.3197216988f, 0.2897335291f,
+ 0.2514455616f, 0.2105752230f, 0.1722071767f, 0.1241138950f, 0.0881035626f, 0.0621782765f,
+ 0.0438121520f, 0.0308753066f, 0.0172595158f, 0.0096685886f, 0.0054244995f, 0.0030463114f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045005269f, 0.0080107339f, 0.0142679065f, 0.0254365876f, 0.0453957841f,
+ 0.0642707124f, 0.0909159034f, 0.1282205731f, 0.1794259250f, 0.2466703653f, 0.2993502319f,
+ 0.3544936478f, 0.4052205384f, 0.4419169724f, 0.4554374516f, 0.4419169724f, 0.4052204788f,
+ 0.3544936478f, 0.2993502319f, 0.2466703951f, 0.1794259101f, 0.1282205582f, 0.0909158960f,
+ 0.0642707199f, 0.0453957841f, 0.0254365914f, 0.0142679065f, 0.0080107339f, 0.0045005269f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052335747f, 0.0093118623f, 0.0165737085f, 0.0295102485f, 0.0525471680f,
+ 0.0742358714f, 0.1046918705f, 0.1470117569f, 0.2044855654f, 0.2788636088f, 0.3362472057f,
+ 0.3954694271f, 0.4491761923f, 0.4875625372f, 0.5016064644f, 0.4875625372f, 0.4491761923f,
+ 0.3954694569f, 0.3362472057f, 0.2788636386f, 0.2044855654f, 0.1470117420f, 0.1046918631f,
+ 0.0742358789f, 0.0525471680f, 0.0295102522f, 0.0165737085f, 0.0093118623f, 0.0052335709f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045385733f, 0.0080623738f, 0.0143091008f, 0.0253500082f, 0.0447396338f,
+ 0.0626842678f, 0.0873906389f, 0.1208031848f, 0.1645577550f, 0.2185891271f, 0.2584138811f,
+ 0.2979290783f, 0.3324524164f, 0.3564015925f, 0.3650175929f, 0.3564015925f, 0.3324524164f,
+ 0.2979291081f, 0.2584138811f, 0.2185891271f, 0.1645577699f, 0.1208031774f, 0.0873906240f,
+ 0.0626842752f, 0.0447396338f, 0.0253500082f, 0.0143091008f, 0.0080623738f, 0.0045385733f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007915683f, 0.0014052205f, 0.0024910569f, 0.0044040829f, 0.0077450164f,
+ 0.0108163506f, 0.0150136538f, 0.0206346437f, 0.0279043429f, 0.0367485993f, 0.0431800336f,
+ 0.0494931713f, 0.0549563020f, 0.0587187968f, 0.0600671209f, 0.0587188005f, 0.0549563020f,
+ 0.0494931713f, 0.0431800373f, 0.0367486030f, 0.0279043429f, 0.0206346437f, 0.0150136538f,
+ 0.0108163506f, 0.0077450164f, 0.0044040829f, 0.0024910569f, 0.0014052168f, 0.0007915683f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019717216f, 0.0035163164f, 0.0062845536f,
- 0.0112742335f, 0.0203528218f, 0.0291403309f, 0.0419068150f,
- 0.0605678447f, 0.0879195333f, 0.1351860017f, 0.1836786717f,
- 0.2485272437f, 0.3268185258f, 0.3997989297f, 0.4313463271f,
- 0.3997989595f, 0.3268184960f, 0.2485273033f, 0.1836786866f,
- 0.1351860166f, 0.0879195333f, 0.0605678484f, 0.0419068113f,
- 0.0291403346f, 0.0203528218f, 0.0112742335f, 0.0062845536f,
- 0.0035163164f, 0.0019717216f, 0.0000000112f},
- {0.0000000186f, 0.0030510165f, 0.0054394603f, 0.0097163878f,
- 0.0174134374f, 0.0313772969f, 0.0448416248f, 0.0643075109f,
- 0.0925465450f, 0.1334379315f, 0.1968761533f, 0.2619350851f,
- 0.3448232114f, 0.4391061664f, 0.5217757225f, 0.5560634732f,
- 0.5217758417f, 0.4391061068f, 0.3448232710f, 0.2619350851f,
- 0.1968761683f, 0.1334379166f, 0.0925465375f, 0.0643075034f,
- 0.0448416248f, 0.0313772969f, 0.0174134411f, 0.0097163878f,
- 0.0054394603f, 0.0030510165f, 0.0000000186f},
- {0.0000000261f, 0.0045054816f, 0.0080264658f, 0.0143180229f,
- 0.0255970620f, 0.0459137484f, 0.0653222576f, 0.0930587947f,
- 0.1325951964f, 0.1883130074f, 0.2643320858f, 0.3264508545f,
- 0.4045200348f, 0.4876139164f, 0.5534962416f, 0.5791234970f,
- 0.5534962416f, 0.4876138568f, 0.4045200646f, 0.3264508843f,
- 0.2643321157f, 0.1883129925f, 0.1325951964f, 0.0930587873f,
- 0.0653222650f, 0.0459137484f, 0.0255970657f, 0.0143180229f,
- 0.0080264658f, 0.0045054816f, 0.0000000261f},
- {0.0000000298f, 0.0052370913f, 0.0093230158f, 0.0166091397f,
- 0.0296230800f, 0.0529078096f, 0.0749611408f, 0.1061499193f,
- 0.1499306262f, 0.2102518976f, 0.2898876965f, 0.3526277840f,
- 0.4186539054f, 0.4797268510f, 0.5241174698f, 0.5405187011f,
- 0.5241175294f, 0.4797268212f, 0.4186539650f, 0.3526278138f,
- 0.2898877263f, 0.2102518827f, 0.1499306262f, 0.1061499119f,
- 0.0749611482f, 0.0529078059f, 0.0296230800f, 0.0166091397f,
- 0.0093230195f, 0.0052370913f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045337155f, 0.0080470815f, 0.0142611191f,
- 0.0252004601f, 0.0442794114f, 0.0617907457f, 0.0856798738f,
- 0.1175989881f, 0.1587630510f, 0.2086764723f, 0.2448662519f,
- 0.2803090215f, 0.3109185398f, 0.3319681287f, 0.3395054638f,
- 0.3319681585f, 0.3109185100f, 0.2803090513f, 0.2448662668f,
- 0.2086764723f, 0.1587630361f, 0.1175989881f, 0.0856798664f,
- 0.0617907532f, 0.0442794114f, 0.0252004638f, 0.0142611191f,
- 0.0080470815f, 0.0045337155f, 0.0000000261f},
- {0.0000000037f, 0.0007901490f, 0.0014007613f, 0.0024771392f,
- 0.0043610819f, 0.0076146238f, 0.0105665363f, 0.0145437419f,
- 0.0197744034f, 0.0263919048f, 0.0342439152f, 0.0398325771f,
- 0.0452299826f, 0.0498363897f, 0.0529768690f, 0.0540962704f,
- 0.0529768690f, 0.0498363897f, 0.0452299826f, 0.0398325771f,
- 0.0342439152f, 0.0263919048f, 0.0197744034f, 0.0145437419f,
- 0.0105665363f, 0.0076146238f, 0.0043610819f, 0.0024771392f,
- 0.0014007613f, 0.0007901490f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019717216f, 0.0035163164f, 0.0062845536f, 0.0112742335f, 0.0203528218f,
+ 0.0291403309f, 0.0419068150f, 0.0605678447f, 0.0879195333f, 0.1351860017f, 0.1836786717f,
+ 0.2485272437f, 0.3268185258f, 0.3997989297f, 0.4313463271f, 0.3997989595f, 0.3268184960f,
+ 0.2485273033f, 0.1836786866f, 0.1351860166f, 0.0879195333f, 0.0605678484f, 0.0419068113f,
+ 0.0291403346f, 0.0203528218f, 0.0112742335f, 0.0062845536f, 0.0035163164f, 0.0019717216f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030510165f, 0.0054394603f, 0.0097163878f, 0.0174134374f, 0.0313772969f,
+ 0.0448416248f, 0.0643075109f, 0.0925465450f, 0.1334379315f, 0.1968761533f, 0.2619350851f,
+ 0.3448232114f, 0.4391061664f, 0.5217757225f, 0.5560634732f, 0.5217758417f, 0.4391061068f,
+ 0.3448232710f, 0.2619350851f, 0.1968761683f, 0.1334379166f, 0.0925465375f, 0.0643075034f,
+ 0.0448416248f, 0.0313772969f, 0.0174134411f, 0.0097163878f, 0.0054394603f, 0.0030510165f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045054816f, 0.0080264658f, 0.0143180229f, 0.0255970620f, 0.0459137484f,
+ 0.0653222576f, 0.0930587947f, 0.1325951964f, 0.1883130074f, 0.2643320858f, 0.3264508545f,
+ 0.4045200348f, 0.4876139164f, 0.5534962416f, 0.5791234970f, 0.5534962416f, 0.4876138568f,
+ 0.4045200646f, 0.3264508843f, 0.2643321157f, 0.1883129925f, 0.1325951964f, 0.0930587873f,
+ 0.0653222650f, 0.0459137484f, 0.0255970657f, 0.0143180229f, 0.0080264658f, 0.0045054816f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052370913f, 0.0093230158f, 0.0166091397f, 0.0296230800f, 0.0529078096f,
+ 0.0749611408f, 0.1061499193f, 0.1499306262f, 0.2102518976f, 0.2898876965f, 0.3526277840f,
+ 0.4186539054f, 0.4797268510f, 0.5241174698f, 0.5405187011f, 0.5241175294f, 0.4797268212f,
+ 0.4186539650f, 0.3526278138f, 0.2898877263f, 0.2102518827f, 0.1499306262f, 0.1061499119f,
+ 0.0749611482f, 0.0529078059f, 0.0296230800f, 0.0166091397f, 0.0093230195f, 0.0052370913f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045337155f, 0.0080470815f, 0.0142611191f, 0.0252004601f, 0.0442794114f,
+ 0.0617907457f, 0.0856798738f, 0.1175989881f, 0.1587630510f, 0.2086764723f, 0.2448662519f,
+ 0.2803090215f, 0.3109185398f, 0.3319681287f, 0.3395054638f, 0.3319681585f, 0.3109185100f,
+ 0.2803090513f, 0.2448662668f, 0.2086764723f, 0.1587630361f, 0.1175989881f, 0.0856798664f,
+ 0.0617907532f, 0.0442794114f, 0.0252004638f, 0.0142611191f, 0.0080470815f, 0.0045337155f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007901490f, 0.0014007613f, 0.0024771392f, 0.0043610819f, 0.0076146238f,
+ 0.0105665363f, 0.0145437419f, 0.0197744034f, 0.0263919048f, 0.0342439152f, 0.0398325771f,
+ 0.0452299826f, 0.0498363897f, 0.0529768690f, 0.0540962704f, 0.0529768690f, 0.0498363897f,
+ 0.0452299826f, 0.0398325771f, 0.0342439152f, 0.0263919048f, 0.0197744034f, 0.0145437419f,
+ 0.0105665363f, 0.0076146238f, 0.0043610819f, 0.0024771392f, 0.0014007613f, 0.0007901490f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019739941f, 0.0035235770f, 0.0063079223f,
- 0.0113505051f, 0.0206078701f, 0.0296765603f, 0.0430580825f,
- 0.0631116480f, 0.0983685851f, 0.1666181833f, 0.2469854802f,
- 0.3804836273f, 0.6008414030f, 0.9043325186f, 1.0835957527f,
- 0.9043327570f, 0.6008412838f, 0.3804837465f, 0.2469855100f,
- 0.1666181833f, 0.0983685851f, 0.0631116480f, 0.0430580750f,
- 0.0296765603f, 0.0206078701f, 0.0113505051f, 0.0063079223f,
- 0.0035235770f, 0.0019739941f, 0.0000000112f},
- {0.0000000186f, 0.0030541718f, 0.0054495223f, 0.0097487271f,
- 0.0175186098f, 0.0317266919f, 0.0455713645f, 0.0658584908f,
- 0.0959193856f, 0.1436767876f, 0.2341895550f, 0.3323971331f,
- 0.4782980084f, 0.6811693311f, 0.9031447768f, 1.0110551119f,
- 0.9031450748f, 0.6811692119f, 0.4782981277f, 0.3323971033f,
- 0.2341895849f, 0.1436767727f, 0.0959193856f, 0.0658584833f,
- 0.0455713719f, 0.0317266919f, 0.0175186135f, 0.0097487271f,
- 0.0054495223f, 0.0030541718f, 0.0000000186f},
- {0.0000000261f, 0.0045088008f, 0.0080370344f, 0.0143518075f,
- 0.0257059969f, 0.0462698899f, 0.0660543442f, 0.0945780575f,
- 0.1357807368f, 0.1950440407f, 0.2812705636f, 0.3701249063f,
- 0.4805524051f, 0.6025272608f, 0.7064292431f, 0.7487157583f,
- 0.7064292431f, 0.6025272012f, 0.4805524945f, 0.3701249063f,
- 0.2812705934f, 0.1950440556f, 0.1357807517f, 0.0945780426f,
- 0.0660543516f, 0.0462698862f, 0.0257060006f, 0.0143518075f,
- 0.0080370344f, 0.0045088008f, 0.0000000261f},
- {0.0000000298f, 0.0052394457f, 0.0093304962f, 0.0166329406f,
- 0.0296991989f, 0.0531529523f, 0.0754577741f, 0.1071588024f,
- 0.1519807279f, 0.2143882662f, 0.2980266809f, 0.3650085926f,
- 0.4366289973f, 0.5043625832f, 0.5640503764f, 0.5867944360f,
- 0.5640504360f, 0.5043625236f, 0.4366289973f, 0.3650085926f,
- 0.2980266809f, 0.2143882662f, 0.1519807130f, 0.1071587950f,
- 0.0754577741f, 0.0531529561f, 0.0296992026f, 0.0166329406f,
- 0.0093304962f, 0.0052394457f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045304820f, 0.0080369115f, 0.0142293312f,
- 0.0251020007f, 0.0439797007f, 0.0612145849f, 0.0845912322f,
- 0.1155948415f, 0.1552157849f, 0.2027583867f, 0.2369178981f,
- 0.2701408267f, 0.2986625433f, 0.3181905448f, 0.3251666427f,
- 0.3181905448f, 0.2986625135f, 0.2701408565f, 0.2369178981f,
- 0.2027584016f, 0.1552157849f, 0.1155948490f, 0.0845912248f,
- 0.0612145923f, 0.0439797044f, 0.0251020044f, 0.0142293312f,
- 0.0080369115f, 0.0045304820f, 0.0000000261f},
- {0.0000000037f, 0.0007892065f, 0.0013978072f, 0.0024679713f,
- 0.0043330416f, 0.0075310804f, 0.0104089491f, 0.0142532848f,
- 0.0192561597f, 0.0255084299f, 0.0328301787f, 0.0379860699f,
- 0.0429274589f, 0.0471183173f, 0.0499628633f, 0.0509744659f,
- 0.0499628671f, 0.0471183136f, 0.0429274626f, 0.0379860736f,
- 0.0328301787f, 0.0255084261f, 0.0192561597f, 0.0142532811f,
- 0.0104089528f, 0.0075310804f, 0.0043330416f, 0.0024679713f,
- 0.0013978072f, 0.0007892065f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019739941f, 0.0035235770f, 0.0063079223f, 0.0113505051f, 0.0206078701f,
+ 0.0296765603f, 0.0430580825f, 0.0631116480f, 0.0983685851f, 0.1666181833f, 0.2469854802f,
+ 0.3804836273f, 0.6008414030f, 0.9043325186f, 1.0835957527f, 0.9043327570f, 0.6008412838f,
+ 0.3804837465f, 0.2469855100f, 0.1666181833f, 0.0983685851f, 0.0631116480f, 0.0430580750f,
+ 0.0296765603f, 0.0206078701f, 0.0113505051f, 0.0063079223f, 0.0035235770f, 0.0019739941f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030541718f, 0.0054495223f, 0.0097487271f, 0.0175186098f, 0.0317266919f,
+ 0.0455713645f, 0.0658584908f, 0.0959193856f, 0.1436767876f, 0.2341895550f, 0.3323971331f,
+ 0.4782980084f, 0.6811693311f, 0.9031447768f, 1.0110551119f, 0.9031450748f, 0.6811692119f,
+ 0.4782981277f, 0.3323971033f, 0.2341895849f, 0.1436767727f, 0.0959193856f, 0.0658584833f,
+ 0.0455713719f, 0.0317266919f, 0.0175186135f, 0.0097487271f, 0.0054495223f, 0.0030541718f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045088008f, 0.0080370344f, 0.0143518075f, 0.0257059969f, 0.0462698899f,
+ 0.0660543442f, 0.0945780575f, 0.1357807368f, 0.1950440407f, 0.2812705636f, 0.3701249063f,
+ 0.4805524051f, 0.6025272608f, 0.7064292431f, 0.7487157583f, 0.7064292431f, 0.6025272012f,
+ 0.4805524945f, 0.3701249063f, 0.2812705934f, 0.1950440556f, 0.1357807517f, 0.0945780426f,
+ 0.0660543516f, 0.0462698862f, 0.0257060006f, 0.0143518075f, 0.0080370344f, 0.0045088008f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052394457f, 0.0093304962f, 0.0166329406f, 0.0296991989f, 0.0531529523f,
+ 0.0754577741f, 0.1071588024f, 0.1519807279f, 0.2143882662f, 0.2980266809f, 0.3650085926f,
+ 0.4366289973f, 0.5043625832f, 0.5640503764f, 0.5867944360f, 0.5640504360f, 0.5043625236f,
+ 0.4366289973f, 0.3650085926f, 0.2980266809f, 0.2143882662f, 0.1519807130f, 0.1071587950f,
+ 0.0754577741f, 0.0531529561f, 0.0296992026f, 0.0166329406f, 0.0093304962f, 0.0052394457f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045304820f, 0.0080369115f, 0.0142293312f, 0.0251020007f, 0.0439797007f,
+ 0.0612145849f, 0.0845912322f, 0.1155948415f, 0.1552157849f, 0.2027583867f, 0.2369178981f,
+ 0.2701408267f, 0.2986625433f, 0.3181905448f, 0.3251666427f, 0.3181905448f, 0.2986625135f,
+ 0.2701408565f, 0.2369178981f, 0.2027584016f, 0.1552157849f, 0.1155948490f, 0.0845912248f,
+ 0.0612145923f, 0.0439797044f, 0.0251020044f, 0.0142293312f, 0.0080369115f, 0.0045304820f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007892065f, 0.0013978072f, 0.0024679713f, 0.0043330416f, 0.0075310804f,
+ 0.0104089491f, 0.0142532848f, 0.0192561597f, 0.0255084299f, 0.0328301787f, 0.0379860699f,
+ 0.0429274589f, 0.0471183173f, 0.0499628633f, 0.0509744659f, 0.0499628671f, 0.0471183136f,
+ 0.0429274626f, 0.0379860736f, 0.0328301787f, 0.0255084261f, 0.0192561597f, 0.0142532811f,
+ 0.0104089528f, 0.0075310804f, 0.0043330416f, 0.0024679713f, 0.0013978072f, 0.0007892065f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, -3.2000000477f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019747950f, 0.0035261363f, 0.0063161924f,
- 0.0113776550f, 0.0206997320f, 0.0298720002f, 0.0434854478f,
- 0.0640839934f, 0.1033503860f, 0.1814315021f, 0.2809938192f,
- 0.4676808715f, 0.8515646458f, 1.6239985228f, 2.3103787899f,
- 1.6239993572f, 0.8515645266f, 0.4676810503f, 0.2809938490f,
- 0.1814315170f, 0.1033503786f, 0.0640839934f, 0.0434854440f,
- 0.0298720002f, 0.0206997320f, 0.0113776587f, 0.0063161924f,
- 0.0035261363f, 0.0019747950f, 0.0000000112f},
- {0.0000000186f, 0.0030552819f, 0.0054530725f, 0.0097601563f,
- 0.0175559968f, 0.0318521820f, 0.0458361991f, 0.0664303452f,
- 0.0971942917f, 0.1497929543f, 0.2508868575f, 0.3670715094f,
- 0.5535376668f, 0.8446811438f, 1.2149823904f, 1.4186795950f,
- 1.2149829865f, 0.8446810246f, 0.5535378456f, 0.3670715392f,
- 0.2508868873f, 0.1497929394f, 0.0971942842f, 0.0664303303f,
- 0.0458362028f, 0.0318521783f, 0.0175559968f, 0.0097601563f,
- 0.0054530725f, 0.0030552782f, 0.0000000186f},
- {0.0000000261f, 0.0045099705f, 0.0080407523f, 0.0143637285f,
- 0.0257445797f, 0.0463969335f, 0.0663173124f, 0.0951294750f,
- 0.1369550526f, 0.1975847185f, 0.2925730348f, 0.3899479210f,
- 0.5145110488f, 0.6568877101f, 0.7823352814f, 0.8345331550f,
- 0.7823353410f, 0.6568875909f, 0.5145111084f, 0.3899479508f,
- 0.2925730646f, 0.1975847185f, 0.1369550526f, 0.0951294526f,
- 0.0663173199f, 0.0463969298f, 0.0257445835f, 0.0143637285f,
- 0.0080407523f, 0.0045099705f, 0.0000000261f},
- {0.0000000298f, 0.0052402765f, 0.0093331225f, 0.0166413262f,
- 0.0297260657f, 0.0532398559f, 0.0756345168f, 0.1075199619f,
- 0.1527208239f, 0.2158997804f, 0.3010516465f, 0.3696758151f,
- 0.4435127378f, 0.5234289765f, 0.5880037546f, 0.6127629280f,
- 0.5880038142f, 0.5234289765f, 0.4435127676f, 0.3696758151f,
- 0.3010516465f, 0.2158997506f, 0.1527208090f, 0.1075199544f,
- 0.0756345242f, 0.0532398522f, 0.0297260694f, 0.0166413262f,
- 0.0093331262f, 0.0052402765f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045293458f, 0.0080333501f, 0.0142182149f,
- 0.0250676982f, 0.0438758917f, 0.0610160530f, 0.0842186734f,
- 0.1149150282f, 0.1540254205f, 0.2007966489f, 0.2343050987f,
- 0.2668242753f, 0.2946906090f, 0.3137444556f, 0.3205463886f,
- 0.3137444556f, 0.2946906090f, 0.2668242753f, 0.2343050987f,
- 0.2007966489f, 0.1540254205f, 0.1149150357f, 0.0842186660f,
- 0.0610160567f, 0.0438758880f, 0.0250677019f, 0.0142182149f,
- 0.0080333501f, 0.0045293458f, 0.0000000261f},
- {0.0000000037f, 0.0007888749f, 0.0013967715f, 0.0024647750f,
- 0.0043233223f, 0.0075023882f, 0.0103552639f, 0.0141553432f,
- 0.0190836154f, 0.0252186134f, 0.0323737599f, 0.0373960882f,
- 0.0421986058f, 0.0462643132f, 0.0490204468f, 0.0499999784f,
- 0.0490204468f, 0.0462643094f, 0.0421986058f, 0.0373960882f,
- 0.0323737562f, 0.0252186134f, 0.0190836154f, 0.0141553432f,
- 0.0103552639f, 0.0075023882f, 0.0043233223f, 0.0024647750f,
- 0.0013967715f, 0.0007888749f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ -3.2000000477f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019747950f, 0.0035261363f, 0.0063161924f, 0.0113776550f, 0.0206997320f,
+ 0.0298720002f, 0.0434854478f, 0.0640839934f, 0.1033503860f, 0.1814315021f, 0.2809938192f,
+ 0.4676808715f, 0.8515646458f, 1.6239985228f, 2.3103787899f, 1.6239993572f, 0.8515645266f,
+ 0.4676810503f, 0.2809938490f, 0.1814315170f, 0.1033503786f, 0.0640839934f, 0.0434854440f,
+ 0.0298720002f, 0.0206997320f, 0.0113776587f, 0.0063161924f, 0.0035261363f, 0.0019747950f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030552819f, 0.0054530725f, 0.0097601563f, 0.0175559968f, 0.0318521820f,
+ 0.0458361991f, 0.0664303452f, 0.0971942917f, 0.1497929543f, 0.2508868575f, 0.3670715094f,
+ 0.5535376668f, 0.8446811438f, 1.2149823904f, 1.4186795950f, 1.2149829865f, 0.8446810246f,
+ 0.5535378456f, 0.3670715392f, 0.2508868873f, 0.1497929394f, 0.0971942842f, 0.0664303303f,
+ 0.0458362028f, 0.0318521783f, 0.0175559968f, 0.0097601563f, 0.0054530725f, 0.0030552782f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045099705f, 0.0080407523f, 0.0143637285f, 0.0257445797f, 0.0463969335f,
+ 0.0663173124f, 0.0951294750f, 0.1369550526f, 0.1975847185f, 0.2925730348f, 0.3899479210f,
+ 0.5145110488f, 0.6568877101f, 0.7823352814f, 0.8345331550f, 0.7823353410f, 0.6568875909f,
+ 0.5145111084f, 0.3899479508f, 0.2925730646f, 0.1975847185f, 0.1369550526f, 0.0951294526f,
+ 0.0663173199f, 0.0463969298f, 0.0257445835f, 0.0143637285f, 0.0080407523f, 0.0045099705f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052402765f, 0.0093331225f, 0.0166413262f, 0.0297260657f, 0.0532398559f,
+ 0.0756345168f, 0.1075199619f, 0.1527208239f, 0.2158997804f, 0.3010516465f, 0.3696758151f,
+ 0.4435127378f, 0.5234289765f, 0.5880037546f, 0.6127629280f, 0.5880038142f, 0.5234289765f,
+ 0.4435127676f, 0.3696758151f, 0.3010516465f, 0.2158997506f, 0.1527208090f, 0.1075199544f,
+ 0.0756345242f, 0.0532398522f, 0.0297260694f, 0.0166413262f, 0.0093331262f, 0.0052402765f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045293458f, 0.0080333501f, 0.0142182149f, 0.0250676982f, 0.0438758917f,
+ 0.0610160530f, 0.0842186734f, 0.1149150282f, 0.1540254205f, 0.2007966489f, 0.2343050987f,
+ 0.2668242753f, 0.2946906090f, 0.3137444556f, 0.3205463886f, 0.3137444556f, 0.2946906090f,
+ 0.2668242753f, 0.2343050987f, 0.2007966489f, 0.1540254205f, 0.1149150357f, 0.0842186660f,
+ 0.0610160567f, 0.0438758880f, 0.0250677019f, 0.0142182149f, 0.0080333501f, 0.0045293458f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007888749f, 0.0013967715f, 0.0024647750f, 0.0043233223f, 0.0075023882f,
+ 0.0103552639f, 0.0141553432f, 0.0190836154f, 0.0252186134f, 0.0323737599f, 0.0373960882f,
+ 0.0421986058f, 0.0462643132f, 0.0490204468f, 0.0499999784f, 0.0490204468f, 0.0462643094f,
+ 0.0421986058f, 0.0373960882f, 0.0323737562f, 0.0252186134f, 0.0190836154f, 0.0141553432f,
+ 0.0103552639f, 0.0075023882f, 0.0043233223f, 0.0024647750f, 0.0013967715f, 0.0007888749f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019739941f, 0.0035235770f, 0.0063079223f,
- 0.0113505051f, 0.0206078701f, 0.0296765603f, 0.0430580825f,
- 0.0631116480f, 0.0983685851f, 0.1666181833f, 0.2469854802f,
- 0.3804836273f, 0.6008414030f, 0.9043325186f, 1.0835957527f,
- 0.9043327570f, 0.6008412838f, 0.3804837465f, 0.2469855100f,
- 0.1666181833f, 0.0983685851f, 0.0631116480f, 0.0430580750f,
- 0.0296765603f, 0.0206078701f, 0.0113505051f, 0.0063079223f,
- 0.0035235770f, 0.0019739941f, 0.0000000112f},
- {0.0000000186f, 0.0030541718f, 0.0054495223f, 0.0097487271f,
- 0.0175186098f, 0.0317266919f, 0.0455713645f, 0.0658584908f,
- 0.0959193856f, 0.1436767876f, 0.2341895550f, 0.3323971331f,
- 0.4782980084f, 0.6811693311f, 0.9031447768f, 1.0110551119f,
- 0.9031450748f, 0.6811692119f, 0.4782981277f, 0.3323971033f,
- 0.2341895849f, 0.1436767727f, 0.0959193856f, 0.0658584833f,
- 0.0455713719f, 0.0317266919f, 0.0175186135f, 0.0097487271f,
- 0.0054495223f, 0.0030541718f, 0.0000000186f},
- {0.0000000261f, 0.0045088008f, 0.0080370344f, 0.0143518075f,
- 0.0257059969f, 0.0462698899f, 0.0660543442f, 0.0945780575f,
- 0.1357807368f, 0.1950440407f, 0.2812705636f, 0.3701249063f,
- 0.4805524051f, 0.6025272608f, 0.7064292431f, 0.7487157583f,
- 0.7064292431f, 0.6025272012f, 0.4805524945f, 0.3701249063f,
- 0.2812705934f, 0.1950440556f, 0.1357807517f, 0.0945780426f,
- 0.0660543516f, 0.0462698862f, 0.0257060006f, 0.0143518075f,
- 0.0080370344f, 0.0045088008f, 0.0000000261f},
- {0.0000000298f, 0.0052394457f, 0.0093304962f, 0.0166329406f,
- 0.0296991989f, 0.0531529523f, 0.0754577741f, 0.1071588024f,
- 0.1519807279f, 0.2143882662f, 0.2980266809f, 0.3650085926f,
- 0.4366289973f, 0.5043625832f, 0.5640503764f, 0.5867944360f,
- 0.5640504360f, 0.5043625236f, 0.4366289973f, 0.3650085926f,
- 0.2980266809f, 0.2143882662f, 0.1519807130f, 0.1071587950f,
- 0.0754577741f, 0.0531529561f, 0.0296992026f, 0.0166329406f,
- 0.0093304962f, 0.0052394457f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045304820f, 0.0080369115f, 0.0142293312f,
- 0.0251020007f, 0.0439797007f, 0.0612145849f, 0.0845912322f,
- 0.1155948415f, 0.1552157849f, 0.2027583867f, 0.2369178981f,
- 0.2701408267f, 0.2986625433f, 0.3181905448f, 0.3251666427f,
- 0.3181905448f, 0.2986625135f, 0.2701408565f, 0.2369178981f,
- 0.2027584016f, 0.1552157849f, 0.1155948490f, 0.0845912248f,
- 0.0612145923f, 0.0439797044f, 0.0251020044f, 0.0142293312f,
- 0.0080369115f, 0.0045304820f, 0.0000000261f},
- {0.0000000037f, 0.0007892065f, 0.0013978072f, 0.0024679713f,
- 0.0043330416f, 0.0075310804f, 0.0104089491f, 0.0142532848f,
- 0.0192561597f, 0.0255084299f, 0.0328301787f, 0.0379860699f,
- 0.0429274589f, 0.0471183173f, 0.0499628633f, 0.0509744659f,
- 0.0499628671f, 0.0471183136f, 0.0429274626f, 0.0379860736f,
- 0.0328301787f, 0.0255084261f, 0.0192561597f, 0.0142532811f,
- 0.0104089528f, 0.0075310804f, 0.0043330416f, 0.0024679713f,
- 0.0013978072f, 0.0007892065f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019739941f, 0.0035235770f, 0.0063079223f, 0.0113505051f, 0.0206078701f,
+ 0.0296765603f, 0.0430580825f, 0.0631116480f, 0.0983685851f, 0.1666181833f, 0.2469854802f,
+ 0.3804836273f, 0.6008414030f, 0.9043325186f, 1.0835957527f, 0.9043327570f, 0.6008412838f,
+ 0.3804837465f, 0.2469855100f, 0.1666181833f, 0.0983685851f, 0.0631116480f, 0.0430580750f,
+ 0.0296765603f, 0.0206078701f, 0.0113505051f, 0.0063079223f, 0.0035235770f, 0.0019739941f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030541718f, 0.0054495223f, 0.0097487271f, 0.0175186098f, 0.0317266919f,
+ 0.0455713645f, 0.0658584908f, 0.0959193856f, 0.1436767876f, 0.2341895550f, 0.3323971331f,
+ 0.4782980084f, 0.6811693311f, 0.9031447768f, 1.0110551119f, 0.9031450748f, 0.6811692119f,
+ 0.4782981277f, 0.3323971033f, 0.2341895849f, 0.1436767727f, 0.0959193856f, 0.0658584833f,
+ 0.0455713719f, 0.0317266919f, 0.0175186135f, 0.0097487271f, 0.0054495223f, 0.0030541718f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045088008f, 0.0080370344f, 0.0143518075f, 0.0257059969f, 0.0462698899f,
+ 0.0660543442f, 0.0945780575f, 0.1357807368f, 0.1950440407f, 0.2812705636f, 0.3701249063f,
+ 0.4805524051f, 0.6025272608f, 0.7064292431f, 0.7487157583f, 0.7064292431f, 0.6025272012f,
+ 0.4805524945f, 0.3701249063f, 0.2812705934f, 0.1950440556f, 0.1357807517f, 0.0945780426f,
+ 0.0660543516f, 0.0462698862f, 0.0257060006f, 0.0143518075f, 0.0080370344f, 0.0045088008f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052394457f, 0.0093304962f, 0.0166329406f, 0.0296991989f, 0.0531529523f,
+ 0.0754577741f, 0.1071588024f, 0.1519807279f, 0.2143882662f, 0.2980266809f, 0.3650085926f,
+ 0.4366289973f, 0.5043625832f, 0.5640503764f, 0.5867944360f, 0.5640504360f, 0.5043625236f,
+ 0.4366289973f, 0.3650085926f, 0.2980266809f, 0.2143882662f, 0.1519807130f, 0.1071587950f,
+ 0.0754577741f, 0.0531529561f, 0.0296992026f, 0.0166329406f, 0.0093304962f, 0.0052394457f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045304820f, 0.0080369115f, 0.0142293312f, 0.0251020007f, 0.0439797007f,
+ 0.0612145849f, 0.0845912322f, 0.1155948415f, 0.1552157849f, 0.2027583867f, 0.2369178981f,
+ 0.2701408267f, 0.2986625433f, 0.3181905448f, 0.3251666427f, 0.3181905448f, 0.2986625135f,
+ 0.2701408565f, 0.2369178981f, 0.2027584016f, 0.1552157849f, 0.1155948490f, 0.0845912248f,
+ 0.0612145923f, 0.0439797044f, 0.0251020044f, 0.0142293312f, 0.0080369115f, 0.0045304820f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007892065f, 0.0013978072f, 0.0024679713f, 0.0043330416f, 0.0075310804f,
+ 0.0104089491f, 0.0142532848f, 0.0192561597f, 0.0255084299f, 0.0328301787f, 0.0379860699f,
+ 0.0429274589f, 0.0471183173f, 0.0499628633f, 0.0509744659f, 0.0499628671f, 0.0471183136f,
+ 0.0429274626f, 0.0379860736f, 0.0328301787f, 0.0255084261f, 0.0192561597f, 0.0142532811f,
+ 0.0104089528f, 0.0075310804f, 0.0043330416f, 0.0024679713f, 0.0013978072f, 0.0007892065f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019717216f, 0.0035163164f, 0.0062845536f,
- 0.0112742335f, 0.0203528218f, 0.0291403309f, 0.0419068150f,
- 0.0605678484f, 0.0879195333f, 0.1351860166f, 0.1836786717f,
- 0.2485272735f, 0.3268185556f, 0.3997989595f, 0.4313464165f,
- 0.3997990191f, 0.3268185258f, 0.2485273331f, 0.1836787015f,
- 0.1351860166f, 0.0879195333f, 0.0605678484f, 0.0419068113f,
- 0.0291403346f, 0.0203528218f, 0.0112742335f, 0.0062845536f,
- 0.0035163164f, 0.0019717216f, 0.0000000112f},
- {0.0000000186f, 0.0030510165f, 0.0054394603f, 0.0097163878f,
- 0.0174134374f, 0.0313772969f, 0.0448416248f, 0.0643075109f,
- 0.0925465450f, 0.1334379315f, 0.1968761533f, 0.2619351149f,
- 0.3448232412f, 0.4391061962f, 0.5217757821f, 0.5560635328f,
- 0.5217759013f, 0.4391061366f, 0.3448233008f, 0.2619350851f,
- 0.1968761832f, 0.1334379166f, 0.0925465375f, 0.0643075034f,
- 0.0448416322f, 0.0313772969f, 0.0174134411f, 0.0097163878f,
- 0.0054394603f, 0.0030510165f, 0.0000000186f},
- {0.0000000261f, 0.0045054816f, 0.0080264658f, 0.0143180229f,
- 0.0255970620f, 0.0459137484f, 0.0653222576f, 0.0930587947f,
- 0.1325951964f, 0.1883130074f, 0.2643320858f, 0.3264508545f,
- 0.4045200646f, 0.4876139462f, 0.5534963012f, 0.5791235566f,
- 0.5534963012f, 0.4876138866f, 0.4045200944f, 0.3264508843f,
- 0.2643321157f, 0.1883129925f, 0.1325951964f, 0.0930587873f,
- 0.0653222650f, 0.0459137484f, 0.0255970657f, 0.0143180229f,
- 0.0080264658f, 0.0045054816f, 0.0000000261f},
- {0.0000000298f, 0.0052370913f, 0.0093230158f, 0.0166091397f,
- 0.0296230800f, 0.0529078096f, 0.0749611408f, 0.1061499193f,
- 0.1499306262f, 0.2102518976f, 0.2898877263f, 0.3526277840f,
- 0.4186539352f, 0.4797269106f, 0.5241174698f, 0.5405187011f,
- 0.5241175294f, 0.4797268510f, 0.4186539650f, 0.3526278138f,
- 0.2898877263f, 0.2102518976f, 0.1499306262f, 0.1061499119f,
- 0.0749611482f, 0.0529078059f, 0.0296230800f, 0.0166091397f,
- 0.0093230195f, 0.0052370913f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045337155f, 0.0080470815f, 0.0142611191f,
- 0.0252004601f, 0.0442794114f, 0.0617907457f, 0.0856798664f,
- 0.1175989881f, 0.1587630510f, 0.2086764723f, 0.2448662668f,
- 0.2803090215f, 0.3109185398f, 0.3319681287f, 0.3395054638f,
- 0.3319681585f, 0.3109185100f, 0.2803090215f, 0.2448662668f,
- 0.2086764574f, 0.1587630361f, 0.1175989881f, 0.0856798664f,
- 0.0617907532f, 0.0442794114f, 0.0252004638f, 0.0142611191f,
- 0.0080470815f, 0.0045337155f, 0.0000000261f},
- {0.0000000037f, 0.0007901490f, 0.0014007613f, 0.0024771392f,
- 0.0043610819f, 0.0076146238f, 0.0105665363f, 0.0145437419f,
- 0.0197744034f, 0.0263919048f, 0.0342439152f, 0.0398325771f,
- 0.0452299826f, 0.0498363897f, 0.0529768690f, 0.0540962666f,
- 0.0529768690f, 0.0498363897f, 0.0452299863f, 0.0398325771f,
- 0.0342439152f, 0.0263919011f, 0.0197744034f, 0.0145437419f,
- 0.0105665363f, 0.0076146238f, 0.0043610819f, 0.0024771392f,
- 0.0014007613f, 0.0007901490f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019717216f, 0.0035163164f, 0.0062845536f, 0.0112742335f, 0.0203528218f,
+ 0.0291403309f, 0.0419068150f, 0.0605678484f, 0.0879195333f, 0.1351860166f, 0.1836786717f,
+ 0.2485272735f, 0.3268185556f, 0.3997989595f, 0.4313464165f, 0.3997990191f, 0.3268185258f,
+ 0.2485273331f, 0.1836787015f, 0.1351860166f, 0.0879195333f, 0.0605678484f, 0.0419068113f,
+ 0.0291403346f, 0.0203528218f, 0.0112742335f, 0.0062845536f, 0.0035163164f, 0.0019717216f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030510165f, 0.0054394603f, 0.0097163878f, 0.0174134374f, 0.0313772969f,
+ 0.0448416248f, 0.0643075109f, 0.0925465450f, 0.1334379315f, 0.1968761533f, 0.2619351149f,
+ 0.3448232412f, 0.4391061962f, 0.5217757821f, 0.5560635328f, 0.5217759013f, 0.4391061366f,
+ 0.3448233008f, 0.2619350851f, 0.1968761832f, 0.1334379166f, 0.0925465375f, 0.0643075034f,
+ 0.0448416322f, 0.0313772969f, 0.0174134411f, 0.0097163878f, 0.0054394603f, 0.0030510165f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045054816f, 0.0080264658f, 0.0143180229f, 0.0255970620f, 0.0459137484f,
+ 0.0653222576f, 0.0930587947f, 0.1325951964f, 0.1883130074f, 0.2643320858f, 0.3264508545f,
+ 0.4045200646f, 0.4876139462f, 0.5534963012f, 0.5791235566f, 0.5534963012f, 0.4876138866f,
+ 0.4045200944f, 0.3264508843f, 0.2643321157f, 0.1883129925f, 0.1325951964f, 0.0930587873f,
+ 0.0653222650f, 0.0459137484f, 0.0255970657f, 0.0143180229f, 0.0080264658f, 0.0045054816f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052370913f, 0.0093230158f, 0.0166091397f, 0.0296230800f, 0.0529078096f,
+ 0.0749611408f, 0.1061499193f, 0.1499306262f, 0.2102518976f, 0.2898877263f, 0.3526277840f,
+ 0.4186539352f, 0.4797269106f, 0.5241174698f, 0.5405187011f, 0.5241175294f, 0.4797268510f,
+ 0.4186539650f, 0.3526278138f, 0.2898877263f, 0.2102518976f, 0.1499306262f, 0.1061499119f,
+ 0.0749611482f, 0.0529078059f, 0.0296230800f, 0.0166091397f, 0.0093230195f, 0.0052370913f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045337155f, 0.0080470815f, 0.0142611191f, 0.0252004601f, 0.0442794114f,
+ 0.0617907457f, 0.0856798664f, 0.1175989881f, 0.1587630510f, 0.2086764723f, 0.2448662668f,
+ 0.2803090215f, 0.3109185398f, 0.3319681287f, 0.3395054638f, 0.3319681585f, 0.3109185100f,
+ 0.2803090215f, 0.2448662668f, 0.2086764574f, 0.1587630361f, 0.1175989881f, 0.0856798664f,
+ 0.0617907532f, 0.0442794114f, 0.0252004638f, 0.0142611191f, 0.0080470815f, 0.0045337155f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007901490f, 0.0014007613f, 0.0024771392f, 0.0043610819f, 0.0076146238f,
+ 0.0105665363f, 0.0145437419f, 0.0197744034f, 0.0263919048f, 0.0342439152f, 0.0398325771f,
+ 0.0452299826f, 0.0498363897f, 0.0529768690f, 0.0540962666f, 0.0529768690f, 0.0498363897f,
+ 0.0452299863f, 0.0398325771f, 0.0342439152f, 0.0263919011f, 0.0197744034f, 0.0145437419f,
+ 0.0105665363f, 0.0076146238f, 0.0043610819f, 0.0024771392f, 0.0014007613f, 0.0007901490f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019683354f, 0.0035055354f, 0.0062500574f,
- 0.0111629069f, 0.0199882090f, 0.0283894800f, 0.0403442569f,
- 0.0572769158f, 0.0809144601f, 0.1127139255f, 0.1382882297f,
- 0.1657483131f, 0.1942400485f, 0.2178780138f, 0.2269225717f,
- 0.2178780288f, 0.1942400336f, 0.1657482982f, 0.1382882297f,
- 0.1127139255f, 0.0809144527f, 0.0572769195f, 0.0403442495f,
- 0.0283894837f, 0.0199882090f, 0.0111629069f, 0.0062500574f,
- 0.0035055354f, 0.0019683354f, 0.0000000112f},
- {0.0000000186f, 0.0030463114f, 0.0054244995f, 0.0096685886f,
- 0.0172595158f, 0.0308753066f, 0.0438121483f, 0.0621782839f,
- 0.0881035700f, 0.1241139099f, 0.1722071767f, 0.2105752081f,
- 0.2514455616f, 0.2897335589f, 0.3197217584f, 0.3322763145f,
- 0.3197217584f, 0.2897335589f, 0.2514455616f, 0.2105752081f,
- 0.1722071916f, 0.1241139099f, 0.0881035626f, 0.0621782765f,
- 0.0438121520f, 0.0308753066f, 0.0172595195f, 0.0096685886f,
- 0.0054244995f, 0.0030463114f, 0.0000000186f},
- {0.0000000261f, 0.0045005269f, 0.0080107339f, 0.0142679065f,
- 0.0254365876f, 0.0453957841f, 0.0642707124f, 0.0909159109f,
- 0.1282205731f, 0.1794259250f, 0.2466703802f, 0.2993502319f,
- 0.3544936478f, 0.4052205384f, 0.4419170022f, 0.4554374814f,
- 0.4419170320f, 0.4052205086f, 0.3544936776f, 0.2993502319f,
- 0.2466703951f, 0.1794259250f, 0.1282205731f, 0.0909159034f,
- 0.0642707199f, 0.0453957841f, 0.0254365914f, 0.0142679065f,
- 0.0080107339f, 0.0045005269f, 0.0000000261f},
- {0.0000000298f, 0.0052335747f, 0.0093118623f, 0.0165737085f,
- 0.0295102485f, 0.0525471680f, 0.0742358714f, 0.1046918780f,
- 0.1470117569f, 0.2044855654f, 0.2788636386f, 0.3362472057f,
- 0.3954694569f, 0.4491762221f, 0.4875625670f, 0.5016064048f,
- 0.4875625968f, 0.4491762221f, 0.3954694867f, 0.3362472057f,
- 0.2788636386f, 0.2044855654f, 0.1470117569f, 0.1046918631f,
- 0.0742358789f, 0.0525471680f, 0.0295102522f, 0.0165737085f,
- 0.0093118623f, 0.0052335709f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045385733f, 0.0080623738f, 0.0143091008f,
- 0.0253500044f, 0.0447396338f, 0.0626842678f, 0.0873906389f,
- 0.1208031848f, 0.1645577550f, 0.2185891271f, 0.2584138811f,
- 0.2979290783f, 0.3324524164f, 0.3564015627f, 0.3650175929f,
- 0.3564015925f, 0.3324523866f, 0.2979291081f, 0.2584138811f,
- 0.2185891420f, 0.1645577699f, 0.1208031774f, 0.0873906240f,
- 0.0626842752f, 0.0447396338f, 0.0253500082f, 0.0143091008f,
- 0.0080623738f, 0.0045385733f, 0.0000000261f},
- {0.0000000037f, 0.0007915683f, 0.0014052205f, 0.0024910569f,
- 0.0044040829f, 0.0077450164f, 0.0108163506f, 0.0150136538f,
- 0.0206346437f, 0.0279043429f, 0.0367485955f, 0.0431800336f,
- 0.0494931713f, 0.0549562946f, 0.0587187931f, 0.0600671172f,
- 0.0587187931f, 0.0549562946f, 0.0494931750f, 0.0431800373f,
- 0.0367485955f, 0.0279043429f, 0.0206346437f, 0.0150136538f,
- 0.0108163506f, 0.0077450164f, 0.0044040829f, 0.0024910569f,
- 0.0014052168f, 0.0007915683f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019683354f, 0.0035055354f, 0.0062500574f, 0.0111629069f, 0.0199882090f,
+ 0.0283894800f, 0.0403442569f, 0.0572769158f, 0.0809144601f, 0.1127139255f, 0.1382882297f,
+ 0.1657483131f, 0.1942400485f, 0.2178780138f, 0.2269225717f, 0.2178780288f, 0.1942400336f,
+ 0.1657482982f, 0.1382882297f, 0.1127139255f, 0.0809144527f, 0.0572769195f, 0.0403442495f,
+ 0.0283894837f, 0.0199882090f, 0.0111629069f, 0.0062500574f, 0.0035055354f, 0.0019683354f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030463114f, 0.0054244995f, 0.0096685886f, 0.0172595158f, 0.0308753066f,
+ 0.0438121483f, 0.0621782839f, 0.0881035700f, 0.1241139099f, 0.1722071767f, 0.2105752081f,
+ 0.2514455616f, 0.2897335589f, 0.3197217584f, 0.3322763145f, 0.3197217584f, 0.2897335589f,
+ 0.2514455616f, 0.2105752081f, 0.1722071916f, 0.1241139099f, 0.0881035626f, 0.0621782765f,
+ 0.0438121520f, 0.0308753066f, 0.0172595195f, 0.0096685886f, 0.0054244995f, 0.0030463114f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0045005269f, 0.0080107339f, 0.0142679065f, 0.0254365876f, 0.0453957841f,
+ 0.0642707124f, 0.0909159109f, 0.1282205731f, 0.1794259250f, 0.2466703802f, 0.2993502319f,
+ 0.3544936478f, 0.4052205384f, 0.4419170022f, 0.4554374814f, 0.4419170320f, 0.4052205086f,
+ 0.3544936776f, 0.2993502319f, 0.2466703951f, 0.1794259250f, 0.1282205731f, 0.0909159034f,
+ 0.0642707199f, 0.0453957841f, 0.0254365914f, 0.0142679065f, 0.0080107339f, 0.0045005269f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052335747f, 0.0093118623f, 0.0165737085f, 0.0295102485f, 0.0525471680f,
+ 0.0742358714f, 0.1046918780f, 0.1470117569f, 0.2044855654f, 0.2788636386f, 0.3362472057f,
+ 0.3954694569f, 0.4491762221f, 0.4875625670f, 0.5016064048f, 0.4875625968f, 0.4491762221f,
+ 0.3954694867f, 0.3362472057f, 0.2788636386f, 0.2044855654f, 0.1470117569f, 0.1046918631f,
+ 0.0742358789f, 0.0525471680f, 0.0295102522f, 0.0165737085f, 0.0093118623f, 0.0052335709f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045385733f, 0.0080623738f, 0.0143091008f, 0.0253500044f, 0.0447396338f,
+ 0.0626842678f, 0.0873906389f, 0.1208031848f, 0.1645577550f, 0.2185891271f, 0.2584138811f,
+ 0.2979290783f, 0.3324524164f, 0.3564015627f, 0.3650175929f, 0.3564015925f, 0.3324523866f,
+ 0.2979291081f, 0.2584138811f, 0.2185891420f, 0.1645577699f, 0.1208031774f, 0.0873906240f,
+ 0.0626842752f, 0.0447396338f, 0.0253500082f, 0.0143091008f, 0.0080623738f, 0.0045385733f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007915683f, 0.0014052205f, 0.0024910569f, 0.0044040829f, 0.0077450164f,
+ 0.0108163506f, 0.0150136538f, 0.0206346437f, 0.0279043429f, 0.0367485955f, 0.0431800336f,
+ 0.0494931713f, 0.0549562946f, 0.0587187931f, 0.0600671172f, 0.0587187931f, 0.0549562946f,
+ 0.0494931750f, 0.0431800373f, 0.0367485955f, 0.0279043429f, 0.0206346437f, 0.0150136538f,
+ 0.0108163506f, 0.0077450164f, 0.0044040829f, 0.0024910569f, 0.0014052168f, 0.0007915683f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019643605f, 0.0034929439f, 0.0062100887f,
- 0.0110357292f, 0.0195823126f, 0.0275742412f, 0.0387081020f,
- 0.0540083535f, 0.0744726434f, 0.1004251465f, 0.1200447381f,
- 0.1399304867f, 0.1576502621f, 0.1701345593f, 0.1746647060f,
- 0.1701345742f, 0.1576502621f, 0.1399305016f, 0.1200447381f,
- 0.1004251465f, 0.0744726434f, 0.0540083535f, 0.0387080982f,
- 0.0275742412f, 0.0195823126f, 0.0110357292f, 0.0062100887f,
- 0.0034929439f, 0.0019643605f, 0.0000000112f},
- {0.0000000186f, 0.0030407943f, 0.0054070093f, 0.0096130967f,
- 0.0170830972f, 0.0303130411f, 0.0426843874f, 0.0599193908f,
- 0.0836038888f, 0.1152822077f, 0.1554561853f, 0.1858269274f,
- 0.2166096866f, 0.2440395653f, 0.2633650005f, 0.2703775764f,
- 0.2633650303f, 0.2440395504f, 0.2166097015f, 0.1858269274f,
- 0.1554561853f, 0.1152822077f, 0.0836038888f, 0.0599193871f,
- 0.0426843911f, 0.0303130411f, 0.0170830972f, 0.0096130967f,
- 0.0054070130f, 0.0030407943f, 0.0000000186f},
- {0.0000000261f, 0.0044947043f, 0.0079922937f, 0.0142094567f,
- 0.0252511203f, 0.0448067673f, 0.0630932897f, 0.0885689482f,
- 0.1235778332f, 0.1704026759f, 0.2297852188f, 0.2746772766f,
- 0.3201783597f, 0.3607234061f, 0.3892890215f, 0.3996545672f,
- 0.3892890513f, 0.3607234061f, 0.3201783895f, 0.2746773064f,
- 0.2297852337f, 0.1704026610f, 0.1235778257f, 0.0885689408f,
- 0.0630932897f, 0.0448067635f, 0.0252511241f, 0.0142094567f,
- 0.0079922937f, 0.0044947043f, 0.0000000261f},
- {0.0000000298f, 0.0052294321f, 0.0092987530f, 0.0165322050f,
- 0.0293787941f, 0.0521311015f, 0.0734068304f, 0.1030468717f,
- 0.1437784731f, 0.1982575357f, 0.2673470378f, 0.3195773959f,
- 0.3725163043f, 0.4196890593f, 0.4529241323f, 0.4649840891f,
- 0.4529241621f, 0.4196890295f, 0.3725163341f, 0.3195773959f,
- 0.2673470676f, 0.1982575357f, 0.1437784731f, 0.1030468568f,
- 0.0734068379f, 0.0521311015f, 0.0293787979f, 0.0165322050f,
- 0.0092987530f, 0.0052294284f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045443214f, 0.0080805235f, 0.0143663213f,
- 0.0255298801f, 0.0453014039f, 0.0637897998f, 0.0895466954f,
- 0.1249420568f, 0.1722838134f, 0.2323219031f, 0.2777095437f,
- 0.3237129450f, 0.3647055924f, 0.3935865462f, 0.4040665329f,
- 0.3935865760f, 0.3647055626f, 0.3237129450f, 0.2777095735f,
- 0.2323219180f, 0.1722838134f, 0.1249420494f, 0.0895466879f,
- 0.0637898073f, 0.0453014039f, 0.0255298801f, 0.0143663213f,
- 0.0080805235f, 0.0045443214f, 0.0000000261f},
- {0.0000000037f, 0.0007932559f, 0.0014105327f, 0.0025077760f,
- 0.0044564828f, 0.0079077892f, 0.0111351162f, 0.0156312287f,
- 0.0218098238f, 0.0300737768f, 0.0405539945f, 0.0484768376f,
- 0.0565071665f, 0.0636628196f, 0.0687042698f, 0.0705336481f,
- 0.0687042698f, 0.0636628196f, 0.0565071702f, 0.0484768413f,
- 0.0405539945f, 0.0300737731f, 0.0218098238f, 0.0156312250f,
- 0.0111351162f, 0.0079077892f, 0.0044564828f, 0.0025077760f,
- 0.0014105327f, 0.0007932559f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019643605f, 0.0034929439f, 0.0062100887f, 0.0110357292f, 0.0195823126f,
+ 0.0275742412f, 0.0387081020f, 0.0540083535f, 0.0744726434f, 0.1004251465f, 0.1200447381f,
+ 0.1399304867f, 0.1576502621f, 0.1701345593f, 0.1746647060f, 0.1701345742f, 0.1576502621f,
+ 0.1399305016f, 0.1200447381f, 0.1004251465f, 0.0744726434f, 0.0540083535f, 0.0387080982f,
+ 0.0275742412f, 0.0195823126f, 0.0110357292f, 0.0062100887f, 0.0034929439f, 0.0019643605f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030407943f, 0.0054070093f, 0.0096130967f, 0.0170830972f, 0.0303130411f,
+ 0.0426843874f, 0.0599193908f, 0.0836038888f, 0.1152822077f, 0.1554561853f, 0.1858269274f,
+ 0.2166096866f, 0.2440395653f, 0.2633650005f, 0.2703775764f, 0.2633650303f, 0.2440395504f,
+ 0.2166097015f, 0.1858269274f, 0.1554561853f, 0.1152822077f, 0.0836038888f, 0.0599193871f,
+ 0.0426843911f, 0.0303130411f, 0.0170830972f, 0.0096130967f, 0.0054070130f, 0.0030407943f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044947043f, 0.0079922937f, 0.0142094567f, 0.0252511203f, 0.0448067673f,
+ 0.0630932897f, 0.0885689482f, 0.1235778332f, 0.1704026759f, 0.2297852188f, 0.2746772766f,
+ 0.3201783597f, 0.3607234061f, 0.3892890215f, 0.3996545672f, 0.3892890513f, 0.3607234061f,
+ 0.3201783895f, 0.2746773064f, 0.2297852337f, 0.1704026610f, 0.1235778257f, 0.0885689408f,
+ 0.0630932897f, 0.0448067635f, 0.0252511241f, 0.0142094567f, 0.0079922937f, 0.0044947043f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052294321f, 0.0092987530f, 0.0165322050f, 0.0293787941f, 0.0521311015f,
+ 0.0734068304f, 0.1030468717f, 0.1437784731f, 0.1982575357f, 0.2673470378f, 0.3195773959f,
+ 0.3725163043f, 0.4196890593f, 0.4529241323f, 0.4649840891f, 0.4529241621f, 0.4196890295f,
+ 0.3725163341f, 0.3195773959f, 0.2673470676f, 0.1982575357f, 0.1437784731f, 0.1030468568f,
+ 0.0734068379f, 0.0521311015f, 0.0293787979f, 0.0165322050f, 0.0092987530f, 0.0052294284f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045443214f, 0.0080805235f, 0.0143663213f, 0.0255298801f, 0.0453014039f,
+ 0.0637897998f, 0.0895466954f, 0.1249420568f, 0.1722838134f, 0.2323219031f, 0.2777095437f,
+ 0.3237129450f, 0.3647055924f, 0.3935865462f, 0.4040665329f, 0.3935865760f, 0.3647055626f,
+ 0.3237129450f, 0.2777095735f, 0.2323219180f, 0.1722838134f, 0.1249420494f, 0.0895466879f,
+ 0.0637898073f, 0.0453014039f, 0.0255298801f, 0.0143663213f, 0.0080805235f, 0.0045443214f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007932559f, 0.0014105327f, 0.0025077760f, 0.0044564828f, 0.0079077892f,
+ 0.0111351162f, 0.0156312287f, 0.0218098238f, 0.0300737768f, 0.0405539945f, 0.0484768376f,
+ 0.0565071665f, 0.0636628196f, 0.0687042698f, 0.0705336481f, 0.0687042698f, 0.0636628196f,
+ 0.0565071702f, 0.0484768413f, 0.0405539945f, 0.0300737731f, 0.0218098238f, 0.0156312250f,
+ 0.0111351162f, 0.0079077892f, 0.0044564828f, 0.0025077760f, 0.0014105327f, 0.0007932559f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019604117f, 0.0034804866f, 0.0061708763f,
- 0.0109128021f, 0.0192001797f, 0.0268254243f, 0.0372561179f,
- 0.0512422584f, 0.0693590865f, 0.0914405733f, 0.1075243428f,
- 0.1233326122f, 0.1370278746f, 0.1464678645f, 0.1498522907f,
- 0.1464678794f, 0.1370278597f, 0.1233326122f, 0.1075243428f,
- 0.0914405733f, 0.0693590865f, 0.0512422547f, 0.0372561105f,
- 0.0268254280f, 0.0192001797f, 0.0109128058f, 0.0061708800f,
- 0.0034804903f, 0.0019604117f, 0.0000000112f},
- {0.0000000186f, 0.0030353032f, 0.0053896904f, 0.0095585547f,
- 0.0169119760f, 0.0297804140f, 0.0416394584f, 0.0578900538f,
- 0.0797299594f, 0.1081020311f, 0.1428017914f, 0.1681542546f,
- 0.1931329668f, 0.2148192078f, 0.2297913432f, 0.2351637781f,
- 0.2297913432f, 0.2148191929f, 0.1931329668f, 0.1681542546f,
- 0.1428017914f, 0.1081020236f, 0.0797299519f, 0.0578900538f,
- 0.0416394621f, 0.0297804177f, 0.0169119798f, 0.0095585547f,
- 0.0053896904f, 0.0030353032f, 0.0000000186f},
- {0.0000000261f, 0.0044889040f, 0.0079739802f, 0.0141517222f,
- 0.0250696540f, 0.0442400984f, 0.0619782880f, 0.0863948390f,
- 0.1194054484f, 0.1626167595f, 0.2159518152f, 0.2552460730f,
- 0.2942210138f, 0.3282613754f, 0.3518696427f, 0.3603619635f,
- 0.3518696725f, 0.3282613456f, 0.2942210138f, 0.2552460730f,
- 0.2159518450f, 0.1626167595f, 0.1194054410f, 0.0863948315f,
- 0.0619782880f, 0.0442400984f, 0.0250696540f, 0.0141517222f,
- 0.0079739802f, 0.0044889040f, 0.0000000261f},
- {0.0000000298f, 0.0052252971f, 0.0092856996f, 0.0164910108f,
- 0.0292490833f, 0.0517247654f, 0.0726049617f, 0.1014770418f,
- 0.1407495439f, 0.1925659627f, 0.2571487725f, 0.3051639795f,
- 0.3531456888f, 0.3953380287f, 0.4247539639f, 0.4353657961f,
- 0.4247539937f, 0.3953379989f, 0.3531457186f, 0.3051639795f,
- 0.2571487725f, 0.1925659627f, 0.1407495439f, 0.1014770344f,
- 0.0726049691f, 0.0517247617f, 0.0292490870f, 0.0164910108f,
- 0.0092856996f, 0.0052252971f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045500919f, 0.0080987960f, 0.0144242346f,
- 0.0257136337f, 0.0458848849f, 0.0649559572f, 0.0918706506f,
- 0.1295377463f, 0.1812113971f, 0.2490174472f, 0.3020929396f,
- 0.3576069772f, 0.4086337686f, 0.4455218017f, 0.4591074288f,
- 0.4455218613f, 0.4086337388f, 0.3576069772f, 0.3020929396f,
- 0.2490174621f, 0.1812113971f, 0.1295377314f, 0.0918706357f,
- 0.0649559572f, 0.0458848849f, 0.0257136375f, 0.0144242346f,
- 0.0080987960f, 0.0045500919f, 0.0000000261f},
- {0.0000000037f, 0.0007949509f, 0.0014159046f, 0.0025248416f,
- 0.0045107976f, 0.0080812797f, 0.0114838332f, 0.0163318664f,
- 0.0232117549f, 0.0328431986f, 0.0458545387f, 0.0563677736f,
- 0.0677092671f, 0.0806207359f, 0.0907390416f, 0.0946287960f,
- 0.0907390490f, 0.0806207284f, 0.0677092746f, 0.0563677773f,
- 0.0458545424f, 0.0328431986f, 0.0232117511f, 0.0163318627f,
- 0.0114838332f, 0.0080812797f, 0.0045107976f, 0.0025248416f,
- 0.0014159046f, 0.0007949509f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019604117f, 0.0034804866f, 0.0061708763f, 0.0109128021f, 0.0192001797f,
+ 0.0268254243f, 0.0372561179f, 0.0512422584f, 0.0693590865f, 0.0914405733f, 0.1075243428f,
+ 0.1233326122f, 0.1370278746f, 0.1464678645f, 0.1498522907f, 0.1464678794f, 0.1370278597f,
+ 0.1233326122f, 0.1075243428f, 0.0914405733f, 0.0693590865f, 0.0512422547f, 0.0372561105f,
+ 0.0268254280f, 0.0192001797f, 0.0109128058f, 0.0061708800f, 0.0034804903f, 0.0019604117f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030353032f, 0.0053896904f, 0.0095585547f, 0.0169119760f, 0.0297804140f,
+ 0.0416394584f, 0.0578900538f, 0.0797299594f, 0.1081020311f, 0.1428017914f, 0.1681542546f,
+ 0.1931329668f, 0.2148192078f, 0.2297913432f, 0.2351637781f, 0.2297913432f, 0.2148191929f,
+ 0.1931329668f, 0.1681542546f, 0.1428017914f, 0.1081020236f, 0.0797299519f, 0.0578900538f,
+ 0.0416394621f, 0.0297804177f, 0.0169119798f, 0.0095585547f, 0.0053896904f, 0.0030353032f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044889040f, 0.0079739802f, 0.0141517222f, 0.0250696540f, 0.0442400984f,
+ 0.0619782880f, 0.0863948390f, 0.1194054484f, 0.1626167595f, 0.2159518152f, 0.2552460730f,
+ 0.2942210138f, 0.3282613754f, 0.3518696427f, 0.3603619635f, 0.3518696725f, 0.3282613456f,
+ 0.2942210138f, 0.2552460730f, 0.2159518450f, 0.1626167595f, 0.1194054410f, 0.0863948315f,
+ 0.0619782880f, 0.0442400984f, 0.0250696540f, 0.0141517222f, 0.0079739802f, 0.0044889040f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052252971f, 0.0092856996f, 0.0164910108f, 0.0292490833f, 0.0517247654f,
+ 0.0726049617f, 0.1014770418f, 0.1407495439f, 0.1925659627f, 0.2571487725f, 0.3051639795f,
+ 0.3531456888f, 0.3953380287f, 0.4247539639f, 0.4353657961f, 0.4247539937f, 0.3953379989f,
+ 0.3531457186f, 0.3051639795f, 0.2571487725f, 0.1925659627f, 0.1407495439f, 0.1014770344f,
+ 0.0726049691f, 0.0517247617f, 0.0292490870f, 0.0164910108f, 0.0092856996f, 0.0052252971f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045500919f, 0.0080987960f, 0.0144242346f, 0.0257136337f, 0.0458848849f,
+ 0.0649559572f, 0.0918706506f, 0.1295377463f, 0.1812113971f, 0.2490174472f, 0.3020929396f,
+ 0.3576069772f, 0.4086337686f, 0.4455218017f, 0.4591074288f, 0.4455218613f, 0.4086337388f,
+ 0.3576069772f, 0.3020929396f, 0.2490174621f, 0.1812113971f, 0.1295377314f, 0.0918706357f,
+ 0.0649559572f, 0.0458848849f, 0.0257136375f, 0.0144242346f, 0.0080987960f, 0.0045500919f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007949509f, 0.0014159046f, 0.0025248416f, 0.0045107976f, 0.0080812797f,
+ 0.0114838332f, 0.0163318664f, 0.0232117549f, 0.0328431986f, 0.0458545387f, 0.0563677736f,
+ 0.0677092671f, 0.0806207359f, 0.0907390416f, 0.0946287960f, 0.0907390490f, 0.0806207284f,
+ 0.0677092746f, 0.0563677773f, 0.0458545424f, 0.0328431986f, 0.0232117511f, 0.0163318627f,
+ 0.0114838332f, 0.0080812797f, 0.0045107976f, 0.0025248416f, 0.0014159046f, 0.0007949509f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019570850f, 0.0034700334f, 0.0061382130f,
- 0.0108117498f, 0.0188931711f, 0.0262362324f, 0.0361453071f,
- 0.0492029004f, 0.0657609925f, 0.0854583159f, 0.0995077118f,
- 0.1130974963f, 0.1247107610f, 0.1326356232f, 0.1354617476f,
- 0.1326356232f, 0.1247107536f, 0.1130975038f, 0.0995077044f,
- 0.0854583159f, 0.0657609925f, 0.0492029004f, 0.0361453034f,
- 0.0262362324f, 0.0188931711f, 0.0108117498f, 0.0061382130f,
- 0.0034700334f, 0.0019570850f, 0.0000000112f},
- {0.0000000186f, 0.0030306727f, 0.0053751357f, 0.0095130354f,
- 0.0167708695f, 0.0293502137f, 0.0408112556f, 0.0563221611f,
- 0.0768360794f, 0.1029630005f, 0.1341941655f, 0.1565610766f,
- 0.1782617718f, 0.1968532801f, 0.2095632553f, 0.2141001821f,
- 0.2095632553f, 0.1968532652f, 0.1782617867f, 0.1565610915f,
- 0.1341941804f, 0.1029629931f, 0.0768360794f, 0.0563221574f,
- 0.0408112593f, 0.0293502137f, 0.0167708695f, 0.0095130354f,
- 0.0053751357f, 0.0030306727f, 0.0000000186f},
- {0.0000000261f, 0.0044840015f, 0.0079585500f, 0.0141033232f,
- 0.0249188393f, 0.0437761769f, 0.0610779524f, 0.0846719742f,
- 0.1161808893f, 0.1567904651f, 0.2059956193f, 0.2416490465f,
- 0.2765491605f, 0.3066769838f, 0.3273887634f, 0.3348038197f,
- 0.3273887634f, 0.3066769540f, 0.2765491605f, 0.2416490614f,
- 0.2059956342f, 0.1567904651f, 0.1161808893f, 0.0846719667f,
- 0.0610779561f, 0.0437761769f, 0.0249188431f, 0.0141033232f,
- 0.0079585500f, 0.0044840015f, 0.0000000261f},
- {0.0000000298f, 0.0052218027f, 0.0092746764f, 0.0164563321f,
- 0.0291404575f, 0.0513876267f, 0.0719453543f, 0.1002009511f,
- 0.1383263767f, 0.1881065071f, 0.2493602335f, 0.2943610847f,
- 0.3388943374f, 0.3777095377f, 0.4045871496f, 0.4142472148f,
- 0.4045871794f, 0.3777095079f, 0.3388943672f, 0.2943610847f,
- 0.2493602484f, 0.1881065071f, 0.1383263767f, 0.1002009436f,
- 0.0719453618f, 0.0513876304f, 0.0291404612f, 0.0164563321f,
- 0.0092746764f, 0.0052218027f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045550019f, 0.0081143826f, 0.0144738853f,
- 0.0258725621f, 0.0463975929f, 0.0659963340f, 0.0939892456f,
- 0.1338582933f, 0.1899754107f, 0.2663972974f, 0.3287125826f,
- 0.4048410356f, 0.4869871140f, 0.5518758297f, 0.5770589113f,
- 0.5518758893f, 0.4869870842f, 0.4048410952f, 0.3287125826f,
- 0.2663973570f, 0.1899754107f, 0.1338582933f, 0.0939892307f,
- 0.0659963414f, 0.0463975891f, 0.0258725658f, 0.0144738853f,
- 0.0081143863f, 0.0045550019f, 0.0000000261f},
- {0.0000000037f, 0.0007963963f, 0.0014205091f, 0.0025395826f,
- 0.0045584328f, 0.0082376562f, 0.0118066110f, 0.0170059167f,
- 0.0246388987f, 0.0359060094f, 0.0565599203f, 0.0778557062f,
- 0.1072221622f, 0.1441027969f, 0.1799743026f, 0.1959500462f,
- 0.1799743474f, 0.1441027820f, 0.1072221696f, 0.0778557062f,
- 0.0565599203f, 0.0359060094f, 0.0246388987f, 0.0170059167f,
- 0.0118066110f, 0.0082376562f, 0.0045584328f, 0.0025395826f,
- 0.0014205091f, 0.0007963963f, 0.0000000037f}},
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019570850f, 0.0034700334f, 0.0061382130f, 0.0108117498f, 0.0188931711f,
+ 0.0262362324f, 0.0361453071f, 0.0492029004f, 0.0657609925f, 0.0854583159f, 0.0995077118f,
+ 0.1130974963f, 0.1247107610f, 0.1326356232f, 0.1354617476f, 0.1326356232f, 0.1247107536f,
+ 0.1130975038f, 0.0995077044f, 0.0854583159f, 0.0657609925f, 0.0492029004f, 0.0361453034f,
+ 0.0262362324f, 0.0188931711f, 0.0108117498f, 0.0061382130f, 0.0034700334f, 0.0019570850f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030306727f, 0.0053751357f, 0.0095130354f, 0.0167708695f, 0.0293502137f,
+ 0.0408112556f, 0.0563221611f, 0.0768360794f, 0.1029630005f, 0.1341941655f, 0.1565610766f,
+ 0.1782617718f, 0.1968532801f, 0.2095632553f, 0.2141001821f, 0.2095632553f, 0.1968532652f,
+ 0.1782617867f, 0.1565610915f, 0.1341941804f, 0.1029629931f, 0.0768360794f, 0.0563221574f,
+ 0.0408112593f, 0.0293502137f, 0.0167708695f, 0.0095130354f, 0.0053751357f, 0.0030306727f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044840015f, 0.0079585500f, 0.0141033232f, 0.0249188393f, 0.0437761769f,
+ 0.0610779524f, 0.0846719742f, 0.1161808893f, 0.1567904651f, 0.2059956193f, 0.2416490465f,
+ 0.2765491605f, 0.3066769838f, 0.3273887634f, 0.3348038197f, 0.3273887634f, 0.3066769540f,
+ 0.2765491605f, 0.2416490614f, 0.2059956342f, 0.1567904651f, 0.1161808893f, 0.0846719667f,
+ 0.0610779561f, 0.0437761769f, 0.0249188431f, 0.0141033232f, 0.0079585500f, 0.0044840015f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052218027f, 0.0092746764f, 0.0164563321f, 0.0291404575f, 0.0513876267f,
+ 0.0719453543f, 0.1002009511f, 0.1383263767f, 0.1881065071f, 0.2493602335f, 0.2943610847f,
+ 0.3388943374f, 0.3777095377f, 0.4045871496f, 0.4142472148f, 0.4045871794f, 0.3777095079f,
+ 0.3388943672f, 0.2943610847f, 0.2493602484f, 0.1881065071f, 0.1383263767f, 0.1002009436f,
+ 0.0719453618f, 0.0513876304f, 0.0291404612f, 0.0164563321f, 0.0092746764f, 0.0052218027f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045550019f, 0.0081143826f, 0.0144738853f, 0.0258725621f, 0.0463975929f,
+ 0.0659963340f, 0.0939892456f, 0.1338582933f, 0.1899754107f, 0.2663972974f, 0.3287125826f,
+ 0.4048410356f, 0.4869871140f, 0.5518758297f, 0.5770589113f, 0.5518758893f, 0.4869870842f,
+ 0.4048410952f, 0.3287125826f, 0.2663973570f, 0.1899754107f, 0.1338582933f, 0.0939892307f,
+ 0.0659963414f, 0.0463975891f, 0.0258725658f, 0.0144738853f, 0.0081143863f, 0.0045550019f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007963963f, 0.0014205091f, 0.0025395826f, 0.0045584328f, 0.0082376562f,
+ 0.0118066110f, 0.0170059167f, 0.0246388987f, 0.0359060094f, 0.0565599203f, 0.0778557062f,
+ 0.1072221622f, 0.1441027969f, 0.1799743026f, 0.1959500462f, 0.1799743474f, 0.1441027820f,
+ 0.1072221696f, 0.0778557062f, 0.0565599203f, 0.0359060094f, 0.0246388987f, 0.0170059167f,
+ 0.0118066110f, 0.0082376562f, 0.0045584328f, 0.0025395826f, 0.0014205091f, 0.0007963963f,
+ 0.0000000037f}},
{
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f},
- {0.0000000112f, 0.0019548684f, 0.0034630969f, 0.0061166696f,
- 0.0107457712f, 0.0186960548f, 0.0258635134f, 0.0354561731f,
- 0.0479685590f, 0.0636471361f, 0.0820589438f, 0.0950533152f,
- 0.1075267568f, 0.1181191504f, 0.1253151745f, 0.1278754473f,
- 0.1253151745f, 0.1181191429f, 0.1075267568f, 0.0950533152f,
- 0.0820589513f, 0.0636471361f, 0.0479685590f, 0.0354561731f,
- 0.0258635171f, 0.0186960548f, 0.0107457712f, 0.0061166734f,
- 0.0034630969f, 0.0019548684f, 0.0000000112f},
- {0.0000000186f, 0.0030275919f, 0.0053654797f, 0.0094829798f,
- 0.0166785270f, 0.0290729403f, 0.0402846411f, 0.0553428568f,
- 0.0750693232f, 0.0999113992f, 0.1292407066f, 0.1500300914f,
- 0.1700480729f, 0.1870902777f, 0.1986886710f, 0.2028190494f,
- 0.1986886710f, 0.1870902628f, 0.1700480729f, 0.1500301063f,
- 0.1292407066f, 0.0999113992f, 0.0750693232f, 0.0553428493f,
- 0.0402846411f, 0.0290729403f, 0.0166785270f, 0.0094829798f,
- 0.0053654797f, 0.0030275919f, 0.0000000186f},
- {0.0000000261f, 0.0044807382f, 0.0079482906f, 0.0140712596f,
- 0.0248195715f, 0.0434742048f, 0.0604977794f, 0.0835766271f,
- 0.1141664237f, 0.1532292813f, 0.2000626326f, 0.2336882651f,
- 0.2663741410f, 0.2944218218f, 0.3136188090f, 0.3204754591f,
- 0.3136188090f, 0.2944217920f, 0.2663741708f, 0.2336882651f,
- 0.2000626326f, 0.1532292962f, 0.1141664162f, 0.0835766271f,
- 0.0604977906f, 0.0434742048f, 0.0248195753f, 0.0140712596f,
- 0.0079482906f, 0.0044807382f, 0.0000000261f},
- {0.0000000298f, 0.0052194707f, 0.0092673339f, 0.0164332762f,
- 0.0290685408f, 0.0511660054f, 0.0715145171f, 0.0993746519f,
- 0.1367753297f, 0.1852938682f, 0.2445339411f, 0.2877510786f,
- 0.3302804530f, 0.3671652079f, 0.3926102221f, 0.4017367959f,
- 0.3926102519f, 0.3671651781f, 0.3302804828f, 0.2877510488f,
- 0.2445339262f, 0.1852938682f, 0.1367753297f, 0.0993746296f,
- 0.0715145245f, 0.0511660017f, 0.0290685445f, 0.0164332762f,
- 0.0092673302f, 0.0052194707f, 0.0000000298f},
- {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f,
- 0.0315911807f, 0.0560568646f, 0.0789347738f, 0.1108068749f,
- 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
- 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f,
- 0.4870318770f, 0.4512939751f, 0.4005689025f, 0.3436433673f,
- 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
- 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f,
- 0.0099989995f, 0.0056232363f, 0.0000000298f},
- {0.0000000261f, 0.0045582913f, 0.0081248507f, 0.0145073459f,
- 0.0259804092f, 0.0467499122f, 0.0667200089f, 0.0954893604f,
- 0.1369983852f, 0.1965934485f, 0.2817551196f, 0.3696863651f,
- 0.4782578051f, 0.5972789526f, 0.6979248524f, 0.7386929989f,
- 0.6979249120f, 0.5972788930f, 0.4782578349f, 0.3696863651f,
- 0.2817551494f, 0.1965934485f, 0.1369983703f, 0.0954893529f,
- 0.0667200163f, 0.0467499122f, 0.0259804130f, 0.0145073459f,
- 0.0081248507f, 0.0045582913f, 0.0000000261f},
- {0.0000000037f, 0.0007973649f, 0.0014236122f, 0.0025495738f,
- 0.0045911148f, 0.0083473474f, 0.0120380968f, 0.0175057761f,
- 0.0257535614f, 0.0410830304f, 0.0712796301f, 0.1087764949f,
- 0.1762015969f, 0.3041011989f, 0.5248691440f, 0.6885961890f,
- 0.5248694420f, 0.3041011393f, 0.1762016118f, 0.1087765023f,
- 0.0712796375f, 0.0410830304f, 0.0257535614f, 0.0175057724f,
- 0.0120380968f, 0.0083473474f, 0.0045911148f, 0.0025495775f,
- 0.0014236122f, 0.0007973649f, 0.0000000037f}}};
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f},
+ {0.0000000112f, 0.0019548684f, 0.0034630969f, 0.0061166696f, 0.0107457712f, 0.0186960548f,
+ 0.0258635134f, 0.0354561731f, 0.0479685590f, 0.0636471361f, 0.0820589438f, 0.0950533152f,
+ 0.1075267568f, 0.1181191504f, 0.1253151745f, 0.1278754473f, 0.1253151745f, 0.1181191429f,
+ 0.1075267568f, 0.0950533152f, 0.0820589513f, 0.0636471361f, 0.0479685590f, 0.0354561731f,
+ 0.0258635171f, 0.0186960548f, 0.0107457712f, 0.0061166734f, 0.0034630969f, 0.0019548684f,
+ 0.0000000112f},
+ {0.0000000186f, 0.0030275919f, 0.0053654797f, 0.0094829798f, 0.0166785270f, 0.0290729403f,
+ 0.0402846411f, 0.0553428568f, 0.0750693232f, 0.0999113992f, 0.1292407066f, 0.1500300914f,
+ 0.1700480729f, 0.1870902777f, 0.1986886710f, 0.2028190494f, 0.1986886710f, 0.1870902628f,
+ 0.1700480729f, 0.1500301063f, 0.1292407066f, 0.0999113992f, 0.0750693232f, 0.0553428493f,
+ 0.0402846411f, 0.0290729403f, 0.0166785270f, 0.0094829798f, 0.0053654797f, 0.0030275919f,
+ 0.0000000186f},
+ {0.0000000261f, 0.0044807382f, 0.0079482906f, 0.0140712596f, 0.0248195715f, 0.0434742048f,
+ 0.0604977794f, 0.0835766271f, 0.1141664237f, 0.1532292813f, 0.2000626326f, 0.2336882651f,
+ 0.2663741410f, 0.2944218218f, 0.3136188090f, 0.3204754591f, 0.3136188090f, 0.2944217920f,
+ 0.2663741708f, 0.2336882651f, 0.2000626326f, 0.1532292962f, 0.1141664162f, 0.0835766271f,
+ 0.0604977906f, 0.0434742048f, 0.0248195753f, 0.0140712596f, 0.0079482906f, 0.0044807382f,
+ 0.0000000261f},
+ {0.0000000298f, 0.0052194707f, 0.0092673339f, 0.0164332762f, 0.0290685408f, 0.0511660054f,
+ 0.0715145171f, 0.0993746519f, 0.1367753297f, 0.1852938682f, 0.2445339411f, 0.2877510786f,
+ 0.3302804530f, 0.3671652079f, 0.3926102221f, 0.4017367959f, 0.3926102519f, 0.3671651781f,
+ 0.3302804828f, 0.2877510488f, 0.2445339262f, 0.1852938682f, 0.1367753297f, 0.0993746296f,
+ 0.0715145245f, 0.0511660017f, 0.0290685445f, 0.0164332762f, 0.0092673302f, 0.0052194707f,
+ 0.0000000298f},
+ {0.0000000298f, 0.0056232363f, 0.0099989995f, 0.0177771747f, 0.0315911807f, 0.0560568646f,
+ 0.0789347738f, 0.1108068749f, 0.1546058059f, 0.2131874412f, 0.2874797881f, 0.3436433673f,
+ 0.4005688727f, 0.4512940049f, 0.4870318770f, 0.5000000000f, 0.4870318770f, 0.4512939751f,
+ 0.4005689025f, 0.3436433673f, 0.2874797881f, 0.2131874263f, 0.1546057910f, 0.1108068675f,
+ 0.0789347813f, 0.0560568646f, 0.0315911844f, 0.0177771747f, 0.0099989995f, 0.0056232363f,
+ 0.0000000298f},
+ {0.0000000261f, 0.0045582913f, 0.0081248507f, 0.0145073459f, 0.0259804092f, 0.0467499122f,
+ 0.0667200089f, 0.0954893604f, 0.1369983852f, 0.1965934485f, 0.2817551196f, 0.3696863651f,
+ 0.4782578051f, 0.5972789526f, 0.6979248524f, 0.7386929989f, 0.6979249120f, 0.5972788930f,
+ 0.4782578349f, 0.3696863651f, 0.2817551494f, 0.1965934485f, 0.1369983703f, 0.0954893529f,
+ 0.0667200163f, 0.0467499122f, 0.0259804130f, 0.0145073459f, 0.0081248507f, 0.0045582913f,
+ 0.0000000261f},
+ {0.0000000037f, 0.0007973649f, 0.0014236122f, 0.0025495738f, 0.0045911148f, 0.0083473474f,
+ 0.0120380968f, 0.0175057761f, 0.0257535614f, 0.0410830304f, 0.0712796301f, 0.1087764949f,
+ 0.1762015969f, 0.3041011989f, 0.5248691440f, 0.6885961890f, 0.5248694420f, 0.3041011393f,
+ 0.1762016118f, 0.1087765023f, 0.0712796375f, 0.0410830304f, 0.0257535614f, 0.0175057724f,
+ 0.0120380968f, 0.0083473474f, 0.0045911148f, 0.0025495775f, 0.0014236122f, 0.0007973649f,
+ 0.0000000037f}}};
const FLOAT32 ixheaacd_weight[16][8][31] = {
{
- {0.5000000596f, 0.5028037429f, 0.5049747229f, 0.5088109374f,
- 0.5155536532f, 0.5272839665f, 0.5380217433f, 0.5526331663f,
- 0.5721039176f, 0.5971546769f, 0.6274869442f, 0.6494780183f,
- 0.6710323095f, 0.6896716356f, 0.7025068998f, 0.7071067691f,
- 0.7025068998f, 0.6896716356f, 0.6710323691f, 0.6494780183f,
- 0.6274869442f, 0.5971546769f, 0.5721039176f, 0.5526331663f,
- 0.5380217433f, 0.5272839665f, 0.5155536532f, 0.5088109374f,
- 0.5049747825f, 0.5028037429f, 0.5000000596f},
- {0.5000000000f, 0.5026275516f, 0.5046628118f, 0.5082603693f,
- 0.5145876408f, 0.5256069303f, 0.5357060432f, 0.5494661331f,
- 0.5678316951f, 0.5915051103f, 0.6202291846f, 0.6410904527f,
- 0.6615636945f, 0.6792872548f, 0.6915015578f, 0.6958807707f,
- 0.6915016174f, 0.6792873144f, 0.6615636945f, 0.6410903931f,
- 0.6202292442f, 0.5915051103f, 0.5678316951f, 0.5494661331f,
- 0.5357059836f, 0.5256069303f, 0.5145876408f, 0.5082603693f,
- 0.5046628118f, 0.5026275516f, 0.5000000596f},
- {0.5000000000f, 0.5023595095f, 0.5041879416f, 0.5074218512f,
- 0.5131149292f, 0.5230458379f, 0.5321645737f, 0.5446138382f,
- 0.5612714887f, 0.5828074217f, 0.6090247035f, 0.6281185746f,
- 0.6468966603f, 0.6631815434f, 0.6744188070f, 0.6784504652f,
- 0.6744188070f, 0.6631814837f, 0.6468966603f, 0.6281185746f,
- 0.6090247035f, 0.5828074217f, 0.5612714887f, 0.5446138978f,
- 0.5321645737f, 0.5230458379f, 0.5131149292f, 0.5074217916f,
- 0.5041879416f, 0.5023595095f, 0.5000000596f},
- {0.5000000000f, 0.5016866922f, 0.5029953122f, 0.5053130984f,
- 0.5094034672f, 0.5165683627f, 0.5231794715f, 0.5322527885f,
- 0.5444748402f, 0.5604054928f, 0.5799794793f, 0.5943493247f,
- 0.6085679531f, 0.6209635735f, 0.6295502782f, 0.6326373219f,
- 0.6295503378f, 0.6209636331f, 0.6085679531f, 0.5943493247f,
- 0.5799794793f, 0.5604054928f, 0.5444748402f, 0.5322527885f,
- 0.5231794715f, 0.5165683627f, 0.5094034672f, 0.5053130984f,
- 0.5029953122f, 0.5016866922f, 0.5000000596f},
- {0.5000000000f, 0.5010325909f, 0.5018346906f, 0.5032572150f,
- 0.5057737827f, 0.5102003217f, 0.5143051744f, 0.5199697018f,
- 0.5276548266f, 0.5377621055f, 0.5503131151f, 0.5596145988f,
- 0.5688871741f, 0.5770241618f, 0.5826888084f, 0.5847306848f,
- 0.5826888084f, 0.5770241618f, 0.5688871145f, 0.5596145988f,
- 0.5503131151f, 0.5377621055f, 0.5276548266f, 0.5199697614f,
- 0.5143051147f, 0.5102003217f, 0.5057737231f, 0.5032572150f,
- 0.5018346906f, 0.5010325909f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4983411729f, 0.4970465600f, 0.4947369397f,
- 0.4906081855f, 0.4832093418f, 0.4761866629f, 0.4662267566f,
- 0.4521820247f, 0.4326849580f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4326850176f, 0.4521820247f, 0.4662267566f,
- 0.4761866629f, 0.4832093418f, 0.4906081855f, 0.4947369397f,
- 0.4970465600f, 0.4983412325f, 0.5000000000f},
- {0.5000000000f, 0.4972087145f, 0.4950257242f, 0.4911214709f,
- 0.4841098487f, 0.4714359641f, 0.4592681825f, 0.4417585433f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4417585433f,
- 0.4592681825f, 0.4714359641f, 0.4841098487f, 0.4911214709f,
- 0.4950257242f, 0.4972087145f, 0.5000000000f}},
+ {0.5000000596f, 0.5028037429f, 0.5049747229f, 0.5088109374f, 0.5155536532f, 0.5272839665f,
+ 0.5380217433f, 0.5526331663f, 0.5721039176f, 0.5971546769f, 0.6274869442f, 0.6494780183f,
+ 0.6710323095f, 0.6896716356f, 0.7025068998f, 0.7071067691f, 0.7025068998f, 0.6896716356f,
+ 0.6710323691f, 0.6494780183f, 0.6274869442f, 0.5971546769f, 0.5721039176f, 0.5526331663f,
+ 0.5380217433f, 0.5272839665f, 0.5155536532f, 0.5088109374f, 0.5049747825f, 0.5028037429f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5026275516f, 0.5046628118f, 0.5082603693f, 0.5145876408f, 0.5256069303f,
+ 0.5357060432f, 0.5494661331f, 0.5678316951f, 0.5915051103f, 0.6202291846f, 0.6410904527f,
+ 0.6615636945f, 0.6792872548f, 0.6915015578f, 0.6958807707f, 0.6915016174f, 0.6792873144f,
+ 0.6615636945f, 0.6410903931f, 0.6202292442f, 0.5915051103f, 0.5678316951f, 0.5494661331f,
+ 0.5357059836f, 0.5256069303f, 0.5145876408f, 0.5082603693f, 0.5046628118f, 0.5026275516f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5023595095f, 0.5041879416f, 0.5074218512f, 0.5131149292f, 0.5230458379f,
+ 0.5321645737f, 0.5446138382f, 0.5612714887f, 0.5828074217f, 0.6090247035f, 0.6281185746f,
+ 0.6468966603f, 0.6631815434f, 0.6744188070f, 0.6784504652f, 0.6744188070f, 0.6631814837f,
+ 0.6468966603f, 0.6281185746f, 0.6090247035f, 0.5828074217f, 0.5612714887f, 0.5446138978f,
+ 0.5321645737f, 0.5230458379f, 0.5131149292f, 0.5074217916f, 0.5041879416f, 0.5023595095f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5016866922f, 0.5029953122f, 0.5053130984f, 0.5094034672f, 0.5165683627f,
+ 0.5231794715f, 0.5322527885f, 0.5444748402f, 0.5604054928f, 0.5799794793f, 0.5943493247f,
+ 0.6085679531f, 0.6209635735f, 0.6295502782f, 0.6326373219f, 0.6295503378f, 0.6209636331f,
+ 0.6085679531f, 0.5943493247f, 0.5799794793f, 0.5604054928f, 0.5444748402f, 0.5322527885f,
+ 0.5231794715f, 0.5165683627f, 0.5094034672f, 0.5053130984f, 0.5029953122f, 0.5016866922f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5010325909f, 0.5018346906f, 0.5032572150f, 0.5057737827f, 0.5102003217f,
+ 0.5143051744f, 0.5199697018f, 0.5276548266f, 0.5377621055f, 0.5503131151f, 0.5596145988f,
+ 0.5688871741f, 0.5770241618f, 0.5826888084f, 0.5847306848f, 0.5826888084f, 0.5770241618f,
+ 0.5688871145f, 0.5596145988f, 0.5503131151f, 0.5377621055f, 0.5276548266f, 0.5199697614f,
+ 0.5143051147f, 0.5102003217f, 0.5057737231f, 0.5032572150f, 0.5018346906f, 0.5010325909f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4983411729f, 0.4970465600f, 0.4947369397f, 0.4906081855f, 0.4832093418f,
+ 0.4761866629f, 0.4662267566f, 0.4521820247f, 0.4326849580f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4326850176f, 0.4521820247f, 0.4662267566f,
+ 0.4761866629f, 0.4832093418f, 0.4906081855f, 0.4947369397f, 0.4970465600f, 0.4983412325f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4972087145f, 0.4950257242f, 0.4911214709f, 0.4841098487f, 0.4714359641f,
+ 0.4592681825f, 0.4417585433f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4417585433f,
+ 0.4592681825f, 0.4714359641f, 0.4841098487f, 0.4911214709f, 0.4950257242f, 0.4972087145f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5025908947f, 0.5045977831f, 0.5081456304f,
- 0.5143862367f, 0.5252569914f, 0.5352224708f, 0.5488042235f,
- 0.5669378638f, 0.5903217196f, 0.6187070012f, 0.6393297315f,
- 0.6595746279f, 0.6771045923f, 0.6891874671f, 0.6935198903f,
- 0.6891874671f, 0.6771045923f, 0.6595746279f, 0.6393297315f,
- 0.6187070012f, 0.5903217793f, 0.5669378638f, 0.5488042235f,
- 0.5352224708f, 0.5252569914f, 0.5143862367f, 0.5081456304f,
- 0.5045977831f, 0.5025908947f, 0.5000000596f},
- {0.5000000000f, 0.5024280548f, 0.5043093562f, 0.5076363087f,
- 0.5134918094f, 0.5237017274f, 0.5330721736f, 0.5458583832f,
- 0.5629557371f, 0.5850431919f, 0.6119084954f, 0.6314600110f,
- 0.6506775022f, 0.6673356891f, 0.6788267493f, 0.6829485893f,
- 0.6788267493f, 0.6673356891f, 0.6506775022f, 0.6314600110f,
- 0.6119084954f, 0.5850431919f, 0.5629557371f, 0.5458583832f,
- 0.5330721736f, 0.5237017274f, 0.5134918094f, 0.5076363087f,
- 0.5043093562f, 0.5024280548f, 0.5000000596f},
- {0.5000000000f, 0.5021802783f, 0.5038703680f, 0.5068606734f,
- 0.5121284127f, 0.5213274360f, 0.5297849178f, 0.5413471460f,
- 0.5568445921f, 0.5769221783f, 0.6014210582f, 0.6192988157f,
- 0.6369072795f, 0.6521973014f, 0.6627579927f, 0.6665487289f,
- 0.6627579927f, 0.6521973014f, 0.6369072795f, 0.6192988157f,
- 0.6014210582f, 0.5769221783f, 0.5568445921f, 0.5413471460f,
- 0.5297849178f, 0.5213274360f, 0.5121284127f, 0.5068606734f,
- 0.5038703680f, 0.5021802783f, 0.5000000596f},
- {0.5000000000f, 0.5015584826f, 0.5027679205f, 0.5049106479f,
- 0.5086937547f, 0.5153259039f, 0.5214512348f, 0.5298667550f,
- 0.5412179232f, 0.5560381413f, 0.5742831826f, 0.5877002478f,
- 0.6009937525f, 0.6125962734f, 0.6206405163f, 0.6235337853f,
- 0.6206405163f, 0.6125962138f, 0.6009937525f, 0.5877002478f,
- 0.5742831826f, 0.5560382009f, 0.5412179232f, 0.5298667550f,
- 0.5214512944f, 0.5153258443f, 0.5086938143f, 0.5049106479f,
- 0.5027679205f, 0.5015585423f, 0.5000000596f},
- {0.5000000000f, 0.5009540319f, 0.5016952753f, 0.5030100346f,
- 0.5053365231f, 0.5094310641f, 0.5132302642f, 0.5184766650f,
- 0.5256009102f, 0.5349814296f, 0.5466461182f, 0.5553017855f,
- 0.5639393330f, 0.5715261102f, 0.5768113732f, 0.5787173510f,
- 0.5768114328f, 0.5715261102f, 0.5639393926f, 0.5553017855f,
- 0.5466461182f, 0.5349814296f, 0.5256009102f, 0.5184766650f,
- 0.5132302642f, 0.5094310641f, 0.5053365827f, 0.5030099750f,
- 0.5016952157f, 0.5009540319f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4984676838f, 0.4972720146f, 0.4951395094f,
- 0.4913294315f, 0.4845078886f, 0.4780410528f, 0.4688831270f,
- 0.4559983313f, 0.4381728470f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4381728470f, 0.4559983313f, 0.4688831270f,
- 0.4780410528f, 0.4845078886f, 0.4913294315f, 0.4951395094f,
- 0.4972720146f, 0.4984676838f, 0.5000000000f},
- {0.5000000000f, 0.4974217415f, 0.4954061210f, 0.4918029308f,
- 0.4853377044f, 0.4736708105f, 0.4624948800f, 0.4464591146f,
- 0.4234331250f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4234331250f, 0.4464591146f,
- 0.4624949098f, 0.4736708105f, 0.4853377044f, 0.4918029308f,
- 0.4954061210f, 0.4974217415f, 0.5000000000f}},
+ {0.5000000000f, 0.5025908947f, 0.5045977831f, 0.5081456304f, 0.5143862367f, 0.5252569914f,
+ 0.5352224708f, 0.5488042235f, 0.5669378638f, 0.5903217196f, 0.6187070012f, 0.6393297315f,
+ 0.6595746279f, 0.6771045923f, 0.6891874671f, 0.6935198903f, 0.6891874671f, 0.6771045923f,
+ 0.6595746279f, 0.6393297315f, 0.6187070012f, 0.5903217793f, 0.5669378638f, 0.5488042235f,
+ 0.5352224708f, 0.5252569914f, 0.5143862367f, 0.5081456304f, 0.5045977831f, 0.5025908947f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5024280548f, 0.5043093562f, 0.5076363087f, 0.5134918094f, 0.5237017274f,
+ 0.5330721736f, 0.5458583832f, 0.5629557371f, 0.5850431919f, 0.6119084954f, 0.6314600110f,
+ 0.6506775022f, 0.6673356891f, 0.6788267493f, 0.6829485893f, 0.6788267493f, 0.6673356891f,
+ 0.6506775022f, 0.6314600110f, 0.6119084954f, 0.5850431919f, 0.5629557371f, 0.5458583832f,
+ 0.5330721736f, 0.5237017274f, 0.5134918094f, 0.5076363087f, 0.5043093562f, 0.5024280548f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5021802783f, 0.5038703680f, 0.5068606734f, 0.5121284127f, 0.5213274360f,
+ 0.5297849178f, 0.5413471460f, 0.5568445921f, 0.5769221783f, 0.6014210582f, 0.6192988157f,
+ 0.6369072795f, 0.6521973014f, 0.6627579927f, 0.6665487289f, 0.6627579927f, 0.6521973014f,
+ 0.6369072795f, 0.6192988157f, 0.6014210582f, 0.5769221783f, 0.5568445921f, 0.5413471460f,
+ 0.5297849178f, 0.5213274360f, 0.5121284127f, 0.5068606734f, 0.5038703680f, 0.5021802783f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5015584826f, 0.5027679205f, 0.5049106479f, 0.5086937547f, 0.5153259039f,
+ 0.5214512348f, 0.5298667550f, 0.5412179232f, 0.5560381413f, 0.5742831826f, 0.5877002478f,
+ 0.6009937525f, 0.6125962734f, 0.6206405163f, 0.6235337853f, 0.6206405163f, 0.6125962138f,
+ 0.6009937525f, 0.5877002478f, 0.5742831826f, 0.5560382009f, 0.5412179232f, 0.5298667550f,
+ 0.5214512944f, 0.5153258443f, 0.5086938143f, 0.5049106479f, 0.5027679205f, 0.5015585423f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5009540319f, 0.5016952753f, 0.5030100346f, 0.5053365231f, 0.5094310641f,
+ 0.5132302642f, 0.5184766650f, 0.5256009102f, 0.5349814296f, 0.5466461182f, 0.5553017855f,
+ 0.5639393330f, 0.5715261102f, 0.5768113732f, 0.5787173510f, 0.5768114328f, 0.5715261102f,
+ 0.5639393926f, 0.5553017855f, 0.5466461182f, 0.5349814296f, 0.5256009102f, 0.5184766650f,
+ 0.5132302642f, 0.5094310641f, 0.5053365827f, 0.5030099750f, 0.5016952157f, 0.5009540319f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4984676838f, 0.4972720146f, 0.4951395094f, 0.4913294315f, 0.4845078886f,
+ 0.4780410528f, 0.4688831270f, 0.4559983313f, 0.4381728470f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4381728470f, 0.4559983313f, 0.4688831270f,
+ 0.4780410528f, 0.4845078886f, 0.4913294315f, 0.4951395094f, 0.4972720146f, 0.4984676838f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4974217415f, 0.4954061210f, 0.4918029308f, 0.4853377044f, 0.4736708105f,
+ 0.4624948800f, 0.4464591146f, 0.4234331250f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4234331250f, 0.4464591146f,
+ 0.4624949098f, 0.4736708105f, 0.4853377044f, 0.4918029308f, 0.4954061210f, 0.4974217415f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5019841790f, 0.5035227537f, 0.5062461495f,
- 0.5110471249f, 0.5194411278f, 0.5271694660f, 0.5377510190f,
- 0.5519614220f, 0.5704149008f, 0.5929919481f, 0.6095049381f,
- 0.6257974505f, 0.6399660110f, 0.6497628689f, 0.6532815099f,
- 0.6497628689f, 0.6399660110f, 0.6257974505f, 0.6095049381f,
- 0.5929919481f, 0.5704149008f, 0.5519614220f, 0.5377510190f,
- 0.5271694660f, 0.5194411874f, 0.5110471249f, 0.5062461495f,
- 0.5035227537f, 0.5019841790f, 0.5000000596f},
- {0.5000000000f, 0.5018594265f, 0.5033015609f, 0.5058549047f,
- 0.5103582144f, 0.5182378888f, 0.5254992843f, 0.5354512334f,
- 0.5488330722f, 0.5662372708f, 0.5875679851f, 0.6031931639f,
- 0.6186277270f, 0.6320636868f, 0.6413608193f, 0.6447013021f,
- 0.6413608193f, 0.6320636272f, 0.6186277270f, 0.6031931639f,
- 0.5875679851f, 0.5662372708f, 0.5488330722f, 0.5354512334f,
- 0.5254992843f, 0.5182378888f, 0.5103582144f, 0.5058549047f,
- 0.5033015609f, 0.5018594265f, 0.5000000596f},
- {0.5000000000f, 0.5016695857f, 0.5029649734f, 0.5052592754f,
- 0.5093086362f, 0.5164023638f, 0.5229487419f, 0.5319343805f,
- 0.5440405011f, 0.5598235130f, 0.5792210698f, 0.5934646130f,
- 0.6075606942f, 0.6198514104f, 0.6283663511f, 0.6314277649f,
- 0.6283663511f, 0.6198514104f, 0.6075607538f, 0.5934646130f,
- 0.5792211294f, 0.5598235130f, 0.5440405011f, 0.5319343805f,
- 0.5229486823f, 0.5164024234f, 0.5093086362f, 0.5052592754f,
- 0.5029649138f, 0.5016695857f, 0.5000000596f},
- {0.5000000000f, 0.5011932850f, 0.5021198988f, 0.5037627220f,
- 0.5066673160f, 0.5117711425f, 0.5164980888f, 0.5230121613f,
- 0.5318337679f, 0.5434088707f, 0.5577428937f, 0.5683392882f,
- 0.5788815022f, 0.5881162286f, 0.5945363641f, 0.5968489647f,
- 0.5945363641f, 0.5881162286f, 0.5788815022f, 0.5683392882f,
- 0.5577428937f, 0.5434088707f, 0.5318337679f, 0.5230121613f,
- 0.5164980888f, 0.5117711425f, 0.5066673160f, 0.5037627220f,
- 0.5021198988f, 0.5011932850f, 0.5000000000f},
- {0.5000000000f, 0.5007303953f, 0.5012979507f, 0.5023053885f,
- 0.5040895343f, 0.5072339773f, 0.5101568103f, 0.5142010450f,
- 0.5197073221f, 0.5269821882f, 0.5360659957f, 0.5428322554f,
- 0.5496054292f, 0.5555711985f, 0.5597361326f, 0.5612398386f,
- 0.5597361922f, 0.5555711985f, 0.5496054292f, 0.5428322554f,
- 0.5360659957f, 0.5269821286f, 0.5197073221f, 0.5142010450f,
- 0.5101568103f, 0.5072339773f, 0.5040895343f, 0.5023053885f,
- 0.5012980103f, 0.5007303953f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4988276362f, 0.4979133904f, 0.4962842464f,
- 0.4933774769f, 0.4881869853f, 0.4832828939f, 0.4763666987f,
- 0.4666952491f, 0.4534370899f, 0.4360439777f, 0.4224200249f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4224200249f,
- 0.4360440373f, 0.4534370899f, 0.4666952491f, 0.4763666987f,
- 0.4832829535f, 0.4881869853f, 0.4933775365f, 0.4962842464f,
- 0.4979134500f, 0.4988276362f, 0.5000000000f},
- {0.5000000000f, 0.4980278611f, 0.4964878559f, 0.4937384725f,
- 0.4888174534f, 0.4799782038f, 0.4715627432f, 0.4595820010f,
- 0.4425892234f, 0.4187846780f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4187846780f, 0.4425891936f, 0.4595820010f,
- 0.4715627432f, 0.4799782038f, 0.4888174534f, 0.4937384725f,
- 0.4964878559f, 0.4980278611f, 0.5000000000f}},
+ {0.5000000000f, 0.5019841790f, 0.5035227537f, 0.5062461495f, 0.5110471249f, 0.5194411278f,
+ 0.5271694660f, 0.5377510190f, 0.5519614220f, 0.5704149008f, 0.5929919481f, 0.6095049381f,
+ 0.6257974505f, 0.6399660110f, 0.6497628689f, 0.6532815099f, 0.6497628689f, 0.6399660110f,
+ 0.6257974505f, 0.6095049381f, 0.5929919481f, 0.5704149008f, 0.5519614220f, 0.5377510190f,
+ 0.5271694660f, 0.5194411874f, 0.5110471249f, 0.5062461495f, 0.5035227537f, 0.5019841790f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5018594265f, 0.5033015609f, 0.5058549047f, 0.5103582144f, 0.5182378888f,
+ 0.5254992843f, 0.5354512334f, 0.5488330722f, 0.5662372708f, 0.5875679851f, 0.6031931639f,
+ 0.6186277270f, 0.6320636868f, 0.6413608193f, 0.6447013021f, 0.6413608193f, 0.6320636272f,
+ 0.6186277270f, 0.6031931639f, 0.5875679851f, 0.5662372708f, 0.5488330722f, 0.5354512334f,
+ 0.5254992843f, 0.5182378888f, 0.5103582144f, 0.5058549047f, 0.5033015609f, 0.5018594265f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5016695857f, 0.5029649734f, 0.5052592754f, 0.5093086362f, 0.5164023638f,
+ 0.5229487419f, 0.5319343805f, 0.5440405011f, 0.5598235130f, 0.5792210698f, 0.5934646130f,
+ 0.6075606942f, 0.6198514104f, 0.6283663511f, 0.6314277649f, 0.6283663511f, 0.6198514104f,
+ 0.6075607538f, 0.5934646130f, 0.5792211294f, 0.5598235130f, 0.5440405011f, 0.5319343805f,
+ 0.5229486823f, 0.5164024234f, 0.5093086362f, 0.5052592754f, 0.5029649138f, 0.5016695857f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5011932850f, 0.5021198988f, 0.5037627220f, 0.5066673160f, 0.5117711425f,
+ 0.5164980888f, 0.5230121613f, 0.5318337679f, 0.5434088707f, 0.5577428937f, 0.5683392882f,
+ 0.5788815022f, 0.5881162286f, 0.5945363641f, 0.5968489647f, 0.5945363641f, 0.5881162286f,
+ 0.5788815022f, 0.5683392882f, 0.5577428937f, 0.5434088707f, 0.5318337679f, 0.5230121613f,
+ 0.5164980888f, 0.5117711425f, 0.5066673160f, 0.5037627220f, 0.5021198988f, 0.5011932850f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5007303953f, 0.5012979507f, 0.5023053885f, 0.5040895343f, 0.5072339773f,
+ 0.5101568103f, 0.5142010450f, 0.5197073221f, 0.5269821882f, 0.5360659957f, 0.5428322554f,
+ 0.5496054292f, 0.5555711985f, 0.5597361326f, 0.5612398386f, 0.5597361922f, 0.5555711985f,
+ 0.5496054292f, 0.5428322554f, 0.5360659957f, 0.5269821286f, 0.5197073221f, 0.5142010450f,
+ 0.5101568103f, 0.5072339773f, 0.5040895343f, 0.5023053885f, 0.5012980103f, 0.5007303953f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4988276362f, 0.4979133904f, 0.4962842464f, 0.4933774769f, 0.4881869853f,
+ 0.4832828939f, 0.4763666987f, 0.4666952491f, 0.4534370899f, 0.4360439777f, 0.4224200249f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4224200249f, 0.4360440373f, 0.4534370899f, 0.4666952491f, 0.4763666987f,
+ 0.4832829535f, 0.4881869853f, 0.4933775365f, 0.4962842464f, 0.4979134500f, 0.4988276362f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4980278611f, 0.4964878559f, 0.4937384725f, 0.4888174534f, 0.4799782038f,
+ 0.4715627432f, 0.4595820010f, 0.4425892234f, 0.4187846780f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4187846780f, 0.4425891936f, 0.4595820010f,
+ 0.4715627432f, 0.4799782038f, 0.4888174534f, 0.4937384725f, 0.4964878559f, 0.4980278611f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5010747910f, 0.5019095540f, 0.5033900142f,
- 0.5060086250f, 0.5106133819f, 0.5148820281f, 0.5207706094f,
- 0.5287556648f, 0.5392510295f, 0.5522742867f, 0.5619193316f,
- 0.5715291500f, 0.5799580812f, 0.5858238339f, 0.5879377723f,
- 0.5858238339f, 0.5799580812f, 0.5715291500f, 0.5619193316f,
- 0.5522742271f, 0.5392510295f, 0.5287556648f, 0.5207706094f,
- 0.5148820281f, 0.5106133819f, 0.5060086250f, 0.5033900142f,
- 0.5019095540f, 0.5010747910f, 0.5000000000f},
- {0.5000000000f, 0.5010071397f, 0.5017895103f, 0.5031771064f,
- 0.5056321621f, 0.5099512339f, 0.5139571428f, 0.5194865465f,
- 0.5269903541f, 0.5368629098f, 0.5491278768f, 0.5582211614f,
- 0.5672890544f, 0.5752488375f, 0.5807913542f, 0.5827894807f,
- 0.5807913542f, 0.5752488375f, 0.5672890544f, 0.5582211614f,
- 0.5491278768f, 0.5368629098f, 0.5269903541f, 0.5194864869f,
- 0.5139572024f, 0.5099512339f, 0.5056321621f, 0.5031771064f,
- 0.5017895103f, 0.5010071397f, 0.5000000000f},
- {0.5000000000f, 0.5009042621f, 0.5016067624f, 0.5028531551f,
- 0.5050591230f, 0.5089425445f, 0.5125473142f, 0.5175274611f,
- 0.5242940187f, 0.5332102180f, 0.5443075299f, 0.5525490046f,
- 0.5607786179f, 0.5680114627f, 0.5730524659f, 0.5748707652f,
- 0.5730524659f, 0.5680115223f, 0.5607786775f, 0.5525490046f,
- 0.5443075299f, 0.5332102180f, 0.5242940187f, 0.5175274611f,
- 0.5125473142f, 0.5089425445f, 0.5050590634f, 0.5028531551f,
- 0.5016067624f, 0.5009042621f, 0.5000000000f},
- {0.5000000000f, 0.5006461143f, 0.5011484027f, 0.5020399094f,
- 0.5036193132f, 0.5064044595f, 0.5089951158f, 0.5125823617f,
- 0.5174714923f, 0.5239394307f, 0.5320289135f, 0.5380636454f,
- 0.5441119671f, 0.5494454503f, 0.5531721711f, 0.5545182824f,
- 0.5531721711f, 0.5494454503f, 0.5441119671f, 0.5380636454f,
- 0.5320289135f, 0.5239394307f, 0.5174714923f, 0.5125823617f,
- 0.5089950562f, 0.5064044595f, 0.5036192536f, 0.5020399094f,
- 0.5011484027f, 0.5006461143f, 0.5000000000f},
- {0.5000000000f, 0.5003954172f, 0.5007029176f, 0.5012489557f,
- 0.5022173524f, 0.5039278865f, 0.5055221915f, 0.5077348351f,
- 0.5107599497f, 0.5147782564f, 0.5198295116f, 0.5236158371f,
- 0.5274257660f, 0.5307977200f, 0.5331605673f, 0.5340154171f,
- 0.5331605673f, 0.5307977200f, 0.5274257660f, 0.5236158371f,
- 0.5198295116f, 0.5147782564f, 0.5107599497f, 0.5077348351f,
- 0.5055221915f, 0.5039278865f, 0.5022173524f, 0.5012489557f,
- 0.5007029176f, 0.5003954172f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4993658364f, 0.4988718629f, 0.4979924560f,
- 0.4964269102f, 0.4936419725f, 0.4910234213f, 0.4873520732f,
- 0.4822612107f, 0.4753669202f, 0.4664771855f, 0.4596425891f,
- 0.4526099563f, 0.4462499917f, 0.4417141378f, 0.4400566816f,
- 0.4417141378f, 0.4462499917f, 0.4526099563f, 0.4596425891f,
- 0.4664771855f, 0.4753669202f, 0.4822612107f, 0.4873520732f,
- 0.4910234213f, 0.4936419725f, 0.4964269102f, 0.4979925156f,
- 0.4988718629f, 0.4993658364f, 0.5000000000f},
- {0.5000000000f, 0.4989336729f, 0.4981023371f, 0.4966210425f,
- 0.4939794540f, 0.4892660379f, 0.4848169982f, 0.4785499275f,
- 0.4698013365f, 0.4578387141f, 0.4422026277f, 0.4300048947f,
- 0.4172779918f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4172779918f, 0.4300048947f,
- 0.4422026277f, 0.4578386545f, 0.4698013365f, 0.4785499275f,
- 0.4848169982f, 0.4892660379f, 0.4939795136f, 0.4966210425f,
- 0.4981023371f, 0.4989336729f, 0.5000000000f}},
+ {0.5000000000f, 0.5010747910f, 0.5019095540f, 0.5033900142f, 0.5060086250f, 0.5106133819f,
+ 0.5148820281f, 0.5207706094f, 0.5287556648f, 0.5392510295f, 0.5522742867f, 0.5619193316f,
+ 0.5715291500f, 0.5799580812f, 0.5858238339f, 0.5879377723f, 0.5858238339f, 0.5799580812f,
+ 0.5715291500f, 0.5619193316f, 0.5522742271f, 0.5392510295f, 0.5287556648f, 0.5207706094f,
+ 0.5148820281f, 0.5106133819f, 0.5060086250f, 0.5033900142f, 0.5019095540f, 0.5010747910f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5010071397f, 0.5017895103f, 0.5031771064f, 0.5056321621f, 0.5099512339f,
+ 0.5139571428f, 0.5194865465f, 0.5269903541f, 0.5368629098f, 0.5491278768f, 0.5582211614f,
+ 0.5672890544f, 0.5752488375f, 0.5807913542f, 0.5827894807f, 0.5807913542f, 0.5752488375f,
+ 0.5672890544f, 0.5582211614f, 0.5491278768f, 0.5368629098f, 0.5269903541f, 0.5194864869f,
+ 0.5139572024f, 0.5099512339f, 0.5056321621f, 0.5031771064f, 0.5017895103f, 0.5010071397f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5009042621f, 0.5016067624f, 0.5028531551f, 0.5050591230f, 0.5089425445f,
+ 0.5125473142f, 0.5175274611f, 0.5242940187f, 0.5332102180f, 0.5443075299f, 0.5525490046f,
+ 0.5607786179f, 0.5680114627f, 0.5730524659f, 0.5748707652f, 0.5730524659f, 0.5680115223f,
+ 0.5607786775f, 0.5525490046f, 0.5443075299f, 0.5332102180f, 0.5242940187f, 0.5175274611f,
+ 0.5125473142f, 0.5089425445f, 0.5050590634f, 0.5028531551f, 0.5016067624f, 0.5009042621f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5006461143f, 0.5011484027f, 0.5020399094f, 0.5036193132f, 0.5064044595f,
+ 0.5089951158f, 0.5125823617f, 0.5174714923f, 0.5239394307f, 0.5320289135f, 0.5380636454f,
+ 0.5441119671f, 0.5494454503f, 0.5531721711f, 0.5545182824f, 0.5531721711f, 0.5494454503f,
+ 0.5441119671f, 0.5380636454f, 0.5320289135f, 0.5239394307f, 0.5174714923f, 0.5125823617f,
+ 0.5089950562f, 0.5064044595f, 0.5036192536f, 0.5020399094f, 0.5011484027f, 0.5006461143f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5003954172f, 0.5007029176f, 0.5012489557f, 0.5022173524f, 0.5039278865f,
+ 0.5055221915f, 0.5077348351f, 0.5107599497f, 0.5147782564f, 0.5198295116f, 0.5236158371f,
+ 0.5274257660f, 0.5307977200f, 0.5331605673f, 0.5340154171f, 0.5331605673f, 0.5307977200f,
+ 0.5274257660f, 0.5236158371f, 0.5198295116f, 0.5147782564f, 0.5107599497f, 0.5077348351f,
+ 0.5055221915f, 0.5039278865f, 0.5022173524f, 0.5012489557f, 0.5007029176f, 0.5003954172f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4993658364f, 0.4988718629f, 0.4979924560f, 0.4964269102f, 0.4936419725f,
+ 0.4910234213f, 0.4873520732f, 0.4822612107f, 0.4753669202f, 0.4664771855f, 0.4596425891f,
+ 0.4526099563f, 0.4462499917f, 0.4417141378f, 0.4400566816f, 0.4417141378f, 0.4462499917f,
+ 0.4526099563f, 0.4596425891f, 0.4664771855f, 0.4753669202f, 0.4822612107f, 0.4873520732f,
+ 0.4910234213f, 0.4936419725f, 0.4964269102f, 0.4979925156f, 0.4988718629f, 0.4993658364f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4989336729f, 0.4981023371f, 0.4966210425f, 0.4939794540f, 0.4892660379f,
+ 0.4848169982f, 0.4785499275f, 0.4698013365f, 0.4578387141f, 0.4422026277f, 0.4300048947f,
+ 0.4172779918f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4172779918f, 0.4300048947f, 0.4422026277f, 0.4578386545f, 0.4698013365f, 0.4785499275f,
+ 0.4848169982f, 0.4892660379f, 0.4939795136f, 0.4966210425f, 0.4981023371f, 0.4989336729f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000596f, 0.5000000000f,
- 0.5000000000f, 0.5000000596f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f}},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000596f, 0.5000000000f, 0.5000000000f, 0.5000000596f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.4989228845f, 0.4980831146f, 0.4965868294f,
- 0.4939183295f, 0.4891564250f, 0.4846611917f, 0.4783283472f,
- 0.4694863856f, 0.4573930204f, 0.4415802956f, 0.4292396903f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4292396903f,
- 0.4415802360f, 0.4573930204f, 0.4694863856f, 0.4783283472f,
- 0.4846611917f, 0.4891564250f, 0.4939183295f, 0.4965868294f,
- 0.4980831146f, 0.4989228845f, 0.5000000000f},
- {0.5000000000f, 0.4989907742f, 0.4982040823f, 0.4968025982f,
- 0.4943036735f, 0.4898466468f, 0.4856418371f, 0.4797225595f,
- 0.4714670181f, 0.4601936638f, 0.4454868734f, 0.4340382218f,
- 0.4221174717f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4221174419f, 0.4340382218f,
- 0.4454868734f, 0.4601936638f, 0.4714670181f, 0.4797225595f,
- 0.4856418371f, 0.4898466468f, 0.4943036735f, 0.4968025982f,
- 0.4982040823f, 0.4989907742f, 0.5000000000f},
- {0.5000000000f, 0.4990940988f, 0.4983880222f, 0.4971305132f,
- 0.4948891699f, 0.4908945858f, 0.4871295691f, 0.4818353653f,
- 0.4744636714f, 0.4644210041f, 0.4513638616f, 0.4412364960f,
- 0.4307287931f, 0.4211448431f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4211448431f, 0.4307287931f, 0.4412364960f,
- 0.4513638616f, 0.4644210041f, 0.4744636118f, 0.4818353653f,
- 0.4871295691f, 0.4908945858f, 0.4948891699f, 0.4971305132f,
- 0.4983880222f, 0.4990940988f, 0.5000000000f},
- {0.5000000000f, 0.4993529916f, 0.4988490045f, 0.4979517758f,
- 0.4963543117f, 0.4935124516f, 0.4908400774f, 0.4870927036f,
- 0.4818954766f, 0.4748552144f, 0.4657738209f, 0.4587891996f,
- 0.4515995979f, 0.4450952113f, 0.4404549301f, 0.4387589991f,
- 0.4404549301f, 0.4450952113f, 0.4515995383f, 0.4587891996f,
- 0.4657738805f, 0.4748552144f, 0.4818954766f, 0.4870927334f,
- 0.4908400774f, 0.4935124516f, 0.4963543117f, 0.4979517758f,
- 0.4988490045f, 0.4993529916f, 0.5000000000f},
- {0.5000000000f, 0.4996043146f, 0.4992960989f, 0.4987479150f,
- 0.4977727532f, 0.4960409999f, 0.4944161773f, 0.4921435714f,
- 0.4890033603f, 0.4847714305f, 0.4793508947f, 0.4752120376f,
- 0.4709798396f, 0.4671763778f, 0.4644779861f, 0.4634949565f,
- 0.4644779861f, 0.4671763778f, 0.4709798396f, 0.4752120376f,
- 0.4793508947f, 0.4847714305f, 0.4890033603f, 0.4921435714f,
- 0.4944161773f, 0.4960409999f, 0.4977727532f, 0.4987478554f,
- 0.4992960989f, 0.4996043146f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5006332994f, 0.5011256337f, 0.5019994974f,
- 0.5035477281f, 0.5062782168f, 0.5088182092f, 0.5123358369f,
- 0.5171306729f, 0.5234751701f, 0.5314123034f, 0.5373347998f,
- 0.5432717204f, 0.5485079288f, 0.5521671772f, 0.5534890294f,
- 0.5521671772f, 0.5485079288f, 0.5432717204f, 0.5373347998f,
- 0.5314123034f, 0.5234752297f, 0.5171306729f, 0.5123357773f,
- 0.5088182092f, 0.5062782168f, 0.5035477281f, 0.5019994974f,
- 0.5011256337f, 0.5006332994f, 0.5000000000f},
- {0.5000000000f, 0.5010640621f, 0.5018905401f, 0.5033562183f,
- 0.5059488416f, 0.5105082989f, 0.5147353411f, 0.5205669403f,
- 0.5284758210f, 0.5388726592f, 0.5517760515f, 0.5613338947f,
- 0.5708581805f, 0.5792131424f, 0.5850278735f, 0.5871236324f,
- 0.5850278735f, 0.5792131424f, 0.5708581805f, 0.5613338947f,
- 0.5517760515f, 0.5388726592f, 0.5284758210f, 0.5205669403f,
- 0.5147353411f, 0.5105082989f, 0.5059488416f, 0.5033562183f,
- 0.5018904805f, 0.5010640621f, 0.5000000000f}},
+ {0.5000000000f, 0.4989228845f, 0.4980831146f, 0.4965868294f, 0.4939183295f, 0.4891564250f,
+ 0.4846611917f, 0.4783283472f, 0.4694863856f, 0.4573930204f, 0.4415802956f, 0.4292396903f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4292396903f, 0.4415802360f, 0.4573930204f, 0.4694863856f, 0.4783283472f,
+ 0.4846611917f, 0.4891564250f, 0.4939183295f, 0.4965868294f, 0.4980831146f, 0.4989228845f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4989907742f, 0.4982040823f, 0.4968025982f, 0.4943036735f, 0.4898466468f,
+ 0.4856418371f, 0.4797225595f, 0.4714670181f, 0.4601936638f, 0.4454868734f, 0.4340382218f,
+ 0.4221174717f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4221174419f, 0.4340382218f, 0.4454868734f, 0.4601936638f, 0.4714670181f, 0.4797225595f,
+ 0.4856418371f, 0.4898466468f, 0.4943036735f, 0.4968025982f, 0.4982040823f, 0.4989907742f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4990940988f, 0.4983880222f, 0.4971305132f, 0.4948891699f, 0.4908945858f,
+ 0.4871295691f, 0.4818353653f, 0.4744636714f, 0.4644210041f, 0.4513638616f, 0.4412364960f,
+ 0.4307287931f, 0.4211448431f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4211448431f,
+ 0.4307287931f, 0.4412364960f, 0.4513638616f, 0.4644210041f, 0.4744636118f, 0.4818353653f,
+ 0.4871295691f, 0.4908945858f, 0.4948891699f, 0.4971305132f, 0.4983880222f, 0.4990940988f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4993529916f, 0.4988490045f, 0.4979517758f, 0.4963543117f, 0.4935124516f,
+ 0.4908400774f, 0.4870927036f, 0.4818954766f, 0.4748552144f, 0.4657738209f, 0.4587891996f,
+ 0.4515995979f, 0.4450952113f, 0.4404549301f, 0.4387589991f, 0.4404549301f, 0.4450952113f,
+ 0.4515995383f, 0.4587891996f, 0.4657738805f, 0.4748552144f, 0.4818954766f, 0.4870927334f,
+ 0.4908400774f, 0.4935124516f, 0.4963543117f, 0.4979517758f, 0.4988490045f, 0.4993529916f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4996043146f, 0.4992960989f, 0.4987479150f, 0.4977727532f, 0.4960409999f,
+ 0.4944161773f, 0.4921435714f, 0.4890033603f, 0.4847714305f, 0.4793508947f, 0.4752120376f,
+ 0.4709798396f, 0.4671763778f, 0.4644779861f, 0.4634949565f, 0.4644779861f, 0.4671763778f,
+ 0.4709798396f, 0.4752120376f, 0.4793508947f, 0.4847714305f, 0.4890033603f, 0.4921435714f,
+ 0.4944161773f, 0.4960409999f, 0.4977727532f, 0.4987478554f, 0.4992960989f, 0.4996043146f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5006332994f, 0.5011256337f, 0.5019994974f, 0.5035477281f, 0.5062782168f,
+ 0.5088182092f, 0.5123358369f, 0.5171306729f, 0.5234751701f, 0.5314123034f, 0.5373347998f,
+ 0.5432717204f, 0.5485079288f, 0.5521671772f, 0.5534890294f, 0.5521671772f, 0.5485079288f,
+ 0.5432717204f, 0.5373347998f, 0.5314123034f, 0.5234752297f, 0.5171306729f, 0.5123357773f,
+ 0.5088182092f, 0.5062782168f, 0.5035477281f, 0.5019994974f, 0.5011256337f, 0.5006332994f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5010640621f, 0.5018905401f, 0.5033562183f, 0.5059488416f, 0.5105082989f,
+ 0.5147353411f, 0.5205669403f, 0.5284758210f, 0.5388726592f, 0.5517760515f, 0.5613338947f,
+ 0.5708581805f, 0.5792131424f, 0.5850278735f, 0.5871236324f, 0.5850278735f, 0.5792131424f,
+ 0.5708581805f, 0.5613338947f, 0.5517760515f, 0.5388726592f, 0.5284758210f, 0.5205669403f,
+ 0.5147353411f, 0.5105082989f, 0.5059488416f, 0.5033562183f, 0.5018904805f, 0.5010640621f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.4980079234f, 0.4964522421f, 0.4936747849f,
- 0.4887031913f, 0.4797717333f, 0.4712667167f, 0.4591555893f,
- 0.4419712424f, 0.4178838134f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4178838134f, 0.4419712424f, 0.4591555893f,
- 0.4712667167f, 0.4797717333f, 0.4887031913f, 0.4936747849f,
- 0.4964522421f, 0.4980079234f, 0.5000000000f},
- {0.5000000000f, 0.4981336296f, 0.4966765046f, 0.4940757155f,
- 0.4894226193f, 0.4810712039f, 0.4731284380f, 0.4618354440f,
- 0.4458500445f, 0.4235273004f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4235273004f, 0.4458500445f, 0.4618354440f,
- 0.4731284380f, 0.4810712039f, 0.4894225895f, 0.4940757155f,
- 0.4966765046f, 0.4981336892f, 0.5000000000f},
- {0.5000000000f, 0.4983248413f, 0.4970174134f, 0.4946847558f,
- 0.4905147851f, 0.4830409586f, 0.4759460390f, 0.4658817351f,
- 0.4516856372f, 0.4319694936f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4319694936f, 0.4516856372f, 0.4658817351f,
- 0.4759460390f, 0.4830409586f, 0.4905147851f, 0.4946847558f,
- 0.4970174134f, 0.4983248413f, 0.5000000000f},
- {0.5000000000f, 0.4988038540f, 0.4978710711f, 0.4962087274f,
- 0.4932425618f, 0.4879449904f, 0.4829386175f, 0.4758763313f,
- 0.4659966528f, 0.4524453282f, 0.4346525371f, 0.4207023382f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4207023382f,
- 0.4346525371f, 0.4524453282f, 0.4659966528f, 0.4758763313f,
- 0.4829386175f, 0.4879449904f, 0.4932425618f, 0.4962087274f,
- 0.4978710711f, 0.4988038540f, 0.5000000000f},
- {0.5000000000f, 0.4992685318f, 0.4986986518f, 0.4976839423f,
- 0.4958767295f, 0.4926598668f, 0.4896325469f, 0.4853836596f,
- 0.4794833362f, 0.4714762270f, 0.4611217678f, 0.4531369507f,
- 0.4448976219f, 0.4374250174f, 0.4320826530f, 0.4301276803f,
- 0.4320826530f, 0.4374250174f, 0.4448976219f, 0.4531369507f,
- 0.4611217678f, 0.4714762270f, 0.4794833362f, 0.4853836596f,
- 0.4896325469f, 0.4926598072f, 0.4958767295f, 0.4976839423f,
- 0.4986986518f, 0.4992685318f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5011696219f, 0.5020779371f, 0.5036883950f,
- 0.5065358877f, 0.5115402937f, 0.5161759257f, 0.5225655437f,
- 0.5312208533f, 0.5425815582f, 0.5566557646f, 0.5670637488f,
- 0.5774215460f, 0.5864970684f, 0.5928076506f, 0.5950810909f,
- 0.5928076506f, 0.5864970684f, 0.5774215460f, 0.5670637488f,
- 0.5566557646f, 0.5425815582f, 0.5312208533f, 0.5225655437f,
- 0.5161759257f, 0.5115402341f, 0.5065358877f, 0.5036883950f,
- 0.5020778775f, 0.5011696219f, 0.5000000000f},
- {0.5000000000f, 0.5019643307f, 0.5034876466f, 0.5061841011f,
- 0.5109378099f, 0.5192503333f, 0.5269047022f, 0.5373865962f,
- 0.5514660478f, 0.5697538257f, 0.5921343565f, 0.6085074544f,
- 0.6246649623f, 0.6387181878f, 0.6484364867f, 0.6519271135f,
- 0.6484364867f, 0.6387181878f, 0.6246649027f, 0.6085074544f,
- 0.5921343565f, 0.5697538257f, 0.5514660478f, 0.5373866558f,
- 0.5269047022f, 0.5192503333f, 0.5109378099f, 0.5061841011f,
- 0.5034876466f, 0.5019643903f, 0.5000000596f}},
+ {0.5000000000f, 0.4980079234f, 0.4964522421f, 0.4936747849f, 0.4887031913f, 0.4797717333f,
+ 0.4712667167f, 0.4591555893f, 0.4419712424f, 0.4178838134f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4178838134f, 0.4419712424f, 0.4591555893f,
+ 0.4712667167f, 0.4797717333f, 0.4887031913f, 0.4936747849f, 0.4964522421f, 0.4980079234f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4981336296f, 0.4966765046f, 0.4940757155f, 0.4894226193f, 0.4810712039f,
+ 0.4731284380f, 0.4618354440f, 0.4458500445f, 0.4235273004f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4235273004f, 0.4458500445f, 0.4618354440f,
+ 0.4731284380f, 0.4810712039f, 0.4894225895f, 0.4940757155f, 0.4966765046f, 0.4981336892f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4983248413f, 0.4970174134f, 0.4946847558f, 0.4905147851f, 0.4830409586f,
+ 0.4759460390f, 0.4658817351f, 0.4516856372f, 0.4319694936f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4319694936f, 0.4516856372f, 0.4658817351f,
+ 0.4759460390f, 0.4830409586f, 0.4905147851f, 0.4946847558f, 0.4970174134f, 0.4983248413f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4988038540f, 0.4978710711f, 0.4962087274f, 0.4932425618f, 0.4879449904f,
+ 0.4829386175f, 0.4758763313f, 0.4659966528f, 0.4524453282f, 0.4346525371f, 0.4207023382f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4207023382f, 0.4346525371f, 0.4524453282f, 0.4659966528f, 0.4758763313f,
+ 0.4829386175f, 0.4879449904f, 0.4932425618f, 0.4962087274f, 0.4978710711f, 0.4988038540f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4992685318f, 0.4986986518f, 0.4976839423f, 0.4958767295f, 0.4926598668f,
+ 0.4896325469f, 0.4853836596f, 0.4794833362f, 0.4714762270f, 0.4611217678f, 0.4531369507f,
+ 0.4448976219f, 0.4374250174f, 0.4320826530f, 0.4301276803f, 0.4320826530f, 0.4374250174f,
+ 0.4448976219f, 0.4531369507f, 0.4611217678f, 0.4714762270f, 0.4794833362f, 0.4853836596f,
+ 0.4896325469f, 0.4926598072f, 0.4958767295f, 0.4976839423f, 0.4986986518f, 0.4992685318f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5011696219f, 0.5020779371f, 0.5036883950f, 0.5065358877f, 0.5115402937f,
+ 0.5161759257f, 0.5225655437f, 0.5312208533f, 0.5425815582f, 0.5566557646f, 0.5670637488f,
+ 0.5774215460f, 0.5864970684f, 0.5928076506f, 0.5950810909f, 0.5928076506f, 0.5864970684f,
+ 0.5774215460f, 0.5670637488f, 0.5566557646f, 0.5425815582f, 0.5312208533f, 0.5225655437f,
+ 0.5161759257f, 0.5115402341f, 0.5065358877f, 0.5036883950f, 0.5020778775f, 0.5011696219f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5019643307f, 0.5034876466f, 0.5061841011f, 0.5109378099f, 0.5192503333f,
+ 0.5269047022f, 0.5373865962f, 0.5514660478f, 0.5697538257f, 0.5921343565f, 0.6085074544f,
+ 0.6246649623f, 0.6387181878f, 0.6484364867f, 0.6519271135f, 0.6484364867f, 0.6387181878f,
+ 0.6246649027f, 0.6085074544f, 0.5921343565f, 0.5697538257f, 0.5514660478f, 0.5373866558f,
+ 0.5269047022f, 0.5192503333f, 0.5109378099f, 0.5061841011f, 0.5034876466f, 0.5019643903f,
+ 0.5000000596f}},
{
- {0.5000000000f, 0.4973956347f, 0.4953595102f, 0.4917194545f,
- 0.4851873517f, 0.4733974338f, 0.4621005356f, 0.4458855093f,
- 0.4225889444f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4225889444f, 0.4458855093f,
- 0.4621005356f, 0.4733974338f, 0.4851873517f, 0.4917194545f,
- 0.4953595102f, 0.4973956347f, 0.5000000000f},
- {0.5000000000f, 0.4975600541f, 0.4956531823f, 0.4922452271f,
- 0.4861339033f, 0.4751173258f, 0.4645794332f, 0.4494870603f,
- 0.4278794229f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4278794229f, 0.4494870603f,
- 0.4645794332f, 0.4751173258f, 0.4861338437f, 0.4922452271f,
- 0.4956531823f, 0.4975600541f, 0.5000000000f},
- {0.5000000000f, 0.4978101552f, 0.4960994422f, 0.4930438697f,
- 0.4875699580f, 0.4777213931f, 0.4683246017f, 0.4549102187f,
- 0.4358028471f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4358028471f, 0.4549102187f,
- 0.4683246017f, 0.4777213931f, 0.4875699580f, 0.4930438697f,
- 0.4960994422f, 0.4978101552f, 0.5000000000f},
- {0.5000000000f, 0.4984366000f, 0.4972166717f, 0.4950406849f,
- 0.4911523461f, 0.4841892719f, 0.4775862098f, 0.4682320654f,
- 0.4550639093f, 0.4368312657f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4368312657f, 0.4550639093f, 0.4682320654f,
- 0.4775862098f, 0.4841892719f, 0.4911523461f, 0.4950406253f,
- 0.4972166717f, 0.4984366000f, 0.5000000000f},
- {0.5000000000f, 0.4990440905f, 0.4982990324f, 0.4969717562f,
- 0.4946058393f, 0.4903875589f, 0.4864100218f, 0.4808138311f,
- 0.4730155468f, 0.4623796046f, 0.4485287368f, 0.4377669692f,
- 0.4265822172f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4265822172f, 0.4377669096f,
- 0.4485287070f, 0.4623796046f, 0.4730155468f, 0.4808138311f,
- 0.4864100218f, 0.4903876185f, 0.4946058393f, 0.4969717562f,
- 0.4982990324f, 0.4990440905f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5015276670f, 0.5027132034f, 0.5048136711f,
- 0.5085227489f, 0.5150263309f, 0.5210343599f, 0.5292906761f,
- 0.5404308438f, 0.5549815893f, 0.5729033351f, 0.5860881805f,
- 0.5991558433f, 0.6105647087f, 0.6184762716f, 0.6213221550f,
- 0.6184762716f, 0.6105646491f, 0.5991559029f, 0.5860881805f,
- 0.5729033351f, 0.5549815893f, 0.5404308438f, 0.5292906761f,
- 0.5210343599f, 0.5150263309f, 0.5085227489f, 0.5048136711f,
- 0.5027132034f, 0.5015276670f, 0.5000000596f},
- {0.5000000000f, 0.5025650263f, 0.5045520067f, 0.5080648065f,
- 0.5142443776f, 0.5250104070f, 0.5348817706f, 0.5483376980f,
- 0.5663076639f, 0.5894870162f, 0.6176328659f, 0.6380870938f,
- 0.6581704617f, 0.6755633950f, 0.6875533462f, 0.6918526888f,
- 0.6875533462f, 0.6755633950f, 0.6581704021f, 0.6380870938f,
- 0.6176328659f, 0.5894870162f, 0.5663076639f, 0.5483376980f,
- 0.5348817110f, 0.5250104070f, 0.5142443776f, 0.5080648065f,
- 0.5045520067f, 0.5025650263f, 0.5000000596f}},
+ {0.5000000000f, 0.4973956347f, 0.4953595102f, 0.4917194545f, 0.4851873517f, 0.4733974338f,
+ 0.4621005356f, 0.4458855093f, 0.4225889444f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4225889444f, 0.4458855093f,
+ 0.4621005356f, 0.4733974338f, 0.4851873517f, 0.4917194545f, 0.4953595102f, 0.4973956347f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4975600541f, 0.4956531823f, 0.4922452271f, 0.4861339033f, 0.4751173258f,
+ 0.4645794332f, 0.4494870603f, 0.4278794229f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4278794229f, 0.4494870603f,
+ 0.4645794332f, 0.4751173258f, 0.4861338437f, 0.4922452271f, 0.4956531823f, 0.4975600541f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4978101552f, 0.4960994422f, 0.4930438697f, 0.4875699580f, 0.4777213931f,
+ 0.4683246017f, 0.4549102187f, 0.4358028471f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4358028471f, 0.4549102187f,
+ 0.4683246017f, 0.4777213931f, 0.4875699580f, 0.4930438697f, 0.4960994422f, 0.4978101552f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4984366000f, 0.4972166717f, 0.4950406849f, 0.4911523461f, 0.4841892719f,
+ 0.4775862098f, 0.4682320654f, 0.4550639093f, 0.4368312657f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4368312657f, 0.4550639093f, 0.4682320654f,
+ 0.4775862098f, 0.4841892719f, 0.4911523461f, 0.4950406253f, 0.4972166717f, 0.4984366000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4990440905f, 0.4982990324f, 0.4969717562f, 0.4946058393f, 0.4903875589f,
+ 0.4864100218f, 0.4808138311f, 0.4730155468f, 0.4623796046f, 0.4485287368f, 0.4377669692f,
+ 0.4265822172f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4265822172f, 0.4377669096f, 0.4485287070f, 0.4623796046f, 0.4730155468f, 0.4808138311f,
+ 0.4864100218f, 0.4903876185f, 0.4946058393f, 0.4969717562f, 0.4982990324f, 0.4990440905f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5015276670f, 0.5027132034f, 0.5048136711f, 0.5085227489f, 0.5150263309f,
+ 0.5210343599f, 0.5292906761f, 0.5404308438f, 0.5549815893f, 0.5729033351f, 0.5860881805f,
+ 0.5991558433f, 0.6105647087f, 0.6184762716f, 0.6213221550f, 0.6184762716f, 0.6105646491f,
+ 0.5991559029f, 0.5860881805f, 0.5729033351f, 0.5549815893f, 0.5404308438f, 0.5292906761f,
+ 0.5210343599f, 0.5150263309f, 0.5085227489f, 0.5048136711f, 0.5027132034f, 0.5015276670f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5025650263f, 0.5045520067f, 0.5080648065f, 0.5142443776f, 0.5250104070f,
+ 0.5348817706f, 0.5483376980f, 0.5663076639f, 0.5894870162f, 0.6176328659f, 0.6380870938f,
+ 0.6581704617f, 0.6755633950f, 0.6875533462f, 0.6918526888f, 0.6875533462f, 0.6755633950f,
+ 0.6581704021f, 0.6380870938f, 0.6176328659f, 0.5894870162f, 0.5663076639f, 0.5483376980f,
+ 0.5348817110f, 0.5250104070f, 0.5142443776f, 0.5080648065f, 0.5045520067f, 0.5025650263f,
+ 0.5000000596f}},
{
- {0.5000000000f, 0.4971804321f, 0.4949752688f, 0.4910309613f,
- 0.4839466810f, 0.4711386263f, 0.4588383138f, 0.4411309958f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.0000000000f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4411309958f,
- 0.4588383138f, 0.4711386263f, 0.4839466810f, 0.4910309613f,
- 0.4949752688f, 0.4971804321f, 0.5000000000f},
- {0.5000000000f, 0.4973585308f, 0.4952933490f, 0.4916008413f,
- 0.4849737287f, 0.4730088115f, 0.4615398645f, 0.4450696707f,
- 0.4213871956f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4213872254f, 0.4450696707f,
- 0.4615398645f, 0.4730088115f, 0.4849737287f, 0.4916008413f,
- 0.4952932894f, 0.4973585308f, 0.5000000000f},
- {0.5000000000f, 0.4976293147f, 0.4957766831f, 0.4924663603f,
- 0.4865316749f, 0.4758392870f, 0.4656187594f, 0.4509941638f,
- 0.4300864339f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4300864339f, 0.4509941638f,
- 0.4656187594f, 0.4758392870f, 0.4865316749f, 0.4924663603f,
- 0.4957766831f, 0.4976293147f, 0.5000000000f},
- {0.5000000000f, 0.4983075559f, 0.4969865978f, 0.4946298003f,
- 0.4904162288f, 0.4828635156f, 0.4756923914f, 0.4655179977f,
- 0.4511619806f, 0.4312142432f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4312142432f, 0.4511619806f, 0.4655179381f,
- 0.4756923914f, 0.4828635156f, 0.4904162884f, 0.4946298003f,
- 0.4969866574f, 0.4983075559f, 0.5000000000f},
- {0.5000000000f, 0.4989652634f, 0.4981585741f, 0.4967214465f,
- 0.4941587746f, 0.4895872176f, 0.4852733612f, 0.4791988134f,
- 0.4707232416f, 0.4591425657f, 0.4440219402f, 0.4322400987f,
- 0.4199612439f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4199612439f, 0.4322400391f,
- 0.4440219402f, 0.4591425657f, 0.4707232416f, 0.4791988134f,
- 0.4852733612f, 0.4895872176f, 0.4941587746f, 0.4967214465f,
- 0.4981585741f, 0.4989652634f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5016533136f, 0.5029361248f, 0.5052082539f,
- 0.5092185736f, 0.5162448287f, 0.5227296948f, 0.5316320062f,
- 0.5436279774f, 0.5592706800f, 0.5785004497f, 0.5926237702f,
- 0.6066032648f, 0.6187940836f, 0.6272407174f, 0.6302776933f,
- 0.6272407174f, 0.6187940836f, 0.6066032648f, 0.5926238298f,
- 0.5785004497f, 0.5592706800f, 0.5436280370f, 0.5316320062f,
- 0.5227296352f, 0.5162448287f, 0.5092185736f, 0.5052082539f,
- 0.5029360652f, 0.5016533136f, 0.5000000596f},
- {0.5000000596f, 0.5027757883f, 0.5049252510f, 0.5087236166f,
- 0.5154004693f, 0.5270181894f, 0.5376548171f, 0.5521317124f,
- 0.5714279413f, 0.5962615013f, 0.6263405681f, 0.6481539011f,
- 0.6695383787f, 0.6880338192f, 0.7007715702f, 0.7053368092f,
- 0.7007715702f, 0.6880338192f, 0.6695383191f, 0.6481539011f,
- 0.6263405681f, 0.5962615013f, 0.5714278817f, 0.5521317124f,
- 0.5376548171f, 0.5270181298f, 0.5154004097f, 0.5087236166f,
- 0.5049252510f, 0.5027757883f, 0.5000000596f}},
+ {0.5000000000f, 0.4971804321f, 0.4949752688f, 0.4910309613f, 0.4839466810f, 0.4711386263f,
+ 0.4588383138f, 0.4411309958f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.0000000000f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4411309958f,
+ 0.4588383138f, 0.4711386263f, 0.4839466810f, 0.4910309613f, 0.4949752688f, 0.4971804321f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4973585308f, 0.4952933490f, 0.4916008413f, 0.4849737287f, 0.4730088115f,
+ 0.4615398645f, 0.4450696707f, 0.4213871956f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4213872254f, 0.4450696707f,
+ 0.4615398645f, 0.4730088115f, 0.4849737287f, 0.4916008413f, 0.4952932894f, 0.4973585308f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4976293147f, 0.4957766831f, 0.4924663603f, 0.4865316749f, 0.4758392870f,
+ 0.4656187594f, 0.4509941638f, 0.4300864339f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4300864339f, 0.4509941638f,
+ 0.4656187594f, 0.4758392870f, 0.4865316749f, 0.4924663603f, 0.4957766831f, 0.4976293147f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4983075559f, 0.4969865978f, 0.4946298003f, 0.4904162288f, 0.4828635156f,
+ 0.4756923914f, 0.4655179977f, 0.4511619806f, 0.4312142432f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4312142432f, 0.4511619806f, 0.4655179381f,
+ 0.4756923914f, 0.4828635156f, 0.4904162884f, 0.4946298003f, 0.4969866574f, 0.4983075559f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4989652634f, 0.4981585741f, 0.4967214465f, 0.4941587746f, 0.4895872176f,
+ 0.4852733612f, 0.4791988134f, 0.4707232416f, 0.4591425657f, 0.4440219402f, 0.4322400987f,
+ 0.4199612439f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4199612439f, 0.4322400391f, 0.4440219402f, 0.4591425657f, 0.4707232416f, 0.4791988134f,
+ 0.4852733612f, 0.4895872176f, 0.4941587746f, 0.4967214465f, 0.4981585741f, 0.4989652634f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5016533136f, 0.5029361248f, 0.5052082539f, 0.5092185736f, 0.5162448287f,
+ 0.5227296948f, 0.5316320062f, 0.5436279774f, 0.5592706800f, 0.5785004497f, 0.5926237702f,
+ 0.6066032648f, 0.6187940836f, 0.6272407174f, 0.6302776933f, 0.6272407174f, 0.6187940836f,
+ 0.6066032648f, 0.5926238298f, 0.5785004497f, 0.5592706800f, 0.5436280370f, 0.5316320062f,
+ 0.5227296352f, 0.5162448287f, 0.5092185736f, 0.5052082539f, 0.5029360652f, 0.5016533136f,
+ 0.5000000596f},
+ {0.5000000596f, 0.5027757883f, 0.5049252510f, 0.5087236166f, 0.5154004693f, 0.5270181894f,
+ 0.5376548171f, 0.5521317124f, 0.5714279413f, 0.5962615013f, 0.6263405681f, 0.6481539011f,
+ 0.6695383787f, 0.6880338192f, 0.7007715702f, 0.7053368092f, 0.7007715702f, 0.6880338192f,
+ 0.6695383191f, 0.6481539011f, 0.6263405681f, 0.5962615013f, 0.5714278817f, 0.5521317124f,
+ 0.5376548171f, 0.5270181298f, 0.5154004097f, 0.5087236166f, 0.5049252510f, 0.5027757883f,
+ 0.5000000596f}},
{
- {0.5000000000f, 0.4973956347f, 0.4953595102f, 0.4917194545f,
- 0.4851873517f, 0.4733974338f, 0.4621005356f, 0.4458855093f,
- 0.4225889444f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4225889444f, 0.4458855093f,
- 0.4621005356f, 0.4733974338f, 0.4851873517f, 0.4917194545f,
- 0.4953595102f, 0.4973956347f, 0.5000000000f},
- {0.5000000000f, 0.4975600541f, 0.4956531823f, 0.4922452271f,
- 0.4861339033f, 0.4751173258f, 0.4645794332f, 0.4494870603f,
- 0.4278794229f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4278794229f, 0.4494870603f,
- 0.4645794332f, 0.4751173258f, 0.4861338437f, 0.4922452271f,
- 0.4956531823f, 0.4975600541f, 0.5000000000f},
- {0.5000000000f, 0.4978101552f, 0.4960994422f, 0.4930438697f,
- 0.4875699580f, 0.4777213931f, 0.4683246017f, 0.4549102187f,
- 0.4358028471f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4358028471f, 0.4549102187f,
- 0.4683246017f, 0.4777213931f, 0.4875699580f, 0.4930438697f,
- 0.4960994422f, 0.4978101552f, 0.5000000000f},
- {0.5000000000f, 0.4984366000f, 0.4972166717f, 0.4950406849f,
- 0.4911523461f, 0.4841892719f, 0.4775862098f, 0.4682320654f,
- 0.4550639093f, 0.4368312657f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4368312657f, 0.4550639093f, 0.4682320654f,
- 0.4775862098f, 0.4841892719f, 0.4911523461f, 0.4950406253f,
- 0.4972166717f, 0.4984366000f, 0.5000000000f},
- {0.5000000000f, 0.4990440905f, 0.4982990324f, 0.4969717562f,
- 0.4946058393f, 0.4903875589f, 0.4864100218f, 0.4808138311f,
- 0.4730155468f, 0.4623796046f, 0.4485287368f, 0.4377669692f,
- 0.4265822172f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4265822172f, 0.4377669096f,
- 0.4485287070f, 0.4623796046f, 0.4730155468f, 0.4808138311f,
- 0.4864100218f, 0.4903876185f, 0.4946058393f, 0.4969717562f,
- 0.4982990324f, 0.4990440905f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5015276670f, 0.5027132034f, 0.5048136711f,
- 0.5085227489f, 0.5150263309f, 0.5210343599f, 0.5292906761f,
- 0.5404308438f, 0.5549815893f, 0.5729033351f, 0.5860881805f,
- 0.5991558433f, 0.6105647087f, 0.6184762716f, 0.6213221550f,
- 0.6184762716f, 0.6105646491f, 0.5991559029f, 0.5860881805f,
- 0.5729033351f, 0.5549815893f, 0.5404308438f, 0.5292906761f,
- 0.5210343599f, 0.5150263309f, 0.5085227489f, 0.5048136711f,
- 0.5027132034f, 0.5015276670f, 0.5000000596f},
- {0.5000000000f, 0.5025650263f, 0.5045520067f, 0.5080648065f,
- 0.5142443776f, 0.5250104070f, 0.5348817706f, 0.5483376980f,
- 0.5663076639f, 0.5894870162f, 0.6176328659f, 0.6380870938f,
- 0.6581704617f, 0.6755633950f, 0.6875533462f, 0.6918526888f,
- 0.6875533462f, 0.6755633950f, 0.6581704021f, 0.6380870938f,
- 0.6176328659f, 0.5894870162f, 0.5663076639f, 0.5483376980f,
- 0.5348817110f, 0.5250104070f, 0.5142443776f, 0.5080648065f,
- 0.5045520067f, 0.5025650263f, 0.5000000596f}},
+ {0.5000000000f, 0.4973956347f, 0.4953595102f, 0.4917194545f, 0.4851873517f, 0.4733974338f,
+ 0.4621005356f, 0.4458855093f, 0.4225889444f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4225889444f, 0.4458855093f,
+ 0.4621005356f, 0.4733974338f, 0.4851873517f, 0.4917194545f, 0.4953595102f, 0.4973956347f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4975600541f, 0.4956531823f, 0.4922452271f, 0.4861339033f, 0.4751173258f,
+ 0.4645794332f, 0.4494870603f, 0.4278794229f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4278794229f, 0.4494870603f,
+ 0.4645794332f, 0.4751173258f, 0.4861338437f, 0.4922452271f, 0.4956531823f, 0.4975600541f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4978101552f, 0.4960994422f, 0.4930438697f, 0.4875699580f, 0.4777213931f,
+ 0.4683246017f, 0.4549102187f, 0.4358028471f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4358028471f, 0.4549102187f,
+ 0.4683246017f, 0.4777213931f, 0.4875699580f, 0.4930438697f, 0.4960994422f, 0.4978101552f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4984366000f, 0.4972166717f, 0.4950406849f, 0.4911523461f, 0.4841892719f,
+ 0.4775862098f, 0.4682320654f, 0.4550639093f, 0.4368312657f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4368312657f, 0.4550639093f, 0.4682320654f,
+ 0.4775862098f, 0.4841892719f, 0.4911523461f, 0.4950406253f, 0.4972166717f, 0.4984366000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4990440905f, 0.4982990324f, 0.4969717562f, 0.4946058393f, 0.4903875589f,
+ 0.4864100218f, 0.4808138311f, 0.4730155468f, 0.4623796046f, 0.4485287368f, 0.4377669692f,
+ 0.4265822172f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4265822172f, 0.4377669096f, 0.4485287070f, 0.4623796046f, 0.4730155468f, 0.4808138311f,
+ 0.4864100218f, 0.4903876185f, 0.4946058393f, 0.4969717562f, 0.4982990324f, 0.4990440905f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5015276670f, 0.5027132034f, 0.5048136711f, 0.5085227489f, 0.5150263309f,
+ 0.5210343599f, 0.5292906761f, 0.5404308438f, 0.5549815893f, 0.5729033351f, 0.5860881805f,
+ 0.5991558433f, 0.6105647087f, 0.6184762716f, 0.6213221550f, 0.6184762716f, 0.6105646491f,
+ 0.5991559029f, 0.5860881805f, 0.5729033351f, 0.5549815893f, 0.5404308438f, 0.5292906761f,
+ 0.5210343599f, 0.5150263309f, 0.5085227489f, 0.5048136711f, 0.5027132034f, 0.5015276670f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5025650263f, 0.5045520067f, 0.5080648065f, 0.5142443776f, 0.5250104070f,
+ 0.5348817706f, 0.5483376980f, 0.5663076639f, 0.5894870162f, 0.6176328659f, 0.6380870938f,
+ 0.6581704617f, 0.6755633950f, 0.6875533462f, 0.6918526888f, 0.6875533462f, 0.6755633950f,
+ 0.6581704021f, 0.6380870938f, 0.6176328659f, 0.5894870162f, 0.5663076639f, 0.5483376980f,
+ 0.5348817110f, 0.5250104070f, 0.5142443776f, 0.5080648065f, 0.5045520067f, 0.5025650263f,
+ 0.5000000596f}},
{
- {0.5000000000f, 0.4980079234f, 0.4964522421f, 0.4936747849f,
- 0.4887031913f, 0.4797717333f, 0.4712667167f, 0.4591555893f,
- 0.4419712424f, 0.4178837836f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4178837836f, 0.4419712424f, 0.4591555893f,
- 0.4712667167f, 0.4797717333f, 0.4887031913f, 0.4936747849f,
- 0.4964522421f, 0.4980079234f, 0.5000000000f},
- {0.5000000000f, 0.4981336296f, 0.4966765046f, 0.4940757155f,
- 0.4894226193f, 0.4810712039f, 0.4731284380f, 0.4618354440f,
- 0.4458500445f, 0.4235272706f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4235273004f, 0.4458500445f, 0.4618354440f,
- 0.4731284380f, 0.4810712039f, 0.4894225895f, 0.4940757155f,
- 0.4966765046f, 0.4981336892f, 0.5000000000f},
- {0.5000000000f, 0.4983248413f, 0.4970174134f, 0.4946847558f,
- 0.4905147851f, 0.4830409586f, 0.4759460390f, 0.4658817351f,
- 0.4516856372f, 0.4319694936f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4319694936f, 0.4516856372f, 0.4658817351f,
- 0.4759460390f, 0.4830409586f, 0.4905147851f, 0.4946847558f,
- 0.4970174134f, 0.4983248413f, 0.5000000000f},
- {0.5000000000f, 0.4988038540f, 0.4978710711f, 0.4962087274f,
- 0.4932425618f, 0.4879449904f, 0.4829386175f, 0.4758763313f,
- 0.4659966528f, 0.4524453282f, 0.4346525073f, 0.4207023382f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4207023382f,
- 0.4346525371f, 0.4524452984f, 0.4659966528f, 0.4758763313f,
- 0.4829386175f, 0.4879449904f, 0.4932425618f, 0.4962087274f,
- 0.4978710711f, 0.4988038540f, 0.5000000000f},
- {0.5000000000f, 0.4992685318f, 0.4986986518f, 0.4976839423f,
- 0.4958767295f, 0.4926598668f, 0.4896325469f, 0.4853836596f,
- 0.4794833362f, 0.4714761972f, 0.4611217678f, 0.4531369507f,
- 0.4448976219f, 0.4374250174f, 0.4320826530f, 0.4301276803f,
- 0.4320826530f, 0.4374250174f, 0.4448976219f, 0.4531369507f,
- 0.4611217678f, 0.4714761972f, 0.4794833362f, 0.4853836596f,
- 0.4896325469f, 0.4926598072f, 0.4958767295f, 0.4976839423f,
- 0.4986986518f, 0.4992685318f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5011696219f, 0.5020779371f, 0.5036883950f,
- 0.5065358877f, 0.5115402937f, 0.5161759257f, 0.5225655437f,
- 0.5312208533f, 0.5425816178f, 0.5566557646f, 0.5670638084f,
- 0.5774215460f, 0.5864970684f, 0.5928076506f, 0.5950810909f,
- 0.5928076506f, 0.5864970684f, 0.5774215460f, 0.5670638084f,
- 0.5566557646f, 0.5425815582f, 0.5312208533f, 0.5225655437f,
- 0.5161759257f, 0.5115402341f, 0.5065358877f, 0.5036883950f,
- 0.5020778775f, 0.5011696219f, 0.5000000000f},
- {0.5000000000f, 0.5019643307f, 0.5034876466f, 0.5061841011f,
- 0.5109378099f, 0.5192503333f, 0.5269047022f, 0.5373866558f,
- 0.5514660478f, 0.5697538257f, 0.5921343565f, 0.6085074544f,
- 0.6246649623f, 0.6387182474f, 0.6484364867f, 0.6519271135f,
- 0.6484364867f, 0.6387182474f, 0.6246649623f, 0.6085074544f,
- 0.5921343565f, 0.5697538257f, 0.5514660478f, 0.5373866558f,
- 0.5269047022f, 0.5192503333f, 0.5109378099f, 0.5061841011f,
- 0.5034876466f, 0.5019643903f, 0.5000000596f}},
+ {0.5000000000f, 0.4980079234f, 0.4964522421f, 0.4936747849f, 0.4887031913f, 0.4797717333f,
+ 0.4712667167f, 0.4591555893f, 0.4419712424f, 0.4178837836f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4178837836f, 0.4419712424f, 0.4591555893f,
+ 0.4712667167f, 0.4797717333f, 0.4887031913f, 0.4936747849f, 0.4964522421f, 0.4980079234f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4981336296f, 0.4966765046f, 0.4940757155f, 0.4894226193f, 0.4810712039f,
+ 0.4731284380f, 0.4618354440f, 0.4458500445f, 0.4235272706f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4235273004f, 0.4458500445f, 0.4618354440f,
+ 0.4731284380f, 0.4810712039f, 0.4894225895f, 0.4940757155f, 0.4966765046f, 0.4981336892f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4983248413f, 0.4970174134f, 0.4946847558f, 0.4905147851f, 0.4830409586f,
+ 0.4759460390f, 0.4658817351f, 0.4516856372f, 0.4319694936f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4319694936f, 0.4516856372f, 0.4658817351f,
+ 0.4759460390f, 0.4830409586f, 0.4905147851f, 0.4946847558f, 0.4970174134f, 0.4983248413f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4988038540f, 0.4978710711f, 0.4962087274f, 0.4932425618f, 0.4879449904f,
+ 0.4829386175f, 0.4758763313f, 0.4659966528f, 0.4524453282f, 0.4346525073f, 0.4207023382f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4207023382f, 0.4346525371f, 0.4524452984f, 0.4659966528f, 0.4758763313f,
+ 0.4829386175f, 0.4879449904f, 0.4932425618f, 0.4962087274f, 0.4978710711f, 0.4988038540f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4992685318f, 0.4986986518f, 0.4976839423f, 0.4958767295f, 0.4926598668f,
+ 0.4896325469f, 0.4853836596f, 0.4794833362f, 0.4714761972f, 0.4611217678f, 0.4531369507f,
+ 0.4448976219f, 0.4374250174f, 0.4320826530f, 0.4301276803f, 0.4320826530f, 0.4374250174f,
+ 0.4448976219f, 0.4531369507f, 0.4611217678f, 0.4714761972f, 0.4794833362f, 0.4853836596f,
+ 0.4896325469f, 0.4926598072f, 0.4958767295f, 0.4976839423f, 0.4986986518f, 0.4992685318f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5011696219f, 0.5020779371f, 0.5036883950f, 0.5065358877f, 0.5115402937f,
+ 0.5161759257f, 0.5225655437f, 0.5312208533f, 0.5425816178f, 0.5566557646f, 0.5670638084f,
+ 0.5774215460f, 0.5864970684f, 0.5928076506f, 0.5950810909f, 0.5928076506f, 0.5864970684f,
+ 0.5774215460f, 0.5670638084f, 0.5566557646f, 0.5425815582f, 0.5312208533f, 0.5225655437f,
+ 0.5161759257f, 0.5115402341f, 0.5065358877f, 0.5036883950f, 0.5020778775f, 0.5011696219f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5019643307f, 0.5034876466f, 0.5061841011f, 0.5109378099f, 0.5192503333f,
+ 0.5269047022f, 0.5373866558f, 0.5514660478f, 0.5697538257f, 0.5921343565f, 0.6085074544f,
+ 0.6246649623f, 0.6387182474f, 0.6484364867f, 0.6519271135f, 0.6484364867f, 0.6387182474f,
+ 0.6246649623f, 0.6085074544f, 0.5921343565f, 0.5697538257f, 0.5514660478f, 0.5373866558f,
+ 0.5269047022f, 0.5192503333f, 0.5109378099f, 0.5061841011f, 0.5034876466f, 0.5019643903f,
+ 0.5000000596f}},
{
- {0.5000000000f, 0.4989228845f, 0.4980831146f, 0.4965868294f,
- 0.4939183295f, 0.4891564250f, 0.4846611917f, 0.4783283472f,
- 0.4694863856f, 0.4573929608f, 0.4415802360f, 0.4292396307f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4292396307f,
- 0.4415802360f, 0.4573929608f, 0.4694863856f, 0.4783283472f,
- 0.4846611917f, 0.4891563654f, 0.4939182699f, 0.4965868294f,
- 0.4980831146f, 0.4989228845f, 0.5000000000f},
- {0.5000000000f, 0.4989907742f, 0.4982040823f, 0.4968025982f,
- 0.4943036735f, 0.4898466468f, 0.4856418371f, 0.4797225595f,
- 0.4714670181f, 0.4601936638f, 0.4454868436f, 0.4340381622f,
- 0.4221174419f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4221173823f, 0.4340381622f,
- 0.4454868436f, 0.4601936638f, 0.4714670181f, 0.4797225595f,
- 0.4856418371f, 0.4898466468f, 0.4943036735f, 0.4968025386f,
- 0.4982040823f, 0.4989907742f, 0.5000000000f},
- {0.5000000000f, 0.4990940988f, 0.4983880222f, 0.4971305132f,
- 0.4948891699f, 0.4908945858f, 0.4871295691f, 0.4818353653f,
- 0.4744636118f, 0.4644210041f, 0.4513638020f, 0.4412364364f,
- 0.4307287931f, 0.4211447835f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4211447835f, 0.4307287633f, 0.4412364364f,
- 0.4513638616f, 0.4644210041f, 0.4744636118f, 0.4818353653f,
- 0.4871295691f, 0.4908945858f, 0.4948891699f, 0.4971305132f,
- 0.4983880222f, 0.4990940988f, 0.5000000000f},
- {0.5000000000f, 0.4993529916f, 0.4988489449f, 0.4979517758f,
- 0.4963543117f, 0.4935124516f, 0.4908400774f, 0.4870927036f,
- 0.4818954766f, 0.4748552144f, 0.4657738209f, 0.4587891996f,
- 0.4515995383f, 0.4450951517f, 0.4404549301f, 0.4387589693f,
- 0.4404549301f, 0.4450951517f, 0.4515995383f, 0.4587891996f,
- 0.4657738209f, 0.4748552144f, 0.4818954766f, 0.4870927036f,
- 0.4908400774f, 0.4935124516f, 0.4963543117f, 0.4979517758f,
- 0.4988490045f, 0.4993529916f, 0.5000000000f},
- {0.5000000000f, 0.4996043146f, 0.4992960989f, 0.4987479150f,
- 0.4977727532f, 0.4960409999f, 0.4944161773f, 0.4921435714f,
- 0.4890033603f, 0.4847714305f, 0.4793508947f, 0.4752120376f,
- 0.4709798396f, 0.4671763778f, 0.4644779861f, 0.4634948969f,
- 0.4644779861f, 0.4671763778f, 0.4709798396f, 0.4752120376f,
- 0.4793508947f, 0.4847714305f, 0.4890033603f, 0.4921435714f,
- 0.4944161773f, 0.4960409999f, 0.4977727532f, 0.4987478554f,
- 0.4992960989f, 0.4996043146f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5006332994f, 0.5011256337f, 0.5019994974f,
- 0.5035477281f, 0.5062782168f, 0.5088182092f, 0.5123358369f,
- 0.5171306729f, 0.5234752297f, 0.5314123034f, 0.5373347998f,
- 0.5432717800f, 0.5485079288f, 0.5521671772f, 0.5534890294f,
- 0.5521672368f, 0.5485079288f, 0.5432717800f, 0.5373347998f,
- 0.5314123631f, 0.5234752297f, 0.5171306729f, 0.5123357773f,
- 0.5088182092f, 0.5062782168f, 0.5035477281f, 0.5019994974f,
- 0.5011256337f, 0.5006333590f, 0.5000000000f},
- {0.5000000000f, 0.5010640621f, 0.5018905401f, 0.5033562183f,
- 0.5059488416f, 0.5105082989f, 0.5147353411f, 0.5205669403f,
- 0.5284758806f, 0.5388726592f, 0.5517760515f, 0.5613339543f,
- 0.5708582401f, 0.5792131424f, 0.5850278735f, 0.5871236920f,
- 0.5850278735f, 0.5792131424f, 0.5708582401f, 0.5613339543f,
- 0.5517760515f, 0.5388726592f, 0.5284758210f, 0.5205669403f,
- 0.5147353411f, 0.5105083585f, 0.5059489012f, 0.5033562183f,
- 0.5018904805f, 0.5010640621f, 0.5000000000f}},
+ {0.5000000000f, 0.4989228845f, 0.4980831146f, 0.4965868294f, 0.4939183295f, 0.4891564250f,
+ 0.4846611917f, 0.4783283472f, 0.4694863856f, 0.4573929608f, 0.4415802360f, 0.4292396307f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4292396307f, 0.4415802360f, 0.4573929608f, 0.4694863856f, 0.4783283472f,
+ 0.4846611917f, 0.4891563654f, 0.4939182699f, 0.4965868294f, 0.4980831146f, 0.4989228845f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4989907742f, 0.4982040823f, 0.4968025982f, 0.4943036735f, 0.4898466468f,
+ 0.4856418371f, 0.4797225595f, 0.4714670181f, 0.4601936638f, 0.4454868436f, 0.4340381622f,
+ 0.4221174419f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4221173823f, 0.4340381622f, 0.4454868436f, 0.4601936638f, 0.4714670181f, 0.4797225595f,
+ 0.4856418371f, 0.4898466468f, 0.4943036735f, 0.4968025386f, 0.4982040823f, 0.4989907742f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4990940988f, 0.4983880222f, 0.4971305132f, 0.4948891699f, 0.4908945858f,
+ 0.4871295691f, 0.4818353653f, 0.4744636118f, 0.4644210041f, 0.4513638020f, 0.4412364364f,
+ 0.4307287931f, 0.4211447835f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4211447835f,
+ 0.4307287633f, 0.4412364364f, 0.4513638616f, 0.4644210041f, 0.4744636118f, 0.4818353653f,
+ 0.4871295691f, 0.4908945858f, 0.4948891699f, 0.4971305132f, 0.4983880222f, 0.4990940988f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4993529916f, 0.4988489449f, 0.4979517758f, 0.4963543117f, 0.4935124516f,
+ 0.4908400774f, 0.4870927036f, 0.4818954766f, 0.4748552144f, 0.4657738209f, 0.4587891996f,
+ 0.4515995383f, 0.4450951517f, 0.4404549301f, 0.4387589693f, 0.4404549301f, 0.4450951517f,
+ 0.4515995383f, 0.4587891996f, 0.4657738209f, 0.4748552144f, 0.4818954766f, 0.4870927036f,
+ 0.4908400774f, 0.4935124516f, 0.4963543117f, 0.4979517758f, 0.4988490045f, 0.4993529916f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4996043146f, 0.4992960989f, 0.4987479150f, 0.4977727532f, 0.4960409999f,
+ 0.4944161773f, 0.4921435714f, 0.4890033603f, 0.4847714305f, 0.4793508947f, 0.4752120376f,
+ 0.4709798396f, 0.4671763778f, 0.4644779861f, 0.4634948969f, 0.4644779861f, 0.4671763778f,
+ 0.4709798396f, 0.4752120376f, 0.4793508947f, 0.4847714305f, 0.4890033603f, 0.4921435714f,
+ 0.4944161773f, 0.4960409999f, 0.4977727532f, 0.4987478554f, 0.4992960989f, 0.4996043146f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5006332994f, 0.5011256337f, 0.5019994974f, 0.5035477281f, 0.5062782168f,
+ 0.5088182092f, 0.5123358369f, 0.5171306729f, 0.5234752297f, 0.5314123034f, 0.5373347998f,
+ 0.5432717800f, 0.5485079288f, 0.5521671772f, 0.5534890294f, 0.5521672368f, 0.5485079288f,
+ 0.5432717800f, 0.5373347998f, 0.5314123631f, 0.5234752297f, 0.5171306729f, 0.5123357773f,
+ 0.5088182092f, 0.5062782168f, 0.5035477281f, 0.5019994974f, 0.5011256337f, 0.5006333590f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5010640621f, 0.5018905401f, 0.5033562183f, 0.5059488416f, 0.5105082989f,
+ 0.5147353411f, 0.5205669403f, 0.5284758806f, 0.5388726592f, 0.5517760515f, 0.5613339543f,
+ 0.5708582401f, 0.5792131424f, 0.5850278735f, 0.5871236920f, 0.5850278735f, 0.5792131424f,
+ 0.5708582401f, 0.5613339543f, 0.5517760515f, 0.5388726592f, 0.5284758210f, 0.5205669403f,
+ 0.5147353411f, 0.5105083585f, 0.5059489012f, 0.5033562183f, 0.5018904805f, 0.5010640621f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f}},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5010747910f, 0.5019095540f, 0.5033900142f,
- 0.5060086250f, 0.5106133819f, 0.5148820281f, 0.5207706094f,
- 0.5287556648f, 0.5392510295f, 0.5522742867f, 0.5619193316f,
- 0.5715291500f, 0.5799580812f, 0.5858238339f, 0.5879378319f,
- 0.5858238339f, 0.5799580812f, 0.5715291500f, 0.5619193316f,
- 0.5522742867f, 0.5392510295f, 0.5287556648f, 0.5207706094f,
- 0.5148820281f, 0.5106133819f, 0.5060086250f, 0.5033900142f,
- 0.5019095540f, 0.5010747910f, 0.5000000000f},
- {0.5000000000f, 0.5010071397f, 0.5017895103f, 0.5031771064f,
- 0.5056321621f, 0.5099512339f, 0.5139572024f, 0.5194865465f,
- 0.5269903541f, 0.5368629098f, 0.5491278768f, 0.5582211614f,
- 0.5672890544f, 0.5752488375f, 0.5807913542f, 0.5827894807f,
- 0.5807913542f, 0.5752488375f, 0.5672890544f, 0.5582211614f,
- 0.5491278768f, 0.5368629694f, 0.5269903541f, 0.5194864869f,
- 0.5139572024f, 0.5099512339f, 0.5056321621f, 0.5031771660f,
- 0.5017895103f, 0.5010071397f, 0.5000000000f},
- {0.5000000000f, 0.5009042621f, 0.5016067624f, 0.5028531551f,
- 0.5050591230f, 0.5089425445f, 0.5125473738f, 0.5175274611f,
- 0.5242940784f, 0.5332102180f, 0.5443075895f, 0.5525490046f,
- 0.5607786775f, 0.5680115223f, 0.5730525255f, 0.5748708248f,
- 0.5730525255f, 0.5680115223f, 0.5607786775f, 0.5525490046f,
- 0.5443075895f, 0.5332102180f, 0.5242940187f, 0.5175274611f,
- 0.5125473142f, 0.5089425445f, 0.5050591230f, 0.5028531551f,
- 0.5016067624f, 0.5009042621f, 0.5000000000f},
- {0.5000000000f, 0.5006461143f, 0.5011484027f, 0.5020399094f,
- 0.5036193132f, 0.5064044595f, 0.5089951158f, 0.5125823617f,
- 0.5174714923f, 0.5239394307f, 0.5320289135f, 0.5380636454f,
- 0.5441119671f, 0.5494454503f, 0.5531721711f, 0.5545183420f,
- 0.5531721711f, 0.5494454503f, 0.5441119671f, 0.5380636454f,
- 0.5320289135f, 0.5239394307f, 0.5174714923f, 0.5125823617f,
- 0.5089950562f, 0.5064044595f, 0.5036192536f, 0.5020399094f,
- 0.5011484027f, 0.5006461143f, 0.5000000000f},
- {0.5000000000f, 0.5003954172f, 0.5007029176f, 0.5012489557f,
- 0.5022173524f, 0.5039278865f, 0.5055221915f, 0.5077348351f,
- 0.5107599497f, 0.5147782564f, 0.5198295116f, 0.5236158371f,
- 0.5274258256f, 0.5307977200f, 0.5331605673f, 0.5340154171f,
- 0.5331605673f, 0.5307977200f, 0.5274258256f, 0.5236158371f,
- 0.5198295116f, 0.5147782564f, 0.5107599497f, 0.5077348351f,
- 0.5055221915f, 0.5039278865f, 0.5022173524f, 0.5012489557f,
- 0.5007029176f, 0.5003954172f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4993658364f, 0.4988718629f, 0.4979924560f,
- 0.4964269102f, 0.4936419725f, 0.4910234213f, 0.4873520732f,
- 0.4822612107f, 0.4753669202f, 0.4664771259f, 0.4596425593f,
- 0.4526099563f, 0.4462499917f, 0.4417140782f, 0.4400566518f,
- 0.4417141378f, 0.4462499917f, 0.4526099563f, 0.4596425593f,
- 0.4664771259f, 0.4753669202f, 0.4822612107f, 0.4873520732f,
- 0.4910234213f, 0.4936419725f, 0.4964269102f, 0.4979925156f,
- 0.4988718629f, 0.4993658364f, 0.5000000000f},
- {0.5000000000f, 0.4989336729f, 0.4981023371f, 0.4966210425f,
- 0.4939794540f, 0.4892660379f, 0.4848169982f, 0.4785499275f,
- 0.4698013365f, 0.4578386545f, 0.4422026277f, 0.4300048649f,
- 0.4172779620f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4172779620f, 0.4300048649f,
- 0.4422026277f, 0.4578386545f, 0.4698013365f, 0.4785499275f,
- 0.4848169982f, 0.4892660379f, 0.4939795136f, 0.4966210425f,
- 0.4981023371f, 0.4989336729f, 0.5000000000f}},
+ {0.5000000000f, 0.5010747910f, 0.5019095540f, 0.5033900142f, 0.5060086250f, 0.5106133819f,
+ 0.5148820281f, 0.5207706094f, 0.5287556648f, 0.5392510295f, 0.5522742867f, 0.5619193316f,
+ 0.5715291500f, 0.5799580812f, 0.5858238339f, 0.5879378319f, 0.5858238339f, 0.5799580812f,
+ 0.5715291500f, 0.5619193316f, 0.5522742867f, 0.5392510295f, 0.5287556648f, 0.5207706094f,
+ 0.5148820281f, 0.5106133819f, 0.5060086250f, 0.5033900142f, 0.5019095540f, 0.5010747910f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5010071397f, 0.5017895103f, 0.5031771064f, 0.5056321621f, 0.5099512339f,
+ 0.5139572024f, 0.5194865465f, 0.5269903541f, 0.5368629098f, 0.5491278768f, 0.5582211614f,
+ 0.5672890544f, 0.5752488375f, 0.5807913542f, 0.5827894807f, 0.5807913542f, 0.5752488375f,
+ 0.5672890544f, 0.5582211614f, 0.5491278768f, 0.5368629694f, 0.5269903541f, 0.5194864869f,
+ 0.5139572024f, 0.5099512339f, 0.5056321621f, 0.5031771660f, 0.5017895103f, 0.5010071397f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5009042621f, 0.5016067624f, 0.5028531551f, 0.5050591230f, 0.5089425445f,
+ 0.5125473738f, 0.5175274611f, 0.5242940784f, 0.5332102180f, 0.5443075895f, 0.5525490046f,
+ 0.5607786775f, 0.5680115223f, 0.5730525255f, 0.5748708248f, 0.5730525255f, 0.5680115223f,
+ 0.5607786775f, 0.5525490046f, 0.5443075895f, 0.5332102180f, 0.5242940187f, 0.5175274611f,
+ 0.5125473142f, 0.5089425445f, 0.5050591230f, 0.5028531551f, 0.5016067624f, 0.5009042621f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5006461143f, 0.5011484027f, 0.5020399094f, 0.5036193132f, 0.5064044595f,
+ 0.5089951158f, 0.5125823617f, 0.5174714923f, 0.5239394307f, 0.5320289135f, 0.5380636454f,
+ 0.5441119671f, 0.5494454503f, 0.5531721711f, 0.5545183420f, 0.5531721711f, 0.5494454503f,
+ 0.5441119671f, 0.5380636454f, 0.5320289135f, 0.5239394307f, 0.5174714923f, 0.5125823617f,
+ 0.5089950562f, 0.5064044595f, 0.5036192536f, 0.5020399094f, 0.5011484027f, 0.5006461143f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5003954172f, 0.5007029176f, 0.5012489557f, 0.5022173524f, 0.5039278865f,
+ 0.5055221915f, 0.5077348351f, 0.5107599497f, 0.5147782564f, 0.5198295116f, 0.5236158371f,
+ 0.5274258256f, 0.5307977200f, 0.5331605673f, 0.5340154171f, 0.5331605673f, 0.5307977200f,
+ 0.5274258256f, 0.5236158371f, 0.5198295116f, 0.5147782564f, 0.5107599497f, 0.5077348351f,
+ 0.5055221915f, 0.5039278865f, 0.5022173524f, 0.5012489557f, 0.5007029176f, 0.5003954172f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4993658364f, 0.4988718629f, 0.4979924560f, 0.4964269102f, 0.4936419725f,
+ 0.4910234213f, 0.4873520732f, 0.4822612107f, 0.4753669202f, 0.4664771259f, 0.4596425593f,
+ 0.4526099563f, 0.4462499917f, 0.4417140782f, 0.4400566518f, 0.4417141378f, 0.4462499917f,
+ 0.4526099563f, 0.4596425593f, 0.4664771259f, 0.4753669202f, 0.4822612107f, 0.4873520732f,
+ 0.4910234213f, 0.4936419725f, 0.4964269102f, 0.4979925156f, 0.4988718629f, 0.4993658364f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4989336729f, 0.4981023371f, 0.4966210425f, 0.4939794540f, 0.4892660379f,
+ 0.4848169982f, 0.4785499275f, 0.4698013365f, 0.4578386545f, 0.4422026277f, 0.4300048649f,
+ 0.4172779620f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4172779620f, 0.4300048649f, 0.4422026277f, 0.4578386545f, 0.4698013365f, 0.4785499275f,
+ 0.4848169982f, 0.4892660379f, 0.4939795136f, 0.4966210425f, 0.4981023371f, 0.4989336729f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5019841790f, 0.5035227537f, 0.5062461495f,
- 0.5110471249f, 0.5194411278f, 0.5271694660f, 0.5377510190f,
- 0.5519614220f, 0.5704149008f, 0.5929919481f, 0.6095048785f,
- 0.6257974505f, 0.6399660110f, 0.6497628093f, 0.6532814503f,
- 0.6497628689f, 0.6399659514f, 0.6257974505f, 0.6095049381f,
- 0.5929919481f, 0.5704149008f, 0.5519614220f, 0.5377510190f,
- 0.5271694660f, 0.5194411278f, 0.5110471249f, 0.5062461495f,
- 0.5035227537f, 0.5019841790f, 0.5000000596f},
- {0.5000000000f, 0.5018594265f, 0.5033015609f, 0.5058549047f,
- 0.5103582144f, 0.5182378888f, 0.5254992843f, 0.5354512334f,
- 0.5488330722f, 0.5662372708f, 0.5875679851f, 0.6031931639f,
- 0.6186277270f, 0.6320636272f, 0.6413608193f, 0.6447013021f,
- 0.6413607597f, 0.6320636272f, 0.6186277270f, 0.6031931639f,
- 0.5875679851f, 0.5662372708f, 0.5488330722f, 0.5354512334f,
- 0.5254992843f, 0.5182378888f, 0.5103582144f, 0.5058549047f,
- 0.5033015609f, 0.5018594265f, 0.5000000596f},
- {0.5000000000f, 0.5016695857f, 0.5029649734f, 0.5052592754f,
- 0.5093086362f, 0.5164023638f, 0.5229486823f, 0.5319343805f,
- 0.5440405011f, 0.5598235130f, 0.5792210698f, 0.5934645534f,
- 0.6075606942f, 0.6198513508f, 0.6283662915f, 0.6314277649f,
- 0.6283662915f, 0.6198513508f, 0.6075606942f, 0.5934646130f,
- 0.5792211294f, 0.5598235130f, 0.5440405011f, 0.5319343805f,
- 0.5229486823f, 0.5164023638f, 0.5093086362f, 0.5052592754f,
- 0.5029649138f, 0.5016695857f, 0.5000000596f},
- {0.5000000000f, 0.5011932850f, 0.5021198988f, 0.5037627220f,
- 0.5066673160f, 0.5117711425f, 0.5164980888f, 0.5230121613f,
- 0.5318337679f, 0.5434088707f, 0.5577428937f, 0.5683392882f,
- 0.5788815022f, 0.5881162286f, 0.5945363641f, 0.5968489647f,
- 0.5945363045f, 0.5881162286f, 0.5788815022f, 0.5683392882f,
- 0.5577428937f, 0.5434088707f, 0.5318337679f, 0.5230121613f,
- 0.5164980888f, 0.5117711425f, 0.5066673160f, 0.5037627220f,
- 0.5021198392f, 0.5011932850f, 0.5000000000f},
- {0.5000000000f, 0.5007303953f, 0.5012979507f, 0.5023053885f,
- 0.5040895343f, 0.5072339177f, 0.5101568103f, 0.5142010450f,
- 0.5197073221f, 0.5269821882f, 0.5360659957f, 0.5428322554f,
- 0.5496053696f, 0.5555711985f, 0.5597361326f, 0.5612398386f,
- 0.5597361326f, 0.5555711985f, 0.5496053696f, 0.5428322554f,
- 0.5360659957f, 0.5269821286f, 0.5197073221f, 0.5142010450f,
- 0.5101568103f, 0.5072339773f, 0.5040895343f, 0.5023053885f,
- 0.5012980103f, 0.5007303953f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4988276362f, 0.4979133904f, 0.4962842464f,
- 0.4933774769f, 0.4881869853f, 0.4832829535f, 0.4763666987f,
- 0.4666952491f, 0.4534371495f, 0.4360439777f, 0.4224200845f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4224200845f,
- 0.4360440373f, 0.4534371495f, 0.4666952491f, 0.4763666987f,
- 0.4832829535f, 0.4881869853f, 0.4933775365f, 0.4962842464f,
- 0.4979134500f, 0.4988276362f, 0.5000000000f},
- {0.5000000000f, 0.4980278611f, 0.4964878559f, 0.4937384725f,
- 0.4888174534f, 0.4799782038f, 0.4715627432f, 0.4595820010f,
- 0.4425892234f, 0.4187846780f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4187846780f, 0.4425892234f, 0.4595820010f,
- 0.4715627432f, 0.4799782038f, 0.4888175130f, 0.4937384725f,
- 0.4964878559f, 0.4980278611f, 0.5000000000f}},
+ {0.5000000000f, 0.5019841790f, 0.5035227537f, 0.5062461495f, 0.5110471249f, 0.5194411278f,
+ 0.5271694660f, 0.5377510190f, 0.5519614220f, 0.5704149008f, 0.5929919481f, 0.6095048785f,
+ 0.6257974505f, 0.6399660110f, 0.6497628093f, 0.6532814503f, 0.6497628689f, 0.6399659514f,
+ 0.6257974505f, 0.6095049381f, 0.5929919481f, 0.5704149008f, 0.5519614220f, 0.5377510190f,
+ 0.5271694660f, 0.5194411278f, 0.5110471249f, 0.5062461495f, 0.5035227537f, 0.5019841790f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5018594265f, 0.5033015609f, 0.5058549047f, 0.5103582144f, 0.5182378888f,
+ 0.5254992843f, 0.5354512334f, 0.5488330722f, 0.5662372708f, 0.5875679851f, 0.6031931639f,
+ 0.6186277270f, 0.6320636272f, 0.6413608193f, 0.6447013021f, 0.6413607597f, 0.6320636272f,
+ 0.6186277270f, 0.6031931639f, 0.5875679851f, 0.5662372708f, 0.5488330722f, 0.5354512334f,
+ 0.5254992843f, 0.5182378888f, 0.5103582144f, 0.5058549047f, 0.5033015609f, 0.5018594265f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5016695857f, 0.5029649734f, 0.5052592754f, 0.5093086362f, 0.5164023638f,
+ 0.5229486823f, 0.5319343805f, 0.5440405011f, 0.5598235130f, 0.5792210698f, 0.5934645534f,
+ 0.6075606942f, 0.6198513508f, 0.6283662915f, 0.6314277649f, 0.6283662915f, 0.6198513508f,
+ 0.6075606942f, 0.5934646130f, 0.5792211294f, 0.5598235130f, 0.5440405011f, 0.5319343805f,
+ 0.5229486823f, 0.5164023638f, 0.5093086362f, 0.5052592754f, 0.5029649138f, 0.5016695857f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5011932850f, 0.5021198988f, 0.5037627220f, 0.5066673160f, 0.5117711425f,
+ 0.5164980888f, 0.5230121613f, 0.5318337679f, 0.5434088707f, 0.5577428937f, 0.5683392882f,
+ 0.5788815022f, 0.5881162286f, 0.5945363641f, 0.5968489647f, 0.5945363045f, 0.5881162286f,
+ 0.5788815022f, 0.5683392882f, 0.5577428937f, 0.5434088707f, 0.5318337679f, 0.5230121613f,
+ 0.5164980888f, 0.5117711425f, 0.5066673160f, 0.5037627220f, 0.5021198392f, 0.5011932850f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5007303953f, 0.5012979507f, 0.5023053885f, 0.5040895343f, 0.5072339177f,
+ 0.5101568103f, 0.5142010450f, 0.5197073221f, 0.5269821882f, 0.5360659957f, 0.5428322554f,
+ 0.5496053696f, 0.5555711985f, 0.5597361326f, 0.5612398386f, 0.5597361326f, 0.5555711985f,
+ 0.5496053696f, 0.5428322554f, 0.5360659957f, 0.5269821286f, 0.5197073221f, 0.5142010450f,
+ 0.5101568103f, 0.5072339773f, 0.5040895343f, 0.5023053885f, 0.5012980103f, 0.5007303953f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4988276362f, 0.4979133904f, 0.4962842464f, 0.4933774769f, 0.4881869853f,
+ 0.4832829535f, 0.4763666987f, 0.4666952491f, 0.4534371495f, 0.4360439777f, 0.4224200845f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4224200845f, 0.4360440373f, 0.4534371495f, 0.4666952491f, 0.4763666987f,
+ 0.4832829535f, 0.4881869853f, 0.4933775365f, 0.4962842464f, 0.4979134500f, 0.4988276362f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4980278611f, 0.4964878559f, 0.4937384725f, 0.4888174534f, 0.4799782038f,
+ 0.4715627432f, 0.4595820010f, 0.4425892234f, 0.4187846780f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4187846780f, 0.4425892234f, 0.4595820010f,
+ 0.4715627432f, 0.4799782038f, 0.4888175130f, 0.4937384725f, 0.4964878559f, 0.4980278611f,
+ 0.5000000000f}},
{
- {0.5000000000f, 0.5025908947f, 0.5045977831f, 0.5081456304f,
- 0.5143862367f, 0.5252569914f, 0.5352224708f, 0.5488042235f,
- 0.5669378638f, 0.5903217196f, 0.6187070012f, 0.6393297315f,
- 0.6595746279f, 0.6771045923f, 0.6891874671f, 0.6935199499f,
- 0.6891874671f, 0.6771046519f, 0.6595746279f, 0.6393297315f,
- 0.6187070012f, 0.5903217793f, 0.5669378638f, 0.5488042235f,
- 0.5352224708f, 0.5252569914f, 0.5143862367f, 0.5081456304f,
- 0.5045977831f, 0.5025908947f, 0.5000000596f},
- {0.5000000000f, 0.5024280548f, 0.5043093562f, 0.5076363087f,
- 0.5134918094f, 0.5237017274f, 0.5330721736f, 0.5458583832f,
- 0.5629557371f, 0.5850431919f, 0.6119084954f, 0.6314600110f,
- 0.6506775022f, 0.6673357487f, 0.6788267493f, 0.6829485893f,
- 0.6788267493f, 0.6673356891f, 0.6506775618f, 0.6314600110f,
- 0.6119084954f, 0.5850431919f, 0.5629557967f, 0.5458583832f,
- 0.5330721736f, 0.5237017274f, 0.5134918094f, 0.5076363087f,
- 0.5043093562f, 0.5024280548f, 0.5000000596f},
- {0.5000000000f, 0.5021802783f, 0.5038703680f, 0.5068606734f,
- 0.5121284127f, 0.5213274360f, 0.5297849178f, 0.5413471460f,
- 0.5568445921f, 0.5769221783f, 0.6014210582f, 0.6192988753f,
- 0.6369072795f, 0.6521973014f, 0.6627579927f, 0.6665487289f,
- 0.6627580523f, 0.6521973014f, 0.6369072795f, 0.6192988753f,
- 0.6014210582f, 0.5769221783f, 0.5568445921f, 0.5413471460f,
- 0.5297849178f, 0.5213274360f, 0.5121284127f, 0.5068606734f,
- 0.5038703680f, 0.5021802783f, 0.5000000596f},
- {0.5000000000f, 0.5015584826f, 0.5027679205f, 0.5049106479f,
- 0.5086937547f, 0.5153259039f, 0.5214512348f, 0.5298667550f,
- 0.5412179232f, 0.5560381413f, 0.5742831826f, 0.5877002478f,
- 0.6009937525f, 0.6125962734f, 0.6206405163f, 0.6235337853f,
- 0.6206405163f, 0.6125962138f, 0.6009937525f, 0.5877002478f,
- 0.5742831826f, 0.5560382009f, 0.5412179232f, 0.5298667550f,
- 0.5214512944f, 0.5153258443f, 0.5086938143f, 0.5049106479f,
- 0.5027679205f, 0.5015585423f, 0.5000000596f},
- {0.5000000000f, 0.5009540319f, 0.5016952753f, 0.5030100346f,
- 0.5053365231f, 0.5094310641f, 0.5132302642f, 0.5184766650f,
- 0.5256009102f, 0.5349814296f, 0.5466461182f, 0.5553017855f,
- 0.5639393926f, 0.5715261102f, 0.5768113732f, 0.5787173510f,
- 0.5768114328f, 0.5715261102f, 0.5639393926f, 0.5553017855f,
- 0.5466461182f, 0.5349814296f, 0.5256009102f, 0.5184766650f,
- 0.5132302642f, 0.5094310641f, 0.5053365827f, 0.5030099750f,
- 0.5016952157f, 0.5009540319f, 0.5000000000f},
- {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
- 0.5000000000f, 0.5000000000f, 0.5000000000f},
- {0.5000000000f, 0.4984676838f, 0.4972720146f, 0.4951395094f,
- 0.4913294315f, 0.4845078886f, 0.4780410528f, 0.4688831270f,
- 0.4559983313f, 0.4381728470f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4381728172f, 0.4559983313f, 0.4688831270f,
- 0.4780410528f, 0.4845078886f, 0.4913294315f, 0.4951395094f,
- 0.4972720146f, 0.4984676838f, 0.5000000000f},
- {0.5000000000f, 0.4974217415f, 0.4954061210f, 0.4918029308f,
- 0.4853377044f, 0.4736708105f, 0.4624948800f, 0.4464591146f,
- 0.4234331250f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
- 0.4166666567f, 0.4166666567f, 0.4234331250f, 0.4464591146f,
- 0.4624948800f, 0.4736708105f, 0.4853377044f, 0.4918029308f,
- 0.4954061210f, 0.4974217415f, 0.5000000000f}}};
+ {0.5000000000f, 0.5025908947f, 0.5045977831f, 0.5081456304f, 0.5143862367f, 0.5252569914f,
+ 0.5352224708f, 0.5488042235f, 0.5669378638f, 0.5903217196f, 0.6187070012f, 0.6393297315f,
+ 0.6595746279f, 0.6771045923f, 0.6891874671f, 0.6935199499f, 0.6891874671f, 0.6771046519f,
+ 0.6595746279f, 0.6393297315f, 0.6187070012f, 0.5903217793f, 0.5669378638f, 0.5488042235f,
+ 0.5352224708f, 0.5252569914f, 0.5143862367f, 0.5081456304f, 0.5045977831f, 0.5025908947f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5024280548f, 0.5043093562f, 0.5076363087f, 0.5134918094f, 0.5237017274f,
+ 0.5330721736f, 0.5458583832f, 0.5629557371f, 0.5850431919f, 0.6119084954f, 0.6314600110f,
+ 0.6506775022f, 0.6673357487f, 0.6788267493f, 0.6829485893f, 0.6788267493f, 0.6673356891f,
+ 0.6506775618f, 0.6314600110f, 0.6119084954f, 0.5850431919f, 0.5629557967f, 0.5458583832f,
+ 0.5330721736f, 0.5237017274f, 0.5134918094f, 0.5076363087f, 0.5043093562f, 0.5024280548f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5021802783f, 0.5038703680f, 0.5068606734f, 0.5121284127f, 0.5213274360f,
+ 0.5297849178f, 0.5413471460f, 0.5568445921f, 0.5769221783f, 0.6014210582f, 0.6192988753f,
+ 0.6369072795f, 0.6521973014f, 0.6627579927f, 0.6665487289f, 0.6627580523f, 0.6521973014f,
+ 0.6369072795f, 0.6192988753f, 0.6014210582f, 0.5769221783f, 0.5568445921f, 0.5413471460f,
+ 0.5297849178f, 0.5213274360f, 0.5121284127f, 0.5068606734f, 0.5038703680f, 0.5021802783f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5015584826f, 0.5027679205f, 0.5049106479f, 0.5086937547f, 0.5153259039f,
+ 0.5214512348f, 0.5298667550f, 0.5412179232f, 0.5560381413f, 0.5742831826f, 0.5877002478f,
+ 0.6009937525f, 0.6125962734f, 0.6206405163f, 0.6235337853f, 0.6206405163f, 0.6125962138f,
+ 0.6009937525f, 0.5877002478f, 0.5742831826f, 0.5560382009f, 0.5412179232f, 0.5298667550f,
+ 0.5214512944f, 0.5153258443f, 0.5086938143f, 0.5049106479f, 0.5027679205f, 0.5015585423f,
+ 0.5000000596f},
+ {0.5000000000f, 0.5009540319f, 0.5016952753f, 0.5030100346f, 0.5053365231f, 0.5094310641f,
+ 0.5132302642f, 0.5184766650f, 0.5256009102f, 0.5349814296f, 0.5466461182f, 0.5553017855f,
+ 0.5639393926f, 0.5715261102f, 0.5768113732f, 0.5787173510f, 0.5768114328f, 0.5715261102f,
+ 0.5639393926f, 0.5553017855f, 0.5466461182f, 0.5349814296f, 0.5256009102f, 0.5184766650f,
+ 0.5132302642f, 0.5094310641f, 0.5053365827f, 0.5030099750f, 0.5016952157f, 0.5009540319f,
+ 0.5000000000f},
+ {0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f, 0.5000000000f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4984676838f, 0.4972720146f, 0.4951395094f, 0.4913294315f, 0.4845078886f,
+ 0.4780410528f, 0.4688831270f, 0.4559983313f, 0.4381728470f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4381728172f, 0.4559983313f, 0.4688831270f,
+ 0.4780410528f, 0.4845078886f, 0.4913294315f, 0.4951395094f, 0.4972720146f, 0.4984676838f,
+ 0.5000000000f},
+ {0.5000000000f, 0.4974217415f, 0.4954061210f, 0.4918029308f, 0.4853377044f, 0.4736708105f,
+ 0.4624948800f, 0.4464591146f, 0.4234331250f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f,
+ 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4166666567f, 0.4234331250f, 0.4464591146f,
+ 0.4624948800f, 0.4736708105f, 0.4853377044f, 0.4918029308f, 0.4954061210f, 0.4974217415f,
+ 0.5000000000f}}};
const WORD32 ixheaacd_atan_table_Q28[16][8][31] = {
{
@@ -5096,1764 +4140,4147 @@ const WORD32 ixheaacd_atan_table_Q28[16][8][31] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
{
- {105414360, 104839440, 104395760, 103614856, 102251296, 99903616,
- 97777528, 94910424, 91113928, 86209256, 80075696, 75298264,
- 70016792, 64317196, 58324216, 52191708, 46086824, 40171656,
- 34586568, 29438704, 24797036, 18844526, 14076835, 10372791,
- 7563109, 5470589, 3149178, 1794887, 1017097, 574441,
- 3},
- {105414360, 104839456, 104395808, 103614992, 102251712, 99904768,
- 97779568, 94913880, 91119464, 86217496, 80086976, 75311480,
- 70031656, 64333272, 58341012, 52208712, 46103544, 40187596,
- 34601260, 29451742, 24808156, 18852650, 14082295, 10376209,
- 7565131, 5471733, 3149591, 1795028, 1017143, 574456,
- 3},
- {105414360, 104839480, 104395880, 103615208, 102252344, 99906552,
- 97782736, 94919288, 91128192, 86230640, 80105168, 75332944,
- 70055936, 64359672, 58368684, 52236768, 46131100, 40213788,
- 34625280, 29472930, 24826096, 18865614, 14090922, 10381562,
- 7568273, 5473501, 3150225, 1795244, 1017214, 574479,
- 3},
- {105414360, 104839536, 104396064, 103615760, 102253976, 99911160,
- 97791048, 94933704, 91151936, 86267232, 80157136, 75395312,
- 70127632, 64438612, 58452120, 52321616, 46214224, 40292168,
- 34696284, 29534604, 24877446, 18901780, 14114422, 10395857,
- 7576530, 5478088, 3151847, 1795790, 1017394, 574537,
- 3},
- {105414360, 104839592, 104396240, 103616296, 102255600, 99915856,
- 97799664, 94949000, 91177904, 86308736, 80218568, 75471136,
- 70217072, 64539228, 58560004, 52431916, 46321792, 40392248,
- 34785076, 29609790, 24938336, 18942938, 14140199, 10411065,
- 7585108, 5482768, 3153468, 1796330, 1017569, 574594,
- 3},
- {105414360, 104839680, 104396520, 103617168, 102258248, 99923736,
- 97814472, 94976184, 91226104, 86390216, 80347528, 75638144,
- 70423488, 64780944, 58826448, 52707184, 46587916, 40633420,
- 34990876, 29776224, 25066838, 19024148, 14188262, 10438183,
- 7599892, 5490633, 3156118, 1797198, 1017849, 574683,
- 3},
- {105414360, 104839824, 104396976, 103618608, 102262752, 99937728,
- 97841960, 95029816, 91329816, 86588048, 80716144, 76183448,
- 71203432, 65834132, 60122612, 54107316, 47891724, 41697008,
- 35779764, 30327720, 25439258, 19223604, 14292623, 10492064,
- 7627470, 5504663, 3160627, 1798637, 1018307, 574828,
- 3},
- {105414360, 104839928, 104397288, 103619616, 102266008, 99948384,
- 97863952, 95076024, 91429712, 86814424, 81270904, 77262808,
- 73480384, 71228240, 75154792, 90330880, 64216388, 47491216,
- 38190000, 31457082, 26014456, 19455916, 14394385, 10538885,
- 7649673, 5515393, 3163899, 1799652, 1018625, 574928,
- 3},
+ {105414360, 104839440, 104395760, 103614856, 102251296, 99903616, 97777528, 94910424,
+ 91113928, 86209256, 80075696, 75298264, 70016792, 64317196, 58324216, 52191708,
+ 46086824, 40171656, 34586568, 29438704, 24797036, 18844526, 14076835, 10372791,
+ 7563109, 5470589, 3149178, 1794887, 1017097, 574441, 3},
+ {105414360, 104839456, 104395808, 103614992, 102251712, 99904768, 97779568, 94913880,
+ 91119464, 86217496, 80086976, 75311480, 70031656, 64333272, 58341012, 52208712,
+ 46103544, 40187596, 34601260, 29451742, 24808156, 18852650, 14082295, 10376209,
+ 7565131, 5471733, 3149591, 1795028, 1017143, 574456, 3},
+ {105414360, 104839480, 104395880, 103615208, 102252344, 99906552, 97782736, 94919288,
+ 91128192, 86230640, 80105168, 75332944, 70055936, 64359672, 58368684, 52236768,
+ 46131100, 40213788, 34625280, 29472930, 24826096, 18865614, 14090922, 10381562,
+ 7568273, 5473501, 3150225, 1795244, 1017214, 574479, 3},
+ {105414360, 104839536, 104396064, 103615760, 102253976, 99911160, 97791048, 94933704,
+ 91151936, 86267232, 80157136, 75395312, 70127632, 64438612, 58452120, 52321616,
+ 46214224, 40292168, 34696284, 29534604, 24877446, 18901780, 14114422, 10395857,
+ 7576530, 5478088, 3151847, 1795790, 1017394, 574537, 3},
+ {105414360, 104839592, 104396240, 103616296, 102255600, 99915856, 97799664, 94949000,
+ 91177904, 86308736, 80218568, 75471136, 70217072, 64539228, 58560004, 52431916,
+ 46321792, 40392248, 34785076, 29609790, 24938336, 18942938, 14140199, 10411065,
+ 7585108, 5482768, 3153468, 1796330, 1017569, 574594, 3},
+ {105414360, 104839680, 104396520, 103617168, 102258248, 99923736, 97814472, 94976184,
+ 91226104, 86390216, 80347528, 75638144, 70423488, 64780944, 58826448, 52707184,
+ 46587916, 40633420, 34990876, 29776224, 25066838, 19024148, 14188262, 10438183,
+ 7599892, 5490633, 3156118, 1797198, 1017849, 574683, 3},
+ {105414360, 104839824, 104396976, 103618608, 102262752, 99937728, 97841960, 95029816,
+ 91329816, 86588048, 80716144, 76183448, 71203432, 65834132, 60122612, 54107316,
+ 47891724, 41697008, 35779764, 30327720, 25439258, 19223604, 14292623, 10492064,
+ 7627470, 5504663, 3160627, 1798637, 1018307, 574828, 3},
+ {105414360, 104839928, 104397288, 103619616, 102266008, 99948384, 97863952, 95076024,
+ 91429712, 86814424, 81270904, 77262808, 73480384, 71228240, 75154792, 90330880,
+ 64216388, 47491216, 38190000, 31457082, 26014456, 19455916, 14394385, 10538885,
+ 7649673, 5515393, 3163899, 1799652, 1018625, 574928, 3},
},
{
- {210828704, 209763824, 208938560, 207478752, 204908032, 200419760,
- 196290896, 190633616, 183000672, 172937648, 160110704, 149997200,
- 138756608, 126624216, 113938336, 101099072, 88510592, 76526288,
- 65413280, 55341428, 46391316, 35074004, 26116856, 19208962,
- 13991278, 10114556, 5820107, 3316738, 1879389, 1061436,
- 6},
- {210828704, 209763936, 208938896, 207479776, 204911072, 200428368,
- 196306384, 190660432, 183044720, 173005232, 160205968, 150110720,
- 138885968, 126765280, 114085952, 101247824, 88655264, 76662112,
- 65536160, 55448352, 46480712, 35137556, 26158596, 19234612,
- 14006231, 10122925, 5823092, 3317749, 1879722, 1061544,
- 6},
- {210828704, 209764096, 208939392, 207481328, 204915728, 200441616,
- 196330368, 190702240, 183113968, 173112496, 160358752, 150294096,
- 139096288, 126995848, 114328120, 101492232, 88892824, 76884520,
- 65736460, 55621620, 46624620, 35238800, 26224436, 19274734,
- 14029455, 10135852, 5827674, 3319296, 1880230, 1061707,
- 6},
- {210828704, 209764512, 208940688, 207485280, 204927584, 200475808,
- 196392960, 190812912, 183300576, 173407904, 160790096, 150820544,
- 139709584, 127677032, 115050024, 102223720, 89602656, 77544544,
- 66324264, 56122904, 47034384, 35520108, 26403298, 19381644,
- 14090386, 10169363, 5839388, 3323218, 1881511, 1062120,
- 6},
- {210828704, 209764912, 208941952, 207489168, 204939376, 200510416,
- 196457296, 190929072, 183501872, 173737520, 161290464, 151447920,
- 140459456, 128528208, 115965984, 103158064, 90506880, 78375576,
- 67050572, 56727860, 47516240, 35838300, 26598646, 19495050,
- 14153544, 10203491, 5851081, 3327087, 1882766, 1062523,
- 6},
- {210828704, 209765552, 208943952, 207495408, 204958528, 200567968,
- 196566624, 191132320, 183868128, 174368352, 162309120, 152784192,
- 142129632, 130500344, 118149712, 105414360, 92679000, 80328360,
- 68699080, 58044528, 48519584, 36460364, 26960592, 19696396,
- 14262089, 10260740, 5870181, 3333310, 1884767, 1063161,
- 6},
- {210828704, 209766592, 208947200, 207505680, 204990800, 200668800,
- 196765424, 191522096, 184625504, 175818192, 165011728, 156772288,
- 147807440, 138128784, 127521456, 115591336, 102270680, 88260824,
- 74642472, 62217964, 51336324, 37958764, 27737034, 20093352,
- 14463533, 10362519, 5902623, 3343611, 1888032, 1064195,
- 6},
- {210828704, 209767296, 208949456, 207512880, 205013952, 200744336,
- 196920864, 191846656, 185318832, 177353312, 168608176, 163416640,
- 160727504, 165029712, 189073968, 241456736, 178005808, 122049624,
- 90479408, 70104040, 55475472, 39658732, 28482874, 20435210,
- 14624799, 10440064, 5926123, 3350871, 1890298, 1064906,
- 6},
+ {210828704, 209763824, 208938560, 207478752, 204908032, 200419760, 196290896, 190633616,
+ 183000672, 172937648, 160110704, 149997200, 138756608, 126624216, 113938336, 101099072,
+ 88510592, 76526288, 65413280, 55341428, 46391316, 35074004, 26116856, 19208962,
+ 13991278, 10114556, 5820107, 3316738, 1879389, 1061436, 6},
+ {210828704, 209763936, 208938896, 207479776, 204911072, 200428368, 196306384, 190660432,
+ 183044720, 173005232, 160205968, 150110720, 138885968, 126765280, 114085952, 101247824,
+ 88655264, 76662112, 65536160, 55448352, 46480712, 35137556, 26158596, 19234612,
+ 14006231, 10122925, 5823092, 3317749, 1879722, 1061544, 6},
+ {210828704, 209764096, 208939392, 207481328, 204915728, 200441616, 196330368, 190702240,
+ 183113968, 173112496, 160358752, 150294096, 139096288, 126995848, 114328120, 101492232,
+ 88892824, 76884520, 65736460, 55621620, 46624620, 35238800, 26224436, 19274734,
+ 14029455, 10135852, 5827674, 3319296, 1880230, 1061707, 6},
+ {210828704, 209764512, 208940688, 207485280, 204927584, 200475808, 196392960, 190812912,
+ 183300576, 173407904, 160790096, 150820544, 139709584, 127677032, 115050024, 102223720,
+ 89602656, 77544544, 66324264, 56122904, 47034384, 35520108, 26403298, 19381644,
+ 14090386, 10169363, 5839388, 3323218, 1881511, 1062120, 6},
+ {210828704, 209764912, 208941952, 207489168, 204939376, 200510416, 196457296, 190929072,
+ 183501872, 173737520, 161290464, 151447920, 140459456, 128528208, 115965984, 103158064,
+ 90506880, 78375576, 67050572, 56727860, 47516240, 35838300, 26598646, 19495050,
+ 14153544, 10203491, 5851081, 3327087, 1882766, 1062523, 6},
+ {210828704, 209765552, 208943952, 207495408, 204958528, 200567968, 196566624, 191132320,
+ 183868128, 174368352, 162309120, 152784192, 142129632, 130500344, 118149712, 105414360,
+ 92679000, 80328360, 68699080, 58044528, 48519584, 36460364, 26960592, 19696396,
+ 14262089, 10260740, 5870181, 3333310, 1884767, 1063161, 6},
+ {210828704, 209766592, 208947200, 207505680, 204990800, 200668800, 196765424, 191522096,
+ 184625504, 175818192, 165011728, 156772288, 147807440, 138128784, 127521456, 115591336,
+ 102270680, 88260824, 74642472, 62217964, 51336324, 37958764, 27737034, 20093352,
+ 14463533, 10362519, 5902623, 3343611, 1888032, 1064195, 6},
+ {210828704, 209767296, 208949456, 207512880, 205013952, 200744336, 196920864, 191846656,
+ 185318832, 177353312, 168608176, 163416640, 160727504, 165029712, 189073968, 241456736,
+ 178005808, 122049624, 90479408, 70104040, 55475472, 39658732, 28482874, 20435210,
+ 14624799, 10440064, 5926123, 3350871, 1890298, 1064906, 6},
},
{
- {316243072, 314846656, 313757568, 311816384, 308352896, 302171040,
- 296337664, 288127488, 276678912, 261007920, 240267568, 223492192,
- 204621200, 184231600, 163158624, 142328864, 122556352, 104403376,
- 88154704, 73876200, 61498028, 46182704, 34260640, 25149108,
- 18299352, 13222145, 7605578, 4333750, 2455581, 1386840,
- 8},
- {316243072, 314846976, 313758496, 311819264, 308361632, 302196576,
- 296384960, 288212480, 276825088, 261244544, 240620416, 223927248,
- 205130368, 184795488, 163749776, 142917424, 123115312, 104911608,
- 88598136, 74247992, 61798064, 46386176, 34389240, 25225820,
- 18343072, 13246210, 7614005, 4336575, 2456504, 1387138,
- 8},
- {316243072, 314847424, 313759936, 311823680, 308374976, 302235808,
- 296457920, 288344224, 277053216, 261616816, 241180800, 224622832,
- 205949680, 185708032, 164710624, 143876432, 124026392, 105738528,
- 89317024, 74847744, 62279204, 46709404, 34591704, 25345632,
- 18410910, 13283357, 7626934, 4340894, 2457913, 1387591,
- 8},
- {316243072, 314848576, 313763520, 311834784, 308408896, 302336352,
- 296646528, 288688608, 277658208, 262622336, 242727504, 226572640,
- 208281664, 188341088, 167512304, 146689696, 126701240, 108155720,
- 91400008, 76564704, 63637504, 47602004, 35139296, 25663918,
- 18588502, 13379501, 7659962, 4351840, 2461468, 1388732,
- 8},
- {316243072, 314849696, 313767008, 311845696, 308442400, 302437088,
- 296837792, 289043680, 278295680, 263711664, 244460352, 228811376,
- 211025776, 191509408, 170942688, 150169152, 130013904, 111127336,
- 93923424, 78603792, 65214388, 48602512, 35733560, 26000040,
- 18772012, 13477197, 7692890, 4362631, 2464949, 1389845,
- 8},
- {316243072, 314851456, 313772576, 311863104, 308496480, 302602432,
- 297156960, 289649728, 279417792, 265709120, 247806384, 233308320,
- 216768720, 198401536, 178640624, 158121536, 137602432, 117841520,
- 99474352, 82934752, 68436688, 50533952, 36825288, 26593334,
- 19086120, 13640627, 7746590, 4379971, 2470496, 1391611,
- 8},
- {316243072, 314854304, 313781600, 311891584, 308586432, 302885824,
- 297719616, 290762432, 281600928, 269929056, 255733744, 245043360,
- 233506176, 220942800, 206510464, 188780448, 167001392, 142516720,
- 118085768, 95972968, 77157136, 55082256, 39133424, 27751766,
- 19665234, 13929855, 7837575, 4408639, 2479541, 1394467,
- 8},
- {316243072, 314856256, 313787808, 311911392, 308650144, 303093152,
- 298144768, 291644096, 283459968, 273946560, 264748512, 260980608,
- 262699168, 277087168, 321151200, 394123840, 324055360, 228764272,
- 162653280, 119096696, 89459480, 60122168, 41317836, 28739580,
- 20125738, 14149189, 7903307, 4428811, 2485814, 1396432,
- 8},
+ {316243072, 314846656, 313757568, 311816384, 308352896, 302171040, 296337664, 288127488,
+ 276678912, 261007920, 240267568, 223492192, 204621200, 184231600, 163158624, 142328864,
+ 122556352, 104403376, 88154704, 73876200, 61498028, 46182704, 34260640, 25149108,
+ 18299352, 13222145, 7605578, 4333750, 2455581, 1386840, 8},
+ {316243072, 314846976, 313758496, 311819264, 308361632, 302196576, 296384960, 288212480,
+ 276825088, 261244544, 240620416, 223927248, 205130368, 184795488, 163749776, 142917424,
+ 123115312, 104911608, 88598136, 74247992, 61798064, 46386176, 34389240, 25225820,
+ 18343072, 13246210, 7614005, 4336575, 2456504, 1387138, 8},
+ {316243072, 314847424, 313759936, 311823680, 308374976, 302235808, 296457920, 288344224,
+ 277053216, 261616816, 241180800, 224622832, 205949680, 185708032, 164710624, 143876432,
+ 124026392, 105738528, 89317024, 74847744, 62279204, 46709404, 34591704, 25345632,
+ 18410910, 13283357, 7626934, 4340894, 2457913, 1387591, 8},
+ {316243072, 314848576, 313763520, 311834784, 308408896, 302336352, 296646528, 288688608,
+ 277658208, 262622336, 242727504, 226572640, 208281664, 188341088, 167512304, 146689696,
+ 126701240, 108155720, 91400008, 76564704, 63637504, 47602004, 35139296, 25663918,
+ 18588502, 13379501, 7659962, 4351840, 2461468, 1388732, 8},
+ {316243072, 314849696, 313767008, 311845696, 308442400, 302437088, 296837792, 289043680,
+ 278295680, 263711664, 244460352, 228811376, 211025776, 191509408, 170942688, 150169152,
+ 130013904, 111127336, 93923424, 78603792, 65214388, 48602512, 35733560, 26000040,
+ 18772012, 13477197, 7692890, 4362631, 2464949, 1389845, 8},
+ {316243072, 314851456, 313772576, 311863104, 308496480, 302602432, 297156960, 289649728,
+ 279417792, 265709120, 247806384, 233308320, 216768720, 198401536, 178640624, 158121536,
+ 137602432, 117841520, 99474352, 82934752, 68436688, 50533952, 36825288, 26593334,
+ 19086120, 13640627, 7746590, 4379971, 2470496, 1391611, 8},
+ {316243072, 314854304, 313781600, 311891584, 308586432, 302885824, 297719616, 290762432,
+ 281600928, 269929056, 255733744, 245043360, 233506176, 220942800, 206510464, 188780448,
+ 167001392, 142516720, 118085768, 95972968, 77157136, 55082256, 39133424, 27751766,
+ 19665234, 13929855, 7837575, 4408639, 2479541, 1394467, 8},
+ {316243072, 314856256, 313787808, 311911392, 308650144, 303093152, 298144768, 291644096,
+ 283459968, 273946560, 264748512, 260980608, 262699168, 277087168, 321151200, 394123840,
+ 324055360, 228764272, 162653280, 119096696, 89459480, 60122168, 41317836, 28739580,
+ 20125738, 14149189, 7903307, 4428811, 2485814, 1396432, 8},
},
{
- {421657440, 420139488, 418946528, 416800672, 412909824, 405768000,
- 398798528, 388615200, 373701408, 352009344, 321306208, 295197120,
- 265052208, 232374288, 199428848, 168474672, 140988912, 117445760,
- 97614400, 80976864, 67001780, 50094056, 37102532, 27221784,
- 19805402, 14310412, 8231902, 4690748, 2657888, 1501102,
- 8},
- {421657440, 420140000, 418948192, 416805888, 412925952, 405817184,
- 398893152, 388794176, 374031200, 352591488, 322263552, 296453088,
- 266595344, 234127472, 201261264, 170245184, 142589072, 118816240,
- 98738176, 81865128, 67681552, 50525452, 37361620, 27370528,
- 19887816, 14354855, 8247121, 4695786, 2659523, 1501627,
- 8},
- {421657440, 420140832, 418950752, 416813824, 412950592, 405892416,
- 399038240, 389069504, 374540352, 353494496, 323757792, 298423616,
- 269031008, 236912448, 204189776, 173088128, 145165408, 121023688,
- 100545224, 83288680, 68766080, 51208348, 37768500, 27602440,
- 20015536, 14423394, 8270460, 4703485, 2662016, 1502426,
- 8},
- {421657440, 420142848, 418957120, 416833824, 413012864, 406083584,
- 399408640, 389776736, 375859200, 355859264, 327727040, 303720672,
- 275669600, 244617728, 212408608, 181157024, 152524352, 127334264,
- 105689200, 87307640, 71794608, 53080056, 38863244, 28216278,
- 20349054, 14600477, 8330018, 4722985, 2668305, 1504437,
- 8},
- {421657440, 420144832, 418963328, 416853376, 413073952, 406272672,
- 399777696, 390488160, 377202752, 358308992, 331931552, 309437728,
- 282992896, 253322832, 221909888, 190657120, 161278448, 134848896,
- 111768392, 91990440, 75259304, 55157184, 40043144, 28861386,
- 20692490, 14779977, 8389313, 4742194, 2674461, 1506398,
- 8},
- {421657440, 420147936, 418973184, 416884416, 413171584, 406578080,
- 400379520, 391663936, 379464224, 362537056, 339441728, 319954336,
- 296943136, 270562688, 241463968, 210828720, 180193472, 151094752,
- 124714296, 101703104, 82215704, 59120396, 42193204, 29993510,
- 21277910, 15079353, 8485847, 4773030, 2684265, 1509508,
- 8},
- {421657440, 420152960, 418989056, 416934784, 413331648, 407087776,
- 401401312, 393709888, 383542496, 370571008, 354857280, 343114528,
- 330489120, 316523552, 299496928, 276320320, 244582704, 205903744,
- 165901392, 130010112, 100638336, 68322528, 46691836, 32186576,
- 22350768, 15606794, 8648967, 4823931, 2700238, 1514536,
- 8},
- {421657440, 420156384, 418999936, 416969536, 413443296, 407450528,
- 402143200, 395241024, 386740992, 377366336, 369662080, 368527968,
- 375197056, 397609792, 449444704, 516205376, 465462368, 362087840,
- 258438672, 179525856, 126554704, 78481920, 50925604, 34045784,
- 23199528, 16005132, 8766508, 4859691, 2711304, 1517993,
- 8},
+ {421657440, 420139488, 418946528, 416800672, 412909824, 405768000, 398798528, 388615200,
+ 373701408, 352009344, 321306208, 295197120, 265052208, 232374288, 199428848, 168474672,
+ 140988912, 117445760, 97614400, 80976864, 67001780, 50094056, 37102532, 27221784,
+ 19805402, 14310412, 8231902, 4690748, 2657888, 1501102, 8},
+ {421657440, 420140000, 418948192, 416805888, 412925952, 405817184, 398893152, 388794176,
+ 374031200, 352591488, 322263552, 296453088, 266595344, 234127472, 201261264, 170245184,
+ 142589072, 118816240, 98738176, 81865128, 67681552, 50525452, 37361620, 27370528,
+ 19887816, 14354855, 8247121, 4695786, 2659523, 1501627, 8},
+ {421657440, 420140832, 418950752, 416813824, 412950592, 405892416, 399038240, 389069504,
+ 374540352, 353494496, 323757792, 298423616, 269031008, 236912448, 204189776, 173088128,
+ 145165408, 121023688, 100545224, 83288680, 68766080, 51208348, 37768500, 27602440,
+ 20015536, 14423394, 8270460, 4703485, 2662016, 1502426, 8},
+ {421657440, 420142848, 418957120, 416833824, 413012864, 406083584, 399408640, 389776736,
+ 375859200, 355859264, 327727040, 303720672, 275669600, 244617728, 212408608, 181157024,
+ 152524352, 127334264, 105689200, 87307640, 71794608, 53080056, 38863244, 28216278,
+ 20349054, 14600477, 8330018, 4722985, 2668305, 1504437, 8},
+ {421657440, 420144832, 418963328, 416853376, 413073952, 406272672, 399777696, 390488160,
+ 377202752, 358308992, 331931552, 309437728, 282992896, 253322832, 221909888, 190657120,
+ 161278448, 134848896, 111768392, 91990440, 75259304, 55157184, 40043144, 28861386,
+ 20692490, 14779977, 8389313, 4742194, 2674461, 1506398, 8},
+ {421657440, 420147936, 418973184, 416884416, 413171584, 406578080, 400379520, 391663936,
+ 379464224, 362537056, 339441728, 319954336, 296943136, 270562688, 241463968, 210828720,
+ 180193472, 151094752, 124714296, 101703104, 82215704, 59120396, 42193204, 29993510,
+ 21277910, 15079353, 8485847, 4773030, 2684265, 1509508, 8},
+ {421657440, 420152960, 418989056, 416934784, 413331648, 407087776, 401401312, 393709888,
+ 383542496, 370571008, 354857280, 343114528, 330489120, 316523552, 299496928, 276320320,
+ 244582704, 205903744, 165901392, 130010112, 100638336, 68322528, 46691836, 32186576,
+ 22350768, 15606794, 8648967, 4823931, 2700238, 1514536, 8},
+ {421657440, 420156384, 418999936, 416969536, 413443296, 407450528, 402143200, 395241024,
+ 386740992, 377366336, 369662080, 368527968, 375197056, 397609792, 449444704, 516205376,
+ 465462368, 362087840, 258438672, 179525856, 126554704, 78481920, 50925604, 34045784,
+ 23199528, 16005132, 8766508, 4859691, 2711304, 1517993, 8},
},
{
- {527071776, 525663296, 524547840, 522522432, 518787424, 511719680,
- 504553280, 493592128, 476455264, 449151072, 405692192, 364814688,
- 314764480, 260204640, 208654512, 165799504, 132838864, 107993088,
- 88864512, 73593016, 61016300, 45833920, 34080076, 25068088,
- 18265786, 13208915, 7602957, 4333255, 2455490, 1386823,
- 8},
- {527071776, 525663968, 524550016, 522529280, 518809216, 511789088,
- 504692864, 493873536, 477023936, 450294176, 407912896, 368083040,
- 319153344, 265360480, 213877824, 170466944, 136659360, 110950480,
- 91074048, 75204000, 62168492, 46509388, 34462976, 25278940,
- 18379172, 13268763, 7622987, 4339800, 2457598, 1387497,
- 8},
- {527071776, 525665024, 524553312, 522539712, 518842368, 511894848,
- 504905440, 494302048, 477888864, 452029248, 411276832, 373037344,
- 325837408, 273286560, 222000448, 177798416, 142702912, 115647968,
- 94588960, 77764896, 63995604, 47574420, 35062716, 25607106,
- 18554672, 13360983, 7653688, 4349799, 2460814, 1388524,
- 8},
- {527071776, 525667616, 524561568, 522565952, 518925728, 512160800,
- 505440320, 495379776, 480060704, 456371808, 419671424, 385428736,
- 342733856, 293748832, 243537984, 197712496, 159394864, 128736152,
- 104401184, 84889304, 69041664, 50472228, 36668388, 26472714,
- 19011836, 13598833, 7731958, 4375112, 2468920, 1391105,
- 8},
- {527071776, 525670144, 524569600, 522591456, 519006944, 512420320,
- 505962656, 496432544, 482180128, 460599008, 427832576, 397536000,
- 359516736, 314728096, 266563520, 219861040, 178476000, 143891040,
- 115765904, 93067576, 74749312, 53662744, 38389064, 27378586,
- 19481140, 13839382, 7809780, 4400025, 2476852, 1393623,
- 8},
- {527071776, 525674176, 524582304, 522631776, 519135520, 512832256,
- 506793344, 498109984, 485562304, 467353856, 440933088, 417176416,
- 387412832, 351185728, 309140992, 263535888, 217930800, 175886048,
- 139658944, 109895352, 86138704, 59717932, 41509480, 28961788,
- 20278430, 14239528, 7936269, 4439982, 2489476, 1397613,
- 8},
- {527071776, 525680576, 524602688, 522696672, 519343104, 513501216,
- 508149376, 500867616, 491177920, 478742400, 463639360, 452372192,
- 440252448, 426573952, 408733792, 381475072, 338855168, 280525408,
- 216504432, 159999104, 116811992, 73859864, 48033652, 32018526,
- 21734042, 14942109, 8149504, 4505844, 2510026, 1404063,
- 8},
- {527071776, 525684960, 524616608, 522741088, 519485728, 513964384,
- 509095872, 502817408, 495235360, 487294368, 481973920, 483250624,
- 492921600, 517327296, 563364480, 613069184, 582305664, 502086528,
- 381071808, 253160960, 162730896, 89940184, 54233516, 34613092,
- 22883530, 15471362, 8302829, 4552048, 2524252, 1408495,
- 8},
+ {527071776, 525663296, 524547840, 522522432, 518787424, 511719680, 504553280, 493592128,
+ 476455264, 449151072, 405692192, 364814688, 314764480, 260204640, 208654512, 165799504,
+ 132838864, 107993088, 88864512, 73593016, 61016300, 45833920, 34080076, 25068088,
+ 18265786, 13208915, 7602957, 4333255, 2455490, 1386823, 8},
+ {527071776, 525663968, 524550016, 522529280, 518809216, 511789088, 504692864, 493873536,
+ 477023936, 450294176, 407912896, 368083040, 319153344, 265360480, 213877824, 170466944,
+ 136659360, 110950480, 91074048, 75204000, 62168492, 46509388, 34462976, 25278940,
+ 18379172, 13268763, 7622987, 4339800, 2457598, 1387497, 8},
+ {527071776, 525665024, 524553312, 522539712, 518842368, 511894848, 504905440, 494302048,
+ 477888864, 452029248, 411276832, 373037344, 325837408, 273286560, 222000448, 177798416,
+ 142702912, 115647968, 94588960, 77764896, 63995604, 47574420, 35062716, 25607106,
+ 18554672, 13360983, 7653688, 4349799, 2460814, 1388524, 8},
+ {527071776, 525667616, 524561568, 522565952, 518925728, 512160800, 505440320, 495379776,
+ 480060704, 456371808, 419671424, 385428736, 342733856, 293748832, 243537984, 197712496,
+ 159394864, 128736152, 104401184, 84889304, 69041664, 50472228, 36668388, 26472714,
+ 19011836, 13598833, 7731958, 4375112, 2468920, 1391105, 8},
+ {527071776, 525670144, 524569600, 522591456, 519006944, 512420320, 505962656, 496432544,
+ 482180128, 460599008, 427832576, 397536000, 359516736, 314728096, 266563520, 219861040,
+ 178476000, 143891040, 115765904, 93067576, 74749312, 53662744, 38389064, 27378586,
+ 19481140, 13839382, 7809780, 4400025, 2476852, 1393623, 8},
+ {527071776, 525674176, 524582304, 522631776, 519135520, 512832256, 506793344, 498109984,
+ 485562304, 467353856, 440933088, 417176416, 387412832, 351185728, 309140992, 263535888,
+ 217930800, 175886048, 139658944, 109895352, 86138704, 59717932, 41509480, 28961788,
+ 20278430, 14239528, 7936269, 4439982, 2489476, 1397613, 8},
+ {527071776, 525680576, 524602688, 522696672, 519343104, 513501216, 508149376, 500867616,
+ 491177920, 478742400, 463639360, 452372192, 440252448, 426573952, 408733792, 381475072,
+ 338855168, 280525408, 216504432, 159999104, 116811992, 73859864, 48033652, 32018526,
+ 21734042, 14942109, 8149504, 4505844, 2510026, 1404063, 8},
+ {527071776, 525684960, 524616608, 522741088, 519485728, 513964384, 509095872, 502817408,
+ 495235360, 487294368, 481973920, 483250624, 492921600, 517327296, 563364480, 613069184,
+ 582305664, 502086528, 381071808, 253160960, 162730896, 89940184, 54233516, 34613092,
+ 22883530, 15471362, 8302829, 4552048, 2524252, 1408495, 8},
},
{
- {632486144, 631404160, 630541632, 628962560, 626006848, 620254784,
- 614202752, 604493888, 588124864, 558622016, 501272640, 434361248,
- 339721664, 238866928, 162754096, 116484152, 89986864, 73763176,
- 62238744, 52877240, 44742032, 34289616, 25778564, 19071620,
- 13937721, 10094245, 5816231, 3316020, 1879259, 1061412,
- 6},
- {632486144, 631404800, 630543680, 628969216, 626028480, 620326592,
- 614353408, 604818816, 588856448, 560378560, 505802368, 442767520,
- 353024832, 254136256, 175962480, 126430968, 96994048, 78520456,
- 65419852, 54997780, 46155356, 35055980, 26190098, 19289814,
- 14051970, 10153425, 5835647, 3322294, 1881268, 1062052,
- 6},
- {632486144, 631405824, 630546880, 628979392, 626061312, 620435456,
- 614581376, 605308288, 589949440, 562964736, 512317856, 454700768,
- 372074880, 276762944, 196044128, 141682288, 107802384, 85920168,
- 70405200, 58335116, 48381672, 36259776, 26833198, 19628898,
- 14228628, 10244553, 5865397, 3331877, 1884330, 1063026,
- 6},
- {632486144, 631408256, 630554752, 629004736, 626143360, 620706752,
- 615146880, 606512512, 592597440, 569059456, 527028256, 480971968,
- 414517856, 330765376, 247566576, 182256848, 137009328, 106116024,
- 84093808, 67506720, 54475932, 39516588, 28548308, 20520860,
- 14687895, 10479249, 5941177, 3356125, 1892049, 1065476,
- 6},
- {632486144, 631410688, 630562432, 629029312, 626222784, 620968128,
- 615688640, 607654336, 595061824, 574547584, 539620928, 502759456,
- 449954304, 379751840, 300289600, 227398144, 170699200, 129631024,
- 99970280, 78022152, 61351280, 43090368, 30380256, 21451668,
- 15158278, 10716186, 6016439, 3379975, 1899599, 1067865,
- 6},
- {632486144, 631414464, 630574528, 629067968, 626347520, 621376512,
- 616530368, 609410496, 598784192, 582583360, 557211968, 532248416,
- 497725888, 450454656, 388712384, 316243072, 243773744, 182031456,
- 134760256, 100237736, 75274184, 49902756, 33701968, 23075620,
- 15955780, 11109605, 6138617, 3418196, 1911610, 1071650,
- 6},
- {632486144, 631420544, 630593856, 629129728, 626546304, 622024256,
- 617857472, 612152256, 604500352, 594592960, 582468992, 573393728,
- 563597248, 552304000, 536529024, 509232736, 458470464, 373144992,
- 265980880, 175277520, 115809552, 66314040, 40717416, 26216598,
- 17410064, 11799018, 6344228, 3481124, 1931149, 1077765,
- 6},
- {632486144, 631424704, 630607040, 629171712, 626681152, 622462336,
- 618753152, 613998592, 608344384, 602686208, 599701056, 602055040,
- 611306560, 631195136, 663846400, 695665664, 678745600, 629219584,
- 527619200, 345921568, 187985760, 86310936, 47549656, 28903180,
- 18560056, 12317920, 6491857, 3525223, 1944665, 1081966,
- 6},
+ {632486144, 631404160, 630541632, 628962560, 626006848, 620254784, 614202752, 604493888,
+ 588124864, 558622016, 501272640, 434361248, 339721664, 238866928, 162754096, 116484152,
+ 89986864, 73763176, 62238744, 52877240, 44742032, 34289616, 25778564, 19071620,
+ 13937721, 10094245, 5816231, 3316020, 1879259, 1061412, 6},
+ {632486144, 631404800, 630543680, 628969216, 626028480, 620326592, 614353408, 604818816,
+ 588856448, 560378560, 505802368, 442767520, 353024832, 254136256, 175962480, 126430968,
+ 96994048, 78520456, 65419852, 54997780, 46155356, 35055980, 26190098, 19289814,
+ 14051970, 10153425, 5835647, 3322294, 1881268, 1062052, 6},
+ {632486144, 631405824, 630546880, 628979392, 626061312, 620435456, 614581376, 605308288,
+ 589949440, 562964736, 512317856, 454700768, 372074880, 276762944, 196044128, 141682288,
+ 107802384, 85920168, 70405200, 58335116, 48381672, 36259776, 26833198, 19628898,
+ 14228628, 10244553, 5865397, 3331877, 1884330, 1063026, 6},
+ {632486144, 631408256, 630554752, 629004736, 626143360, 620706752, 615146880, 606512512,
+ 592597440, 569059456, 527028256, 480971968, 414517856, 330765376, 247566576, 182256848,
+ 137009328, 106116024, 84093808, 67506720, 54475932, 39516588, 28548308, 20520860,
+ 14687895, 10479249, 5941177, 3356125, 1892049, 1065476, 6},
+ {632486144, 631410688, 630562432, 629029312, 626222784, 620968128, 615688640, 607654336,
+ 595061824, 574547584, 539620928, 502759456, 449954304, 379751840, 300289600, 227398144,
+ 170699200, 129631024, 99970280, 78022152, 61351280, 43090368, 30380256, 21451668,
+ 15158278, 10716186, 6016439, 3379975, 1899599, 1067865, 6},
+ {632486144, 631414464, 630574528, 629067968, 626347520, 621376512, 616530368, 609410496,
+ 598784192, 582583360, 557211968, 532248416, 497725888, 450454656, 388712384, 316243072,
+ 243773744, 182031456, 134760256, 100237736, 75274184, 49902756, 33701968, 23075620,
+ 15955780, 11109605, 6138617, 3418196, 1911610, 1071650, 6},
+ {632486144, 631420544, 630593856, 629129728, 626546304, 622024256, 617857472, 612152256,
+ 604500352, 594592960, 582468992, 573393728, 563597248, 552304000, 536529024, 509232736,
+ 458470464, 373144992, 265980880, 175277520, 115809552, 66314040, 40717416, 26216598,
+ 17410064, 11799018, 6344228, 3481124, 1931149, 1077765, 6},
+ {632486144, 631424704, 630607040, 629171712, 626681152, 622462336, 618753152, 613998592,
+ 608344384, 602686208, 599701056, 602055040, 611306560, 631195136, 663846400, 695665664,
+ 678745600, 629219584, 527619200, 345921568, 187985760, 86310936, 47549656, 28903180,
+ 18560056, 12317920, 6491857, 3525223, 1944665, 1081966, 6},
},
{
- {737900480, 737313472, 736843456, 735978112, 734341632, 731092416,
- 727578432, 721723200, 711172416, 689515200, 632898368, 524671456,
- 291627872, 124282568, 61909856, 39166204, 32726406, 30782714,
- 28778620, 26053694, 22893106, 18076024, 13777827, 10259417,
- 7520912, 5455094, 3146319, 1794368, 1017003, 574424,
- 3},
- {737900480, 737313856, 736844736, 735982272, 734355200, 731139072,
- 727679616, 721953472, 711743296, 691176960, 639550656, 546400448,
- 337176160, 153194576, 79696616, 51414392, 40409976, 35288896,
- 31462072, 27703048, 23931236, 18606918, 14052068, 10401011,
- 7593699, 5492314, 3158367, 1798231, 1018235, 574816,
- 3},
- {737900480, 737314496, 736846656, 735988544, 734375872, 731209600,
- 727831808, 722297216, 712582592, 693540736, 648325568, 572924864,
- 400936960, 201170544, 106893592, 68502096, 51196844, 41932300,
- 35558792, 30265664, 25555562, 19438326, 14479913, 10620826,
- 7706165, 5549599, 3176820, 1804132, 1020113, 575412,
- 3},
- {737900480, 737315968, 736851520, 736004224, 734427392, 731384128,
- 728205504, 723128192, 714552448, 698767168, 665389440, 617851520,
- 518249088, 341071744, 189979888, 115866720, 79793448, 59627348,
- 46625756, 37240340, 29975502, 21679968, 15618320, 11198082,
- 7998192, 5697000, 3223802, 1819057, 1024845, 576910,
- 3},
- {737900480, 737317504, 736856256, 736019456, 734476992, 731550720,
- 728558400, 723898048, 716313280, 703122688, 677714048, 645514624,
- 585425152, 469729280, 304799264, 181937120, 116903752, 81417144,
- 59804904, 45335940, 34988372, 24141316, 16833072, 11799646,
- 8296896, 5845648, 3270431, 1833731, 1029473, 578371,
- 3},
- {737900480, 737319808, 736863680, 736043264, 734554432, 731808256,
- 729097600, 725051328, 718858688, 709018048, 692447360, 674422272,
- 645810304, 597029312, 509281120, 368950240, 228619376, 140871152,
- 92090184, 63478204, 45453116, 28882404, 19041826, 12849181,
- 8802888, 6092218, 3346065, 1857236, 1036832, 580686,
- 3},
- {737900480, 737323520, 736875456, 736081088, 734676800, 732210048,
- 729927424, 726786624, 722546496, 717012160, 710183424, 705045120,
- 699473920, 692939328, 683288384, 664622720, 621866048, 513176832,
- 298800288, 144682432, 80228568, 40814640, 23774754, 14887523,
- 9725975, 6523960, 3473221, 1895906, 1048798, 584424,
- 3},
- {737900480, 737326016, 736883520, 736106688, 734759040, 732477632,
- 730474944, 727916992, 724904832, 721986304, 720753536, 722497344,
- 728061952, 739005568, 755619392, 771010688, 763544704, 740635136,
- 685348544, 485060256, 169322848, 56755684, 28517764, 16647276,
- 10457803, 6848975, 3564451, 1922987, 1057072, 586991,
- 3},
+ {737900480, 737313472, 736843456, 735978112, 734341632, 731092416, 727578432, 721723200,
+ 711172416, 689515200, 632898368, 524671456, 291627872, 124282568, 61909856, 39166204,
+ 32726406, 30782714, 28778620, 26053694, 22893106, 18076024, 13777827, 10259417,
+ 7520912, 5455094, 3146319, 1794368, 1017003, 574424, 3},
+ {737900480, 737313856, 736844736, 735982272, 734355200, 731139072, 727679616, 721953472,
+ 711743296, 691176960, 639550656, 546400448, 337176160, 153194576, 79696616, 51414392,
+ 40409976, 35288896, 31462072, 27703048, 23931236, 18606918, 14052068, 10401011,
+ 7593699, 5492314, 3158367, 1798231, 1018235, 574816, 3},
+ {737900480, 737314496, 736846656, 735988544, 734375872, 731209600, 727831808, 722297216,
+ 712582592, 693540736, 648325568, 572924864, 400936960, 201170544, 106893592, 68502096,
+ 51196844, 41932300, 35558792, 30265664, 25555562, 19438326, 14479913, 10620826,
+ 7706165, 5549599, 3176820, 1804132, 1020113, 575412, 3},
+ {737900480, 737315968, 736851520, 736004224, 734427392, 731384128, 728205504, 723128192,
+ 714552448, 698767168, 665389440, 617851520, 518249088, 341071744, 189979888, 115866720,
+ 79793448, 59627348, 46625756, 37240340, 29975502, 21679968, 15618320, 11198082,
+ 7998192, 5697000, 3223802, 1819057, 1024845, 576910, 3},
+ {737900480, 737317504, 736856256, 736019456, 734476992, 731550720, 728558400, 723898048,
+ 716313280, 703122688, 677714048, 645514624, 585425152, 469729280, 304799264, 181937120,
+ 116903752, 81417144, 59804904, 45335940, 34988372, 24141316, 16833072, 11799646,
+ 8296896, 5845648, 3270431, 1833731, 1029473, 578371, 3},
+ {737900480, 737319808, 736863680, 736043264, 734554432, 731808256, 729097600, 725051328,
+ 718858688, 709018048, 692447360, 674422272, 645810304, 597029312, 509281120, 368950240,
+ 228619376, 140871152, 92090184, 63478204, 45453116, 28882404, 19041826, 12849181,
+ 8802888, 6092218, 3346065, 1857236, 1036832, 580686, 3},
+ {737900480, 737323520, 736875456, 736081088, 734676800, 732210048, 729927424, 726786624,
+ 722546496, 717012160, 710183424, 705045120, 699473920, 692939328, 683288384, 664622720,
+ 621866048, 513176832, 298800288, 144682432, 80228568, 40814640, 23774754, 14887523,
+ 9725975, 6523960, 3473221, 1895906, 1048798, 584424, 3},
+ {737900480, 737326016, 736883520, 736106688, 734759040, 732477632, 730474944, 727916992,
+ 724904832, 721986304, 720753536, 722497344, 728061952, 739005568, 755619392, 771010688,
+ 763544704, 740635136, 685348544, 485060256, 169322848, 56755684, 28517764, 16647276,
+ 10457803, 6848975, 3564451, 1922987, 1057072, 586991, 3},
},
{
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314752,
- -99, -23, -8, 0, -5, -6,
- -6, -6, -5, -4, -3, -2,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314752,
- -180, -33, -14, -9, -7, -7,
- -7, -6, -5, -4, -3, -2,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314752,
- -3092, -53, -23, -14, -11, -9,
- -8, -7, -6, -4, -3, -2,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314752, -298, -55, -28, -19, -14,
- -11, -9, -7, -5, -4, -3,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314688, -193, -55, -30, -20,
- -14, -11, -8, -6, -4, -3,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314752, -421657440, -91, -40,
- -24, -16, -11, -7, -4, -3,
- -2, -1, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314752,
- -252, -43, -21, -10, -6, -3,
- -2, -2, -1, 0, 0, 0,
- 0},
- {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
- -843314816, -843314752, -56, -14, -7, -4,
- -2, -2, -1, 0, 0, 0,
- 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314752, -99, -23,
+ -8, 0, -5, -6, -6, -6, -5,
+ -4, -3, -2, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314752, -180, -33,
+ -14, -9, -7, -7, -7, -6, -5,
+ -4, -3, -2, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314752, -3092, -53,
+ -23, -14, -11, -9, -8, -7, -6,
+ -4, -3, -2, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314752, -298,
+ -55, -28, -19, -14, -11, -9, -7,
+ -5, -4, -3, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314688,
+ -193, -55, -30, -20, -14, -11, -8,
+ -6, -4, -3, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314752, -421657440, -91, -40, -24, -16, -11,
+ -7, -4, -3, -2, -1, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314752, -252, -43, -21,
+ -10, -6, -3, -2, -2, -1, 0,
+ 0, 0, 0},
+ {-843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314816, -843314816,
+ -843314816, -843314816, -843314816, -843314816, -843314816, -843314752, -56,
+ -14, -7, -4, -2, -2, -1, 0,
+ 0, 0, 0},
},
{
- {-737900480, -737313472, -736843456, -735978176, -734341632, -731092480,
- -727578496, -721723200, -711172416, -689515200, -632898368, -524671488,
- -291627872, -124282552, -61909848, -39166196, -32726402, -30782708,
- -28778616, -26053690, -22893104, -18076022, -13777825, -10259415,
- -7520911, -5455092, -3146318, -1794368, -1017003, -574424,
- -3},
- {-737900480, -737313856, -736844736, -735982272, -734355264, -731139072,
- -727679616, -721953472, -711743360, -691176960, -639550656, -546400448,
- -337176160, -153194560, -79696608, -51414384, -40409972, -35288892,
- -31462068, -27703042, -23931232, -18606916, -14052066, -10401010,
- -7593697, -5492313, -3158366, -1798231, -1018235, -574816,
- -3},
- {-737900480, -737314496, -736846656, -735988544, -734375872, -731209600,
- -727831808, -722297216, -712582592, -693540736, -648325568, -572924928,
- -400936960, -201170512, -106893576, -68502088, -51196836, -41932292,
- -35558788, -30265660, -25555558, -19438322, -14479910, -10620825,
- -7706164, -5549598, -3176819, -1804131, -1020113, -575412,
- -3},
- {-737900480, -737316032, -736851520, -736004288, -734427392, -731384128,
- -728205504, -723128192, -714552448, -698767168, -665389504, -617851520,
- -518249088, -341071712, -189979872, -115866704, -79793440, -59627336,
- -46625748, -37240336, -29975498, -21679964, -15618318, -11198080,
- -7998190, -5696998, -3223801, -1819057, -1024845, -576910,
- -3},
- {-737900480, -737317504, -736856256, -736019456, -734476992, -731550784,
- -728558400, -723898112, -716313280, -703122688, -677714048, -645514624,
- -585425152, -469729280, -304799232, -181937104, -116903736, -81417128,
- -59804896, -45335932, -34988368, -24141312, -16833070, -11799644,
- -8296895, -5845647, -3270430, -1833731, -1029472, -578371,
- -3},
- {-737900480, -737319808, -736863680, -736043264, -734554432, -731808256,
- -729097600, -725051328, -718858688, -709018112, -692447360, -674422272,
- -645810304, -597029312, -509281120, -368950240, -228619360, -140871136,
- -92090168, -63478192, -45453108, -28882400, -19041824, -12849179,
- -8802887, -6092216, -3346064, -1857235, -1036832, -580686,
- -3},
- {-737900480, -737323520, -736875520, -736081152, -734676800, -732210112,
- -729927424, -726786624, -722546560, -717012224, -710183488, -705045120,
- -699473920, -692939328, -683288448, -664622784, -621866048, -513176832,
- -298800256, -144682416, -80228552, -40814632, -23774750, -14887520,
- -9725973, -6523959, -3473220, -1895905, -1048798, -584424,
- -3},
- {-737900480, -737326080, -736883520, -736106752, -734759104, -732477632,
- -730474944, -727917056, -724904896, -721986368, -720753536, -722497344,
- -728061952, -739005568, -755619456, -771010688, -763544704, -740635136,
- -685348544, -485060256, -169322832, -56755676, -28517758, -16647273,
- -10457802, -6848973, -3564450, -1922987, -1057072, -586991,
- -3},
+ {-737900480, -737313472, -736843456, -735978176, -734341632, -731092480, -727578496,
+ -721723200, -711172416, -689515200, -632898368, -524671488, -291627872, -124282552,
+ -61909848, -39166196, -32726402, -30782708, -28778616, -26053690, -22893104,
+ -18076022, -13777825, -10259415, -7520911, -5455092, -3146318, -1794368,
+ -1017003, -574424, -3},
+ {-737900480, -737313856, -736844736, -735982272, -734355264, -731139072, -727679616,
+ -721953472, -711743360, -691176960, -639550656, -546400448, -337176160, -153194560,
+ -79696608, -51414384, -40409972, -35288892, -31462068, -27703042, -23931232,
+ -18606916, -14052066, -10401010, -7593697, -5492313, -3158366, -1798231,
+ -1018235, -574816, -3},
+ {-737900480, -737314496, -736846656, -735988544, -734375872, -731209600, -727831808,
+ -722297216, -712582592, -693540736, -648325568, -572924928, -400936960, -201170512,
+ -106893576, -68502088, -51196836, -41932292, -35558788, -30265660, -25555558,
+ -19438322, -14479910, -10620825, -7706164, -5549598, -3176819, -1804131,
+ -1020113, -575412, -3},
+ {-737900480, -737316032, -736851520, -736004288, -734427392, -731384128, -728205504,
+ -723128192, -714552448, -698767168, -665389504, -617851520, -518249088, -341071712,
+ -189979872, -115866704, -79793440, -59627336, -46625748, -37240336, -29975498,
+ -21679964, -15618318, -11198080, -7998190, -5696998, -3223801, -1819057,
+ -1024845, -576910, -3},
+ {-737900480, -737317504, -736856256, -736019456, -734476992, -731550784, -728558400,
+ -723898112, -716313280, -703122688, -677714048, -645514624, -585425152, -469729280,
+ -304799232, -181937104, -116903736, -81417128, -59804896, -45335932, -34988368,
+ -24141312, -16833070, -11799644, -8296895, -5845647, -3270430, -1833731,
+ -1029472, -578371, -3},
+ {-737900480, -737319808, -736863680, -736043264, -734554432, -731808256, -729097600,
+ -725051328, -718858688, -709018112, -692447360, -674422272, -645810304, -597029312,
+ -509281120, -368950240, -228619360, -140871136, -92090168, -63478192, -45453108,
+ -28882400, -19041824, -12849179, -8802887, -6092216, -3346064, -1857235,
+ -1036832, -580686, -3},
+ {-737900480, -737323520, -736875520, -736081152, -734676800, -732210112, -729927424,
+ -726786624, -722546560, -717012224, -710183488, -705045120, -699473920, -692939328,
+ -683288448, -664622784, -621866048, -513176832, -298800256, -144682416, -80228552,
+ -40814632, -23774750, -14887520, -9725973, -6523959, -3473220, -1895905,
+ -1048798, -584424, -3},
+ {-737900480, -737326080, -736883520, -736106752, -734759104, -732477632, -730474944,
+ -727917056, -724904896, -721986368, -720753536, -722497344, -728061952, -739005568,
+ -755619456, -771010688, -763544704, -740635136, -685348544, -485060256, -169322832,
+ -56755676, -28517758, -16647273, -10457802, -6848973, -3564450, -1922987,
+ -1057072, -586991, -3},
},
{
- {-632486144, -631404160, -630541632, -628962624, -626006912, -620254848,
- -614202752, -604493888, -588124928, -558622016, -501272672, -434361280,
- -339721664, -238866896, -162754096, -116484128, -89986864, -73763168,
- -62238740, -52877228, -44742028, -34289608, -25778562, -19071618,
- -13937720, -10094244, -5816230, -3316020, -1879259, -1061412,
- -6},
- {-632486144, -631404800, -630543744, -628969280, -626028480, -620326656,
- -614353408, -604818880, -588856448, -560378624, -505802400, -442767552,
- -353024864, -254136224, -175962480, -126430968, -96994048, -78520448,
- -65419836, -54997768, -46155352, -35055976, -26190096, -19289814,
- -14051969, -10153424, -5835646, -3322294, -1881267, -1062052,
- -6},
- {-632486144, -631405824, -630546880, -628979392, -626061312, -620435456,
- -614581376, -605308352, -589949440, -562964800, -512317888, -454700800,
- -372074880, -276762944, -196044080, -141682256, -107802384, -85920168,
- -70405192, -58335112, -48381668, -36259772, -26833196, -19628898,
- -14228625, -10244552, -5865396, -3331876, -1884330, -1063026,
- -6},
- {-632486144, -631408320, -630554816, -629004736, -626143424, -620706752,
- -615146880, -606512512, -592597440, -569059456, -527028288, -480972000,
- -414517888, -330765376, -247566576, -182256848, -137009312, -106116016,
- -84093792, -67506712, -54475932, -39516584, -28548306, -20520858,
- -14687894, -10479248, -5941176, -3356124, -1892049, -1065476,
- -6},
- {-632486144, -631410688, -630562496, -629029312, -626222848, -620968128,
- -615688640, -607654400, -595061824, -574547648, -539620928, -502759488,
- -449954304, -379751872, -300289600, -227398144, -170699200, -129631024,
- -99970272, -78022152, -61351276, -43090364, -30380254, -21451666,
- -15158277, -10716185, -6016438, -3379975, -1899599, -1067865,
- -6},
- {-632486144, -631414528, -630574528, -629067968, -626347520, -621376576,
- -616530368, -609410560, -598784192, -582583424, -557211968, -532248448,
- -497725920, -450454688, -388712416, -316243072, -243773744, -182031456,
- -134760256, -100237728, -75274176, -49902756, -33701964, -23075618,
- -15955779, -11109604, -6138616, -3418196, -1911610, -1071650,
- -6},
- {-632486144, -631420608, -630593920, -629129728, -626546368, -622024256,
- -617857472, -612152256, -604500352, -594593024, -582468992, -573393792,
- -563597248, -552304000, -536529056, -509232736, -458470496, -373144992,
- -265980880, -175277520, -115809544, -66314036, -40717412, -26216596,
- -17410062, -11799017, -6344227, -3481124, -1931149, -1077765,
- -6},
- {-632486144, -631424704, -630607040, -629171712, -626681152, -622462336,
- -618753152, -613998656, -608344384, -602686272, -599701056, -602055040,
- -611306560, -631195136, -663846464, -695665728, -678745600, -629219648,
- -527619232, -345921600, -187985760, -86310936, -47549652, -28903178,
- -18560056, -12317919, -6491856, -3525223, -1944664, -1081966,
- -6},
+ {-632486144, -631404160, -630541632, -628962624, -626006912, -620254848, -614202752,
+ -604493888, -588124928, -558622016, -501272672, -434361280, -339721664, -238866896,
+ -162754096, -116484128, -89986864, -73763168, -62238740, -52877228, -44742028,
+ -34289608, -25778562, -19071618, -13937720, -10094244, -5816230, -3316020,
+ -1879259, -1061412, -6},
+ {-632486144, -631404800, -630543744, -628969280, -626028480, -620326656, -614353408,
+ -604818880, -588856448, -560378624, -505802400, -442767552, -353024864, -254136224,
+ -175962480, -126430968, -96994048, -78520448, -65419836, -54997768, -46155352,
+ -35055976, -26190096, -19289814, -14051969, -10153424, -5835646, -3322294,
+ -1881267, -1062052, -6},
+ {-632486144, -631405824, -630546880, -628979392, -626061312, -620435456, -614581376,
+ -605308352, -589949440, -562964800, -512317888, -454700800, -372074880, -276762944,
+ -196044080, -141682256, -107802384, -85920168, -70405192, -58335112, -48381668,
+ -36259772, -26833196, -19628898, -14228625, -10244552, -5865396, -3331876,
+ -1884330, -1063026, -6},
+ {-632486144, -631408320, -630554816, -629004736, -626143424, -620706752, -615146880,
+ -606512512, -592597440, -569059456, -527028288, -480972000, -414517888, -330765376,
+ -247566576, -182256848, -137009312, -106116016, -84093792, -67506712, -54475932,
+ -39516584, -28548306, -20520858, -14687894, -10479248, -5941176, -3356124,
+ -1892049, -1065476, -6},
+ {-632486144, -631410688, -630562496, -629029312, -626222848, -620968128, -615688640,
+ -607654400, -595061824, -574547648, -539620928, -502759488, -449954304, -379751872,
+ -300289600, -227398144, -170699200, -129631024, -99970272, -78022152, -61351276,
+ -43090364, -30380254, -21451666, -15158277, -10716185, -6016438, -3379975,
+ -1899599, -1067865, -6},
+ {-632486144, -631414528, -630574528, -629067968, -626347520, -621376576, -616530368,
+ -609410560, -598784192, -582583424, -557211968, -532248448, -497725920, -450454688,
+ -388712416, -316243072, -243773744, -182031456, -134760256, -100237728, -75274176,
+ -49902756, -33701964, -23075618, -15955779, -11109604, -6138616, -3418196,
+ -1911610, -1071650, -6},
+ {-632486144, -631420608, -630593920, -629129728, -626546368, -622024256, -617857472,
+ -612152256, -604500352, -594593024, -582468992, -573393792, -563597248, -552304000,
+ -536529056, -509232736, -458470496, -373144992, -265980880, -175277520, -115809544,
+ -66314036, -40717412, -26216596, -17410062, -11799017, -6344227, -3481124,
+ -1931149, -1077765, -6},
+ {-632486144, -631424704, -630607040, -629171712, -626681152, -622462336, -618753152,
+ -613998656, -608344384, -602686272, -599701056, -602055040, -611306560, -631195136,
+ -663846464, -695665728, -678745600, -629219648, -527619232, -345921600, -187985760,
+ -86310936, -47549652, -28903178, -18560056, -12317919, -6491856, -3525223,
+ -1944664, -1081966, -6},
},
{
- {-527071808, -525663328, -524547904, -522522464, -518787456, -511719712,
- -504553344, -493592160, -476455328, -449151136, -405692224, -364814720,
- -314764512, -260204640, -208654496, -165799488, -132838856, -107993080,
- -88864496, -73593008, -61016300, -45833920, -34080072, -25068086,
- -18265786, -13208914, -7602956, -4333254, -2455489, -1386823,
- -8},
- {-527071808, -525664032, -524550048, -522529344, -518809248, -511789152,
- -504692896, -493873600, -477024000, -450294240, -407912928, -368083072,
- -319153344, -265360496, -213877824, -170466928, -136659360, -110950464,
- -91074040, -75203984, -62168492, -46509388, -34462972, -25278938,
- -18379172, -13268760, -7622986, -4339799, -2457598, -1387497,
- -8},
- {-527071808, -525665056, -524553344, -522539776, -518842432, -511894880,
- -504905472, -494302080, -477888896, -452029312, -411276864, -373037408,
- -325837408, -273286560, -222000464, -177798416, -142702912, -115647952,
- -94588960, -77764888, -63995600, -47574416, -35062712, -25607104,
- -18554672, -13360983, -7653687, -4349798, -2460813, -1388524,
- -8},
- {-527071808, -525667680, -524561632, -522566016, -518925792, -512160864,
- -505440352, -495379840, -480060736, -456371840, -419671488, -385428768,
- -342733888, -293748864, -243538000, -197712512, -159394864, -128736136,
- -104401192, -84889288, -69041664, -50472220, -36668384, -26472714,
- -19011836, -13598832, -7731957, -4375111, -2468919, -1391105,
- -8},
- {-527071808, -525670208, -524569664, -522591520, -519007008, -512420384,
- -505962688, -496432608, -482180192, -460599072, -427832640, -397536032,
- -359516800, -314728128, -266563552, -219861056, -178475984, -143891040,
- -115765912, -93067576, -74749312, -53662744, -38389064, -27378586,
- -19481138, -13839381, -7809779, -4400024, -2476851, -1393623,
- -8},
- {-527071808, -525674208, -524582336, -522631840, -519135552, -512832288,
- -506793408, -498110048, -485562336, -467353888, -440933120, -417176480,
- -387412896, -351185760, -309141024, -263535920, -217930816, -175886064,
- -139658944, -109895352, -86138704, -59717932, -41509480, -28961786,
- -20278428, -14239527, -7936268, -4439981, -2489476, -1397613,
- -8},
- {-527071808, -525680640, -524602720, -522696736, -519343168, -513501280,
- -508149440, -500867680, -491177984, -478742432, -463639424, -452372288,
- -440252512, -426573984, -408733888, -381475168, -338855200, -280525440,
- -216504464, -159999152, -116811992, -73859864, -48033648, -32018524,
- -21734040, -14942109, -8149503, -4505843, -2510026, -1404062,
- -8},
- {-527071808, -525685024, -524616640, -522741120, -519485760, -513964448,
- -509095936, -502817440, -495235424, -487294400, -481973952, -483250688,
- -492921664, -517327360, -563364544, -613069184, -582305664, -502086560,
- -381071904, -253160976, -162730944, -89940184, -54233516, -34613092,
- -22883530, -15471361, -8302828, -4552048, -2524252, -1408494,
- -8},
+ {-527071808, -525663328, -524547904, -522522464, -518787456, -511719712, -504553344,
+ -493592160, -476455328, -449151136, -405692224, -364814720, -314764512, -260204640,
+ -208654496, -165799488, -132838856, -107993080, -88864496, -73593008, -61016300,
+ -45833920, -34080072, -25068086, -18265786, -13208914, -7602956, -4333254,
+ -2455489, -1386823, -8},
+ {-527071808, -525664032, -524550048, -522529344, -518809248, -511789152, -504692896,
+ -493873600, -477024000, -450294240, -407912928, -368083072, -319153344, -265360496,
+ -213877824, -170466928, -136659360, -110950464, -91074040, -75203984, -62168492,
+ -46509388, -34462972, -25278938, -18379172, -13268760, -7622986, -4339799,
+ -2457598, -1387497, -8},
+ {-527071808, -525665056, -524553344, -522539776, -518842432, -511894880, -504905472,
+ -494302080, -477888896, -452029312, -411276864, -373037408, -325837408, -273286560,
+ -222000464, -177798416, -142702912, -115647952, -94588960, -77764888, -63995600,
+ -47574416, -35062712, -25607104, -18554672, -13360983, -7653687, -4349798,
+ -2460813, -1388524, -8},
+ {-527071808, -525667680, -524561632, -522566016, -518925792, -512160864, -505440352,
+ -495379840, -480060736, -456371840, -419671488, -385428768, -342733888, -293748864,
+ -243538000, -197712512, -159394864, -128736136, -104401192, -84889288, -69041664,
+ -50472220, -36668384, -26472714, -19011836, -13598832, -7731957, -4375111,
+ -2468919, -1391105, -8},
+ {-527071808, -525670208, -524569664, -522591520, -519007008, -512420384, -505962688,
+ -496432608, -482180192, -460599072, -427832640, -397536032, -359516800, -314728128,
+ -266563552, -219861056, -178475984, -143891040, -115765912, -93067576, -74749312,
+ -53662744, -38389064, -27378586, -19481138, -13839381, -7809779, -4400024,
+ -2476851, -1393623, -8},
+ {-527071808, -525674208, -524582336, -522631840, -519135552, -512832288, -506793408,
+ -498110048, -485562336, -467353888, -440933120, -417176480, -387412896, -351185760,
+ -309141024, -263535920, -217930816, -175886064, -139658944, -109895352, -86138704,
+ -59717932, -41509480, -28961786, -20278428, -14239527, -7936268, -4439981,
+ -2489476, -1397613, -8},
+ {-527071808, -525680640, -524602720, -522696736, -519343168, -513501280, -508149440,
+ -500867680, -491177984, -478742432, -463639424, -452372288, -440252512, -426573984,
+ -408733888, -381475168, -338855200, -280525440, -216504464, -159999152, -116811992,
+ -73859864, -48033648, -32018524, -21734040, -14942109, -8149503, -4505843,
+ -2510026, -1404062, -8},
+ {-527071808, -525685024, -524616640, -522741120, -519485760, -513964448, -509095936,
+ -502817440, -495235424, -487294400, -481973952, -483250688, -492921664, -517327360,
+ -563364544, -613069184, -582305664, -502086560, -381071904, -253160976, -162730944,
+ -89940184, -54233516, -34613092, -22883530, -15471361, -8302828, -4552048,
+ -2524252, -1408494, -8},
},
{
- {-421657408, -420139456, -418946528, -416800672, -412909824, -405768000,
- -398798528, -388615168, -373701408, -352009344, -321306208, -295197120,
- -265052192, -232374288, -199428848, -168474672, -140988896, -117445752,
- -97614400, -80976864, -67001780, -50094052, -37102532, -27221788,
- -19805402, -14310412, -8231902, -4690747, -2657887, -1501102,
- -8},
- {-421657408, -420140000, -418948192, -416805888, -412925952, -405817184,
- -398893120, -388794176, -374031200, -352591488, -322263520, -296453056,
- -266595328, -234127456, -201261264, -170245168, -142589072, -118816232,
- -98738176, -81865128, -67681552, -50525456, -37361620, -27370528,
- -19887816, -14354855, -8247121, -4695785, -2659522, -1501627,
- -8},
- {-421657408, -420140800, -418950720, -416813824, -412950592, -405892416,
- -399038240, -389069472, -374540320, -353494496, -323757792, -298423616,
- -269030976, -236912448, -204189776, -173088112, -145165408, -121023680,
- -100545224, -83288680, -68766080, -51208344, -37768500, -27602440,
- -20015536, -14423394, -8270459, -4703484, -2662016, -1502426,
- -8},
- {-421657408, -420142816, -418957120, -416833824, -413012832, -406083552,
- -399408640, -389776736, -375859200, -355859232, -327727008, -303720672,
- -275669600, -244617712, -212408608, -181157008, -152524352, -127334256,
- -105689208, -87307640, -71794608, -53080056, -38863244, -28216278,
- -20349054, -14600477, -8330017, -4722985, -2668305, -1504437,
- -8},
- {-421657408, -420144800, -418963328, -416853344, -413073952, -406272672,
- -399777664, -390488160, -377202752, -358308960, -331931552, -309437728,
- -282992896, -253322816, -221909888, -190657120, -161278432, -134848896,
- -111768392, -91990440, -75259304, -55157184, -40043144, -28861386,
- -20692490, -14779979, -8389313, -4742193, -2674461, -1506398,
- -8},
- {-421657408, -420147904, -418973152, -416884384, -413171584, -406578080,
- -400379520, -391663904, -379464224, -362537024, -339441728, -319954336,
- -296943136, -270562688, -241463968, -210828720, -180193456, -151094736,
- -124714296, -101703096, -82215704, -59120396, -42193204, -29993510,
- -21277910, -15079353, -8485847, -4773029, -2684265, -1509508,
- -8},
- {-421657408, -420152928, -418989024, -416934752, -413331616, -407087776,
- -401401280, -393709888, -383542496, -370571008, -354857280, -343114528,
- -330489120, -316523520, -299496896, -276320320, -244582704, -205903728,
- -165901376, -130010112, -100638328, -68322528, -46691836, -32186576,
- -22350768, -15606794, -8648966, -4823931, -2700238, -1514536,
- -8},
- {-421657408, -420156352, -418999936, -416969504, -413443264, -407450528,
- -402143200, -395241024, -386740960, -377366304, -369662048, -368527936,
- -375197024, -397609792, -449444704, -516205344, -465462368, -362087840,
- -258438672, -179525856, -126554704, -78481920, -50925604, -34045784,
- -23199528, -16005132, -8766508, -4859691, -2711304, -1517993,
- -8},
+ {-421657408, -420139456, -418946528, -416800672, -412909824, -405768000, -398798528,
+ -388615168, -373701408, -352009344, -321306208, -295197120, -265052192, -232374288,
+ -199428848, -168474672, -140988896, -117445752, -97614400, -80976864, -67001780,
+ -50094052, -37102532, -27221788, -19805402, -14310412, -8231902, -4690747,
+ -2657887, -1501102, -8},
+ {-421657408, -420140000, -418948192, -416805888, -412925952, -405817184, -398893120,
+ -388794176, -374031200, -352591488, -322263520, -296453056, -266595328, -234127456,
+ -201261264, -170245168, -142589072, -118816232, -98738176, -81865128, -67681552,
+ -50525456, -37361620, -27370528, -19887816, -14354855, -8247121, -4695785,
+ -2659522, -1501627, -8},
+ {-421657408, -420140800, -418950720, -416813824, -412950592, -405892416, -399038240,
+ -389069472, -374540320, -353494496, -323757792, -298423616, -269030976, -236912448,
+ -204189776, -173088112, -145165408, -121023680, -100545224, -83288680, -68766080,
+ -51208344, -37768500, -27602440, -20015536, -14423394, -8270459, -4703484,
+ -2662016, -1502426, -8},
+ {-421657408, -420142816, -418957120, -416833824, -413012832, -406083552, -399408640,
+ -389776736, -375859200, -355859232, -327727008, -303720672, -275669600, -244617712,
+ -212408608, -181157008, -152524352, -127334256, -105689208, -87307640, -71794608,
+ -53080056, -38863244, -28216278, -20349054, -14600477, -8330017, -4722985,
+ -2668305, -1504437, -8},
+ {-421657408, -420144800, -418963328, -416853344, -413073952, -406272672, -399777664,
+ -390488160, -377202752, -358308960, -331931552, -309437728, -282992896, -253322816,
+ -221909888, -190657120, -161278432, -134848896, -111768392, -91990440, -75259304,
+ -55157184, -40043144, -28861386, -20692490, -14779979, -8389313, -4742193,
+ -2674461, -1506398, -8},
+ {-421657408, -420147904, -418973152, -416884384, -413171584, -406578080, -400379520,
+ -391663904, -379464224, -362537024, -339441728, -319954336, -296943136, -270562688,
+ -241463968, -210828720, -180193456, -151094736, -124714296, -101703096, -82215704,
+ -59120396, -42193204, -29993510, -21277910, -15079353, -8485847, -4773029,
+ -2684265, -1509508, -8},
+ {-421657408, -420152928, -418989024, -416934752, -413331616, -407087776, -401401280,
+ -393709888, -383542496, -370571008, -354857280, -343114528, -330489120, -316523520,
+ -299496896, -276320320, -244582704, -205903728, -165901376, -130010112, -100638328,
+ -68322528, -46691836, -32186576, -22350768, -15606794, -8648966, -4823931,
+ -2700238, -1514536, -8},
+ {-421657408, -420156352, -418999936, -416969504, -413443264, -407450528, -402143200,
+ -395241024, -386740960, -377366304, -369662048, -368527936, -375197024, -397609792,
+ -449444704, -516205344, -465462368, -362087840, -258438672, -179525856, -126554704,
+ -78481920, -50925604, -34045784, -23199528, -16005132, -8766508, -4859691,
+ -2711304, -1517993, -8},
},
{
- {-316243008, -314846624, -313757504, -311816352, -308352832, -302171008,
- -296337632, -288127456, -276678880, -261007888, -240267536, -223492144,
- -204621168, -184231584, -163158624, -142328848, -122556336, -104403368,
- -88154688, -73876192, -61498028, -46182700, -34260636, -25149106,
- -18299350, -13222144, -7605577, -4333749, -2455580, -1386840,
- -8},
- {-316243008, -314846912, -313758464, -311819232, -308361568, -302196544,
- -296384928, -288212416, -276825056, -261244496, -240620368, -223927216,
- -205130336, -184795472, -163749760, -142917408, -123115296, -104911600,
- -88598128, -74247992, -61798056, -46386168, -34389244, -25225818,
- -18343070, -13246209, -7614004, -4336575, -2456504, -1387137,
- -8},
- {-316243008, -314847392, -313759872, -311823616, -308374912, -302235744,
- -296457888, -288344192, -277053152, -261616784, -241180768, -224622800,
- -205949648, -185708016, -164710592, -143876416, -124026376, -105738512,
- -89317016, -74847736, -62279196, -46709404, -34591708, -25345634,
- -18410908, -13283356, -7626933, -4340893, -2457913, -1387591,
- -8},
- {-316243008, -314848512, -313763456, -311834752, -308408832, -302336288,
- -296646464, -288688576, -277658176, -262622288, -242727472, -226572608,
- -208281632, -188341072, -167512272, -146689680, -126701224, -108155704,
- -91399992, -76564696, -63637496, -47602000, -35139292, -25663914,
- -18588502, -13379500, -7659961, -4351839, -2461468, -1388732,
- -8},
- {-316243008, -314849632, -313766976, -311845632, -308442368, -302437024,
- -296837728, -289043648, -278295616, -263711632, -244460304, -228811328,
- -211025744, -191509376, -170942672, -150169120, -130013896, -111127320,
- -93923416, -78603784, -65214380, -48602508, -35733556, -26000038,
- -18772010, -13477196, -7692889, -4362630, -2464949, -1389845,
- -8},
- {-316243008, -314851424, -313772512, -311863040, -308496416, -302602400,
- -297156896, -289649696, -279417728, -265709072, -247806336, -233308272,
- -216768688, -198401504, -178640608, -158121504, -137602416, -117841504,
- -99474336, -82934744, -68436680, -50533948, -36825284, -26593332,
- -19086118, -13640626, -7746589, -4379970, -2470496, -1391610,
- -8},
- {-316243008, -314854272, -313781536, -311891520, -308586368, -302885760,
- -297719584, -290762368, -281600896, -269929024, -255733712, -245043328,
- -233506144, -220942752, -206510416, -188780416, -167001360, -142516672,
- -118085752, -95972952, -77157128, -55082252, -39133420, -27751764,
- -19665234, -13929854, -7837574, -4408639, -2479541, -1394467,
- -8},
- {-316243008, -314856224, -313787744, -311911360, -308650080, -303093120,
- -298144704, -291644064, -283459904, -273946496, -264748464, -260980560,
- -262699104, -277087104, -321151136, -394123776, -324055296, -228764208,
- -162653232, -119096664, -89459472, -60122148, -41317832, -28739578,
- -20125736, -14149188, -7903306, -4428810, -2485814, -1396432,
- -8},
+ {-316243008, -314846624, -313757504, -311816352, -308352832, -302171008, -296337632,
+ -288127456, -276678880, -261007888, -240267536, -223492144, -204621168, -184231584,
+ -163158624, -142328848, -122556336, -104403368, -88154688, -73876192, -61498028,
+ -46182700, -34260636, -25149106, -18299350, -13222144, -7605577, -4333749,
+ -2455580, -1386840, -8},
+ {-316243008, -314846912, -313758464, -311819232, -308361568, -302196544, -296384928,
+ -288212416, -276825056, -261244496, -240620368, -223927216, -205130336, -184795472,
+ -163749760, -142917408, -123115296, -104911600, -88598128, -74247992, -61798056,
+ -46386168, -34389244, -25225818, -18343070, -13246209, -7614004, -4336575,
+ -2456504, -1387137, -8},
+ {-316243008, -314847392, -313759872, -311823616, -308374912, -302235744, -296457888,
+ -288344192, -277053152, -261616784, -241180768, -224622800, -205949648, -185708016,
+ -164710592, -143876416, -124026376, -105738512, -89317016, -74847736, -62279196,
+ -46709404, -34591708, -25345634, -18410908, -13283356, -7626933, -4340893,
+ -2457913, -1387591, -8},
+ {-316243008, -314848512, -313763456, -311834752, -308408832, -302336288, -296646464,
+ -288688576, -277658176, -262622288, -242727472, -226572608, -208281632, -188341072,
+ -167512272, -146689680, -126701224, -108155704, -91399992, -76564696, -63637496,
+ -47602000, -35139292, -25663914, -18588502, -13379500, -7659961, -4351839,
+ -2461468, -1388732, -8},
+ {-316243008, -314849632, -313766976, -311845632, -308442368, -302437024, -296837728,
+ -289043648, -278295616, -263711632, -244460304, -228811328, -211025744, -191509376,
+ -170942672, -150169120, -130013896, -111127320, -93923416, -78603784, -65214380,
+ -48602508, -35733556, -26000038, -18772010, -13477196, -7692889, -4362630,
+ -2464949, -1389845, -8},
+ {-316243008, -314851424, -313772512, -311863040, -308496416, -302602400, -297156896,
+ -289649696, -279417728, -265709072, -247806336, -233308272, -216768688, -198401504,
+ -178640608, -158121504, -137602416, -117841504, -99474336, -82934744, -68436680,
+ -50533948, -36825284, -26593332, -19086118, -13640626, -7746589, -4379970,
+ -2470496, -1391610, -8},
+ {-316243008, -314854272, -313781536, -311891520, -308586368, -302885760, -297719584,
+ -290762368, -281600896, -269929024, -255733712, -245043328, -233506144, -220942752,
+ -206510416, -188780416, -167001360, -142516672, -118085752, -95972952, -77157128,
+ -55082252, -39133420, -27751764, -19665234, -13929854, -7837574, -4408639,
+ -2479541, -1394467, -8},
+ {-316243008, -314856224, -313787744, -311911360, -308650080, -303093120, -298144704,
+ -291644064, -283459904, -273946496, -264748464, -260980560, -262699104, -277087104,
+ -321151136, -394123776, -324055296, -228764208, -162653232, -119096664, -89459472,
+ -60122148, -41317832, -28739578, -20125736, -14149188, -7903306, -4428810,
+ -2485814, -1396432, -8},
},
{
- {-210828752, -209763872, -208938592, -207478800, -204908080, -200419808,
- -196290928, -190633648, -183000704, -172937696, -160110736, -149997216,
- -138756640, -126624232, -113938360, -101099096, -88510608, -76526296,
- -65413292, -55341440, -46391320, -35074012, -26116860, -19208966,
- -13991280, -10114557, -5820108, -3316738, -1879390, -1061436,
- -6},
- {-210828752, -209763984, -208938928, -207479824, -204911120, -200428400,
- -196306416, -190660464, -183044768, -173005280, -160206000, -150110752,
- -138886000, -126765304, -114085976, -101247840, -88655288, -76662120,
- -65536172, -55448360, -46480720, -35137564, -26158602, -19234616,
- -14006233, -10122926, -5823093, -3317749, -1879722, -1061544,
- -6},
- {-210828752, -209764144, -208939440, -207481376, -204915760, -200441648,
- -196330416, -190702288, -183114016, -173112528, -160358784, -150294128,
- -139096320, -126995880, -114328144, -101492256, -88892840, -76884536,
- -65736472, -55621628, -46624628, -35238804, -26224440, -19274738,
- -14029458, -10135854, -5827674, -3319296, -1880230, -1061707,
- -6},
- {-210828752, -209764560, -208940736, -207485328, -204927632, -200475856,
- -196392992, -190812944, -183300624, -173407952, -160790128, -150820560,
- -139709616, -127677056, -115050048, -102223736, -89602680, -77544552,
- -66324276, -56122908, -47034392, -35520116, -26403304, -19381648,
- -14090389, -10169365, -5839389, -3323218, -1881511, -1062120,
- -6},
- {-210828752, -209764960, -208941984, -207489216, -204939424, -200510464,
- -196457344, -190929120, -183501920, -173737552, -161290496, -151447952,
- -140459488, -128528240, -115966008, -103158080, -90506904, -78375592,
- -67050588, -56727872, -47516252, -35838308, -26598652, -19495052,
- -14153547, -10203492, -5851082, -3327087, -1882766, -1062523,
- -6},
- {-210828752, -209765600, -208944000, -207495456, -204958576, -200568016,
- -196566672, -191132352, -183868160, -174368384, -162309168, -152784224,
- -142129664, -130500376, -118149736, -105414376, -92679024, -80328376,
- -68699096, -58044540, -48519596, -36460372, -26960598, -19696400,
- -14262092, -10260742, -5870182, -3333310, -1884767, -1063161,
- -6},
- {-210828752, -209766624, -208947248, -207505712, -204990848, -200668832,
- -196765472, -191522144, -184625552, -175818224, -165011760, -156772320,
- -147807488, -138128816, -127521488, -115591360, -102270704, -88260840,
- -74642488, -62217976, -51336332, -37958768, -27737038, -20093356,
- -14463535, -10362521, -5902624, -3343612, -1888032, -1064195,
- -6},
- {-210828752, -209767344, -208949504, -207512928, -205014000, -200744384,
- -196920912, -191846704, -185318880, -177353360, -168608208, -163416672,
- -160727552, -165029760, -189074016, -241456784, -178005872, -122049664,
- -90479424, -70104056, -55475480, -39658748, -28482878, -20435214,
- -14624802, -10440065, -5926123, -3350872, -1890299, -1064907,
- -6},
+ {-210828752, -209763872, -208938592, -207478800, -204908080, -200419808, -196290928,
+ -190633648, -183000704, -172937696, -160110736, -149997216, -138756640, -126624232,
+ -113938360, -101099096, -88510608, -76526296, -65413292, -55341440, -46391320,
+ -35074012, -26116860, -19208966, -13991280, -10114557, -5820108, -3316738,
+ -1879390, -1061436, -6},
+ {-210828752, -209763984, -208938928, -207479824, -204911120, -200428400, -196306416,
+ -190660464, -183044768, -173005280, -160206000, -150110752, -138886000, -126765304,
+ -114085976, -101247840, -88655288, -76662120, -65536172, -55448360, -46480720,
+ -35137564, -26158602, -19234616, -14006233, -10122926, -5823093, -3317749,
+ -1879722, -1061544, -6},
+ {-210828752, -209764144, -208939440, -207481376, -204915760, -200441648, -196330416,
+ -190702288, -183114016, -173112528, -160358784, -150294128, -139096320, -126995880,
+ -114328144, -101492256, -88892840, -76884536, -65736472, -55621628, -46624628,
+ -35238804, -26224440, -19274738, -14029458, -10135854, -5827674, -3319296,
+ -1880230, -1061707, -6},
+ {-210828752, -209764560, -208940736, -207485328, -204927632, -200475856, -196392992,
+ -190812944, -183300624, -173407952, -160790128, -150820560, -139709616, -127677056,
+ -115050048, -102223736, -89602680, -77544552, -66324276, -56122908, -47034392,
+ -35520116, -26403304, -19381648, -14090389, -10169365, -5839389, -3323218,
+ -1881511, -1062120, -6},
+ {-210828752, -209764960, -208941984, -207489216, -204939424, -200510464, -196457344,
+ -190929120, -183501920, -173737552, -161290496, -151447952, -140459488, -128528240,
+ -115966008, -103158080, -90506904, -78375592, -67050588, -56727872, -47516252,
+ -35838308, -26598652, -19495052, -14153547, -10203492, -5851082, -3327087,
+ -1882766, -1062523, -6},
+ {-210828752, -209765600, -208944000, -207495456, -204958576, -200568016, -196566672,
+ -191132352, -183868160, -174368384, -162309168, -152784224, -142129664, -130500376,
+ -118149736, -105414376, -92679024, -80328376, -68699096, -58044540, -48519596,
+ -36460372, -26960598, -19696400, -14262092, -10260742, -5870182, -3333310,
+ -1884767, -1063161, -6},
+ {-210828752, -209766624, -208947248, -207505712, -204990848, -200668832, -196765472,
+ -191522144, -184625552, -175818224, -165011760, -156772320, -147807488, -138128816,
+ -127521488, -115591360, -102270704, -88260840, -74642488, -62217976, -51336332,
+ -37958768, -27737038, -20093356, -14463535, -10362521, -5902624, -3343612,
+ -1888032, -1064195, -6},
+ {-210828752, -209767344, -208949504, -207512928, -205014000, -200744384, -196920912,
+ -191846704, -185318880, -177353360, -168608208, -163416672, -160727552, -165029760,
+ -189074016, -241456784, -178005872, -122049664, -90479424, -70104056, -55475480,
+ -39658748, -28482878, -20435214, -14624802, -10440065, -5926123, -3350872,
+ -1890299, -1064907, -6},
},
{
- {-105414352, -104839424, -104395752, -103614840, -102251280, -99903608,
- -97777512, -94910408, -91113920, -86209240, -80075680, -75298248,
- -70016784, -64317188, -58324212, -52191704, -46086820, -40171652,
- -34586568, -29438702, -24797034, -18844524, -14076834, -10372790,
- -7563107, -5470588, -3149178, -1794887, -1017097, -574441,
- -3},
- {-105414352, -104839440, -104395800, -103614984, -102251696, -99904760,
- -97779552, -94913864, -91119448, -86217488, -80086968, -75311472,
- -70031648, -64333264, -58341004, -52208708, -46103540, -40187592,
- -34601256, -29451740, -24808154, -18852650, -14082296, -10376208,
- -7565130, -5471732, -3149590, -1795028, -1017143, -574456,
- -3},
- {-105414352, -104839464, -104395864, -103615200, -102252328, -99906536,
- -97782720, -94919272, -91128184, -86230632, -80105160, -75332928,
- -70055928, -64359668, -58368680, -52236764, -46131096, -40213784,
- -34625276, -29472926, -24826094, -18865612, -14090921, -10381562,
- -7568272, -5473500, -3150225, -1795243, -1017214, -574479,
- -3},
- {-105414352, -104839520, -104396048, -103615744, -102253960, -99911152,
- -97791032, -94933688, -91151920, -86267216, -80157128, -75395304,
- -70127624, -64438604, -58452116, -52321612, -46214216, -40292164,
- -34696280, -29534602, -24877444, -18901780, -14114420, -10395856,
- -7576529, -5478088, -3151847, -1795790, -1017393, -574537,
- -3},
- {-105414352, -104839576, -104396224, -103616288, -102255584, -99915840,
- -97799648, -94948992, -91177888, -86308728, -80218552, -75471128,
- -70217064, -64539224, -58559996, -52431912, -46321788, -40392244,
- -34785072, -29609788, -24938334, -18942936, -14140198, -10411064,
- -7585107, -5482767, -3153468, -1796330, -1017569, -574593,
- -3},
- {-105414352, -104839672, -104396504, -103617152, -102258232, -99923720,
- -97814464, -94976168, -91226088, -86390208, -80347520, -75638136,
- -70423480, -64780936, -58826440, -52707176, -46587912, -40633416,
- -34990872, -29776222, -25066836, -19024146, -14188261, -10438183,
- -7599891, -5490632, -3156117, -1797198, -1017849, -574683,
- -3},
- {-105414352, -104839816, -104396960, -103618592, -102262736, -99937720,
- -97841944, -95029800, -91329808, -86588032, -80716136, -76183440,
- -71203424, -65834124, -60122608, -54107304, -47891720, -41697004,
- -35779764, -30327718, -25439256, -19223604, -14292622, -10492064,
- -7627469, -5504662, -3160627, -1798637, -1018307, -574828,
- -3},
- {-105414352, -104839912, -104397280, -103619608, -102266000, -99948376,
- -97863944, -95076008, -91429704, -86814408, -81270896, -77262800,
- -73480376, -71228232, -75154784, -90330848, -64216360, -47491208,
- -38189996, -31457080, -26014454, -19455914, -14394384, -10538884,
- -7649672, -5515392, -3163898, -1799652, -1018624, -574928,
- -3},
+ {-105414352, -104839424, -104395752, -103614840, -102251280, -99903608, -97777512,
+ -94910408, -91113920, -86209240, -80075680, -75298248, -70016784, -64317188,
+ -58324212, -52191704, -46086820, -40171652, -34586568, -29438702, -24797034,
+ -18844524, -14076834, -10372790, -7563107, -5470588, -3149178, -1794887,
+ -1017097, -574441, -3},
+ {-105414352, -104839440, -104395800, -103614984, -102251696, -99904760, -97779552,
+ -94913864, -91119448, -86217488, -80086968, -75311472, -70031648, -64333264,
+ -58341004, -52208708, -46103540, -40187592, -34601256, -29451740, -24808154,
+ -18852650, -14082296, -10376208, -7565130, -5471732, -3149590, -1795028,
+ -1017143, -574456, -3},
+ {-105414352, -104839464, -104395864, -103615200, -102252328, -99906536, -97782720,
+ -94919272, -91128184, -86230632, -80105160, -75332928, -70055928, -64359668,
+ -58368680, -52236764, -46131096, -40213784, -34625276, -29472926, -24826094,
+ -18865612, -14090921, -10381562, -7568272, -5473500, -3150225, -1795243,
+ -1017214, -574479, -3},
+ {-105414352, -104839520, -104396048, -103615744, -102253960, -99911152, -97791032,
+ -94933688, -91151920, -86267216, -80157128, -75395304, -70127624, -64438604,
+ -58452116, -52321612, -46214216, -40292164, -34696280, -29534602, -24877444,
+ -18901780, -14114420, -10395856, -7576529, -5478088, -3151847, -1795790,
+ -1017393, -574537, -3},
+ {-105414352, -104839576, -104396224, -103616288, -102255584, -99915840, -97799648,
+ -94948992, -91177888, -86308728, -80218552, -75471128, -70217064, -64539224,
+ -58559996, -52431912, -46321788, -40392244, -34785072, -29609788, -24938334,
+ -18942936, -14140198, -10411064, -7585107, -5482767, -3153468, -1796330,
+ -1017569, -574593, -3},
+ {-105414352, -104839672, -104396504, -103617152, -102258232, -99923720, -97814464,
+ -94976168, -91226088, -86390208, -80347520, -75638136, -70423480, -64780936,
+ -58826440, -52707176, -46587912, -40633416, -34990872, -29776222, -25066836,
+ -19024146, -14188261, -10438183, -7599891, -5490632, -3156117, -1797198,
+ -1017849, -574683, -3},
+ {-105414352, -104839816, -104396960, -103618592, -102262736, -99937720, -97841944,
+ -95029800, -91329808, -86588032, -80716136, -76183440, -71203424, -65834124,
+ -60122608, -54107304, -47891720, -41697004, -35779764, -30327718, -25439256,
+ -19223604, -14292622, -10492064, -7627469, -5504662, -3160627, -1798637,
+ -1018307, -574828, -3},
+ {-105414352, -104839912, -104397280, -103619608, -102266000, -99948376, -97863944,
+ -95076008, -91429704, -86814408, -81270896, -77262800, -73480376, -71228232,
+ -75154784, -90330848, -64216360, -47491208, -38189996, -31457080, -26014454,
+ -19455914, -14394384, -10538884, -7649672, -5515392, -3163898, -1799652,
+ -1018624, -574928, -3},
}};
const FLOAT32 ixheaacd_c_l_table[31] = {
- 0.0000000317f, 0.0056233243f, 0.0099995006f, 0.0177799836f, 0.0316069759f,
- 0.0561454296f, 0.0791834071f, 0.1115021780f, 0.1565355211f, 0.2184644639f,
- 0.3015113473f, 0.3698741496f, 0.4480625093f, 0.5336171389f, 0.6219832897f,
- 0.7071067691f, 0.7830305099f, 0.8457261920f, 0.8940022588f, 0.9290818572f,
- 0.9534626007f, 0.9758449197f, 0.9876723289f, 0.9937641621f, 0.9968600869f,
- 0.9984226227f, 0.9995003939f, 0.9998419285f, 0.9999499917f, 0.9999842048f,
+ 0.0000000317f, 0.0056233243f, 0.0099995006f, 0.0177799836f, 0.0316069759f, 0.0561454296f,
+ 0.0791834071f, 0.1115021780f, 0.1565355211f, 0.2184644639f, 0.3015113473f, 0.3698741496f,
+ 0.4480625093f, 0.5336171389f, 0.6219832897f, 0.7071067691f, 0.7830305099f, 0.8457261920f,
+ 0.8940022588f, 0.9290818572f, 0.9534626007f, 0.9758449197f, 0.9876723289f, 0.9937641621f,
+ 0.9968600869f, 0.9984226227f, 0.9995003939f, 0.9998419285f, 0.9999499917f, 0.9999842048f,
1.0000000000f};
const FLOAT32 ixheaacd_sin_table[8][31] = {
- {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
- 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
+ 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f,
0.0000000000f},
- {0.3493293524f, 0.3474976718f, 0.3460844457f, 0.3435976505f, 0.3392568827f,
- 0.3317862749f, 0.3250220120f, 0.3158984482f, 0.3038074076f, 0.2881557941f,
- 0.2685075700f, 0.2531277537f, 0.2360326201f, 0.2174609900f, 0.1977837533f,
- 0.1774823964f, 0.1571052223f, 0.1372086108f, 0.1182965338f, 0.1007719785f,
- 0.0849095508f, 0.0645100474f, 0.0481502302f, 0.0354443900f, 0.0258174147f,
- 0.0186577141f, 0.0107282447f, 0.0061101262f, 0.0034608445f, 0.0019541229f,
+ {0.3493293524f, 0.3474976718f, 0.3460844457f, 0.3435976505f, 0.3392568827f, 0.3317862749f,
+ 0.3250220120f, 0.3158984482f, 0.3038074076f, 0.2881557941f, 0.2685075700f, 0.2531277537f,
+ 0.2360326201f, 0.2174609900f, 0.1977837533f, 0.1774823964f, 0.1571052223f, 0.1372086108f,
+ 0.1182965338f, 0.1007719785f, 0.0849095508f, 0.0645100474f, 0.0481502302f, 0.0354443900f,
+ 0.0258174147f, 0.0186577141f, 0.0107282447f, 0.0061101262f, 0.0034608445f, 0.0019541229f,
0.0000000112f},
- {0.5407552123f, 0.5382068753f, 0.5362367034f, 0.5327616334f, 0.5266705155f,
- 0.5161136985f, 0.5064760447f, 0.4933616221f, 0.4757848978f, 0.4527166188f,
- 0.4232914150f, 0.3999291360f, 0.3736581206f, 0.3448006511f, 0.3139205575f,
- 0.2817977965f, 0.2493559569f, 0.2175544947f, 0.1872726828f, 0.1592146605f,
- 0.1338564903f, 0.1013506278f, 0.0754068270f, 0.0553560853f, 0.0402308255f,
- 0.0290232040f, 0.0166547857f, 0.0094739906f, 0.0053623673f, 0.0030265595f,
+ {0.5407552123f, 0.5382068753f, 0.5362367034f, 0.5327616334f, 0.5266705155f, 0.5161136985f,
+ 0.5064760447f, 0.4933616221f, 0.4757848978f, 0.4527166188f, 0.4232914150f, 0.3999291360f,
+ 0.3736581206f, 0.3448006511f, 0.3139205575f, 0.2817977965f, 0.2493559569f, 0.2175544947f,
+ 0.1872726828f, 0.1592146605f, 0.1338564903f, 0.1013506278f, 0.0754068270f, 0.0553560853f,
+ 0.0402308255f, 0.0290232040f, 0.0166547857f, 0.0094739906f, 0.0053623673f, 0.0030265595f,
0.0000000172f},
- {0.7993091345f, 0.7966092229f, 0.7945095897f, 0.7907798290f, 0.7841621637f,
- 0.7724518776f, 0.7614971995f, 0.7461913228f, 0.7249697447f, 0.6959262490f,
- 0.6570158601f, 0.6247367263f, 0.5871030688f, 0.5443126559f, 0.4970877469f,
- 0.4466989934f, 0.3948508203f, 0.3434380591f, 0.2942485511f, 0.2487121671f,
- 0.2077666521f, 0.1557984799f, 0.1148999557f, 0.0837240443f, 0.0604878739f,
- 0.0434381589f, 0.0247973837f, 0.0140622752f, 0.0079450961f, 0.0044796630f,
+ {0.7993091345f, 0.7966092229f, 0.7945095897f, 0.7907798290f, 0.7841621637f, 0.7724518776f,
+ 0.7614971995f, 0.7461913228f, 0.7249697447f, 0.6959262490f, 0.6570158601f, 0.6247367263f,
+ 0.5871030688f, 0.5443126559f, 0.4970877469f, 0.4466989934f, 0.3948508203f, 0.3434380591f,
+ 0.2942485511f, 0.2487121671f, 0.2077666521f, 0.1557984799f, 0.1148999557f, 0.0837240443f,
+ 0.0604878739f, 0.0434381589f, 0.0247973837f, 0.0140622752f, 0.0079450961f, 0.0044796630f,
0.0000000251f},
- {0.9299681783f, 0.9280369282f, 0.9265220165f, 0.9238031507f, 0.9188926220f,
- 0.9099379182f, 0.9012627602f, 0.8886758685f, 0.8703642488f, 0.8437789083f,
- 0.8056230545f, 0.7719746232f, 0.7307193279f, 0.6815125942f, 0.6248562932f,
- 0.5622988343f, 0.4963409901f, 0.4300053716f, 0.3662271798f, 0.3073286414f,
- 0.2547603846f, 0.1888985783f, 0.1379434466f, 0.0997110680f, 0.0715898424f,
- 0.0511695705f, 0.0290579367f, 0.0164278019f, 0.0092652198f, 0.0052187350f,
+ {0.9299681783f, 0.9280369282f, 0.9265220165f, 0.9238031507f, 0.9188926220f, 0.9099379182f,
+ 0.9012627602f, 0.8886758685f, 0.8703642488f, 0.8437789083f, 0.8056230545f, 0.7719746232f,
+ 0.7307193279f, 0.6815125942f, 0.6248562932f, 0.5622988343f, 0.4963409901f, 0.4300053716f,
+ 0.3662271798f, 0.3073286414f, 0.2547603846f, 0.1888985783f, 0.1379434466f, 0.0997110680f,
+ 0.0715898424f, 0.0511695705f, 0.0290579367f, 0.0164278019f, 0.0092652198f, 0.0052187350f,
0.0000000293f},
- {1.0000000000f, 0.9999842048f, 0.9999499917f, 0.9998419285f, 0.9995003939f,
- 0.9984226227f, 0.9968600869f, 0.9937641621f, 0.9876723289f, 0.9758449197f,
- 0.9534626007f, 0.9290818572f, 0.8940022588f, 0.8457261920f, 0.7830305099f,
- 0.7071067691f, 0.6219832897f, 0.5336171389f, 0.4480625093f, 0.3698741496f,
- 0.3015113473f, 0.2184644639f, 0.1565355211f, 0.1115021780f, 0.0791834071f,
- 0.0561454296f, 0.0316069759f, 0.0177799836f, 0.0099995006f, 0.0056233243f,
+ {1.0000000000f, 0.9999842048f, 0.9999499917f, 0.9998419285f, 0.9995003939f, 0.9984226227f,
+ 0.9968600869f, 0.9937641621f, 0.9876723289f, 0.9758449197f, 0.9534626007f, 0.9290818572f,
+ 0.8940022588f, 0.8457261920f, 0.7830305099f, 0.7071067691f, 0.6219832897f, 0.5336171389f,
+ 0.4480625093f, 0.3698741496f, 0.3015113473f, 0.2184644639f, 0.1565355211f, 0.1115021780f,
+ 0.0791834071f, 0.0561454296f, 0.0316069759f, 0.0177799836f, 0.0099995006f, 0.0056233243f,
0.0000000317f},
- {0.8081330657f, 0.8108102083f, 0.8128942847f, 0.8166009784f, 0.8231918216f,
- 0.8348951936f, 0.8458821774f, 0.8612694144f, 0.8825767040f, 0.9113009572f,
- 0.9474825859f, 0.9732170701f, 0.9941481352f, 0.9986549616f, 0.9692055583f,
- 0.8913472891f, 0.7698673606f, 0.6301086545f, 0.4982543588f, 0.3874447048f,
- 0.2996203005f, 0.2040148675f, 0.1398789734f, 0.0966360196f, 0.0671908110f,
- 0.0469496064f, 0.0260316096f, 0.0145214461f, 0.0081289429f, 0.0045595206f,
+ {0.8081330657f, 0.8108102083f, 0.8128942847f, 0.8166009784f, 0.8231918216f, 0.8348951936f,
+ 0.8458821774f, 0.8612694144f, 0.8825767040f, 0.9113009572f, 0.9474825859f, 0.9732170701f,
+ 0.9941481352f, 0.9986549616f, 0.9692055583f, 0.8913472891f, 0.7698673606f, 0.6301086545f,
+ 0.4982543588f, 0.3874447048f, 0.2996203005f, 0.2040148675f, 0.1398789734f, 0.0966360196f,
+ 0.0671908110f, 0.0469496064f, 0.0260316096f, 0.0145214461f, 0.0081289429f, 0.0045595206f,
0.0000000256f},
- {0.1410673708f, 0.1418570578f, 0.1424777508f, 0.1435948759f, 0.1456248760f,
- 0.1493785530f, 0.1530961841f, 0.1586700380f, 0.1672619134f, 0.1810861230f,
- 0.2049261481f, 0.2318390310f, 0.2772761881f, 0.3656858206f, 0.5848061442f,
- 0.9974968433f, 0.4645280242f, 0.2307321429f, 0.1389672905f, 0.0922967792f,
- 0.0648033395f, 0.0405401327f, 0.0265092272f, 0.0178030711f, 0.0121608619f,
- 0.0084001739f, 0.0046050628f, 0.0025535184f, 0.0014247773f, 0.0007977211f,
+ {0.1410673708f, 0.1418570578f, 0.1424777508f, 0.1435948759f, 0.1456248760f, 0.1493785530f,
+ 0.1530961841f, 0.1586700380f, 0.1672619134f, 0.1810861230f, 0.2049261481f, 0.2318390310f,
+ 0.2772761881f, 0.3656858206f, 0.5848061442f, 0.9974968433f, 0.4645280242f, 0.2307321429f,
+ 0.1389672905f, 0.0922967792f, 0.0648033395f, 0.0405401327f, 0.0265092272f, 0.0178030711f,
+ 0.0121608619f, 0.0084001739f, 0.0046050628f, 0.0025535184f, 0.0014247773f, 0.0007977211f,
0.0000000047f}};
const FLOAT32 ixheaacd_cos_table[8][31] = {
- {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
- 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
- 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
- 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
- 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
- 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
1.0000000000f},
- {0.9369999766f, 0.9376808405f, 0.9382033348f, 0.9391169548f, 0.9406937957f,
- 0.9433546066f, 0.9457064271f, 0.9487929940f, 0.9527334571f, 0.9575835466f,
- 0.9632775784f, 0.9674328566f, 0.9717451334f, 0.9760690331f, 0.9802456498f,
- 0.9841240048f, 0.9875818491f, 0.9905421734f, 0.9929783344f, 0.9949095249f,
- 0.9963886738f, 0.9979170561f, 0.9988400936f, 0.9993716478f, 0.9996666908f,
- 0.9998259544f, 0.9999424219f, 0.9999813437f, 0.9999940395f, 0.9999980927f,
+ {0.9369999766f, 0.9376808405f, 0.9382033348f, 0.9391169548f, 0.9406937957f, 0.9433546066f,
+ 0.9457064271f, 0.9487929940f, 0.9527334571f, 0.9575835466f, 0.9632775784f, 0.9674328566f,
+ 0.9717451334f, 0.9760690331f, 0.9802456498f, 0.9841240048f, 0.9875818491f, 0.9905421734f,
+ 0.9929783344f, 0.9949095249f, 0.9963886738f, 0.9979170561f, 0.9988400936f, 0.9993716478f,
+ 0.9996666908f, 0.9998259544f, 0.9999424219f, 0.9999813437f, 0.9999940395f, 0.9999980927f,
1.0000000000f},
- {0.8411800265f, 0.8428127766f, 0.8440676332f, 0.8462653756f, 0.8500694633f,
- 0.8565201163f, 0.8622540236f, 0.8698242903f, 0.8795616627f, 0.8916544318f,
- 0.9059935808f, 0.9165460467f, 0.9275664687f, 0.9386759400f, 0.9494492412f,
- 0.9594737887f, 0.9684119225f, 0.9760481715f, 0.9823079705f, 0.9872440100f,
- 0.9910007119f, 0.9948507547f, 0.9971528649f, 0.9984666705f, 0.9991903901f,
- 0.9995787144f, 0.9998613000f, 0.9999551177f, 0.9999856353f, 0.9999954104f,
+ {0.8411800265f, 0.8428127766f, 0.8440676332f, 0.8462653756f, 0.8500694633f, 0.8565201163f,
+ 0.8622540236f, 0.8698242903f, 0.8795616627f, 0.8916544318f, 0.9059935808f, 0.9165460467f,
+ 0.9275664687f, 0.9386759400f, 0.9494492412f, 0.9594737887f, 0.9684119225f, 0.9760481715f,
+ 0.9823079705f, 0.9872440100f, 0.9910007119f, 0.9948507547f, 0.9971528649f, 0.9984666705f,
+ 0.9991903901f, 0.9995787144f, 0.9998613000f, 0.9999551177f, 0.9999856353f, 0.9999954104f,
1.0000000000f},
- {0.6009200215f, 0.6044946313f, 0.6072516441f, 0.6121006608f, 0.6205559969f,
- 0.6350733042f, 0.6481682062f, 0.6657315493f, 0.6887807250f, 0.7181132436f,
- 0.7538767457f, 0.7808354497f, 0.8095121980f, 0.8388824463f, 0.8677002788f,
- 0.8946843147f, 0.9187452197f, 0.9391753078f, 0.9557289481f, 0.9685774446f,
- 0.9781784415f, 0.9877888560f, 0.9933770895f, 0.9964889884f, 0.9981689453f,
- 0.9990561008f, 0.9996924996f, 0.9999011159f, 0.9999684095f, 0.9999899864f,
+ {0.6009200215f, 0.6044946313f, 0.6072516441f, 0.6121006608f, 0.6205559969f, 0.6350733042f,
+ 0.6481682062f, 0.6657315493f, 0.6887807250f, 0.7181132436f, 0.7538767457f, 0.7808354497f,
+ 0.8095121980f, 0.8388824463f, 0.8677002788f, 0.8946843147f, 0.9187452197f, 0.9391753078f,
+ 0.9557289481f, 0.9685774446f, 0.9781784415f, 0.9877888560f, 0.9933770895f, 0.9964889884f,
+ 0.9981689453f, 0.9990561008f, 0.9996924996f, 0.9999011159f, 0.9999684095f, 0.9999899864f,
1.0000000000f},
- {0.3676400185f, 0.3724882603f, 0.3762405813f, 0.3828677237f, 0.3945077062f,
- 0.4147444665f, 0.4332729578f, 0.4585359693f, 0.4924084246f, 0.5366908908f,
- 0.5924285054f, 0.6356533170f, 0.6826780438f, 0.7318063974f, 0.7807397842f,
- 0.8269340992f, 0.8681276441f, 0.9028263092f, 0.9305254817f, 0.9516034126f,
- 0.9670042396f, 0.9819965959f, 0.9904401302f, 0.9950164557f, 0.9974341393f,
- 0.9986900091f, 0.9995777011f, 0.9998650551f, 0.9999570847f, 0.9999864101f,
+ {0.3676400185f, 0.3724882603f, 0.3762405813f, 0.3828677237f, 0.3945077062f, 0.4147444665f,
+ 0.4332729578f, 0.4585359693f, 0.4924084246f, 0.5366908908f, 0.5924285054f, 0.6356533170f,
+ 0.6826780438f, 0.7318063974f, 0.7807397842f, 0.8269340992f, 0.8681276441f, 0.9028263092f,
+ 0.9305254817f, 0.9516034126f, 0.9670042396f, 0.9819965959f, 0.9904401302f, 0.9950164557f,
+ 0.9974341393f, 0.9986900091f, 0.9995777011f, 0.9998650551f, 0.9999570847f, 0.9999864101f,
1.0000000000f},
- {0.0000000317f, 0.0056233243f, 0.0099995006f, 0.0177799836f, 0.0316069759f,
- 0.0561454296f, 0.0791834071f, 0.1115021780f, 0.1565355211f, 0.2184644639f,
- 0.3015113473f, 0.3698741496f, 0.4480625093f, 0.5336171389f, 0.6219832897f,
- 0.7071067691f, 0.7830305099f, 0.8457261920f, 0.8940022588f, 0.9290818572f,
- 0.9534626007f, 0.9758449197f, 0.9876723289f, 0.9937641621f, 0.9968600869f,
- 0.9984226227f, 0.9995003939f, 0.9998419285f, 0.9999499917f, 0.9999842048f,
+ {0.0000000317f, 0.0056233243f, 0.0099995006f, 0.0177799836f, 0.0316069759f, 0.0561454296f,
+ 0.0791834071f, 0.1115021780f, 0.1565355211f, 0.2184644639f, 0.3015113473f, 0.3698741496f,
+ 0.4480625093f, 0.5336171389f, 0.6219832897f, 0.7071067691f, 0.7830305099f, 0.8457261920f,
+ 0.8940022588f, 0.9290818572f, 0.9534626007f, 0.9758449197f, 0.9876723289f, 0.9937641621f,
+ 0.9968600869f, 0.9984226227f, 0.9995003939f, 0.9998419285f, 0.9999499917f, 0.9999842048f,
1.0000000000f},
- {-0.5889999866f, -0.5853092074f, -0.5824112892f, -0.5772026181f,
- -0.5677633882f, -0.5504089594f, -0.5333698392f, -0.5081486106f,
- -0.4701685011f, -0.4117408693f, -0.3198074102f, -0.2298880965f,
- -0.1080254018f, 0.0518490225f, 0.2462531030f, 0.4533210695f,
- 0.6382039785f, 0.7765069604f, 0.8670309186f, 0.9218929410f,
- 0.9540585279f, 0.9789677858f, 0.9901686311f, 0.9953197837f,
- 0.9977401495f, 0.9988972545f, 0.9996611476f, 0.9998945594f,
- 0.9999669790f, 0.9999896288f, 1.0000000000f},
- {-0.9900000095f, -0.9898871779f, -0.9897980094f, -0.9896365404f,
- -0.9893398881f, -0.9887800813f, -0.9882112741f, -0.9873316884f,
- -0.9859125018f, -0.9834672213f, -0.9787774086f, -0.9727541804f,
- -0.9607902765f, -0.9307383299f, -0.8111730814f, 0.0707106814f,
- 0.8855584264f, 0.9730173349f, 0.9902969599f, 0.9957315326f,
- 0.9978980422f, 0.9991779327f, 0.9996485710f, 0.9998415112f,
- 0.9999260306f, 0.9999647141f, 0.9999893904f, 0.9999967217f,
- 0.9999989867f, 0.9999997020f, 1.0000000000f}};
-
-const FLOAT32
- ixheaacd_mps_polyphase_filter_coeff[10 * MAX_NUM_QMF_BANDS_SAC / 2] = {
- 0.000000f, 0.002620f, -0.000553f, 0.002787f, -0.000562f, 0.002947f,
- -0.000495f, 0.003113f, -0.000488f, 0.003274f, -0.000489f, 0.003442f,
- -0.000504f, 0.003601f, -0.000523f, 0.003760f, -0.000547f, 0.003921f,
- -0.000568f, 0.004082f, -0.000587f, 0.004226f, -0.000613f, 0.004373f,
- -0.000631f, 0.004521f, -0.000654f, 0.004661f, -0.000678f, 0.004793f,
- -0.000694f, 0.004914f, -0.000716f, 0.005039f, -0.000726f, 0.005141f,
- -0.000744f, 0.005246f, -0.000749f, 0.005347f, -0.000768f, 0.005420f,
- -0.000772f, 0.005488f, -0.000783f, 0.005548f, -0.000778f, 0.005594f,
- -0.000780f, 0.005622f, -0.000780f, 0.005646f, -0.000776f, 0.005639f,
- -0.000763f, 0.005627f, -0.000753f, 0.005592f, -0.000732f, 0.005540f,
- -0.000722f, 0.005475f, -0.000692f, 0.005384f, -0.000665f, 0.005272f,
- -0.000634f, 0.005138f, -0.000595f, 0.004984f, -0.000556f, 0.004811f,
- -0.000515f, 0.004604f, -0.000461f, 0.004380f, -0.000410f, 0.004125f,
- -0.000350f, 0.003846f, -0.000290f, 0.003540f, -0.000210f, 0.003209f,
- -0.000145f, 0.002845f, -0.000062f, 0.002451f, 0.000013f, 0.002027f,
- 0.000109f, 0.001578f, 0.000204f, 0.001090f, 0.000295f, 0.000583f,
- 0.000403f, 0.000028f, 0.000511f, -0.000546f, 0.000624f, -0.001157f,
- 0.000746f, -0.001804f, 0.000861f, -0.002483f, 0.000989f, -0.003193f,
- 0.001125f, -0.003940f, 0.001258f, -0.004722f, 0.001390f, -0.005534f,
- 0.001544f, -0.006379f, 0.001687f, -0.007262f, 0.001835f, -0.008180f,
- 0.001984f, -0.009133f, 0.002146f, -0.010115f, 0.002302f, -0.011132f,
- 0.002463f, -0.012185f, 0.013272f, 0.070353f, 0.014390f, 0.068966f,
- 0.015541f, 0.067453f, 0.016732f, 0.065769f, 0.017943f, 0.063944f,
- 0.019187f, 0.061960f, 0.020453f, 0.059817f, 0.021747f, 0.057515f,
- 0.023068f, 0.055046f, 0.024416f, 0.052409f, 0.025788f, 0.049598f,
- 0.027186f, 0.046630f, 0.028607f, 0.043477f, 0.030050f, 0.040146f,
- 0.031502f, 0.036642f, 0.032975f, 0.032958f, 0.034462f, 0.029082f,
- 0.035970f, 0.025031f, 0.037481f, 0.020800f, 0.039005f, 0.016370f,
- 0.040535f, 0.011762f, 0.042065f, 0.006964f, 0.043610f, 0.001977f,
- 0.045149f, -0.003209f, 0.046684f, -0.008571f, 0.048217f, -0.014129f,
- 0.049739f, -0.019883f, 0.051256f, -0.025823f, 0.052763f, -0.031953f,
- 0.054245f, -0.038278f, 0.055717f, -0.044781f, 0.057162f, -0.051480f,
- 0.058592f, -0.058371f, 0.059984f, -0.065441f, 0.061346f, -0.072694f,
- 0.062686f, -0.080137f, 0.063972f, -0.087755f, 0.065225f, -0.095553f,
- 0.066437f, -0.103533f, 0.067608f, -0.111683f, 0.068704f, -0.120008f,
- 0.069763f, -0.128500f, 0.070763f, -0.137155f, 0.071700f, -0.145977f,
- 0.072568f, -0.154961f, 0.073362f, -0.164096f, 0.074100f, -0.173381f,
- 0.074745f, -0.182817f, 0.075314f, -0.192397f, 0.075801f, -0.202125f,
- 0.076199f, -0.211974f, 0.076499f, -0.221965f, 0.076709f, -0.232069f,
- 0.076817f, -0.242302f, 0.076823f, -0.252648f, 0.076720f, -0.263105f,
- 0.076505f, -0.273663f, 0.076175f, -0.284321f, 0.075731f, -0.295072f,
- 0.075158f, -0.305910f, 0.074466f, -0.316828f, 0.073641f, -0.327811f,
- 0.072677f, -0.338872f, 0.071583f, -0.349991f, 0.361159f, 0.853739f,
- 0.372380f, 0.853572f, 0.383635f, 0.853102f, 0.394921f, 0.852305f,
- 0.406232f, 0.851197f, 0.417570f, 0.849780f, 0.428912f, 0.848032f,
- 0.440255f, 0.845982f, 0.451600f, 0.843624f, 0.462931f, 0.840954f,
- 0.474245f, 0.837972f, 0.485525f, 0.834694f, 0.496771f, 0.831104f,
- 0.507982f, 0.827228f, 0.519123f, 0.823042f, 0.530224f, 0.818578f,
- 0.541255f, 0.813819f, 0.552205f, 0.808770f, 0.563079f, 0.803449f,
- 0.573852f, 0.797847f, 0.584540f, 0.791974f, 0.595112f, 0.785835f,
- 0.605578f, 0.779429f, 0.615911f, 0.772778f, 0.626124f, 0.765867f,
- 0.636198f, 0.758708f, 0.646127f, 0.751314f, 0.655902f, 0.743683f,
- 0.665514f, 0.735821f, 0.674966f, 0.727745f, 0.684235f, 0.719446f,
- 0.693328f, 0.710941f, 0.702239f, 0.702239f, 0.710941f, 0.693328f,
- 0.719446f, 0.684235f, 0.727745f, 0.674966f, 0.735821f, 0.665514f,
- 0.743683f, 0.655902f, 0.751314f, 0.646127f, 0.758708f, 0.636198f,
- 0.765867f, 0.626124f, 0.772778f, 0.615911f, 0.779429f, 0.605578f,
- 0.785835f, 0.595112f, 0.791974f, 0.584540f, 0.797847f, 0.573852f,
- 0.803449f, 0.563079f, 0.808770f, 0.552205f, 0.813819f, 0.541255f,
- 0.818578f, 0.530224f, 0.823042f, 0.519123f, 0.827228f, 0.507982f,
- 0.831104f, 0.496771f, 0.834694f, 0.485525f, 0.837972f, 0.474245f,
- 0.840954f, 0.462931f, 0.843624f, 0.451600f, 0.845982f, 0.440255f,
- 0.848032f, 0.428912f, 0.849780f, 0.417570f, 0.851197f, 0.406232f,
- 0.852305f, 0.394921f, 0.853102f, 0.383635f, 0.853572f, 0.372380f,
- -0.361159f, 0.070353f, -0.349991f, 0.071583f, -0.338872f, 0.072677f,
- -0.327811f, 0.073641f, -0.316828f, 0.074466f, -0.305910f, 0.075158f,
- -0.295072f, 0.075731f, -0.284321f, 0.076175f, -0.273663f, 0.076505f,
- -0.263105f, 0.076720f, -0.252648f, 0.076823f, -0.242302f, 0.076817f,
- -0.232069f, 0.076709f, -0.221965f, 0.076499f, -0.211974f, 0.076199f,
- -0.202125f, 0.075801f, -0.192397f, 0.075314f, -0.182817f, 0.074745f,
- -0.173381f, 0.074100f, -0.164096f, 0.073362f, -0.154961f, 0.072568f,
- -0.145977f, 0.071700f, -0.137155f, 0.070763f, -0.128500f, 0.069763f,
- -0.120008f, 0.068704f, -0.111683f, 0.067608f, -0.103533f, 0.066437f,
- -0.095553f, 0.065225f, -0.087755f, 0.063972f, -0.080137f, 0.062686f,
- -0.072694f, 0.061346f, -0.065441f, 0.059984f, -0.058371f, 0.058592f,
- -0.051480f, 0.057162f, -0.044781f, 0.055717f, -0.038278f, 0.054245f,
- -0.031953f, 0.052763f, -0.025823f, 0.051256f, -0.019883f, 0.049739f,
- -0.014129f, 0.048217f, -0.008571f, 0.046684f, -0.003209f, 0.045149f,
- 0.001977f, 0.043610f, 0.006964f, 0.042065f, 0.011762f, 0.040535f,
- 0.016370f, 0.039005f, 0.020800f, 0.037481f, 0.025031f, 0.035970f,
- 0.029082f, 0.034462f, 0.032958f, 0.032975f, 0.036642f, 0.031502f,
- 0.040146f, 0.030050f, 0.043477f, 0.028607f, 0.046630f, 0.027186f,
- 0.049598f, 0.025788f, 0.052409f, 0.024416f, 0.055046f, 0.023068f,
- 0.057515f, 0.021747f, 0.059817f, 0.020453f, 0.061960f, 0.019187f,
- 0.063944f, 0.017943f, 0.065769f, 0.016732f, 0.067453f, 0.015541f,
- 0.068966f, 0.014390f, -0.013272f, 0.002620f, -0.012185f, 0.002463f,
- -0.011132f, 0.002302f, -0.010115f, 0.002146f, -0.009133f, 0.001984f,
- -0.008180f, 0.001835f, -0.007262f, 0.001687f, -0.006379f, 0.001544f,
- -0.005534f, 0.001390f, -0.004722f, 0.001258f, -0.003940f, 0.001125f,
- -0.003193f, 0.000989f, -0.002483f, 0.000861f, -0.001804f, 0.000746f,
- -0.001157f, 0.000624f, -0.000546f, 0.000511f, 0.000028f, 0.000403f,
- 0.000583f, 0.000295f, 0.001090f, 0.000204f, 0.001578f, 0.000109f,
- 0.002027f, 0.000013f, 0.002451f, -0.000062f, 0.002845f, -0.000145f,
- 0.003209f, -0.000210f, 0.003540f, -0.000290f, 0.003846f, -0.000350f,
- 0.004125f, -0.000410f, 0.004380f, -0.000461f, 0.004604f, -0.000515f,
- 0.004811f, -0.000556f, 0.004984f, -0.000595f, 0.005138f, -0.000634f,
- 0.005272f, -0.000665f, 0.005384f, -0.000692f, 0.005475f, -0.000722f,
- 0.005540f, -0.000732f, 0.005592f, -0.000753f, 0.005627f, -0.000763f,
- 0.005639f, -0.000776f, 0.005646f, -0.000780f, 0.005622f, -0.000780f,
- 0.005594f, -0.000778f, 0.005548f, -0.000783f, 0.005488f, -0.000772f,
- 0.005420f, -0.000768f, 0.005347f, -0.000749f, 0.005246f, -0.000744f,
- 0.005141f, -0.000726f, 0.005039f, -0.000716f, 0.004914f, -0.000694f,
- 0.004793f, -0.000678f, 0.004661f, -0.000654f, 0.004521f, -0.000631f,
- 0.004373f, -0.000613f, 0.004226f, -0.000587f, 0.004082f, -0.000568f,
- 0.003921f, -0.000547f, 0.003760f, -0.000523f, 0.003601f, -0.000504f,
- 0.003442f, -0.000489f, 0.003274f, -0.000488f, 0.003113f, -0.000495f,
- 0.002947f, -0.000562f, 0.002787f, -0.000553f};
+ {-0.5889999866f, -0.5853092074f, -0.5824112892f, -0.5772026181f, -0.5677633882f,
+ -0.5504089594f, -0.5333698392f, -0.5081486106f, -0.4701685011f, -0.4117408693f,
+ -0.3198074102f, -0.2298880965f, -0.1080254018f, 0.0518490225f, 0.2462531030f,
+ 0.4533210695f, 0.6382039785f, 0.7765069604f, 0.8670309186f, 0.9218929410f,
+ 0.9540585279f, 0.9789677858f, 0.9901686311f, 0.9953197837f, 0.9977401495f,
+ 0.9988972545f, 0.9996611476f, 0.9998945594f, 0.9999669790f, 0.9999896288f,
+ 1.0000000000f},
+ {-0.9900000095f, -0.9898871779f, -0.9897980094f, -0.9896365404f, -0.9893398881f,
+ -0.9887800813f, -0.9882112741f, -0.9873316884f, -0.9859125018f, -0.9834672213f,
+ -0.9787774086f, -0.9727541804f, -0.9607902765f, -0.9307383299f, -0.8111730814f,
+ 0.0707106814f, 0.8855584264f, 0.9730173349f, 0.9902969599f, 0.9957315326f,
+ 0.9978980422f, 0.9991779327f, 0.9996485710f, 0.9998415112f, 0.9999260306f,
+ 0.9999647141f, 0.9999893904f, 0.9999967217f, 0.9999989867f, 0.9999997020f,
+ 1.0000000000f}};
+
+const FLOAT32 ixheaacd_mps_polyphase_filter_coeff[10 * MAX_NUM_QMF_BANDS_SAC / 2] = {
+ 0.000000f, 0.002620f, -0.000553f, 0.002787f, -0.000562f, 0.002947f, -0.000495f,
+ 0.003113f, -0.000488f, 0.003274f, -0.000489f, 0.003442f, -0.000504f, 0.003601f,
+ -0.000523f, 0.003760f, -0.000547f, 0.003921f, -0.000568f, 0.004082f, -0.000587f,
+ 0.004226f, -0.000613f, 0.004373f, -0.000631f, 0.004521f, -0.000654f, 0.004661f,
+ -0.000678f, 0.004793f, -0.000694f, 0.004914f, -0.000716f, 0.005039f, -0.000726f,
+ 0.005141f, -0.000744f, 0.005246f, -0.000749f, 0.005347f, -0.000768f, 0.005420f,
+ -0.000772f, 0.005488f, -0.000783f, 0.005548f, -0.000778f, 0.005594f, -0.000780f,
+ 0.005622f, -0.000780f, 0.005646f, -0.000776f, 0.005639f, -0.000763f, 0.005627f,
+ -0.000753f, 0.005592f, -0.000732f, 0.005540f, -0.000722f, 0.005475f, -0.000692f,
+ 0.005384f, -0.000665f, 0.005272f, -0.000634f, 0.005138f, -0.000595f, 0.004984f,
+ -0.000556f, 0.004811f, -0.000515f, 0.004604f, -0.000461f, 0.004380f, -0.000410f,
+ 0.004125f, -0.000350f, 0.003846f, -0.000290f, 0.003540f, -0.000210f, 0.003209f,
+ -0.000145f, 0.002845f, -0.000062f, 0.002451f, 0.000013f, 0.002027f, 0.000109f,
+ 0.001578f, 0.000204f, 0.001090f, 0.000295f, 0.000583f, 0.000403f, 0.000028f,
+ 0.000511f, -0.000546f, 0.000624f, -0.001157f, 0.000746f, -0.001804f, 0.000861f,
+ -0.002483f, 0.000989f, -0.003193f, 0.001125f, -0.003940f, 0.001258f, -0.004722f,
+ 0.001390f, -0.005534f, 0.001544f, -0.006379f, 0.001687f, -0.007262f, 0.001835f,
+ -0.008180f, 0.001984f, -0.009133f, 0.002146f, -0.010115f, 0.002302f, -0.011132f,
+ 0.002463f, -0.012185f, 0.013272f, 0.070353f, 0.014390f, 0.068966f, 0.015541f,
+ 0.067453f, 0.016732f, 0.065769f, 0.017943f, 0.063944f, 0.019187f, 0.061960f,
+ 0.020453f, 0.059817f, 0.021747f, 0.057515f, 0.023068f, 0.055046f, 0.024416f,
+ 0.052409f, 0.025788f, 0.049598f, 0.027186f, 0.046630f, 0.028607f, 0.043477f,
+ 0.030050f, 0.040146f, 0.031502f, 0.036642f, 0.032975f, 0.032958f, 0.034462f,
+ 0.029082f, 0.035970f, 0.025031f, 0.037481f, 0.020800f, 0.039005f, 0.016370f,
+ 0.040535f, 0.011762f, 0.042065f, 0.006964f, 0.043610f, 0.001977f, 0.045149f,
+ -0.003209f, 0.046684f, -0.008571f, 0.048217f, -0.014129f, 0.049739f, -0.019883f,
+ 0.051256f, -0.025823f, 0.052763f, -0.031953f, 0.054245f, -0.038278f, 0.055717f,
+ -0.044781f, 0.057162f, -0.051480f, 0.058592f, -0.058371f, 0.059984f, -0.065441f,
+ 0.061346f, -0.072694f, 0.062686f, -0.080137f, 0.063972f, -0.087755f, 0.065225f,
+ -0.095553f, 0.066437f, -0.103533f, 0.067608f, -0.111683f, 0.068704f, -0.120008f,
+ 0.069763f, -0.128500f, 0.070763f, -0.137155f, 0.071700f, -0.145977f, 0.072568f,
+ -0.154961f, 0.073362f, -0.164096f, 0.074100f, -0.173381f, 0.074745f, -0.182817f,
+ 0.075314f, -0.192397f, 0.075801f, -0.202125f, 0.076199f, -0.211974f, 0.076499f,
+ -0.221965f, 0.076709f, -0.232069f, 0.076817f, -0.242302f, 0.076823f, -0.252648f,
+ 0.076720f, -0.263105f, 0.076505f, -0.273663f, 0.076175f, -0.284321f, 0.075731f,
+ -0.295072f, 0.075158f, -0.305910f, 0.074466f, -0.316828f, 0.073641f, -0.327811f,
+ 0.072677f, -0.338872f, 0.071583f, -0.349991f, 0.361159f, 0.853739f, 0.372380f,
+ 0.853572f, 0.383635f, 0.853102f, 0.394921f, 0.852305f, 0.406232f, 0.851197f,
+ 0.417570f, 0.849780f, 0.428912f, 0.848032f, 0.440255f, 0.845982f, 0.451600f,
+ 0.843624f, 0.462931f, 0.840954f, 0.474245f, 0.837972f, 0.485525f, 0.834694f,
+ 0.496771f, 0.831104f, 0.507982f, 0.827228f, 0.519123f, 0.823042f, 0.530224f,
+ 0.818578f, 0.541255f, 0.813819f, 0.552205f, 0.808770f, 0.563079f, 0.803449f,
+ 0.573852f, 0.797847f, 0.584540f, 0.791974f, 0.595112f, 0.785835f, 0.605578f,
+ 0.779429f, 0.615911f, 0.772778f, 0.626124f, 0.765867f, 0.636198f, 0.758708f,
+ 0.646127f, 0.751314f, 0.655902f, 0.743683f, 0.665514f, 0.735821f, 0.674966f,
+ 0.727745f, 0.684235f, 0.719446f, 0.693328f, 0.710941f, 0.702239f, 0.702239f,
+ 0.710941f, 0.693328f, 0.719446f, 0.684235f, 0.727745f, 0.674966f, 0.735821f,
+ 0.665514f, 0.743683f, 0.655902f, 0.751314f, 0.646127f, 0.758708f, 0.636198f,
+ 0.765867f, 0.626124f, 0.772778f, 0.615911f, 0.779429f, 0.605578f, 0.785835f,
+ 0.595112f, 0.791974f, 0.584540f, 0.797847f, 0.573852f, 0.803449f, 0.563079f,
+ 0.808770f, 0.552205f, 0.813819f, 0.541255f, 0.818578f, 0.530224f, 0.823042f,
+ 0.519123f, 0.827228f, 0.507982f, 0.831104f, 0.496771f, 0.834694f, 0.485525f,
+ 0.837972f, 0.474245f, 0.840954f, 0.462931f, 0.843624f, 0.451600f, 0.845982f,
+ 0.440255f, 0.848032f, 0.428912f, 0.849780f, 0.417570f, 0.851197f, 0.406232f,
+ 0.852305f, 0.394921f, 0.853102f, 0.383635f, 0.853572f, 0.372380f, -0.361159f,
+ 0.070353f, -0.349991f, 0.071583f, -0.338872f, 0.072677f, -0.327811f, 0.073641f,
+ -0.316828f, 0.074466f, -0.305910f, 0.075158f, -0.295072f, 0.075731f, -0.284321f,
+ 0.076175f, -0.273663f, 0.076505f, -0.263105f, 0.076720f, -0.252648f, 0.076823f,
+ -0.242302f, 0.076817f, -0.232069f, 0.076709f, -0.221965f, 0.076499f, -0.211974f,
+ 0.076199f, -0.202125f, 0.075801f, -0.192397f, 0.075314f, -0.182817f, 0.074745f,
+ -0.173381f, 0.074100f, -0.164096f, 0.073362f, -0.154961f, 0.072568f, -0.145977f,
+ 0.071700f, -0.137155f, 0.070763f, -0.128500f, 0.069763f, -0.120008f, 0.068704f,
+ -0.111683f, 0.067608f, -0.103533f, 0.066437f, -0.095553f, 0.065225f, -0.087755f,
+ 0.063972f, -0.080137f, 0.062686f, -0.072694f, 0.061346f, -0.065441f, 0.059984f,
+ -0.058371f, 0.058592f, -0.051480f, 0.057162f, -0.044781f, 0.055717f, -0.038278f,
+ 0.054245f, -0.031953f, 0.052763f, -0.025823f, 0.051256f, -0.019883f, 0.049739f,
+ -0.014129f, 0.048217f, -0.008571f, 0.046684f, -0.003209f, 0.045149f, 0.001977f,
+ 0.043610f, 0.006964f, 0.042065f, 0.011762f, 0.040535f, 0.016370f, 0.039005f,
+ 0.020800f, 0.037481f, 0.025031f, 0.035970f, 0.029082f, 0.034462f, 0.032958f,
+ 0.032975f, 0.036642f, 0.031502f, 0.040146f, 0.030050f, 0.043477f, 0.028607f,
+ 0.046630f, 0.027186f, 0.049598f, 0.025788f, 0.052409f, 0.024416f, 0.055046f,
+ 0.023068f, 0.057515f, 0.021747f, 0.059817f, 0.020453f, 0.061960f, 0.019187f,
+ 0.063944f, 0.017943f, 0.065769f, 0.016732f, 0.067453f, 0.015541f, 0.068966f,
+ 0.014390f, -0.013272f, 0.002620f, -0.012185f, 0.002463f, -0.011132f, 0.002302f,
+ -0.010115f, 0.002146f, -0.009133f, 0.001984f, -0.008180f, 0.001835f, -0.007262f,
+ 0.001687f, -0.006379f, 0.001544f, -0.005534f, 0.001390f, -0.004722f, 0.001258f,
+ -0.003940f, 0.001125f, -0.003193f, 0.000989f, -0.002483f, 0.000861f, -0.001804f,
+ 0.000746f, -0.001157f, 0.000624f, -0.000546f, 0.000511f, 0.000028f, 0.000403f,
+ 0.000583f, 0.000295f, 0.001090f, 0.000204f, 0.001578f, 0.000109f, 0.002027f,
+ 0.000013f, 0.002451f, -0.000062f, 0.002845f, -0.000145f, 0.003209f, -0.000210f,
+ 0.003540f, -0.000290f, 0.003846f, -0.000350f, 0.004125f, -0.000410f, 0.004380f,
+ -0.000461f, 0.004604f, -0.000515f, 0.004811f, -0.000556f, 0.004984f, -0.000595f,
+ 0.005138f, -0.000634f, 0.005272f, -0.000665f, 0.005384f, -0.000692f, 0.005475f,
+ -0.000722f, 0.005540f, -0.000732f, 0.005592f, -0.000753f, 0.005627f, -0.000763f,
+ 0.005639f, -0.000776f, 0.005646f, -0.000780f, 0.005622f, -0.000780f, 0.005594f,
+ -0.000778f, 0.005548f, -0.000783f, 0.005488f, -0.000772f, 0.005420f, -0.000768f,
+ 0.005347f, -0.000749f, 0.005246f, -0.000744f, 0.005141f, -0.000726f, 0.005039f,
+ -0.000716f, 0.004914f, -0.000694f, 0.004793f, -0.000678f, 0.004661f, -0.000654f,
+ 0.004521f, -0.000631f, 0.004373f, -0.000613f, 0.004226f, -0.000587f, 0.004082f,
+ -0.000568f, 0.003921f, -0.000547f, 0.003760f, -0.000523f, 0.003601f, -0.000504f,
+ 0.003442f, -0.000489f, 0.003274f, -0.000488f, 0.003113f, -0.000495f, 0.002947f,
+ -0.000562f, 0.002787f, -0.000553f};
const FLOAT32 ixheaacd_mps_post_twid[30] = {
- 0.998795f, 0.049068f, 0.995185f, 0.098017f, 0.989177f, 0.146730f,
- 0.980785f, 0.195090f, 0.970031f, 0.242980f, 0.956940f, 0.290285f,
- 0.941544f, 0.336890f, 0.923880f, 0.382683f, 0.903989f, 0.427555f,
- 0.881921f, 0.471397f, 0.857729f, 0.514103f, 0.831470f, 0.555570f,
+ 0.998795f, 0.049068f, 0.995185f, 0.098017f, 0.989177f, 0.146730f, 0.980785f, 0.195090f,
+ 0.970031f, 0.242980f, 0.956940f, 0.290285f, 0.941544f, 0.336890f, 0.923880f, 0.382683f,
+ 0.903989f, 0.427555f, 0.881921f, 0.471397f, 0.857729f, 0.514103f, 0.831470f, 0.555570f,
0.803208f, 0.595699f, 0.773010f, 0.634393f, 0.740951f, 0.671559f};
const FLOAT32 ixheaacd_ldmps_pre_twid[32] = {
- 0.0156202940f, 0.0003834558f, 0.0155826630f, 0.0011494453f,
- 0.0155074932f, 0.0019126660f, 0.0153949633f, 0.0026712785f,
- 0.0152453454f, 0.0034234561f, 0.0150590008f, 0.0041673859f,
- 0.0148363775f, 0.0049012764f, 0.0145780127f, 0.0056233592f,
- 0.0142845269f, 0.0063318950f, 0.0139566287f, 0.0070251762f,
- 0.0135951089f, 0.0077015338f, 0.0132008363f, 0.0083593372f,
- 0.0127747618f, 0.0089970026f, 0.0123179127f, 0.0096129924f,
- 0.0118313879f, 0.0102058258f, 0.0113163600f, 0.0107740704f };
+ 0.0156202940f, 0.0003834558f, 0.0155826630f, 0.0011494453f, 0.0155074932f, 0.0019126660f,
+ 0.0153949633f, 0.0026712785f, 0.0152453454f, 0.0034234561f, 0.0150590008f, 0.0041673859f,
+ 0.0148363775f, 0.0049012764f, 0.0145780127f, 0.0056233592f, 0.0142845269f, 0.0063318950f,
+ 0.0139566287f, 0.0070251762f, 0.0135951089f, 0.0077015338f, 0.0132008363f, 0.0083593372f,
+ 0.0127747618f, 0.0089970026f, 0.0123179127f, 0.0096129924f, 0.0118313879f, 0.0102058258f,
+ 0.0113163600f, 0.0107740704f};
const FLOAT32 ixheaacd_mps_post_re_32[64] = {
- 1.0000000000f, 0.9987954497f, 0.9951847196f, 0.9891765118f,
- 0.9807852507f, 0.9700312614f, 0.9569403529f, 0.9415440559f,
- 0.9238795042f, 0.9039893150f, 0.8819212317f, 0.8577286005f,
- 0.8314695954f, 0.8032075167f, 0.7730104327f, 0.7409511209f,
- 0.7071067691f, 0.6715589166f, 0.6343932748f, 0.5956993103f,
- 0.5555701852f, 0.5141026974f, 0.4713966548f, 0.4275551140f,
- 0.3826834261f, 0.3368898332f, 0.2902846336f, 0.2429801226f,
- 0.1950902343f, 0.1467304826f, 0.0980171338f, 0.0490676500f,
- -0.0000000433f, -0.0490677357f, -0.0980172232f, -0.1467305720f,
- -0.1950903237f, -0.2429801971f, -0.2902847230f, -0.3368899226f,
- -0.3826835155f, -0.4275550842f, -0.4713968337f, -0.5141027570f,
- -0.5555703640f, -0.5956993699f, -0.6343932748f, -0.6715590358f,
- -0.7071067691f, -0.7409512401f, -0.7730104923f, -0.8032076359f,
- -0.8314696550f, -0.8577286005f, -0.8819213510f, -0.9039893150f,
- -0.9238796234f, -0.9415441155f, -0.9569403529f, -0.9700312614f,
- -0.9807853103f, -0.9891765118f, -0.9951847196f, -0.9987954497f
-};
+ 1.0000000000f, 0.9987954497f, 0.9951847196f, 0.9891765118f, 0.9807852507f,
+ 0.9700312614f, 0.9569403529f, 0.9415440559f, 0.9238795042f, 0.9039893150f,
+ 0.8819212317f, 0.8577286005f, 0.8314695954f, 0.8032075167f, 0.7730104327f,
+ 0.7409511209f, 0.7071067691f, 0.6715589166f, 0.6343932748f, 0.5956993103f,
+ 0.5555701852f, 0.5141026974f, 0.4713966548f, 0.4275551140f, 0.3826834261f,
+ 0.3368898332f, 0.2902846336f, 0.2429801226f, 0.1950902343f, 0.1467304826f,
+ 0.0980171338f, 0.0490676500f, -0.0000000433f, -0.0490677357f, -0.0980172232f,
+ -0.1467305720f, -0.1950903237f, -0.2429801971f, -0.2902847230f, -0.3368899226f,
+ -0.3826835155f, -0.4275550842f, -0.4713968337f, -0.5141027570f, -0.5555703640f,
+ -0.5956993699f, -0.6343932748f, -0.6715590358f, -0.7071067691f, -0.7409512401f,
+ -0.7730104923f, -0.8032076359f, -0.8314696550f, -0.8577286005f, -0.8819213510f,
+ -0.9039893150f, -0.9238796234f, -0.9415441155f, -0.9569403529f, -0.9700312614f,
+ -0.9807853103f, -0.9891765118f, -0.9951847196f, -0.9987954497f};
const FLOAT32 ixheaacd_mps_post_im_32[64] = {
- 0.0000000000f, 0.0490676761f, 0.0980171412f, 0.1467304677f,
- 0.1950903237f, 0.2429801822f, 0.2902846634f, 0.3368898630f,
- 0.3826834559f, 0.4275550842f, 0.4713967443f, 0.5141027570f,
- 0.5555702448f, 0.5956993103f, 0.6343933344f, 0.6715589762f,
- 0.7071067691f, 0.7409511805f, 0.7730104327f, 0.8032075167f,
- 0.8314696550f, 0.8577286601f, 0.8819212914f, 0.9039893150f,
- 0.9238795042f, 0.9415440559f, 0.9569403529f, 0.9700312614f,
- 0.9807853103f, 0.9891765118f, 0.9951847196f, 0.9987954497f,
- 1.0000000000f, 0.9987954497f, 0.9951847196f, 0.9891765118f,
- 0.9807852507f, 0.9700312614f, 0.9569402933f, 0.9415440559f,
- 0.9238795042f, 0.9039893150f, 0.8819212317f, 0.8577286005f,
- 0.8314695358f, 0.8032075167f, 0.7730104923f, 0.7409510612f,
- 0.7071067691f, 0.6715588570f, 0.6343932748f, 0.5956991315f,
- 0.5555701852f, 0.5141027570f, 0.4713966250f, 0.4275550544f,
- 0.3826832771f, 0.3368898034f, 0.2902846932f, 0.2429800779f,
+ 0.0000000000f, 0.0490676761f, 0.0980171412f, 0.1467304677f, 0.1950903237f, 0.2429801822f,
+ 0.2902846634f, 0.3368898630f, 0.3826834559f, 0.4275550842f, 0.4713967443f, 0.5141027570f,
+ 0.5555702448f, 0.5956993103f, 0.6343933344f, 0.6715589762f, 0.7071067691f, 0.7409511805f,
+ 0.7730104327f, 0.8032075167f, 0.8314696550f, 0.8577286601f, 0.8819212914f, 0.9039893150f,
+ 0.9238795042f, 0.9415440559f, 0.9569403529f, 0.9700312614f, 0.9807853103f, 0.9891765118f,
+ 0.9951847196f, 0.9987954497f, 1.0000000000f, 0.9987954497f, 0.9951847196f, 0.9891765118f,
+ 0.9807852507f, 0.9700312614f, 0.9569402933f, 0.9415440559f, 0.9238795042f, 0.9039893150f,
+ 0.8819212317f, 0.8577286005f, 0.8314695358f, 0.8032075167f, 0.7730104923f, 0.7409510612f,
+ 0.7071067691f, 0.6715588570f, 0.6343932748f, 0.5956991315f, 0.5555701852f, 0.5141027570f,
+ 0.4713966250f, 0.4275550544f, 0.3826832771f, 0.3368898034f, 0.2902846932f, 0.2429800779f,
0.1950903088f, 0.1467303336f, 0.0980170965f, 0.0490674861f,
};
const FLOAT32 ixheaacd_mps_pre_twid[64] = {
- 0.015624f, 0.000192f, 0.015614f, 0.000575f, 0.015596f, 0.000958f, 0.015567f,
- 0.001341f, 0.015530f, 0.001722f, 0.015483f, 0.002103f, 0.015427f, 0.002482f,
- 0.015361f, 0.002860f, 0.015286f, 0.003236f, 0.015202f, 0.003610f, 0.015109f,
- 0.003982f, 0.015007f, 0.004352f, 0.014895f, 0.004719f, 0.014775f, 0.005083f,
- 0.014646f, 0.005444f, 0.014508f, 0.005802f, 0.014361f, 0.006156f, 0.014206f,
- 0.006507f, 0.014042f, 0.006853f, 0.013869f, 0.007196f, 0.013689f, 0.007534f,
- 0.013500f, 0.007868f, 0.013302f, 0.008197f, 0.013097f, 0.008521f, 0.012884f,
- 0.008840f, 0.012663f, 0.009153f, 0.012435f, 0.009461f, 0.012199f, 0.009763f,
- 0.011956f, 0.010060f, 0.011705f, 0.010350f, 0.011448f, 0.010634f, 0.011183f,
- 0.010912f};
+ 0.015624f, 0.000192f, 0.015614f, 0.000575f, 0.015596f, 0.000958f, 0.015567f, 0.001341f,
+ 0.015530f, 0.001722f, 0.015483f, 0.002103f, 0.015427f, 0.002482f, 0.015361f, 0.002860f,
+ 0.015286f, 0.003236f, 0.015202f, 0.003610f, 0.015109f, 0.003982f, 0.015007f, 0.004352f,
+ 0.014895f, 0.004719f, 0.014775f, 0.005083f, 0.014646f, 0.005444f, 0.014508f, 0.005802f,
+ 0.014361f, 0.006156f, 0.014206f, 0.006507f, 0.014042f, 0.006853f, 0.013869f, 0.007196f,
+ 0.013689f, 0.007534f, 0.013500f, 0.007868f, 0.013302f, 0.008197f, 0.013097f, 0.008521f,
+ 0.012884f, 0.008840f, 0.012663f, 0.009153f, 0.012435f, 0.009461f, 0.012199f, 0.009763f,
+ 0.011956f, 0.010060f, 0.011705f, 0.010350f, 0.011448f, 0.010634f, 0.011183f, 0.010912f};
const FLOAT32 ixheaacd_ia_mps_hyb_filter_coeff_8[QMF_HYBRID_FILT_ORDER] = {
0.007461f, 0.022704f, 0.045469f, 0.072661f, 0.098851f, 0.117937f, 0.125000f,
0.117937f, 0.098851f, 0.072661f, 0.045469f, 0.022704f, 0.007462f};
const FLOAT32 ixheaacd_mps_hyb_filter_coeff_2[QMF_HYBRID_FILT_ORDER] = {
- 0.000000f, 0.018995f, 0.000000f, -0.072931f, 0.000000f,
- 0.305966f, 0.500000f, 0.305966f, 0.000000f, -0.072931f,
- 0.000000f, 0.018995f, 0.000000f};
+ 0.000000f, 0.018995f, 0.000000f, -0.072931f, 0.000000f, 0.305966f, 0.500000f,
+ 0.305966f, 0.000000f, -0.072931f, 0.000000f, 0.018995f, 0.000000f};
const FLOAT32 ixheaacd_sine[8][8] = {
- {0.000000f, -0.382683f, -0.707107f, -0.923880f, -1.000000f, -0.923880f,
- -0.707107f, -0.382683f},
- {0.000000f, -0.923880f, -0.707107f, 0.382684f, 1.000000f, 0.382683f,
- -0.707107f, -0.923880f},
- {0.000000f, -0.923880f, 0.707107f, 0.382683f, -1.000000f, 0.382684f,
- 0.707107f, -0.923880f},
- {0.000000f, -0.382683f, 0.707107f, -0.923879f, 1.000000f, -0.923880f,
- 0.707107f, -0.382683f},
- {0.000000f, 0.382684f, -0.707107f, 0.923880f, -1.000000f, 0.923879f,
- -0.707106f, 0.382684f},
- {0.000000f, 0.923880f, -0.707107f, -0.382684f, 1.000000f, -0.382683f,
- -0.707107f, 0.923880f},
- {0.000000f, 0.923880f, 0.707107f, -0.382683f, -1.000000f, -0.382684f,
- 0.707106f, 0.923880f},
- {0.000000f, 0.382683f, 0.707107f, 0.923879f, 1.000000f, 0.923880f,
- 0.707107f, 0.382683f}};
+ {0.000000f, -0.382683f, -0.707107f, -0.923880f, -1.000000f, -0.923880f, -0.707107f,
+ -0.382683f},
+ {0.000000f, -0.923880f, -0.707107f, 0.382684f, 1.000000f, 0.382683f, -0.707107f, -0.923880f},
+ {0.000000f, -0.923880f, 0.707107f, 0.382683f, -1.000000f, 0.382684f, 0.707107f, -0.923880f},
+ {0.000000f, -0.382683f, 0.707107f, -0.923879f, 1.000000f, -0.923880f, 0.707107f, -0.382683f},
+ {0.000000f, 0.382684f, -0.707107f, 0.923880f, -1.000000f, 0.923879f, -0.707106f, 0.382684f},
+ {0.000000f, 0.923880f, -0.707107f, -0.382684f, 1.000000f, -0.382683f, -0.707107f, 0.923880f},
+ {0.000000f, 0.923880f, 0.707107f, -0.382683f, -1.000000f, -0.382684f, 0.707106f, 0.923880f},
+ {0.000000f, 0.382683f, 0.707107f, 0.923879f, 1.000000f, 0.923880f, 0.707107f, 0.382683f}};
const FLOAT32 ixheaacd_cosine[8][8] = {
- {1.000000f, 0.923880f, 0.707107f, 0.382683f, -46.000000f, -0.382683f,
- -0.707107f, -0.923880f},
- {1.000000f, 0.382683f, -0.707107f, -0.923880f, 140.000000f, 0.923880f,
- 0.707107f, -0.382683f},
- {1.000000f, -0.382683f, -0.707107f, 0.923880f, -234.000000f, -0.923879f,
- 0.707107f, 0.382683f},
- {1.000000f, -0.923880f, 0.707107f, -0.382684f, 328.000000f, 0.382683f,
- -0.707106f, 0.923880f},
- {1.000000f, -0.923880f, 0.707107f, -0.382683f, -422.000000f, 0.382684f,
- -0.707107f, 0.923880f},
- {1.000000f, -0.382683f, -0.707107f, 0.923879f, 516.000000f, -0.923880f,
- 0.707106f, 0.382683f},
- {1.000000f, 0.382684f, -0.707107f, -0.923880f, -610.000000f, 0.923879f,
- 0.707107f, -0.382684f},
- {1.000000f, 0.923880f, 0.707107f, 0.382684f, 704.000000f, -0.382683f,
- -0.707106f, -0.923880f}};
+ {1.000000f, 0.923880f, 0.707107f, 0.382683f, -46.000000f, -0.382683f, -0.707107f, -0.923880f},
+ {1.000000f, 0.382683f, -0.707107f, -0.923880f, 140.000000f, 0.923880f, 0.707107f, -0.382683f},
+ {1.000000f, -0.382683f, -0.707107f, 0.923880f, -234.000000f, -0.923879f, 0.707107f,
+ 0.382683f},
+ {1.000000f, -0.923880f, 0.707107f, -0.382684f, 328.000000f, 0.382683f, -0.707106f, 0.923880f},
+ {1.000000f, -0.923880f, 0.707107f, -0.382683f, -422.000000f, 0.382684f, -0.707107f,
+ 0.923880f},
+ {1.000000f, -0.382683f, -0.707107f, 0.923879f, 516.000000f, -0.923880f, 0.707106f, 0.382683f},
+ {1.000000f, 0.382684f, -0.707107f, -0.923880f, -610.000000f, 0.923879f, 0.707107f,
+ -0.382684f},
+ {1.000000f, 0.923880f, 0.707107f, 0.382684f, 704.000000f, -0.382683f, -0.707106f,
+ -0.923880f}};
const WORD32 ixheaacd_cosine2[2][13] = {
{
+ 1073741823, 1073741823, 1073741823, 1073741823, 1073741823, 1073741823, 1073741823,
1073741823, 1073741823, 1073741823, 1073741823, 1073741823, 1073741823,
- 1073741823, 1073741823, 1073741823, 1073741823, 1073741823, 1073741823,
- 1073741823,
},
{
- 1073741823, -1073741823, 1073741823, -1073741823, 1073741823,
- -1073741823, 1073741823, -1073741823, 1073741823, -1073741823,
- 1073741823, -1073741823, 1073741823,
+ 1073741823, -1073741823, 1073741823, -1073741823, 1073741823, -1073741823, 1073741823,
+ -1073741823, 1073741823, -1073741823, 1073741823, -1073741823, 1073741823,
},
};
-const WORD32 ixheaacd_mps_gain_set_indx[29] = {
- 1, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 21, 23, 25, 27, 30, 33, 37, 42, 48, 55, 70};
+const WORD32 ixheaacd_mps_gain_set_indx[29] = {1, 0, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 21, 23,
+ 25, 27, 30, 33, 37, 42, 48, 55, 70};
const FLOAT32 ixheaacd_ldmps_polyphase_filter_coeff[1280] = {
- -0.0007949257f, -0.0012320746f, -0.0016010543f, -0.0019807201f,
- -0.0023975046f, -0.0028387094f, -0.0033147549f, -0.0038251812f,
- -0.0043653073f, -0.0049372604f, -0.0055373814f, -0.0061642416f,
- -0.0068165790f, -0.0074901022f, -0.0081837112f, -0.0088949297f,
- -0.0096200043f, -0.0103569683f, -0.0111023858f, -0.0118535860f,
- -0.0126076927f, -0.0133608067f, -0.0141103314f, -0.0148531627f,
- -0.0155855091f, -0.0163043682f, -0.0170061402f, -0.0176877063f,
- -0.0183456801f, -0.0189761259f, -0.0195760578f, -0.0201421324f,
- -0.0206706170f, -0.0211581476f, -0.0216013081f, -0.0219969619f,
- -0.0223416910f, -0.0226317085f, -0.0228641648f, -0.0230358951f,
- -0.0231434479f, -0.0231835246f, -0.0231529772f, -0.0230491832f,
- -0.0228686444f, -0.0226079077f, -0.0222644433f, -0.0218351875f,
- -0.0213169195f, -0.0207061488f, -0.0199998133f, -0.0191956628f,
- -0.0182893611f, -0.0172771178f, -0.0161564853f, -0.0149233583f,
- -0.0135741979f, -0.0121037029f, -0.0105075520f, -0.0087857461f,
- -0.0069273291f, -0.0049293786f, -0.0028003342f, -0.0004685577f,
- 0.0022103144f, 0.0051832944f, 0.0083509637f, 0.0116611840f,
- 0.0151316673f, 0.0187726468f, 0.0225889906f, 0.0265906155f,
- 0.0307808779f, 0.0351639129f, 0.0397467501f, 0.0445330814f,
- 0.0495262593f, 0.0547302663f, 0.0601483546f, 0.0657841489f,
- 0.0716395080f, 0.0777165666f, 0.0840179473f, 0.0905451626f,
- 0.0972988978f, 0.1042804047f, 0.1114900783f, 0.1189284250f,
- 0.1265947521f, 0.1344885528f, 0.1426091045f, 0.1509550363f,
- 0.1595243514f, 0.1683151573f, 0.1773250401f, 0.1865511388f,
- 0.1959902197f, 0.2056386322f, 0.2154925913f, 0.2255475521f,
- 0.2357989848f, 0.2462418824f, 0.2568709552f, 0.2676805258f,
- 0.2786645591f, 0.2898168266f, 0.3011307418f, 0.3125994802f,
- 0.3242157102f, 0.3359722793f, 0.3478614092f, 0.3598752320f,
- 0.3720056713f, 0.3842444420f, 0.3965831101f, 0.4090129435f,
- 0.4215250909f, 0.4341109097f, 0.4467608333f, 0.4594659507f,
- 0.4722166657f, 0.4850038290f, 0.4978178144f, 0.5106483698f,
- 0.5234865546f, 0.5363218188f, 0.5491440296f, 0.5619440079f,
- -0.5746001601f, -0.5872559547f, -0.5998619199f, -0.6123980284f,
- -0.6248505116f, -0.6372103095f, -0.6494654417f, -0.6616044044f,
- -0.6736174226f, -0.6854929924f, -0.6972201467f, -0.7087881565f,
- -0.7201859951f, -0.7314035296f, -0.7424294949f, -0.7532534599f,
- -0.7638649344f, -0.7742537856f, -0.7844095230f, -0.7943222523f,
- -0.8039818406f, -0.8133789897f, -0.8225036860f, -0.8313468695f,
- -0.8398991823f, -0.8481519818f, -0.8560963273f, -0.8637239933f,
- -0.8710266352f, -0.8779965043f, -0.8846257925f, -0.8909071684f,
- -0.8968337178f, -0.9023985267f, -0.9075955749f, -0.9124187231f,
- -0.9168621302f, -0.9209204316f, -0.9245886207f, -0.9278619289f,
- -0.9307362437f, -0.9332075119f, -0.9352724552f, -0.9369278550f,
- -0.9381709695f, -0.9389997125f, -0.9394121170f, -0.9394068122f,
- -0.9389829040f, -0.9381397963f, -0.9368773103f, -0.9351961017f,
- -0.9330966473f, -0.9305803180f, -0.9276487827f, -0.9243040681f,
- -0.9205487967f, -0.9163856506f, -0.9118180275f, -0.9068503380f,
- -0.9014858603f, -0.8957295418f, -0.8895882368f, -0.8830582500f,
- -0.8761259913f, -0.8688043952f, -0.8611140251f, -0.8530684114f,
- -0.8446723223f, -0.8359322548f, -0.8268554807f, -0.8174491525f,
- -0.8077214956f, -0.7976809740f, -0.7873360515f, -0.7766956687f,
- -0.7657692432f, -0.7545663714f, -0.7430967689f, -0.7313705087f,
- -0.7193979621f, -0.7071895599f, -0.6947561502f, -0.6821083426f,
- -0.6692573428f, -0.6562142968f, -0.6429904699f, -0.6295973659f,
- -0.6160464287f, -0.6023493409f, -0.5885176659f, -0.5745630264f,
- -0.5604973435f, -0.5463322401f, -0.5320795774f, -0.5177509785f,
- -0.5033583045f, -0.4889132082f, -0.4744274616f, -0.4599125087f,
- -0.4453800321f, -0.4308412969f, -0.4163077474f, -0.4017905891f,
- -0.3873008788f, -0.3728497028f, -0.3584479988f, -0.3441060781f,
- -0.3298346698f, -0.3156442046f, -0.3015447557f, -0.2875462472f,
- -0.2736584544f, -0.2598909736f, -0.2462531626f, -0.2327540070f,
- -0.2194025517f, -0.2062072009f, -0.1931765229f, -0.1803186089f,
- -0.1676410586f, -0.1551517546f, -0.1428578347f, -0.1307662129f,
- -0.1188837960f, -0.1072167307f, -0.0957711190f, -0.0845528170f,
- 0.0735579357f, 0.0628051385f, 0.0522958934f, 0.0420338102f,
- 0.0320230126f, 0.0222672001f, 0.0127700046f, 0.0035346728f,
- -0.0054356726f, -0.0141385710f, -0.0225714780f, -0.0307325479f,
- -0.0386199504f, -0.0462324508f, -0.0535687581f, -0.0606284477f,
- -0.0674108788f, -0.0739159212f, -0.0801439285f, -0.0860951766f,
- -0.0917705968f, -0.0971711874f, -0.1022983864f, -0.1071535870f,
- -0.1117390916f, -0.1160565540f, -0.1201089993f, -0.1238986105f,
- -0.1274286509f, -0.1307021976f, -0.1337226629f, -0.1364936531f,
- -0.1390190870f, -0.1413030326f, -0.1433497667f, -0.1451636255f,
- -0.1467494071f, -0.1481117010f, -0.1492556185f, -0.1501862854f,
- -0.1509089023f, -0.1514289081f, -0.1517517567f, -0.1518831998f,
- -0.1518289149f, -0.1515947729f, -0.1511866748f, -0.1506105959f,
- -0.1498726010f, -0.1489787102f, -0.1479352117f, -0.1467481852f,
- -0.1454239190f, -0.1439685971f, -0.1423884183f, -0.1406896859f,
- -0.1388785988f, -0.1369612068f, -0.1349437684f, -0.1328323931f,
- -0.1306331158f, -0.1283520460f, -0.1259952188f, -0.1235680804f,
- -0.1210755706f, -0.1185237169f, -0.1159184426f, -0.1132654399f,
- -0.1105698794f, -0.1078369170f, -0.1050716117f, -0.1022789180f,
- -0.0994636714f, -0.0966306925f, -0.0937845483f, -0.0909297019f,
- -0.0880705118f, -0.0852110758f, -0.0823556259f, -0.0795079023f,
- -0.0766717792f, -0.0738509223f, -0.0710486695f, -0.0682684705f,
- -0.0655134097f, -0.0627865866f, -0.0600909144f, -0.0574291982f,
- -0.0548038296f, -0.0522173792f, -0.0496721379f, -0.0471702330f,
- -0.0447136387f, -0.0423043817f, -0.0399438478f, -0.0376337133f,
- -0.0353754386f, -0.0331703536f, -0.0310197119f, -0.0289245304f,
- -0.0268857535f, -0.0249042176f, -0.0229805857f, -0.0211154576f,
- -0.0193092767f, -0.0175623931f, -0.0158751141f, -0.0142475078f,
- -0.0126795555f, -0.0111712581f, -0.0097224051f, -0.0083327051f,
- -0.0070017893f, -0.0057292255f, -0.0045145033f, -0.0033569466f,
- -0.0022558495f, -0.0012104595f, -0.0002199477f, 0.0007167263f,
- 0.0016004397f, 0.0024323659f, 0.0032136049f, 0.0039453004f,
- 0.0046286648f, 0.0052649761f, 0.0058556525f, 0.0064016338f,
- -0.0069030458f, -0.0073645366f, -0.0077859173f, -0.0081687812f,
- -0.0085145105f, -0.0088245263f, -0.0091004446f, -0.0093438197f,
- -0.0095560895f, -0.0097389296f, -0.0098937284f, -0.0100222183f,
- -0.0101256752f, -0.0102057597f, -0.0102638984f, -0.0103016300f,
- -0.0103203785f, -0.0103215463f, -0.0103065800f, -0.0102768280f,
- -0.0102336034f, -0.0101782102f, -0.0101119522f, -0.0100360261f,
- -0.0099515645f, -0.0098597351f, -0.0097616902f, -0.0096583357f,
- -0.0095505062f, -0.0094392402f, -0.0093253115f, -0.0092095714f,
- -0.0090927295f, -0.0089755040f, -0.0088585643f, -0.0087425476f,
- -0.0086279176f, -0.0085152360f, -0.0084048351f, -0.0082970457f,
- -0.0081921816f, -0.0080905585f, -0.0079923403f, -0.0078977877f,
- -0.0078069791f, -0.0077200048f, -0.0076368991f, -0.0075576920f,
- -0.0074823610f, -0.0074108820f, -0.0073430836f, -0.0072789183f,
- -0.0072182063f, -0.0071608433f, -0.0071066003f, -0.0070552491f,
- -0.0070065912f, -0.0069604507f, -0.0069165546f, -0.0068746237f,
- -0.0068344427f, -0.0067957863f, -0.0067584766f, -0.0067221262f,
- -0.0066861408f, -0.0066502281f, -0.0066143544f, -0.0065783206f,
- -0.0065418649f, -0.0065047294f, -0.0064666905f, -0.0064275563f,
- -0.0063871238f, -0.0063452618f, -0.0063017663f, -0.0062565422f,
- -0.0062093716f, -0.0061602155f, -0.0061089024f, -0.0060553551f,
- -0.0059994739f, -0.0059412112f, -0.0058804955f, -0.0058172857f,
- -0.0057515362f, -0.0056832312f, -0.0056123761f, -0.0055389581f,
- -0.0054629631f, -0.0053843958f, -0.0053033372f, -0.0052197399f,
- -0.0051336233f, -0.0050450461f, -0.0049540084f, -0.0048605883f,
- -0.0047647208f, -0.0046664691f, -0.0045659458f, -0.0044631511f,
- -0.0043581501f, -0.0042509669f, -0.0041416343f, -0.0040301653f,
- -0.0039165970f, -0.0038009947f, -0.0036834506f, -0.0035639144f,
- -0.0034424895f, -0.0033192560f, -0.0031942502f, -0.0030675260f,
- -0.0029391386f, -0.0028091520f, -0.0026777033f, -0.0025448306f,
- -0.0024106177f, -0.0022751903f, -0.0021385867f, -0.0020008814f,
- -0.0018621609f, -0.0017228508f, -0.0015830053f, -0.0014426354f,
- -0.0013017356f, -0.0011605313f, -0.0010187104f, -0.0008753659f,
- 0.0007250868f, 0.0005901512f, 0.0004571248f, 0.0003254497f,
- 0.0001951829f, 0.0000666175f, -0.0000600275f, -0.0001845164f,
- -0.0003065709f, -0.0004259665f, -0.0005424777f, -0.0006558085f,
- -0.0007659104f, -0.0008724863f, -0.0009753527f, -0.0010743001f,
- -0.0011691442f, -0.0012597255f, -0.0013458347f, -0.0014273394f,
- -0.0015040794f, -0.0015758807f, -0.0016426332f, -0.0017042002f,
- -0.0017605145f, -0.0018114587f, -0.0018569818f, -0.0018970286f,
- -0.0019315863f, -0.0019606268f, -0.0019841781f, -0.0020022886f,
- -0.0020149164f, -0.0020221891f, -0.0020242548f, -0.0020211563f,
- -0.0020131115f, -0.0020002127f, -0.0019826870f, -0.0019606939f,
- -0.0019344082f, -0.0019041235f, -0.0018700724f, -0.0018325197f,
- -0.0017917566f, -0.0017479789f, -0.0017015412f, -0.0016526897f,
- -0.0016016904f, -0.0015489543f, -0.0014947094f, -0.0014391905f,
- -0.0013827635f, -0.0013256427f, -0.0012681838f, -0.0012105964f,
- -0.0011530248f, -0.0010959618f, -0.0010395534f, -0.0009838343f,
- -0.0009290278f, -0.0008749813f, -0.0008215802f, -0.0007706117f,
- -0.0007240456f, -0.0006849431f, -0.0006499495f, -0.0006169267f,
- -0.0005864026f, -0.0005585561f, -0.0005332623f, -0.0005106712f,
- -0.0004907669f, -0.0004734583f, -0.0004585870f, -0.0004460039f,
- -0.0004356373f, -0.0004273243f, -0.0004208330f, -0.0004159436f,
- -0.0004123962f, -0.0004100222f, -0.0004085470f, -0.0004077079f,
- -0.0004073251f, -0.0004070932f, -0.0004067607f, -0.0004061488f,
- -0.0004050555f, -0.0004033837f, -0.0004008813f, -0.0003973767f,
- -0.0003928188f, -0.0003870558f, -0.0003799992f, -0.0003715968f,
- -0.0003617546f, -0.0003505340f, -0.0003378810f, -0.0003237817f,
- -0.0003083795f, -0.0002916576f, -0.0002737129f, -0.0002546264f,
- -0.0002344782f, -0.0002134573f, -0.0001916261f, -0.0001692856f,
- -0.0001466954f, -0.0001236852f, -0.0001005735f, -0.0000775065f,
- -0.0000546696f, -0.0000325590f, -0.0000109682f, 0.0000098813f,
- 0.0000295145f, 0.0000481009f, 0.0000651376f, 0.0000805138f,
- 0.0000942973f, 0.0001058290f, 0.0001155818f, 0.0001229653f,
- 0.0001266878f, 0.0001279376f, 0.0001216913f, 0.0000938624f,
- -0.0007949257f, -0.0012320746f, -0.0016010543f, -0.0019807201f,
- -0.0023975046f, -0.0028387094f, -0.0033147549f, -0.0038251812f,
- -0.0043653073f, -0.0049372604f, -0.0055373814f, -0.0061642416f,
- -0.0068165790f, -0.0074901022f, -0.0081837112f, -0.0088949297f,
- -0.0096200043f, -0.0103569683f, -0.0111023858f, -0.0118535860f,
- -0.0126076927f, -0.0133608067f, -0.0141103314f, -0.0148531627f,
- -0.0155855091f, -0.0163043682f, -0.0170061402f, -0.0176877063f,
- -0.0183456801f, -0.0189761259f, -0.0195760578f, -0.0201421324f,
- -0.0206706170f, -0.0211581476f, -0.0216013081f, -0.0219969619f,
- -0.0223416910f, -0.0226317085f, -0.0228641648f, -0.0230358951f,
- -0.0231434479f, -0.0231835246f, -0.0231529772f, -0.0230491832f,
- -0.0228686444f, -0.0226079077f, -0.0222644433f, -0.0218351875f,
- -0.0213169195f, -0.0207061488f, -0.0199998133f, -0.0191956628f,
- -0.0182893611f, -0.0172771178f, -0.0161564853f, -0.0149233583f,
- -0.0135741979f, -0.0121037029f, -0.0105075520f, -0.0087857461f,
- -0.0069273291f, -0.0049293786f, -0.0028003342f, -0.0004685577f,
- 0.0022103144f, 0.0051832944f, 0.0083509637f, 0.0116611840f,
- 0.0151316673f, 0.0187726468f, 0.0225889906f, 0.0265906155f,
- 0.0307808779f, 0.0351639129f, 0.0397467501f, 0.0445330814f,
- 0.0495262593f, 0.0547302663f, 0.0601483546f, 0.0657841489f,
- 0.0716395080f, 0.0777165666f, 0.0840179473f, 0.0905451626f,
- 0.0972988978f, 0.1042804047f, 0.1114900783f, 0.1189284250f,
- 0.1265947521f, 0.1344885528f, 0.1426091045f, 0.1509550363f,
- 0.1595243514f, 0.1683151573f, 0.1773250401f, 0.1865511388f,
- 0.1959902197f, 0.2056386322f, 0.2154925913f, 0.2255475521f,
- 0.2357989848f, 0.2462418824f, 0.2568709552f, 0.2676805258f,
- 0.2786645591f, 0.2898168266f, 0.3011307418f, 0.3125994802f,
- 0.3242157102f, 0.3359722793f, 0.3478614092f, 0.3598752320f,
- 0.3720056713f, 0.3842444420f, 0.3965831101f, 0.4090129435f,
- 0.4215250909f, 0.4341109097f, 0.4467608333f, 0.4594659507f,
- 0.4722166657f, 0.4850038290f, 0.4978178144f, 0.5106483698f,
- 0.5234865546f, 0.5363218188f, 0.5491440296f, 0.5619440079f,
- -0.5746001601f, -0.5872559547f, -0.5998619199f, -0.6123980284f,
- -0.6248505116f, -0.6372103095f, -0.6494654417f, -0.6616044044f,
- -0.6736174226f, -0.6854929924f, -0.6972201467f, -0.7087881565f,
- -0.7201859951f, -0.7314035296f, -0.7424294949f, -0.7532534599f,
- -0.7638649344f, -0.7742537856f, -0.7844095230f, -0.7943222523f,
- -0.8039818406f, -0.8133789897f, -0.8225036860f, -0.8313468695f,
- -0.8398991823f, -0.8481519818f, -0.8560963273f, -0.8637239933f,
- -0.8710266352f, -0.8779965043f, -0.8846257925f, -0.8909071684f,
- -0.8968337178f, -0.9023985267f, -0.9075955749f, -0.9124187231f,
- -0.9168621302f, -0.9209204316f, -0.9245886207f, -0.9278619289f,
- -0.9307362437f, -0.9332075119f, -0.9352724552f, -0.9369278550f,
- -0.9381709695f, -0.9389997125f, -0.9394121170f, -0.9394068122f,
- -0.9389829040f, -0.9381397963f, -0.9368773103f, -0.9351961017f,
- -0.9330966473f, -0.9305803180f, -0.9276487827f, -0.9243040681f,
- -0.9205487967f, -0.9163856506f, -0.9118180275f, -0.9068503380f,
- -0.9014858603f, -0.8957295418f, -0.8895882368f, -0.8830582500f,
- -0.8761259913f, -0.8688043952f, -0.8611140251f, -0.8530684114f,
- -0.8446723223f, -0.8359322548f, -0.8268554807f, -0.8174491525f,
- -0.8077214956f, -0.7976809740f, -0.7873360515f, -0.7766956687f,
- -0.7657692432f, -0.7545663714f, -0.7430967689f, -0.7313705087f,
- -0.7193979621f, -0.7071895599f, -0.6947561502f, -0.6821083426f,
- -0.6692573428f, -0.6562142968f, -0.6429904699f, -0.6295973659f,
- -0.6160464287f, -0.6023493409f, -0.5885176659f, -0.5745630264f,
- -0.5604973435f, -0.5463322401f, -0.5320795774f, -0.5177509785f,
- -0.5033583045f, -0.4889132082f, -0.4744274616f, -0.4599125087f,
- -0.4453800321f, -0.4308412969f, -0.4163077474f, -0.4017905891f,
- -0.3873008788f, -0.3728497028f, -0.3584479988f, -0.3441060781f,
- -0.3298346698f, -0.3156442046f, -0.3015447557f, -0.2875462472f,
- -0.2736584544f, -0.2598909736f, -0.2462531626f, -0.2327540070f,
- -0.2194025517f, -0.2062072009f, -0.1931765229f, -0.1803186089f,
- -0.1676410586f, -0.1551517546f, -0.1428578347f, -0.1307662129f,
- -0.1188837960f, -0.1072167307f, -0.0957711190f, -0.0845528170f,
- 0.0735579357f, 0.0628051385f, 0.0522958934f, 0.0420338102f,
- 0.0320230126f, 0.0222672001f, 0.0127700046f, 0.0035346728f,
- -0.0054356726f, -0.0141385710f, -0.0225714780f, -0.0307325479f,
- -0.0386199504f, -0.0462324508f, -0.0535687581f, -0.0606284477f,
- -0.0674108788f, -0.0739159212f, -0.0801439285f, -0.0860951766f,
- -0.0917705968f, -0.0971711874f, -0.1022983864f, -0.1071535870f,
- -0.1117390916f, -0.1160565540f, -0.1201089993f, -0.1238986105f,
- -0.1274286509f, -0.1307021976f, -0.1337226629f, -0.1364936531f,
- -0.1390190870f, -0.1413030326f, -0.1433497667f, -0.1451636255f,
- -0.1467494071f, -0.1481117010f, -0.1492556185f, -0.1501862854f,
- -0.1509089023f, -0.1514289081f, -0.1517517567f, -0.1518831998f,
- -0.1518289149f, -0.1515947729f, -0.1511866748f, -0.1506105959f,
- -0.1498726010f, -0.1489787102f, -0.1479352117f, -0.1467481852f,
- -0.1454239190f, -0.1439685971f, -0.1423884183f, -0.1406896859f,
- -0.1388785988f, -0.1369612068f, -0.1349437684f, -0.1328323931f,
- -0.1306331158f, -0.1283520460f, -0.1259952188f, -0.1235680804f,
- -0.1210755706f, -0.1185237169f, -0.1159184426f, -0.1132654399f,
- -0.1105698794f, -0.1078369170f, -0.1050716117f, -0.1022789180f,
- -0.0994636714f, -0.0966306925f, -0.0937845483f, -0.0909297019f,
- -0.0880705118f, -0.0852110758f, -0.0823556259f, -0.0795079023f,
- -0.0766717792f, -0.0738509223f, -0.0710486695f, -0.0682684705f,
- -0.0655134097f, -0.0627865866f, -0.0600909144f, -0.0574291982f,
- -0.0548038296f, -0.0522173792f, -0.0496721379f, -0.0471702330f,
- -0.0447136387f, -0.0423043817f, -0.0399438478f, -0.0376337133f,
- -0.0353754386f, -0.0331703536f, -0.0310197119f, -0.0289245304f,
- -0.0268857535f, -0.0249042176f, -0.0229805857f, -0.0211154576f,
- -0.0193092767f, -0.0175623931f, -0.0158751141f, -0.0142475078f,
- -0.0126795555f, -0.0111712581f, -0.0097224051f, -0.0083327051f,
- -0.0070017893f, -0.0057292255f, -0.0045145033f, -0.0033569466f,
- -0.0022558495f, -0.0012104595f, -0.0002199477f, 0.0007167263f,
- 0.0016004397f, 0.0024323659f, 0.0032136049f, 0.0039453004f,
- 0.0046286648f, 0.0052649761f, 0.0058556525f, 0.0064016338f,
- -0.0069030458f, -0.0073645366f, -0.0077859173f, -0.0081687812f,
- -0.0085145105f, -0.0088245263f, -0.0091004446f, -0.0093438197f,
- -0.0095560895f, -0.0097389296f, -0.0098937284f, -0.0100222183f,
- -0.0101256752f, -0.0102057597f, -0.0102638984f, -0.0103016300f,
- -0.0103203785f, -0.0103215463f, -0.0103065800f, -0.0102768280f,
- -0.0102336034f, -0.0101782102f, -0.0101119522f, -0.0100360261f,
- -0.0099515645f, -0.0098597351f, -0.0097616902f, -0.0096583357f,
- -0.0095505062f, -0.0094392402f, -0.0093253115f, -0.0092095714f,
- -0.0090927295f, -0.0089755040f, -0.0088585643f, -0.0087425476f,
- -0.0086279176f, -0.0085152360f, -0.0084048351f, -0.0082970457f,
- -0.0081921816f, -0.0080905585f, -0.0079923403f, -0.0078977877f,
- -0.0078069791f, -0.0077200048f, -0.0076368991f, -0.0075576920f,
- -0.0074823610f, -0.0074108820f, -0.0073430836f, -0.0072789183f,
- -0.0072182063f, -0.0071608433f, -0.0071066003f, -0.0070552491f,
- -0.0070065912f, -0.0069604507f, -0.0069165546f, -0.0068746237f,
- -0.0068344427f, -0.0067957863f, -0.0067584766f, -0.0067221262f,
- -0.0066861408f, -0.0066502281f, -0.0066143544f, -0.0065783206f,
- -0.0065418649f, -0.0065047294f, -0.0064666905f, -0.0064275563f,
- -0.0063871238f, -0.0063452618f, -0.0063017663f, -0.0062565422f,
- -0.0062093716f, -0.0061602155f, -0.0061089024f, -0.0060553551f,
- -0.0059994739f, -0.0059412112f, -0.0058804955f, -0.0058172857f,
- -0.0057515362f, -0.0056832312f, -0.0056123761f, -0.0055389581f,
- -0.0054629631f, -0.0053843958f, -0.0053033372f, -0.0052197399f,
- -0.0051336233f, -0.0050450461f, -0.0049540084f, -0.0048605883f,
- -0.0047647208f, -0.0046664691f, -0.0045659458f, -0.0044631511f,
- -0.0043581501f, -0.0042509669f, -0.0041416343f, -0.0040301653f,
- -0.0039165970f, -0.0038009947f, -0.0036834506f, -0.0035639144f,
- -0.0034424895f, -0.0033192560f, -0.0031942502f, -0.0030675260f,
- -0.0029391386f, -0.0028091520f, -0.0026777033f, -0.0025448306f,
- -0.0024106177f, -0.0022751903f, -0.0021385867f, -0.0020008814f,
- -0.0018621609f, -0.0017228508f, -0.0015830053f, -0.0014426354f,
- -0.0013017356f, -0.0011605313f, -0.0010187104f, -0.0008753659f,
- 0.0007250868f, 0.0005901512f, 0.0004571248f, 0.0003254497f,
- 0.0001951829f, 0.0000666175f, -0.0000600275f, -0.0001845164f,
- -0.0003065709f, -0.0004259665f, -0.0005424777f, -0.0006558085f,
- -0.0007659104f, -0.0008724863f, -0.0009753527f, -0.0010743001f,
- -0.0011691442f, -0.0012597255f, -0.0013458347f, -0.0014273394f,
- -0.0015040794f, -0.0015758807f, -0.0016426332f, -0.0017042002f,
- -0.0017605145f, -0.0018114587f, -0.0018569818f, -0.0018970286f,
- -0.0019315863f, -0.0019606268f, -0.0019841781f, -0.0020022886f,
- -0.0020149164f, -0.0020221891f, -0.0020242548f, -0.0020211563f,
- -0.0020131115f, -0.0020002127f, -0.0019826870f, -0.0019606939f,
- -0.0019344082f, -0.0019041235f, -0.0018700724f, -0.0018325197f,
- -0.0017917566f, -0.0017479789f, -0.0017015412f, -0.0016526897f,
- -0.0016016904f, -0.0015489543f, -0.0014947094f, -0.0014391905f,
- -0.0013827635f, -0.0013256427f, -0.0012681838f, -0.0012105964f,
- -0.0011530248f, -0.0010959618f, -0.0010395534f, -0.0009838343f,
- -0.0009290278f, -0.0008749813f, -0.0008215802f, -0.0007706117f,
- -0.0007240456f, -0.0006849431f, -0.0006499495f, -0.0006169267f,
- -0.0005864026f, -0.0005585561f, -0.0005332623f, -0.0005106712f,
- -0.0004907669f, -0.0004734583f, -0.0004585870f, -0.0004460039f,
- -0.0004356373f, -0.0004273243f, -0.0004208330f, -0.0004159436f,
- -0.0004123962f, -0.0004100222f, -0.0004085470f, -0.0004077079f,
- -0.0004073251f, -0.0004070932f, -0.0004067607f, -0.0004061488f,
- -0.0004050555f, -0.0004033837f, -0.0004008813f, -0.0003973767f,
- -0.0003928188f, -0.0003870558f, -0.0003799992f, -0.0003715968f,
- -0.0003617546f, -0.0003505340f, -0.0003378810f, -0.0003237817f,
- -0.0003083795f, -0.0002916576f, -0.0002737129f, -0.0002546264f,
- -0.0002344782f, -0.0002134573f, -0.0001916261f, -0.0001692856f,
- -0.0001466954f, -0.0001236852f, -0.0001005735f, -0.0000775065f,
- -0.0000546696f, -0.0000325590f, -0.0000109682f, 0.0000098813f,
- 0.0000295145f, 0.0000481009f, 0.0000651376f, 0.0000805138f,
- 0.0000942973f, 0.0001058290f, 0.0001155818f, 0.0001229653f,
- 0.0001266878f, 0.0001279376f, 0.0001216913f, 0.0000938624f
-};
-const WORD32 ixheaacd_ldmps_polyphase_filter_coeff_fix[1280]=
-{
- -853545, -1322930, -1719119, -2126782,
- -2574301, -3048041, -3559191, -4107257,
- -4687213, -5301343, -5945718, -6618804,
- -7319246, -8042436, -8787193, -9550858,
- -10329401, -11120710, -11921096, -12727691,
- -13537407, -14346057, -15150853, -15948462,
- -16734813, -17506682, -18260204, -18992030,
- -19698524, -20375460, -21019632, -21627450,
- -22194906, -22718388, -23194228, -23619058,
- -23989208, -24300612, -24550210, -24734604,
- -24850088, -24893120, -24860320, -24748872,
- -24555020, -24275056, -23906264, -23445354,
- -22888868, -22233058, -21474636, -20611186,
- -19638052, -18551164, -17347894, -16023834,
- -14575184, -12996252, -11282398, -9433623,
- -7438163, -5292880, -3006836, -503110,
- 2373307, 5565520, 8966779, 12521101,
- 16247504, 20156977, 24254745, 28551455,
- 33050715, 37756963, 42677747, 47817031,
- 53178415, 58766175, 64583803, 70635191,
- 76922335, 83447527, 90213583, 97222127,
- 104473895, 111970231, 119711559, 127698423,
- 135930079, 144405983, 153125359, 162086735,
- 171287967, 180727023, 190401311, 200307759,
- 210442895, 220802799, 231383407, 242179839,
- 253187231, 264400207, 275813087, 287419775,
- 299213791, 311188447, 323336671, 335651135,
- 348123967, 360747487, 373513343, 386413087,
- 399438047, 412579327, 425827871, 439174303,
- 452609119, 466123039, 479705791, 493347807,
- 507038783, 520768895, 534527807, 548304511,
- 562089407, 575871167, 589638911, 603382783,
- -616972224, -630561280, -644096832, -657557376,
- -670928128, -684199360, -697358208, -710392320,
- -723291200, -736042496, -748634432, -761055488,
- -773293824, -785338560, -797177600, -808799744,
- -820193728, -831348672, -842253312, -852897024,
- -863268928, -873359040, -883156608, -892651904,
- -901834880, -910696256, -919226432, -927416576,
- -935257728, -942741568, -949859712, -956604288,
- -962967872, -968943040, -974523328, -979702144,
- -984473216, -988830784, -992769472, -996284160,
- -999370432, -1002023936, -1004241152, -1006018624,
- -1007353408, -1008243264, -1008686080, -1008680384,
- -1008225216, -1007319936, -1005964352, -1004159168,
- -1001904896, -999203008, -996055296, -992463936,
- -988431744, -983961600, -979057152, -973723136,
- -967963072, -961782272, -955188096, -948176576,
- -940733120, -932871616, -924614144, -915975232,
- -906960000, -897575424, -887829312, -877729344,
- -867284352, -856503424, -845395648, -833970624,
- -822238464, -810209472, -797894080, -785303104,
- -772447680, -759339008, -745988736, -732408256,
- -718609600, -704604736, -690405760, -676025024,
- -661474816, -646767680, -631916032, -616932352,
- -601829440, -586619776, -571316096, -555930880,
- -540476864, -524966560, -509412608, -493827296,
- -478223168, -462612320, -447007040, -431419360,
- -415861152, -400344320, -384880608, -369481088,
- -354157280, -338920384, -323781216, -308750432,
- -293838528, -279055808, -264412320, -249917712,
- -235581696, -221413296, -207421712, -193615632,
- -180003216, -166592928, -153392432, -140409152,
- -127650504, -115123088, -102833456, -90787896,
- 78982231, 67436503, 56152287, 45133459,
- 34384447, 23909225, 13711688, 3795326,
- -5836509, -15181175, -24235940, -32998822,
- -41467856, -49641716, -57519016, -65099300,
- -72381880, -79366616, -86053888, -92443992,
- -98537928, -104336768, -109842056, -115055288,
- -119978936, -124614776, -128966056, -133035120,
- -136825472, -140340416, -143583616, -146558944,
- -149270608, -151722976, -153920640, -155868256,
- -157570976, -159033728, -160262000, -161261296,
- -162037200, -162595552, -162942208, -163083344,
- -163025056, -162773648, -162335456, -161716896,
- -160924480, -159964672, -158844224, -157569664,
- -156147744, -154585104, -152888400, -151064400,
- -149119760, -147060976, -144894768, -142627696,
- -140266240, -137816960, -135286336, -132680216,
- -130003904, -127263872, -124466480, -121617840,
- -118723504, -115789008, -112819784, -109821152,
- -106798304, -103756416, -100700392, -97635024,
- -94564992, -91494696, -88428680, -85370960,
- -82325696, -79296824, -76287928, -73302712,
- -70344488, -67416584, -64522128, -61664132,
- -58845164, -56067984, -53335052, -50648652,
- -48010904, -45423984, -42889380, -40408892,
- -37984088, -35616396, -33307162, -31057478,
- -28868358, -26740700, -24675216, -22672550,
- -20733178, -18857476, -17045774, -15298145,
- -13614569, -11995047, -10439353, -8947174,
- -7518114, -6151709, -4847411, -3604494,
- -2422200, -1299721, -236167, 769579,
- 1718459, 2611733, 3450582, 4236234,
- 4969991, 5653225, 6287459, 6873702,
- -7412089, -7907611, -8360065, -8771162,
- -9142386, -9475263, -9771528, -10032850,
- -10260773, -10457096, -10623310, -10761275,
- -10872361, -10958351, -11020777, -11061291,
- -11081422, -11082676, -11066606, -11034660,
- -10988248, -10928770, -10857626, -10776101,
- -10685411, -10586810, -10481535, -10370559,
- -10254778, -10135307, -10012977, -9888702,
- -9763244, -9637374, -9511811, -9387239,
- -9264156, -9143165, -9024623, -8908885,
- -8796288, -8687171, -8581710, -8480185,
- -8382680, -8289292, -8200058, -8115010,
- -8034124, -7957374, -7884576, -7815679,
- -7750490, -7688897, -7630654, -7575516,
- -7523270, -7473727, -7426594, -7381571,
- -7338427, -7296920, -7256859, -7217828,
- -7179189, -7140628, -7102109, -7063418,
- -7024274, -6984400, -6943556, -6901536,
- -6858122, -6813173, -6766470, -6717911,
- -6667262, -6614481, -6559384, -6501888,
- -6441886, -6379327, -6314134, -6246263,
- -6175665, -6102323, -6026243, -5947411,
- -5865812, -5781451, -5694415, -5604653,
- -5512186, -5417077, -5319326, -5219017,
- -5116080, -5010583, -4902647, -4792272,
- -4679528, -4564441, -4447046, -4327357,
- -4205414, -4081287, -3955075, -3826724,
- -3696345, -3564024, -3429800, -3293731,
- -3155876, -3016304, -2875162, -2732491,
- -2588381, -2442967, -2296290, -2148430,
- -1999480, -1849897, -1699739, -1549018,
- -1397728, -1246111, -1093832, -939917,
- 778556, 633670, 490834, 349449,
- 209576, 71530, -64454, -198123,
- -329178, -457378, -582481, -704169,
- -822390, -936825, -1047277, -1153521,
- -1255359, -1352620, -1445079, -1532594,
- -1614993, -1692089, -1763764, -1829871,
- -1890338, -1945039, -1993919, -2036919,
- -2074025, -2105207, -2130495, -2149941,
- -2163500, -2171309, -2173527, -2170200,
- -2161562, -2147712, -2128894, -2105279,
- -2077055, -2044537, -2007975, -1967653,
- -1923884, -1876878, -1827016, -1774562,
- -1719802, -1663177, -1604932, -1545319,
- -1484731, -1423398, -1361702, -1299868,
- -1238051, -1176780, -1116212, -1056384,
- -997536, -939504, -882165, -827438,
- -777438, -735452, -697878, -662420,
- -629645, -599745, -572586, -548329,
- -526957, -508372, -492404, -478893,
- -467762, -458836, -451866, -446616,
- -442807, -440258, -438674, -437773,
- -437362, -437113, -436756, -436099,
- -434925, -433130, -430443, -426680,
- -421786, -415598, -408021, -398999,
- -388431, -376383, -362797, -347658,
- -331120, -313165, -293897, -273403,
- -251769, -229198, -205757, -181769,
- -157513, -132806, -107990, -83222,
- -58701, -34960, -11777, 10610,
- 31691, 51648, 69941, 86451,
- 101251, 113633, 124105, 132033,
- 136030, 137372, 130665, 100784,
- -853545, -1322930, -1719119, -2126782,
- -2574301, -3048041, -3559191, -4107257,
- -4687213, -5301343, -5945718, -6618804,
- -7319246, -8042436, -8787193, -9550858,
- -10329401, -11120710, -11921096, -12727691,
- -13537407, -14346057, -15150853, -15948462,
- -16734813, -17506682, -18260204, -18992030,
- -19698524, -20375460, -21019632, -21627450,
- -22194906, -22718388, -23194228, -23619058,
- -23989208, -24300612, -24550210, -24734604,
- -24850088, -24893120, -24860320, -24748872,
- -24555020, -24275056, -23906264, -23445354,
- -22888868, -22233058, -21474636, -20611186,
- -19638052, -18551164, -17347894, -16023834,
- -14575184, -12996252, -11282398, -9433623,
- -7438163, -5292880, -3006836, -503110,
- 2373307, 5565520, 8966779, 12521101,
- 16247504, 20156977, 24254745, 28551455,
- 33050715, 37756963, 42677747, 47817031,
- 53178415, 58766175, 64583803, 70635191,
- 76922335, 83447527, 90213583, 97222127,
- 104473895, 111970231, 119711559, 127698423,
- 135930079, 144405983, 153125359, 162086735,
- 171287967, 180727023, 190401311, 200307759,
- 210442895, 220802799, 231383407, 242179839,
- 253187231, 264400207, 275813087, 287419775,
- 299213791, 311188447, 323336671, 335651135,
- 348123967, 360747487, 373513343, 386413087,
- 399438047, 412579327, 425827871, 439174303,
- 452609119, 466123039, 479705791, 493347807,
- 507038783, 520768895, 534527807, 548304511,
- 562089407, 575871167, 589638911, 603382783,
- -616972224, -630561280, -644096832, -657557376,
- -670928128, -684199360, -697358208, -710392320,
- -723291200, -736042496, -748634432, -761055488,
- -773293824, -785338560, -797177600, -808799744,
- -820193728, -831348672, -842253312, -852897024,
- -863268928, -873359040, -883156608, -892651904,
- -901834880, -910696256, -919226432, -927416576,
- -935257728, -942741568, -949859712, -956604288,
- -962967872, -968943040, -974523328, -979702144,
- -984473216, -988830784, -992769472, -996284160,
- -999370432, -1002023936, -1004241152, -1006018624,
- -1007353408, -1008243264, -1008686080, -1008680384,
- -1008225216, -1007319936, -1005964352, -1004159168,
- -1001904896, -999203008, -996055296, -992463936,
- -988431744, -983961600, -979057152, -973723136,
- -967963072, -961782272, -955188096, -948176576,
- -940733120, -932871616, -924614144, -915975232,
- -906960000, -897575424, -887829312, -877729344,
- -867284352, -856503424, -845395648, -833970624,
- -822238464, -810209472, -797894080, -785303104,
- -772447680, -759339008, -745988736, -732408256,
- -718609600, -704604736, -690405760, -676025024,
- -661474816, -646767680, -631916032, -616932352,
- -601829440, -586619776, -571316096, -555930880,
- -540476864, -524966560, -509412608, -493827296,
- -478223168, -462612320, -447007040, -431419360,
- -415861152, -400344320, -384880608, -369481088,
- -354157280, -338920384, -323781216, -308750432,
- -293838528, -279055808, -264412320, -249917712,
- -235581696, -221413296, -207421712, -193615632,
- -180003216, -166592928, -153392432, -140409152,
- -127650504, -115123088, -102833456, -90787896,
- 78982231, 67436503, 56152287, 45133459,
- 34384447, 23909225, 13711688, 3795326,
- -5836509, -15181175, -24235940, -32998822,
- -41467856, -49641716, -57519016, -65099300,
- -72381880, -79366616, -86053888, -92443992,
- -98537928, -104336768, -109842056, -115055288,
- -119978936, -124614776, -128966056, -133035120,
- -136825472, -140340416, -143583616, -146558944,
- -149270608, -151722976, -153920640, -155868256,
- -157570976, -159033728, -160262000, -161261296,
- -162037200, -162595552, -162942208, -163083344,
- -163025056, -162773648, -162335456, -161716896,
- -160924480, -159964672, -158844224, -157569664,
- -156147744, -154585104, -152888400, -151064400,
- -149119760, -147060976, -144894768, -142627696,
- -140266240, -137816960, -135286336, -132680216,
- -130003904, -127263872, -124466480, -121617840,
- -118723504, -115789008, -112819784, -109821152,
- -106798304, -103756416, -100700392, -97635024,
- -94564992, -91494696, -88428680, -85370960,
- -82325696, -79296824, -76287928, -73302712,
- -70344488, -67416584, -64522128, -61664132,
- -58845164, -56067984, -53335052, -50648652,
- -48010904, -45423984, -42889380, -40408892,
- -37984088, -35616396, -33307162, -31057478,
- -28868358, -26740700, -24675216, -22672550,
- -20733178, -18857476, -17045774, -15298145,
- -13614569, -11995047, -10439353, -8947174,
- -7518114, -6151709, -4847411, -3604494,
- -2422200, -1299721, -236167, 769579,
- 1718459, 2611733, 3450582, 4236234,
- 4969991, 5653225, 6287459, 6873702,
- -7412089, -7907611, -8360065, -8771162,
- -9142386, -9475263, -9771528, -10032850,
- -10260773, -10457096, -10623310, -10761275,
- -10872361, -10958351, -11020777, -11061291,
- -11081422, -11082676, -11066606, -11034660,
- -10988248, -10928770, -10857626, -10776101,
- -10685411, -10586810, -10481535, -10370559,
- -10254778, -10135307, -10012977, -9888702,
- -9763244, -9637374, -9511811, -9387239,
- -9264156, -9143165, -9024623, -8908885,
- -8796288, -8687171, -8581710, -8480185,
- -8382680, -8289292, -8200058, -8115010,
- -8034124, -7957374, -7884576, -7815679,
- -7750490, -7688897, -7630654, -7575516,
- -7523270, -7473727, -7426594, -7381571,
- -7338427, -7296920, -7256859, -7217828,
- -7179189, -7140628, -7102109, -7063418,
- -7024274, -6984400, -6943556, -6901536,
- -6858122, -6813173, -6766470, -6717911,
- -6667262, -6614481, -6559384, -6501888,
- -6441886, -6379327, -6314134, -6246263,
- -6175665, -6102323, -6026243, -5947411,
- -5865812, -5781451, -5694415, -5604653,
- -5512186, -5417077, -5319326, -5219017,
- -5116080, -5010583, -4902647, -4792272,
- -4679528, -4564441, -4447046, -4327357,
- -4205414, -4081287, -3955075, -3826724,
- -3696345, -3564024, -3429800, -3293731,
- -3155876, -3016304, -2875162, -2732491,
- -2588381, -2442967, -2296290, -2148430,
- -1999480, -1849897, -1699739, -1549018,
- -1397728, -1246111, -1093832, -939917,
- 778556, 633670, 490834, 349449,
- 209576, 71530, -64454, -198123,
- -329178, -457378, -582481, -704169,
- -822390, -936825, -1047277, -1153521,
- -1255359, -1352620, -1445079, -1532594,
- -1614993, -1692089, -1763764, -1829871,
- -1890338, -1945039, -1993919, -2036919,
- -2074025, -2105207, -2130495, -2149941,
- -2163500, -2171309, -2173527, -2170200,
- -2161562, -2147712, -2128894, -2105279,
- -2077055, -2044537, -2007975, -1967653,
- -1923884, -1876878, -1827016, -1774562,
- -1719802, -1663177, -1604932, -1545319,
- -1484731, -1423398, -1361702, -1299868,
- -1238051, -1176780, -1116212, -1056384,
- -997536, -939504, -882165, -827438,
- -777438, -735452, -697878, -662420,
- -629645, -599745, -572586, -548329,
- -526957, -508372, -492404, -478893,
- -467762, -458836, -451866, -446616,
- -442807, -440258, -438674, -437773,
- -437362, -437113, -436756, -436099,
- -434925, -433130, -430443, -426680,
- -421786, -415598, -408021, -398999,
- -388431, -376383, -362797, -347658,
- -331120, -313165, -293897, -273403,
- -251769, -229198, -205757, -181769,
- -157513, -132806, -107990, -83222,
- -58701, -34960, -11777, 10610,
- 31691, 51648, 69941, 86451,
- 101251, 113633, 124105, 132033,
- 136030, 137372, 130665, 100784
-}; \ No newline at end of file
+ -0.0007949257f, -0.0012320746f, -0.0016010543f, -0.0019807201f, -0.0023975046f,
+ -0.0028387094f, -0.0033147549f, -0.0038251812f, -0.0043653073f, -0.0049372604f,
+ -0.0055373814f, -0.0061642416f, -0.0068165790f, -0.0074901022f, -0.0081837112f,
+ -0.0088949297f, -0.0096200043f, -0.0103569683f, -0.0111023858f, -0.0118535860f,
+ -0.0126076927f, -0.0133608067f, -0.0141103314f, -0.0148531627f, -0.0155855091f,
+ -0.0163043682f, -0.0170061402f, -0.0176877063f, -0.0183456801f, -0.0189761259f,
+ -0.0195760578f, -0.0201421324f, -0.0206706170f, -0.0211581476f, -0.0216013081f,
+ -0.0219969619f, -0.0223416910f, -0.0226317085f, -0.0228641648f, -0.0230358951f,
+ -0.0231434479f, -0.0231835246f, -0.0231529772f, -0.0230491832f, -0.0228686444f,
+ -0.0226079077f, -0.0222644433f, -0.0218351875f, -0.0213169195f, -0.0207061488f,
+ -0.0199998133f, -0.0191956628f, -0.0182893611f, -0.0172771178f, -0.0161564853f,
+ -0.0149233583f, -0.0135741979f, -0.0121037029f, -0.0105075520f, -0.0087857461f,
+ -0.0069273291f, -0.0049293786f, -0.0028003342f, -0.0004685577f, 0.0022103144f,
+ 0.0051832944f, 0.0083509637f, 0.0116611840f, 0.0151316673f, 0.0187726468f,
+ 0.0225889906f, 0.0265906155f, 0.0307808779f, 0.0351639129f, 0.0397467501f,
+ 0.0445330814f, 0.0495262593f, 0.0547302663f, 0.0601483546f, 0.0657841489f,
+ 0.0716395080f, 0.0777165666f, 0.0840179473f, 0.0905451626f, 0.0972988978f,
+ 0.1042804047f, 0.1114900783f, 0.1189284250f, 0.1265947521f, 0.1344885528f,
+ 0.1426091045f, 0.1509550363f, 0.1595243514f, 0.1683151573f, 0.1773250401f,
+ 0.1865511388f, 0.1959902197f, 0.2056386322f, 0.2154925913f, 0.2255475521f,
+ 0.2357989848f, 0.2462418824f, 0.2568709552f, 0.2676805258f, 0.2786645591f,
+ 0.2898168266f, 0.3011307418f, 0.3125994802f, 0.3242157102f, 0.3359722793f,
+ 0.3478614092f, 0.3598752320f, 0.3720056713f, 0.3842444420f, 0.3965831101f,
+ 0.4090129435f, 0.4215250909f, 0.4341109097f, 0.4467608333f, 0.4594659507f,
+ 0.4722166657f, 0.4850038290f, 0.4978178144f, 0.5106483698f, 0.5234865546f,
+ 0.5363218188f, 0.5491440296f, 0.5619440079f, -0.5746001601f, -0.5872559547f,
+ -0.5998619199f, -0.6123980284f, -0.6248505116f, -0.6372103095f, -0.6494654417f,
+ -0.6616044044f, -0.6736174226f, -0.6854929924f, -0.6972201467f, -0.7087881565f,
+ -0.7201859951f, -0.7314035296f, -0.7424294949f, -0.7532534599f, -0.7638649344f,
+ -0.7742537856f, -0.7844095230f, -0.7943222523f, -0.8039818406f, -0.8133789897f,
+ -0.8225036860f, -0.8313468695f, -0.8398991823f, -0.8481519818f, -0.8560963273f,
+ -0.8637239933f, -0.8710266352f, -0.8779965043f, -0.8846257925f, -0.8909071684f,
+ -0.8968337178f, -0.9023985267f, -0.9075955749f, -0.9124187231f, -0.9168621302f,
+ -0.9209204316f, -0.9245886207f, -0.9278619289f, -0.9307362437f, -0.9332075119f,
+ -0.9352724552f, -0.9369278550f, -0.9381709695f, -0.9389997125f, -0.9394121170f,
+ -0.9394068122f, -0.9389829040f, -0.9381397963f, -0.9368773103f, -0.9351961017f,
+ -0.9330966473f, -0.9305803180f, -0.9276487827f, -0.9243040681f, -0.9205487967f,
+ -0.9163856506f, -0.9118180275f, -0.9068503380f, -0.9014858603f, -0.8957295418f,
+ -0.8895882368f, -0.8830582500f, -0.8761259913f, -0.8688043952f, -0.8611140251f,
+ -0.8530684114f, -0.8446723223f, -0.8359322548f, -0.8268554807f, -0.8174491525f,
+ -0.8077214956f, -0.7976809740f, -0.7873360515f, -0.7766956687f, -0.7657692432f,
+ -0.7545663714f, -0.7430967689f, -0.7313705087f, -0.7193979621f, -0.7071895599f,
+ -0.6947561502f, -0.6821083426f, -0.6692573428f, -0.6562142968f, -0.6429904699f,
+ -0.6295973659f, -0.6160464287f, -0.6023493409f, -0.5885176659f, -0.5745630264f,
+ -0.5604973435f, -0.5463322401f, -0.5320795774f, -0.5177509785f, -0.5033583045f,
+ -0.4889132082f, -0.4744274616f, -0.4599125087f, -0.4453800321f, -0.4308412969f,
+ -0.4163077474f, -0.4017905891f, -0.3873008788f, -0.3728497028f, -0.3584479988f,
+ -0.3441060781f, -0.3298346698f, -0.3156442046f, -0.3015447557f, -0.2875462472f,
+ -0.2736584544f, -0.2598909736f, -0.2462531626f, -0.2327540070f, -0.2194025517f,
+ -0.2062072009f, -0.1931765229f, -0.1803186089f, -0.1676410586f, -0.1551517546f,
+ -0.1428578347f, -0.1307662129f, -0.1188837960f, -0.1072167307f, -0.0957711190f,
+ -0.0845528170f, 0.0735579357f, 0.0628051385f, 0.0522958934f, 0.0420338102f,
+ 0.0320230126f, 0.0222672001f, 0.0127700046f, 0.0035346728f, -0.0054356726f,
+ -0.0141385710f, -0.0225714780f, -0.0307325479f, -0.0386199504f, -0.0462324508f,
+ -0.0535687581f, -0.0606284477f, -0.0674108788f, -0.0739159212f, -0.0801439285f,
+ -0.0860951766f, -0.0917705968f, -0.0971711874f, -0.1022983864f, -0.1071535870f,
+ -0.1117390916f, -0.1160565540f, -0.1201089993f, -0.1238986105f, -0.1274286509f,
+ -0.1307021976f, -0.1337226629f, -0.1364936531f, -0.1390190870f, -0.1413030326f,
+ -0.1433497667f, -0.1451636255f, -0.1467494071f, -0.1481117010f, -0.1492556185f,
+ -0.1501862854f, -0.1509089023f, -0.1514289081f, -0.1517517567f, -0.1518831998f,
+ -0.1518289149f, -0.1515947729f, -0.1511866748f, -0.1506105959f, -0.1498726010f,
+ -0.1489787102f, -0.1479352117f, -0.1467481852f, -0.1454239190f, -0.1439685971f,
+ -0.1423884183f, -0.1406896859f, -0.1388785988f, -0.1369612068f, -0.1349437684f,
+ -0.1328323931f, -0.1306331158f, -0.1283520460f, -0.1259952188f, -0.1235680804f,
+ -0.1210755706f, -0.1185237169f, -0.1159184426f, -0.1132654399f, -0.1105698794f,
+ -0.1078369170f, -0.1050716117f, -0.1022789180f, -0.0994636714f, -0.0966306925f,
+ -0.0937845483f, -0.0909297019f, -0.0880705118f, -0.0852110758f, -0.0823556259f,
+ -0.0795079023f, -0.0766717792f, -0.0738509223f, -0.0710486695f, -0.0682684705f,
+ -0.0655134097f, -0.0627865866f, -0.0600909144f, -0.0574291982f, -0.0548038296f,
+ -0.0522173792f, -0.0496721379f, -0.0471702330f, -0.0447136387f, -0.0423043817f,
+ -0.0399438478f, -0.0376337133f, -0.0353754386f, -0.0331703536f, -0.0310197119f,
+ -0.0289245304f, -0.0268857535f, -0.0249042176f, -0.0229805857f, -0.0211154576f,
+ -0.0193092767f, -0.0175623931f, -0.0158751141f, -0.0142475078f, -0.0126795555f,
+ -0.0111712581f, -0.0097224051f, -0.0083327051f, -0.0070017893f, -0.0057292255f,
+ -0.0045145033f, -0.0033569466f, -0.0022558495f, -0.0012104595f, -0.0002199477f,
+ 0.0007167263f, 0.0016004397f, 0.0024323659f, 0.0032136049f, 0.0039453004f,
+ 0.0046286648f, 0.0052649761f, 0.0058556525f, 0.0064016338f, -0.0069030458f,
+ -0.0073645366f, -0.0077859173f, -0.0081687812f, -0.0085145105f, -0.0088245263f,
+ -0.0091004446f, -0.0093438197f, -0.0095560895f, -0.0097389296f, -0.0098937284f,
+ -0.0100222183f, -0.0101256752f, -0.0102057597f, -0.0102638984f, -0.0103016300f,
+ -0.0103203785f, -0.0103215463f, -0.0103065800f, -0.0102768280f, -0.0102336034f,
+ -0.0101782102f, -0.0101119522f, -0.0100360261f, -0.0099515645f, -0.0098597351f,
+ -0.0097616902f, -0.0096583357f, -0.0095505062f, -0.0094392402f, -0.0093253115f,
+ -0.0092095714f, -0.0090927295f, -0.0089755040f, -0.0088585643f, -0.0087425476f,
+ -0.0086279176f, -0.0085152360f, -0.0084048351f, -0.0082970457f, -0.0081921816f,
+ -0.0080905585f, -0.0079923403f, -0.0078977877f, -0.0078069791f, -0.0077200048f,
+ -0.0076368991f, -0.0075576920f, -0.0074823610f, -0.0074108820f, -0.0073430836f,
+ -0.0072789183f, -0.0072182063f, -0.0071608433f, -0.0071066003f, -0.0070552491f,
+ -0.0070065912f, -0.0069604507f, -0.0069165546f, -0.0068746237f, -0.0068344427f,
+ -0.0067957863f, -0.0067584766f, -0.0067221262f, -0.0066861408f, -0.0066502281f,
+ -0.0066143544f, -0.0065783206f, -0.0065418649f, -0.0065047294f, -0.0064666905f,
+ -0.0064275563f, -0.0063871238f, -0.0063452618f, -0.0063017663f, -0.0062565422f,
+ -0.0062093716f, -0.0061602155f, -0.0061089024f, -0.0060553551f, -0.0059994739f,
+ -0.0059412112f, -0.0058804955f, -0.0058172857f, -0.0057515362f, -0.0056832312f,
+ -0.0056123761f, -0.0055389581f, -0.0054629631f, -0.0053843958f, -0.0053033372f,
+ -0.0052197399f, -0.0051336233f, -0.0050450461f, -0.0049540084f, -0.0048605883f,
+ -0.0047647208f, -0.0046664691f, -0.0045659458f, -0.0044631511f, -0.0043581501f,
+ -0.0042509669f, -0.0041416343f, -0.0040301653f, -0.0039165970f, -0.0038009947f,
+ -0.0036834506f, -0.0035639144f, -0.0034424895f, -0.0033192560f, -0.0031942502f,
+ -0.0030675260f, -0.0029391386f, -0.0028091520f, -0.0026777033f, -0.0025448306f,
+ -0.0024106177f, -0.0022751903f, -0.0021385867f, -0.0020008814f, -0.0018621609f,
+ -0.0017228508f, -0.0015830053f, -0.0014426354f, -0.0013017356f, -0.0011605313f,
+ -0.0010187104f, -0.0008753659f, 0.0007250868f, 0.0005901512f, 0.0004571248f,
+ 0.0003254497f, 0.0001951829f, 0.0000666175f, -0.0000600275f, -0.0001845164f,
+ -0.0003065709f, -0.0004259665f, -0.0005424777f, -0.0006558085f, -0.0007659104f,
+ -0.0008724863f, -0.0009753527f, -0.0010743001f, -0.0011691442f, -0.0012597255f,
+ -0.0013458347f, -0.0014273394f, -0.0015040794f, -0.0015758807f, -0.0016426332f,
+ -0.0017042002f, -0.0017605145f, -0.0018114587f, -0.0018569818f, -0.0018970286f,
+ -0.0019315863f, -0.0019606268f, -0.0019841781f, -0.0020022886f, -0.0020149164f,
+ -0.0020221891f, -0.0020242548f, -0.0020211563f, -0.0020131115f, -0.0020002127f,
+ -0.0019826870f, -0.0019606939f, -0.0019344082f, -0.0019041235f, -0.0018700724f,
+ -0.0018325197f, -0.0017917566f, -0.0017479789f, -0.0017015412f, -0.0016526897f,
+ -0.0016016904f, -0.0015489543f, -0.0014947094f, -0.0014391905f, -0.0013827635f,
+ -0.0013256427f, -0.0012681838f, -0.0012105964f, -0.0011530248f, -0.0010959618f,
+ -0.0010395534f, -0.0009838343f, -0.0009290278f, -0.0008749813f, -0.0008215802f,
+ -0.0007706117f, -0.0007240456f, -0.0006849431f, -0.0006499495f, -0.0006169267f,
+ -0.0005864026f, -0.0005585561f, -0.0005332623f, -0.0005106712f, -0.0004907669f,
+ -0.0004734583f, -0.0004585870f, -0.0004460039f, -0.0004356373f, -0.0004273243f,
+ -0.0004208330f, -0.0004159436f, -0.0004123962f, -0.0004100222f, -0.0004085470f,
+ -0.0004077079f, -0.0004073251f, -0.0004070932f, -0.0004067607f, -0.0004061488f,
+ -0.0004050555f, -0.0004033837f, -0.0004008813f, -0.0003973767f, -0.0003928188f,
+ -0.0003870558f, -0.0003799992f, -0.0003715968f, -0.0003617546f, -0.0003505340f,
+ -0.0003378810f, -0.0003237817f, -0.0003083795f, -0.0002916576f, -0.0002737129f,
+ -0.0002546264f, -0.0002344782f, -0.0002134573f, -0.0001916261f, -0.0001692856f,
+ -0.0001466954f, -0.0001236852f, -0.0001005735f, -0.0000775065f, -0.0000546696f,
+ -0.0000325590f, -0.0000109682f, 0.0000098813f, 0.0000295145f, 0.0000481009f,
+ 0.0000651376f, 0.0000805138f, 0.0000942973f, 0.0001058290f, 0.0001155818f,
+ 0.0001229653f, 0.0001266878f, 0.0001279376f, 0.0001216913f, 0.0000938624f,
+ -0.0007949257f, -0.0012320746f, -0.0016010543f, -0.0019807201f, -0.0023975046f,
+ -0.0028387094f, -0.0033147549f, -0.0038251812f, -0.0043653073f, -0.0049372604f,
+ -0.0055373814f, -0.0061642416f, -0.0068165790f, -0.0074901022f, -0.0081837112f,
+ -0.0088949297f, -0.0096200043f, -0.0103569683f, -0.0111023858f, -0.0118535860f,
+ -0.0126076927f, -0.0133608067f, -0.0141103314f, -0.0148531627f, -0.0155855091f,
+ -0.0163043682f, -0.0170061402f, -0.0176877063f, -0.0183456801f, -0.0189761259f,
+ -0.0195760578f, -0.0201421324f, -0.0206706170f, -0.0211581476f, -0.0216013081f,
+ -0.0219969619f, -0.0223416910f, -0.0226317085f, -0.0228641648f, -0.0230358951f,
+ -0.0231434479f, -0.0231835246f, -0.0231529772f, -0.0230491832f, -0.0228686444f,
+ -0.0226079077f, -0.0222644433f, -0.0218351875f, -0.0213169195f, -0.0207061488f,
+ -0.0199998133f, -0.0191956628f, -0.0182893611f, -0.0172771178f, -0.0161564853f,
+ -0.0149233583f, -0.0135741979f, -0.0121037029f, -0.0105075520f, -0.0087857461f,
+ -0.0069273291f, -0.0049293786f, -0.0028003342f, -0.0004685577f, 0.0022103144f,
+ 0.0051832944f, 0.0083509637f, 0.0116611840f, 0.0151316673f, 0.0187726468f,
+ 0.0225889906f, 0.0265906155f, 0.0307808779f, 0.0351639129f, 0.0397467501f,
+ 0.0445330814f, 0.0495262593f, 0.0547302663f, 0.0601483546f, 0.0657841489f,
+ 0.0716395080f, 0.0777165666f, 0.0840179473f, 0.0905451626f, 0.0972988978f,
+ 0.1042804047f, 0.1114900783f, 0.1189284250f, 0.1265947521f, 0.1344885528f,
+ 0.1426091045f, 0.1509550363f, 0.1595243514f, 0.1683151573f, 0.1773250401f,
+ 0.1865511388f, 0.1959902197f, 0.2056386322f, 0.2154925913f, 0.2255475521f,
+ 0.2357989848f, 0.2462418824f, 0.2568709552f, 0.2676805258f, 0.2786645591f,
+ 0.2898168266f, 0.3011307418f, 0.3125994802f, 0.3242157102f, 0.3359722793f,
+ 0.3478614092f, 0.3598752320f, 0.3720056713f, 0.3842444420f, 0.3965831101f,
+ 0.4090129435f, 0.4215250909f, 0.4341109097f, 0.4467608333f, 0.4594659507f,
+ 0.4722166657f, 0.4850038290f, 0.4978178144f, 0.5106483698f, 0.5234865546f,
+ 0.5363218188f, 0.5491440296f, 0.5619440079f, -0.5746001601f, -0.5872559547f,
+ -0.5998619199f, -0.6123980284f, -0.6248505116f, -0.6372103095f, -0.6494654417f,
+ -0.6616044044f, -0.6736174226f, -0.6854929924f, -0.6972201467f, -0.7087881565f,
+ -0.7201859951f, -0.7314035296f, -0.7424294949f, -0.7532534599f, -0.7638649344f,
+ -0.7742537856f, -0.7844095230f, -0.7943222523f, -0.8039818406f, -0.8133789897f,
+ -0.8225036860f, -0.8313468695f, -0.8398991823f, -0.8481519818f, -0.8560963273f,
+ -0.8637239933f, -0.8710266352f, -0.8779965043f, -0.8846257925f, -0.8909071684f,
+ -0.8968337178f, -0.9023985267f, -0.9075955749f, -0.9124187231f, -0.9168621302f,
+ -0.9209204316f, -0.9245886207f, -0.9278619289f, -0.9307362437f, -0.9332075119f,
+ -0.9352724552f, -0.9369278550f, -0.9381709695f, -0.9389997125f, -0.9394121170f,
+ -0.9394068122f, -0.9389829040f, -0.9381397963f, -0.9368773103f, -0.9351961017f,
+ -0.9330966473f, -0.9305803180f, -0.9276487827f, -0.9243040681f, -0.9205487967f,
+ -0.9163856506f, -0.9118180275f, -0.9068503380f, -0.9014858603f, -0.8957295418f,
+ -0.8895882368f, -0.8830582500f, -0.8761259913f, -0.8688043952f, -0.8611140251f,
+ -0.8530684114f, -0.8446723223f, -0.8359322548f, -0.8268554807f, -0.8174491525f,
+ -0.8077214956f, -0.7976809740f, -0.7873360515f, -0.7766956687f, -0.7657692432f,
+ -0.7545663714f, -0.7430967689f, -0.7313705087f, -0.7193979621f, -0.7071895599f,
+ -0.6947561502f, -0.6821083426f, -0.6692573428f, -0.6562142968f, -0.6429904699f,
+ -0.6295973659f, -0.6160464287f, -0.6023493409f, -0.5885176659f, -0.5745630264f,
+ -0.5604973435f, -0.5463322401f, -0.5320795774f, -0.5177509785f, -0.5033583045f,
+ -0.4889132082f, -0.4744274616f, -0.4599125087f, -0.4453800321f, -0.4308412969f,
+ -0.4163077474f, -0.4017905891f, -0.3873008788f, -0.3728497028f, -0.3584479988f,
+ -0.3441060781f, -0.3298346698f, -0.3156442046f, -0.3015447557f, -0.2875462472f,
+ -0.2736584544f, -0.2598909736f, -0.2462531626f, -0.2327540070f, -0.2194025517f,
+ -0.2062072009f, -0.1931765229f, -0.1803186089f, -0.1676410586f, -0.1551517546f,
+ -0.1428578347f, -0.1307662129f, -0.1188837960f, -0.1072167307f, -0.0957711190f,
+ -0.0845528170f, 0.0735579357f, 0.0628051385f, 0.0522958934f, 0.0420338102f,
+ 0.0320230126f, 0.0222672001f, 0.0127700046f, 0.0035346728f, -0.0054356726f,
+ -0.0141385710f, -0.0225714780f, -0.0307325479f, -0.0386199504f, -0.0462324508f,
+ -0.0535687581f, -0.0606284477f, -0.0674108788f, -0.0739159212f, -0.0801439285f,
+ -0.0860951766f, -0.0917705968f, -0.0971711874f, -0.1022983864f, -0.1071535870f,
+ -0.1117390916f, -0.1160565540f, -0.1201089993f, -0.1238986105f, -0.1274286509f,
+ -0.1307021976f, -0.1337226629f, -0.1364936531f, -0.1390190870f, -0.1413030326f,
+ -0.1433497667f, -0.1451636255f, -0.1467494071f, -0.1481117010f, -0.1492556185f,
+ -0.1501862854f, -0.1509089023f, -0.1514289081f, -0.1517517567f, -0.1518831998f,
+ -0.1518289149f, -0.1515947729f, -0.1511866748f, -0.1506105959f, -0.1498726010f,
+ -0.1489787102f, -0.1479352117f, -0.1467481852f, -0.1454239190f, -0.1439685971f,
+ -0.1423884183f, -0.1406896859f, -0.1388785988f, -0.1369612068f, -0.1349437684f,
+ -0.1328323931f, -0.1306331158f, -0.1283520460f, -0.1259952188f, -0.1235680804f,
+ -0.1210755706f, -0.1185237169f, -0.1159184426f, -0.1132654399f, -0.1105698794f,
+ -0.1078369170f, -0.1050716117f, -0.1022789180f, -0.0994636714f, -0.0966306925f,
+ -0.0937845483f, -0.0909297019f, -0.0880705118f, -0.0852110758f, -0.0823556259f,
+ -0.0795079023f, -0.0766717792f, -0.0738509223f, -0.0710486695f, -0.0682684705f,
+ -0.0655134097f, -0.0627865866f, -0.0600909144f, -0.0574291982f, -0.0548038296f,
+ -0.0522173792f, -0.0496721379f, -0.0471702330f, -0.0447136387f, -0.0423043817f,
+ -0.0399438478f, -0.0376337133f, -0.0353754386f, -0.0331703536f, -0.0310197119f,
+ -0.0289245304f, -0.0268857535f, -0.0249042176f, -0.0229805857f, -0.0211154576f,
+ -0.0193092767f, -0.0175623931f, -0.0158751141f, -0.0142475078f, -0.0126795555f,
+ -0.0111712581f, -0.0097224051f, -0.0083327051f, -0.0070017893f, -0.0057292255f,
+ -0.0045145033f, -0.0033569466f, -0.0022558495f, -0.0012104595f, -0.0002199477f,
+ 0.0007167263f, 0.0016004397f, 0.0024323659f, 0.0032136049f, 0.0039453004f,
+ 0.0046286648f, 0.0052649761f, 0.0058556525f, 0.0064016338f, -0.0069030458f,
+ -0.0073645366f, -0.0077859173f, -0.0081687812f, -0.0085145105f, -0.0088245263f,
+ -0.0091004446f, -0.0093438197f, -0.0095560895f, -0.0097389296f, -0.0098937284f,
+ -0.0100222183f, -0.0101256752f, -0.0102057597f, -0.0102638984f, -0.0103016300f,
+ -0.0103203785f, -0.0103215463f, -0.0103065800f, -0.0102768280f, -0.0102336034f,
+ -0.0101782102f, -0.0101119522f, -0.0100360261f, -0.0099515645f, -0.0098597351f,
+ -0.0097616902f, -0.0096583357f, -0.0095505062f, -0.0094392402f, -0.0093253115f,
+ -0.0092095714f, -0.0090927295f, -0.0089755040f, -0.0088585643f, -0.0087425476f,
+ -0.0086279176f, -0.0085152360f, -0.0084048351f, -0.0082970457f, -0.0081921816f,
+ -0.0080905585f, -0.0079923403f, -0.0078977877f, -0.0078069791f, -0.0077200048f,
+ -0.0076368991f, -0.0075576920f, -0.0074823610f, -0.0074108820f, -0.0073430836f,
+ -0.0072789183f, -0.0072182063f, -0.0071608433f, -0.0071066003f, -0.0070552491f,
+ -0.0070065912f, -0.0069604507f, -0.0069165546f, -0.0068746237f, -0.0068344427f,
+ -0.0067957863f, -0.0067584766f, -0.0067221262f, -0.0066861408f, -0.0066502281f,
+ -0.0066143544f, -0.0065783206f, -0.0065418649f, -0.0065047294f, -0.0064666905f,
+ -0.0064275563f, -0.0063871238f, -0.0063452618f, -0.0063017663f, -0.0062565422f,
+ -0.0062093716f, -0.0061602155f, -0.0061089024f, -0.0060553551f, -0.0059994739f,
+ -0.0059412112f, -0.0058804955f, -0.0058172857f, -0.0057515362f, -0.0056832312f,
+ -0.0056123761f, -0.0055389581f, -0.0054629631f, -0.0053843958f, -0.0053033372f,
+ -0.0052197399f, -0.0051336233f, -0.0050450461f, -0.0049540084f, -0.0048605883f,
+ -0.0047647208f, -0.0046664691f, -0.0045659458f, -0.0044631511f, -0.0043581501f,
+ -0.0042509669f, -0.0041416343f, -0.0040301653f, -0.0039165970f, -0.0038009947f,
+ -0.0036834506f, -0.0035639144f, -0.0034424895f, -0.0033192560f, -0.0031942502f,
+ -0.0030675260f, -0.0029391386f, -0.0028091520f, -0.0026777033f, -0.0025448306f,
+ -0.0024106177f, -0.0022751903f, -0.0021385867f, -0.0020008814f, -0.0018621609f,
+ -0.0017228508f, -0.0015830053f, -0.0014426354f, -0.0013017356f, -0.0011605313f,
+ -0.0010187104f, -0.0008753659f, 0.0007250868f, 0.0005901512f, 0.0004571248f,
+ 0.0003254497f, 0.0001951829f, 0.0000666175f, -0.0000600275f, -0.0001845164f,
+ -0.0003065709f, -0.0004259665f, -0.0005424777f, -0.0006558085f, -0.0007659104f,
+ -0.0008724863f, -0.0009753527f, -0.0010743001f, -0.0011691442f, -0.0012597255f,
+ -0.0013458347f, -0.0014273394f, -0.0015040794f, -0.0015758807f, -0.0016426332f,
+ -0.0017042002f, -0.0017605145f, -0.0018114587f, -0.0018569818f, -0.0018970286f,
+ -0.0019315863f, -0.0019606268f, -0.0019841781f, -0.0020022886f, -0.0020149164f,
+ -0.0020221891f, -0.0020242548f, -0.0020211563f, -0.0020131115f, -0.0020002127f,
+ -0.0019826870f, -0.0019606939f, -0.0019344082f, -0.0019041235f, -0.0018700724f,
+ -0.0018325197f, -0.0017917566f, -0.0017479789f, -0.0017015412f, -0.0016526897f,
+ -0.0016016904f, -0.0015489543f, -0.0014947094f, -0.0014391905f, -0.0013827635f,
+ -0.0013256427f, -0.0012681838f, -0.0012105964f, -0.0011530248f, -0.0010959618f,
+ -0.0010395534f, -0.0009838343f, -0.0009290278f, -0.0008749813f, -0.0008215802f,
+ -0.0007706117f, -0.0007240456f, -0.0006849431f, -0.0006499495f, -0.0006169267f,
+ -0.0005864026f, -0.0005585561f, -0.0005332623f, -0.0005106712f, -0.0004907669f,
+ -0.0004734583f, -0.0004585870f, -0.0004460039f, -0.0004356373f, -0.0004273243f,
+ -0.0004208330f, -0.0004159436f, -0.0004123962f, -0.0004100222f, -0.0004085470f,
+ -0.0004077079f, -0.0004073251f, -0.0004070932f, -0.0004067607f, -0.0004061488f,
+ -0.0004050555f, -0.0004033837f, -0.0004008813f, -0.0003973767f, -0.0003928188f,
+ -0.0003870558f, -0.0003799992f, -0.0003715968f, -0.0003617546f, -0.0003505340f,
+ -0.0003378810f, -0.0003237817f, -0.0003083795f, -0.0002916576f, -0.0002737129f,
+ -0.0002546264f, -0.0002344782f, -0.0002134573f, -0.0001916261f, -0.0001692856f,
+ -0.0001466954f, -0.0001236852f, -0.0001005735f, -0.0000775065f, -0.0000546696f,
+ -0.0000325590f, -0.0000109682f, 0.0000098813f, 0.0000295145f, 0.0000481009f,
+ 0.0000651376f, 0.0000805138f, 0.0000942973f, 0.0001058290f, 0.0001155818f,
+ 0.0001229653f, 0.0001266878f, 0.0001279376f, 0.0001216913f, 0.0000938624f};
+const WORD32 ixheaacd_ldmps_polyphase_filter_coeff_fix[1280] = {
+ -853545, -1322930, -1719119, -2126782, -2574301, -3048041, -3559191,
+ -4107257, -4687213, -5301343, -5945718, -6618804, -7319246, -8042436,
+ -8787193, -9550858, -10329401, -11120710, -11921096, -12727691, -13537407,
+ -14346057, -15150853, -15948462, -16734813, -17506682, -18260204, -18992030,
+ -19698524, -20375460, -21019632, -21627450, -22194906, -22718388, -23194228,
+ -23619058, -23989208, -24300612, -24550210, -24734604, -24850088, -24893120,
+ -24860320, -24748872, -24555020, -24275056, -23906264, -23445354, -22888868,
+ -22233058, -21474636, -20611186, -19638052, -18551164, -17347894, -16023834,
+ -14575184, -12996252, -11282398, -9433623, -7438163, -5292880, -3006836,
+ -503110, 2373307, 5565520, 8966779, 12521101, 16247504, 20156977,
+ 24254745, 28551455, 33050715, 37756963, 42677747, 47817031, 53178415,
+ 58766175, 64583803, 70635191, 76922335, 83447527, 90213583, 97222127,
+ 104473895, 111970231, 119711559, 127698423, 135930079, 144405983, 153125359,
+ 162086735, 171287967, 180727023, 190401311, 200307759, 210442895, 220802799,
+ 231383407, 242179839, 253187231, 264400207, 275813087, 287419775, 299213791,
+ 311188447, 323336671, 335651135, 348123967, 360747487, 373513343, 386413087,
+ 399438047, 412579327, 425827871, 439174303, 452609119, 466123039, 479705791,
+ 493347807, 507038783, 520768895, 534527807, 548304511, 562089407, 575871167,
+ 589638911, 603382783, -616972224, -630561280, -644096832, -657557376, -670928128,
+ -684199360, -697358208, -710392320, -723291200, -736042496, -748634432, -761055488,
+ -773293824, -785338560, -797177600, -808799744, -820193728, -831348672, -842253312,
+ -852897024, -863268928, -873359040, -883156608, -892651904, -901834880, -910696256,
+ -919226432, -927416576, -935257728, -942741568, -949859712, -956604288, -962967872,
+ -968943040, -974523328, -979702144, -984473216, -988830784, -992769472, -996284160,
+ -999370432, -1002023936, -1004241152, -1006018624, -1007353408, -1008243264, -1008686080,
+ -1008680384, -1008225216, -1007319936, -1005964352, -1004159168, -1001904896, -999203008,
+ -996055296, -992463936, -988431744, -983961600, -979057152, -973723136, -967963072,
+ -961782272, -955188096, -948176576, -940733120, -932871616, -924614144, -915975232,
+ -906960000, -897575424, -887829312, -877729344, -867284352, -856503424, -845395648,
+ -833970624, -822238464, -810209472, -797894080, -785303104, -772447680, -759339008,
+ -745988736, -732408256, -718609600, -704604736, -690405760, -676025024, -661474816,
+ -646767680, -631916032, -616932352, -601829440, -586619776, -571316096, -555930880,
+ -540476864, -524966560, -509412608, -493827296, -478223168, -462612320, -447007040,
+ -431419360, -415861152, -400344320, -384880608, -369481088, -354157280, -338920384,
+ -323781216, -308750432, -293838528, -279055808, -264412320, -249917712, -235581696,
+ -221413296, -207421712, -193615632, -180003216, -166592928, -153392432, -140409152,
+ -127650504, -115123088, -102833456, -90787896, 78982231, 67436503, 56152287,
+ 45133459, 34384447, 23909225, 13711688, 3795326, -5836509, -15181175,
+ -24235940, -32998822, -41467856, -49641716, -57519016, -65099300, -72381880,
+ -79366616, -86053888, -92443992, -98537928, -104336768, -109842056, -115055288,
+ -119978936, -124614776, -128966056, -133035120, -136825472, -140340416, -143583616,
+ -146558944, -149270608, -151722976, -153920640, -155868256, -157570976, -159033728,
+ -160262000, -161261296, -162037200, -162595552, -162942208, -163083344, -163025056,
+ -162773648, -162335456, -161716896, -160924480, -159964672, -158844224, -157569664,
+ -156147744, -154585104, -152888400, -151064400, -149119760, -147060976, -144894768,
+ -142627696, -140266240, -137816960, -135286336, -132680216, -130003904, -127263872,
+ -124466480, -121617840, -118723504, -115789008, -112819784, -109821152, -106798304,
+ -103756416, -100700392, -97635024, -94564992, -91494696, -88428680, -85370960,
+ -82325696, -79296824, -76287928, -73302712, -70344488, -67416584, -64522128,
+ -61664132, -58845164, -56067984, -53335052, -50648652, -48010904, -45423984,
+ -42889380, -40408892, -37984088, -35616396, -33307162, -31057478, -28868358,
+ -26740700, -24675216, -22672550, -20733178, -18857476, -17045774, -15298145,
+ -13614569, -11995047, -10439353, -8947174, -7518114, -6151709, -4847411,
+ -3604494, -2422200, -1299721, -236167, 769579, 1718459, 2611733,
+ 3450582, 4236234, 4969991, 5653225, 6287459, 6873702, -7412089,
+ -7907611, -8360065, -8771162, -9142386, -9475263, -9771528, -10032850,
+ -10260773, -10457096, -10623310, -10761275, -10872361, -10958351, -11020777,
+ -11061291, -11081422, -11082676, -11066606, -11034660, -10988248, -10928770,
+ -10857626, -10776101, -10685411, -10586810, -10481535, -10370559, -10254778,
+ -10135307, -10012977, -9888702, -9763244, -9637374, -9511811, -9387239,
+ -9264156, -9143165, -9024623, -8908885, -8796288, -8687171, -8581710,
+ -8480185, -8382680, -8289292, -8200058, -8115010, -8034124, -7957374,
+ -7884576, -7815679, -7750490, -7688897, -7630654, -7575516, -7523270,
+ -7473727, -7426594, -7381571, -7338427, -7296920, -7256859, -7217828,
+ -7179189, -7140628, -7102109, -7063418, -7024274, -6984400, -6943556,
+ -6901536, -6858122, -6813173, -6766470, -6717911, -6667262, -6614481,
+ -6559384, -6501888, -6441886, -6379327, -6314134, -6246263, -6175665,
+ -6102323, -6026243, -5947411, -5865812, -5781451, -5694415, -5604653,
+ -5512186, -5417077, -5319326, -5219017, -5116080, -5010583, -4902647,
+ -4792272, -4679528, -4564441, -4447046, -4327357, -4205414, -4081287,
+ -3955075, -3826724, -3696345, -3564024, -3429800, -3293731, -3155876,
+ -3016304, -2875162, -2732491, -2588381, -2442967, -2296290, -2148430,
+ -1999480, -1849897, -1699739, -1549018, -1397728, -1246111, -1093832,
+ -939917, 778556, 633670, 490834, 349449, 209576, 71530,
+ -64454, -198123, -329178, -457378, -582481, -704169, -822390,
+ -936825, -1047277, -1153521, -1255359, -1352620, -1445079, -1532594,
+ -1614993, -1692089, -1763764, -1829871, -1890338, -1945039, -1993919,
+ -2036919, -2074025, -2105207, -2130495, -2149941, -2163500, -2171309,
+ -2173527, -2170200, -2161562, -2147712, -2128894, -2105279, -2077055,
+ -2044537, -2007975, -1967653, -1923884, -1876878, -1827016, -1774562,
+ -1719802, -1663177, -1604932, -1545319, -1484731, -1423398, -1361702,
+ -1299868, -1238051, -1176780, -1116212, -1056384, -997536, -939504,
+ -882165, -827438, -777438, -735452, -697878, -662420, -629645,
+ -599745, -572586, -548329, -526957, -508372, -492404, -478893,
+ -467762, -458836, -451866, -446616, -442807, -440258, -438674,
+ -437773, -437362, -437113, -436756, -436099, -434925, -433130,
+ -430443, -426680, -421786, -415598, -408021, -398999, -388431,
+ -376383, -362797, -347658, -331120, -313165, -293897, -273403,
+ -251769, -229198, -205757, -181769, -157513, -132806, -107990,
+ -83222, -58701, -34960, -11777, 10610, 31691, 51648,
+ 69941, 86451, 101251, 113633, 124105, 132033, 136030,
+ 137372, 130665, 100784, -853545, -1322930, -1719119, -2126782,
+ -2574301, -3048041, -3559191, -4107257, -4687213, -5301343, -5945718,
+ -6618804, -7319246, -8042436, -8787193, -9550858, -10329401, -11120710,
+ -11921096, -12727691, -13537407, -14346057, -15150853, -15948462, -16734813,
+ -17506682, -18260204, -18992030, -19698524, -20375460, -21019632, -21627450,
+ -22194906, -22718388, -23194228, -23619058, -23989208, -24300612, -24550210,
+ -24734604, -24850088, -24893120, -24860320, -24748872, -24555020, -24275056,
+ -23906264, -23445354, -22888868, -22233058, -21474636, -20611186, -19638052,
+ -18551164, -17347894, -16023834, -14575184, -12996252, -11282398, -9433623,
+ -7438163, -5292880, -3006836, -503110, 2373307, 5565520, 8966779,
+ 12521101, 16247504, 20156977, 24254745, 28551455, 33050715, 37756963,
+ 42677747, 47817031, 53178415, 58766175, 64583803, 70635191, 76922335,
+ 83447527, 90213583, 97222127, 104473895, 111970231, 119711559, 127698423,
+ 135930079, 144405983, 153125359, 162086735, 171287967, 180727023, 190401311,
+ 200307759, 210442895, 220802799, 231383407, 242179839, 253187231, 264400207,
+ 275813087, 287419775, 299213791, 311188447, 323336671, 335651135, 348123967,
+ 360747487, 373513343, 386413087, 399438047, 412579327, 425827871, 439174303,
+ 452609119, 466123039, 479705791, 493347807, 507038783, 520768895, 534527807,
+ 548304511, 562089407, 575871167, 589638911, 603382783, -616972224, -630561280,
+ -644096832, -657557376, -670928128, -684199360, -697358208, -710392320, -723291200,
+ -736042496, -748634432, -761055488, -773293824, -785338560, -797177600, -808799744,
+ -820193728, -831348672, -842253312, -852897024, -863268928, -873359040, -883156608,
+ -892651904, -901834880, -910696256, -919226432, -927416576, -935257728, -942741568,
+ -949859712, -956604288, -962967872, -968943040, -974523328, -979702144, -984473216,
+ -988830784, -992769472, -996284160, -999370432, -1002023936, -1004241152, -1006018624,
+ -1007353408, -1008243264, -1008686080, -1008680384, -1008225216, -1007319936, -1005964352,
+ -1004159168, -1001904896, -999203008, -996055296, -992463936, -988431744, -983961600,
+ -979057152, -973723136, -967963072, -961782272, -955188096, -948176576, -940733120,
+ -932871616, -924614144, -915975232, -906960000, -897575424, -887829312, -877729344,
+ -867284352, -856503424, -845395648, -833970624, -822238464, -810209472, -797894080,
+ -785303104, -772447680, -759339008, -745988736, -732408256, -718609600, -704604736,
+ -690405760, -676025024, -661474816, -646767680, -631916032, -616932352, -601829440,
+ -586619776, -571316096, -555930880, -540476864, -524966560, -509412608, -493827296,
+ -478223168, -462612320, -447007040, -431419360, -415861152, -400344320, -384880608,
+ -369481088, -354157280, -338920384, -323781216, -308750432, -293838528, -279055808,
+ -264412320, -249917712, -235581696, -221413296, -207421712, -193615632, -180003216,
+ -166592928, -153392432, -140409152, -127650504, -115123088, -102833456, -90787896,
+ 78982231, 67436503, 56152287, 45133459, 34384447, 23909225, 13711688,
+ 3795326, -5836509, -15181175, -24235940, -32998822, -41467856, -49641716,
+ -57519016, -65099300, -72381880, -79366616, -86053888, -92443992, -98537928,
+ -104336768, -109842056, -115055288, -119978936, -124614776, -128966056, -133035120,
+ -136825472, -140340416, -143583616, -146558944, -149270608, -151722976, -153920640,
+ -155868256, -157570976, -159033728, -160262000, -161261296, -162037200, -162595552,
+ -162942208, -163083344, -163025056, -162773648, -162335456, -161716896, -160924480,
+ -159964672, -158844224, -157569664, -156147744, -154585104, -152888400, -151064400,
+ -149119760, -147060976, -144894768, -142627696, -140266240, -137816960, -135286336,
+ -132680216, -130003904, -127263872, -124466480, -121617840, -118723504, -115789008,
+ -112819784, -109821152, -106798304, -103756416, -100700392, -97635024, -94564992,
+ -91494696, -88428680, -85370960, -82325696, -79296824, -76287928, -73302712,
+ -70344488, -67416584, -64522128, -61664132, -58845164, -56067984, -53335052,
+ -50648652, -48010904, -45423984, -42889380, -40408892, -37984088, -35616396,
+ -33307162, -31057478, -28868358, -26740700, -24675216, -22672550, -20733178,
+ -18857476, -17045774, -15298145, -13614569, -11995047, -10439353, -8947174,
+ -7518114, -6151709, -4847411, -3604494, -2422200, -1299721, -236167,
+ 769579, 1718459, 2611733, 3450582, 4236234, 4969991, 5653225,
+ 6287459, 6873702, -7412089, -7907611, -8360065, -8771162, -9142386,
+ -9475263, -9771528, -10032850, -10260773, -10457096, -10623310, -10761275,
+ -10872361, -10958351, -11020777, -11061291, -11081422, -11082676, -11066606,
+ -11034660, -10988248, -10928770, -10857626, -10776101, -10685411, -10586810,
+ -10481535, -10370559, -10254778, -10135307, -10012977, -9888702, -9763244,
+ -9637374, -9511811, -9387239, -9264156, -9143165, -9024623, -8908885,
+ -8796288, -8687171, -8581710, -8480185, -8382680, -8289292, -8200058,
+ -8115010, -8034124, -7957374, -7884576, -7815679, -7750490, -7688897,
+ -7630654, -7575516, -7523270, -7473727, -7426594, -7381571, -7338427,
+ -7296920, -7256859, -7217828, -7179189, -7140628, -7102109, -7063418,
+ -7024274, -6984400, -6943556, -6901536, -6858122, -6813173, -6766470,
+ -6717911, -6667262, -6614481, -6559384, -6501888, -6441886, -6379327,
+ -6314134, -6246263, -6175665, -6102323, -6026243, -5947411, -5865812,
+ -5781451, -5694415, -5604653, -5512186, -5417077, -5319326, -5219017,
+ -5116080, -5010583, -4902647, -4792272, -4679528, -4564441, -4447046,
+ -4327357, -4205414, -4081287, -3955075, -3826724, -3696345, -3564024,
+ -3429800, -3293731, -3155876, -3016304, -2875162, -2732491, -2588381,
+ -2442967, -2296290, -2148430, -1999480, -1849897, -1699739, -1549018,
+ -1397728, -1246111, -1093832, -939917, 778556, 633670, 490834,
+ 349449, 209576, 71530, -64454, -198123, -329178, -457378,
+ -582481, -704169, -822390, -936825, -1047277, -1153521, -1255359,
+ -1352620, -1445079, -1532594, -1614993, -1692089, -1763764, -1829871,
+ -1890338, -1945039, -1993919, -2036919, -2074025, -2105207, -2130495,
+ -2149941, -2163500, -2171309, -2173527, -2170200, -2161562, -2147712,
+ -2128894, -2105279, -2077055, -2044537, -2007975, -1967653, -1923884,
+ -1876878, -1827016, -1774562, -1719802, -1663177, -1604932, -1545319,
+ -1484731, -1423398, -1361702, -1299868, -1238051, -1176780, -1116212,
+ -1056384, -997536, -939504, -882165, -827438, -777438, -735452,
+ -697878, -662420, -629645, -599745, -572586, -548329, -526957,
+ -508372, -492404, -478893, -467762, -458836, -451866, -446616,
+ -442807, -440258, -438674, -437773, -437362, -437113, -436756,
+ -436099, -434925, -433130, -430443, -426680, -421786, -415598,
+ -408021, -398999, -388431, -376383, -362797, -347658, -331120,
+ -313165, -293897, -273403, -251769, -229198, -205757, -181769,
+ -157513, -132806, -107990, -83222, -58701, -34960, -11777,
+ 10610, 31691, 51648, 69941, 86451, 101251, 113633,
+ 124105, 132033, 136030, 137372, 130665, 100784};
+
+const ia_mps_dec_res_huffmann_tables_struct ixheaacd_mps_dec_res_huffmann_tables = {
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, 12,
+ 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8,
+ 8, 8, 12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
+ 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96, -1},
+ {4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 12,
+ 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24,
+ 28, 28, 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20, -1},
+ {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16,
+ 16, 16, 20, 20, 20, 24, 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20, -1},
+ {12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 20,
+ 20, 20, 20, 24, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80, -1},
+ {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12, 12,
+ 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 28, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8,
+ 8, 8, 12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 16, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
+ 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, -1},
+ {4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 8, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24,
+ 28, 28, 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 12, -1},
+ {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16,
+ 16, 16, 20, 20, 20, 24, 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, -1},
+ {4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 12, -1},
+ {12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 20,
+ 20, 20, 20, 24, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 16, -1},
+ {4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 12, -1},
+
+ /* huffman_code_book_1 */
+ {
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800,
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0xa840, 0xa8c0, 0xa803, 0xa810, 0xa801, 0xa80c,
+ 0xa804, 0xa830, 0x1008, 0x100b, 0x100e, 0x1011, 0x1014, 0x1017, 0x201a, 0x1029, 0x9070,
+ 0x90d0, 0x900d, 0x901c, 0x9034, 0x9007, 0x9050, 0x900f, 0x90f0, 0x903c, 0x904c, 0x9013,
+ 0x90c4, 0x9005, 0x9044, 0x9031, 0x9014, 0x9011, 0x90cc, 0x9041, 0x90c3, 0x9043, 0x90c1,
+ 0x9033, 0xa05c, 0xa0dc, 0xa074, 0xa017, 0xa01d, 0xa035, 0xa037, 0xa07c, 0xa04d, 0xa01f,
+ 0xa0d4, 0xa0c7, 0xa0f4, 0xa03d, 0xa071, 0xa073, 0x1004, 0x1007, 0x180a, 0x2011, 0x90d3,
+ 0x90fc, 0x903f, 0x9015, 0x9047, 0x9051, 0x90d1, 0x9054, 0x98f1, 0x98cf, 0x9853, 0x984f,
+ 0x98cd, 0x98f3, 0x98c5, 0x9845, 0xa077, 0xa0dd, 0xa0d7, 0xa07d, 0xa055, 0xa0f5, 0xa05f,
+ 0xa0f7, 0xa0ff, 0xa05d, 0xa075, 0xa0d5, 0xa0df, 0xa0fd, 0xa07f, 0xa057,
+ },
+ /* huffman_code_book_2 */
+ {
+ 0x9800, 0x9800, 0x9800, 0x9800, 0xa040, 0xa040, 0xa8c0, 0xa801, 0xa80c, 0xa803, 0xa830,
+ 0xa804, 0xa810, 0x0813, 0x0814, 0x0815, 0x0816, 0x0817, 0x0818, 0x0819, 0x081a, 0x081b,
+ 0x081c, 0x081d, 0x081e, 0x101f, 0x1022, 0x1025, 0x1028, 0x182d, 0x1834, 0x103b, 0x8834,
+ 0x88d0, 0x881c, 0x8807, 0x8813, 0x880d, 0x88c3, 0x8870, 0x884c, 0x88f0, 0x880f, 0x8844,
+ 0x8841, 0x8831, 0x88c4, 0x8811, 0x883c, 0x88c1, 0x8833, 0x88cc, 0x8850, 0x8814, 0x8805,
+ 0x8843, 0x901d, 0x904d, 0x90dc, 0x9037, 0x9074, 0x9053, 0x9045, 0x90d4, 0x903d, 0x9054,
+ 0x90c7, 0x90fc, 0x90cd, 0x907c, 0x905c, 0x0801, 0x8871, 0x88d3, 0x98f4, 0x98c5, 0x98f1,
+ 0x98f3, 0x983f, 0x9847, 0x984f, 0x981f, 0x9815, 0x98d1, 0x98cf, 0x9817, 0x9873, 0x9835,
+ 0x9851, 0x9877, 0x1004, 0x1007, 0x100a, 0x100d, 0x88dd, 0x88dd, 0x907d, 0x90ff, 0x90d7,
+ 0x90d5, 0x9055, 0x90f7, 0x9075, 0x90df, 0x90f5, 0x905f, 0x907f, 0x90fd, 0x905d, 0x9057,
+ },
+ /* huffman_code_book_3 */
+ {
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800,
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0xa040, 0xa040, 0xa001, 0xa001, 0xa010, 0xa010,
+ 0xa004, 0xa004, 0xa850, 0xa805, 0x0806, 0x0807, 0x0808, 0x1009, 0x100e, 0x101f, 0x8814,
+ 0x8811, 0x8844, 0x8815, 0x8841, 0x8854, 0x9055, 0x9045, 0x9051, 0x0801, 0x8880, 0x8802,
+ 0x0804, 0x1005, 0x1008, 0x100b, 0x8806, 0x8890, 0x8864, 0x8864, 0x9009, 0x9019, 0x9060,
+ 0x9016, 0x9094, 0x9008, 0x9024, 0x9018, 0x9020, 0x9012, 0x1004, 0x1007, 0x1810, 0x1017,
+ 0x9084, 0x9065, 0x9025, 0x9058, 0x9059, 0x0803, 0x0804, 0x0805, 0x8861, 0x8848, 0x8849,
+ 0x8821, 0x8895, 0x8856, 0x9891, 0x9846, 0x980a, 0x981a, 0x98a4, 0x9868, 0x9842, 0x9881,
+ 0x1004, 0x1007, 0x100a, 0x1011, 0x8829, 0x8829, 0x90a0, 0x9069, 0x9052, 0x9085, 0x905a,
+ 0x90a5, 0x9028, 0x9026, 0x0802, 0x0803, 0x884a, 0x88a1, 0x8898, 0x88a8, 0x0804, 0x0805,
+ 0x1006, 0x1009, 0x882a, 0x88a9, 0x8899, 0x8866, 0x886a, 0x886a, 0x9022, 0x9088, 0x9062,
+ 0x0803, 0x1004, 0x1007, 0x8889, 0x8896, 0x8892, 0x8892, 0x90aa, 0x90a6, 0x909a, 0x9086,
+ 0x9082, 0x0801, 0x88a2, 0x888a,
+ },
+ /* huffman_code_book_4 */
+ {
+ 0xa055, 0xa055, 0xa015, 0xa015, 0xa051, 0xa051, 0xa054, 0xa054, 0xa045, 0xa045, 0xa040,
+ 0xa040, 0xa050, 0xa050, 0xa000, 0xa000, 0xa005, 0xa005, 0xa044, 0xa044, 0xa841, 0xa814,
+ 0xa801, 0xa811, 0xa804, 0xa810, 0x1006, 0x1009, 0x100c, 0x1815, 0x101c, 0x1029, 0x9095,
+ 0x9059, 0x9065, 0x9056, 0x9094, 0x9091, 0x9064, 0x9085, 0x9019, 0x0803, 0x0804, 0x0805,
+ 0x8816, 0x8858, 0x8825, 0x8846, 0x8861, 0x8852, 0x9849, 0x9890, 0x9884, 0x9860, 0x9881,
+ 0x9812, 0x9824, 0x9806, 0x0804, 0x0805, 0x0806, 0x1007, 0x8818, 0x8821, 0x8842, 0x8809,
+ 0x8848, 0x8880, 0x8802, 0x8802, 0x9020, 0x9008, 0x1004, 0x1007, 0x180e, 0x1015, 0x9069,
+ 0x90a5, 0x9099, 0x905a, 0x9066, 0x9096, 0x0802, 0x0803, 0x8868, 0x88a4, 0x8898, 0x8829,
+ 0x981a, 0x98a1, 0x9826, 0x9889, 0x984a, 0x98a9, 0x9862, 0x9886, 0x0804, 0x1005, 0x1008,
+ 0x100b, 0x8892, 0x886a, 0x909a, 0x90a6, 0x9028, 0x90a0, 0x900a, 0x9088, 0x9022, 0x9082,
+ 0x90aa, 0x902a, 0x90a8, 0x0801, 0x88a2, 0x888a,
+ },
+ /* huffman_code_book_5 */
+ {
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800,
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0xa0f0, 0xa0f0, 0xa010, 0xa010, 0xa001, 0xa001,
+ 0xa00f, 0xa00f, 0xa81f, 0xa8f1, 0xa8ff, 0xa811, 0x1004, 0x1807, 0x100e, 0x101d, 0x90e0,
+ 0x9002, 0x9020, 0x900e, 0x98ef, 0x9821, 0x98fe, 0x9812, 0x98e1, 0x982f, 0x98f2, 0x981e,
+ 0x0804, 0x0805, 0x1006, 0x1009, 0x88d0, 0x8830, 0x880d, 0x8803, 0x90df, 0x9013, 0x9031,
+ 0x90fd, 0x90d1, 0x903f, 0x901d, 0x90f3, 0x1004, 0x1807, 0x100e, 0x101d, 0x90e2, 0x9022,
+ 0x90ee, 0x902e, 0x98de, 0x983e, 0x98e3, 0x982d, 0x9832, 0x9823, 0x98d2, 0x98ed, 0x0804,
+ 0x0805, 0x1006, 0x1009, 0x880c, 0x88c0, 0x8841, 0x8840, 0x90cf, 0x9004, 0x904f, 0x90fc,
+ 0x9014, 0x90f4, 0x90c1, 0x901c, 0x1004, 0x1007, 0x100a, 0x1011, 0x903d, 0x90dd, 0x90d3,
+ 0x90e4, 0x90ce, 0x9042, 0x902c, 0x9024, 0x9033, 0x90c2, 0x0802, 0x0803, 0x88ec, 0x884e,
+ 0x883c, 0x88cd, 0x0804, 0x0805, 0x0806, 0x1007, 0x88c3, 0x8834, 0x88d4, 0x8843, 0x884d,
+ 0x88dc, 0x904c, 0x90c4, 0x9044, 0x90cc,
+ },
+ /* huffman_code_book_6 */
+ {
+ 0xa000, 0xa000, 0xa010, 0xa010, 0xa00f, 0xa00f, 0xa001, 0xa001, 0xa0f0, 0xa0f0, 0xa011,
+ 0xa011, 0xa0f1, 0xa0f1, 0xa01f, 0xa01f, 0xa0ff, 0xa0ff, 0x080e, 0x080f, 0x0810, 0x0811,
+ 0x0812, 0x0813, 0x0814, 0x0815, 0x1016, 0x1019, 0x101c, 0x101f, 0x1028, 0x1039, 0x882f,
+ 0x8821, 0x88e1, 0x88ef, 0x88e0, 0x88f2, 0x8820, 0x881e, 0x8812, 0x880e, 0x88fe, 0x8802,
+ 0x882e, 0x88e2, 0x88ee, 0x8822, 0x90d1, 0x9031, 0x903f, 0x90f3, 0x90df, 0x9013, 0x901d,
+ 0x90fd, 0x9030, 0x90d0, 0x900d, 0x9003, 0x9032, 0x0803, 0x0804, 0x0805, 0x88de, 0x88e3,
+ 0x8823, 0x883e, 0x882d, 0x88ed, 0x0804, 0x1005, 0x1008, 0x100b, 0x88d2, 0x8833, 0x903d,
+ 0x90dd, 0x90d3, 0x901c, 0x90fc, 0x9041, 0x90c1, 0x90cf, 0x9014, 0x904f, 0x90f4, 0x900c,
+ 0x1004, 0x1007, 0x100a, 0x100f, 0x90c2, 0x90ce, 0x9024, 0x90ec, 0x90c0, 0x9042, 0x904e,
+ 0x90e4, 0x9040, 0x902c, 0x9004, 0x0801, 0x88dc, 0x88d4, 0x0804, 0x0805, 0x0806, 0x1007,
+ 0x883c, 0x884d, 0x8834, 0x8843, 0x88c3, 0x88cd, 0x9044, 0x90c4, 0x90cc, 0x904c,
+ },
+ /* huffman_code_book_7 */
+ {
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800,
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x9810, 0x9810, 0x9810, 0x9810, 0x9801, 0x9801,
+ 0x9801, 0x9801, 0xa011, 0xa011, 0x0806, 0x0807, 0x1008, 0x100b, 0x1014, 0x1023, 0x8821,
+ 0x8812, 0x8820, 0x8802, 0x9031, 0x9013, 0x9022, 0x9030, 0x9003, 0x0803, 0x0804, 0x0805,
+ 0x8823, 0x8832, 0x8814, 0x8841, 0x8815, 0x8851, 0x0804, 0x0805, 0x1006, 0x1009, 0x8833,
+ 0x8824, 0x8804, 0x8840, 0x9042, 0x9025, 0x9052, 0x9005, 0x9061, 0x9050, 0x9016, 0x9043,
+ 0x1004, 0x1007, 0x180e, 0x1015, 0x9035, 0x9034, 0x9053, 0x9026, 0x9062, 0x9017, 0x0802,
+ 0x0803, 0x8836, 0x8806, 0x8860, 0x8844, 0x9871, 0x9845, 0x9872, 0x9854, 0x9863, 0x9827,
+ 0x9873, 0x9864, 0x0804, 0x1005, 0x1008, 0x100b, 0x8855, 0x8846, 0x8837, 0x8837, 0x9070,
+ 0x9007, 0x9065, 0x9056, 0x9074, 0x9047, 0x9057, 0x9075, 0x0802, 0x0803, 0x8876, 0x8866,
+ 0x8867, 0x8877,
+ },
+ /* huffman_code_book_8 */
+ {
+ 0x9811, 0x9811, 0x9811, 0x9811, 0xa021, 0xa021, 0xa010, 0xa010, 0xa012, 0xa012, 0xa001,
+ 0xa001, 0xa022, 0xa022, 0xa800, 0xa820, 0xa802, 0xa831, 0xa813, 0xa832, 0xa823, 0x080b,
+ 0x080c, 0x080d, 0x080e, 0x080f, 0x1010, 0x1013, 0x1016, 0x1019, 0x1820, 0x1027, 0x8833,
+ 0x8841, 0x8814, 0x8842, 0x8824, 0x8830, 0x8803, 0x8843, 0x8834, 0x8852, 0x9051, 0x9025,
+ 0x9015, 0x9053, 0x9035, 0x9044, 0x9054, 0x9004, 0x9045, 0x9040, 0x9026, 0x9062, 0x9061,
+ 0x9016, 0x0802, 0x0803, 0x8836, 0x8863, 0x8855, 0x8850, 0x9864, 0x9805, 0x9846, 0x9871,
+ 0x9872, 0x9827, 0x9865, 0x9873, 0x0804, 0x1005, 0x1008, 0x100b, 0x8817, 0x8856, 0x8837,
+ 0x8837, 0x9066, 0x9074, 0x9060, 0x9047, 0x9006, 0x9075, 0x9076, 0x9067, 0x0802, 0x0803,
+ 0x8857, 0x8870, 0x8807, 0x8877,
+ },
+ /* huffman_code_book_9 */
+ {
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800,
+ 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x9810, 0x9810, 0x9810, 0x9810, 0x9801, 0x9801,
+ 0x9801, 0x9801, 0xa011, 0xa011, 0x0806, 0x0807, 0x1008, 0x100d, 0x101a, 0x1037, 0x8821,
+ 0x8812, 0x8820, 0x8802, 0x9031, 0x9022, 0x9013, 0x0801, 0x8830, 0x8803, 0x0804, 0x0805,
+ 0x0806, 0x1007, 0x8823, 0x8832, 0x8814, 0x8841, 0x8824, 0x8815, 0x9042, 0x9033, 0x9004,
+ 0x9040, 0x1004, 0x1007, 0x180c, 0x1813, 0x9051, 0x9025, 0x9016, 0x9034, 0x9052, 0x9061,
+ 0x9043, 0x0801, 0x8805, 0x8826, 0x9850, 0x9817, 0x9835, 0x9818, 0x9881, 0x9844, 0x9853,
+ 0x9862, 0x9871, 0x9806, 0x9882, 0x9828, 0x9836, 0x9827, 0x9845, 0x9891, 0x1004, 0x2015,
+ 0x1024, 0x1045, 0x0804, 0x1005, 0x1008, 0x100b, 0x8819, 0x8872, 0x9060, 0x9054, 0x9063,
+ 0x9083, 0x9007, 0x9092, 0x9038, 0x9046, 0x9037, 0x9008, 0x90a1, 0x9064, 0xa029, 0xa055,
+ 0xa080, 0xa070, 0xa073, 0xa0a2, 0xa093, 0xa084, 0xa01a, 0xa074, 0xa065, 0xa056, 0xa048,
+ 0xa047, 0xa039, 0xa0b1, 0x1004, 0x1809, 0x1810, 0x1817, 0x9058, 0x9090, 0x9085, 0x0801,
+ 0x88a3, 0x882a, 0x9809, 0x98b2, 0x9894, 0x9866, 0x98c1, 0x9849, 0x9886, 0x981b, 0x9895,
+ 0x98a4, 0x9857, 0x9875, 0x982b, 0x981c, 0x98c2, 0x98b3, 0x983a, 0x9859, 0x9867, 0x9887,
+ 0x98b4, 0x980a, 0x9876, 0x98c3, 0x1804, 0x100b, 0x201a, 0x1029, 0x98a0, 0x98a5, 0x984a,
+ 0x9868, 0x982c, 0x9896, 0x9897, 0x984b, 0x0804, 0x0805, 0x1006, 0x1009, 0x88b0, 0x8869,
+ 0x883b, 0x885a, 0x9088, 0x9078, 0x90c5, 0x903c, 0x90b5, 0x9077, 0x90c4, 0x90b6, 0xa0a6,
+ 0xa04c, 0xa079, 0xa05b, 0xa00b, 0xa0c6, 0xa06a, 0xa0c0, 0xa0a7, 0xa05c, 0xa07a, 0xa098,
+ 0xa00c, 0xa0b7, 0xa089, 0xa099, 0x1004, 0x1007, 0x180a, 0x1011, 0x90a8, 0x907b, 0x90c7,
+ 0x906b, 0x908b, 0x90b8, 0x907c, 0x906c, 0x988a, 0x98a9, 0x988c, 0x989a, 0x989b, 0x989c,
+ 0x98ab, 0x98c9, 0x0804, 0x0805, 0x0806, 0x1007, 0x88aa, 0x88b9, 0x88c8, 0x88ba, 0x88ca,
+ 0x88cb, 0x90ac, 0x90bb, 0x90bc, 0x90cc,
+ },
+ /* huffman_code_book_10 */
+ {
+ 0xa011, 0xa011, 0xa012, 0xa012, 0xa021, 0xa021, 0xa822, 0xa810, 0xa801, 0xa813, 0xa832,
+ 0xa831, 0xa823, 0xa833, 0x0812, 0x0813, 0x0814, 0x0815, 0x0816, 0x0817, 0x0818, 0x1019,
+ 0x101c, 0x101f, 0x1022, 0x1025, 0x182e, 0x1835, 0x103c, 0x204d, 0x105c, 0x107d, 0x8820,
+ 0x8802, 0x8824, 0x8842, 0x8814, 0x8841, 0x8800, 0x8843, 0x8834, 0x8830, 0x8803, 0x8844,
+ 0x8825, 0x8852, 0x9015, 0x9051, 0x9053, 0x9035, 0x9054, 0x9045, 0x9062, 0x9026, 0x9063,
+ 0x9040, 0x9061, 0x9004, 0x9016, 0x9036, 0x9055, 0x9064, 0x9046, 0x0803, 0x0804, 0x0805,
+ 0x8865, 0x8872, 0x8837, 0x8827, 0x8856, 0x8882, 0x9873, 0x9850, 0x9871, 0x9805, 0x9881,
+ 0x9817, 0x9883, 0x9874, 0x9847, 0x9828, 0x9866, 0x9875, 0x9818, 0x9838, 0x9884, 0x9848,
+ 0x0804, 0x1005, 0x1008, 0x100b, 0x8857, 0x8885, 0x8858, 0x8858, 0x9076, 0x9067, 0x9092,
+ 0x9060, 0x9068, 0x9093, 0x9039, 0x9091, 0x9029, 0x9006, 0xa086, 0xa094, 0xa049, 0xa0a2,
+ 0xa019, 0xa077, 0xa087, 0xa095, 0xa078, 0xa0a3, 0xa059, 0xa0a4, 0xa02a, 0xa0a1, 0xa03a,
+ 0xa096, 0x1004, 0x1007, 0x1810, 0x1817, 0x9069, 0x9080, 0x904a, 0x9070, 0x90b2, 0x0803,
+ 0x0804, 0x0805, 0x8879, 0x88b3, 0x88a6, 0x881a, 0x88b1, 0x8897, 0x9807, 0x9888, 0x98a5,
+ 0x983b, 0x985a, 0x9889, 0x98b5, 0x9808, 0x98b4, 0x982b, 0x987a, 0x986a, 0x98a7, 0x984b,
+ 0x981b, 0x98c2, 0x1804, 0x180b, 0x1012, 0x1023, 0x9898, 0x98c3, 0x98b6, 0x985b, 0x98c4,
+ 0x98b7, 0x98c5, 0x983c, 0x986b, 0x9890, 0x98a8, 0x98a0, 0x98c1, 0x9809, 0x984c, 0x9899,
+ 0x0804, 0x1005, 0x1008, 0x100b, 0x88c6, 0x882c, 0x888a, 0x888a, 0x909a, 0x901c, 0x90b8,
+ 0x90c7, 0x907b, 0x905c, 0x906c, 0x90a9, 0x908b, 0x90c8, 0x1004, 0x1007, 0x100a, 0x180d,
+ 0x900a, 0x907c, 0x90b0, 0x90aa, 0x90b9, 0x90ba, 0x900b, 0x90bb, 0x909b, 0x90ab, 0x90c0,
+ 0x908c, 0x98c9, 0x98ac, 0x989c, 0x98bc, 0x98cb, 0x980c, 0x98ca, 0x98cc,
+ },
+ /* huffman_codebook_11[290] = */
+ {
+ 0xa000, 0xa000, 0xa021, 0xa021, 0xaa10, 0xa820, 0xa801, 0xa841, 0xa822, 0xa842, 0x0816,
+ 0x0817, 0x0818, 0x1019, 0x101c, 0x101f, 0x1022, 0x1025, 0x182c, 0x1833, 0x183a, 0x1841,
+ 0x1848, 0x184f, 0x1056, 0x2063, 0x2072, 0x2081, 0x1090, 0x28b1, 0x28d0, 0x10ef, 0x8823,
+ 0x8861, 0x8862, 0x8840, 0x8843, 0x8802, 0x8863, 0x8863, 0x9081, 0x9024, 0x9082, 0x9044,
+ 0x9083, 0x9064, 0x9060, 0x9003, 0x90a1, 0x90a2, 0x9045, 0x9084, 0x9025, 0x90a3, 0x9065,
+ 0x90a4, 0x0802, 0x0803, 0x8885, 0x88c2, 0x8846, 0x88c1, 0x98c3, 0x9866, 0x9826, 0x9890,
+ 0x9870, 0x9a05, 0x9a03, 0x9a04, 0x98c4, 0x9a06, 0x9880, 0x9886, 0x9804, 0x9850, 0x98a5,
+ 0x98b0, 0x9a07, 0x9a02, 0x9a08, 0x9847, 0x98e2, 0x9867, 0x98c5, 0x98a6, 0x98d0, 0x9a0a,
+ 0x98e3, 0x98e1, 0x9a09, 0x98f0, 0x9830, 0x9827, 0x9887, 0x9a0b, 0x98e4, 0x9a0c, 0x9910,
+ 0x9a01, 0x98c6, 0x9930, 0x9848, 0x98a7, 0x9950, 0x9a0d, 0x9903, 0x9902, 0x9868, 0x98a0,
+ 0x0804, 0x0805, 0x0806, 0x1007, 0x8a0e, 0x8970, 0x88e5, 0x8888, 0x88c7, 0x88e6, 0x8805,
+ 0x8805, 0x9104, 0x920f, 0xa190, 0xa028, 0xa101, 0xa1d0, 0xa0a8, 0xa1b0, 0xa069, 0xa105,
+ 0xa0e7, 0xa049, 0xa106, 0xa122, 0xa123, 0xa1f0, 0xa089, 0xa0c8, 0xa0c0, 0xa124, 0xa0a9,
+ 0xa107, 0xa0e8, 0xa029, 0xa143, 0xa006, 0xa142, 0xa121, 0xa125, 0xa08a, 0xa04a, 0xa126,
+ 0xa06a, 0xa0c9, 0xa144, 0xa108, 0xa145, 0xa127, 0xa163, 0xa02a, 0xa0e0, 0xa146, 0xa0e9,
+ 0xa06b, 0xa0aa, 0xa141, 0xa08b, 0xa162, 0xa1a2, 0xa0ca, 0x1004, 0x1007, 0x1810, 0x1817,
+ 0x91a3, 0x904b, 0x9200, 0x90ab, 0x9165, 0x0803, 0x0804, 0x0805, 0x8964, 0x8928, 0x88ea,
+ 0x8909, 0x8810, 0x888d, 0x9807, 0x986d, 0x9966, 0x99a1, 0x99a4, 0x9983, 0x984d, 0x99a5,
+ 0x990a, 0x98cb, 0x9948, 0x9947, 0x99c2, 0x9984, 0x982b, 0x988c, 0xa961, 0xa86c, 0xa82d,
+ 0xa982, 0xa8eb, 0xa86e, 0xa8ac, 0xa8ad, 0xa9c4, 0xa88e, 0xa967, 0xa9c3, 0xa985, 0xa9a6,
+ 0xa986, 0xa900, 0xa968, 0xa84c, 0xa929, 0xa9c5, 0xa8cd, 0xa94a, 0xa9e2, 0xa90b, 0xa92a,
+ 0xa9c6, 0xa949, 0xa8ae, 0xa969, 0xa9c1, 0xa84e, 0xa8cc, 0xa82c, 0xa9a8, 0xa808, 0xa9a7,
+ 0xa8ec, 0xa987, 0xa8ed, 0xa9e3, 0xa981, 0xa8ce, 0xa84f, 0xa9e5, 0xa9e4, 0xa82e, 0xa92b,
+ 0xa88f, 0xa9c7, 0xa90d, 0xa9a9, 0xa90c, 0xa8af, 0xa86f, 0xa94b, 0xa96a, 0xa988, 0xa9e6,
+ 0xa9e7, 0xa90e, 0xa9e1, 0xa8ee, 0xa920, 0xa809, 0x1804, 0x100b, 0x201e, 0x102d, 0x992d,
+ 0x992c, 0x9989, 0x99c8, 0x994d, 0x99c9, 0x998a, 0x98cf, 0x1004, 0x1007, 0x100a, 0x100d,
+ 0x88ef, 0x88ef, 0x912e, 0x91e8, 0x916b, 0x916e, 0x902f, 0x914c, 0x914e, 0x91ab, 0x91aa,
+ 0x916d, 0x916c, 0x910f, 0x91cb, 0x91ac, 0xa18d, 0xa1e9, 0xa1ca, 0xa140, 0xa18b, 0xa12f,
+ 0xa00a, 0xa18c, 0xa160, 0xa18e, 0xa14f, 0xa1ad, 0xa00d, 0xa1cc, 0xa1ea, 0xa1eb, 0x1004,
+ 0x1007, 0x100a, 0x100d, 0x916f, 0x91cd, 0x91a0, 0x900b, 0x91ae, 0x91ec, 0x91ed, 0x918f,
+ 0x91c0, 0x91ce, 0x91af, 0x9180, 0x91cf, 0x0803, 0x0804, 0x0805, 0x880e, 0x880c, 0x89ee,
+ 0x89e0, 0x880f, 0x89ef,
+ },
+ /* huffman_code_book_scl */
+ {
+ 7, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c,
+ 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c,
+ 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c,
+ 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c,
+ 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c,
+ 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x883c, 0x983b,
+ 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b, 0x983b,
+ 0x983b, 0x983b, 0x983b, 0x983b, 0xa03d, 0xa03d, 0xa03d, 0xa03d, 0xa03d, 0xa03d, 0xa03d,
+ 0xa03d, 0xa03a, 0xa03a, 0xa03a, 0xa03a, 0xa03a, 0xa03a, 0xa03a, 0xa03a, 0xa03e, 0xa03e,
+ 0xa03e, 0xa03e, 0xa03e, 0xa03e, 0xa03e, 0xa03e, 0xa839, 0xa839, 0xa839, 0xa839, 0xa83f,
+ 0xa83f, 0xa83f, 0xa83f, 0xb038, 0xb038, 0xb040, 0xb040, 0xb037, 0xb037, 0xb041, 0xb041,
+ 0xb842, 0xb836, 0xb843, 0x0805, 0x0806, 0x1007, 0x100a, 0x1011, 0x8835, 0x8844, 0x8834,
+ 0x8845, 0x8833, 0x8833, 0x9046, 0x9032, 0x9031, 0x9047, 0x0802, 0x0803, 0x8848, 0x8830,
+ 0x8849, 0x882f, 0x0804, 0x1005, 0x1008, 0x100f, 0x884a, 0x882e, 0x904c, 0x904b, 0x904d,
+ 0x904e, 0x902d, 0x902b, 0x0802, 0x0803, 0x882c, 0x884f, 0x882a, 0x8829, 0x0804, 0x1005,
+ 0x1008, 0x1011, 0x8850, 0x8828, 0x9051, 0x9027, 0x9052, 0x9026, 0x9053, 0x0803, 0x0804,
+ 0x0805, 0x8825, 0x8823, 0x8855, 0x8821, 0x8824, 0x8822, 0x0804, 0x1005, 0x1008, 0x1015,
+ 0x8854, 0x8820, 0x9057, 0x9059, 0x901e, 0x901f, 0x0804, 0x0805, 0x0806, 0x1007, 0x8856,
+ 0x881d, 0x881a, 0x881b, 0x881c, 0x8818, 0x8858, 0x8858, 0x9019, 0x9016, 0x1004, 0x100d,
+ 0x2020, 0x202f, 0x9017, 0x0803, 0x0804, 0x0805, 0x885a, 0x8815, 0x8813, 0x8803, 0x8801,
+ 0x8802, 0x1004, 0x1007, 0x100a, 0x100d, 0x8800, 0x8800, 0x9062, 0x9063, 0x9064, 0x9065,
+ 0x9066, 0x9075, 0x9061, 0x905b, 0x905c, 0x905d, 0x905e, 0x905f, 0x9060, 0x9068, 0xa06f,
+ 0xa070, 0xa071, 0xa072, 0xa073, 0xa074, 0xa06e, 0xa069, 0xa06a, 0xa06b, 0xa06c, 0xa06d,
+ 0xa076, 0xa006, 0xa008, 0xa009, 0xa00a, 0xa005, 0xa067, 0xa078, 0xa077, 0xa004, 0xa007,
+ 0xa00f, 0xa010, 0xa012, 0xa014, 0xa011, 0xa00b, 0xa00c, 0xa00e, 0xa00d,
+
+ }}; /* END OF ia_mps_dec_res_huffmann_tables_struct */
+
+const ia_mps_dec_res_block_tables_struct ixheaacd_mps_dec_res_block_tables = {
+ {0 >> 4, 131072 >> 4, 330281 >> 4, 567116 >> 4, 832256 >> 4, 1120650 >> 4,
+ 1429042 >> 4, 1755122 >> 4, 2097152 >> 4, 2453767 >> 4, 2823861 >> 4, 3206517 >> 4,
+ 3600960 >> 4, 4006524 >> 4, 4422631 >> 4, 4848770 >> 4, 5284492 >> 4, 5729392 >> 4,
+ 6183105 >> 4, 6645302 >> 4, 7115683 >> 4, 7593972 >> 4, 8079916 >> 4, 8573281 >> 4,
+ 9073850 >> 4, 9581422 >> 4, 10095808 >> 4, 10616832 >> 4, 11144330 >> 4, 11678147 >> 4,
+ 12218136 >> 4, 12764159 >> 4, 13316085 >> 4, 13873792 >> 4, 14437162 >> 4, 15006082 >> 4,
+ 15580448 >> 4, 16160157 >> 4, 16745112 >> 4, 17335222 >> 4, 17930398 >> 4, 18530554 >> 4,
+ 19135610 >> 4, 19745488 >> 4, 20360112 >> 4, 20979411 >> 4, 21603314 >> 4, 22231755 >> 4,
+ 22864669 >> 4, 23501994 >> 4, 24143669 >> 4, 24789637 >> 4, 25439841 >> 4, 26094226 >> 4,
+ 26752740 >> 4, 27415332 >> 4, 28081952 >> 4, 28752552 >> 4, 29427086 >> 4, 30105507 >> 4,
+ 30787772 >> 4, 31473838 >> 4, 32163664 >> 4, 32857208 >> 4, 33554432 >> 4, 34255297 >> 4,
+ 34959765 >> 4, 35667801 >> 4, 36379368 >> 4, 37094431 >> 4, 37812958 >> 4, 38534914 >> 4,
+ 39260268 >> 4, 39988988 >> 4, 40721043 >> 4, 41456403 >> 4, 42195038 >> 4, 42936921 >> 4,
+ 43682022 >> 4, 44430314 >> 4, 45181770 >> 4, 45936364 >> 4, 46694070 >> 4, 47454862 >> 4,
+ 48218716 >> 4, 48985607 >> 4, 49755512 >> 4, 50528406 >> 4, 51304267 >> 4, 52083073 >> 4,
+ 52864802 >> 4, 53649431 >> 4, 54436939 >> 4, 55227306 >> 4, 56020511 >> 4, 56816534 >> 4,
+ 57615355 >> 4, 58416954 >> 4, 59221313 >> 4, 60028412 >> 4, 60838233 >> 4, 61650759 >> 4,
+ 62465970 >> 4, 63283850 >> 4, 64104381 >> 4, 64927547 >> 4, 65753329 >> 4, 66581713 >> 4,
+ 67412681 >> 4, 68246218 >> 4, 69082308 >> 4, 69920936 >> 4, 70762086 >> 4, 71605743 >> 4,
+ 72451892 >> 4, 73300519 >> 4, 74151609 >> 4, 75005149 >> 4, 75861124 >> 4, 76719520 >> 4,
+ 77580324 >> 4, 78443523 >> 4, 79309103 >> 4, 80177051 >> 4, 81047354 >> 4, 81920000 >> 4,
+ 82794977 >> 4, 83672271 >> 4, 84551871 >> 4},
+ {16384, 19484, 23171, 27555},
+ {16385, 19486, 23172, 27557},
+
+ /* conceal_n_tns_tables */
+ {{31, 9},
+ {31, 9},
+ {34, 10},
+ {40, 14},
+ {42, 14},
+ {51, 14},
+ {46, 14},
+ {46, 14},
+ {42, 14},
+ {42, 14},
+ {42, 14},
+ {39, 14}},
+ {(WORD16)-0x7e0e, (WORD16)-0x6eda, (WORD16)-0x5247, (WORD16)-0x2bc7, (WORD16)0x0000,
+ (WORD16)0x378a, (WORD16)0x6413, (WORD16)0x7cca},
+ {(WORD16)-0x7f74, (WORD16)-0x7b1d, (WORD16)-0x7295, (WORD16)-0x6625, (WORD16)-0x563c,
+ (WORD16)-0x4362, (WORD16)-0x2e3d, (WORD16)-0x1785, (WORD16)0x0000, (WORD16)0x1a9d,
+ (WORD16)0x3410, (WORD16)0x4b3d, (WORD16)0x5f1f, (WORD16)0x6eda, (WORD16)0x79bc,
+ (WORD16)0x7f4c},
+}; /* END OF ia_mps_dec_res_block_tables_struct */
+
+const ia_mps_dec_common_tables_struct ixheaacd_mps_dec_common_tables = {
+ {1073741824, 1074789888, 1075836928, 1076882944, 1077927936, 1078971904, 1080014976,
+ 1081056896, 1082097920, 1083137920, 1084176896, 1085214848, 1086251904, 1087287808,
+ 1088322944, 1089356928, 1090390016, 1091422080, 1092453120, 1093483264, 1094512512,
+ 1095540608, 1096567936, 1097594112, 1098619392, 1099643776, 1100667264, 1101689600,
+ 1102711168, 1103731712, 1104751360, 1105769984, 1106787712, 1107804544, 1108820352,
+ 1109835392, 1110849408, 1111862400, 1112874624, 1113885824, 1114896128, 1115905536,
+ 1116914048, 1117921664, 1118928384, 1119934208, 1120939008, 1121943040, 1122946048,
+ 1123948288, 1124949504, 1125949952, 1126949504, 1127948032, 1128945792, 1129942656,
+ 1130938624, 1131933824, 1132928000, 1133921408, 1134913920, 1135905536, 1136896256,
+ 1137886208, 1138875136, 1139863424, 1140850688, 1141837184, 1142822784, 1143807488,
+ 1144791424, 1145774592, 1146756736, 1147738112, 1148718720, 1149698432, 1150677376,
+ 1151655424, 1152632576, 1153608960, 1154584576, 1155559296, 1156533248, 1157506304,
+ 1158478592, 1159450112, 1160420736, 1161390592, 1162359680, 1163327872, 1164295296,
+ 1165261952, 1166227712, 1167192704, 1168156928, 1169120384, 1170083072, 1171044864,
+ 1172005888, 1172966144, 1173925632, 1174884352, 1175842304, 1176799488, 1177755776,
+ 1178711424, 1179666176, 1180620160, 1181573504, 1182525952, 1183477760, 1184428672,
+ 1185378816, 1186328320, 1187277056, 1188224896, 1189172096, 1190118528, 1191064192,
+ 1192009088, 1192953216, 1193896704, 1194839296, 1195781248, 1196722432, 1197662976,
+ 1198602624, 1199541632, 1200479872, 1201417344, 1202354176, 1203290240, 1204225536,
+ 1205160064, 1206093952, 1207027072, 1207959552, 1208891264, 1209822208, 1210752512,
+ 1211682048, 1212610944, 1213539072, 1214466560, 1215393280, 1216319232, 1217244544,
+ 1218169088, 1219092992, 1220016256, 1220938752, 1221860608, 1222781696, 1223702144,
+ 1224621824, 1225540864, 1226459264, 1227376896, 1228293888, 1229210240, 1230125824,
+ 1231040768, 1231954944, 1232868608, 1233781504, 1234693632, 1235605248, 1236516096,
+ 1237426304, 1238335872, 1239244672, 1240152960, 1241060480, 1241967360, 1242873600,
+ 1243779072, 1244684032, 1245588224, 1246491776, 1247394816, 1248297088, 1249198592,
+ 1250099584, 1250999936, 1251899648, 1252798592, 1253697024, 1254594816, 1255491840,
+ 1256388352, 1257284224, 1258179328, 1259073920, 1259967744, 1260861056, 1261753728,
+ 1262645760, 1263537152, 1264427904, 1265318016, 1266207488, 1267096448, 1267984640,
+ 1268872320, 1269759232, 1270645632, 1271531520, 1272416640, 1273301120, 1274185088,
+ 1275068416, 1275951104, 1276833280, 1277714688, 1278595584, 1279475840, 1280355584,
+ 1281234560, 1282113024, 1282990848, 1283868160, 1284744832, 1285620864, 1286496384,
+ 1287371264, 1288245504, 1289119232, 1289992320, 1290864768, 1291736704, 1292608000,
+ 1293478784, 1294348928, 1295218432, 1296087424, 1296955904, 1297823616, 1298690944,
+ 1299557504, 1300423680, 1301289216, 1302154112, 1303018496, 1303882240, 1304745472,
+ 1305608064, 1306470144, 1307331712, 1308192640, 1309052928, 1309912704, 1310771968,
+ 1311630720, 1312488832, 1313346304, 1314203392, 1315059840, 1315915648, 1316770944,
+ 1317625728, 1318480000, 1319333632, 1320186752, 1321039360, 1321891328, 1322742784,
+ 1323593728, 1324444032, 1325293824, 1326143104, 1326991872, 1327840128, 1328687744,
+ 1329534848, 1330381440, 1331227392, 1332072960, 1332917888, 1333762304, 1334606208,
+ 1335449472, 1336292352, 1337134592, 1337976448, 1338817664, 1339658368, 1340498560,
+ 1341338112, 1342177280, 1343015936, 1343853952, 1344691456, 1345528576, 1346365056,
+ 1347201024, 1348036480, 1348871424, 1349705856, 1350539776, 1351373184, 1352206080,
+ 1353038464, 1353870336, 1354701696, 1355532544, 1356363008, 1357192832, 1358022144,
+ 1358850944, 1359679232, 1360507008, 1361334400, 1362161152, 1362987520, 1363813248,
+ 1364638592, 1365463424, 1366287744, 1367111552, 1367934848, 1368757632, 1369579904,
+ 1370401792, 1371223168, 1372043904, 1372864384, 1373684224, 1374503552, 1375322496,
+ 1376140800, 1376958720, 1377776256, 1378593152, 1379409536, 1380225536, 1381041024,
+ 1381856128, 1382670592, 1383484672, 1384298240, 1385111296, 1385923968, 1386736128,
+ 1387547776, 1388358912, 1389169664, 1389979904, 1390789760, 1391598976, 1392407808,
+ 1393216256, 1394024064, 1394831488, 1395638528, 1396445056, 1397251072, 1398056576,
+ 1398861696, 1399666304, 1400470528, 1401274240, 1402077440, 1402880256, 1403682560,
+ 1404484480, 1405285888, 1406086912, 1406887296, 1407687424, 1408487040, 1409286144,
+ 1410084864, 1410883072, 1411680896, 1412478208, 1413275136, 1414071552, 1414867456,
+ 1415662976, 1416458112, 1417252736, 1418046976, 1418840704, 1419634048, 1420426880,
+ 1421219328, 1422011392, 1422802816, 1423593984, 1424384640, 1425174912, 1425964672,
+ 1426754048, 1427542912, 1428331392, 1429119488, 1429907072, 1430694272, 1431480960,
+ 1432267264, 1433053184, 1433838592, 1434623616, 1435408256, 1436192384, 1436976128,
+ 1437759488, 1438542336, 1439324800, 1440106752, 1440888448, 1441669632, 1442450304,
+ 1443230720, 1444010624, 1444790144, 1445569152, 1446347776, 1447126016, 1447903872,
+ 1448681216, 1449458304, 1450234880, 1451010944, 1451786752, 1452562048, 1453336960,
+ 1454111360, 1454885504, 1455659136, 1456432384, 1457205248, 1457977728, 1458749696,
+ 1459521408, 1460292608, 1461063424, 1461833728, 1462603776, 1463373312, 1464142592,
+ 1464911360, 1465679744, 1466447744, 1467215232, 1467982464, 1468749184, 1469515520,
+ 1470281600, 1471047168, 1471812352, 1472577024, 1473341440, 1474105472, 1474868992,
+ 1475632256, 1476395008, 1477157376, 1477919360, 1478681088, 1479442304, 1480203136,
+ 1480963584, 1481723648, 1482483200, 1483242496, 1484001408, 1484759936, 1485518080,
+ 1486275712, 1487033088, 1487790080, 1488546560, 1489302784, 1490058624, 1490813952,
+ 1491569024, 1492323712, 1493078016, 1493831808, 1494585344, 1495338496, 1496091264,
+ 1496843648, 1497595648, 1498347264, 1499098496, 1499849344, 1500599808, 1501349888,
+ 1502099712, 1502849024, 1503598080, 1504346624, 1505094912, 1505842816, 1506590208,
+ 1507337344, 1508084096, 1508830592, 1509576576, 1510322176, 1511067520, 1511812480,
+ 1512556928, 1513301120, 1514044928, 1514788480, 1515531520, 1516274304, 1517016576,
+ 1517758592, 1518500249
+
+ }}; /* END OF ia_mps_dec_common_tables_struct */
+
+const ia_mps_dec_qmf_tables_struct ixheaacd_mps_dec_qmf_tables = {
+ {
+ 0, 28501019, 775583039, -775583039, -28501019, 0, 28501019,
+ 775583039, -775583039, -28501019, -1186546, 30903291, 799678975, -751600831,
+ -26167087, -1186546, 30903291, 799678975, -751600831, -26167087, -1206390,
+ 33373087, 823849919, -727722687, -23904831, -1206390, 33373087, 823849919,
+ -727722687, -23904831, -1062471, 35932707, 848086783, -703969535, -21721843,
+ -1062471, 35932707, 848086783, -703969535, -21721843, -1046947, 38533023,
+ 872376063, -680382719, -19611965, -1046947, 38533023, 872376063, -680382719,
+ -19611965, -1050933, 41204291, 896724095, -656936447, -17566035, -1050933,
+ 41204291, 896724095, -656936447, -17566035, -1082485, 43922867, 921081471,
+ -633661567, -15594127, -1082485, 43922867, 921081471, -633661567, -15594127,
+ -1122396, 46700799, 945441215, -610575615, -13699290, -1122396, 46700799,
+ 945441215, -610575615, -13699290, -1173935, 49538187, 969802879, -587687679,
+ -11883575, -1173935, 49538187, 969802879, -587687679, -11883575, -1219298,
+ 52433171, 994136319, -565014399, -10140974, -1219298, 52433171, 994136319,
+ -565014399, -10140974, -1260772, 55378415, 1018434047, -542557503, -8461326,
+ -1260772, 55378415, 1018434047, -542557503, -8461326, -1316997, 58381367,
+ 1042657663, -520338911, -6857726, -1316997, 58381367, 1042657663, -520338911,
+ -6857726, -1355597, 61433531, 1066807231, -498364575, -5331498, -1355597,
+ 61433531, 1066807231, -498364575, -5331498, -1404525, 64532455, 1090882559,
+ -476666783, -3873947, -1404525, 64532455, 1090882559, -476666783, -3873947,
+ -1455497, 67649519, 1114809215, -455209823, -2484238, -1455497, 67649519,
+ 1114809215, -455209823, -2484238, -1490700, 70814151, 1138647551, -434060159,
+ -1173445, -1490700, 70814151, 1138647551, -434060159, -1173445, -1537112,
+ 74006783, 1162337023, -413168703, 59280, -1537112, 74006783, 1162337023,
+ -413168703, 59280, -1558008, 77244463, 1185851519, -392597055, 1252469,
+ -1558008, 77244463, 1185851519, -392597055, 1252469, -1597930, 80490447,
+ 1209202815, -372332479, 2341257, -1597930, 80490447, 1209202815, -372332479,
+ 2341257, -1608593, 83763391, 1232338687, -352393215, 3389734, -1608593,
+ 83763391, 1232338687, -352393215, 3389734, -1649561, 87048071, 1255290751,
+ -332775583, 4353845, -1649561, 87048071, 1255290751, -332775583, 4353845,
+ -1658898, 90333703, 1277993983, -313482463, 5263168, -1658898, 90333703,
+ 1277993983, -313482463, 5263168, -1682409, 93651231, 1300469631, -294538495,
+ 6108894, -1682409, 93651231, 1300469631, -294538495, 6108894, -1670714,
+ 96956399, 1322658815, -275952255, 6891679, -1670714, 96956399, 1322658815,
+ -275952255, 6891679, -1675824, 100253775, 1344591615, -257714783, 7602359,
+ -1675824, 100253775, 1344591615, -257714783, 7602359, -1675348, 103544295,
+ 1366224767, -239836751, 8258450, -1675348, 103544295, 1366224767, -239836751,
+ 8258450, -1666012, 106812775, 1387547135, -222335327, 8858722, -1666012,
+ 106812775, 1387547135, -222335327, 8858722, -1638700, 110070599, 1408537983,
+ -205199231, 9406377, -1638700, 110070599, 1408537983, -205199231, 9406377,
+ -1617055, 113307839, 1429180415, -188451903, 9886913, -1617055, 113307839,
+ 1429180415, -188451903, 9886913, -1571819, 116490847, 1449479167, -172093519,
+ 10331429, -1571819, 116490847, 1449479167, -172093519, 10331429, -1549493,
+ 119652127, 1469384191, -156109887, 10702990, -1549493, 119652127, 1469384191,
+ -156109887, 10702990, -1485615, 122753695, 1488911103, -140533439, 11034259,
+ -1485615, 122753695, 1488911103, -140533439, 11034259, -1428165, 125824431,
+ 1508046463, -125349767, 11320622, -1428165, 125824431, 1508046463, -125349767,
+ 11320622, -1361847, 128814119, 1526734207, -110553351, 11561831, -1361847,
+ 128814119, 1526734207, -110553351, 11561831, -1276919, 131738495, 1544999039,
+ -96165783, 11758284, -1276919, 131738495, 1544999039, -96165783, 11758284,
+ -1194983, 134616687, 1562820223, -82200639, 11897996, -1194983, 134616687,
+ 1562820223, -82200639, 11897996, -1105003, 137377935, 1580163967, -68618815,
+ 12008111, -1105003, 137377935, 1580163967, -68618815, 12008111, -989200,
+ 140068991, 1597046655, -55453887, 12083055, -989200, 140068991, 1597046655,
+ -55453887, 12083055, -879420, 142671839, 1613433983, -42699303, 12109487,
+ -879420, 142671839, 1613433983, -42699303, 12109487, -751871, 145186207,
+ 1629313151, -30341543, 12123660, -751871, 145186207, 1629313151, -30341543,
+ 12123660, -622121, 147541535, 1644687871, -18406457, 12073290, -622121,
+ 147541535, 1644687871, -18406457, 12073290, -450614, 149814959, 1659528319,
+ -6890608, 12012598, -450614, 149814959, 1659528319, -6890608, 12012598,
+ -310607, 151962111, 1673810559, 4244630, 11913318, -310607, 151962111,
+ 1673810559, 4244630, 11913318, -132571, 153975151, 1687568511, 14954401,
+ 11784539, -132571, 153975151, 1687568511, 14954401, 11784539, 28980,
+ 155839151, 1700750335, 25259525, 11638668, 28980, 155839151, 1700750335,
+ 25259525, 11638668, 235016, 157543743, 1713362559, 35154575, 11482955,
+ 235016, 157543743, 1713362559, 35154575, 11482955, 438734, 159129327,
+ 1725392639, 44667031, 11265949, 438734, 159129327, 1725392639, 44667031,
+ 11265949, 633406, 160514207, 1736819327, 53753139, 11039644, 633406,
+ 160514207, 1736819327, 53753139, 11039644, 864692, 161735007, 1747663231,
+ 62453979, 10821818, 864692, 161735007, 1747663231, 62453979, 10821818,
+ 1096803, 162781055, 1757881983, 70777607, 10552219, 1096803, 162781055,
+ 1757881983, 70777607, 10552219, 1339895, 163636639, 1767469183, 78687687,
+ 10293438, 1339895, 163636639, 1767469183, 78687687, 10293438, 1601598,
+ 164280815, 1776457599, 86212511, 10008660, 1601598, 164280815, 1776457599,
+ 86212511, 10008660, 1848649, 164732079, 1784781951, 93365887, 9708741,
+ 1848649, 164732079, 1784781951, 93365887, 9708741, 2122999, 164964111,
+ 1792491135, 100137871, 9391100, 2122999, 164964111, 1792491135, 100137871,
+ 9391100, 2415952, 164976143, 1799530623, 106510607, 9076182, 2415952,
+ 164976143, 1799530623, 106510607, 9076182, 2701080, 164755999, 1805935231,
+ 112548287, 8765974, 2701080, 164755999, 1805935231, 112548287, 8765974,
+ 2985537, 164293391, 1811668351, 118210391, 8419731, 2985537, 164293391,
+ 1811668351, 118210391, 8419731, 3316406, 163584207, 1816732159, 123513103,
+ 8075380, 3316406, 163584207, 1816732159, 123513103, 8075380, 3622393,
+ 162630175, 1821133951, 128455295, 7732716, 3622393, 162630175, 1821133951,
+ 128455295, 7732716, 3940259, 161399775, 1824889727, 133058679, 7391396,
+ 3940259, 161399775, 1824889727, 133058679, 7391396, 4260852, 159915455,
+ 1827931903, 137319727, 7030778, 4260852, 159915455, 1827931903, 137319727,
+ 7030778, 4608839, 158141983, 1830310399, 141237999, 6684132, 4608839,
+ 158141983, 1830310399, 141237999, 6684132, 4942917, 156073663, 1832022783,
+ 144853151, 6328515, 4942917, 156073663, 1832022783, 144853151, 6328515,
+ 5288310, 153722543, 1833032063, 148104223, 5985136, 5288310, 153722543,
+ 1833032063, 148104223, 5985136, 5626784, 151082575, 1833389567, 151082575,
+ 5626784, 5626784, 151082575, 1833389567, 151082575, 5626784,
+ },
+ {
+ 0x0000, 0x0648, 0x0c8c, 0x12c8, 0x18f9, 0x1f1a, 0x2528, 0x2b1f, 0x30fc, 0x36ba, 0x3c57,
+ 0x41ce, 0x471d, 0x4c40, 0x5134, 0x55f6, 0x5a82, 0x5ed7, 0x62f2, 0x66d0, 0x6a6e, 0x6dca,
+ 0x70e3, 0x73b6, 0x7642, 0x7885, 0x7a7d, 0x7c2a, 0x7d8a, 0x7e9d, 0x7f62, 0x7fd9, 0x7fff,
+ },
+ {
+ 0x7ffe, 0x7fc2, 0x7f38, 0x7e60, 0x7d3a, 0x7bc6, 0x7a06, 0x77fb, 0x75a6, 0x7308, 0x7023,
+ 0x6cf9, 0x698c, 0x65de, 0x61f1, 0x5dc8, 0x5964, 0x54ca, 0x4ffb, 0x4afb, 0x45cd, 0x4074,
+ 0x3af3, 0x354e, 0x2f87, 0x29a4, 0x23a7, 0x1d93, 0x176e, 0x113a, 0x0afb, 0x04b6,
+ },
+ {
+ 0x0192, 0x07d9, 0x0e1c, 0x1455, 0x1a83, 0x209f, 0x26a8, 0x2c99, 0x326e, 0x3825, 0x3db8,
+ 0x4326, 0x486a, 0x4d81, 0x5269, 0x571e, 0x5b9d, 0x5fe4, 0x63ef, 0x67bd, 0x6b4b, 0x6e97,
+ 0x719e, 0x7460, 0x76d9, 0x790a, 0x7aef, 0x7c89, 0x7dd6, 0x7ed6, 0x7f87, 0x7fea,
+ },
+ {
+ 0x7D89, 0x6a6d, 0x471c, 0x18f9,
+ },
+ {
+ 0x7FF5, 0x7FA6, 0x7F09, 0x7E1D, 0x7CE3, 0x7B5C, 0x7989, 0x776B, 0x7504, 0x7254, 0x6F5E,
+ 0x6C23, 0x68A6, 0x64E8, 0x60EB, 0x5CB3, 0x5842, 0x539B, 0x4EBF, 0x49B4, 0x447A, 0x3F17,
+ 0x398C, 0x33DF, 0x2E11, 0x2826, 0x2223, 0x1C0B, 0x15E2, 0xFAB, 0x096A, 0x0324,
+ },
+ {
+ 0x0324, 0x096A, 0x0FAB, 0x15E2, 0x1C0B, 0x2223, 0x2826, 0x2E11, 0x33DF, 0x398C, 0x3F17,
+ 0x447A, 0x49B4, 0x4EBF, 0x539B, 0x5842, 0x5CB3, 0x60EB, 0x64E8, 0x68A6, 0x6C23, 0x6F5E,
+ 0x7254, 0x7504, 0x776B, 0x7989, 0x7B5C, 0x7CE3, 0x7E1D, 0x7F09, 0x7FA6, 0x7FF5,
+
+ },
+
+}; /* END OF ia_mps_dec_qmf_tables_struct */
+
+const ia_mps_dec_hybrid_tables_struct ixheaacd_mps_dec_hybrid_tables = {
+ {
+ -692, -2976, -5960, -9524, -9162, 15458, 16384, 15458, 9162, 9524,
+ 5960, 2976, 692, 14281, 5916, -2749, -1404, 8799, 3645,
+
+ },
+
+ {
+ 1245, -4780, 20052, 20052, -4780, 1245,
+
+ },
+
+ {0, 101, 201, 302, 402, 503, 603, 704, 804, 905, 1005,
+ 1106, 1206, 1307, 1407, 1507, 1608, 1708, 1809, 1909, 2009, 2110,
+ 2210, 2310, 2411, 2511, 2611, 2711, 2811, 2912, 3012, 3112, 3212,
+ 3312, 3412, 3512, 3612, 3712, 3812, 3911, 4011, 4111, 4211, 4310,
+ 4410, 4510, 4609, 4709, 4808, 4907, 5007, 5106, 5205, 5305, 5404,
+ 5503, 5602, 5701, 5800, 5899, 5998, 6097, 6195, 6294, 6393, 6491,
+ 6590, 6688, 6787, 6885, 6983, 7081, 7180, 7278, 7376, 7473, 7571,
+ 7669, 7767, 7864, 7962, 8059, 8157, 8254, 8351, 8449, 8546, 8643,
+ 8740, 8836, 8933, 9030, 9127, 9223, 9319, 9416, 9512, 9608, 9704,
+ 9800, 9896, 9992, 10088, 10183, 10279, 10374, 10469, 10565, 10660, 10755,
+ 10850, 10945, 11039, 11134, 11228, 11323, 11417, 11511, 11605, 11699, 11793,
+ 11887, 11980, 12074, 12167, 12261, 12354, 12447, 12540, 12633, 12725, 12818,
+ 12910, 13003, 13095, 13187, 13279, 13371, 13463, 13554, 13646, 13737, 13828,
+ 13919, 14010, 14101, 14192, 14282, 14373, 14463, 14553, 14643, 14733, 14823,
+ 14912, 15002, 15091, 15180, 15269, 15358, 15447, 15535, 15624, 15712, 15800,
+ 15888, 15976, 16064, 16151, 16239, 16326, 16413, 16500, 16587, 16673, 16760,
+ 16846, 16932, 17018, 17104, 17190, 17275, 17361, 17446, 17531, 17616, 17700,
+ 17785, 17869, 17953, 18037, 18121, 18205, 18288, 18372, 18455, 18538, 18621,
+ 18703, 18786, 18868, 18950, 19032, 19114, 19195, 19277, 19358, 19439, 19520,
+ 19601, 19681, 19761, 19841, 19921, 20001, 20081, 20160, 20239, 20318, 20397,
+ 20475, 20554, 20632, 20710, 20788, 20865, 20943, 21020, 21097, 21174, 21251,
+ 21327, 21403, 21479, 21555, 21631, 21706, 21781, 21856, 21931, 22006, 22080,
+ 22154, 22228, 22302, 22375, 22449, 22522, 22595, 22668, 22740, 22812, 22884,
+ 22956, 23028, 23099, 23170, 23241, 23312, 23383, 23453, 23523, 23593, 23663,
+ 23732, 23801, 23870, 23939, 24008, 24076, 24144, 24212, 24279, 24347, 24414,
+ 24481, 24548, 24614, 24680, 24746, 24812, 24878, 24943, 25008, 25073, 25138,
+ 25202, 25266, 25330, 25394, 25457, 25520, 25583, 25646, 25708, 25771, 25833,
+ 25894, 25956, 26017, 26078, 26139, 26199, 26259, 26320, 26379, 26439, 26498,
+ 26557, 26616, 26674, 26733, 26791, 26848, 26906, 26963, 27020, 27077, 27133,
+ 27190, 27246, 27301, 27357, 27412, 27467, 27522, 27576, 27630, 27684, 27738,
+ 27791, 27844, 27897, 27950, 28002, 28054, 28106, 28158, 28209, 28260, 28311,
+ 28361, 28411, 28461, 28511, 28560, 28610, 28658, 28707, 28755, 28803, 28851,
+ 28899, 28946, 28993, 29040, 29086, 29132, 29178, 29224, 29269, 29314, 29359,
+ 29404, 29448, 29492, 29535, 29579, 29622, 29665, 29707, 29750, 29792, 29833,
+ 29875, 29916, 29957, 29997, 30038, 30078, 30118, 30157, 30196, 30235, 30274,
+ 30312, 30350, 30388, 30425, 30462, 30499, 30536, 30572, 30608, 30644, 30680,
+ 30715, 30750, 30784, 30819, 30853, 30886, 30920, 30953, 30986, 31018, 31050,
+ 31082, 31114, 31146, 31177, 31207, 31238, 31268, 31298, 31328, 31357, 31386,
+ 31415, 31443, 31471, 31499, 31527, 31554, 31581, 31608, 31634, 31660, 31686,
+ 31711, 31737, 31761, 31786, 31810, 31834, 31858, 31881, 31904, 31927, 31950,
+ 31972, 31994, 32015, 32037, 32058, 32078, 32099, 32119, 32138, 32158, 32177,
+ 32196, 32214, 32233, 32251, 32268, 32286, 32303, 32319, 32336, 32352, 32368,
+ 32383, 32398, 32413, 32428, 32442, 32456, 32470, 32483, 32496, 32509, 32522,
+ 32534, 32546, 32557, 32568, 32579, 32590, 32600, 32610, 32620, 32629, 32638,
+ 32647, 32656, 32664, 32672, 32679, 32686, 32693, 32700, 32706, 32712, 32718,
+ 32723, 32729, 32733, 32738, 32742, 32746, 32749, 32753, 32756, 32758, 32760,
+ 32762, 32764, 32766, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32766,
+ 32764, 32762, 32760, 32758, 32756, 32753, 32749, 32746, 32742, 32738, 32733,
+ 32729, 32723, 32718, 32712, 32706, 32700, 32693, 32686, 32679, 32672, 32664,
+ 32656, 32647, 32638, 32629, 32620, 32610, 32600, 32590, 32579, 32568, 32557,
+ 32546, 32534, 32522, 32509, 32496, 32483, 32470, 32456, 32442, 32428, 32413,
+ 32398, 32383, 32368, 32352, 32336, 32319, 32303, 32286, 32268, 32251, 32233,
+ 32214, 32196, 32177, 32158, 32138, 32119, 32099, 32078, 32058, 32037, 32015,
+ 31994, 31972, 31950, 31927, 31904, 31881, 31858, 31834, 31810, 31786, 31761,
+ 31737, 31711, 31686, 31660, 31634, 31608, 31581, 31554, 31527, 31499, 31471,
+ 31443, 31415, 31386, 31357, 31328, 31298, 31268, 31238, 31207, 31177, 31146,
+ 31114, 31082, 31050, 31018, 30986, 30953, 30920, 30886, 30853, 30819, 30784,
+ 30750, 30715, 30680, 30644, 30608, 30572, 30536, 30499, 30462, 30425, 30388,
+ 30350, 30312, 30274, 30235, 30196, 30157, 30118, 30078, 30038, 29997, 29957,
+ 29916, 29875, 29833, 29792, 29750, 29707, 29665, 29622, 29579, 29535, 29492,
+ 29448, 29404, 29359, 29314, 29269, 29224, 29178, 29132, 29086, 29040, 28993,
+ 28946, 28899, 28851, 28803, 28755, 28707, 28658, 28610, 28560, 28511, 28461,
+ 28411, 28361, 28311, 28260, 28209, 28158, 28106, 28054, 28002, 27950, 27897,
+ 27844, 27791, 27738, 27684, 27630, 27576, 27522, 27467, 27412, 27357, 27301,
+ 27246, 27190, 27133, 27077, 27020, 26963, 26906, 26848, 26791, 26733, 26674,
+ 26616, 26557, 26498, 26439, 26379, 26320, 26259, 26199, 26139, 26078, 26017,
+ 25956, 25894, 25833, 25771, 25708, 25646, 25583, 25520, 25457, 25394, 25330,
+ 25266, 25202, 25138, 25073, 25008, 24943, 24878, 24812, 24746, 24680, 24614,
+ 24548, 24481, 24414, 24347, 24279, 24212, 24144, 24076, 24008, 23939, 23870,
+ 23801, 23732, 23663, 23593, 23523, 23453, 23383, 23312, 23241, 23170, 23099,
+ 23028, 22956, 22884, 22812, 22740, 22668, 22595, 22522, 22449, 22375, 22302,
+ 22228, 22154, 22080, 22006, 21931, 21856, 21781, 21706, 21631, 21555, 21479,
+ 21403, 21327, 21251, 21174, 21097, 21020, 20943, 20865, 20788, 20710, 20632,
+ 20554, 20475, 20397, 20318, 20239, 20160, 20081, 20001, 19921, 19841, 19761,
+ 19681, 19601, 19520, 19439, 19358, 19277, 19195, 19114, 19032, 18950, 18868,
+ 18786, 18703, 18621, 18538, 18455, 18372, 18288, 18205, 18121, 18037, 17953,
+ 17869, 17785, 17700, 17616, 17531, 17446, 17361, 17275, 17190, 17104, 17018,
+ 16932, 16846, 16760, 16673, 16587, 16500, 16413, 16326, 16239, 16151, 16064,
+ 15976, 15888, 15800, 15712, 15624, 15535, 15447, 15358, 15269, 15180, 15091,
+ 15002, 14912, 14823, 14733, 14643, 14553, 14463, 14373, 14282, 14192, 14101,
+ 14010, 13919, 13828, 13737, 13646, 13554, 13463, 13371, 13279, 13187, 13095,
+ 13003, 12910, 12818, 12725, 12633, 12540, 12447, 12354, 12261, 12167, 12074,
+ 11980, 11887, 11793, 11699, 11605, 11511, 11417, 11323, 11228, 11134, 11039,
+ 10945, 10850, 10755, 10660, 10565, 10469, 10374, 10279, 10183, 10088, 9992,
+ 9896, 9800, 9704, 9608, 9512, 9416, 9319, 9223, 9127, 9030, 8933,
+ 8836, 8740, 8643, 8546, 8449, 8351, 8254, 8157, 8059, 7962, 7864,
+ 7767, 7669, 7571, 7473, 7376, 7278, 7180, 7081, 6983, 6885, 6787,
+ 6688, 6590, 6491, 6393, 6294, 6195, 6097, 5998, 5899, 5800, 5701,
+ 5602, 5503, 5404, 5305, 5205, 5106, 5007, 4907, 4808, 4709, 4609,
+ 4510, 4410, 4310, 4211, 4111, 4011, 3911, 3812, 3712, 3612, 3512,
+ 3412, 3312, 3212, 3112, 3012, 2912, 2811, 2711, 2611, 2511, 2411,
+ 2310, 2210, 2110, 2009, 1909, 1809, 1708, 1608, 1507, 1407, 1307,
+ 1206, 1106, 1005, 905, 804, 704, 603, 503, 402, 302, 201,
+ 101, 0, -101, -201, -302, -402, -503, -603, -704, -804, -905,
+ -1005, -1106, -1206, -1307, -1407, -1507, -1608, -1708, -1809, -1909, -2009,
+ -2110, -2210, -2310, -2411, -2511, -2611, -2711, -2811, -2912, -3012, -3112,
+ -3212, -3312, -3412, -3512, -3612, -3712, -3812, -3911, -4011, -4111, -4211,
+ -4310, -4410, -4510, -4609, -4709, -4808, -4907, -5007, -5106, -5205, -5305,
+ -5404, -5503, -5602, -5701, -5800, -5899, -5998, -6097, -6195, -6294, -6393,
+ -6491, -6590, -6688, -6787, -6885, -6983, -7081, -7180, -7278, -7376, -7473,
+ -7571, -7669, -7767, -7864, -7962, -8059, -8157, -8254, -8351, -8449, -8546,
+ -8643, -8740, -8836, -8933, -9030, -9127, -9223, -9319, -9416, -9512, -9608,
+ -9704, -9800, -9896, -9992, -10088, -10183, -10279, -10374, -10469, -10565, -10660,
+ -10755, -10850, -10945, -11039, -11134, -11228, -11323, -11417, -11511, -11605, -11699,
+ -11793, -11887, -11980, -12074, -12167, -12261, -12354, -12447, -12540, -12633, -12725,
+ -12818, -12910, -13003, -13095, -13187, -13279, -13371, -13463, -13554, -13646, -13737,
+ -13828, -13919, -14010, -14101, -14192, -14282, -14373, -14463, -14553, -14643, -14733,
+ -14823, -14912, -15002, -15091, -15180, -15269, -15358, -15447, -15535, -15624, -15712,
+ -15800, -15888, -15976, -16064, -16151, -16239, -16326, -16413, -16500, -16587, -16673,
+ -16760, -16846, -16932, -17018, -17104, -17190, -17275, -17361, -17446, -17531, -17616,
+ -17700, -17785, -17869, -17953, -18037, -18121, -18205, -18288, -18372, -18455, -18538,
+ -18621, -18703, -18786, -18868, -18950, -19032, -19114, -19195, -19277, -19358, -19439,
+ -19520, -19601, -19681, -19761, -19841, -19921, -20001, -20081, -20160, -20239, -20318,
+ -20397, -20475, -20554, -20632, -20710, -20788, -20865, -20943, -21020, -21097, -21174,
+ -21251, -21327, -21403, -21479, -21555, -21631, -21706, -21781, -21856, -21931, -22006,
+ -22080, -22154, -22228, -22302, -22375, -22449, -22522, -22595, -22668, -22740, -22812,
+ -22884, -22956, -23028, -23099, -23170, -23241, -23312, -23383, -23453, -23523, -23593,
+ -23663, -23732, -23801, -23870, -23939, -24008, -24076, -24144, -24212, -24279, -24347,
+ -24414, -24481, -24548, -24614, -24680, -24746, -24812, -24878, -24943, -25008, -25073,
+ -25138, -25202, -25266, -25330, -25394, -25457, -25520, -25583, -25646, -25708, -25771,
+ -25833, -25894, -25956, -26017, -26078, -26139, -26199, -26259, -26320, -26379, -26439,
+ -26498, -26557, -26616, -26674, -26733, -26791, -26848, -26906, -26963, -27020, -27077,
+ -27133, -27190, -27246, -27301, -27357, -27412, -27467, -27522, -27576, -27630, -27684,
+ -27738, -27791, -27844, -27897, -27950, -28002, -28054, -28106, -28158, -28209, -28260,
+ -28311, -28361, -28411, -28461, -28511, -28560, -28610, -28658, -28707, -28755, -28803,
+ -28851, -28899, -28946, -28993, -29040, -29086, -29132, -29178, -29224, -29269, -29314,
+ -29359, -29404, -29448, -29492, -29535, -29579, -29622, -29665, -29707, -29750, -29792,
+ -29833, -29875, -29916, -29957, -29997, -30038, -30078, -30118, -30157, -30196, -30235,
+ -30274, -30312, -30350, -30388, -30425, -30462, -30499, -30536, -30572, -30608, -30644,
+ -30680, -30715, -30750, -30784, -30819, -30853, -30886, -30920, -30953, -30986, -31018,
+ -31050, -31082, -31114, -31146, -31177, -31207, -31238, -31268, -31298, -31328, -31357,
+ -31386, -31415, -31443, -31471, -31499, -31527, -31554, -31581, -31608, -31634, -31660,
+ -31686, -31711, -31737, -31761, -31786, -31810, -31834, -31858, -31881, -31904, -31927,
+ -31950, -31972, -31994, -32015, -32037, -32058, -32078, -32099, -32119, -32138, -32158,
+ -32177, -32196, -32214, -32233, -32251, -32268, -32286, -32303, -32319, -32336, -32352,
+ -32368, -32383, -32398, -32413, -32428, -32442, -32456, -32470, -32483, -32496, -32509,
+ -32522, -32534, -32546, -32557, -32568, -32579, -32590, -32600, -32610, -32620, -32629,
+ -32638, -32647, -32656, -32664, -32672, -32679, -32686, -32693, -32700, -32706, -32712,
+ -32718, -32723, -32729, -32733, -32738, -32742, -32746, -32749, -32753, -32756, -32758,
+ -32760, -32762, -32764, -32766, -32767, -32767, -32767, -32767, -32767, -32767, -32767,
+ -32766, -32764, -32762, -32760, -32758, -32756, -32753, -32749, -32746, -32742, -32738,
+ -32733, -32729, -32723, -32718, -32712, -32706, -32700, -32693, -32686, -32679, -32672,
+ -32664, -32656, -32647, -32638, -32629, -32620, -32610, -32600, -32590, -32579, -32568,
+ -32557, -32546, -32534, -32522, -32509, -32496, -32483, -32470, -32456, -32442, -32428,
+ -32413, -32398, -32383, -32368, -32352, -32336, -32319, -32303, -32286, -32268, -32251,
+ -32233, -32214, -32196, -32177, -32158, -32138, -32119, -32099, -32078, -32058, -32037,
+ -32015, -31994, -31972, -31950, -31927, -31904, -31881, -31858, -31834, -31810, -31786,
+ -31761, -31737, -31711, -31686, -31660, -31634, -31608, -31581, -31554, -31527, -31499,
+ -31471, -31443, -31415, -31386, -31357, -31328, -31298, -31268, -31238, -31207, -31177,
+ -31146, -31114, -31082, -31050, -31018, -30986, -30953, -30920, -30886, -30853, -30819,
+ -30784, -30750, -30715, -30680, -30644, -30608, -30572, -30536, -30499, -30462, -30425,
+ -30388, -30350, -30312, -30274, -30235, -30196, -30157, -30118, -30078, -30038, -29997,
+ -29957, -29916, -29875, -29833, -29792, -29750, -29707, -29665, -29622, -29579, -29535,
+ -29492, -29448, -29404, -29359, -29314, -29269, -29224, -29178, -29132, -29086, -29040,
+ -28993, -28946, -28899, -28851, -28803, -28755, -28707, -28658, -28610, -28560, -28511,
+ -28461, -28411, -28361, -28311, -28260, -28209, -28158, -28106, -28054, -28002, -27950,
+ -27897, -27844, -27791, -27738, -27684, -27630, -27576, -27522, -27467, -27412, -27357,
+ -27301, -27246, -27190, -27133, -27077, -27020, -26963, -26906, -26848, -26791, -26733,
+ -26674, -26616, -26557, -26498, -26439, -26379, -26320, -26259, -26199, -26139, -26078,
+ -26017, -25956, -25894, -25833, -25771, -25708, -25646, -25583, -25520, -25457, -25394,
+ -25330, -25266, -25202, -25138, -25073, -25008, -24943, -24878, -24812, -24746, -24680,
+ -24614, -24548, -24481, -24414, -24347, -24279, -24212, -24144, -24076, -24008, -23939,
+ -23870, -23801, -23732, -23663, -23593, -23523, -23453, -23383, -23312, -23241, -23170,
+ -23099, -23028, -22956, -22884, -22812, -22740, -22668, -22595, -22522, -22449, -22375,
+ -22302, -22228, -22154, -22080, -22006, -21931, -21856, -21781, -21706, -21631, -21555,
+ -21479, -21403, -21327, -21251, -21174, -21097, -21020, -20943, -20865, -20788, -20710,
+ -20632, -20554, -20475, -20397, -20318, -20239, -20160, -20081, -20001, -19921, -19841,
+ -19761, -19681, -19601, -19520, -19439, -19358, -19277, -19195, -19114, -19032, -18950,
+ -18868, -18786, -18703, -18621, -18538, -18455, -18372, -18288, -18205, -18121, -18037,
+ -17953, -17869, -17785, -17700, -17616, -17531, -17446, -17361, -17275, -17190, -17104,
+ -17018, -16932, -16846, -16760, -16673, -16587, -16500, -16413, -16326, -16239, -16151,
+ -16064, -15976, -15888, -15800, -15712, -15624, -15535, -15447, -15358, -15269, -15180,
+ -15091, -15002, -14912, -14823, -14733, -14643, -14553, -14463, -14373, -14282, -14192,
+ -14101, -14010, -13919, -13828, -13737, -13646, -13554, -13463, -13371, -13279, -13187,
+ -13095, -13003, -12910, -12818, -12725, -12633, -12540, -12447, -12354, -12261, -12167,
+ -12074, -11980, -11887, -11793, -11699, -11605, -11511, -11417, -11323, -11228, -11134,
+ -11039, -10945, -10850, -10755, -10660, -10565, -10469, -10374, -10279, -10183, -10088,
+ -9992, -9896, -9800, -9704, -9608, -9512, -9416, -9319, -9223, -9127, -9030,
+ -8933, -8836, -8740, -8643, -8546, -8449, -8351, -8254, -8157, -8059, -7962,
+ -7864, -7767, -7669, -7571, -7473, -7376, -7278, -7180, -7081, -6983, -6885,
+ -6787, -6688, -6590, -6491, -6393, -6294, -6195, -6097, -5998, -5899, -5800,
+ -5701, -5602, -5503, -5404, -5305, -5205, -5106, -5007, -4907, -4808, -4709,
+ -4609, -4510, -4410, -4310, -4211, -4111, -4011, -3911, -3812, -3712, -3612,
+ -3512, -3412, -3312, -3212, -3112, -3012, -2912, -2811, -2711, -2611, -2511,
+ -2411, -2310, -2210, -2110, -2009, -1909, -1809, -1708, -1608, -1507, -1407,
+ -1307, -1206, -1106, -1005, -905, -804, -704, -603, -503, -402, -302,
+ -201, -101},
+
+ {32767, 32767, 32767, 32767, 32766, 32764, 32762, 32760, 32758, 32756, 32753,
+ 32749, 32746, 32742, 32738, 32733, 32729, 32723, 32718, 32712, 32706, 32700,
+ 32693, 32686, 32679, 32672, 32664, 32656, 32647, 32638, 32629, 32620, 32610,
+ 32600, 32590, 32579, 32568, 32557, 32546, 32534, 32522, 32509, 32496, 32483,
+ 32470, 32456, 32442, 32428, 32413, 32398, 32383, 32368, 32352, 32336, 32319,
+ 32303, 32286, 32268, 32251, 32233, 32214, 32196, 32177, 32158, 32138, 32119,
+ 32099, 32078, 32058, 32037, 32015, 31994, 31972, 31950, 31927, 31904, 31881,
+ 31858, 31834, 31810, 31786, 31761, 31737, 31711, 31686, 31660, 31634, 31608,
+ 31581, 31554, 31527, 31499, 31471, 31443, 31415, 31386, 31357, 31328, 31298,
+ 31268, 31238, 31207, 31177, 31146, 31114, 31082, 31050, 31018, 30986, 30953,
+ 30920, 30886, 30853, 30819, 30784, 30750, 30715, 30680, 30644, 30608, 30572,
+ 30536, 30499, 30462, 30425, 30388, 30350, 30312, 30274, 30235, 30196, 30157,
+ 30118, 30078, 30038, 29997, 29957, 29916, 29875, 29833, 29792, 29750, 29707,
+ 29665, 29622, 29579, 29535, 29492, 29448, 29404, 29359, 29314, 29269, 29224,
+ 29178, 29132, 29086, 29040, 28993, 28946, 28899, 28851, 28803, 28755, 28707,
+ 28658, 28610, 28560, 28511, 28461, 28411, 28361, 28311, 28260, 28209, 28158,
+ 28106, 28054, 28002, 27950, 27897, 27844, 27791, 27738, 27684, 27630, 27576,
+ 27522, 27467, 27412, 27357, 27301, 27246, 27190, 27133, 27077, 27020, 26963,
+ 26906, 26848, 26791, 26733, 26674, 26616, 26557, 26498, 26439, 26379, 26320,
+ 26259, 26199, 26139, 26078, 26017, 25956, 25894, 25833, 25771, 25708, 25646,
+ 25583, 25520, 25457, 25394, 25330, 25266, 25202, 25138, 25073, 25008, 24943,
+ 24878, 24812, 24746, 24680, 24614, 24548, 24481, 24414, 24347, 24279, 24212,
+ 24144, 24076, 24008, 23939, 23870, 23801, 23732, 23663, 23593, 23523, 23453,
+ 23383, 23312, 23241, 23170, 23099, 23028, 22956, 22884, 22812, 22740, 22668,
+ 22595, 22522, 22449, 22375, 22302, 22228, 22154, 22080, 22006, 21931, 21856,
+ 21781, 21706, 21631, 21555, 21479, 21403, 21327, 21251, 21174, 21097, 21020,
+ 20943, 20865, 20788, 20710, 20632, 20554, 20475, 20397, 20318, 20239, 20160,
+ 20081, 20001, 19921, 19841, 19761, 19681, 19601, 19520, 19439, 19358, 19277,
+ 19195, 19114, 19032, 18950, 18868, 18786, 18703, 18621, 18538, 18455, 18372,
+ 18288, 18205, 18121, 18037, 17953, 17869, 17785, 17700, 17616, 17531, 17446,
+ 17361, 17275, 17190, 17104, 17018, 16932, 16846, 16760, 16673, 16587, 16500,
+ 16413, 16326, 16239, 16151, 16064, 15976, 15888, 15800, 15712, 15624, 15535,
+ 15447, 15358, 15269, 15180, 15091, 15002, 14912, 14823, 14733, 14643, 14553,
+ 14463, 14373, 14282, 14192, 14101, 14010, 13919, 13828, 13737, 13646, 13554,
+ 13463, 13371, 13279, 13187, 13095, 13003, 12910, 12818, 12725, 12633, 12540,
+ 12447, 12354, 12261, 12167, 12074, 11980, 11887, 11793, 11699, 11605, 11511,
+ 11417, 11323, 11228, 11134, 11039, 10945, 10850, 10755, 10660, 10565, 10469,
+ 10374, 10279, 10183, 10088, 9992, 9896, 9800, 9704, 9608, 9512, 9416,
+ 9319, 9223, 9127, 9030, 8933, 8836, 8740, 8643, 8546, 8449, 8351,
+ 8254, 8157, 8059, 7962, 7864, 7767, 7669, 7571, 7473, 7376, 7278,
+ 7180, 7081, 6983, 6885, 6787, 6688, 6590, 6491, 6393, 6294, 6195,
+ 6097, 5998, 5899, 5800, 5701, 5602, 5503, 5404, 5305, 5205, 5106,
+ 5007, 4907, 4808, 4709, 4609, 4510, 4410, 4310, 4211, 4111, 4011,
+ 3911, 3812, 3712, 3612, 3512, 3412, 3312, 3212, 3112, 3012, 2912,
+ 2811, 2711, 2611, 2511, 2411, 2310, 2210, 2110, 2009, 1909, 1809,
+ 1708, 1608, 1507, 1407, 1307, 1206, 1106, 1005, 905, 804, 704,
+ 603, 503, 402, 302, 201, 101, 0, -101, -201, -302, -402,
+ -503, -603, -704, -804, -905, -1005, -1106, -1206, -1307, -1407, -1507,
+ -1608, -1708, -1809, -1909, -2009, -2110, -2210, -2310, -2411, -2511, -2611,
+ -2711, -2811, -2912, -3012, -3112, -3212, -3312, -3412, -3512, -3612, -3712,
+ -3812, -3911, -4011, -4111, -4211, -4310, -4410, -4510, -4609, -4709, -4808,
+ -4907, -5007, -5106, -5205, -5305, -5404, -5503, -5602, -5701, -5800, -5899,
+ -5998, -6097, -6195, -6294, -6393, -6491, -6590, -6688, -6787, -6885, -6983,
+ -7081, -7180, -7278, -7376, -7473, -7571, -7669, -7767, -7864, -7962, -8059,
+ -8157, -8254, -8351, -8449, -8546, -8643, -8740, -8836, -8933, -9030, -9127,
+ -9223, -9319, -9416, -9512, -9608, -9704, -9800, -9896, -9992, -10088, -10183,
+ -10279, -10374, -10469, -10565, -10660, -10755, -10850, -10945, -11039, -11134, -11228,
+ -11323, -11417, -11511, -11605, -11699, -11793, -11887, -11980, -12074, -12167, -12261,
+ -12354, -12447, -12540, -12633, -12725, -12818, -12910, -13003, -13095, -13187, -13279,
+ -13371, -13463, -13554, -13646, -13737, -13828, -13919, -14010, -14101, -14192, -14282,
+ -14373, -14463, -14553, -14643, -14733, -14823, -14912, -15002, -15091, -15180, -15269,
+ -15358, -15447, -15535, -15624, -15712, -15800, -15888, -15976, -16064, -16151, -16239,
+ -16326, -16413, -16500, -16587, -16673, -16760, -16846, -16932, -17018, -17104, -17190,
+ -17275, -17361, -17446, -17531, -17616, -17700, -17785, -17869, -17953, -18037, -18121,
+ -18205, -18288, -18372, -18455, -18538, -18621, -18703, -18786, -18868, -18950, -19032,
+ -19114, -19195, -19277, -19358, -19439, -19520, -19601, -19681, -19761, -19841, -19921,
+ -20001, -20081, -20160, -20239, -20318, -20397, -20475, -20554, -20632, -20710, -20788,
+ -20865, -20943, -21020, -21097, -21174, -21251, -21327, -21403, -21479, -21555, -21631,
+ -21706, -21781, -21856, -21931, -22006, -22080, -22154, -22228, -22302, -22375, -22449,
+ -22522, -22595, -22668, -22740, -22812, -22884, -22956, -23028, -23099, -23170, -23241,
+ -23312, -23383, -23453, -23523, -23593, -23663, -23732, -23801, -23870, -23939, -24008,
+ -24076, -24144, -24212, -24279, -24347, -24414, -24481, -24548, -24614, -24680, -24746,
+ -24812, -24878, -24943, -25008, -25073, -25138, -25202, -25266, -25330, -25394, -25457,
+ -25520, -25583, -25646, -25708, -25771, -25833, -25894, -25956, -26017, -26078, -26139,
+ -26199, -26259, -26320, -26379, -26439, -26498, -26557, -26616, -26674, -26733, -26791,
+ -26848, -26906, -26963, -27020, -27077, -27133, -27190, -27246, -27301, -27357, -27412,
+ -27467, -27522, -27576, -27630, -27684, -27738, -27791, -27844, -27897, -27950, -28002,
+ -28054, -28106, -28158, -28209, -28260, -28311, -28361, -28411, -28461, -28511, -28560,
+ -28610, -28658, -28707, -28755, -28803, -28851, -28899, -28946, -28993, -29040, -29086,
+ -29132, -29178, -29224, -29269, -29314, -29359, -29404, -29448, -29492, -29535, -29579,
+ -29622, -29665, -29707, -29750, -29792, -29833, -29875, -29916, -29957, -29997, -30038,
+ -30078, -30118, -30157, -30196, -30235, -30274, -30312, -30350, -30388, -30425, -30462,
+ -30499, -30536, -30572, -30608, -30644, -30680, -30715, -30750, -30784, -30819, -30853,
+ -30886, -30920, -30953, -30986, -31018, -31050, -31082, -31114, -31146, -31177, -31207,
+ -31238, -31268, -31298, -31328, -31357, -31386, -31415, -31443, -31471, -31499, -31527,
+ -31554, -31581, -31608, -31634, -31660, -31686, -31711, -31737, -31761, -31786, -31810,
+ -31834, -31858, -31881, -31904, -31927, -31950, -31972, -31994, -32015, -32037, -32058,
+ -32078, -32099, -32119, -32138, -32158, -32177, -32196, -32214, -32233, -32251, -32268,
+ -32286, -32303, -32319, -32336, -32352, -32368, -32383, -32398, -32413, -32428, -32442,
+ -32456, -32470, -32483, -32496, -32509, -32522, -32534, -32546, -32557, -32568, -32579,
+ -32590, -32600, -32610, -32620, -32629, -32638, -32647, -32656, -32664, -32672, -32679,
+ -32686, -32693, -32700, -32706, -32712, -32718, -32723, -32729, -32733, -32738, -32742,
+ -32746, -32749, -32753, -32756, -32758, -32760, -32762, -32764, -32766, -32767, -32767,
+ -32767, -32767, -32767, -32767, -32767, -32766, -32764, -32762, -32760, -32758, -32756,
+ -32753, -32749, -32746, -32742, -32738, -32733, -32729, -32723, -32718, -32712, -32706,
+ -32700, -32693, -32686, -32679, -32672, -32664, -32656, -32647, -32638, -32629, -32620,
+ -32610, -32600, -32590, -32579, -32568, -32557, -32546, -32534, -32522, -32509, -32496,
+ -32483, -32470, -32456, -32442, -32428, -32413, -32398, -32383, -32368, -32352, -32336,
+ -32319, -32303, -32286, -32268, -32251, -32233, -32214, -32196, -32177, -32158, -32138,
+ -32119, -32099, -32078, -32058, -32037, -32015, -31994, -31972, -31950, -31927, -31904,
+ -31881, -31858, -31834, -31810, -31786, -31761, -31737, -31711, -31686, -31660, -31634,
+ -31608, -31581, -31554, -31527, -31499, -31471, -31443, -31415, -31386, -31357, -31328,
+ -31298, -31268, -31238, -31207, -31177, -31146, -31114, -31082, -31050, -31018, -30986,
+ -30953, -30920, -30886, -30853, -30819, -30784, -30750, -30715, -30680, -30644, -30608,
+ -30572, -30536, -30499, -30462, -30425, -30388, -30350, -30312, -30274, -30235, -30196,
+ -30157, -30118, -30078, -30038, -29997, -29957, -29916, -29875, -29833, -29792, -29750,
+ -29707, -29665, -29622, -29579, -29535, -29492, -29448, -29404, -29359, -29314, -29269,
+ -29224, -29178, -29132, -29086, -29040, -28993, -28946, -28899, -28851, -28803, -28755,
+ -28707, -28658, -28610, -28560, -28511, -28461, -28411, -28361, -28311, -28260, -28209,
+ -28158, -28106, -28054, -28002, -27950, -27897, -27844, -27791, -27738, -27684, -27630,
+ -27576, -27522, -27467, -27412, -27357, -27301, -27246, -27190, -27133, -27077, -27020,
+ -26963, -26906, -26848, -26791, -26733, -26674, -26616, -26557, -26498, -26439, -26379,
+ -26320, -26259, -26199, -26139, -26078, -26017, -25956, -25894, -25833, -25771, -25708,
+ -25646, -25583, -25520, -25457, -25394, -25330, -25266, -25202, -25138, -25073, -25008,
+ -24943, -24878, -24812, -24746, -24680, -24614, -24548, -24481, -24414, -24347, -24279,
+ -24212, -24144, -24076, -24008, -23939, -23870, -23801, -23732, -23663, -23593, -23523,
+ -23453, -23383, -23312, -23241, -23170, -23099, -23028, -22956, -22884, -22812, -22740,
+ -22668, -22595, -22522, -22449, -22375, -22302, -22228, -22154, -22080, -22006, -21931,
+ -21856, -21781, -21706, -21631, -21555, -21479, -21403, -21327, -21251, -21174, -21097,
+ -21020, -20943, -20865, -20788, -20710, -20632, -20554, -20475, -20397, -20318, -20239,
+ -20160, -20081, -20001, -19921, -19841, -19761, -19681, -19601, -19520, -19439, -19358,
+ -19277, -19195, -19114, -19032, -18950, -18868, -18786, -18703, -18621, -18538, -18455,
+ -18372, -18288, -18205, -18121, -18037, -17953, -17869, -17785, -17700, -17616, -17531,
+ -17446, -17361, -17275, -17190, -17104, -17018, -16932, -16846, -16760, -16673, -16587,
+ -16500, -16413, -16326, -16239, -16151, -16064, -15976, -15888, -15800, -15712, -15624,
+ -15535, -15447, -15358, -15269, -15180, -15091, -15002, -14912, -14823, -14733, -14643,
+ -14553, -14463, -14373, -14282, -14192, -14101, -14010, -13919, -13828, -13737, -13646,
+ -13554, -13463, -13371, -13279, -13187, -13095, -13003, -12910, -12818, -12725, -12633,
+ -12540, -12447, -12354, -12261, -12167, -12074, -11980, -11887, -11793, -11699, -11605,
+ -11511, -11417, -11323, -11228, -11134, -11039, -10945, -10850, -10755, -10660, -10565,
+ -10469, -10374, -10279, -10183, -10088, -9992, -9896, -9800, -9704, -9608, -9512,
+ -9416, -9319, -9223, -9127, -9030, -8933, -8836, -8740, -8643, -8546, -8449,
+ -8351, -8254, -8157, -8059, -7962, -7864, -7767, -7669, -7571, -7473, -7376,
+ -7278, -7180, -7081, -6983, -6885, -6787, -6688, -6590, -6491, -6393, -6294,
+ -6195, -6097, -5998, -5899, -5800, -5701, -5602, -5503, -5404, -5305, -5205,
+ -5106, -5007, -4907, -4808, -4709, -4609, -4510, -4410, -4310, -4211, -4111,
+ -4011, -3911, -3812, -3712, -3612, -3512, -3412, -3312, -3212, -3112, -3012,
+ -2912, -2811, -2711, -2611, -2511, -2411, -2310, -2210, -2110, -2009, -1909,
+ -1809, -1708, -1608, -1507, -1407, -1307, -1206, -1106, -1005, -905, -804,
+ -704, -603, -503, -402, -302, -201, -101, 0, 101, 201, 302,
+ 402, 503, 603, 704, 804, 905, 1005, 1106, 1206, 1307, 1407,
+ 1507, 1608, 1708, 1809, 1909, 2009, 2110, 2210, 2310, 2411, 2511,
+ 2611, 2711, 2811, 2912, 3012, 3112, 3212, 3312, 3412, 3512, 3612,
+ 3712, 3812, 3911, 4011, 4111, 4211, 4310, 4410, 4510, 4609, 4709,
+ 4808, 4907, 5007, 5106, 5205, 5305, 5404, 5503, 5602, 5701, 5800,
+ 5899, 5998, 6097, 6195, 6294, 6393, 6491, 6590, 6688, 6787, 6885,
+ 6983, 7081, 7180, 7278, 7376, 7473, 7571, 7669, 7767, 7864, 7962,
+ 8059, 8157, 8254, 8351, 8449, 8546, 8643, 8740, 8836, 8933, 9030,
+ 9127, 9223, 9319, 9416, 9512, 9608, 9704, 9800, 9896, 9992, 10088,
+ 10183, 10279, 10374, 10469, 10565, 10660, 10755, 10850, 10945, 11039, 11134,
+ 11228, 11323, 11417, 11511, 11605, 11699, 11793, 11887, 11980, 12074, 12167,
+ 12261, 12354, 12447, 12540, 12633, 12725, 12818, 12910, 13003, 13095, 13187,
+ 13279, 13371, 13463, 13554, 13646, 13737, 13828, 13919, 14010, 14101, 14192,
+ 14282, 14373, 14463, 14553, 14643, 14733, 14823, 14912, 15002, 15091, 15180,
+ 15269, 15358, 15447, 15535, 15624, 15712, 15800, 15888, 15976, 16064, 16151,
+ 16239, 16326, 16413, 16500, 16587, 16673, 16760, 16846, 16932, 17018, 17104,
+ 17190, 17275, 17361, 17446, 17531, 17616, 17700, 17785, 17869, 17953, 18037,
+ 18121, 18205, 18288, 18372, 18455, 18538, 18621, 18703, 18786, 18868, 18950,
+ 19032, 19114, 19195, 19277, 19358, 19439, 19520, 19601, 19681, 19761, 19841,
+ 19921, 20001, 20081, 20160, 20239, 20318, 20397, 20475, 20554, 20632, 20710,
+ 20788, 20865, 20943, 21020, 21097, 21174, 21251, 21327, 21403, 21479, 21555,
+ 21631, 21706, 21781, 21856, 21931, 22006, 22080, 22154, 22228, 22302, 22375,
+ 22449, 22522, 22595, 22668, 22740, 22812, 22884, 22956, 23028, 23099, 23170,
+ 23241, 23312, 23383, 23453, 23523, 23593, 23663, 23732, 23801, 23870, 23939,
+ 24008, 24076, 24144, 24212, 24279, 24347, 24414, 24481, 24548, 24614, 24680,
+ 24746, 24812, 24878, 24943, 25008, 25073, 25138, 25202, 25266, 25330, 25394,
+ 25457, 25520, 25583, 25646, 25708, 25771, 25833, 25894, 25956, 26017, 26078,
+ 26139, 26199, 26259, 26320, 26379, 26439, 26498, 26557, 26616, 26674, 26733,
+ 26791, 26848, 26906, 26963, 27020, 27077, 27133, 27190, 27246, 27301, 27357,
+ 27412, 27467, 27522, 27576, 27630, 27684, 27738, 27791, 27844, 27897, 27950,
+ 28002, 28054, 28106, 28158, 28209, 28260, 28311, 28361, 28411, 28461, 28511,
+ 28560, 28610, 28658, 28707, 28755, 28803, 28851, 28899, 28946, 28993, 29040,
+ 29086, 29132, 29178, 29224, 29269, 29314, 29359, 29404, 29448, 29492, 29535,
+ 29579, 29622, 29665, 29707, 29750, 29792, 29833, 29875, 29916, 29957, 29997,
+ 30038, 30078, 30118, 30157, 30196, 30235, 30274, 30312, 30350, 30388, 30425,
+ 30462, 30499, 30536, 30572, 30608, 30644, 30680, 30715, 30750, 30784, 30819,
+ 30853, 30886, 30920, 30953, 30986, 31018, 31050, 31082, 31114, 31146, 31177,
+ 31207, 31238, 31268, 31298, 31328, 31357, 31386, 31415, 31443, 31471, 31499,
+ 31527, 31554, 31581, 31608, 31634, 31660, 31686, 31711, 31737, 31761, 31786,
+ 31810, 31834, 31858, 31881, 31904, 31927, 31950, 31972, 31994, 32015, 32037,
+ 32058, 32078, 32099, 32119, 32138, 32158, 32177, 32196, 32214, 32233, 32251,
+ 32268, 32286, 32303, 32319, 32336, 32352, 32368, 32383, 32398, 32413, 32428,
+ 32442, 32456, 32470, 32483, 32496, 32509, 32522, 32534, 32546, 32557, 32568,
+ 32579, 32590, 32600, 32610, 32620, 32629, 32638, 32647, 32656, 32664, 32672,
+ 32679, 32686, 32693, 32700, 32706, 32712, 32718, 32723, 32729, 32733, 32738,
+ 32742, 32746, 32749, 32753, 32756, 32758, 32760, 32762, 32764, 32766, 32767,
+ 32767, 32767},
+
+}; /* END OF ia_mps_dec_hybrid_tables_struct */
+
+const ia_mps_dec_mdct2qmf_tables_struct ixheaacd_mps_dec_mdct2qmf_tables = {
+ /* cos_table_long_32_00[32] */
+ {-22594, -24811, 20160, 26791, -17530, -28510, 14733, 29957, -11792, -31113, 8740,
+ 31972, -5601, -32521, 2411, 32758, 804, -32678, -4010, 32286, 7180, -31580,
+ -10278, 30572, 13279, -29268, -16150, 27684, 18868, -25832, -21402, 23732},
+ /* cos_table_long_32_01[32] */
+ {21403, 27684, -13278, -31580, 4011, 32758, 5602, -31113, -14732, 26791, 22595,
+ -20159, -28510, 11793, 31972, -2410, -32678, -7179, 30572, 16151, -25832, -23731,
+ 18868, 29269, -10278, -32285, 804, 32522, 8740, -29956, -17530, 24812},
+ /* cos_table_long_32_02[32] */
+ {-20159, -29956, 5602, 32679, 10279, -27683, -23731, 16151, 31581, -803, -31971,
+ -14732, 24812, 26791, -11792, -32521, -4010, 30572, 18868, -21402, -29268, 7179,
+ 32758, 8740, -28510, -22594, 17531, 31114, -2410, -32285, -13278, 25833},
+ /* cos_table_long_32_03[32] */
+ {18868, 31581, 2411, -29956, -22594, 14733, 32522, 7180, -27683, -25832, 10279,
+ 32758, 11793, -24811, -28510, 5602, 32286, 16151, -21402, -30571, 804, 31114,
+ 20160, -17530, -31971, -4010, 29269, 23732, -13278, -32678, -8739, 26791},
+ /* cos_table_long_32_04[32] */
+ {-17530, -32521, -10278, 23732, 30572, 2411, -28510, -26790, 5602, 31581, 21403,
+ -13278, -32757, -14732, 20160, 31972, 7180, -25832, -29268, 804, 29957, 24812,
+ -8739, -32285, -18867, 16151, 32679, 11793, -22594, -31113, -4010, 27684},
+ /* cos_table_long_32_05[32] */
+ {16151, 32758, 17531, -14732, -32678, -18867, 13279, 32522, 20160, -11792, -32285,
+ -21402, 10279, 31972, 22595, -8739, -31580, -23731, 7179, 31114, 24812, -5601,
+ -30571, -25832, 4011, 29957, 26791, -2410, -29268, -27683, 804, 28511},
+ /* cos_table_long_32_06[32] */
+ {-14732, -32285, -23731, 4011, 28511, 29957, 7180, -21402, -32678, -17530, 11793,
+ 31581, 25833, -803, -26790, -31113, -10278, 18868, 32758, 20160, -8739, -30571,
+ -27683, -2410, 24812, 31972, 13279, -16150, -32521, -22594, 5602, 29269},
+ /* cos_table_long_32_07[32] */
+ {13279, 31114, 28511, 7180, -18867, -32521, -24811, -803, 23732, 32679, 20160,
+ -5601, -27683, -31580, -14732, 11793, 30572, 29269, 8740, -17530, -32285, -25832,
+ -2410, 22595, 32758, 21403, -4010, -26790, -31971, -16150, 10279, 29957},
+ /* cos_table_long_32_08[32] */
+ {-11792, -29268, -31580, -17530, 5602, 25833, 32679, 22595, 804, -21402, -32521,
+ -26790, -7179, 16151, 31114, 29957, 13279, -10278, -28510, -31971, -18867, 4011,
+ 24812, 32758, 23732, 2411, -20159, -32285, -27683, -8739, 14733, 30572},
+ /* cos_table_long_32_09[32] */
+ {10279, 26791, 32758, 25833, 8740, -11792, -27683, -32678, -24811, -7179, 13279,
+ 28511, 32522, 23732, 5602, -14732, -29268, -32285, -22594, -4010, 16151, 29957,
+ 31972, 21403, 2411, -17530, -30571, -31580, -20159, -803, 18868, 31114},
+ /* cos_table_long_32_10[32] */
+ {-8739, -23731, -31971, -31113, -21402, -5601, 11793, 25833, 32522, 29957, 18868,
+ 2411, -14732, -27683, -32757, -28510, -16150, 804, 17531, 29269, 32679, 26791,
+ 13279, -4010, -20159, -30571, -32285, -24811, -10278, 7180, 22595, 31581},
+ /* cos_table_long_32_11[32] */
+ {7179, 20160, 29269, 32758, 29957, 21403, 8740, -5601, -18867, -28510, -32678,
+ -30571, -22594, -10278, 4011, 17531, 27684, 32522, 31114, 23732, 11793, -2410,
+ -16150, -26790, -32285, -31580, -24811, -13278, 804, 14733, 25833, 31972},
+ /* cos_table_long_32_12[32] */
+ {-5601, -16150, -24811, -30571, -32757, -31113, -25832, -17530, -7179, 4011, 14733,
+ 23732, 29957, 32679, 31581, 26791, 18868, 8740, -2410, -13278, -22594, -29268,
+ -32521, -31971, -27683, -20159, -10278, 804, 11793, 21403, 28511, 32286},
+ /* cos_table_long_32_13[32] */
+ {4011, 11793, 18868, 24812, 29269, 31972, 32758, 31581, 28511, 23732, 17531,
+ 10279, 2411, -5601, -13278, -20159, -25832, -29956, -32285, -32678, -31113, -27683,
+ -22594, -16150, -8739, -803, 7180, 14733, 21403, 26791, 30572, 32522},
+ /* cos_table_long_32_14[32] */
+ {-2410, -7178, -11792, -16150, -20159, -23731, -26790, -29268, -31113, -32285, -32757,
+ -32521, -31580, -29956, -27683, -24811, -21402, -17530, -13278, -8739, -4010, 804,
+ 5602, 10279, 14733, 18868, 22595, 25833, 28511, 30572, 31972, 32679},
+ /* cos_table_long_32_15[32] */
+ {804, 2411, 4011, 5602, 7180, 8740, 10279, 11793, 13279, 14733, 16151,
+ 17531, 18868, 20160, 21403, 22595, 23732, 24812, 25833, 26791, 27684, 28511,
+ 29269, 29957, 30572, 31114, 31581, 31972, 32286, 32522, 32679, 32758},
+ /* cos_table_long_32_16[32] */
+ {23732, 21403, -25831, -18867, 27684, 16151, -29268, -13278, 30572, 10279, -31580,
+ -7179, 32286, 4011, -32678, -803, 32758, -2410, -32521, 5602, 31972, -8739,
+ -31113, 11793, 29957, -14732, -28510, 17531, 26791, -20159, -24811, 22595},
+ /* cos_table_long_32_17[32] */
+ {-24811, -17530, 29957, 8740, -32521, 804, 32286, -10278, -29268, 18868, 23732,
+ -25832, -16150, 30572, 7180, -32678, 2411, 31972, -11792, -28510, 20160, 22595,
+ -26790, -14732, 31114, 5602, -32757, 4011, 31581, -13278, -27683, 21403},
+ /* cos_table_long_32_18[32] */
+ {25832, 13279, -32285, 2411, 31114, -17530, -22594, 28511, 8740, -32757, 7180,
+ 29269, -21402, -18867, 30572, 4011, -32521, 11793, 26791, -24811, -14732, 31972,
+ -803, -31580, 16151, 23732, -27683, -10278, 32679, -5601, -29956, 20160},
+ /* cos_table_long_32_19[32] */
+ {-26790, -8739, 32679, -13278, -23731, 29269, 4011, -31971, 17531, 20160, -31113,
+ 804, 30572, -21402, -16150, 32286, -5601, -28510, 24812, 11793, -32757, 10279,
+ 25833, -27683, -7179, 32522, -14732, -22594, 29957, 2411, -31580, 18868},
+ /* cos_table_long_32_20[32] */
+ {27684, 4011, -31113, 22595, 11793, -32678, 16151, 18868, -32285, 8740, 24812,
+ -29956, 804, 29269, -25832, -7179, 31972, -20159, -14732, 32758, -13278, -21402,
+ 31581, -5601, -26790, 28511, 2411, -30571, 23732, 10279, -32521, 17531},
+ /* cos_table_long_32_21[32] */
+ {-28510, 804, 27684, -29268, 2411, 26791, -29956, 4011, 25833, -30571, 5602,
+ 24812, -31113, 7180, 23732, -31580, 8740, 22595, -31971, 10279, 21403, -32285,
+ 11793, 20160, -32521, 13279, 18868, -32678, 14733, 17531, -32757, 16151},
+ /* cos_table_long_32_22[32] */
+ {29269, -5601, -22594, 32522, -16150, -13278, 31972, -24811, -2410, 27684, -30571,
+ 8740, 20160, -32757, 18868, 10279, -31113, 26791, -803, -25832, 31581, -11792,
+ -17530, 32679, -21402, -7179, 29957, -28510, 4011, 23732, -32285, 14733},
+ /* cos_table_long_32_23[32] */
+ {-29956, 10279, 16151, -31971, 26791, -4010, -21402, 32758, -22594, -2410, 25833,
+ -32285, 17531, 8740, -29268, 30572, -11792, -14732, 31581, -27683, 5602, 20160,
+ -32678, 23732, 804, -24811, 32522, -18867, -7179, 28511, -31113, 13279},
+ /* cos_table_long_32_24[32] */
+ {30572, -14732, -8739, 27684, -32285, 20160, 2411, -23731, 32758, -24811, 4011,
+ 18868, -31971, 28511, -10278, -13278, 29957, -31113, 16151, 7180, -26790, 32522,
+ -21402, -803, 22595, -32678, 25833, -5601, -17530, 31581, -29268, 11793},
+ /* cos_table_long_32_25[32] */
+ {-31113, 18868, 804, -20159, 31581, -30571, 17531, 2411, -21402, 31972, -29956,
+ 16151, 4011, -22594, 32286, -29268, 14733, 5602, -23731, 32522, -28510, 13279,
+ 7180, -24811, 32679, -27683, 11793, 8740, -25832, 32758, -26790, 10279},
+ /* cos_table_long_32_26[32] */
+ {31581, -22594, 7179, 10279, -24811, 32286, -30571, 20160, -4010, -13278, 26791,
+ -32678, 29269, -17530, 804, 16151, -28510, 32758, -27683, 14733, 2411, -18867,
+ 29957, -32521, 25833, -11792, -5601, 21403, -31113, 31972, -23731, 8740},
+ /* cos_table_long_32_27[32] */
+ {-31971, 25832, -14732, 804, 13279, -24811, 31581, -32285, 26791, -16150, 2411,
+ 11793, -23731, 31114, -32521, 27684, -17530, 4011, 10279, -22594, 30572, -32678,
+ 28511, -18867, 5602, 8740, -21402, 29957, -32757, 29269, -20159, 7180},
+ /* cos_table_long_32_28[32] */
+ {32286, -28510, 21403, -11792, 804, 10279, -20159, 27684, -31971, 32522, -29268,
+ 22595, -13278, 2411, 8740, -18867, 26791, -31580, 32679, -29956, 23732, -14732,
+ 4011, 7180, -17530, 25833, -31113, 32758, -30571, 24812, -16150, 5602},
+ /* cos_table_long_32_29[32] */
+ {-32521, 30572, -26790, 21403, -14732, 7179, 804, -8739, 16151, -22594, 27684,
+ -31113, 32679, -32285, 29957, -25831, 20160, -13278, 5602, 2411, -10278, 17531,
+ -23731, 28511, -31580, 32758, -31971, 29269, -24811, 18868, -11792, 4011},
+ /* cos_table_long_32_30[32] */
+ {32679, -31971, 30572, -28510, 25832, -22594, 18868, -14732, 10279, -5601, 804,
+ 4011, -8739, 13279, -17530, 21403, -24811, 27684, -29956, 31581, -32521, 32758,
+ -32285, 31114, -29268, 26791, -23731, 20160, -16150, 11793, -7178, 2411},
+ /* cos_table_long_32_31[32] */
+ {-32757, 32679, -32521, 32286, -31971, 31581, -31113, 30572, -29956, 29269, -28510,
+ 27684, -26790, 25832, -24811, 23732, -22594, 21403, -20159, 18868, -17530, 16151,
+ -14732, 13279, -11792, 10279, -8739, 7179, -5601, 4011, -2410, 804},
+
+ /* cos_table_long_30_00[30] */
+ {22556, 24917, -19947, -27004, 17121, 28797, -14106, -30273, 10938, 31419,
+ -7649, -32218, 4277, 32667, -857, -32756, -2570, 32488, 5971, -31862,
+ -9306, 30888, 12540, -29575, -15635, 27939, 18560, -25996, -21280, 23769},
+ /* cos_table_long_30_01[30] */
+ {-21280, -27938, 12540, 31863, -2570, -32666, -7649, 30274, 17121, -24916,
+ -24916, 17121, 30274, -7649, -32666, -2570, 31863, 12540, -27938, -21280,
+ 21281, 27939, -12539, -31862, 2571, 32667, 7650, -30273, -17120, 24917},
+ /* cos_table_long_30_02[30] */
+ {19948, 30274, -4276, -32487, -12539, 25997, 25997, -12539, -32487, -4276,
+ 30274, 19948, -19947, -30273, 4277, 32488, 12540, -25996, -25996, 12540,
+ 32488, 4277, -30273, -19947, 19948, 30274, -4276, -32487, -12539, 25997},
+ /* cos_table_long_30_03[30] */
+ {-18559, -31862, -4276, 28797, 24917, -10937, -32756, -12539, 23769, 29576,
+ -2570, -31418, -19947, 17121, 32219, 5971, -27938, -25996, 9307, 32667,
+ 14107, -22555, -30273, 858, 30888, 21281, -15635, -32487, -7649, 27005},
+ /* cos_table_long_30_04[30] */
+ {17121, 32667, 12540, -21280, -31862, -7649, 24917, 30274, 2571, -27938,
+ -27938, 2571, 30274, 24917, -7649, -31862, -21280, 12540, 32667, 17121,
+ -17120, -32666, -12539, 21281, 31863, 7650, -24916, -30273, -2570, 27939},
+ /* cos_table_long_30_05[30] */
+ {-15635, -32666, -19947, 10938, 31863, 23769, -5970, -30273, -27004, 858,
+ 27939, 29576, 4277, -24916, -31418, -9306, 21281, 32488, 14107, -17120,
+ -32756, -18559, 12540, 32219, 22556, -7649, -30887, -25996, 2571, 28797},
+ /* cos_table_long_30_06[30] */
+ {14107, 31863, 25997, 858, -24916, -32218, -15635, 12540, 31419, 27005,
+ 2571, -23768, -32487, -17120, 10938, 30888, 27939, 4277, -22555, -32666,
+ -18559, 9307, 30274, 28797, 5971, -21280, -32756, -19947, 7650, 29576},
+ /* cos_table_long_30_07[30] */
+ {-12539, -30273, -30273, -12539, 12540, 30274, 30274, 12540, -12539, -30273,
+ -30273, -12539, 12540, 30274, 30274, 12540, -12539, -30273, -30273, -12539,
+ 12540, 30274, 30274, 12540, -12539, -30273, -30273, -12539, 12540, 30274},
+ /* cos_table_long_30_08[30] */
+ {10938, 27939, 32488, 22556, 2571, -18559, -31418, -30273, -15635, 5972,
+ 24917, 32757, 25997, 7650, -14106, -29575, -31862, -19947, 858, 21281,
+ 32219, 28797, 12540, -9306, -27004, -32666, -23768, -4276, 17121, 30888},
+ /* cos_table_long_30_09[30] */
+ {-9306, -24916, -32487, -29575, -17120, 858, 18560, 30274, 32219, 23769,
+ 7650, -10937, -25996, -32666, -28796, -15635, 2571, 19948, 30888, 31863,
+ 22556, 5971, -12539, -27004, -32756, -27938, -14106, 4277, 21281, 31419},
+ /* cos_table_long_30_10[30] */
+ {7650, 21281, 30274, 32667, 27939, 17121, 2571, -12539, -24916, -31862,
+ -31862, -24916, -12539, 2571, 17121, 27939, 32667, 30274, 21281, 7650,
+ -7649, -21280, -30273, -32666, -27938, -17120, -2570, 12540, 24917, 31863},
+ /* cos_table_long_30_11[30] */
+ {-5970, -17120, -25996, -31418, -32666, -29575, -22555, -12539, -857, 10938,
+ 21281, 28797, 32488, 31863, 27005, 18560, 7650, -4276, -15635, -24916,
+ -30887, -32756, -30273, -23768, -14106, -2570, 9307, 19948, 27939, 32219},
+ /* cos_table_long_30_12[30] */
+ {4277, 12540, 19948, 25997, 30274, 32488, 32488, 30274, 25997, 19948,
+ 12540, 4277, -4276, -12539, -19947, -25996, -30273, -32487, -32487, -30273,
+ -25996, -19947, -12539, -4276, 4277, 12540, 19948, 25997, 30274, 32488},
+ /* cos_table_long_30_13[30] */
+ {-2570, -7649, -12539, -17120, -21280, -24916, -27938, -30273, -31862, -32666,
+ -32666, -31862, -30273, -27938, -24916, -21280, -17120, -12539, -7649, -2570,
+ 2571, 7650, 12540, 17121, 21281, 24917, 27939, 30274, 31863, 32667},
+ /* cos_table_long_30_14[30] */
+ {858, 2571, 4277, 5971, 7650, 9307, 10938, 12540, 14107, 15636,
+ 17121, 18560, 19948, 21281, 22556, 23769, 24917, 25997, 27005, 27939,
+ 28797, 29576, 30274, 30888, 31419, 31863, 32219, 32488, 32667, 32757},
+ /* cos_table_long_30_15[30] */
+ {-23768, -21280, 25997, 18560, -27938, -15635, 29576, 12540, -30887, -9306,
+ 31863, 5972, -32487, -2570, 32757, -857, -32666, 4277, 32219, -7649,
+ -31418, 10938, 30274, -14106, -28796, 17121, 27005, -19947, -24916, 22556},
+ /* cos_table_long_30_16[30] */
+ {24917, 17121, -30273, -7648, 32667, -2570, -31862, 12540, 27939, -21280,
+ -21280, 27939, 12540, -31862, -2570, 32667, -7649, -30273, 17121, 24917,
+ -24916, -17120, 30274, 7650, -32666, 2571, 31863, -12539, -27938, 21281},
+ /* cos_table_long_30_17[30] */
+ {-25996, -12539, 32488, -4276, -30273, 19948, 19948, -30273, -4276, 32488,
+ -12539, -25996, 25997, 12540, -32487, 4277, 30274, -19947, -19947, 30274,
+ 4277, -32487, 12540, 25997, -25996, -12539, 32488, -4276, -30273, 19948},
+ /* cos_table_long_30_18[30] */
+ {27005, 7650, -32487, 15635, 21281, -30887, 858, 30274, -22555, -14106,
+ 32667, -9306, -25996, 27939, 5972, -32218, 17121, 19948, -31418, 2571,
+ 29576, -23768, -12539, 32757, -10937, -24916, 28797, 4277, -31862, 18560},
+ /* cos_table_long_30_19[30] */
+ {-27938, -2570, 30274, -24916, -7649, 31863, -21280, -12539, 32667, -17120,
+ -17120, 32667, -12539, -21280, 31863, -7649, -24916, 30274, -2570, -27938,
+ 27939, 2571, -30273, 24917, 7650, -31862, 21281, 12540, -32666, 17121},
+ /* cos_table_long_30_20[30] */
+ {28797, -2570, -25996, 30888, -7649, -22555, 32219, -12539, -18559, 32757,
+ -17120, -14106, 32488, -21280, -9306, 31419, -24916, -4276, 29576, -27938,
+ 858, 27005, -30273, 5972, 23769, -31862, 10938, 19948, -32666, 15636},
+ /* cos_table_long_30_21[30] */
+ {-29575, 7650, 19948, -32756, 21281, 5972, -28796, 30274, -9305, -18559,
+ 32667, -22555, -4276, 27939, -30887, 10938, 17121, -32487, 23769, 2571,
+ -27004, 31419, -12539, -15635, 32219, -24916, -857, 25997, -31862, 14107},
+ /* cos_table_long_30_22[30] */
+ {30274, -12539, -12539, 30274, -30273, 12540, 12540, -30273, 30274, -12539,
+ -12539, 30274, -30273, 12540, 12540, -30273, 30274, -12539, -12539, 30274,
+ -30273, 12540, 12540, -30273, 30274, -12539, -12539, 30274, -30273, 12540},
+ /* cos_table_long_30_23[30] */
+ {-30887, 17121, 4277, -23768, 32667, -27004, 9307, 12540, -28796, 32219,
+ -21280, 858, 19948, -31862, 29576, -14106, -7649, 25997, -32756, 24917,
+ -5970, -15635, 30274, -31418, 18560, 2571, -22555, 32488, -27938, 10938},
+ /* cos_table_long_30_24[30] */
+ {31419, -21280, 4277, 14107, -27938, 32757, -27004, 12540, 5972, -22555,
+ 31863, -30887, 19948, -2570, -15635, 28797, -32666, 25997, -10937, -7649,
+ 23769, -32218, 30274, -18559, 858, 17121, -29575, 32488, -24916, 9307},
+ /* cos_table_long_30_25[30] */
+ {-31862, 24917, -12539, -2570, 17121, -27938, 32667, -30273, 21281, -7649,
+ -7649, 21281, -30273, 32667, -27938, 17121, -2570, -12539, 24917, -31862,
+ 31863, -24916, 12540, 2571, -17120, 27939, -32666, 30274, -21280, 7650},
+ /* cos_table_long_30_26[30] */
+ {32219, -27938, 19948, -9306, -2570, 14107, -23768, 30274, -32756, 30888,
+ -24916, 15635, -4276, -7648, 18560, -27004, 31863, -32487, 28797, -21280,
+ 10938, 858, -12539, 22556, -29575, 32667, -31418, 25997, -17120, 5971},
+ /* cos_table_long_30_27[30] */
+ {-32487, 30274, -25995, 19948, -12539, 4277, 4277, -12539, 19948, -25996,
+ 30274, -32487, 32488, -30273, 25997, -19947, 12540, -4276, -4276, 12540,
+ -19947, 25997, -30273, 32488, -32487, 30274, -25996, 19948, -12539, 4277},
+ /* cos_table_long_30_28[30] */
+ {32667, -31862, 30274, -27938, 24917, -21280, 17121, -12539, 7650, -2570,
+ -2570, 7650, -12539, 17121, -21280, 24917, -27938, 30274, -31862, 32667,
+ -32666, 31863, -30273, 27939, -24916, 21281, -17120, 12540, -7649, 2571},
+ /* cos_table_long_30_29[30] */
+ {-32756, 32667, -32487, 32219, -31862, 31419, -30887, 30274, -29575, 28797,
+ -27938, 27005, -25996, 24917, -23768, 22556, -21280, 19948, -18559, 17121,
+ -15635, 14107, -12539, 10938, -9306, 7650, -5970, 4277, -2570, 858},
+
+ /* cos_table_long_24_00[24] */
+ {-22399, -25329, 19087, 27827, -15446, -29846, 11542, 31357, -7440, -32329, 3212, 32750,
+ 1072, -32609, -5337, 31912, 9512, -30667, -13523, 28899, 17304, -26634, -20787, 23916},
+ /* cos_table_long_24_01[24] */
+ {20788, 28899, -9511, -32609, -3211, 31357, 15447, -25329, -25329, 15447, 31357, -3211,
+ -32609, -9511, 28899, 20788, -20787, -28898, 9512, 32610, 3212, -31356, -15446, 25330},
+ /* cos_table_long_24_02[24] */
+ {-19086, -31356, -1071, 30668, 20788, -17303, -31911, -3211, 29847, 22400, -15446, -32329,
+ -5337, 28899, 23916, -13523, -32609, -7440, 27827, 25330, -11542, -32749, -9511, 26635},
+ /* cos_table_long_24_03[24] */
+ {17304, 32610, 11543, -22399, -31356, -5337, 26635, 28899, -1071, -29846, -25329, 7441,
+ 31912, 20788, -13523, -32749, -15446, 19087, 32330, 9512, -23915, -30667, -3211, 27827},
+ /* cos_table_long_24_04[24] */
+ {-15446, -32609, -20787, 9512, 31357, 25330, -3211, -28898, -28898, -3211, 25330, 31357,
+ 9512, -20787, -32609, -15446, 15447, 32610, 20788, -9511, -31356, -25329, 3212, 28899},
+ /* cos_table_long_24_05[24] */
+ {13524, 31357, 27827, 5338, -20787, -32749, -22399, 3212, 26635, 31912, 15447, -11542,
+ -30667, -28898, -7440, 19087, 32610, 23916, -1071, -25329, -32329, -17303, 9512, 29847},
+ /* cos_table_long_24_06[24] */
+ {-11541, -28898, -31911, -19086, 3212, 23916, 32750, 25330, 5338, -17303, -31356, -29846,
+ -13523, 9512, 27827, 32330, 20788, -1071, -22399, -32609, -26634, -7440, 15447, 30668},
+ /* cos_table_long_24_07[24] */
+ {9512, 25330, 32610, 28899, 15447, -3211, -20787, -31356, -31356, -20787, -3211, 15447,
+ 28899, 32610, 25330, 9512, -9511, -25329, -32609, -28898, -15446, 3212, 20788, 31357},
+ /* cos_table_long_24_08[24] */
+ {-7440, -20787, -29846, -32749, -28898, -19086, -5337, 9512, 22400, 30668, 32610, 27827,
+ 17304, 3212, -11542, -23915, -31356, -32329, -26634, -15446, -1071, 13524, 25330, 31912},
+ /* cos_table_long_24_09[24] */
+ {5338, 15447, 23916, 29847, 32610, 31912, 27827, 20788, 11543, 1072, -9511, -19086,
+ -26634, -31356, -32749, -30667, -25329, -17303, -7440, 3212, 13524, 22400, 28899, 32330},
+ /* cos_table_long_24_10[24] */
+ {-3211, -9511, -15446, -20787, -25329, -28898, -31356, -32609,
+ -32609, -31356, -28898, -25329, -20787, -15446, -9511, -3211,
+ 3212, 9512, 15447, 20788, 25330, 28899, 31357, 32610},
+ /* cos_table_long_24_11[24] */
+ {1072, 3212, 5338, 7441, 9512, 11543, 13524, 15447, 17304, 19087, 20788, 22400,
+ 23916, 25330, 26635, 27827, 28899, 29847, 30668, 31357, 31912, 32330, 32610, 32750},
+ /* cos_table_long_24_12[24] */
+ {23916, 20788, -26634, -17303, 28899, 13524, -30667, -9511, 31912, 5338, -32609, -1071,
+ 32750, -3211, -32329, 7441, 31357, -11542, -29846, 15447, 27827, -19086, -25329, 22400},
+ /* cos_table_long_24_13[24] */
+ {-25329, -15446, 31357, 3212, -32609, 9512, 28899, -20787, -20787, 28899, 9512, -32609,
+ 3212, 31357, -15446, -25329, 25330, 15447, -31356, -3211, 32610, -9511, -28898, 20788},
+ /* cos_table_long_24_14[24] */
+ {26635, 9512, -32749, 11542, 25330, -27826, -7440, 32610, -13523, -23915, 28899, 5338,
+ -32329, 15447, 22400, -29846, -3211, 31912, -17303, -20787, 30668, 1072, -31356, 19087},
+ /* cos_table_long_24_15[24] */
+ {-27826, -3211, 30668, -23915, -9511, 32330, -19086, -15446, 32750, -13523, -20787, 31912,
+ -7440, -25329, 29847, -1071, -28898, 26635, 5338, -31356, 22400, 11543, -32609, 17304},
+ /* cos_table_long_24_16[24] */
+ {28899, -3211, -25329, 31357, -9511, -20787, 32610, -15446, -15446, 32610, -20787, -9511,
+ 31357, -25329, -3211, 28899, -28898, 3212, 25330, -31356, 9512, 20788, -32609, 15447},
+ /* cos_table_long_24_17[24] */
+ {-29846, 9512, 17304, -32329, 25330, -1071, -23915, 32610, -19086, -7440, 28899, -30667,
+ 11542, 15447, -31911, 26635, -3211, -22399, 32750, -20787, -5337, 27827, -31356, 13524},
+ /* cos_table_long_24_18[24] */
+ {30668, -15446, -7440, 26635, -32609, 22400, -1071, -20787, 32330, -27826, 9512, 13524,
+ -29846, 31357, -17303, -5337, 25330, -32749, 23916, -3211, -19086, 31912, -28898, 11543},
+ /* cos_table_long_24_19[24] */
+ {-31356, 20788, -3211, -15446, 28899, -32609, 25330, -9511, -9511, 25330, -32609, 28899,
+ -15446, -3211, 20788, -31356, 31357, -20787, 3212, 15447, -28898, 32610, -25329, 9512},
+ /* cos_table_long_24_20[24] */
+ {31912, -25329, 13524, 1072, -15446, 26635, -32329, 31357, -23915, 11542, 3212, -17303,
+ 27827, -32609, 30668, -22399, 9512, 5338, -19086, 28899, -32749, 29847, -20787, 7441},
+ /* cos_table_long_24_21[24] */
+ {-32329, 28899, -22399, 13524, -3211, -7440, 17304, -25329, 30668, -32749, 31357, -26634,
+ 19087, -9511, -1071, 11543, -20787, 27827, -31911, 32610, -29846, 23916, -15446, 5338},
+ /* cos_table_long_24_22[24] */
+ {32610, -31356, 28899, -25329, 20788, -15446, 9512, -3211, -3211, 9512, -15446, 20788,
+ -25329, 28899, -31356, 32610, -32609, 31357, -28898, 25330, -20787, 15447, -9511, 3212},
+ /* cos_table_long_24_23[24] */
+ {-32749, 32610, -32329, 31912, -31356, 30668, -29846, 28899, -27826, 26635, -25329, 23916,
+ -22399, 20788, -19086, 17304, -15446, 13524, -11541, 9512, -7440, 5338, -3211, 1072},
+
+ /* cos_table_long_18_00[18] */
+ {22138, 25997, -17605, -29065, 12540, 31251, -7091, -32487, 1429, 32737, 4277, -31990, -9853,
+ 30274, 15131, -27635, -19947, 24159},
+ /* cos_table_long_18_01[18] */
+ {-19947, -30273, 4277, 32488, 12540, -25996, -25996, 12540, 32488, 4277, -30273, -19947,
+ 19948, 30274, -4276, -32487, -12539, 25997},
+ /* cos_table_long_18_02[18] */
+ {17606, 32488, 9854, -24158, -30273, -1428, 29066, 25997, -7091, -31990, -19947, 15131, 32737,
+ 12540, -22137, -31250, -4276, 27636},
+ /* cos_table_long_18_03[18] */
+ {-15130, -32487, -22137, 7092, 30274, 27636, 1429, -25996, -31250, -9853, 19948, 32737, 17606,
+ -12539, -31990, -24158, 4277, 29066},
+ /* cos_table_long_18_04[18] */
+ {12540, 30274, 30274, 12540, -12539, -30273, -30273, -12539, 12540, 30274, 30274, 12540,
+ -12539, -30273, -30273, -12539, 12540, 30274},
+ /* cos_table_long_18_05[18] */
+ {-9852, -25996, -32736, -27635, -12539, 7092, 24159, 32488, 29066, 15131, -4276, -22137,
+ -31990, -30273, -17605, 1429, 19948, 31251},
+ /* cos_table_long_18_06[18] */
+ {7092, 19948, 29066, 32737, 30274, 22138, 9854, -4276, -17605, -27635, -32487, -31250, -24158,
+ -12539, 1429, 15131, 25997, 31991},
+ /* cos_table_long_18_07[18] */
+ {-4276, -12539, -19947, -25996, -30273, -32487, -32487, -30273, -25996, -19947, -12539, -4276,
+ 4277, 12540, 19948, 25997, 30274, 32488},
+ /* cos_table_long_18_08[18] */
+ {1429, 4277, 7092, 9854, 12540, 15131, 17606, 19948, 22138, 24159, 25997, 27636, 29066, 30274,
+ 31251, 31991, 32488, 32737},
+ /* cos_table_long_18_09[18] */
+ {-24158, -19947, 27636, 15131, -30273, -9853, 31991, 4277, -32736, 1429, 32488, -7091, -31250,
+ 12540, 29066, -17605, -25996, 22138},
+ /* cos_table_long_18_10[18] */
+ {25997, 12540, -32487, 4277, 30274, -19947, -19947, 30274, 4277, -32487, 12540, 25997, -25996,
+ -12539, 32488, -4276, -30273, 19948},
+ /* cos_table_long_18_11[18] */
+ {-27635, -4276, 31251, -22137, -12539, 32737, -15130, -19947, 31991, -7091, -25996, 29066,
+ 1429, -30273, 24159, 9854, -32487, 17606},
+ /* cos_table_long_18_12[18] */
+ {29066, -4276, -24158, 31991, -12539, -17605, 32737, -19947, -9853, 31251, -25996, -1428,
+ 27636, -30273, 7092, 22138, -32487, 15131},
+ /* cos_table_long_18_13[18] */
+ {-30273, 12540, 12540, -30273, 30274, -12539, -12539, 30274, -30273, 12540, 12540, -30273,
+ 30274, -12539, -12539, 30274, -30273, 12540},
+ /* cos_table_long_18_14[18] */
+ {31251, -19947, 1429, 17606, -30273, 31991, -22137, 4277, 15131, -29065, 32488, -24158, 7092,
+ 12540, -27635, 32737, -25996, 9854},
+ /* cos_table_long_18_15[18] */
+ {-31990, 25997, -15130, 1429, 12540, -24158, 31251, -32487, 27636, -17605, 4277, 9854, -22137,
+ 30274, -32736, 29066, -19947, 7092},
+ /* cos_table_long_18_16[18] */
+ {32488, -30273, 25997, -19947, 12540, -4276, -4276, 12540, -19947, 25997, -30273, 32488,
+ -32487, 30274, -25996, 19948, -12539, 4277},
+ /* cos_table_long_18_17[18] */
+ {-32736, 32488, -31990, 31251, -30273, 29066, -27635, 25997, -24158, 22138, -19947, 17606,
+ -15130, 12540, -9852, 7092, -4276, 1429},
+
+ /* cos_table_long_16_00[16] */
+ {-22005, -26319, 16846, 29622, -11038, -31785, 4808, 32729, 1608, -32412, -7961, 30853, 14010,
+ -28105, -19519, 24279},
+ /* cos_table_long_16_01[16] */
+ {19520, 30853, -1607, -31785, -16845, 22006, 29622, -4807, -32412, -14009, 24279, 28106,
+ -7961, -32728, -11038, 26320},
+ /* cos_table_long_16_02[16] */
+ {-16845, -32728, -14009, 19520, 32413, 11039, -22005, -31785, -7961, 24279, 30853, 4808,
+ -26319, -29621, -1607, 28106},
+ /* cos_table_long_16_03[16] */
+ {14010, 31786, 26320, 1608, -24278, -32412, -16845, 11039, 30853, 28106, 4808, -22005, -32728,
+ -19519, 7962, 29622},
+ /* cos_table_long_16_04[16] */
+ {-11038, -28105, -32412, -22005, -1607, 19520, 31786, 29622, 14010, -7961, -26319, -32728,
+ -24278, -4807, 16846, 30853},
+ /* cos_table_long_16_05[16] */
+ {7962, 22006, 30853, 32413, 26320, 14010, -1607, -16845, -28105, -32728, -29621, -19519,
+ -4807, 11039, 24279, 31786},
+ /* cos_table_long_16_06[16] */
+ {-4807, -14009, -22005, -28105, -31785, -32728, -30852, -26319, -19519, -11038, -1607, 7962,
+ 16846, 24279, 29622, 32413},
+ /* cos_table_long_16_07[16] */
+ {1608, 4808, 7962, 11039, 14010, 16846, 19520, 22006, 24279, 26320, 28106, 29622, 30853,
+ 31786, 32413, 32729},
+ /* cos_table_long_16_08[16] */
+ {24279, 19520, -28105, -14009, 30853, 7962, -32412, -1607, 32729, -4807, -31785, 11039, 29622,
+ -16845, -26319, 22006},
+ /* cos_table_long_16_09[16] */
+ {-26319, -11038, 32729, -7961, -28105, 24279, 14010, -32412, 4808, 29622, -22005, -16845,
+ 31786, -1607, -30852, 19520},
+ /* cos_table_long_16_10[16] */
+ {28106, 1608, -29621, 26319, 4808, -30852, 24279, 7962, -31785, 22006, 11039, -32412, 19520,
+ 14010, -32728, 16846},
+ /* cos_table_long_16_11[16] */
+ {-29621, 7962, 19520, -32728, 22006, 4808, -28105, 30853, -11038, -16845, 32413, -24278,
+ -1607, 26320, -31785, 14010},
+ /* cos_table_long_16_12[16] */
+ {30853, -16845, -4807, 24280, -32728, 26319, -7961, -14009, 29622, -31785, 19520, 1608,
+ -22005, 32413, -28105, 11039},
+ /* cos_table_long_16_13[16] */
+ {-31785, 24279, -11038, -4807, 19520, -29621, 32729, -28105, 16846, -1607, -14009, 26320,
+ -32412, 30853, -22005, 7962},
+ /* cos_table_long_16_14[16] */
+ {32413, -29621, 24279, -16845, 7962, 1608, -11038, 19520, -26319, 30853, -32728, 31786,
+ -28105, 22006, -14009, 4808},
+ /* cos_table_long_16_15[16] */
+ {-32728, 32413, -31785, 30853, -29621, 28106, -26319, 24279, -22005, 19520, -16845, 14010,
+ -11038, 7962, -4807, 1608},
+
+ /* cos_table_long_15_00[15] */
+ {20622, 29197, -8480, -32722, -5125, 30592, 17847, -23169, -27481, 11743, 32365, 1715, -31650,
+ -14875, 25466},
+ /* cos_table_long_15_01[15] */
+ {-17846, -32364, -8480, 25466, 29197, -1714, -30591, -23169, 11743, 32723, 14876, -20621,
+ -31650, -5125, 27482},
+ /* cos_table_long_15_02[15] */
+ {14876, 32365, 23170, -5125, -29195, -29195, -5125, 23170, 32365, 14876, -14875, -32364,
+ -23169, 5126, 29197},
+ /* cos_table_long_15_03[15] */
+ {-11742, -29195, -31650, -17846, 5126, 25466, 32723, 23170, 1715, -20621, -32364, -27481,
+ -8480, 14876, 30592},
+ /* cos_table_long_15_04[15] */
+ {8481, 23170, 31651, 31651, 23170, 8481, -8480, -23169, -31650, -31650, -23169, -8480, 8481,
+ 23170, 31651},
+ /* cos_table_long_15_05[15] */
+ {-5125, -14875, -23169, -29196, -32364, -32364, -29196, -23169, -14875, -5125, 5126, 14876,
+ 23170, 29197, 32365},
+ /* cos_table_long_15_06[15] */
+ {1715, 5126, 8481, 11743, 14876, 17847, 20622, 23170, 25466, 27482, 29197, 30592, 31651,
+ 32365, 32723},
+ /* cos_table_long_15_07[15] */
+ {-23169, -23169, 23170, 23170, -23169, -23169, 23170, 23170, -23169, -23169, 23170, 23170,
+ -23169, -23169, 23170},
+ /* cos_table_long_15_08[15] */
+ {25466, 14876, -31650, -1714, 32365, -11742, -27481, 23170, 17847, -30591, -5125, 32723,
+ -8480, -29196, 20622},
+ /* cos_table_long_15_09[15] */
+ {-27481, -5125, 31651, -20621, -14875, 32723, -11742, -23169, 30592, -1714, -29195, 25466,
+ 8481, -32364, 17847},
+ /* cos_table_long_15_10[15] */
+ {29196, -5125, -23169, 32365, -14875, -14875, 32365, -23169, -5125, 29197, -29195, 5126,
+ 23170, -32364, 14876},
+ /* cos_table_long_15_11[15] */
+ {-30591, 14876, 8481, -27481, 32365, -20621, -1714, 23170, -32722, 25466, -5125, -17846,
+ 31651, -29196, 11743},
+ /* cos_table_long_15_12[15] */
+ {31651, -23169, 8481, 8481, -23169, 31651, -31650, 23170, -8480, -8480, 23170, -31650, 31651,
+ -23169, 8481},
+ /* cos_table_long_15_13[15] */
+ {-32364, 29196, -23169, 14876, -5125, -5125, 14876, -23169, 29197, -32364, 32365, -29195,
+ 23170, -14875, 5126},
+ /* cos_table_long_15_14[15] */
+ {32723, -32364, 31651, -30591, 29196, -27481, 25466, -23169, 20622, -17846, 14876, -11742,
+ 8481, -5125, 1715},
+
+ /* cos_table_short_4_00[4] */
+ {-18204, -32137, -6392, 27246},
+ /* cos_table_short_4_01[4] */
+ {6393, 18205, 27246, 32138},
+ /* cos_table_short_4_02[4] */
+ {27246, 6393, -32137, 18205},
+ /* cos_table_short_4_03[4] */
+ {-32137, 27246, -18204, 6393},
+
+ /* cos_table_short_3_00[3] */
+ {8481, 23170, 31651},
+ /* cos_table_short_3_01[3] */
+ {-23169, -23169, 23170},
+ /* cos_table_short_3_02[3] */
+ {31651, -23169, 8481},
+
+ /* cos_table_short_2_00[2] */
+ {12540, 30274},
+ /* cos_table_short_2_01[2] */
+ {-30273, 12540}}; /* END OF ia_mps_dec_mdct2qmf_tables_struct */
+
+const ia_mps_dec_m1_m2_tables_struct ixheaacd_mps_dec_m1_m2_tables = {
+ {{/* row_2_channel_stp[7][8] */
+ {0, 1, 2, -1, 3, 4, -1, -1},
+ {0, 3, 1, 4, 2, -1, -1, -1},
+ {0, 2, 1, 3, -1, -1, -1, -1},
+ {0, 4, 2, 1, 5, 3, -1, -1},
+ {0, 4, 2, 1, 5, 3, -1, -1},
+ {0, 2, -1, 1, 3, -1, -1, -1},
+ {-1, 2, 0, -1, 3, 1, -1, -1}},
+ {/* row_2_channel_ges[7][8] */
+ {0, 1, 2, -1, 3, 4, -1, -1},
+ {0, 3, 1, 4, 2, -1, -1, -1},
+ {0, 3, 1, 4, 2, -1, -1, -1},
+ {0, 5, 3, 1, 6, 4, 2, -1},
+ {0, 5, 3, 1, 6, 4, 2, -1},
+ {0, 2, -1, 1, 3, -1, -1, -1},
+ {-1, 2, 0, -1, 3, 1, -1, -1}},
+ {/* row_2_residual[7][8] */
+ {-1, 0, 1, 3, 2, 4},
+ {-1, 0, 1, 3, 4, 2},
+ {-1, -1, -1, 1, 2, 0},
+ {-1, -1, -1, 1, 2, 0, 3, 4},
+ {-1, -1, -1, 1, 2, 0, 3, 4},
+ {-1, -1, -1, -1, -1, -1, 0, 1},
+ {-1, -1, -1, -1, -1, -1, 0, 1}}},
+ {/* hybrid_2_param_28[71] */
+ 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23,
+ 23, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26,
+ 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27},
+ {/* r1_matrix_l[31] */
+ 0, 184, 328, 583, 1036, 1840, 2595, 3654, 5129, 7159, 9880,
+ 12120, 14682, 17486, 20381, 23170, 25658, 27713, 29295, 30444, 31243, 31976,
+ 32364, 32564, 32665, 32716, 32752, 32763, 32766, 32767, 32768},
+ {/* ten_cld_by_10[31] q15 */
+ 0, 1, 3, 10, 33, 104, 207, 413,
+ 823, 1642, 3277, 5193, 8231, 13045, 20675, 32767,
+ 51932, 82307, 130448, 206746, 327670, 653788, 1304478, 2602775,
+ 5193220, 10361835, 32767000, 103618352, 327670000, 1036183521, 0x7FFFFFFF},
+ {/* w00_cld2_15[31] */
+ 0, 184, 328, 583, 1036, 1840, 2595, 3654, 5129, 7158, 9880,
+ 12120, 14682, 17485, 20381, 23170, 25658, 27712, 29294, 30443, 31242, 31976,
+ 32363, 32563, 32664, 32715, 32751, 32762, 32765, 32766, 32767},
+ {/* table_kappa[8] */
+ 0, 6609, 10230, 15121, 17593, 18918, 15288, 2669},
+ {/* dec_pow[31] q15 */
+ 0, 184, 327, 582, 1036, 1842, 2602, 3676,
+ 5193, 7335, 10362, 13045, 16422, 20675, 26028, 32768,
+ 41252, 51933, 65380, 82309, 103621, 146369, 206752, 292045,
+ 412524, 582706, 1036215, 1842680, 3276800, 5827066, 2147483647},
+ {/* cld_tab_1[31] */
+ 0, 1, 3, 10, 32, 103, 205, 407, 802, 1563, 2978,
+ 4482, 6578, 9330, 12676, 16384, 20091, 23437, 26189, 28285, 29789, 31204,
+ 31965, 32360, 32562, 32664, 32735, 32757, 32764, 32766, 32768},
+ {/* cld_tab_2[31] */
+ 2147483647, 5827066, 3276800, 1842680, 1036215, 582706, 412524, 292045,
+ 206752, 146369, 103621, 82309, 65380, 51933, 41252, 32768,
+ 26028, 20675, 16422, 13045, 10362, 7335, 5193, 3676,
+ 2602, 1842, 1036, 582, 327, 184, 0},
+ {/* cld_tab_3[31] */
+ 0, 1, 3, 10, 32, 103, 206, 412,
+ 823, 1642, 3276, 5193, 8230, 13045, 20675, 32768,
+ 51933, 82309, 130451, 206752, 327680, 653807, 1304517, 2602854,
+ 5193378, 10362151, 32768000, 103621512, 327680000, 1036215168, 2147483647},
+ {/* reciprocal[576] q28 */
+ 268435456, 134217728, 89478488, 67108864, 53687092, 44739244, 38347924, 33554432, 29826162,
+ 26843546, 24403224, 22369622, 20648882, 19173962, 17895698, 16777216, 15790321, 14913081,
+ 14128182, 13421773, 12782641, 12201612, 11671107, 11184811, 10737418, 10324441, 9942054,
+ 9586981, 9256395, 8947849, 8659208, 8388608, 8134408, 7895161, 7669585, 7456541,
+ 7255013, 7064091, 6882961, 6710887, 6547206, 6391321, 6242685, 6100806, 5965233,
+ 5835554, 5711393, 5592406, 5478275, 5368709, 5263441, 5162221, 5064820, 4971027,
+ 4880645, 4793491, 4709394, 4628198, 4549754, 4473925, 4400581, 4329604, 4260881,
+ 4194304, 4129776, 4067204, 4006499, 3947580, 3890369, 3834792, 3780781, 3728270,
+ 3677198, 3627506, 3579140, 3532046, 3486175, 3441480, 3397917, 3355443, 3314018,
+ 3273603, 3234162, 3195660, 3158064, 3121343, 3085465, 3050403, 3016129, 2982616,
+ 2949840, 2917777, 2886403, 2855696, 2825637, 2796203, 2767376, 2739137, 2711469,
+ 2684355, 2657777, 2631720, 2606170, 2581110, 2556528, 2532410, 2508743, 2485514,
+ 2462711, 2440322, 2418338, 2396745, 2375535, 2354697, 2334221, 2314099, 2294320,
+ 2274877, 2255760, 2236962, 2218475, 2200291, 2182402, 2164802, 2147484, 2130440,
+ 2113665, 2097152, 2080895, 2064888, 2049126, 2033602, 2018312, 2003250, 1988411,
+ 1973790, 1959383, 1945185, 1931190, 1917396, 1903798, 1890391, 1877171, 1864135,
+ 1851279, 1838599, 1826092, 1813753, 1801580, 1789570, 1777718, 1766023, 1754480,
+ 1743087, 1731842, 1720740, 1709780, 1698959, 1688273, 1677722, 1667301, 1657009,
+ 1646843, 1636802, 1626882, 1617081, 1607398, 1597830, 1588376, 1579032, 1569798,
+ 1560671, 1551650, 1542733, 1533917, 1525202, 1516585, 1508064, 1499639, 1491308,
+ 1483069, 1474920, 1466860, 1458888, 1451003, 1443201, 1435484, 1427848, 1420293,
+ 1412818, 1405421, 1398101, 1390857, 1383688, 1376592, 1369569, 1362617, 1355735,
+ 1348922, 1342177, 1335500, 1328888, 1322342, 1315860, 1309441, 1303085, 1296790,
+ 1290555, 1284380, 1278264, 1272206, 1266205, 1260260, 1254371, 1248537, 1242757,
+ 1237030, 1231355, 1225733, 1220161, 1214640, 1209169, 1203747, 1198373, 1193047,
+ 1187768, 1182535, 1177349, 1172207, 1167111, 1162058, 1157049, 1152084, 1147160,
+ 1142279, 1137438, 1132639, 1127880, 1123161, 1118481, 1113840, 1109237, 1104673,
+ 1100145, 1095655, 1091201, 1086783, 1082401, 1078054, 1073742, 1069464, 1065220,
+ 1061010, 1056833, 1052688, 1048576, 1044496, 1040448, 1036430, 1032444, 1028488,
+ 1024563, 1020667, 1016801, 1012964, 1009156, 1005376, 1001625, 997901, 994205,
+ 990537, 986895, 983280, 979691, 976129, 972592, 969081, 965595, 962134,
+ 958698, 955286, 951899, 948535, 945195, 941879, 938586, 935315, 932068,
+ 928842, 925640, 922459, 919300, 916162, 913046, 909951, 906877, 903823,
+ 900790, 897777, 894785, 891812, 888859, 885926, 883011, 880116, 877240,
+ 874383, 871544, 868723, 865921, 863137, 860370, 857621, 854890, 852176,
+ 849479, 846800, 844137, 841490, 838861, 836248, 833651, 831070, 828505,
+ 825955, 823422, 820904, 818401, 815913, 813441, 810983, 808541, 806113,
+ 803699, 801300, 798915, 796544, 794188, 791845, 789516, 787201, 784899,
+ 782611, 780336, 778074, 775825, 773589, 771366, 769156, 766958, 764773,
+ 762601, 760440, 758292, 756156, 754032, 751920, 749820, 747731, 745654,
+ 743589, 741534, 739492, 737460, 735440, 733430, 731432, 729444, 727467,
+ 725501, 723546, 721601, 719666, 717742, 715828, 713924, 712030, 710147,
+ 708273, 706409, 704555, 702711, 700876, 699051, 697235, 695429, 693632,
+ 691844, 690065, 688296, 686536, 684784, 683042, 681308, 679583, 677867,
+ 676160, 674461, 672771, 671089, 669415, 667750, 666093, 664444, 662804,
+ 661171, 659547, 657930, 656321, 654721, 653128, 651542, 649965, 648395,
+ 646832, 645278, 643730, 642190, 640657, 639132, 637614, 636103, 634599,
+ 633103, 631613, 630130, 628654, 627186, 625724, 624269, 622820, 621378,
+ 619943, 618515, 617093, 615678, 614269, 612866, 611470, 610081, 608697,
+ 607320, 605949, 604584, 603226, 601873, 600527, 599186, 597852, 596523,
+ 595201, 593884, 592573, 591268, 589968, 588674, 587386, 586104, 584827,
+ 583555, 582290, 581029, 579774, 578525, 577281, 576042, 574808, 573580,
+ 572357, 571139, 569927, 568719, 567517, 566320, 565127, 563940, 562758,
+ 561580, 560408, 559241, 558078, 556920, 555767, 554619, 553475, 552336,
+ 551202, 550073, 548948, 547827, 546712, 545601, 544494, 543392, 542294,
+ 541201, 540112, 539027, 537947, 536871, 535799, 534732, 533669, 532610,
+ 531555, 530505, 529459, 528416, 527378, 526344, 525314, 524288, 523266,
+ 522248, 521234, 520224, 519218, 518215, 517217, 516222, 515231, 514244,
+ 513261, 512281, 511306, 510334, 509365, 508401, 507439, 506482, 505528,
+ 504578, 503631, 502688, 501749, 500812, 499880, 498951, 498025, 497103,
+ 496184, 495268, 494356, 493448, 492542, 491640, 490741, 489846, 488953,
+ 488064, 487179, 486296, 485417, 484541, 483668, 482798, 481931, 481067,
+ 480207, 479349, 478495, 477643, 476795, 475949, 475107, 474268, 473431,
+ 472598, 471767, 470939, 470115, 469293, 468474, 467658, 466844, 466034},
+ {/* c_l_table[31] */
+ 0, 184, 328, 583, 1036, 1840, 2595, 3654, 5129, 7159, 9880,
+ 12120, 14682, 17486, 20381, 23170, 25658, 27713, 29295, 30444, 31243, 31976,
+ 32364, 32564, 32665, 32716, 32752, 32763, 32766, 32767, 32767},
+ {/* cos_table[16][31] */
+ {32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768,
+ 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768,
+ 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768},
+ {30704, 30726, 30743, 30773, 30825, 30912, 30989, 31090, 31219, 31378, 31565,
+ 31701, 31842, 31984, 32121, 32248, 32361, 32458, 32538, 32601, 32650, 32700,
+ 32730, 32747, 32757, 32762, 32766, 32767, 32768, 32768, 32768},
+ {27564, 27617, 27658, 27730, 27855, 28066, 28254, 28502, 28821, 29218, 29688,
+ 30033, 30395, 30759, 31112, 31440, 31733, 31983, 32188, 32350, 32473, 32599,
+ 32675, 32718, 32741, 32754, 32763, 32767, 32768, 32768, 32768},
+ {19691, 19808, 19898, 20057, 20334, 20810, 21239, 21815, 22570, 23531, 24703,
+ 25586, 26526, 27489, 28433, 29317, 30105, 30775, 31317, 31738, 32053, 32368,
+ 32551, 32653, 32708, 32737, 32758, 32765, 32767, 32768, 32768},
+ {12047, 12206, 12329, 12546, 12927, 13590, 14197, 15025, 16135, 17586, 19413,
+ 20829, 22370, 23980, 25583, 27097, 28447, 29584, 30491, 31182, 31687, 32178,
+ 32455, 32605, 32684, 32725, 32754, 32764, 32767, 32768, 32768},
+ {0, 184, 328, 583, 1036, 1840, 2595, 3654, 5129, 7159, 9880,
+ 12120, 14682, 17486, 20381, 23170, 25658, 27713, 29295, 30444, 31243, 31976,
+ 32364, 32564, 32665, 32716, 32752, 32763, 32766, 32767, 32768},
+ {-19300, -19179, -19084, -18914, -18604, -18036, -17477, -16651, -15406, -13492, -10479,
+ -7533, -3540, 1699, 8069, 14854, 20913, 25445, 28411, 30209, 31263, 32079,
+ 32446, 32615, 32694, 32732, 32757, 32765, 32767, 32768, 32768},
+ {
+ -32440, -32437, -32434, -32428, -32419, -32400, -32382, -32353, -32306, -32226, -32073,
+ -31875, -31483, -30498, -26581, 2317, 29018, 31884, 32450, 32628, 32699, 32741,
+ 32756, 32763, 32766, 32767, 32768, 32768, 32768, 32768, 32768,
+ },
+ {
+ -32381, -32376, -32373, -32366, -32355, -32333, -32311, -32277, -32222, -32128, -31947,
+ -31715, -31256, -30112, -25701, 2520, 28513, 31737, 32395, 32603, 32687, 32736,
+ 32754, 32762, 32765, 32767, 32768, 32768, 32768, 32768, 32768,
+ },
+ {
+ -23483, -23393, -23322, -23194, -22961, -22530, -22102, -21460, -20474, -18908, -16315,
+ -13613, -9671, -3995, 3628, 12334, 20114, 25547, 28767, 30544, 31512, 32216,
+ 32516, 32650, 32712, 32741, 32760, 32765, 32767, 32768, 32768,
+ },
+ {
+ -17414, -17281, -17177, -16990, -16652, -16032, -15426, -14535, -13204, -11183, -8069,
+ -5095, -1169, 3823, 9712, 15861, 21349, 25536, 28361, 30128, 31191, 32034,
+ 32421, 32602, 32687, 32729, 32756, 32764, 32767, 32768, 32768,
+ },
+ {
+ -14568, -14420, -14303, -14095, -13719, -13034, -12370, -11400, -9970, -7840, -4648,
+ -1698, 2067, 6675, 11918, 17268, 22043, 25769, 28374, 30067, 31121, 31984,
+ 32392, 32586, 32679, 32724, 32754, 32764, 32767, 32768, 32768,
+ },
+ {
+ -12498, -12340, -12216, -11995, -11596, -10873, -10175, -9162, -7682, -5505, -2305,
+ 592, 4211, 8540, 13364, 18224, 22560, 25987, 28434, 30060, 31095, 31960,
+ 32377, 32577, 32674, 32722, 32754, 32764, 32767, 32768, 32768,
+ },
+ {
+ -11093, -10929, -10801, -10573, -10161, -9416, -8699, -7663, -6158, -3964, -777,
+ 2070, 5582, 9725, 14285, 18845, 22913, 26152, 28493, 30071, 31087, 31949,
+ 32369, 32572, 32672, 32720, 32753, 32763, 32767, 32768, 32768,
+ },
+ {
+ -10279, -10112, -9982, -9749, -9331, -8575, -7849, -6802, -5286, -3086, 88,
+ 2902, 6348, 10384, 14799, 19195, 23118, 26253, 28533, 30082, 31086, 31944,
+ 32365, 32570, 32670, 32720, 32753, 32763, 32767, 32768, 32768,
+ },
+ {
+ -10012, -9845, -9714, -9480, -9060, -8300, -7571, -6521, -5002, -2801, 367,
+ 3170, 6595, 10597, 14964, 19309, 23185, 26287, 28547, 30086, 31087, 31942,
+ 32364, 32569, 32670, 32719, 32753, 32763, 32767, 32768, 32768,
+ }},
+ {/* sin_table[8][31] */
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ },
+ {
+ 11447, 11387, 11340, 11259, 11117, 10872, 10650, 10351, 9955, 9442, 8798,
+ 8294, 7734, 7126, 6481, 5816, 5148, 4496, 3876, 3302, 2782, 2114,
+ 1578, 1161, 846, 611, 352, 200, 113, 64, 0,
+ },
+ {
+ 17719, 17636, 17571, 17458, 17258, 16912, 16596, 16166, 15591, 14835, 13870,
+ 13105, 12244, 11298, 10287, 9234, 8171, 7129, 6137, 5217, 4386, 3321,
+ 2471, 1814, 1318, 951, 546, 310, 176, 99, 0,
+ },
+ {
+ 26192, 26103, 26034, 25912, 25695, 25312, 24953, 24451, 23756, 22804, 21529,
+ 20471, 19238, 17836, 16289, 14637, 12938, 11254, 9642, 8150, 6808, 5105,
+ 3765, 2743, 1982, 1423, 813, 461, 260, 147, 0,
+ },
+ {
+ 30473, 30410, 30360, 30271, 30110, 29817, 29533, 29120, 28520, 27649, 26399,
+ 25296, 23944, 22332, 20475, 18425, 16264, 14090, 12001, 10071, 8348, 6190,
+ 4520, 3267, 2346, 1677, 952, 538, 304, 171, 0,
+ },
+ {
+ 32768, 32767, 32766, 32763, 32752, 32716, 32665, 32564, 32364, 31976, 31243,
+ 30444, 29295, 27713, 25658, 23170, 20381, 17486, 14682, 12120, 9880, 7159,
+ 5129, 3654, 2595, 1840, 1036, 583, 328, 184, 0,
+ },
+ {
+ 26481, 26569, 26637, 26758, 26974, 27358, 27718, 28222, 28920, 29862, 31047,
+ 31890, 32576, 32724, 31759, 29208, 25227, 20647, 16327, 12696, 9818, 6685,
+ 4584, 3167, 2202, 1538, 853, 476, 266, 149, 0,
+ },
+ {
+ 4622, 4648, 4669, 4705, 4772, 4895, 5017, 5199, 5481, 5934, 6715,
+ 7597, 9086, 11983, 19163, 32686, 15222, 7561, 4554, 3024, 2123, 1328,
+ 869, 583, 398, 275, 151, 84, 47, 26, 0,
+ }}}; /* END OF ia_mps_dec_m1_m2_tables_struct */
+
+const ia_mps_dec_decorr_tables_struct ixheaacd_mps_dec_decorr_tables = {
+ { /* rev_table */
+ {/* rev_delay[4][10] */
+ {8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
+ {7, 7, 7, 7, 7, 7, 7, 7, 7, 7},
+ {2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}},
+ /* rev_split_freq_0[4] */
+ {3, 15, 24, 65},
+ /* rev_split_freq_1[4] */
+ {3, 50, 65, 65},
+ /* rev_split_freq_2[4] */
+ {0, 15, 65, 65}},
+ {/* lattice_coeff_0[10][20] */
+ {8110, 14854, -721, -10099, -184, 12432, -11331, 12465, -10682, 16043,
+ -7497, 11629, 6354, -4591, 1265, -13287, -9988, -8176, 1288, 8058},
+ {12950, -13910, -940, 14139, 2363, -3795, 2241, -416, -8408, 6344,
+ -13153, -8369, -1937, 11085, -6200, -2395, 6891, 14742, -11911, -6236},
+ {-3093, -6822, -3280, -14320, -13615, 12472, -4846, -14818, 13379, 2005,
+ 15988, 5390, -5426, 5669, 655, -8588, 11459, -7471, 10286, -10476},
+ {2366, 6049, -13756, 2913, -8625, -8723, -8985, -15342, 9227, 10155,
+ -7468, 2831, 891, -6691, 7556, 400, -7569, -8657, -12966, -11367},
+ {-11282, -14428, 7268, -4787, -3090, -3437, -4548, 14585, -2585, 15548,
+ -4660, -2907, 2025, 5685, 5069, 780, -3444, -3559, 15594, -4122},
+ {2169, -4335, -11393, -12544, -2497, 10335, -14241, -8978, 12124, -3916,
+ 557, 12809, -14038, -1488, -8897, -16158, 3775, 10115, -12445, -11236},
+ {-15480, 11128, 5679, -12829, 9162, 9552, -79, -5695, 9434, 2943,
+ 9378, -7576, 14333, -14831, 12429, 8710, 15670, -5983, 5400, 6747},
+ {5168, 12943, 14877, 9817, -16381, 12904, 6187, 15637, 12085, -1642,
+ -15797, 242, 1645, -7468, -13622, 5289, 4378, 9352, 11459, 10266},
+ {-5177, -6344, -4778, -9231, -10040, 3244, 15611, -8235, 14035, -12101,
+ 8575, 12016, 5492, 4961, 246, -3192, 531, -3660, -13481, 11426},
+ {865, 7376, 15113, -6272, -11954, 7887, 1638, 10122, 10106, -15381,
+ 11793, -14248, -13045, 13582, -6134, 5941, -5476, -10197, 3195, -13189}},
+ {/* lattice_coeff_1[10][15] */
+ {9696, -12373, -11407, 10066, 13058, 11521, 5531, -4610, -49, 1681, 8736, -9739, -6380,
+ 15594, -6622},
+ {1376, -4994, 11167, 16030, 5823, -1304, -1278, -2317, -12586, 15073, 5790, 8575, 2323,
+ -5659, 2654},
+ {13281, 7124, -15263, 1579, 1697, 2363, -12757, -1897, 2969, -14818, -10751, 6213, -2081, 39,
+ 2107},
+ {12796, 3251, -5400, 6370, -2051, 12812, -13110, 10125, 2949, -3775, -10020, -15283, -12875,
+ -9293, -8962},
+ {-8592, 7700, 5780, -9899, 5774, 9568, 15758, -3939, -9159, -6187, 6111, 197, 11534, -3634,
+ -9660},
+ {-15817, 7006, -8592, -15994, 15539, 12272, 4165, 15784, -7111, -197, 5993, -5482, -154,
+ 12979, -14257},
+ {-12724, 1042, -9418, -1776, -9028, -6613, 15286, 13897, 14887, 11620, 2048, 682, -475, 8821,
+ -7943},
+ {-10519, -14595, 5675, 5089, -9067, 1769, -5990, 8015, 4771, 3827, -11692, 8172, -8962,
+ 12855, 918},
+ {-12970, -6629, 8929, -3883, 11213, -8192, 3883, 11993, -3418, -16024, -1153, -9670, -3831,
+ -6013, 15643},
+ {1602, 15018, 14483, 3660, -9136, -7540, -6331, -15099, 770, -11600, 14267, -331, 4361,
+ 12737, -16161}},
+ {/* lattice_coeff_2[10][6] */
+ {-5741, 5420, -2454, -6603, 826, -151},
+ {16289, -6898, -13556, -6062, 7278, 12629},
+ {15185, 11541, 13314, 14909, -14762, -14841},
+ {10093, 10335, 3205, 2372, 3480, 12583},
+ {-4797, -5043, 3903, -9916, 8392, 12167},
+ {5725, 8788, -7678, 16246, -15509, 13949},
+ {-16187, 3467, -9067, -3156, -14382, 3362},
+ {986, -1101, -1511, 15906, 10053, -15152},
+ {4037, -1655, 2697, 6111, 4755, 15670},
+ {-9470, 6619, 13471, -13690, -8235, 15801}},
+ {/* lattice_coeff_3[10][3] */
+ {4450, -1222, 1170},
+ {-14510, -7491, -15368},
+ {13242, -6698, 15204},
+ {-14379, 12465, -15699},
+ {9844, 7782, 14418},
+ {14202, 10882, -5259},
+ {-4951, 832, -5243},
+ {-12255, 4083, 8087},
+ {-16194, -9958, 15663},
+ {12504, -12783, -14529}},
+ {/* den_coef_0 q14 */
+ {16384, -2677, 11144, -8152, -2917, 537, -2150, -1288, 5735, -6796, 8752,
+ -2647, 2786, 5973, -3923, 1093, -8123, -5322, -1199, -53, 4029},
+
+ {16384, 2448, -15662, 1190, 16636, -5357, -10438, 4364, 1939, -4316, 5345,
+ -3394, -11208, 3891, 13793, -7985, -9467, 8668, 8686, -6206, -3118},
+
+ {16384, -6990, -772, 3794, -12779, 2933, 4793, -14032, 6966, -2876, -4518,
+ 14259, -6262, 1196, 5414, -6895, 2755, 3281, -4283, 6852, -5238},
+
+ {16384, 5512, 4926, -2017, -4276, -2849, -5766, -6567, -5863, -627, 3326,
+ 1558, 5098, 5629, 1356, 5286, 2457, -3334, -6056, -7615, -5684},
+
+ {16384, -8857, -4068, 3305, -3044, 5892, -5781, -2649, 2947, -264, 5595,
+ 540, -3428, -2919, 4814, -107, 2970, -3338, -4532, 8788, -2061},
+
+ {16384, 1190, -10978, 2490, -3098, -2264, 12235, -9936, -7287, 12175, -7420,
+ -1698, 15077, -5154, -3386, -94, -7800, 3804, 7900, -5899, -5618},
+
+ {16384, -17384, 12468, -751, 3681, -7469, 10649, 3130, -5704, 2373, 6351,
+ 5340, -12595, 16555, -7389, 5115, -5671, 12027, -3051, -994, 3373},
+
+ {16384, 13384, 10432, 5829, 3526, -7134, 3086, -115, -1605, -4068, -1825,
+ -7607, -653, -1349, -4475, -4514, 6441, 8150, 10624, 9360, 5133},
+
+ {16384, -5813, 362, -1267, -8112, -2160, 4043, 1620, -3873, 8207, -12183,
+ 5524, 1972, 1327, 4976, 2631, -3570, -50, 42, -7948, 5713},
+
+ {16384, -7682, 2829, 12031, -22053, 12224, 2498, -12336, 26658, -10308, -9897,
+ 18060, -22112, 2326, 9035, -12851, 12792, -5163, -5946, 4431, -6595}},
+ {/* den_coef_1 q14 */
+ {16384, 5086, -12829, -8464, 6791, 10492, 2538, -4199, -3432, 5908, 6533, -3531, -8738, 3267,
+ 6451, -3311},
+
+ {16384, 3356, -2917, 2732, 4176, 1387, 1216, 2488, -1363, -3535, 5979, 3249, 5099, 268,
+ -2539, 1327},
+
+ {16384, 6526, -2521, -4879, 6157, 850, -4836, -3599, 2838, -2512, -8878, -3331, 2352, -1190,
+ 439, 1053},
+
+ {16384, 10349, 9342, 1987, 4461, 1128, 3510, -5025, 2031, -153, -2101, -6694, -10307, -10414,
+ -7129, -4481},
+
+ {16384, -3388, -2228, -58, -2878, 2872, 5455, 6756, -2217, -5804, -3514, 3112, -905, 6255,
+ -660, -4830},
+
+ {16384, -12573, 2440, 7208, -21776, 11349, 9605, -15665, 18521, -4353, -12453, 14610, -4744,
+ -4245, 10731, -7129},
+
+ {16384, 1438, 3894, -4945, -4577, -5649, -8998, 1275, 2533, 7551, 5513, 831, 2478, -516,
+ 3803, -3971},
+
+ {16384, -9557, -4016, 1148, 3067, -2322, 4368, -9160, 4040, 2668, 1543, -3710, 3583, -7718,
+ 6155, 459},
+
+ {16384, -8302, -3137, 3782, -3003, 1583, -2785, -119, 6186, -659, -3700, -576, -718, -1954,
+ -6285, 7822},
+
+ {16384, 2798, 10568, 5005, -7412, -7699, -13818, -6523, -6133, 5936, 1861, 11433, 1574,
+ -2064, 3440, -8081}},
+ {/* den_coef_2 q14 */
+ {16384, -3386, 2367, -451, -3395, 428, -75},
+
+ {16384, 9840, -7195, -12936, -3631, 6891, 6314},
+
+ {16384, 15624, 8696, 3216, -3613, -12943, -7420},
+
+ {16384, 8053, 7214, 3850, 4439, 4576, 6291},
+
+ {16384, -2632, -3365, 2966, -6169, 2640, 6083},
+
+ {16384, -6449, 9825, -7212, 10563, -9094, 6975},
+
+ {16384, -9038, 5639, -5838, 2923, -8043, 1681},
+
+ {16384, 251, -4704, -415, 8460, 3836, -7576},
+
+ {16384, 3680, 1058, 2332, 3098, 3594, 7835},
+
+ {16384, -7410, -4018, 12455, -5813, -6733, 7900}},
+ {/* den_coef_3 q14 */
+ {16384, 2120, -535, 585},
+
+ {16384, -3840, -1121, -7684},
+
+ {16384, 3714, -905, 7602},
+
+ {16384, -12910, 10987, -7850},
+
+ {16384, 7803, 6571, 7209},
+
+ {16384, 8586, 3923, -2630},
+
+ {16384, -2605, 822, -2621},
+
+ {16384, -6387, 341, 4044},
+
+ {16384, -8016, -7673, 7832},
+
+ {16384, 6647, -8082, -7265}},
+ {/* lattice_delta_phi[10][20] */
+ {58687, 14277, 37483, 30019, 55054, 47071, 28194, 1144, 50735, 27466,
+ 38014, 48916, 56938, 45597, 10889, 25058, 57780, 56633, 25339, 55198},
+ {3575, 21794, 50227, 609, 8579, 12524, 12275, 37293, 16813, 12281,
+ 944, 46128, 27492, 57554, 28783, 25857, 52268, 32437, 12517, 41514},
+ {51767, 1212, 42081, 23439, 51377, 31058, 43821, 26490, 18815, 11715,
+ 11947, 42140, 18701, 33456, 9319, 43106, 23370, 53120, 52727, 36661},
+ {30671, 55575, 50748, 39833, 50522, 40780, 21122, 17895, 21073, 32988,
+ 44912, 19104, 51790, 35088, 22879, 43404, 33761, 27479, 42900, 38375},
+ {49093, 59100, 32280, 54362, 10682, 60516, 16767, 15584, 54090, 45541,
+ 8431, 727, 55214, 12301, 18452, 40855, 17567, 28983, 4001, 61047},
+ {35996, 26159, 31841, 20627, 26739, 13956, 35812, 46966, 32725, 39564,
+ 12914, 23459, 48382, 42054, 28479, 35072, 49057, 3657, 37238, 3106},
+ {25657, 18838, 54005, 927, 47435, 59965, 61155, 48726, 27096, 30779,
+ 13215, 39748, 19769, 59300, 44882, 25444, 45990, 16551, 27171, 57652},
+ {42208, 13130, 51836, 38837, 8264, 12793, 37503, 38905, 22882, 35524,
+ 27882, 2710, 1678, 19313, 793, 23717, 42192, 5734, 2182, 37824},
+ {37588, 973, 1009, 11741, 36251, 3555, 22702, 39004, 44325, 42785,
+ 5194, 28063, 27289, 21820, 9486, 41733, 43188, 44935, 29547, 34272},
+ {7478, 27843, 44217, 55149, 16869, 15735, 53464, 14352, 49712, 56109,
+ 14323, 14782, 3074, 4843, 39580, 11790, 52124, 10741, 10548, 61414}
+
+ }}; /* END OF ia_mps_dec_decorr_tables_struct */
+
+const ia_mps_dec_tp_process_tables_struct ixheaacd_mps_dec_tp_process_tables = {
+ {/* WORD32 bp[25] */
+ 0, 536871, 9878425, 63028645, 277025391, 793709956, 1051300620,
+ 1072990205, 1073741824, 1073741824, 1073741824, 1073741824, 1073634450, 1072023837,
+ 1063863399, 1034979744, 961213681, 827962321, 657881616, 494887607, 364105853,
+ 267683837, 198427489, 148927991, 113065014},
+ {/* WORD32 bpxgf[25] */
+ 0, 0, 0, 0, 0, 0, 11, 869, 3876,
+ 9030, 17180, 29034, 42613, 60301, 78683, 101438, 118431, 129369,
+ 130793, 123544, 116663, 110310, 106802, 105375, 106563},
+ {/* WORD32 bp2xgf2[25] */
+ 0, 0, 0, 0, 0, 0, 14,
+ 94422, 1878124, 10192994, 36893488, 105371488, 226978688, 454531424,
+ 773883456, 1286217856, 1753241984, 2092045696, 2138365312, 1907882112, 1701286528,
+ 1521032576, 1425823104, 1387998976, 1419449728},
+ {/* ia_mps_dec_qmf_64_640 */
+
+ -593273, -603195, -531235, -523473, -525466, -541242, -561198,
+ -586968, -609649, -630386, -658498, -677798, -702262, -727749,
+ -745350, -768556, -779004, -798965, -804296, -824781, -829449,
+ -841205, -835357, -837912, -837674, -833006, -819350, -808527,
+ -785910, -774746, -742807, -714082, -680923, -638459, -597491,
+ -552501, -494600, -439710, -375935, -311061, -225307, -155303,
+ -66285, 14490, 117508, 219367, 316703, 432346, 548401,
+ 669947, 800799, 924324, 1061499, 1207976, 1350540, 1492769,
+ 1658203, 1811196, 1970130, 2130426, 2304420, 2471459, 2644155,
+ 2813392, -14250510, 15451646, 16686544, 17966354, 19266512, 20602146,
+ 21961434, 23350400, 24769094, 26216586, 27689208, 29190684, 30716766,
+ 32266228, 33824760, 35407076, 37003392, 38622232, 40245224, 41881696,
+ 43524036, 45166852, 46825616, 48478200, 50126888, 51772148, 53406388,
+ 55035300, 56653920, 58245424, 59826064, 61376848, 62912216, 64407060,
+ 65869248, 67308344, 68688968, 70034496, 71335920, 72593104, 73770768,
+ 74907480, 75981056, 76987576, 77919576, 78771872, 79564664, 80257104,
+ 80867504, 81390528, 81818320, 82140408, 82366040, 82482056, 82488072,
+ 82378000, 82146696, 81792104, 81315088, 80699888, 79957728, 79070992,
+ 78036832, 76861272, 75541288, -387791520, 399839488, 411924960, 424043392,
+ 436188032, 448362048, 460540736, 472720608, 484901440, 497068160, 509217024,
+ 521328832, 533403616, 545441280, 557404608, 569323776, 581168512, 592925760,
+ 604601408, 616169344, 627645376, 638996992, 650234816, 661329408, 672295808,
+ 683112384, 693773568, 704268992, 714590208, 724739584, 734692096, 744455552,
+ 754023232, 763367104, 772499520, 781410112, 790081984, 798523328, 806716992,
+ 814656576, 822343936, 829764160, 836905280, 843784256, 850375168, 856681280,
+ 862696320, 868409664, 873831616, 878940992, 883734592, 888228800, 892390976,
+ 896245568, 899765312, 902967616, 905834176, 908366080, 910566976, 912444864,
+ 913965952, 915155200, 916011392, 916516032, 916694784, 387791520, -375800416,
+ -363861344, -351984768, -340191360, -328468224, -316830784, -305287808, -293843840,
+ -282507200, -271278752, -260169456, -249182288, -238333392, -227604912, -217030080,
+ -206584352, -196298528, -186166240, -176196608, -166387792, -156741232, -147269248,
+ -137976128, -128857392, -119918376, -111167664, -102599616, -94225952, -86046760,
+ -78054944, -70266720, -62674884, -55276676, -48082892, -41100320, -34309408,
+ -27726944, -21349652, -15170772, -9203229, -3445304, 2122315, 7477201,
+ 12629763, 17577288, 22333516, 26876570, 31226990, 35388804, 39343844,
+ 43106256, 46682944, 50068936, 53255304, 56274144, 59105196, 61756552,
+ 64227648, 66529340, 68659864, 70619000, 72426576, 74052112, 75541288,
+ 14250510, -13083544, -11952416, -10860922, -9805983, -8783018, -7797064,
+ -6849645, -5941788, -5070487, -4230663, -3428863, -2665749, -1936973,
+ -1242119, -586722, 29640, 626234, 1170628, 1694867, 2176923,
+ 2631584, 3054447, 3445840, 3801180, 4129225, 4429361, 4703189,
+ 4943457, 5165715, 5351495, 5517130, 5660311, 5780916, 5879142,
+ 5948998, 6004056, 6041528, 6054744, 6061830, 6036645, 6006299,
+ 5956659, 5892270, 5819334, 5741478, 5632975, 5519822, 5410909,
+ 5276110, 5146719, 5004330, 4854371, 4695550, 4538091, 4382987,
+ 4209866, 4037690, 3866358, 3695698, 3515389, 3342066, 3164257,
+ 2992568, 2813392, 0
+
+ },
+
+ {/* time_out_idx_5xxx */
+ 0, 4, 1, 5, 2, 3},
+ { /* time_out_idx_7xxx */
+ 0, 6, 4, 1, 7, 5, 2, 3}}; /* END OF ia_mps_dec_tp_process_tables_struct */
+
+const ia_mps_dec_wf_tables_struct ixheaacd_mps_dec_wf_tables = {
+ {/* wf_02[02] */
+ 241763088, 1047220608},
+ {/* wf_03[03] */
+ 405508672, 994288128, 1073741824},
+ {/* wf_04[04] */
+ 74786520, 495910976, 952295808, 1072442752},
+ {/* wf_15[15] */
+ 33378420, 82512488, 161958320, 271833312, 405508672, 550893760, 693520960, 820157440,
+ 921652736, 994288128, 1039588224, 1063000768, 1071959744, 1073777408, 1073741824},
+ {/* wf_16[16] */
+ 17767756, 49954848, 106257792, 189948048, 299393344, 427811456, 564606912, 697780672,
+ 816546368, 913347264, 984834112, 1031783360, 1058213184, 1070029568, 1073496768, 1073778048},
+ {/* wf_18[18] */
+ 16564868, 43063124, 87930072, 154132432, 241763088, 347599968, 465479488, 587373440,
+ 704843840, 810472832, 898935168, 967540544, 1016242176, 1047220608, 1064192000, 1071578112,
+ 1073653504, 1073771776},
+ {/* wf_24[24] */
+ 14317799, 31203742, 57523900, 95005720, 144655552, 206523232,
+ 279593792, 361828608, 450350208, 541736896, 632377216, 718827712,
+ 798123008, 868004096, 927046656, 974691008, 1011186368, 1037469120,
+ 1054995264, 1065546944, 1071026944, 1073256768, 1073790592, 1073759872},
+ {/* wf_30[30] */
+ 13067639, 25239604, 43063124, 67534224, 99414240, 139133360,
+ 186719680, 241763088, 303418944, 370451168, 441309952, 514235072,
+ 587373440, 658898880, 727122624, 790586112, 848129856, 898935168,
+ 942540224, 978831680, 1008016576, 1030578048, 1047220608, 1058807040,
+ 1066291840, 1070653760, 1072829696, 1073653504, 1073802496, 1073753728},
+ {/* wf_32[32] */
+ 12766251, 23875188, 39863096, 61569988, 89667248, 124584992, 166455168,
+ 215076864, 269907904, 330083936, 394462912, 461690592, 530280480, 598700672,
+ 665459648, 729184768, 788687296, 843011328, 891463872, 933627840, 969357504,
+ 998760960, 1022170432, 1040104512, 1053224448, 1062286912, 1068094656, 1071448256,
+ 1073099136, 1073706624, 1073800704, 1073752448}}; /* END OF ia_mps_dec_wf_tables_struct */
+
+const ia_mps_dec_mdct2qmf_table_struct ixheaacd_mps_dec_mdct2qmf_table = {
+ {/* twi_post_cos[64] */
+ 13, -38, 63, -88, 113, -138, 163, -187, 212, -237, 261, -285, 309,
+ -333, 357, -380, 403, -426, 449, -472, 494, -516, 537, -558, 579, -600,
+ 620, -640, 659, -678, 697, -715, 733, -750, 767, -784, 799, -815, 830,
+ -844, 858, -872, 885, -897, 909, -920, 931, -941, 951, -960, 968, -976,
+ 983, -990, 996, -1002, 1007, -1011, 1015, -1018, 1020, -1022, 1023, -1024
+
+ },
+ {/* twi_post_sin[64] */
+
+ 1024, -1023, 1022, -1020, 1018, -1015, 1011, -1007, 1002, -996, 990, -983, 976,
+ -968, 960, -951, 941, -931, 920, -909, 897, -885, 872, -858, 844, -830,
+ 815, -799, 784, -767, 750, -733, 715, -697, 678, -659, 640, -620, 600,
+ -579, 558, -537, 516, -494, 472, -449, 426, -403, 380, -357, 333, -309,
+ 285, -261, 237, -212, 187, -163, 138, -113, 88, -63, 38, -13},
+ {/* hybrid_2_qmf[71] */
+ 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63},
+ {/* local_sin_4 */
+ 6393, 18205, 27246, 32138},
+ {/* local_sin_15 */
+ 0, 3425, 6813, 10126, 13328, 16384, 19261, 21926, 24351, 26510, 28378, 29935, 31164, 32052,
+ 32588, 32768},
+ {/* local_sin_16 */
+ 1608, 4808, 7962, 11039, 14010, 16846, 19520, 22006, 24279, 26320, 28106, 29622, 30853,
+ 31786, 32413, 32729},
+ {/* local_sin_18 */
+ 1429, 4277, 7092, 9854, 12540, 15131, 17606, 19948, 22138, 24159, 25997, 27636, 29066, 30274,
+ 31251, 31991, 32488, 32737},
+ {/* local_sin_24 */
+ 1072, 3212, 5338, 7441, 9512, 11543, 13524, 15447, 17304, 19087, 20788, 22400,
+ 23916, 25330, 26635, 27827, 28899, 29847, 30668, 31357, 31912, 32330, 32610, 32750},
+ {/* local_sin_30 */
+ 858, 2571, 4277, 5971, 7650, 9307, 10938, 12540, 14107, 15636,
+ 17121, 18560, 19948, 21281, 22556, 23769, 24917, 25997, 27005, 27939,
+ 28797, 29576, 30274, 30888, 31419, 31863, 32219, 32488, 32667, 32757},
+ {/* local_sin_32 */
+ 804, 2411, 4011, 5602, 7180, 8740, 10279, 11793, 13279, 14733, 16151,
+ 17531, 18868, 20160, 21403, 22595, 23732, 24812, 25833, 26791, 27684, 28511,
+ 29269, 29957, 30572, 31114, 31581, 31972, 32286, 32522, 32679, 32758}
+
+}; /* END OF ia_mps_dec_mdct2qmf_table_struct */
+
+const ia_mps_dec_tonality_tables_struct ixheaacd_mps_dec_tonality_tables = {
+ {/* gmax_fix[72] */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5},
+ {/* dwin_fix[72] */
+ 32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 327680, 360448,
+ 393216, 425984, 458752, 491520, 524288, 278528, 294912, 311296, 327680, 344064, 360448,
+ 376832, 393216, 409600, 425984, 442368, 458752, 475136, 491520, 507904, 524288, 360448,
+ 371371, 382293, 393216, 404139, 415061, 425984, 436907, 447829, 458752, 469675, 480597,
+ 491520, 502443, 513365, 524288, 401408, 409600, 417792, 425984, 434176, 442368, 450560,
+ 458752, 466944, 475136, 483328, 491520, 499712, 507904, 516096, 524288, 425984, 432538,
+ 439091, 445645, 452198, 458752, 465306, 471859},
+ {/* nstart_fix[5][72] */
+ {
+
+ -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, -7, -7,
+ -6, -6, -5, -5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, -5, -5, -4, -4,
+ -4, -3, -3, -3, -2, -2, -2, -1, -1, -1, 0, 0, -4, -3, -3, -3, -3, -2,
+ -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, -3, -3, -3, -2, -2, -2, -2, -2},
+ {
+
+ -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 7, 7, 8,
+ 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 9, 9, 10, 10, 11, 11,
+ 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 10, 10, 11, 11, 12, 12, 12, 13},
+ {
+
+ -13, -10, -7, -4, -1, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 10, 11,
+ 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 21, 22, 22, 23, 24, 25,
+ 25, 26, 27, 28, 28, 29, 30, 31, 31, 32, 23, 24, 24, 25, 25, 26, 27, 27},
+ {
+
+ -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 18, 20,
+ 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 28, 29, 31, 32,
+ 33, 35, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 36, 37, 38, 38, 39, 40, 41, 42},
+ {
+
+ -11, -6, -1, 4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 27, 29,
+ 32, 34, 37, 39, 42, 44, 47, 49, 52, 54, 57, 59, 62, 64, 39, 41, 42, 44,
+ 46, 47, 49, 51, 52, 54, 56, 57, 59, 61, 62, 64, 45, 47, 48, 49, 50, 52,
+ 53, 54, 55, 57, 58, 59, 60, 62, 63, 64, 49, 50, 51, 52, 53, 54, 55, 56}},
+ {/* dfrac_fix[5][56] */
+ {16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0,
+ 16384, 0, 16384, 0, 0, -10923, 10923, 0, -10923, 10923, 0, -10923,
+ 10923, 0, -10923, 10923, 0, -10923, 10923, 0, -8192, 16384, 8192, 0,
+ -8192, 16384, 8192, 0, -8192, 16384, 8192, 0, -8192, 16384, 8192, 0,
+ 0, -6554, -13107, 13107, 6554, 0, -6554, -13107},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10923, -10923, 0, 10923, -10923, 0, 10923,
+ -10923, 0, 10923, -10923, 0, 10923, -10923, 0, 16384, 0, 16384, 0,
+ 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0,
+ 0, -13107, 6554, -6554, 13107, 0, -13107, 6554},
+ {16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0,
+ 16384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 8192, 16384, -8192, 0, 8192, 16384, -8192, 0, 8192, 16384,
+ -8192, 0, 8192, 16384, -8192, 0, 0, 13107, -6554, 6554, -13107, 0, 13107, -6554},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -10923, 10923, 0, -10923, 10923, 0, -10923, 10923, 0, -10923, 10923,
+ 0, -10923, 10923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6554, 13107, -13107, -6554, 0, 6554, 13107},
+ {16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0, 16384, 0,
+ 16384, 0, 16384, 0, 0, 10923, -10923, 0, 10923, -10923, 0, 10923,
+ -10923, 0, 10923, -10923, 0, 10923, -10923, 0, -8192, 16384, 8192, 0,
+ -8192, 16384, 8192, 0, -8192, 16384, 8192, 0, -8192, 16384, 8192, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0}
+
+ },
+ {/* part4[4] */
+ 65536, 131072, 557056, 1343488},
+ {/* part5[5] */
+ 32768, 65536, 196608, 458752, 1343488},
+ {/* part7[7] */
+ 32768, 32768, 65536, 131072, 196608, 294912, 1343488},
+ {/* part10[10] */
+ 16384, 16384, 32768, 32768, 65536, 65536, 65536, 163840, 294912, 1343488},
+ {/* part14[14] */
+ 16384, 16384, 16384, 16384, 32768, 32768, 65536, 65536, 98304, 98304, 131072, 163840, 393216,
+ 950272},
+ {/* part20[20] */
+ 8192, 8192, 8192, 8192, 16384, 16384, 16384, 16384, 32768, 32768,
+ 32768, 32768, 32768, 32768, 65536, 98304, 131072, 163840, 393216, 950272},
+ {/* part28[28] */
+ 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 16384, 16384,
+ 16384, 16384, 32768, 32768, 32768, 32768, 65536, 65536, 65536, 65536,
+ 65536, 65536, 98304, 98304, 131072, 163840, 196608, 753664},
+ {/* part40[40] */
+ 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 8192, 8192,
+ 8192, 8192, 8192, 8192, 8192, 8192, 16384, 16384, 16384, 16384,
+ 16384, 16384, 16384, 16384, 32768, 32768, 32768, 32768, 32768, 65536,
+ 65536, 65536, 65536, 98304, 98304, 131072, 163840, 196608, 229376, 524288},
+ {/* w_real[16] */
+ 1073741824, 1053109888, 992008576, 892784128, 759250368, 596538752, 410902752, 209476288, 0,
+ -209476288, -410902752, -596538752, -759250368, -892784128, -992008576, -1053109888},
+ {/* w_imag[16] */
+ 0, -209476288, -410902752, -596538752, -759250368, -892784128, -992008576, -1053109888,
+ -1073741824, -1053109888, -992008576, -892784128, -759250368, -596538752, -410902752,
+ -209476288},
+ {/* bitrev[16] */
+ 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}
+
+}; /* END OF ia_mps_dec_tonality_tables_struct */
+
+const ia_mps_dec_bitdec_tables_struct ixheaacd_mps_dec_bitdec_tables = {
+ { /* kernel_table */
+ {/* kernels_4_to_71[71] */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
+ {/* kernels_5_to_71[71] */
+ 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {/* kernels_7_to_71[71] */
+ 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6},
+ {/* kernels_10_to_71[71] */
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9},
+ {/* kernels_14_to_71[71] */
+ 0, 0, 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 8,
+ 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13},
+ {/* kernels_20_to_71[71] */
+ 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14,
+ 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19},
+ {/* kernels_28_to_71[71] */
+ 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23,
+ 23, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26,
+ 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27},
+ {/* bb_env_kernels[71] */
+ 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14,
+ 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19}},
+ { /* map_table */
+ {/* mapping_4_to_28[28] */
+ 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3},
+ {/* mapping_5_to_28[28] */
+ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4},
+ {/* mapping_7_to_28[28] */
+ 0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6},
+ {/* mapping_10_to_28[28] */
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9},
+ {/* mapping_14_to_28[28] */
+ 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8,
+ 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13},
+ {/* mapping_20_to_28[28] */
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19}
+
+ },
+
+ {/* tree_property_table[7] */
+ {1, 6, 5, 0, {0, 0, 0, 0, 1}},
+ {1, 6, 5, 0, {0, 0, 1, 0, 0}},
+ {2, 6, 3, 1, {1, 0, 0, 0, 0}},
+ {2, 8, 5, 1, {1, 0, 0, 0, 0}},
+ {2, 8, 5, 1, {1, 0, 0, 0, 0}},
+ {6, 8, 2, 0, {0, 0, 0, 0, 0}},
+ {6, 8, 2, 0, {0, 0, 0, 0, 0}}},
+
+ {/* sampling_freq_table[13] */
+ 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350},
+ {/* freq_res_table[8] */
+ 0, 28, 20, 14, 10, 7, 5, 4},
+ {/* temp_shape_chan_table[2][7] */
+ {5, 5, 4, 6, 6, 4, 4},
+ {5, 5, 5, 7, 7, 4, 4}},
+ {/* surround_gain_table[5] */
+ 32768, 38968, 46341, 55109, 65536},
+ {/* lfe_gain_table[5] */
+ 32768, 103621, 327680, 1036215, 3276800},
+ {/* clip_gain_table[8] */
+ 32768, 38968, 46341, 55109, 65536, 77936, 92682, 131072},
+ {/* pb_stride_table[4] */
+ 1, 2, 5, 28},
+ {/* smg_time_table[4] */
+ 64, 128, 256, 512},
+ {/* dequant_cld[31] */
+ -4915200, -1474560, -1310720, -1146880, -983040, -819200, -720896, -622592,
+ -524288, -425984, -327680, -262144, -196608, -131072, -65536, 0,
+ 65536, 131072, 196608, 262144, 327680, 425984, 524288, 622592,
+ 720896, 819200, 983040, 1146880, 1310720, 1474560, 4915200},
+ {/* dequant_cld_coarse[15] */
+ -4915200, -1146880, -819200, -622592, -425984, -262144, -131072, 0, 131072, 262144, 425984,
+ 622592, 819200, 1146880, 4915200},
+ {/* dequant_cpc[52] */
+ -65536, -62259, -58982, -55705, -52428, -49152, -45875, -42598, -39321, -36044, -32768,
+ -29491, -26214, -22937, -19660, -16384, -13107, -9830, -6553, -3276, 0, 3276,
+ 6553, 9830, 13107, 16384, 19660, 22937, 26214, 29491, 32768, 36044, 39321,
+ 42598, 45875, 49152, 52428, 55705, 58982, 62259, 65536, 68812, 72089, 75366,
+ 78643, 81920, 85196, 88473, 91750, 95027, 98304},
+ {/* dequant_cpc_coarse[26] */
+ -65536, -58982, -52428, -45875, -39321, -32768, -26214, -19660, -13107,
+ -6553, 0, 6553, 13107, 19660, 26214, 32768, 39321, 45875,
+ 52428, 58982, 65536, 72089, 78643, 85196, 91750, 98304},
+ {/* dequant_icc[8] */
+ 32768, 30704, 27564, 19691, 12047, 0, -19300, -32440},
+ {/* factor_cld_tab_1[31] */
+ -4915200, -1474564, -1310734, -1146925, -983182, -819649, -721791, -624372,
+ -527818, -432943, -341243, -283080, -228498, -178762, -135149, -98641,
+ -69613, -47690, -31890, -20936, -13563, -6959, -3530, -1780,
+ -895, -449, -142, -44, -14, -4, 0},
+ {/* hrtf_power[64] */
+ 5193, 5827, 6538, 7336, 8231, 9235, 10362, 11627, 13045, 14637,
+ 16423, 18427, 20675, 23198, 26029, 29205, 32768, 36766, 41252, 46286,
+ 51934, 58271, 65381, 73358, 82309, 92353, 103622, 116265, 130452, 146369,
+ 164229, 184268, 206752, 231980, 260285, 292045, 327680, 367663, 412525, 462860,
+ 519338, 582707, 653808, 733584, 823095, 923528, 1036215, 1162652, 1304518, 1463693,
+ 1642291, 1842680, 2067521, 2319797, 2602855, 2920452, 3276800, 3676630, 4125246, 4628604,
+ 5193379, 5827066, 6538075, 7335840},
+ {/* envshape_data[2][5] */
+ {16384, 23170, 32768, 46341, 65536},
+ {16384, 20643, 26008, 32768, 41285}},
+ {/* pcm_chnksz_level_3[5] */
+ 2, 4, 5, 7, 8},
+
+ /* pcm_chnksz_level_4 */
+ 2,
+ {/* pcm_chnksz_level_7[6] */
+ 3, 6, 9, 12, 15, 17},
+ /* pcm_chnksz_level_8 */
+ 3,
+ {/* pcm_chnksz_level_11[2] */
+ 4, 7},
+ {/* pcm_chnksz_level_13[4] */
+ 4, 8, 12, 15},
+ /* pcm_chnksz_level_15 */
+ 4,
+ {/* pcm_chnksz_level_19[4] */
+ 5, 9, 13, 17},
+ {/* pcm_chnksz_level_25[3] */
+ 5, 10, 14},
+ /* pcm_chnksz_level_26 */
+ 5,
+ /* pcm_chnksz_level_31 */
+ 5,
+ { /* pcm_chnksz_level_51[4] */
+ 6, 12, 18, 23}}; /* END OF ia_mps_dec_bitdec_tables_struct */
+
+const ia_mps_dec_blind_tables_struct ixheaacd_mps_dec_blind_tables = {
+ {{/* blind_cld_mesh[31][21] */
+ {-9, -9, -7, -3, -2, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 1},
+ {-10, -8, -6, -3, -2, -1, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 7},
+ {-10, -6, -5, -2, -1, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 9},
+ {-7, -5, -4, -2, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 7, 10},
+ {-8, -5, -3, 0, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 10},
+ {-10, -4, -4, 1, 2, 2, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 10},
+ {1, 1, 1, 2, 3, 2, 2, 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 9, 11},
+ {3, 3, 2, 4, 2, 2, 3, 3, 4, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 9, 11},
+ {4, 4, 4, 1, 3, 2, 3, 4, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 11},
+ {5, 5, 5, 3, 2, 3, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10},
+ {5, 5, 4, 4, 5, 3, 3, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 11},
+ {5, 5, 5, 5, 6, 5, 4, 5, 5, 7, 7, 8, 8, 8, 8, 9, 8, 8, 8, 10, 11},
+ {5, 5, 5, 5, 5, 4, 4, 6, 6, 7, 8, 9, 8, 8, 8, 8, 8, 9, 9, 10, 11},
+ {5, 5, 5, 5, 5, 4, 4, 6, 6, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 11},
+ {5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 8, 8, 10, 10, 9, 9, 10, 10, 10, 11, 11},
+ {5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 9, 9, 9, 10, 10, 10, 9, 9, 10, 11, 11},
+ {5, 5, 5, 5, 5, 5, 6, 7, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11},
+ {5, 5, 5, 5, 5, 5, 6, 7, 7, 8, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11},
+ {5, 5, 5, 5, 5, 6, 6, 6, 6, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11},
+ {5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11},
+ {5, 5, 5, 5, 6, 6, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11},
+ {5, 5, 5, 6, 6, 6, 7, 7, 7, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11},
+ {5, 5, 5, 6, 6, 6, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {5, 5, 6, 6, 6, 7, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {6, 6, 6, 6, 6, 7, 7, 8, 9, 9, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {6, 6, 6, 6, 7, 7, 8, 8, 9, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {6, 6, 6, 6, 7, 7, 8, 9, 10, 10, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {6, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10},
+ {6, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10},
+ {9, 9, 8, 7, 8, 8, 10, 10, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10},
+ {11, 11, 8, 7, 8, 8, 10, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10}},
+ {/* blind_icc_mesh[31][21] */
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {5, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 2, 2, 4, 3, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {2, 2, 2, 3, 2, 3, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {2, 2, 2, 3, 3, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4},
+ {2, 2, 3, 3, 3, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4},
+ {2, 2, 3, 3, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 2, 2, 2, 3, 3, 2, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5},
+ {3, 3, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 5, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 2, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
+ {4, 5, 3, 3, 3, 3, 4, 5, 5, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}},
+ {/* blind_cpc_1_mesh[31][21] */
+ {8, 9, 8, 7, 7, 6, 6, 6, 6, 6, 5, 4, 4, 3, 3, 2, 1, 0, -1, -1, -5},
+ {10, 9, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1},
+ {9, 9, 8, 8, 7, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 2, 2, 2, 0},
+ {9, 7, 6, 6, 7, 7, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 2},
+ {8, 6, 7, 7, 6, 7, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 3, 3, 3, 3, 3},
+ {10, 7, 8, 7, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 5, 4, 4, 3, 3, 4, 4},
+ {7, 7, 7, 6, 7, 7, 7, 8, 7, 7, 7, 6, 6, 6, 5, 4, 4, 4, 4, 5, 4},
+ {6, 6, 8, 6, 8, 8, 8, 8, 8, 7, 7, 8, 7, 7, 6, 5, 5, 4, 5, 5, 4},
+ {4, 4, 5, 9, 8, 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 4, 5, 5, 4},
+ {3, 3, 7, 6, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 5, 5, 5, 5, 5, 5, 5},
+ {2, 2, 5, 7, 8, 10, 9, 9, 8, 8, 8, 8, 8, 7, 7, 6, 5, 5, 5, 5, 5},
+ {4, 4, 5, 7, 7, 9, 9, 9, 8, 9, 8, 9, 8, 8, 7, 7, 6, 7, 6, 5, 6},
+ {5, 5, 6, 7, 8, 9, 10, 8, 9, 9, 9, 9, 7, 7, 7, 6, 6, 6, 6, 5, 6},
+ {6, 6, 6, 7, 8, 9, 10, 9, 9, 9, 8, 9, 8, 8, 9, 7, 7, 6, 6, 6, 7},
+ {6, 6, 7, 8, 8, 9, 9, 9, 9, 9, 9, 8, 9, 8, 8, 9, 8, 8, 5, 7, 7},
+ {7, 7, 7, 8, 9, 9, 9, 10, 9, 9, 10, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7},
+ {7, 7, 7, 8, 9, 9, 10, 10, 10, 9, 10, 9, 8, 8, 8, 8, 9, 8, 8, 8, 8},
+ {7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 9, 10, 9, 7, 8, 8, 8, 8, 8, 8, 8},
+ {8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 9, 9, 8, 8, 8, 8, 8, 9, 9, 8},
+ {8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 9, 8, 8},
+ {8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 9, 8, 8, 8, 8, 8, 8, 8},
+ {8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 9, 9, 8, 8, 8, 8, 8, 8},
+ {8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 8},
+ {9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8},
+ {9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8},
+ {9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8},
+ {9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8},
+ {9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9},
+ {9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9},
+ {10, 10, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9},
+ {10, 10, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9}},
+ {/* blind_cpc_2_mesh[31][21] */
+ {8, 9, 8, 7, 7, 6, 6, 6, 6, 6, 5, 4, 4, 3, 3, 2, 1, 0, -1, -1, -5},
+ {7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 0, 0, 0, 0, 0},
+ {10, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 0, -3},
+ {7, 3, 5, 5, 5, 5, 4, 5, 5, 4, 4, 4, 3, 3, 2, 2, 2, 2, 1, 0, -2},
+ {2, 0, 3, 4, 5, 4, 4, 3, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, -5},
+ {0, 2, 2, 3, 2, 4, 3, 1, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 1, 0, -6},
+ {1, 1, 1, 1, 2, 2, 1, 1, 0, 0, -1, 0, 0, 1, 2, 2, 2, 1, 0, -2, -8},
+ {0, 0, 0, -2, -2, 1, 2, 0, 0, -1, -1, -2, -3, -3, -1, 0, 0, 0, -2, -5, -5},
+ {2, 2, 5, 3, -1, -1, 0, 0, 0, -1, -2, -2, -1, -1, -3, -2, -3, -1, -1, -3, -5},
+ {1, 1, 5, 4, 3, 0, -1, 1, 0, -1, -1, -2, -1, 0, 0, 0, 1, 0, 0, -3, -3},
+ {1, 1, 3, 4, 5, 2, -1, -1, 1, 2, 1, 0, 0, 0, 1, 1, 0, 1, -1, -2, -5},
+ {2, 2, 3, 4, 4, 1, -1, 2, 3, 3, 2, 1, 1, 0, 2, -1, 0, 3, -1, -3, -5},
+ {3, 3, 3, 3, 3, 2, 2, 3, 4, 1, 2, 1, 3, -1, 1, 3, -2, -4, 1, -3, -5},
+ {3, 3, 3, 3, 3, 2, 2, 0, 3, 3, 1, 1, -3, 0, -1, -1, -1, 1, 0, -3, -5},
+ {3, 3, 3, 3, 3, 2, 2, 2, 0, 7, 2, 3, 0, -3, -4, -4, -4, -6, -5, -6, -5},
+ {3, 3, 3, 3, 2, 2, 2, 3, 4, 5, 3, 3, 1, -1, -3, -6, 0, -2, -5, -6, -7},
+ {3, 3, 3, 3, 2, 2, 3, 3, 2, 6, 3, 2, 2, 0, -2, -3, -1, -4, -4, -6, -6},
+ {3, 3, 3, 3, 2, 3, 3, 3, 3, 0, 0, 0, 1, 3, 0, -2, -2, -3, -6, -7, -6},
+ {3, 3, 3, 3, 3, 3, 3, 3, 3, 0, -2, 0, 1, 1, 1, -1, -2, -3, -5, -9, -6},
+ {3, 3, 3, 3, 3, 3, 3, 2, 1, -1, 2, 0, 1, 1, 0, 0, -2, -3, -5, -6, -6},
+ {3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, -1, -3, -4, -6, -6},
+ {3, 3, 3, 3, 3, 2, 2, 2, 4, 1, 1, 1, 1, 1, 0, 0, -1, -2, -4, -5, -5},
+ {3, 3, 3, 3, 3, 2, 2, 3, 2, 2, 1, 1, 1, 1, 0, 0, -1, -2, -3, -4, -4},
+ {3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, -1, -2, -3, -3, -3},
+ {3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 4, 2, 1, 1, 0, 0, -1, -2, -2, -3, -3},
+ {3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 0, -1, -1, -2, -2, -2},
+ {3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 0, 0, -1, -2, -2, -2},
+ {3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 0, 0, -1, -1, -2, -2},
+ {3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1},
+ {5, 5, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1},
+ {8, 8, 4, 2, 2, 2, 2, 3, 3, 4, -3, 3, -1, 1, 1, 1, 0, 0, -1, -1, -1}}},
+ {/* exp_1[13] */
+ 32762, 32762, 32759, 32757, 32756, 32751, 32745, 32743, 32734, 32723, 32719, 32700, 32694},
+ {/* exp_2[13] */
+ 32757, 32756, 32751, 32745, 32743, 32734, 32723, 32719, 32700, 32677, 32669, 32632, 32620},
+ {/* exp_4[13] */
+ 32745, 32743, 32734, 32723, 32719, 32700, 32677, 32669, 32632, 32586, 32570, 32496, 32472},
+ {/* exp_8[13] */
+ 32723, 32719, 32700, 32677, 32669, 32632, 32586, 32570, 32496, 32406, 32374, 32226, 32179},
+ {/* exp_16[13] */
+ 32677, 32669, 32632, 32586, 32570, 32496, 32406, 32374, 32226, 32048, 31985, 31694, 31600},
+ {/* exp_32[13] */
+ 32586, 32570, 32496, 32406, 32374, 32226, 32048, 31985, 31694, 31344, 31221, 30655, 30474},
+ {/* exp_64[13] */
+ 32406, 32374, 32226, 32048, 31985, 31694, 31344, 31221, 30655, 29981, 29746, 28678, 28342},
+ {/* exp_128[13] */
+ 32048, 31985, 31694, 31344, 31221, 30655, 29981, 29746, 28678, 27431, 27003, 25098,
+ 24513}}; /* END OF ia_mps_dec_blind_tables_struct */
+
+const ia_huff_cpc_nodes_struct ixheaacd_huff_cpc_nodes =
+ {
+ /* ia_huff_cpc_nodes_struct huff_cpc_nodes */
+ {{{{2, 1}, {-1, -2}, {-3, 3}, {-4, 4}, {6, 5}, {-5, 7}, {-6, 8},
+ {-7, 9}, {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13}, {-12, 14}, {-13, 15},
+ {-14, 16}, {-15, 17}, {-16, 18}, {-17, 19}, {-18, 20}, {-19, 21}, {-20, 22},
+ {-21, 23}, {-22, -26}, {-23, 24}, {-24, -25}}},
+ {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, 7},
+ {9, 8}, {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13}, {15, 14}, {-12, -14},
+ {-13, 16}, {-15, 17}, {-16, 18}, {-17, 19}, {-18, 20}, {-19, 21}, {-20, 22},
+ {-26, 23}, {-21, -22}, {-23, 24}, {-24, -25}}},
+ {{{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}, {-7, 7},
+ {9, 8}, {-8, 10}, {-9, 11}, {-10, 12}, {-11, 13}, {15, 14}, {-12, -14},
+ {-13, 16}, {-15, 17}, {-16, 18}, {-17, 19}, {-18, 20}, {-19, 21}, {-20, 22},
+ {-26, 23}, {-21, -22}, {-23, 24}, {-24, -25}}}},
+ {{{{{2, 1},
+ {-1, -52},
+ {4, 3},
+ {-2, 5},
+ {-51, 6},
+ {-18, 7},
+ {-17, 8},
+ {10, 9},
+ {-3, -36},
+ {-19, -50},
+ {-35, 11},
+ {-34, 12},
+ {-4, 13},
+ {-33, 14},
+ {-20, -49}},
+ {{2, 1}, {4, 3}, {-103, 5}, {-1, 6}, {8, 7}, {-2, 9}, {-102, 10},
+ {-18, 11}, {13, 12}, {-17, 14}, {-87, 15}, {-19, 16}, {18, 17}, {-86, -101},
+ {-3, 19}, {21, 20}, {23, 22}, {-34, -85}, {-20, 24}, {-35, 25}, {-100, 26},
+ {28, 27}, {-4, 29}, {-33, 30}, {-70, -71}, {-84, 31}, {-36, 32}, {-21, 33},
+ {-69, 34}, {-99, 35}, {-5, 36}, {-50, 37}, {-51, 38}, {-83, 39}, {-37, -68},
+ {-22, -52}, {-98, 40}, {-6, -49}, {-54, -55}, {-53, 41}, {-7, 42}, {-66, 43},
+ {-67, 44}, {-39, -65}, {-38, 45}, {-82, 46}, {-81, 47}, {-23, -97}},
+ {{2, 1}, {4, 3}, {6, 5}, {-154, 7}, {9, 8}, {11, 10},
+ {-1, 12}, {14, 13}, {-2, -153}, {-18, 15}, {17, 16}, {19, 18},
+ {-17, 20}, {-138, 21}, {23, 22}, {-19, 24}, {-137, 25}, {-152, 26},
+ {-3, 27}, {29, 28}, {31, 30}, {-34, 32}, {34, 33}, {-136, 35},
+ {-20, 36}, {-35, 37}, {-151, 38}, {40, 39}, {-122, 41}, {-4, -33},
+ {-121, 42}, {44, 43}, {-36, 45}, {-135, 46}, {48, 47}, {-120, 49},
+ {-21, 50}, {52, 51}, {-150, 53}, {55, 54}, {-50, -51}, {-5, 56},
+ {58, 57}, {-37, -119}, {-52, 59}, {-134, 60}, {-38, 61}, {-103, 62},
+ {-22, -118}, {-53, 63}, {-133, 64}, {-23, 65}, {-106, -149}, {-105, 66},
+ {-104, 67}, {-49, -148}, {69, 68}, {-6, 70}, {-68, 71}, {73, 72},
+ {-117, 74}, {-39, -54}, {-69, 75}, {-102, -132}, {-66, 76}, {-24, -67},
+ {78, 77}, {-147, 79}, {-7, -88}, {-86, 80}, {-87, -90}, {-55, -101},
+ {-116, 81}, {-8, -89}, {-40, -70}, {-65, -131}, {-25, 82}, {-83, 83},
+ {-84, -146}, {-85, 84}, {-82, 85}, {-9, 86}, {-73, 87}, {-72, 88},
+ {-71, -74}, {-81, 89}, {-10, 90}, {-98, -99}, {-100, 91}, {93, 92},
+ {-57, -58}, {-56, 94}, {-97, -115}, {-114, 95}, {-42, 96}, {-41, -113},
+ {-130, 97}, {-26, 98}, {-129, -145}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {-205, 9}, {11, 10},
+ {13, 12}, {-1, 14}, {16, 15}, {-204, 17}, {-18, 18}, {-2, 19},
+ {21, 20}, {23, 22}, {-189, 24}, {-17, 25}, {27, 26}, {-19, 28},
+ {-188, 29}, {-203, 30}, {32, 31}, {-3, 33}, {35, 34}, {-34, 36},
+ {38, 37}, {40, 39}, {-187, 41}, {-35, 42}, {-20, 43}, {45, 44},
+ {-202, 46}, {-173, 47}, {49, 48}, {51, 50}, {-172, 52}, {54, 53},
+ {-4, -33}, {-36, 55}, {-186, 56}, {-171, 57}, {59, 58}, {-21, 60},
+ {62, 61}, {-201, 63}, {65, 64}, {-50, 66}, {-51, 67}, {69, 68},
+ {-52, 70}, {72, 71}, {-37, -170}, {74, 73}, {-185, 75}, {-5, 76},
+ {78, 77}, {-22, 79}, {-157, 80}, {82, 81}, {-156, 83}, {85, 84},
+ {-155, 86}, {-200, 87}, {89, 88}, {-154, 90}, {-53, 91}, {-49, 92},
+ {-169, 93}, {-38, 94}, {96, 95}, {98, 97}, {-184, 99}, {-6, 100},
+ {-66, 101}, {-86, 102}, {-23, -67}, {-69, 103}, {-68, 104}, {106, 105},
+ {108, 107}, {-199, 109}, {-54, 110}, {-153, 111}, {-56, -136}, {-71, 112},
+ {-151, -168}, {-166, 113}, {-41, 114}, {-39, -137}, {-181, 115}, {-138, -141},
+ {-183, 116}, {-139, 117}, {-140, 118}, {-24, 119}, {-7, 120}, {-26, -120},
+ {-121, 121}, {-70, 122}, {-152, 123}, {-65, 124}, {-196, 125}, {-55, -198},
+ {-87, 126}, {-135, 127}, {-150, -167}, {-72, 128}, {-40, -82}, {-57, -84},
+ {-85, 129}, {-83, -182}, {-165, 130}, {-42, 131}, {-27, -103}, {-8, 132},
+ {-25, -180}, {-102, 133}, {-195, -197}, {-101, 134}, {-119, -124}, {-123, 135},
+ {-125, 136}, {-73, -122}, {-88, 137}, {-58, -149}, {-43, -134}, {-28, -179},
+ {-164, 138}, {-11, -194}, {-81, 139}, {-9, -106}, {-99, -105}, {-100, -104},
+ {-98, 140}, {-12, 141}, {143, 142}, {-10, -107}, {-116, 144}, {-109, 145},
+ {-117, -118}, {-108, 146}, {-13, 147}, {-97, 148}, {-90, 149}, {-91, -114},
+ {-89, 150}, {-115, 151}, {-93, 152}, {-131, 153}, {-92, -133}, {-132, 154},
+ {-113, 155}, {-74, 156}, {158, 157}, {-76, -130}, {-75, 159}, {-129, 160},
+ {-77, -148}, {-147, 161}, {-61, -146}, {163, 162}, {-59, -60}, {-163, 164},
+ {-44, -162}, {-145, 165}, {-45, 166}, {-161, -178}, {-29, 167}, {-177, 0}}},
+ {{{2, 1},
+ {-1, -52},
+ {-17, 3},
+ {5, 4},
+ {-36, 6},
+ {-18, 7},
+ {-2, 8},
+ {-33, 9},
+ {-20, 10},
+ {-34, -51},
+ {-35, 11},
+ {-49, 12},
+ {-19, 13},
+ {-3, 14},
+ {-4, -50}},
+ {{2, 1}, {4, 3}, {-103, 5}, {-1, 6}, {-17, 7}, {-87, 8}, {10, 9},
+ {-18, 11}, {13, 12}, {-2, -33}, {-71, 14}, {16, 15}, {-34, 17}, {-102, 18},
+ {-86, 19}, {-55, 20}, {-49, -50}, {22, 21}, {24, 23}, {-70, 25}, {-19, 26},
+ {-39, 27}, {-65, -66}, {-35, 28}, {30, 29}, {-54, 31}, {-3, 32}, {-51, 33},
+ {-85, -101}, {-23, -81}, {-82, 34}, {-38, 35}, {-69, 36}, {-67, 37}, {-20, -53},
+ {-36, 38}, {-97, 39}, {-52, 40}, {-4, -100}, {-84, 41}, {-68, 42}, {-21, 43},
+ {-37, 44}, {-5, 45}, {-83, -99}, {-22, 46}, {-98, 47}, {-6, -7}},
+ {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {-1, 8}, {-17, 9},
+ {-138, 10}, {12, 11}, {14, 13}, {-18, 15}, {17, 16}, {-122, 18},
+ {-33, 19}, {21, 20}, {-2, -34}, {23, 22}, {-153, 24}, {-106, 25},
+ {-137, 26}, {28, 27}, {-49, 29}, {-50, 30}, {32, 31}, {-121, 33},
+ {-90, 34}, {36, 35}, {-19, -66}, {38, 37}, {-65, 39}, {41, 40},
+ {-35, 42}, {-105, 43}, {45, 44}, {-51, -74}, {-82, 46}, {-3, 47},
+ {49, 48}, {-81, -152}, {-58, 50}, {-89, -98}, {-136, 51}, {53, 52},
+ {-73, 54}, {-67, -120}, {56, 55}, {-83, 57}, {-97, 58}, {-104, 59},
+ {-42, 60}, {-88, 61}, {-114, 62}, {-20, 63}, {-57, -113}, {-36, 64},
+ {-99, 65}, {-52, -68}, {67, 66}, {-72, 68}, {-130, 69}, {-26, 70},
+ {-41, -103}, {-4, -151}, {-135, 71}, {-84, -129}, {-119, 72}, {-115, 73},
+ {-56, 74}, {-87, 75}, {-53, -145}, {-100, 76}, {-21, 77}, {-37, 78},
+ {-69, -71}, {-118, 79}, {81, 80}, {-85, -150}, {-5, -102}, {-134, 82},
+ {-86, 83}, {-38, 84}, {-22, 85}, {-54, 86}, {-133, 87}, {-70, 88},
+ {-149, 89}, {-6, -117}, {-101, 90}, {-23, 91}, {-39, 92}, {-55, -148},
+ {-132, 93}, {-116, 94}, {-7, 95}, {-24, -40}, {-147, 96}, {-8, -131},
+ {-25, 97}, {-9, 98}, {-10, -146}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {-205, 9}, {-1, 10},
+ {-17, 11}, {13, 12}, {-189, 14}, {16, 15}, {-18, 17}, {19, 18},
+ {-173, 20}, {22, 21}, {-33, 23}, {-34, 24}, {-2, 25}, {27, 26},
+ {-204, 28}, {-157, 29}, {31, 30}, {-188, 32}, {-49, -50}, {34, 33},
+ {36, 35}, {-172, 37}, {-141, 38}, {40, 39}, {42, 41}, {-65, -66},
+ {44, 43}, {-19, 45}, {47, 46}, {-156, 48}, {-35, 49}, {51, 50},
+ {-125, 52}, {54, 53}, {-82, 55}, {-81, 56}, {-51, 57}, {59, 58},
+ {-140, 60}, {-3, 61}, {-203, 62}, {64, 63}, {-109, -187}, {66, 65},
+ {-98, 67}, {-67, 68}, {-171, 69}, {-97, 70}, {72, 71}, {-124, 73},
+ {75, 74}, {-93, 76}, {-155, 77}, {79, 78}, {-61, -83}, {-114, 80},
+ {82, 81}, {84, 83}, {-113, -146}, {-20, 85}, {-36, -108}, {-76, 86},
+ {88, 87}, {-77, -139}, {-52, 89}, {-99, 90}, {-131, 91}, {-130, 92},
+ {-45, 93}, {95, 94}, {-91, -129}, {-68, 96}, {-92, -161}, {-123, 97},
+ {-162, 98}, {-202, 99}, {-170, 100}, {-60, 101}, {-116, 102}, {-4, -145},
+ {-115, -186}, {104, 103}, {-107, -154}, {-84, 105}, {-29, -147}, {107, 106},
+ {-106, 108}, {-75, -177}, {-178, 109}, {111, 110}, {-132, -138}, {-100, 112},
+ {-21, 113}, {-37, 114}, {-44, -101}, {-193, 115}, {-90, 116}, {-53, -69},
+ {-122, -163}, {118, 117}, {-121, 119}, {-59, -117}, {-148, 120}, {-201, 121},
+ {-85, -185}, {123, 122}, {-74, 124}, {-153, -169}, {-5, 125}, {-86, -105},
+ {127, 126}, {-133, -137}, {129, 128}, {-22, -136}, {-102, 130}, {-38, 131},
+ {-54, 132}, {-89, -120}, {-118, 133}, {-70, -71}, {135, 134}, {-104, 136},
+ {-168, -200}, {-6, 137}, {-152, -184}, {-87, 138}, {140, 139}, {-103, 141},
+ {-39, 142}, {-135, 143}, {-151, 144}, {-55, 145}, {-23, 146}, {-119, 147},
+ {-56, -72}, {-88, 148}, {-167, -183}, {-7, -199}, {150, 149}, {-166, 151},
+ {-24, -150}, {-40, 152}, {154, 153}, {-134, 155}, {-41, 156}, {-198, 157},
+ {-57, -182}, {-8, 158}, {-73, -197}, {-9, -181}, {-165, 159}, {-149, 160},
+ {-25, 161}, {-26, -180}, {-164, 162}, {-58, 163}, {-42, -196}, {165, 164},
+ {-10, -195}, {-27, -43}, {-179, 166}, {-28, -194}, {-11, 167}, {-12, -13}}}},
+ {{{{-1, 1},
+ {-52, 2},
+ {4, 3},
+ {-17, 5},
+ {-2, 6},
+ {-18, -36},
+ {8, 7},
+ {-51, 9},
+ {11, 10},
+ {-33, -34},
+ {-20, -35},
+ {-19, 12},
+ {-3, 13},
+ {-49, 14},
+ {-4, -50}},
+ {{2, 1}, {-103, 3}, {-1, 4}, {6, 5}, {-17, 7}, {9, 8}, {-2, -87},
+ {-18, 10}, {12, 11}, {-102, 13}, {15, 14}, {-34, 16}, {-33, -86}, {18, 17},
+ {-71, 19}, {21, 20}, {-19, 22}, {-70, 23}, {-35, 24}, {-50, 25}, {-3, 26},
+ {-55, 27}, {-85, -101}, {-49, 28}, {30, 29}, {-51, 31}, {-69, 32}, {-54, 33},
+ {-20, 34}, {-66, 35}, {-36, 36}, {-39, 37}, {-65, 38}, {-52, -53}, {-67, 39},
+ {-4, 40}, {-84, -100}, {-38, -68}, {-82, 41}, {-81, 42}, {-21, -23}, {-37, 43},
+ {-5, 44}, {-83, -97}, {-99, 45}, {-22, 46}, {-6, 47}, {-7, -98}},
+ {{2, 1}, {-154, 3}, {5, 4}, {-1, 6}, {8, 7}, {-17, 9},
+ {-18, 10}, {-138, 11}, {-2, 12}, {14, 13}, {-153, 15}, {17, 16},
+ {-34, 18}, {-137, 19}, {21, 20}, {-33, -122}, {23, 22}, {-19, 24},
+ {26, 25}, {28, 27}, {-121, 29}, {-35, 30}, {32, 31}, {-50, 33},
+ {-3, 34}, {-152, 35}, {-106, 36}, {-136, 37}, {-49, 38}, {40, 39},
+ {-120, 41}, {-51, 42}, {44, 43}, {-105, 45}, {47, 46}, {49, 48},
+ {-66, 50}, {-20, 51}, {-36, 52}, {54, 53}, {-68, -90}, {56, 55},
+ {-103, 57}, {-52, -104}, {-65, -88}, {-67, 58}, {60, 59}, {62, 61},
+ {-4, -89}, {-83, -151}, {64, 63}, {-53, -135}, {-119, 65}, {-82, 66},
+ {-73, -87}, {-74, 67}, {-69, -98}, {-84, 68}, {-58, 69}, {-81, 70},
+ {72, 71}, {-72, 73}, {-21, 74}, {-37, 75}, {-102, -118}, {-85, 76},
+ {-86, -99}, {-57, 77}, {-71, 78}, {-150, 79}, {-97, 80}, {-100, -114},
+ {-54, 81}, {-5, -134}, {-38, 82}, {-56, -70}, {-42, 83}, {-113, 84},
+ {-115, 85}, {-130, 86}, {-41, -101}, {-22, -133}, {-117, 87}, {-129, 88},
+ {-26, 89}, {-39, 90}, {-23, -149}, {-6, 91}, {-55, 92}, {-132, 93},
+ {-145, -148}, {-116, 94}, {-24, -40}, {-7, 95}, {-147, 96}, {-8, -131},
+ {-25, 97}, {-146, 98}, {-9, -10}},
+ {{2, 1}, {4, 3}, {-205, 5}, {-1, 6}, {8, 7}, {10, 9},
+ {-17, 11}, {-18, 12}, {-2, -189}, {14, 13}, {-204, 15}, {17, 16},
+ {19, 18}, {-34, 20}, {-188, 21}, {23, 22}, {-33, -173}, {25, 24},
+ {-19, 26}, {28, 27}, {30, 29}, {32, 31}, {-35, -172}, {34, 33},
+ {36, 35}, {-3, -50}, {38, 37}, {-203, 39}, {-187, 40}, {-157, 41},
+ {-49, 42}, {44, 43}, {-171, 45}, {-51, 46}, {48, 47}, {-156, 49},
+ {51, 50}, {53, 52}, {-20, 54}, {-66, 55}, {-36, 56}, {58, 57},
+ {60, 59}, {-141, 61}, {-52, 62}, {-155, 63}, {65, 64}, {-67, 66},
+ {68, 67}, {-65, 69}, {71, 70}, {-140, 72}, {-202, 73}, {-186, 74},
+ {-4, 75}, {-170, 76}, {-82, 77}, {-68, 78}, {80, 79}, {-154, 81},
+ {83, 82}, {85, 84}, {-125, -139}, {87, 86}, {-86, 88}, {-121, 89},
+ {91, 90}, {93, 92}, {-53, 94}, {-37, -101}, {-21, -83}, {96, 95},
+ {-81, -124}, {98, 97}, {100, 99}, {-69, -98}, {102, 101}, {-106, -138},
+ {104, 103}, {-136, 105}, {-109, 106}, {-84, 107}, {109, 108}, {-102, -120},
+ {111, 110}, {-116, 112}, {-105, 113}, {-123, 114}, {-91, 115}, {-99, 116},
+ {-169, -185}, {-97, -153}, {-108, 117}, {-85, -137}, {-131, 118}, {-201, 119},
+ {-87, -114}, {-5, -76}, {-122, 120}, {-104, -117}, {-93, 121}, {-61, -71},
+ {-146, 122}, {-103, 123}, {-100, 124}, {-90, 125}, {-118, 126}, {-115, 127},
+ {-70, -113}, {-132, 128}, {-38, -130}, {-75, 129}, {-22, -107}, {-89, 130},
+ {-54, 131}, {-92, -119}, {-147, 132}, {-133, 133}, {-77, -151}, {-162, 134},
+ {136, 135}, {-45, -152}, {-135, -200}, {-168, 137}, {-60, -148}, {-88, -161},
+ {-184, 138}, {-59, -74}, {-129, 139}, {-72, 140}, {-6, 141}, {-163, 142},
+ {-44, -56}, {-55, 143}, {-145, -178}, {-23, 144}, {146, 145}, {-29, 147},
+ {-39, -166}, {-150, 148}, {-167, -177}, {-7, -41}, {-134, 149}, {-183, 150},
+ {-199, 151}, {-40, 152}, {-165, 153}, {-24, -73}, {-57, 154}, {-149, -193},
+ {-181, 155}, {157, 156}, {-182, 158}, {-42, 159}, {-8, 160}, {-26, 161},
+ {-164, 162}, {-25, -198}, {-27, -180}, {-58, 163}, {-196, 164}, {-195, 165},
+ {-10, -197}, {-11, -43}, {-12, 166}, {-9, -179}, {-13, 167}, {-28, -194}}},
+ {{{-1, 1},
+ {-52, 2},
+ {4, 3},
+ {-2, 5},
+ {-17, 6},
+ {-18, 7},
+ {-36, -51},
+ {9, 8},
+ {11, 10},
+ {-34, -35},
+ {-19, 12},
+ {-3, -33},
+ {-20, 13},
+ {-50, 14},
+ {-4, -49}},
+ {{2, 1}, {-103, 3}, {-1, 4}, {6, 5}, {8, 7}, {-2, 9}, {-17, -18},
+ {-87, 10}, {-102, 11}, {13, 12}, {15, 14}, {-86, 16}, {-34, 17}, {19, 18},
+ {-19, 20}, {-33, 21}, {-35, 22}, {-71, 23}, {-3, 24}, {-70, -101}, {-85, 25},
+ {27, 26}, {-50, 28}, {30, 29}, {-20, 31}, {-69, 32}, {-51, 33}, {-36, -55},
+ {35, 34}, {-49, 36}, {-54, -100}, {-4, 37}, {-52, -84}, {39, 38}, {-53, -68},
+ {-66, 40}, {-21, 41}, {-67, 42}, {-37, -39}, {-65, 43}, {-38, -99}, {-5, 44},
+ {-83, 45}, {-22, -82}, {-98, 46}, {-23, -81}, {-6, 47}, {-7, -97}},
+ {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {-1, 8}, {10, 9},
+ {-18, 11}, {-2, -17}, {13, 12}, {-138, 14}, {-153, 15}, {17, 16},
+ {19, 18}, {-137, 20}, {-34, 21}, {23, 22}, {-19, 24}, {26, 25},
+ {28, 27}, {-33, -122}, {-35, 29}, {-3, 30}, {-152, 31}, {-121, 32},
+ {-136, 33}, {35, 34}, {37, 36}, {39, 38}, {-50, -120}, {41, 40},
+ {43, 42}, {-20, -51}, {45, 44}, {-36, 46}, {48, 47}, {-106, 49},
+ {-52, 50}, {-105, 51}, {-49, -103}, {53, 52}, {-151, 54}, {-104, -135},
+ {-4, 55}, {-68, 56}, {-119, 57}, {-53, 58}, {60, 59}, {-66, 61},
+ {-67, 62}, {-88, 63}, {-69, 64}, {-21, 65}, {-37, 66}, {-118, 67},
+ {-87, 68}, {-90, 69}, {-83, 70}, {-89, 71}, {-86, -102}, {-65, 72},
+ {-150, 73}, {-38, 74}, {-84, -134}, {76, 75}, {-5, 77}, {-54, -73},
+ {79, 78}, {-82, -85}, {-133, 80}, {-72, 81}, {-70, 82}, {-22, -71},
+ {-98, 83}, {-117, 84}, {-74, 85}, {-23, -99}, {-101, 86}, {-39, -149},
+ {-81, -100}, {-148, 87}, {-6, -58}, {-55, 88}, {-57, 89}, {91, 90},
+ {-56, -132}, {-116, 92}, {-24, 93}, {-114, 94}, {-40, -115}, {-97, 95},
+ {-7, -42}, {-131, -147}, {-41, 96}, {-8, -113}, {-25, 97}, {-26, -130},
+ {-9, -146}, {-129, 98}, {-10, -145}},
+ {{2, 1}, {4, 3}, {-205, 5}, {7, 6}, {9, 8}, {-1, 10},
+ {12, 11}, {-18, 13}, {-17, 14}, {-2, 15}, {-189, 16}, {-204, 17},
+ {19, 18}, {-188, 20}, {22, 21}, {24, 23}, {-34, 25}, {27, 26},
+ {-19, 28}, {30, 29}, {-35, 31}, {-173, 32}, {-33, 33}, {35, 34},
+ {-172, 36}, {-203, 37}, {-3, 38}, {-187, 39}, {41, 40}, {-171, 42},
+ {44, 43}, {-50, 45}, {47, 46}, {-51, 48}, {-20, 49}, {51, 50},
+ {-36, 52}, {-52, 53}, {55, 54}, {57, 56}, {-157, 58}, {60, 59},
+ {-156, 61}, {-155, 62}, {-49, 63}, {-202, 64}, {-154, 65}, {-170, 66},
+ {-186, 67}, {69, 68}, {-4, 70}, {-86, 71}, {73, 72}, {-66, 74},
+ {-67, 75}, {-68, 76}, {-69, 77}, {79, 78}, {-53, 80}, {82, 81},
+ {-21, -37}, {84, 83}, {-120, 85}, {-137, 86}, {-141, 87}, {-121, 88},
+ {-140, 89}, {-138, 90}, {-136, -139}, {92, 91}, {-153, 93}, {95, 94},
+ {-65, -201}, {-169, 96}, {-101, 97}, {-103, -185}, {99, 98}, {101, 100},
+ {-82, 102}, {-102, 103}, {-5, 104}, {-85, 105}, {-83, -84}, {-71, 106},
+ {108, 107}, {-70, -87}, {-106, 109}, {-22, 110}, {-38, 111}, {-54, 112},
+ {114, 113}, {-105, 115}, {-123, 116}, {-124, -151}, {-125, 117}, {-104, 118},
+ {-122, -135}, {120, 119}, {-119, 121}, {-116, 122}, {-152, 123}, {-184, -200},
+ {-168, 124}, {-81, 125}, {-117, 126}, {128, 127}, {-56, -98}, {-118, 129},
+ {-100, 130}, {-99, 131}, {-6, -91}, {-72, 132}, {-90, 133}, {-23, -39},
+ {-166, 134}, {-88, 135}, {137, 136}, {-55, 138}, {-89, -150}, {-107, 139},
+ {-109, 140}, {142, 141}, {-108, -131}, {-199, 143}, {-41, -132}, {-134, 144},
+ {-97, 145}, {-57, -183}, {147, 146}, {-76, -167}, {-114, -133}, {-73, 148},
+ {150, 149}, {-115, 151}, {-40, -75}, {-24, 152}, {-7, -165}, {-74, -181},
+ {-92, 153}, {-93, 154}, {-146, -182}, {-26, -147}, {-198, 155}, {-149, 156},
+ {-42, -58}, {158, 157}, {-130, -148}, {-61, -113}, {-196, 159}, {-60, -180},
+ {-164, 160}, {-8, -25}, {-27, 161}, {-59, -77}, {-163, 162}, {-162, 163},
+ {-195, -197}, {-43, 164}, {-44, -179}, {-11, -45}, {-9, -129}, {-28, 165},
+ {-178, 166}, {-145, -194}, {-29, -161}, {-10, -12}, {-177, 167}, {-13, -193}}}},
+ {{{{2, 1},
+ {-1, -52},
+ {-17, 3},
+ {5, 4},
+ {-36, 6},
+ {-18, 7},
+ {-2, 8},
+ {-33, 9},
+ {-20, 10},
+ {-34, -51},
+ {-35, 11},
+ {-49, 12},
+ {-19, 13},
+ {-3, 14},
+ {-4, -50}},
+ {{2, 1}, {4, 3}, {-103, 5}, {-1, 6}, {-17, 7}, {-87, 8}, {10, 9},
+ {-18, 11}, {13, 12}, {-2, -33}, {-71, 14}, {16, 15}, {-34, 17}, {-102, 18},
+ {-86, 19}, {-55, 20}, {-49, -50}, {22, 21}, {24, 23}, {-70, 25}, {-19, 26},
+ {-39, 27}, {-65, -66}, {-35, 28}, {30, 29}, {-54, 31}, {-3, 32}, {-51, 33},
+ {-85, -101}, {-23, -81}, {-82, 34}, {-38, 35}, {-69, 36}, {-67, 37}, {-20, -53},
+ {-36, 38}, {-97, 39}, {-52, 40}, {-4, -100}, {-84, 41}, {-68, 42}, {-21, 43},
+ {-37, 44}, {-5, 45}, {-83, -99}, {-22, 46}, {-98, 47}, {-6, -7}},
+ {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {-1, 8}, {-17, 9},
+ {-138, 10}, {12, 11}, {14, 13}, {-18, 15}, {17, 16}, {-122, 18},
+ {-33, 19}, {21, 20}, {-2, -34}, {23, 22}, {-153, 24}, {-106, 25},
+ {-137, 26}, {28, 27}, {-49, 29}, {-50, 30}, {32, 31}, {-121, 33},
+ {-90, 34}, {36, 35}, {-19, -66}, {38, 37}, {-65, 39}, {41, 40},
+ {-35, 42}, {-105, 43}, {45, 44}, {-51, -74}, {-82, 46}, {-3, 47},
+ {49, 48}, {-81, -152}, {-58, 50}, {-89, -98}, {-136, 51}, {53, 52},
+ {-73, 54}, {-67, -120}, {56, 55}, {-83, 57}, {-97, 58}, {-104, 59},
+ {-42, 60}, {-88, 61}, {-114, 62}, {-20, 63}, {-57, -113}, {-36, 64},
+ {-99, 65}, {-52, -68}, {67, 66}, {-72, 68}, {-130, 69}, {-26, 70},
+ {-41, -103}, {-4, -151}, {-135, 71}, {-84, -129}, {-119, 72}, {-115, 73},
+ {-56, 74}, {-87, 75}, {-53, -145}, {-100, 76}, {-21, 77}, {-37, 78},
+ {-69, -71}, {-118, 79}, {81, 80}, {-85, -150}, {-5, -102}, {-134, 82},
+ {-86, 83}, {-38, 84}, {-22, 85}, {-54, 86}, {-133, 87}, {-70, 88},
+ {-149, 89}, {-6, -117}, {-101, 90}, {-23, 91}, {-39, 92}, {-55, -148},
+ {-132, 93}, {-116, 94}, {-7, 95}, {-24, -40}, {-147, 96}, {-8, -131},
+ {-25, 97}, {-9, 98}, {-10, -146}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {-205, 9}, {-1, 10},
+ {-17, 11}, {13, 12}, {-189, 14}, {16, 15}, {-18, 17}, {19, 18},
+ {-173, 20}, {22, 21}, {-33, 23}, {-34, 24}, {-2, 25}, {27, 26},
+ {-204, 28}, {-157, 29}, {31, 30}, {-188, 32}, {-49, -50}, {34, 33},
+ {36, 35}, {-172, 37}, {-141, 38}, {40, 39}, {42, 41}, {-65, -66},
+ {44, 43}, {-19, 45}, {47, 46}, {-156, 48}, {-35, 49}, {51, 50},
+ {-125, 52}, {54, 53}, {-82, 55}, {-81, 56}, {-51, 57}, {59, 58},
+ {-140, 60}, {-3, 61}, {-203, 62}, {64, 63}, {-109, -187}, {66, 65},
+ {-98, 67}, {-67, 68}, {-171, 69}, {-97, 70}, {72, 71}, {-124, 73},
+ {75, 74}, {-93, 76}, {-155, 77}, {79, 78}, {-61, -83}, {-114, 80},
+ {82, 81}, {84, 83}, {-113, -146}, {-20, 85}, {-36, -108}, {-76, 86},
+ {88, 87}, {-77, -139}, {-52, 89}, {-99, 90}, {-131, 91}, {-130, 92},
+ {-45, 93}, {95, 94}, {-91, -129}, {-68, 96}, {-92, -161}, {-123, 97},
+ {-162, 98}, {-202, 99}, {-170, 100}, {-60, 101}, {-116, 102}, {-4, -145},
+ {-115, -186}, {104, 103}, {-107, -154}, {-84, 105}, {-29, -147}, {107, 106},
+ {-106, 108}, {-75, -177}, {-178, 109}, {111, 110}, {-132, -138}, {-100, 112},
+ {-21, 113}, {-37, 114}, {-44, -101}, {-193, 115}, {-90, 116}, {-53, -69},
+ {-122, -163}, {118, 117}, {-121, 119}, {-59, -117}, {-148, 120}, {-201, 121},
+ {-85, -185}, {123, 122}, {-74, 124}, {-153, -169}, {-5, 125}, {-86, -105},
+ {127, 126}, {-133, -137}, {129, 128}, {-22, -136}, {-102, 130}, {-38, 131},
+ {-54, 132}, {-89, -120}, {-118, 133}, {-70, -71}, {135, 134}, {-104, 136},
+ {-168, -200}, {-6, 137}, {-152, -184}, {-87, 138}, {140, 139}, {-103, 141},
+ {-39, 142}, {-135, 143}, {-151, 144}, {-55, 145}, {-23, 146}, {-119, 147},
+ {-56, -72}, {-88, 148}, {-167, -183}, {-7, -199}, {150, 149}, {-166, 151},
+ {-24, -150}, {-40, 152}, {154, 153}, {-134, 155}, {-41, 156}, {-198, 157},
+ {-57, -182}, {-8, 158}, {-73, -197}, {-9, -181}, {-165, 159}, {-149, 160},
+ {-25, 161}, {-26, -180}, {-164, 162}, {-58, 163}, {-42, -196}, {165, 164},
+ {-10, -195}, {-27, -43}, {-179, 166}, {-28, -194}, {-11, 167}, {-12, -13}}},
+ {{{2, 1},
+ {-1, -52},
+ {-17, 3},
+ {5, 4},
+ {-36, 6},
+ {-18, 7},
+ {-2, 8},
+ {-33, 9},
+ {-20, 10},
+ {-34, -51},
+ {-35, 11},
+ {-49, 12},
+ {-19, 13},
+ {-3, 14},
+ {-4, -50}},
+ {{2, 1}, {4, 3}, {-103, 5}, {-1, 6}, {-17, 7}, {-87, 8}, {10, 9},
+ {-18, 11}, {13, 12}, {-2, -33}, {-71, 14}, {16, 15}, {-34, 17}, {-102, 18},
+ {-86, 19}, {-55, 20}, {-49, -50}, {22, 21}, {24, 23}, {-70, 25}, {-19, 26},
+ {-39, 27}, {-65, -66}, {-35, 28}, {30, 29}, {-54, 31}, {-3, 32}, {-51, 33},
+ {-85, -101}, {-23, -81}, {-82, 34}, {-38, 35}, {-69, 36}, {-67, 37}, {-20, -53},
+ {-36, 38}, {-97, 39}, {-52, 40}, {-4, -100}, {-84, 41}, {-68, 42}, {-21, 43},
+ {-37, 44}, {-5, 45}, {-83, -99}, {-22, 46}, {-98, 47}, {-6, -7}},
+ {{2, 1}, {4, 3}, {-154, 5}, {7, 6}, {-1, 8}, {-17, 9},
+ {-138, 10}, {12, 11}, {14, 13}, {-18, 15}, {17, 16}, {-122, 18},
+ {-33, 19}, {21, 20}, {-2, -34}, {23, 22}, {-153, 24}, {-106, 25},
+ {-137, 26}, {28, 27}, {-49, 29}, {-50, 30}, {32, 31}, {-121, 33},
+ {-90, 34}, {36, 35}, {-19, -66}, {38, 37}, {-65, 39}, {41, 40},
+ {-35, 42}, {-105, 43}, {45, 44}, {-51, -74}, {-82, 46}, {-3, 47},
+ {49, 48}, {-81, -152}, {-58, 50}, {-89, -98}, {-136, 51}, {53, 52},
+ {-73, 54}, {-67, -120}, {56, 55}, {-83, 57}, {-97, 58}, {-104, 59},
+ {-42, 60}, {-88, 61}, {-114, 62}, {-20, 63}, {-57, -113}, {-36, 64},
+ {-99, 65}, {-52, -68}, {67, 66}, {-72, 68}, {-130, 69}, {-26, 70},
+ {-41, -103}, {-4, -151}, {-135, 71}, {-84, -129}, {-119, 72}, {-115, 73},
+ {-56, 74}, {-87, 75}, {-53, -145}, {-100, 76}, {-21, 77}, {-37, 78},
+ {-69, -71}, {-118, 79}, {81, 80}, {-85, -150}, {-5, -102}, {-134, 82},
+ {-86, 83}, {-38, 84}, {-22, 85}, {-54, 86}, {-133, 87}, {-70, 88},
+ {-149, 89}, {-6, -117}, {-101, 90}, {-23, 91}, {-39, 92}, {-55, -148},
+ {-132, 93}, {-116, 94}, {-7, 95}, {-24, -40}, {-147, 96}, {-8, -131},
+ {-25, 97}, {-9, 98}, {-10, -146}},
+ {{2, 1}, {4, 3}, {6, 5}, {8, 7}, {-205, 9},
+ {-1, 10}, {-17, 11}, {13, 12}, {-189, 14}, {16, 15},
+ {-18, 17}, {19, 18}, {-173, 20}, {22, 21}, {-33, 23},
+ {-34, 24}, {-2, 25}, {27, 26}, {-204, 28}, {-157, 29},
+ {31, 30}, {-188, 32}, {-49, -50}, {34, 33}, {36, 35},
+ {-172, 37}, {-141, 38}, {40, 39}, {42, 41}, {-65, -66},
+ {44, 43}, {-19, 45}, {47, 46}, {-156, 48}, {-35, 49},
+ {51, 50}, {-125, 52}, {54, 53}, {-82, 55}, {-81, 56},
+ {-51, 57}, {59, 58}, {-140, 60}, {-3, 61}, {-203, 62},
+ {64, 63}, {-109, -187}, {66, 65}, {-98, 67}, {-67, 68},
+ {-171, 69}, {-97, 70}, {72, 71}, {-124, 73}, {75, 74},
+ {-93, 76}, {-155, 77}, {79, 78}, {-61, -83}, {-114, 80},
+ {82, 81}, {84, 83}, {-113, -146}, {-20, 85}, {-36, -108},
+ {-76, 86}, {88, 87}, {-77, -139}, {-52, 89}, {-99, 90},
+ {-131, 91}, {-130, 92}, {-45, 93}, {95, 94}, {-91, -129},
+ {-68, 96}, {-92, -161}, {-123, 97}, {-162, 98}, {-202, 99},
+ {-170, 100}, {-60, 101}, {-116, 102}, {-4, -145}, {-115, -186},
+ {104, 103}, {-107, -154}, {-84, 105}, {-29, -147}, {107, 106},
+ {-106, 108}, {-75, -177}, {-178, 109}, {111, 110}, {-132, -138},
+ {-100, 112}, {-21, 113}, {-37, 114}, {-44, -101}, {-193, 115},
+ {-90, 116}, {-53, -69}, {-122, -163}, {118, 117}, {-121, 119},
+ {-59, -117}, {-148, 120}, {-201, 121}, {-85, -185}, {123, 122},
+ {-74, 124}, {-153, -169}, {-5, 125}, {-86, -105}, {127, 126},
+ {-133, -137}, {129, 128}, {-22, -136}, {-102, 130}, {-38, 131},
+ {-54, 132}, {-89, -120}, {-118, 133}, {-70, -71}, {135, 134},
+ {-104, 136}, {-168, -200}, {-6, 137}, {-152, -184}, {-87, 138},
+ {140, 139}, {-103, 141}, {-39, 142}, {-135, 143}, {-151, 144},
+ {-55, 145}, {-23, 146}, {-119, 147}, {-56, -72}, {-88, 148},
+ {-167, -183}, {-7, -199}, {150, 149}, {-166, 151}, {-24, -150},
+ {-40, 152}, {154, 153}, {-134, 155}, {-41, 156}, {-198, 157},
+ {-57, -182}, {-8, 158}, {-73, -197}, {-9, -181}, {-165, 159},
+ {-149, 160}, {-25, 161}, {-26, -180}, {-164, 162}, {-58, 163},
+ {-42, -196}, {165, 164}, {-10, -195}, {-27, -43}, {-179, 166},
+ {-28, -194}, {-11, 167}, {-12, -13}}}}}}; /* END OF
+ ia_mps_dec_huff_nodes_table_struct */
diff --git a/decoder/ixheaacd_mps_smoothing.c b/decoder/ixheaacd_mps_smoothing.c
index c4354b9..875f389 100644
--- a/decoder/ixheaacd_mps_smoothing.c
+++ b/decoder/ixheaacd_mps_smoothing.c
@@ -17,15 +17,8 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#include <math.h>
-#include <stdlib.h>
#include "ixheaacd_type_def.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -36,22 +29,34 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
-#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_constants.h"
#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_basic_ops40.h"
-
-#define Q28_FLOAT_VAL ((float)(1 << 28))
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_error_standards.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_smoothing.h"
+#include "ixheaacd_mps_tonality.h"
+#ifndef MULT
+#define MULT(a, b) (a * b)
+#endif
+#define ONE_BY_128_IN_Q30 (8388608)
+#define ONE_IN_Q30 (1073741824)
+#define PI_IN_Q27 (421657440)
+#define FIFTY_X_PI_BY_180_Q27 (117127067)
+#define TWENTY_FIVE_X_PI_BY_180_Q27 (58563533)
+#define Q28_VALUE (1 << 28)
+#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
VOID ixheaacd_mps_pre_matrix_mix_matrix_smoothing(
ia_mps_dec_state_struct *self) {
WORD32 smooth_band;
FLOAT32 delta, one_minus_delta;
-#ifndef MULT
-#define MULT(a, b) (a * b)
-#endif
WORD32 ps = 0, pb, row, col;
WORD32 res_bands = 0;
WORD32 *p_smoothing_data;
@@ -135,19 +140,12 @@ VOID ixheaacd_mps_pre_matrix_mix_matrix_smoothing(
}
}
-#define ONE_BY_128_IN_Q30 (8388608)
-#define ONE_IN_Q30 (1073741824)
-#define PI_IN_Q27 (421657440)
-#define FIFTY_X_PI_BY_180_Q27 (117127067)
-#define TWENTY_FIVE_X_PI_BY_180_Q27 (58563533)
-
VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) {
WORD32 ps, pb;
WORD32 delta, one_minus_delta;
if (self->opd_smoothing_mode == 0) {
for (pb = 0; pb < self->bs_param_bands; pb++) {
-#define Q28_VALUE (1 << 28)
self->opd_smooth.smooth_l_phase[pb] =
((WORD32)(self->phase_l[self->num_parameter_sets - 1][pb] *
Q28_VALUE)) >>
@@ -218,3 +216,508 @@ VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) {
}
}
}
+
+static VOID ixheaacd_calc_filter_coeff(
+ ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 *delta) {
+ WORD32 d_slots;
+ WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
+ WORD32 *smg_time = pstr_mps_state->aux_struct->smg_time;
+
+ if (ps == 0)
+ d_slots = param_slot[ps] + 1;
+ else
+ d_slots = param_slot[ps] - param_slot[ps - 1];
+
+ if (pstr_mps_state->smooth_control) {
+ switch (smg_time[ps]) {
+ case SMG_TIME_64:
+ *delta = d_slots << 9;
+ break;
+ case SMG_TIME_128:
+ *delta = d_slots << 8;
+ break;
+ case SMG_TIME_256:
+ *delta = d_slots << 7;
+ break;
+ case SMG_TIME_512:
+ *delta = d_slots << 6;
+ break;
+ default:
+ break;
+ }
+ } else {
+ *delta = d_slots << 7;
+ }
+
+ return;
+}
+
+VOID ixheaacd_smooth_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
+ ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
+ ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
+ ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
+ ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
+ WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
+ WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
+ WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
+
+ WORD32 num_parameter_bands = curr_state->num_parameter_bands;
+ WORD32 num_direct_signals = curr_state->num_direct_signals;
+ WORD32 num_decor_signals = curr_state->num_decor_signals;
+ WORD32 m1_param_imag_present = curr_state->m1_param_imag_present;
+ WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
+ WORD32 col_counter = num_direct_signals + num_decor_signals;
+ WORD32 num_parameter_sets = curr_state->num_parameter_sets;
+ WORD32 num_output_channels = curr_state->num_output_channels;
+ WORD32 num_v_channels = curr_state->num_v_channels;
+ WORD32 num_x_channels = curr_state->num_x_channels;
+ WORD32 smooth_control = curr_state->smooth_control;
+ WORD32 smooth_config = curr_state->smooth_config;
+ WORD32 resid_col_counter;
+ WORD32 smooth_band_arr[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
+
+ WORD32 *delta, *one_minus_delta, *delta_ptr, *one_minus_delta_ptr;
+ WORD32 *param_r, *param_i, *param_prev_r, *param_prev_i;
+
+ WORD32 *ton;
+ WORD32 i, ps, pb, row, col;
+ WORD32 res_bands = 0;
+ WORD32 idx = 0;
+
+ WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
+ WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
+ WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
+
+ ton = pstr_mps_state->mps_scratch_mem_v;
+ delta = delta_ptr = ton + MAX_PARAMETER_BANDS;
+ one_minus_delta = one_minus_delta_ptr = delta + MAX_PARAMETER_SETS;
+
+ param_r = curr_state->res_bands;
+ if (curr_state->residual_coding) {
+ for (i = 0; i < MAX_RESIDUAL_CHANNELS_MPS; i++) {
+ if (param_r[i] > res_bands) {
+ res_bands = param_r[i];
+ }
+ }
+ }
+
+ if (curr_state->arbitrary_downmix == 2) {
+ if (res_bands < curr_state->arbdmx_residual_bands) {
+ res_bands = curr_state->arbdmx_residual_bands;
+ }
+ }
+
+ if (smooth_config) {
+ ixheaacd_measure_tonality(pstr_mps_state, ton);
+ }
+
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ ixheaacd_calc_filter_coeff(pstr_mps_state, ps, delta);
+ *one_minus_delta++ = (1 << 15) - *delta++;
+ }
+
+ if (smooth_control) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ if (ps < 8) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ smooth_band_arr[ps][pb] = pstr_mps_state->aux_struct->smg_data[ps][pb];
+ }
+ }
+ }
+ } else if (smooth_config) {
+ for (ps = 0; ps < num_parameter_sets; ps++) {
+ for (pb = 0; pb < num_parameter_bands; pb++) {
+ smooth_band_arr[ps][pb] = (ton[pb] > POINT_EIGHT_Q15);
+ }
+ }
+ }
+
+ if (!(smooth_control == 0 && smooth_config == 0)) {
+ if (m1_param_imag_present) {
+ WORD32 *ptr_r1 = &m1_param->m1_param_real[0][0][0][0];
+ WORD32 *ptr_i1 = &m1_param->m1_param_imag[0][0][0][0];
+ for (row = 0; row < num_v_channels; row++) {
+ WORD32 *ptr_r2 = ptr_r1;
+ WORD32 *ptr_i2 = ptr_i1;
+ for (col = 0; col < num_x_channels; col++) {
+ param_r = ptr_r2;
+ param_i = ptr_i2;
+ m1_param_real_prev += res_bands;
+ m1_param_imag_prev += res_bands;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(*delta_ptr) +
+ (WORD64)(*m1_param_real_prev) *
+ (WORD64)(*one_minus_delta_ptr));
+
+ acc >>= 15;
+
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(*delta_ptr) +
+ (WORD64)(*m1_param_imag_prev) *
+ (WORD64)(*one_minus_delta_ptr));
+
+ acc >>= 15;
+
+ param_i[pb] = (WORD32)acc;
+ }
+ m1_param_real_prev++;
+ m1_param_imag_prev++;
+ }
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+
+ param_prev_r = param_r - MAX_PARAMETER_BANDS;
+ param_prev_i = param_i - MAX_PARAMETER_BANDS;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(del) +
+ (WORD64)param_prev_r[pb] *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(del) +
+ (WORD64)param_prev_i[pb] *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+
+ param_i[pb] = (WORD32)acc;
+ }
+ }
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+ }
+ ptr_r2 += PBXPS;
+ ptr_i2 += PBXPS;
+ }
+ ptr_r1 += INCHXPBXPS;
+ ptr_i1 += INCHXPBXPS;
+ }
+ } else {
+ WORD32 *ptr1 = (WORD32 *)m1_param;
+
+ for (row = 0; row < num_v_channels; row++) {
+ WORD32 *ptr2 = ptr1;
+
+ for (col = 0; col < num_x_channels; col++) {
+ WORD32 *param_r = ptr2;
+
+ WORD32 del = delta_ptr[0];
+ WORD32 one_minus_del = one_minus_delta_ptr[0];
+
+ m1_param_real_prev += res_bands;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del)) +
+ (WORD64)((WORD64)(*m1_param_real_prev) *
+ (WORD64)(one_minus_del));
+
+ param_r[pb] = (WORD32)(acc >> 15);
+ }
+ m1_param_real_prev++;
+ }
+ param_r += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+
+ param_prev_r = param_r - MAX_PARAMETER_BANDS;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del) +
+ (WORD64)((WORD64)(param_prev_r[pb]) *
+ (WORD64)one_minus_del);
+
+ param_r[pb] = (WORD32)(acc >> 15);
+ }
+ }
+ param_r += MAX_PARAMETER_BANDS;
+ }
+ ptr2 += PBXPS;
+ }
+ ptr1 += INCHXPBXPS;
+ }
+ }
+
+ if (curr_state->residual_coding)
+ resid_col_counter = col_counter;
+ else
+ resid_col_counter = num_direct_signals;
+
+ idx = 0;
+ if (m2_param_imag_present) {
+ WORD32 *ptr_r1 = &m2_param->m2_resid_real[0][0][0];
+ WORD32 *ptr_i1 = &m2_param->m2_resid_imag[0][0][0];
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = 0; col < resid_col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 2) {
+ WORD32 del = *delta_ptr;
+ WORD32 one_minus_del = *one_minus_delta_ptr;
+
+ param_r = ptr_r1;
+ param_i = ptr_i1;
+
+ m2_resid_real_prev += res_bands;
+ m2_resid_imag_prev += res_bands;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del) +
+ (WORD64)(*m2_resid_real_prev) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)(del) +
+ (WORD64)(*m2_resid_imag_prev) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ param_i[pb] = (WORD32)acc;
+ }
+
+ m2_resid_real_prev++;
+ m2_resid_imag_prev++;
+ }
+
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+
+ param_prev_r = param_r - MAX_PARAMETER_BANDS;
+ param_prev_i = param_i - MAX_PARAMETER_BANDS;
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del) +
+ (WORD64)(param_prev_r[pb]) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)(del) +
+ (WORD64)(param_prev_i[pb]) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ param_i[pb] = (WORD32)acc;
+ }
+ }
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+ }
+ idx++;
+ ptr_r1 += PBXPS;
+ ptr_i1 += PBXPS;
+ }
+ }
+ }
+
+ idx = 0;
+
+ ptr_r1 = &m2_param->m2_resid_real[0][0][0];
+ ptr_i1 = &m2_param->m2_resid_imag[0][0][0];
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 1) {
+ WORD32 del = *delta_ptr;
+ WORD32 one_minus_del = *one_minus_delta_ptr;
+ m2_decor_real_prev += res_bands;
+ m2_decor_imag_prev += res_bands;
+
+ param_r = ptr_r1;
+ param_i = ptr_i1;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del +
+ (WORD64)(*m2_decor_real_prev) *
+ (WORD64)one_minus_del);
+ acc >>= 15;
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)del +
+ (WORD64)(*m2_decor_imag_prev) *
+ (WORD64)one_minus_del);
+ acc >>= 15;
+ param_i[pb] = (WORD32)acc;
+ }
+ m2_decor_real_prev++;
+ m2_decor_imag_prev++;
+ }
+
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+ param_prev_r = param_r - MAX_PARAMETER_BANDS;
+ param_prev_i = param_i - MAX_PARAMETER_BANDS;
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del +
+ (WORD64)(param_prev_r[pb]) *
+ (WORD64)one_minus_del);
+ acc >>= 15;
+ param_r[pb] = (WORD32)acc;
+
+ acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)del +
+ (WORD64)(param_prev_i[pb]) *
+ (WORD64)one_minus_del);
+ acc >>= 15;
+ param_i[pb] = (WORD32)acc;
+ }
+ }
+ param_r += MAX_PARAMETER_BANDS;
+ param_i += MAX_PARAMETER_BANDS;
+ }
+
+ idx++;
+ ptr_r1 += PBXPS;
+ ptr_i1 += PBXPS;
+ }
+ }
+ }
+ } else {
+ WORD32 *ptr1 = &m2_param->m2_resid_real[0][0][0];
+
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = 0; col < resid_col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 2) {
+ WORD32 *ptr2 = ptr1;
+ WORD32 del = *delta_ptr;
+ WORD32 one_minus_del = *one_minus_delta_ptr;
+ m2_resid_real_prev += res_bands;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
+ (WORD64)(*m2_resid_real_prev) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ ptr2[pb] = (WORD32)acc;
+ }
+
+ m2_resid_real_prev++;
+ }
+
+ ptr2 += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+
+ param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
+
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+
+ acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
+ (WORD64)(*param_prev_r) *
+ (WORD64)(one_minus_del));
+
+ acc >>= 15;
+ ptr2[pb] = (WORD32)acc;
+ }
+
+ param_prev_r++;
+ }
+ ptr2 += MAX_PARAMETER_BANDS;
+ }
+ idx++;
+ ptr1 += PBXPS;
+ }
+ }
+ }
+ idx = 0;
+ ptr1 = &m2_param->m2_decor_real[0][0][0];
+
+ for (row = 0; row < num_output_channels; row++) {
+ for (col = num_direct_signals; col < col_counter; col++) {
+ if (curr_state->m2_param_present[row][col] & 1) {
+ WORD32 *ptr2 = ptr1;
+ m2_decor_real_prev += res_bands;
+
+ param_r = &m2_param->m2_decor_real[idx][0][res_bands];
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[0][pb]) {
+ WORD64 acc;
+ acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)*delta_ptr +
+ (WORD64)(*m2_decor_real_prev) *
+ (WORD64)*one_minus_delta_ptr);
+ acc >>= 15;
+ ptr2[pb] = (WORD32)acc;
+ }
+ m2_decor_real_prev++;
+ }
+ ptr2 += MAX_PARAMETER_BANDS;
+
+ for (ps = 1; ps < num_parameter_sets; ps++) {
+ WORD32 del = delta_ptr[ps];
+ WORD32 one_minus_del = one_minus_delta_ptr[ps];
+
+ param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
+ for (pb = res_bands; pb < num_parameter_bands; pb++) {
+ if (smooth_band_arr[ps][pb]) {
+ WORD64 acc;
+
+ acc =
+ (WORD64)((WORD64)(ptr2[pb]) * (WORD64)del +
+ (WORD64)(*param_prev_r) * (WORD64)one_minus_del);
+ acc >>= 15;
+ ptr2[pb] = (WORD32)acc;
+ }
+
+ param_prev_r++;
+ }
+
+ ptr2 += MAX_PARAMETER_BANDS;
+ }
+
+ idx++;
+
+ ptr1 += PBXPS;
+ }
+ }
+ }
+ }
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_smoothing.h b/decoder/ixheaacd_mps_smoothing.h
new file mode 100644
index 0000000..718d10a
--- /dev/null
+++ b/decoder/ixheaacd_mps_smoothing.h
@@ -0,0 +1,30 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_SMOOTHING_H
+#define IXHEAACD_MPS_SMOOTHING_H
+
+#define SMG_TIME_64 (64)
+#define SMG_TIME_128 (128)
+#define SMG_TIME_256 (256)
+#define SMG_TIME_512 (512)
+
+VOID ixheaacd_smooth_m1m2(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_SMOOTHING_H */
diff --git a/decoder/ixheaacd_mps_struct_def.h b/decoder/ixheaacd_mps_struct_def.h
new file mode 100644
index 0000000..e795fef
--- /dev/null
+++ b/decoder/ixheaacd_mps_struct_def.h
@@ -0,0 +1,397 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_STRUCT_DEF_H
+#define IXHEAACD_MPS_STRUCT_DEF_H
+
+typedef struct {
+ const WORD32 *p_filter_ana;
+ const WORD32 *ref_co_eff_ptr_l;
+ const WORD32 *ref_co_eff_ptr_r;
+ WORD32 offset_l;
+ WORD32 offset_r;
+ WORD32 *qmf_states_buffer;
+ WORD16 flag;
+ WORD16 offset;
+ WORD32 *qmf_states_curr_pos;
+} ia_mps_dec_qmf_ana_filter_bank;
+
+typedef struct {
+ const WORD32 *p_filter_syn;
+ WORD32 *sbr_qmf_states_synthesis;
+} ia_mps_dec_qmf_syn_filter_bank;
+
+typedef struct {
+ WORD32 ia_mps_enc_qmf_64_640[650];
+ WORD16 sbr_alt_sin_twiddle[33];
+ WORD16 sbr_cos_twiddle[32];
+ WORD16 sbr_sin_twiddle[32];
+ WORD16 fft_c[4];
+ WORD16 ia_qmf_anl_addt_cos[32];
+ WORD16 ia_qmf_anl_addt_sin[32];
+} ia_mps_dec_qmf_tables_struct;
+
+typedef struct { WORD32 sqrt_tab[513]; } ia_mps_dec_common_tables_struct;
+
+typedef struct {
+ WORD16 p8_13[19];
+ WORD16 p2_6[6];
+ WORD32 sine_array[2048];
+ WORD32 cosine_array[2048];
+} ia_mps_dec_hybrid_tables_struct;
+
+typedef struct {
+ WORD32 row_2_channel_stp[7][8];
+ WORD32 row_2_channel_ges[7][8];
+ WORD32 row_2_residual[7][8];
+} ia_mps_dec_index_tables_struct;
+
+typedef struct {
+ ia_mps_dec_index_tables_struct idx_table;
+ WORD32 hybrid_2_param_28[71];
+ WORD32 r1_matrix_l[31];
+ WORD32 ten_cld_by_10[31];
+ WORD32 w00_cld2_15[31];
+ WORD32 table_kappa[8];
+ WORD32 dec_pow[31];
+ WORD32 cld_tab_1[31];
+ WORD32 cld_tab_2[31];
+ WORD32 cld_tab_3[31];
+ WORD32 reciprocal[576];
+ WORD32 c_l_table[31];
+ WORD32 cos_table[16][31];
+ WORD32 sin_table[8][31];
+} ia_mps_dec_m1_m2_tables_struct;
+
+typedef struct {
+ WORD32 rev_delay[4][10];
+ WORD32 rev_split_freq_0[4];
+ WORD32 rev_split_freq_1[4];
+ WORD32 rev_split_freq_2[4];
+} ia_mps_dec_rev_tables_struct;
+
+typedef struct {
+ ia_mps_dec_rev_tables_struct rev_table;
+ WORD32 lattice_coeff_0[10][20];
+ WORD32 lattice_coeff_1[10][15];
+ WORD32 lattice_coeff_2[10][6];
+ WORD32 lattice_coeff_3[10][3];
+ WORD32 den_coef_0[10][21];
+ WORD32 den_coef_1[10][16];
+ WORD32 den_coef_2[10][7];
+ WORD32 den_coef_3[10][4];
+ WORD32 lattice_delta_phi[10][20];
+} ia_mps_dec_decorr_tables_struct;
+
+typedef struct {
+ WORD32 bp[25];
+ WORD32 bpxgf[25];
+ WORD32 bp2xgf2[25];
+ WORD32 ia_mps_dec_qmf_64_640[325];
+ WORD32 time_out_idx_5xxx[6];
+ WORD32 time_out_idx_7xxx[8];
+} ia_mps_dec_tp_process_tables_struct;
+
+typedef struct {
+ WORD32 wf_02[02];
+ WORD32 wf_03[03];
+ WORD32 wf_04[04];
+ WORD32 wf_15[15];
+ WORD32 wf_16[16];
+ WORD32 wf_18[18];
+ WORD32 wf_24[24];
+ WORD32 wf_30[30];
+ WORD32 wf_32[32];
+} ia_mps_dec_wf_tables_struct;
+
+typedef struct { const WORD32 *wf[32]; } ia_mps_dec_wf_ptr_table_struct;
+
+typedef struct {
+ WORD32 twi_post_cos[64];
+ WORD32 twi_post_sin[64];
+ WORD32 hybrid_2_qmf[71];
+ WORD32 local_sin_4[4];
+ WORD32 local_sin_15[16];
+ WORD32 local_sin_16[16];
+ WORD32 local_sin_18[18];
+ WORD32 local_sin_24[24];
+ WORD32 local_sin_30[30];
+ WORD32 local_sin_32[32];
+} ia_mps_dec_mdct2qmf_table_struct;
+
+typedef struct {
+ WORD16 gmax_fix[72];
+ WORD32 dwin_fix[72];
+ WORD32 nstart_fix[5][72];
+ WORD32 dfrac_fix[5][56];
+ WORD32 part4[4];
+ WORD32 part5[5];
+ WORD32 part7[7];
+ WORD32 part10[10];
+ WORD32 part14[14];
+ WORD32 part20[20];
+ WORD32 part28[28];
+ WORD32 part40[40];
+ WORD32 w_real[16];
+ WORD32 w_imag[16];
+ WORD32 bitrev[16];
+} ia_mps_dec_tonality_tables_struct;
+
+typedef struct {
+ WORD32 kernels_4_to_71[71];
+ WORD32 kernels_5_to_71[71];
+ WORD32 kernels_7_to_71[71];
+ WORD32 kernels_10_to_71[71];
+ WORD32 kernels_14_to_71[71];
+ WORD32 kernels_20_to_71[71];
+ WORD32 kernels_28_to_71[71];
+ WORD32 bb_env_kernels[71];
+} ia_mps_dec_kernels_table_struct;
+
+typedef struct {
+ WORD32 mapping_4_to_28[28];
+ WORD32 mapping_5_to_28[28];
+ WORD32 mapping_7_to_28[28];
+ WORD32 mapping_10_to_28[28];
+ WORD32 mapping_14_to_28[28];
+ WORD32 mapping_20_to_28[28];
+} ia_mps_dec_mapping_table_struct;
+
+typedef struct {
+ WORD32 num_input_channels;
+ WORD32 num_output_channels;
+ WORD32 num_ott_boxes;
+ WORD32 num_ttt_boxes;
+ WORD32 ott_mode_lfe[5];
+} ia_mps_dec_tree_properties_struct;
+
+typedef struct {
+ ia_mps_dec_kernels_table_struct kernel_table;
+ ia_mps_dec_mapping_table_struct map_table;
+ ia_mps_dec_tree_properties_struct tree_property_table[7];
+ WORD32 sampling_freq_table[15];
+ WORD32 freq_res_table[8];
+ WORD32 temp_shape_chan_table[2][7];
+ WORD32 surround_gain_table[5];
+ WORD32 lfe_gain_table[5];
+ WORD32 clip_gain_table[8];
+ WORD32 pb_stride_table[4];
+ WORD32 smg_time_table[4];
+ WORD32 dequant_cld[31];
+ WORD32 dequant_cld_coarse[15];
+ WORD32 dequant_cpc[52];
+ WORD32 dequant_cpc_coarse[26];
+ WORD32 dequant_icc[8];
+ WORD32 factor_cld_tab_1[31];
+ WORD32 hrtf_power[64];
+ WORD32 envshape_data[2][5];
+ WORD32 pcm_chnksz_level_3[5];
+ WORD32 pcm_chnksz_level_4;
+ WORD32 pcm_chnksz_level_7[6];
+ WORD32 pcm_chnksz_level_8;
+ WORD32 pcm_chnksz_level_11[2];
+ WORD32 pcm_chnksz_level_13[4];
+ WORD32 pcm_chnksz_level_15;
+ WORD32 pcm_chnksz_level_19[4];
+ WORD32 pcm_chnksz_level_25[3];
+ WORD32 pcm_chnksz_level_26;
+ WORD32 pcm_chnksz_level_31;
+ WORD32 pcm_chnksz_level_51[4];
+} ia_mps_dec_bitdec_tables_struct;
+
+typedef struct {
+ WORD32 blind_cld_mesh[31][21];
+ WORD32 blind_icc_mesh[31][21];
+ WORD32 blind_cpc_1_mesh[31][21];
+ WORD32 blind_cpc_2_mesh[31][21];
+} ia_mps_dec_mesh_tables_struct;
+
+typedef struct {
+ ia_mps_dec_mesh_tables_struct mesh_table;
+ WORD32 exp_1[13];
+ WORD32 exp_2[13];
+ WORD32 exp_4[13];
+ WORD32 exp_8[13];
+ WORD32 exp_16[13];
+ WORD32 exp_32[13];
+ WORD32 exp_64[13];
+ WORD32 exp_128[13];
+} ia_mps_dec_blind_tables_struct;
+
+typedef struct {
+ WORD16 *cos_table_long[64];
+ WORD16 *cos_table_short[10];
+} ia_mps_dec_mdct2qmf_cos_table_struct;
+
+typedef struct {
+ WORD16 cos_table_long_32_00[32];
+ WORD16 cos_table_long_32_01[32];
+ WORD16 cos_table_long_32_02[32];
+ WORD16 cos_table_long_32_03[32];
+ WORD16 cos_table_long_32_04[32];
+ WORD16 cos_table_long_32_05[32];
+ WORD16 cos_table_long_32_06[32];
+ WORD16 cos_table_long_32_07[32];
+ WORD16 cos_table_long_32_08[32];
+ WORD16 cos_table_long_32_09[32];
+ WORD16 cos_table_long_32_10[32];
+ WORD16 cos_table_long_32_11[32];
+ WORD16 cos_table_long_32_12[32];
+ WORD16 cos_table_long_32_13[32];
+ WORD16 cos_table_long_32_14[32];
+ WORD16 cos_table_long_32_15[32];
+ WORD16 cos_table_long_32_16[32];
+ WORD16 cos_table_long_32_17[32];
+ WORD16 cos_table_long_32_18[32];
+ WORD16 cos_table_long_32_19[32];
+ WORD16 cos_table_long_32_20[32];
+ WORD16 cos_table_long_32_21[32];
+ WORD16 cos_table_long_32_22[32];
+ WORD16 cos_table_long_32_23[32];
+ WORD16 cos_table_long_32_24[32];
+ WORD16 cos_table_long_32_25[32];
+ WORD16 cos_table_long_32_26[32];
+ WORD16 cos_table_long_32_27[32];
+ WORD16 cos_table_long_32_28[32];
+ WORD16 cos_table_long_32_29[32];
+ WORD16 cos_table_long_32_30[32];
+ WORD16 cos_table_long_32_31[32];
+
+ WORD16 cos_table_long_30_00[30];
+ WORD16 cos_table_long_30_01[30];
+ WORD16 cos_table_long_30_02[30];
+ WORD16 cos_table_long_30_03[30];
+ WORD16 cos_table_long_30_04[30];
+ WORD16 cos_table_long_30_05[30];
+ WORD16 cos_table_long_30_06[30];
+ WORD16 cos_table_long_30_07[30];
+ WORD16 cos_table_long_30_08[30];
+ WORD16 cos_table_long_30_09[30];
+ WORD16 cos_table_long_30_10[30];
+ WORD16 cos_table_long_30_11[30];
+ WORD16 cos_table_long_30_12[30];
+ WORD16 cos_table_long_30_13[30];
+ WORD16 cos_table_long_30_14[30];
+ WORD16 cos_table_long_30_15[30];
+ WORD16 cos_table_long_30_16[30];
+ WORD16 cos_table_long_30_17[30];
+ WORD16 cos_table_long_30_18[30];
+ WORD16 cos_table_long_30_19[30];
+ WORD16 cos_table_long_30_20[30];
+ WORD16 cos_table_long_30_21[30];
+ WORD16 cos_table_long_30_22[30];
+ WORD16 cos_table_long_30_23[30];
+ WORD16 cos_table_long_30_24[30];
+ WORD16 cos_table_long_30_25[30];
+ WORD16 cos_table_long_30_26[30];
+ WORD16 cos_table_long_30_27[30];
+ WORD16 cos_table_long_30_28[30];
+ WORD16 cos_table_long_30_29[30];
+
+ WORD16 cos_table_long_24_00[24];
+ WORD16 cos_table_long_24_01[24];
+ WORD16 cos_table_long_24_02[24];
+ WORD16 cos_table_long_24_03[24];
+ WORD16 cos_table_long_24_04[24];
+ WORD16 cos_table_long_24_05[24];
+ WORD16 cos_table_long_24_06[24];
+ WORD16 cos_table_long_24_07[24];
+ WORD16 cos_table_long_24_08[24];
+ WORD16 cos_table_long_24_09[24];
+ WORD16 cos_table_long_24_10[24];
+ WORD16 cos_table_long_24_11[24];
+ WORD16 cos_table_long_24_12[24];
+ WORD16 cos_table_long_24_13[24];
+ WORD16 cos_table_long_24_14[24];
+ WORD16 cos_table_long_24_15[24];
+ WORD16 cos_table_long_24_16[24];
+ WORD16 cos_table_long_24_17[24];
+ WORD16 cos_table_long_24_18[24];
+ WORD16 cos_table_long_24_19[24];
+ WORD16 cos_table_long_24_20[24];
+ WORD16 cos_table_long_24_21[24];
+ WORD16 cos_table_long_24_22[24];
+ WORD16 cos_table_long_24_23[24];
+
+ WORD16 cos_table_long_18_00[18];
+ WORD16 cos_table_long_18_01[18];
+ WORD16 cos_table_long_18_02[18];
+ WORD16 cos_table_long_18_03[18];
+ WORD16 cos_table_long_18_04[18];
+ WORD16 cos_table_long_18_05[18];
+ WORD16 cos_table_long_18_06[18];
+ WORD16 cos_table_long_18_07[18];
+ WORD16 cos_table_long_18_08[18];
+ WORD16 cos_table_long_18_09[18];
+ WORD16 cos_table_long_18_10[18];
+ WORD16 cos_table_long_18_11[18];
+ WORD16 cos_table_long_18_12[18];
+ WORD16 cos_table_long_18_13[18];
+ WORD16 cos_table_long_18_14[18];
+ WORD16 cos_table_long_18_15[18];
+ WORD16 cos_table_long_18_16[18];
+ WORD16 cos_table_long_18_17[18];
+
+ WORD16 cos_table_long_16_00[16];
+ WORD16 cos_table_long_16_01[16];
+ WORD16 cos_table_long_16_02[16];
+ WORD16 cos_table_long_16_03[16];
+ WORD16 cos_table_long_16_04[16];
+ WORD16 cos_table_long_16_05[16];
+ WORD16 cos_table_long_16_06[16];
+ WORD16 cos_table_long_16_07[16];
+ WORD16 cos_table_long_16_08[16];
+ WORD16 cos_table_long_16_09[16];
+ WORD16 cos_table_long_16_10[16];
+ WORD16 cos_table_long_16_11[16];
+ WORD16 cos_table_long_16_12[16];
+ WORD16 cos_table_long_16_13[16];
+ WORD16 cos_table_long_16_14[16];
+ WORD16 cos_table_long_16_15[16];
+
+ WORD16 cos_table_long_15_00[15];
+ WORD16 cos_table_long_15_01[15];
+ WORD16 cos_table_long_15_02[15];
+ WORD16 cos_table_long_15_03[15];
+ WORD16 cos_table_long_15_04[15];
+ WORD16 cos_table_long_15_05[15];
+ WORD16 cos_table_long_15_06[15];
+ WORD16 cos_table_long_15_07[15];
+ WORD16 cos_table_long_15_08[15];
+ WORD16 cos_table_long_15_09[15];
+ WORD16 cos_table_long_15_10[15];
+ WORD16 cos_table_long_15_11[15];
+ WORD16 cos_table_long_15_12[15];
+ WORD16 cos_table_long_15_13[15];
+ WORD16 cos_table_long_15_14[15];
+
+ WORD16 cos_table_short_4_00[4];
+ WORD16 cos_table_short_4_01[4];
+ WORD16 cos_table_short_4_02[4];
+ WORD16 cos_table_short_4_03[4];
+
+ WORD16 cos_table_short_3_00[3];
+ WORD16 cos_table_short_3_01[3];
+ WORD16 cos_table_short_3_02[3];
+
+ WORD16 cos_table_short_2_00[2];
+ WORD16 cos_table_short_2_01[2];
+} ia_mps_dec_mdct2qmf_tables_struct;
+
+#endif /* IXHEAACD_MPS_STRUCT_DEF_H */
diff --git a/decoder/ixheaacd_mps_tables.h b/decoder/ixheaacd_mps_tables.h
new file mode 100644
index 0000000..59fc22e
--- /dev/null
+++ b/decoder/ixheaacd_mps_tables.h
@@ -0,0 +1,36 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_TABLES_H
+#define IXHEAACD_MPS_TABLES_H
+
+extern const ia_mps_dec_m1_m2_tables_struct ixheaacd_mps_dec_m1_m2_tables;
+extern const ia_mps_dec_decorr_tables_struct ixheaacd_mps_dec_decorr_tables;
+extern const ia_mps_dec_tp_process_tables_struct ixheaacd_mps_dec_tp_process_tables;
+extern const ia_mps_dec_wf_tables_struct ixheaacd_mps_dec_wf_tables;
+extern const ia_mps_dec_mdct2qmf_table_struct ixheaacd_mps_dec_mdct2qmf_table;
+extern const ia_mps_dec_tonality_tables_struct ixheaacd_mps_dec_tonality_tables;
+extern ia_mps_dec_bitdec_tables_struct ixheaacd_mps_dec_bitdec_tables;
+extern const ia_mps_dec_blind_tables_struct ixheaacd_mps_dec_blind_tables;
+extern const ia_mps_dec_mdct2qmf_tables_struct ixheaacd_mps_dec_mdct2qmf_tables;
+extern const ia_mps_dec_qmf_tables_struct ixheaacd_mps_dec_qmf_tables;
+extern const ia_mps_dec_common_tables_struct ixheaacd_mps_dec_common_tables;
+extern const ia_mps_dec_hybrid_tables_struct ixheaacd_mps_dec_hybrid_tables;
+
+#endif /*IXHEAACD_MPS_TABLES_H */
diff --git a/decoder/ixheaacd_mps_temp_process.c b/decoder/ixheaacd_mps_temp_process.c
index 76213b5..fe5271b 100644
--- a/decoder/ixheaacd_mps_temp_process.c
+++ b/decoder/ixheaacd_mps_temp_process.c
@@ -18,18 +18,9 @@
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include <math.h>
-#include <float.h>
-#include <memory.h>
-
-#include <assert.h>
-
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -40,36 +31,26 @@
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
#include "ixheaacd_mps_process.h"
-
-#include "ixheaacd_common_rom.h"
-#include "ixheaacd_defines.h"
-
-#include "ixheaacd_pns.h"
-
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-
-#include "ixheaacd_sbrdecsettings.h"
-#include "ixheaacd_sbr_scale.h"
#include "ixheaacd_lpp_tran.h"
-#include "ixheaacd_env_extr_part.h"
-#include "ixheaacd_sbr_rom.h"
-#include "ixheaacd_hybrid.h"
-#include "ixheaacd_ps_dec.h"
#include "ixheaacd_env_extr.h"
-
-#include "ixheaacd_qmf_dec.h"
-
#include "ixheaacd_env_calc.h"
#include "ixheaacd_sbr_const.h"
#include "ixheaacd_pvc_dec.h"
#include "ixheaacd_sbr_dec.h"
#include "ixheaacd_audioobjtypes.h"
-
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_get_index.h"
+#include "ixheaacd_mps_basic_op.h"
+#include "ixheaacd_mps_tp_process.h"
+#include "ixheaacd_error_codes.h"
#define HP_SIZE (9)
#define STP_LPF_COEFF1 (0.950f)
@@ -78,9 +59,6 @@
#define STP_SCALE_LIMIT (2.82f)
#define STP_DAMP (0.1f)
-#define max(a, b) ((a > b) ? (a) : (b))
-#define min(a, b) ((a < b) ? (a) : (b))
-
static const FLOAT32 ixheaacd_bp[BP_SIZE] = {
0.0000f, 0.0005f, 0.0092f, 0.0587f, 0.2580f, 0.7392f, 0.9791f,
0.9993f, 1.0000f, 1.0000f, 1.0000f, 1.0000f, 0.9999f, 0.9984f,
@@ -189,11 +167,15 @@ static VOID ixheaacd_mps_subbandtp(ia_mps_dec_state_struct* self, WORD32 ts) {
const WORD32 ixheaacd_hybrid_to_qmf_map[] = {0, 0, 0, 0, 0, 0, 1, 1, 2, 2};
const WORD32 ixheaacd_hybrid_to_qmf_map_ldmps[] = {0, 1, 2};
const WORD32* ptr_ixheaacd_hybrid_to_qmf_map;
+ WORD32 loop_counter = 0;
- if (self->ldmps_config.ldmps_present_flag)
+ if (self->ldmps_config.ldmps_present_flag) {
ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map_ldmps;
- else
+ loop_counter = 3;
+ } else {
ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map;
+ loop_counter = 10;
+ }
ixheaacd_mps_temp_process_scale_calc(self, ts, scale);
@@ -220,7 +202,7 @@ static VOID ixheaacd_mps_subbandtp(ia_mps_dec_state_struct* self, WORD32 ts) {
(self->hyb_diff_out[ch][ts][n].im * temp);
}
} else {
- for (n = 0; n < 10; n++) {
+ for (n = 0; n < loop_counter; n++) {
temp = (FLOAT32)(scale[ch] *
ixheaacd_bp[ptr_ixheaacd_hybrid_to_qmf_map[n]]);
self->hyb_dir_out[ch][ts][n].re +=
@@ -294,9 +276,9 @@ WORD32 ixheaacd_mps_temp_process(ia_mps_dec_state_struct* self) {
if (self->ldmps_config.ldmps_present_flag != 1) {
for (ch = 0; ch < self->out_ch_count; ch++) {
- err = ixheaacd_sbr_dec_from_mps(
- &self->qmf_out_dir[ch][0][0].re, self->p_sbr_dec[ch],
- self->p_sbr_frame[ch], self->p_sbr_header[ch]);
+ err =
+ ixheaacd_sbr_dec_from_mps(&self->qmf_out_dir[ch][0][0].re, self->p_sbr_dec[ch],
+ self->p_sbr_frame[ch], self->p_sbr_header[ch], self->ec_flag);
if (err) return err;
}
}
@@ -316,4 +298,1127 @@ WORD32 ixheaacd_mps_temp_process(ia_mps_dec_state_struct* self) {
ixheaacd_mps_synt_calc(self);
return err;
-} \ No newline at end of file
+}
+
+static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ts) {
+ ia_mps_dec_tp_process_tables_struct *tp_process_table_ptr =
+ pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr;
+ const WORD32 *sqrt_tab =
+ pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+ ia_mps_dec_subband_tp_params_struct *sub_band_tp =
+ pstr_mps_state->mps_persistent_mem.sub_band_params;
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+
+ WORD32 temp_1, temp_2;
+ WORD16 qtemp1, qtemp2;
+ WORD32 *qmf_output_real_dry;
+ WORD32 *qmf_output_imag_dry;
+ WORD32 *qmf_output_real_wet;
+ WORD32 *qmf_output_imag_wet;
+
+ WORD32 *dmx_real;
+ WORD32 *dmx_imag;
+ WORD32 *dry_ener;
+ WORD32 *wet_ener;
+ WORD16 *q_dry_ener;
+ WORD16 *q_wet_ener;
+
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
+ WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
+ WORD32 *scale;
+ WORD16 *q_scale;
+ WORD32 damp, one_minus_damp;
+ WORD32 temp;
+
+ WORD32 *prev_tp_scale = sub_band_tp->prev_tp_scale;
+
+ WORD32 *old_wet_ener = sub_band_tp->old_wet_ener;
+ WORD16 *q_old_wet_ener = sub_band_tp->q_old_wet_ener;
+
+ WORD32 *run_wet_ener = sub_band_tp->run_wet_ener;
+ WORD16 *q_run_wet_ener = sub_band_tp->q_run_wet_ener;
+
+ WORD32 *old_dry_ener = sub_band_tp->old_dry_ener;
+ WORD16 *q_old_dry_ener = sub_band_tp->q_old_dry_ener;
+
+ WORD32 *run_dry_ener = sub_band_tp->run_dry_ener;
+ WORD16 *q_run_dry_ener = sub_band_tp->q_run_dry_ener;
+
+ WORD32 *hyb_output_real_dry, *hyb_output_imag_dry;
+
+ WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag;
+
+ WORD32 ch, n, no_scaling, i, k = 0, offset;
+ WORD32 i_lf = 0, i_rf = 0, i_c = 0, i_lfe = 0, i_ls = 0, i_rs = 0, i_al = 0, i_ar = 0;
+
+ WORD32 loop_counter = 0;
+
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 num_output_channels = pstr_mps_state->num_output_channels;
+ WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
+
+ WORD32 tree_config = pstr_mps_state->tree_config;
+
+ dry_ener = pstr_mps_state->mps_scratch_mem_v;
+ q_dry_ener = (WORD16 *)pstr_mps_state->mps_scratch_mem_v + INPUT_CHX2;
+
+ wet_ener = dry_ener + INPUT_CHX1_5;
+ q_wet_ener = q_dry_ener + IN_CH_2XOUT_CH;
+
+ scale = wet_ener + OUTPUT_CHX1_5;
+ q_scale = q_wet_ener + OUTPUT_CHX3;
+
+ dmx_real = scale + OUTPUT_CHX1_5;
+ dmx_imag = dmx_real + IN_CHXBP_SIZE;
+
+ qmf_output_real_dry = dmx_imag + IN_CHXBP_SIZE;
+
+ qmf_output_imag_dry = qmf_output_real_dry + OUT_CHXQB;
+
+ qmf_output_real_wet = qmf_output_imag_dry + OUT_CHXQB;
+
+ qmf_output_imag_wet = qmf_output_real_wet + OUT_CHXQB;
+
+ if (sub_band_tp->update_old_ener == STP_UPDATE_ENERGY_RATE) {
+ sub_band_tp->update_old_ener = 1;
+ for (ch = 0; ch < num_input_channels; ch++) {
+ old_dry_ener[ch] = run_dry_ener[ch];
+ q_old_dry_ener[ch] = q_run_dry_ener[ch];
+ }
+ for (ch = 0; ch < num_output_channels; ch++) {
+ old_wet_ener[ch] = run_wet_ener[ch];
+ q_old_wet_ener[ch] = q_run_wet_ener[ch];
+ }
+ } else
+ sub_band_tp->update_old_ener++;
+
+ for (ch = 0; ch < MAX_OUTPUT_CHANNELS_MPS; ch++) {
+ scale[ch] = ONE_IN_Q15;
+ q_scale[ch] = 15;
+ }
+
+ switch (tree_config) {
+ case TREE_5151:
+ i_lf = 0;
+ i_rf = 1;
+ i_c = 2;
+ i_lfe = 3;
+ i_ls = 4;
+ i_rs = 5;
+ loop_counter = 6;
+ break;
+ case TREE_5152:
+ i_lf = 0;
+ i_rf = 2;
+ i_c = 4;
+ i_lfe = 5;
+ i_ls = 1;
+ i_rs = 3;
+ loop_counter = 5;
+ break;
+ case TREE_525:
+ i_lf = 0;
+ i_rf = 2;
+ i_c = 4;
+ i_lfe = 5;
+ i_ls = 1;
+ i_rs = 3;
+ loop_counter = 4;
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ case TREE_7572:
+ i_lf = 0;
+ i_rf = 3;
+ i_c = 6;
+ i_lfe = 7;
+ i_ls = 2;
+ i_rs = 5;
+ i_al = 1;
+ i_ar = 4;
+ loop_counter = 6;
+ break;
+ case TREE_7571:
+ i_lf = 0;
+ i_rf = 3;
+ i_c = 6;
+ i_lfe = 7;
+ i_ls = 2;
+ i_rs = 5;
+ i_al = 1;
+ i_ar = 4;
+ loop_counter = 5;
+ break;
+ default:
+ break;
+ }
+
+ offset = ts * MAX_HYBRID_BANDS;
+ p_buffer_real = p_array_struct->buf_real + offset + HYBRID_BAND_BORDER;
+ p_buffer_imag = p_array_struct->buf_imag + offset + HYBRID_BAND_BORDER;
+
+ for (ch = 0; ch < num_output_channels; ch++) {
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ for (i = QMF_OUT_START_IDX; i < BP_SIZE; i++) {
+ *qmf_output_real_wet++ = *p_buffer_re++;
+ *qmf_output_imag_wet++ = *p_buffer_im++;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+ }
+ i = QMF_OUT_OFFSET * num_output_channels;
+ qmf_output_real_wet -= i;
+ qmf_output_imag_wet -= i;
+
+ p_buffer_re = qmf_output_real_dry;
+ p_buffer_im = qmf_output_imag_dry;
+
+ hyb_output_real_dry =
+ p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 6;
+ hyb_output_imag_dry =
+ p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 6;
+
+ for (ch = 0; ch < loop_counter; ch++) {
+ *p_buffer_re++ = hyb_output_real_dry[0] + hyb_output_real_dry[1];
+ *p_buffer_im++ = hyb_output_imag_dry[0] + hyb_output_imag_dry[1];
+
+ hyb_output_real_dry += TSXHB;
+ hyb_output_imag_dry += TSXHB;
+ }
+
+ hyb_output_real_dry =
+ p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 8;
+ hyb_output_imag_dry =
+ p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 8;
+
+ for (ch = 0; ch < loop_counter; ch++) {
+ *p_buffer_re++ = hyb_output_real_dry[0] + hyb_output_real_dry[1];
+ *p_buffer_im++ = hyb_output_imag_dry[0] + hyb_output_imag_dry[1];
+
+ hyb_output_real_dry += TSXHB;
+ hyb_output_imag_dry += TSXHB;
+ }
+
+ p_hyb_out_dry_real =
+ p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 10;
+ p_hyb_out_dry_imag =
+ p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 10;
+
+ for (i = 3; i < BP_SIZE; i++) {
+ hyb_output_real_dry = p_hyb_out_dry_real;
+ hyb_output_imag_dry = p_hyb_out_dry_imag;
+
+ for (ch = 0; ch < loop_counter; ch++) {
+ *p_buffer_re++ = *hyb_output_real_dry;
+ *p_buffer_im++ = *hyb_output_imag_dry;
+
+ hyb_output_real_dry += TSXHB;
+ hyb_output_imag_dry += TSXHB;
+ }
+ p_hyb_out_dry_real++;
+ p_hyb_out_dry_imag++;
+ }
+
+ for (n = 1; n < BP_SIZE; n++) {
+ switch (tree_config) {
+ case TREE_5151:
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+ dmx_real++;
+
+ break;
+ case TREE_5152:
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+ dmx_real++;
+
+ break;
+ case TREE_525:
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ break;
+ case TREE_7571:
+
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ break;
+ case TREE_7572:
+ qmf_output_real_dry++;
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ qmf_output_real_dry++;
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ *dmx_real = *qmf_output_real_dry++;
+ *dmx_real += *qmf_output_real_dry++;
+
+ *dmx_real = ixheaacd_mps_mult32_shr_30(*dmx_real,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_real++;
+
+ break;
+ default:
+ break;
+ }
+ }
+ dmx_real -= DMX_OFFSET;
+
+ for (n = 1; n < BP_SIZE; n++) {
+ switch (tree_config) {
+ case TREE_5151:
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+
+ qmf_output_imag_dry++;
+
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag++ += *qmf_output_imag_dry++;
+
+ dmx_imag++;
+
+ dmx_imag[0] = ixheaacd_mps_mult32_shr_30(
+ dmx_imag[0], tp_process_table_ptr->bpxgf[n]);
+ break;
+ case TREE_5152:
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag++ += *qmf_output_imag_dry++;
+
+ dmx_imag++;
+
+ dmx_imag[0] = ixheaacd_mps_mult32_shr_30(
+ dmx_imag[0], tp_process_table_ptr->bpxgf[n]);
+ break;
+ case TREE_525:
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(dmx_imag[0],
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ break;
+ case TREE_7571:
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ break;
+ case TREE_7572:
+ qmf_output_imag_dry++;
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+
+ qmf_output_imag_dry++;
+
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ *dmx_imag = *qmf_output_imag_dry++;
+ *dmx_imag += *qmf_output_imag_dry++;
+ *dmx_imag = ixheaacd_mps_mult32_shr_30(*dmx_imag,
+ tp_process_table_ptr->bpxgf[n]);
+ dmx_imag++;
+
+ break;
+ default:
+ break;
+ }
+ }
+ dmx_imag -= DMX_OFFSET;
+
+ for (ch = 0; ch < min(2, num_input_channels); ch++) {
+ dry_ener[ch] = 0;
+ q_dry_ener[ch] = 15;
+
+ for (n = 1; n < BP_SIZE; n++) {
+ qtemp1 = 10;
+ temp_1 = ixheaacd_mps_mult32(*dmx_real, *dmx_real, &qtemp1, qtemp1);
+ dmx_real += 2;
+ dry_ener[ch] =
+ ixheaacd_mps_add32(dry_ener[ch], temp_1, &q_dry_ener[ch], qtemp1);
+
+ qtemp1 = 10;
+ temp_1 = ixheaacd_mps_mult32(*dmx_imag, *dmx_imag, &qtemp1, qtemp1);
+ dmx_imag += 2;
+ dry_ener[ch] =
+ ixheaacd_mps_add32(dry_ener[ch], temp_1, &q_dry_ener[ch], qtemp1);
+ }
+ dmx_real -= DMX_OFFSET_MINUS_ONE;
+ dmx_imag -= DMX_OFFSET_MINUS_ONE;
+
+ temp_1 = ixheaacd_mps_mult32_shr_15(run_dry_ener[ch], STP_LPF_COEFF1_FIX);
+
+ temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, dry_ener[ch]);
+
+ run_dry_ener[ch] = ixheaacd_mps_add32(temp_1, temp_2, &(q_run_dry_ener[ch]),
+ q_dry_ener[ch]);
+
+ qtemp1 = q_old_dry_ener[ch];
+ temp_1 = ixheaacd_mps_add32(old_dry_ener[ch], ABS_THR_FIX, &qtemp1, 15);
+ ;
+
+ dry_ener[ch] = ixheaacd_mps_div_32(dry_ener[ch], temp_1, &qtemp2);
+ q_dry_ener[ch] = qtemp2 + q_dry_ener[ch] - qtemp1;
+ }
+
+ for (ch = 0; ch < num_output_channels; ch++) {
+ if (ch == i_lfe) continue;
+ if ((tree_config >= TREE_525) && (ch == i_c)) continue;
+ if ((tree_config == TREE_7571) && ((ch == i_ls) || (ch == i_rs))) continue;
+ if ((tree_config == TREE_7572) && ((ch == i_lf) || (ch == i_rf))) continue;
+
+ wet_ener[ch] = 0;
+ q_wet_ener[ch] = 15;
+
+ wet_ener[ch] = 0;
+ q_wet_ener[ch] = 15;
+ for (n = FIVE; n < BP_SIZE; n++) {
+ qtemp1 = 10;
+ temp_1 = ixheaacd_mps_mult32(*qmf_output_real_wet, *qmf_output_real_wet,
+ &qtemp1, qtemp1);
+ qmf_output_real_wet++;
+
+ qtemp2 = 10;
+ temp_2 = ixheaacd_mps_mult32(*qmf_output_imag_wet, *qmf_output_imag_wet,
+ &qtemp2, qtemp2);
+ qmf_output_imag_wet++;
+
+ temp_1 = ixheaacd_mps_add32(temp_1, temp_2, &qtemp1, qtemp2);
+
+ temp_1 = ixheaacd_mps_mult32(temp_1, tp_process_table_ptr->bp2xgf2[n],
+ &qtemp1, 57);
+
+ wet_ener[ch] =
+ ixheaacd_mps_add32(wet_ener[ch], temp_1, &q_wet_ener[ch], qtemp1);
+ }
+ temp_1 = ixheaacd_mps_mult32_shr_15(run_wet_ener[ch], STP_LPF_COEFF1_FIX);
+
+ temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
+
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, wet_ener[ch]);
+
+ run_wet_ener[ch] =
+ ixheaacd_mps_add32(temp_1, temp_2, &q_run_wet_ener[ch], q_wet_ener[ch]);
+
+ qtemp1 = q_old_wet_ener[ch];
+ temp_1 = ixheaacd_mps_add32(old_wet_ener[ch], ABS_THR_FIX, &qtemp1, 15);
+
+ wet_ener[ch] = ixheaacd_mps_div_32(wet_ener[ch], temp_1, &qtemp2);
+ q_wet_ener[ch] = qtemp2 + q_wet_ener[ch] - qtemp1;
+ }
+
+ damp = POINT_ONE_Q15;
+ one_minus_damp = POINT_NINE_Q15;
+ switch (tree_config) {
+ case TREE_5151:
+ case TREE_5152:
+ if (wet_ener[i_lf] != 0) {
+ scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
+ q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_lf] = dry_ener[0] << temp_1;
+ q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
+
+ if (wet_ener[i_rf] != 0) {
+ scale[i_rf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rf], &qtemp2);
+ q_scale[i_rf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_rf] = dry_ener[0] << temp_1;
+ q_scale[i_rf] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
+
+ if (wet_ener[i_c] != 0) {
+ scale[i_c] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_c], &qtemp2);
+ q_scale[i_c] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_c];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_c] = dry_ener[0] << temp_1;
+ q_scale[i_c] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_c] = ixheaacd_mps_sqrt(scale[i_c], &(q_scale[i_c]), sqrt_tab);
+
+ if (wet_ener[i_ls] != 0) {
+ scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
+ q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_ls] = dry_ener[0] << temp_1;
+ q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
+
+ if (wet_ener[i_rs] != 0) {
+ scale[i_rs] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rs], &qtemp2);
+ q_scale[i_rs] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rs];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_rs] = dry_ener[0] << temp_1;
+ q_scale[i_rs] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
+
+ for (ch = 0; ch < 6; ch++) {
+ if (ch == 3 && tree_config == 0) continue;
+ temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
+ scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
+ scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
+ if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
+ if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
+ scale[ch] = ONE_BY_STP_SCALE_LIMIT;
+ }
+
+ break;
+ case TREE_525:
+ if (wet_ener[i_lf] != 0) {
+ scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
+ q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_lf] = dry_ener[0] << temp_1;
+ q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
+
+ if (wet_ener[i_rf] != 0) {
+ scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
+ q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rf] = dry_ener[1] << temp_1;
+ q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
+
+ if (wet_ener[i_ls] != 0) {
+ scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
+ q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_ls] = dry_ener[0] << temp_1;
+ q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
+
+ if (wet_ener[i_rs] != 0) {
+ scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
+ q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rs] = dry_ener[1] << temp_1;
+ q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
+
+ for (ch = 0; ch < 4; ch++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
+ scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
+ scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
+ if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
+ if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
+ scale[ch] = ONE_BY_STP_SCALE_LIMIT;
+ }
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ if (wet_ener[i_lf] != 0) {
+ scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
+ q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_lf] = dry_ener[0] << temp_1;
+ q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
+
+ if (wet_ener[i_rf] != 0) {
+ scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
+ q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rf] = dry_ener[1] << temp_1;
+ q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
+
+ if (wet_ener[i_ls] != 0) {
+ scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
+ q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_ls] = dry_ener[0] << temp_1;
+ q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
+
+ if (wet_ener[i_rs] != 0) {
+ scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
+ q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rs] = dry_ener[1] << temp_1;
+ q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
+
+ if (wet_ener[i_al] != 0) {
+ scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
+ q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_al] = dry_ener[0] << temp_1;
+ q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
+
+ if (wet_ener[i_ar] != 0) {
+ scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
+ q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_ar] = dry_ener[1] << temp_1;
+ q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
+
+ for (ch = 0; ch < 6; ch++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
+ scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
+ scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
+ if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
+ if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
+ scale[ch] = ONE_BY_STP_SCALE_LIMIT;
+ }
+
+ break;
+ case TREE_7571:
+ if (wet_ener[i_lf] != 0) {
+ scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
+ q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_lf] = dry_ener[0] << temp_1;
+ q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
+
+ if (wet_ener[i_rf] != 0) {
+ scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
+ q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rf] = dry_ener[1] << temp_1;
+ q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
+
+ if (wet_ener[i_al] != 0) {
+ scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
+ q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_al] = dry_ener[0] << temp_1;
+ q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
+
+ if (wet_ener[i_ar] != 0) {
+ scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
+ q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_ar] = dry_ener[1] << temp_1;
+ q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
+ for (ch = 0; ch < FIVE; ch++) {
+ if (ch == 2) continue;
+ temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
+ scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
+ scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
+ if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
+ if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
+ scale[ch] = ONE_BY_STP_SCALE_LIMIT;
+ }
+
+ break;
+ case TREE_7572:
+ if (wet_ener[i_ls] != 0) {
+ scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
+ q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_ls] = dry_ener[0] << temp_1;
+ q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
+
+ if (wet_ener[i_rs] != 0) {
+ scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
+ q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_rs] = dry_ener[1] << temp_1;
+ q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
+
+ if (wet_ener[i_al] != 0) {
+ scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
+ q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[0]);
+ scale[i_al] = dry_ener[0] << temp_1;
+ q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
+ }
+ scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
+
+ if (wet_ener[i_ar] != 0) {
+ scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
+ q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
+ } else {
+ temp_1 = ixheaacd_norm32(dry_ener[1]);
+ scale[i_ar] = dry_ener[1] << temp_1;
+ q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
+ }
+ scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
+ for (ch = 0; ch < 6; ch++) {
+ if (ch == 3 || ch == 0) continue;
+ temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
+ scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
+ scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
+ if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
+ if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
+ scale[ch] = ONE_BY_STP_SCALE_LIMIT;
+ }
+
+ break;
+ default:
+ break;
+ }
+
+ for (ch = 0; ch < num_output_channels; ch++) {
+ temp_1 = ixheaacd_mps_mult32_shr_15(STP_LPF_COEFF2_FIX, scale[ch]);
+ temp_2 =
+ ixheaacd_mps_mult32_shr_15(ONE_MINUS_STP_LPF_COEFF2, prev_tp_scale[ch]);
+ scale[ch] = temp_1 + temp_2;
+ prev_tp_scale[ch] = scale[ch];
+ }
+
+ offset = ts * MAX_HYBRID_BANDS;
+ p_buffer_real = p_array_struct->buf_real + offset + HYBRID_BAND_BORDER;
+ p_buffer_imag = p_array_struct->buf_imag + offset + HYBRID_BAND_BORDER;
+
+ p_buf_real = p_array_struct->buffer_real + offset + FIVE;
+ p_buf_imag = p_array_struct->buffer_imag + offset + FIVE;
+
+ p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry +
+ ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
+ p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry +
+ ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
+
+ for (ch = 0; ch < num_output_channels; ch++) {
+ no_scaling = 1;
+
+ ixheaacd_get_ch_idx(pstr_mps_state, ch, &i);
+ if (i != -1) {
+ no_scaling = !pstr_mps_state->aux_struct->temp_shape_enable_channel_stp[i];
+ }
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+
+ hyb_output_real_dry = p_hyb_out_dry_real;
+ hyb_output_imag_dry = p_hyb_out_dry_imag;
+
+ if (no_scaling == 1) {
+ for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
+ *p_buf_re++ = *hyb_output_real_dry++ + *p_buffer_re++;
+
+ *p_buf_im++ = *hyb_output_imag_dry++ + *p_buffer_im++;
+ }
+
+ for (; n < hybrid_bands; n++, k++) {
+ temp = (no_scaling ? ONE_IN_Q15 : scale[ch]);
+
+ *p_buf_re++ = *hyb_output_real_dry++ + *p_buffer_re++;
+
+ *p_buf_im++ = *hyb_output_imag_dry++ + *p_buffer_im++;
+ }
+ } else {
+ for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
+ temp = ixheaacd_mps_mult32_shr_30(
+ scale[ch], tp_process_table_ptr->bp[n - QMF_TO_HYB_OFFSET]);
+
+ *p_buf_re++ = *hyb_output_real_dry++ +
+ ixheaacd_mps_mult32_shr_15(temp, *p_buffer_re);
+ p_buffer_re++;
+
+ *p_buf_im++ = *hyb_output_imag_dry++ +
+ ixheaacd_mps_mult32_shr_15(temp, *p_buffer_im);
+ p_buffer_im++;
+ }
+
+ for (; n < hybrid_bands; n++, k++) {
+ temp = (no_scaling ? ONE_IN_Q15 : scale[ch]);
+
+ *p_buf_re++ = *hyb_output_real_dry++ +
+ ixheaacd_mps_mult32_shr_15(temp, *p_buffer_re);
+ p_buffer_re++;
+
+ *p_buf_im++ = *hyb_output_imag_dry++ +
+ ixheaacd_mps_mult32_shr_15(temp, *p_buffer_im);
+ p_buffer_im++;
+ }
+ }
+
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+
+ return;
+}
+
+VOID ixheaacd_tp_process(ia_heaac_mps_state_struct *pstr_mps_state) {
+ WORD32 ch, ts, hyb, n;
+ WORD32 temp, temp_1, temp_2;
+ ia_mps_dec_synthesis_interface *syn = pstr_mps_state->syn;
+ WORD32 *hyb_output_real_wet, *hyb_output_imag_wet;
+ WORD32 *hyb_output_real_dry, *hyb_output_imag_dry;
+
+ WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
+ WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
+ WORD32 *buf_real, *buf_imag;
+
+ WORD32 num_output_channels = pstr_mps_state->num_output_channels;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at;
+ WORD32 tree_config = pstr_mps_state->tree_config;
+ WORD32 up_mix_type = pstr_mps_state->up_mix_type;
+ WORD32 tp_hyb_band_border = pstr_mps_state->tp_hyb_band_border;
+
+ ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
+ WORD32 *p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
+ WORD32 *p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
+ WORD32 *p_hyb_out_dry_re, *p_hyb_out_dry_im;
+
+ WORD32 *p_time_out;
+
+ p_buffer_real = p_array_struct->buf_real;
+ p_buffer_imag = p_array_struct->buf_imag;
+
+ p_buf_real = p_array_struct->buffer_real;
+ p_buf_imag = p_array_struct->buffer_imag;
+
+ if (!pstr_mps_state->scaling_enable) {
+ for (ch = 0; ch < num_output_channels; ch++) {
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_wet = p_buffer_re;
+ hyb_output_imag_wet = p_buffer_im;
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ buf_real = p_buf_re;
+ buf_imag = p_buf_im;
+
+ temp_1 = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp_2 = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ for (n = 1; n < 6; n++) {
+ temp_1 += *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp_2 += *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ }
+
+ *buf_real++ = temp_1;
+ *buf_imag++ = temp_2;
+
+ temp = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_real = temp + *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ *buf_imag = temp + *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+
+ buf_real++;
+ buf_imag++;
+
+ temp = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_real = temp + *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ *buf_imag = temp + *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+
+ buf_real++;
+ buf_imag++;
+
+ for (n = 0; n < qmf_bands; n++) {
+ *buf_real++ = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_imag++ = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ }
+
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_buf_re += MAX_HYBRID_BANDS;
+ p_buf_im += MAX_HYBRID_BANDS;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+ } else {
+ for (ch = 0; ch < num_output_channels; ch++) {
+ p_buffer_re = p_buffer_real;
+ p_buffer_im = p_buffer_imag;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+
+ p_hyb_out_dry_re = p_hyb_out_dry_real;
+ p_hyb_out_dry_im = p_hyb_out_dry_imag;
+
+ for (ts = 0; ts < time_slots; ts++) {
+ hyb_output_real_wet = p_buffer_re;
+ hyb_output_imag_wet = p_buffer_im;
+ hyb_output_real_dry = p_hyb_out_dry_re;
+ hyb_output_imag_dry = p_hyb_out_dry_im;
+
+ buf_real = p_buf_re;
+ buf_imag = p_buf_im;
+
+ temp_1 = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp_2 = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ for (n = 1; n < 6; n++) {
+ temp_1 += *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ temp_2 += *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ }
+
+ *buf_real++ = temp_1;
+ *buf_imag++ = temp_2;
+
+ *buf_real = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_real += *hyb_output_real_dry++ + *hyb_output_real_wet++;
+
+ *buf_imag = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ *buf_imag += *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+
+ buf_real++;
+ buf_imag++;
+
+ *buf_real = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_real += *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_imag = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ *buf_imag += *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+
+ buf_real++;
+ buf_imag++;
+
+ for (hyb = 3; hyb < tp_hyb_band_border - QMF_TO_HYB_OFFSET; hyb++) {
+ *buf_real++ = *hyb_output_real_dry++ + *hyb_output_real_wet++;
+ *buf_imag++ = *hyb_output_imag_dry++ + *hyb_output_imag_wet++;
+ }
+ p_buffer_re += MAX_HYBRID_BANDS;
+ p_buffer_im += MAX_HYBRID_BANDS;
+
+ p_buf_re += MAX_HYBRID_BANDS;
+ p_buf_im += MAX_HYBRID_BANDS;
+
+ p_hyb_out_dry_re += MAX_HYBRID_BANDS;
+ p_hyb_out_dry_im += MAX_HYBRID_BANDS;
+ }
+ p_buffer_real += TSXHB;
+ p_buffer_imag += TSXHB;
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+
+ p_hyb_out_dry_real += TSXHB;
+ p_hyb_out_dry_imag += TSXHB;
+ }
+
+ for (ts = 0; ts < time_slots; ts++) {
+ ixheaacd_subband_tp(pstr_mps_state, ts);
+ }
+ }
+
+ if ((!pstr_mps_state->bs_config.arbitrary_tree) &&
+ ((up_mix_type != 2) && (up_mix_type != 3))) {
+ WORD32 *time_out_5xxx =
+ pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->time_out_idx_5xxx;
+ WORD32 *time_out_7xxx =
+ pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->time_out_idx_7xxx;
+
+ p_buf_real = p_array_struct->buffer_real;
+ p_buf_imag = p_array_struct->buffer_imag;
+
+ for (ch = 0; ch < num_output_channels_at; ch++) {
+ WORD32 tempch = 0;
+ switch (tree_config) {
+ case TREE_5151:
+ tempch = ch;
+ break;
+ case TREE_5152:
+ case TREE_525:
+ tempch = time_out_5xxx[ch];
+ break;
+ case TREE_7271:
+ case TREE_7272:
+ case TREE_7571:
+ case TREE_7572:
+ tempch = time_out_7xxx[ch];
+ break;
+ default:
+ break;
+ }
+ p_time_out = p_array_struct->time_out + tempch * QBXTS;
+ syn->syn_filter_bank(&pstr_mps_state->syn_qmf_bank, p_buf_real, p_buf_imag,
+ p_time_out, ch, qmf_bands, time_slots,
+ pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr);
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+ }
+ } else {
+ p_time_out = p_array_struct->time_out;
+ for (ch = 0; ch < num_output_channels_at; ch++) {
+ syn->syn_filter_bank(&pstr_mps_state->syn_qmf_bank, p_buf_real, p_buf_imag,
+ p_time_out, ch, qmf_bands, time_slots,
+ pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr);
+
+ p_buf_real += TSXHB;
+ p_buf_imag += TSXHB;
+ p_time_out += QBXTS;
+ }
+ }
+
+ return;
+}
diff --git a/decoder/ixheaacd_mps_temp_reshape.c b/decoder/ixheaacd_mps_temp_reshape.c
index d9a73f4..2138c78 100644
--- a/decoder/ixheaacd_mps_temp_reshape.c
+++ b/decoder/ixheaacd_mps_temp_reshape.c
@@ -19,12 +19,8 @@
*/
#include <math.h>
#include "ixheaacd_type_def.h"
+#include "ixheaacd_constants.h"
#include "ixheaacd_bitbuffer.h"
-#include "ixheaacd_defines.h"
-#include "ixheaacd_aac_rom.h"
-#include "ixheaacd_pulsedata.h"
-#include "ixheaacd_pns.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_common_rom.h"
#include "ixheaacd_sbrdecsettings.h"
#include "ixheaacd_sbr_scale.h"
@@ -35,13 +31,10 @@
#include "ixheaacd_config.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
-
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
-#include "ixheaacd_mps_interface.h"
-
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
-#define min(a, b) ((a) < (b) ? (a) : (b))
#define DIR_DIFF_IN 0
#define DOWNMIX_IN 1
diff --git a/decoder/ixheaacd_mps_tonality.c b/decoder/ixheaacd_mps_tonality.c
new file mode 100644
index 0000000..34a6a7e
--- /dev/null
+++ b/decoder/ixheaacd_mps_tonality.c
@@ -0,0 +1,432 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include "ixheaacd_type_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_error_codes.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+#include "ixheaacd_lpp_tran.h"
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+#include "ixheaacd_env_extr.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_config.h"
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_bitdec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_basic_op.h"
+
+VOID ixheaacd_init_tonality(ia_heaac_mps_state_struct *pstr_mps_state) {
+ ia_mps_dec_tonality_state_struct *ton_state = pstr_mps_state->mps_persistent_mem.ton_state;
+ WORD32 cnt = pstr_mps_state->qmf_bands * 8;
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+
+ memset(ton_state->spec_prev_real, 0, cnt * sizeof(ton_state->spec_prev_real[0]));
+ memset(ton_state->spec_prev_imag, 0, cnt * sizeof(ton_state->spec_prev_imag[0]));
+ memset(ton_state->p_cross_real, 0, cnt * sizeof(ton_state->p_cross_real[0]));
+ memset(ton_state->p_cross_imag, 0, cnt * sizeof(ton_state->p_cross_imag[0]));
+ memset(ton_state->p_sum, 0, cnt * sizeof(ton_state->p_sum[0]));
+ memset(ton_state->p_sum_prev, 0, cnt * sizeof(ton_state->p_sum_prev[0]));
+
+ memset(ton_state->buf_real, 0, qmf_bands * 6 * sizeof(ton_state->buf_real[0][0]));
+ memset(ton_state->buf_imag, 0, qmf_bands * 6 * sizeof(ton_state->buf_imag[0][0]));
+ memset(ton_state->win_buf_real, 0, qmf_bands * 16 * sizeof(ton_state->win_buf_real[0][0]));
+ memset(ton_state->win_buf_imag, 0, qmf_bands * 16 * sizeof(ton_state->win_buf_imag[0][0]));
+}
+
+VOID ixheaacd_zoom_fft16(WORD32 *in_real, WORD32 *in_imag, WORD32 *out_real, WORD32 *out_imag,
+ WORD32 qmf_band, WORD32 dfrac,
+ ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr) {
+ WORD32 blackman[16];
+
+ WORD32 v_real[16], v_imag[16];
+ WORD32 t_real, t_imag;
+ WORD32 e_real, e_imag;
+
+ WORD32 temp_1, temp_2, temp3, temp4;
+ const WORD32 *bitrev = ia_mps_dec_mps_table_ptr->tonality_table_ptr->bitrev;
+ const WORD32 *w_real = ia_mps_dec_mps_table_ptr->tonality_table_ptr->w_real;
+ const WORD32 *w_imag = ia_mps_dec_mps_table_ptr->tonality_table_ptr->w_imag;
+ const WORD32 *cos_tab = ia_mps_dec_mps_table_ptr->hybrid_table_ptr->cosine_array;
+ const WORD32 *sin_tab = ia_mps_dec_mps_table_ptr->hybrid_table_ptr->sine_array;
+
+ WORD32 i, j, s1, s2;
+
+ temp3 = TWO_PI_BY_FIFTEEN_Q15;
+
+ for (i = 0; i < 16; i++) {
+ temp_1 = (i << 15) + dfrac;
+ temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, temp3);
+ temp_2 = ixheaacd_mps_cos(temp_2, cos_tab);
+ temp_2 >>= 1;
+
+ temp_1 <<= 1;
+ temp_1 = ixheaacd_mps_cos(temp_1, cos_tab);
+
+ temp_1 = ixheaacd_mps_mult32x16_shr_16(temp_1, TWO_BY_TWENTYFIVE_Q16);
+
+ temp4 = POINT_FOUR_TWO_Q15 - temp_2;
+
+ blackman[i] = temp_1 + temp4;
+ }
+
+ for (i = 0; i < 16; i++) {
+ WORD32 idx = bitrev[i];
+ temp_1 = ixheaacd_mps_mult32_shr_30(in_real[i], w_real[i]) -
+ ixheaacd_mps_mult32_shr_30(in_imag[i], w_imag[i]);
+ v_real[idx] = ixheaacd_mps_mult32_shr_30(temp_1, blackman[i]);
+
+ temp_1 = ixheaacd_mps_mult32_shr_30(in_real[i], w_imag[i]) +
+ ixheaacd_mps_mult32_shr_30(in_imag[i], w_real[i]);
+ v_imag[idx] = ixheaacd_mps_mult32_shr_30(temp_1, blackman[i]);
+ }
+
+ for (s1 = 1, s2 = 16; s1 < 8; s1 <<= 1, s2 >>= 1) {
+ for (i = 0; i < 16; i += 2 * s1) {
+ for (j = 0; j < s1; j++) {
+ t_real = ixheaacd_mps_mult32_shr_30(v_real[i + j + s1], w_real[j * s2]) -
+ ixheaacd_mps_mult32_shr_30(v_imag[i + j + s1], w_imag[j * s2]);
+ t_imag = ixheaacd_mps_mult32_shr_30(v_real[i + j + s1], w_imag[j * s2]) +
+ ixheaacd_mps_mult32_shr_30(v_imag[i + j + s1], w_real[j * s2]);
+
+ v_real[i + j + s1] = v_real[i + j] - t_real;
+ v_imag[i + j + s1] = v_imag[i + j] - t_imag;
+
+ v_real[i + j] += t_real;
+ v_imag[i + j] += t_imag;
+ }
+ }
+ }
+
+ for (j = 0; j < 8; j++) {
+ WORD32 idx = j << 1;
+ t_real = ixheaacd_mps_mult32_shr_30(v_real[j + 8], w_real[idx]) -
+ ixheaacd_mps_mult32_shr_30(v_imag[j + 8], w_imag[idx]);
+ t_imag = ixheaacd_mps_mult32_shr_30(v_real[j + 8], w_imag[idx]) +
+ ixheaacd_mps_mult32_shr_30(v_imag[j + 8], w_real[idx]);
+
+ if ((qmf_band & ONE_BIT_MASK) == 0) {
+ out_real[j] = v_real[j] + t_real;
+ out_imag[j] = v_imag[j] + t_imag;
+ } else {
+ out_real[j] = v_real[j] - t_real;
+ out_imag[j] = v_imag[j] - t_imag;
+ }
+ }
+
+ temp3 = MINUS_PI_BY_EIGHT_Q15;
+ for (i = 0; i < 8; i++) {
+ if ((qmf_band & ONE_BIT_MASK) == 0) {
+ temp_1 = dfrac * i;
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, temp3);
+ e_real = ixheaacd_mps_cos(temp_1, cos_tab);
+ e_imag = ixheaacd_mps_sin(temp_1, sin_tab);
+ } else {
+ temp_1 = dfrac * (i - 8);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, temp3);
+ e_real = ixheaacd_mps_cos(temp_1, cos_tab);
+ e_imag = ixheaacd_mps_sin(temp_1, sin_tab);
+ }
+
+ t_real = ixheaacd_mps_mult32_shr_15(out_real[i], e_real) -
+ ixheaacd_mps_mult32_shr_15(out_imag[i], e_imag);
+ out_imag[i] = ixheaacd_mps_mult32_shr_15(out_real[i], e_imag) +
+ ixheaacd_mps_mult32_shr_15(out_imag[i], e_real);
+ out_real[i] = t_real;
+ }
+}
+
+VOID ixheaacd_measure_tonality(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 *tonality) {
+ ia_mps_dec_tonality_state_struct *ton_state = pstr_mps_state->mps_persistent_mem.ton_state;
+
+ WORD32 *qmf_real;
+ WORD32 *qmf_imag;
+
+ WORD32 *spec_zoom_real;
+ WORD32 *spec_zoom_imag;
+
+ WORD32 *spec_prev_real = ton_state->spec_prev_real;
+ WORD32 *spec_prev_imag = ton_state->spec_prev_imag;
+
+ WORD32 *p_cross_real = ton_state->p_cross_real;
+ WORD32 *p_cross_imag = ton_state->p_cross_imag;
+
+ WORD32 *p_sum = ton_state->p_sum;
+ WORD32 *p_sum_prev = ton_state->p_sum_prev;
+
+ WORD32 *p_max;
+
+ WORD32 *coh_spec;
+ WORD32 *pow_spec;
+
+ WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
+ WORD32 *buf_real, *buf_imag;
+ WORD32 g, gmax;
+ WORD32 i, j, q, s, c, cnt;
+
+ WORD32 const *part;
+ WORD32 pstart;
+ WORD32 pstop = 0;
+ WORD32 pqmf, num, den, tmp_ton, beta, dwin, dfrac;
+ WORD16 q_beta, q_tmp_ton;
+
+ WORD32 qmf_bands = pstr_mps_state->qmf_bands;
+ WORD32 time_slots = pstr_mps_state->time_slots;
+ WORD32 num_input_channels = pstr_mps_state->num_input_channels;
+ WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
+ WORD32 sampling_freq = pstr_mps_state->sampling_freq;
+ const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
+
+ WORD32 nstart;
+
+ WORD32 tmp_real, tmp_imag;
+
+ WORD32 temp_1, temp;
+ WORD16 qtemp1, qtemp2;
+
+ spec_zoom_real =
+ (WORD32 *)((WORD8 *)pstr_mps_state->mps_scratch_mem_v + SCRATCH_OFFSET_SMOOTHING);
+ spec_zoom_imag = spec_zoom_real + QMF_BANDSX8;
+ p_max = spec_zoom_imag + QMF_BANDSX8;
+ coh_spec = p_max + QMF_BANDSX8;
+ pow_spec = coh_spec + QMF_BANDSX8;
+
+ qmf_real = pow_spec + QMF_BANDSX8;
+ qmf_imag = qmf_real + QBXTS;
+
+ switch (num_parameter_bands) {
+ case PARAMETER_BANDS_4:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part4;
+ break;
+ case PARAMETER_BANDS_5:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part5;
+ break;
+ case PARAMETER_BANDS_7:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part7;
+ break;
+ case PARAMETER_BANDS_10:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part10;
+ break;
+ case PARAMETER_BANDS_14:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part14;
+ break;
+ case PARAMETER_BANDS_20:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part20;
+ break;
+ case PARAMETER_BANDS_28:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part28;
+ break;
+ case PARAMETER_BANDS_40:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part40;
+ break;
+ default:
+ part = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->part4;
+ break;
+ }
+
+ temp = time_slots - 6;
+
+ p_buf_real = pstr_mps_state->array_struct->buf_real;
+ p_buf_imag = pstr_mps_state->array_struct->buf_imag;
+
+ for (q = 0; q < qmf_bands; q++) {
+ qmf_real += 6;
+ qmf_imag += 6;
+
+ p_buf_re = p_buf_real;
+ p_buf_im = p_buf_imag;
+ for (s = 0; s < time_slots; s++) {
+ tmp_real = 0;
+ tmp_imag = 0;
+
+ buf_real = p_buf_re;
+ buf_imag = p_buf_im;
+
+ for (c = 0; c < num_input_channels; c++) {
+ tmp_real += *buf_real;
+ tmp_imag += *buf_imag;
+
+ buf_real += TSXHB;
+ buf_imag += TSXHB;
+ }
+
+ if (s == temp) {
+ qmf_real -= time_slots;
+ qmf_imag -= time_slots;
+ }
+
+ if (s + 6 < time_slots) {
+ *qmf_real++ = tmp_real;
+ *qmf_imag++ = tmp_imag;
+ } else {
+ *qmf_real++ = ton_state->buf_real[q][s + 6 - time_slots];
+ *qmf_imag++ = ton_state->buf_imag[q][s + 6 - time_slots];
+
+ ton_state->buf_real[q][s + 6 - time_slots] = tmp_real;
+ ton_state->buf_imag[q][s + 6 - time_slots] = tmp_imag;
+ }
+ p_buf_re += MAX_HYBRID_BANDS;
+ p_buf_re += MAX_HYBRID_BANDS;
+ }
+ qmf_real += temp;
+ qmf_imag += temp;
+
+ p_buf_real++;
+ p_buf_imag++;
+ }
+
+ gmax = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->gmax_fix[time_slots];
+ dwin = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->dwin_fix[time_slots];
+
+ qtemp1 = 15;
+ temp_1 = ixheaacd_mps_mult32(dwin, (40 * (qmf_bands)), &qtemp1, 0);
+ beta = ixheaacd_mps_div_32(temp_1, sampling_freq, &q_beta);
+ q_beta = q_beta + qtemp1;
+ beta = ixheaacd_mps_convert_to_qn(beta, q_beta, 15);
+
+ for (i = 0; i < num_parameter_bands; i++) {
+ tonality[i] = ONE_IN_Q15;
+ }
+
+ for (g = 0; g < gmax; g++) {
+ nstart = pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->nstart_fix[g][time_slots];
+ if (time_slots <= 16)
+ dfrac = 0;
+ else
+ dfrac =
+ pstr_mps_state->ia_mps_dec_mps_table.tonality_table_ptr->dfrac_fix[g][time_slots - 16];
+
+ qmf_real = pow_spec + QBX48;
+ qmf_imag = qmf_real + QMF_BANDSXTSX6;
+ for (q = 0; q < qmf_bands; q++) {
+ for (i = 0; i < 16; i++) {
+ if (nstart + i < 0) {
+ ton_state->win_buf_real[q][i] = ton_state->win_buf_real[q][16 + nstart + i];
+ ton_state->win_buf_imag[q][i] = ton_state->win_buf_imag[q][16 + nstart + i];
+ } else {
+ ton_state->win_buf_real[q][i] = qmf_real[nstart + i];
+ ton_state->win_buf_imag[q][i] = qmf_imag[nstart + i];
+ }
+ }
+ qmf_real += time_slots;
+ qmf_imag += time_slots;
+ }
+
+ for (q = 0; q < qmf_bands; q++) {
+ ixheaacd_zoom_fft16(&(ton_state->win_buf_real[q][0]), &(ton_state->win_buf_imag[q][0]),
+ &(spec_zoom_real[q * 8]), &(spec_zoom_imag[q * 8]), q, dfrac,
+ &(pstr_mps_state->ia_mps_dec_mps_table));
+ }
+
+ cnt = 8 * qmf_bands;
+ for (i = 0; i < cnt; i++) {
+ WORD64 temp;
+ WORD32 one_minus_beta = ONE_IN_Q15 - beta;
+ WORD32 x = *spec_zoom_real;
+ WORD32 y = *spec_zoom_imag;
+
+ temp = x * spec_prev_real[i] + y * spec_prev_imag[i];
+ temp_1 = (WORD32)(temp >> 10);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, beta);
+
+ p_cross_real[i] = ixheaacd_mps_mult32_shr_15(p_cross_real[i], one_minus_beta);
+ p_cross_real[i] += temp_1;
+
+ temp = y * spec_prev_real[i] - x * spec_prev_imag[i];
+ temp_1 = (WORD32)(temp >> 10);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, beta);
+
+ p_cross_imag[i] = ixheaacd_mps_mult32_shr_15(p_cross_imag[i], one_minus_beta);
+ p_cross_imag[i] += temp_1;
+
+ temp = x * x + y * y;
+ temp_1 = (WORD32)(temp >> 10);
+ temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, beta);
+
+ p_sum[i] = ixheaacd_mps_mult32_shr_15(p_sum[i], one_minus_beta);
+ p_sum[i] += temp_1;
+
+ *p_max = (p_sum[i] > p_sum_prev[i]) ? p_sum[i] : p_sum_prev[i];
+
+ p_sum_prev[i] = p_sum[i];
+
+ temp = p_cross_real[i] * p_cross_real[i] + p_cross_imag[i] * p_cross_imag[i];
+ temp_1 = (WORD32)(temp >> 10);
+ qtemp1 = 10;
+ temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab);
+ *coh_spec = ixheaacd_mps_div_32(temp_1, *p_max++, &qtemp2);
+ qtemp2 = qtemp2 + qtemp1 - 10;
+ *coh_spec = ixheaacd_mps_convert_to_qn(*coh_spec, qtemp2, 10);
+ coh_spec++;
+
+ temp = x * x + y * y + spec_prev_real[i] * spec_prev_real[i] +
+ spec_prev_imag[i] * spec_prev_imag[i];
+ *pow_spec = (WORD32)(temp >> 10);
+
+ spec_prev_real[i] = *spec_zoom_real++;
+ spec_prev_imag[i] = *spec_zoom_imag++;
+ }
+ spec_zoom_real -= i;
+ spec_zoom_imag -= i;
+ p_max -= i;
+ coh_spec -= i;
+ pow_spec -= i;
+
+ pstart = 0;
+ pqmf = 0;
+ for (i = 0; i < num_parameter_bands; i++) {
+ pqmf += part[i];
+ pstop = ((pqmf << 3) + ONE_IN_Q14) >> 15;
+
+ num = 0;
+ den = 0;
+ for (j = pstart; j < pstop; j++) {
+ num += ixheaacd_mps_mult32_shr_n(*pow_spec, *coh_spec, 10);
+ coh_spec++;
+ den += *pow_spec++;
+ }
+
+ tmp_ton = ixheaacd_mps_div_32(num, den, &q_tmp_ton);
+ ixheaacd_mps_convert_to_qn(tmp_ton, q_tmp_ton, 15);
+
+ if (tmp_ton > 32767) {
+ tmp_ton = 32767;
+ }
+
+ if (tmp_ton < tonality[i]) tonality[i] = tmp_ton;
+
+ pstart = pstop;
+ }
+ coh_spec -= pstop;
+ pow_spec -= pstop;
+ }
+ return;
+}
diff --git a/decoder/ixheaacd_mps_tonality.h b/decoder/ixheaacd_mps_tonality.h
new file mode 100644
index 0000000..f42bf8f
--- /dev/null
+++ b/decoder/ixheaacd_mps_tonality.h
@@ -0,0 +1,27 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_TONALITY_H
+#define IXHEAACD_MPS_TONALITY_H
+
+VOID ixheaacd_init_tonality(ia_heaac_mps_state_struct *pstr_mps_state);
+
+VOID ixheaacd_measure_tonality(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 *tonality);
+
+#endif /* IXHEAACD_MPS_TONALITY_H */
diff --git a/decoder/ixheaacd_mps_tp_process.h b/decoder/ixheaacd_mps_tp_process.h
new file mode 100644
index 0000000..4257bc1
--- /dev/null
+++ b/decoder/ixheaacd_mps_tp_process.h
@@ -0,0 +1,38 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#ifndef IXHEAACD_MPS_TP_PROCESS_H
+#define IXHEAACD_MPS_TP_PROCESS_H
+
+#define STP_LPF_COEFF1_FIX (31130)
+#define STP_LPF_COEFF2_FIX (14746)
+#define ONE_MINUS_STP_LPF_COEFF2 (18022)
+#define STP_SCALE_LIMIT_FIX (92406)
+#define ONE_BY_STP_SCALE_LIMIT (11620)
+#define QMF_TO_HYB_OFFSET (7)
+#define DMX_OFFSET (48)
+#define DMX_OFFSET_MINUS_ONE (47)
+#define QMF_OUT_START_IDX (5)
+#define QMF_OUT_OFFSET (20)
+#define HYBRID_BAND_BORDER (12)
+#define FIVE (5)
+
+VOID ixheaacd_tp_process(ia_heaac_mps_state_struct *pstr_mps_state);
+
+#endif /* IXHEAACD_MPS_TP_PROCESS_H */
diff --git a/decoder/ixheaacd_multichannel.c b/decoder/ixheaacd_multichannel.c
index 8409fd2..66c252b 100644
--- a/decoder/ixheaacd_multichannel.c
+++ b/decoder/ixheaacd_multichannel.c
@@ -43,6 +43,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -72,7 +75,12 @@
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_interface.h"
#include "ixheaacd_struct_def.h"
#include "ixheaacd_headerdecode.h"
@@ -133,7 +141,7 @@ WORD cblock_decode_huff_symbol(UWORD8 *ptr_read_next, WORD32 bit_pos,
}
IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
- ia_handle_bit_buf_struct bs, ia_aac_decoder_struct *aac_handle,
+ ia_bit_buf_struct *it_bit_buf, ia_aac_decoder_struct *aac_handle,
WORD32 samp_rate_idx, ia_aac_dec_tables_struct *ptr_aac_tables,
ixheaacd_misc_tables *common_tables_ptr, WORD *element_index_order,
ia_enhaacplus_dec_ind_cc *ind_channel_info, WORD32 total_channels,
@@ -155,11 +163,11 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
IA_ERRORCODE error_status = IA_NO_ERROR;
- element_instance_tag = ixheaacd_read_bits_buf(bs, 4);
+ element_instance_tag = ixheaacd_read_bits_buf(it_bit_buf, 4);
element_index_order[0] = element_instance_tag;
- ind_sw_cce_flag = ixheaacd_read_bits_buf(bs, 1);
- num_coupled_elements = ixheaacd_read_bits_buf(bs, 3);
+ ind_sw_cce_flag = ixheaacd_read_bits_buf(it_bit_buf, 1);
+ num_coupled_elements = ixheaacd_read_bits_buf(it_bit_buf, 3);
for (c = 0; c < MAX_BS_ELEMENT; c++)
ind_channel_info->elements_coupled[c] = -1;
@@ -169,11 +177,11 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
for (c = 0; c < (num_coupled_elements + 1); c++) {
num_gain_element_lists++;
- ind_channel_info->cc_target_is_cpe[c] = ixheaacd_read_bits_buf(bs, 1);
- ind_channel_info->cc_target_tag_select[c] = ixheaacd_read_bits_buf(bs, 4);
+ ind_channel_info->cc_target_is_cpe[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
+ ind_channel_info->cc_target_tag_select[c] = ixheaacd_read_bits_buf(it_bit_buf, 4);
if (ind_channel_info->cc_target_is_cpe[c]) {
- ind_channel_info->cc_l[c] = ixheaacd_read_bits_buf(bs, 1);
- ind_channel_info->cc_r[c] = ixheaacd_read_bits_buf(bs, 1);
+ ind_channel_info->cc_l[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
+ ind_channel_info->cc_r[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
if (ind_channel_info->cc_l[c] && ind_channel_info->cc_r[c])
num_gain_element_lists++;
ind_channel_info->elements_coupled[c] = 1;
@@ -183,9 +191,9 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
if ((ind_sw_cce_flag == 0) && (num_gain_element_lists > MAX_BS_ELEMENT)) {
return IA_FATAL_ERROR;
}
- ixheaacd_read_bits_buf(bs, 1);/*cc_domain*/
- ixheaacd_read_bits_buf(bs, 1);/*gain_element_sign*/
- gain_element_scale = ixheaacd_read_bits_buf(bs, 2);
+ ixheaacd_read_bits_buf(it_bit_buf, 1);/*cc_domain*/
+ ixheaacd_read_bits_buf(it_bit_buf, 1);/*gain_element_sign*/
+ gain_element_scale = ixheaacd_read_bits_buf(it_bit_buf, 2);
aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.num_swb_window = 0;
aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.sampling_rate_index =
@@ -194,7 +202,7 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
aac_handle->pstr_aac_dec_ch_info[0]->common_window = 0;
error_status = ixheaacd_individual_ch_stream(
- bs, aac_handle, 1, frame_size, total_channels, audio_object_type,
+ it_bit_buf, aac_handle, 1, frame_size, total_channels, audio_object_type,
eld_specific_config, ele_type);
if (error_status) return error_status;
@@ -208,15 +216,15 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
if (ind_sw_cce_flag)
cge = 1;
else {
- common_gain_element_present[c] = ixheaacd_read_bits_buf(bs, 1);
+ common_gain_element_present[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
cge = common_gain_element_present[c];
- return IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
+ return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
}
if (cge) {
- UWORD8 *ptr_read_next = bs->ptr_read_next;
- WORD32 bit_pos = 7 - bs->bit_pos;
+ UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
+ WORD32 bit_pos = 7 - it_bit_buf->bit_pos;
WORD32 read_word =
- ixheaacd_aac_showbits_32(bs->ptr_read_next, bs->cnt_bits, NULL);
+ ixheaacd_aac_showbits_32(it_bit_buf->ptr_read_next, it_bit_buf->cnt_bits, NULL);
UWORD32 read_word1;
read_word1 = read_word << bit_pos;
@@ -228,9 +236,9 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
while (bit_pos > 8)
ixheaacd_aac_read_byte(&ptr_read_next, &bit_pos, &read_word);
- bs->ptr_read_next = ptr_read_next;
- bs->bit_pos = 7 - bit_pos;
- bs->cnt_bits -= length;
+ it_bit_buf->ptr_read_next = ptr_read_next;
+ it_bit_buf->bit_pos = 7 - bit_pos;
+ it_bit_buf->cnt_bits -= length;
norm_value = index - 60;
if (norm_value == -1)
@@ -247,11 +255,11 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
}
}
} else {
- return IA_ENHAACPLUS_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
+ return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
}
}
- if (bs->cnt_bits < 0) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ if (it_bit_buf->cnt_bits < 0) {
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
}
return error_status;
}
diff --git a/decoder/ixheaacd_multichannel.h b/decoder/ixheaacd_multichannel.h
index f641421..ea37259 100644
--- a/decoder/ixheaacd_multichannel.h
+++ b/decoder/ixheaacd_multichannel.h
@@ -17,11 +17,11 @@
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
-#ifndef IA_EAACP_DEC_MUTLCHANNEL_H
-#define IA_EAACP_DEC_MUTLCHANNEL_H
+#ifndef IXHEAACD_MULTICHANNEL_H
+#define IXHEAACD_MULTICHANNEL_H
IA_ERRORCODE ixheaacd_dec_coupling_channel_element(
- ia_handle_bit_buf_struct bs, ia_aac_decoder_struct *aac_handle,
+ ia_bit_buf_struct *it_bit_buf, ia_aac_decoder_struct *aac_handle,
WORD32 sample_rate_idx, ia_aac_dec_tables_struct *ptr_aac_tables,
ixheaacd_misc_tables *common_tables_ptr, WORD *element_index_order,
ia_enhaacplus_dec_ind_cc *ind_channel_info, WORD32 total_channels,
@@ -36,4 +36,4 @@ void ixheaacd_dec_downmix_to_stereo(
ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec, WORD16 frame_size,
WORD total_elements, WORD16 *ptr_time_data, WORD total_channels);
-#endif /* IA_EAACP_DEC_MUTLCHANNEL_H */
+#endif /* IXHEAACD_MULTICHANNEL_H */
diff --git a/decoder/ixheaacd_peak_limiter.c b/decoder/ixheaacd_peak_limiter.c
index a35c474..d5f2b4b 100644
--- a/decoder/ixheaacd_peak_limiter.c
+++ b/decoder/ixheaacd_peak_limiter.c
@@ -19,7 +19,7 @@
*/
#include <stdlib.h>
#include <math.h>
-#include <ixheaacd_type_def.h>
+#include "ixheaacd_type_def.h"
#include "ixheaacd_cnst.h"
#include "ixheaacd_peak_limiter_struct_def.h"
#include "ixheaacd_constants.h"
@@ -55,7 +55,7 @@ WORD32 ixheaacd_peak_limiter_init(ia_peak_limiter_struct *peak_limiter,
peak_limiter->max_buf = buffer;
peak_limiter->max_idx = 0;
peak_limiter->cir_buf_pnt = 0;
- peak_limiter->delayed_input = buffer + attack + 1;
+ peak_limiter->delayed_input = buffer + attack * 4 + 32;
peak_limiter->delayed_input_index = 0;
peak_limiter->attack_time = DEFAULT_ATTACK_TIME_MS;
@@ -73,6 +73,109 @@ WORD32 ixheaacd_peak_limiter_init(ia_peak_limiter_struct *peak_limiter,
return 0;
}
+VOID ixheaacd_peak_limiter_process_float(ia_peak_limiter_struct *peak_limiter,
+ FLOAT32 samples[MAX_NUM_CHANNELS][4096],
+ UWORD32 frame_len) {
+ UWORD32 i, j;
+ FLOAT32 tmp, gain;
+ FLOAT32 min_gain = 1.0f;
+ FLOAT32 maximum;
+ UWORD32 num_channels = peak_limiter->num_channels;
+ UWORD32 attack_time_samples = peak_limiter->attack_time_samples;
+ FLOAT32 attack_constant = peak_limiter->attack_constant;
+ FLOAT32 release_constant = peak_limiter->release_constant;
+ FLOAT32 *max_buf = peak_limiter->max_buf;
+ FLOAT32 gain_modified = peak_limiter->gain_modified;
+ FLOAT32 *delayed_input = peak_limiter->delayed_input;
+ UWORD32 delayed_input_index = peak_limiter->delayed_input_index;
+ FLOAT64 pre_smoothed_gain = peak_limiter->pre_smoothed_gain;
+ FLOAT32 limit_threshold = PEAK_LIM_THR_FLOAT;
+
+ if (peak_limiter->limiter_on || (FLOAT32)pre_smoothed_gain) {
+ for (i = 0; i < frame_len; i++) {
+ tmp = 0.0f;
+ for (j = 0; j < num_channels; j++) {
+ tmp = (FLOAT32)MAX(tmp, fabs(samples[j][i]));
+ }
+ max_buf[peak_limiter->cir_buf_pnt] = tmp;
+
+ if (peak_limiter->max_idx == peak_limiter->cir_buf_pnt) {
+ peak_limiter->max_idx = 0;
+ for (j = 1; j < (attack_time_samples); j++) {
+ if (max_buf[j] > max_buf[peak_limiter->max_idx]) peak_limiter->max_idx = j;
+ }
+ } else if (tmp >= max_buf[peak_limiter->max_idx]) {
+ peak_limiter->max_idx = peak_limiter->cir_buf_pnt;
+ }
+
+ peak_limiter->cir_buf_pnt++;
+
+ if (peak_limiter->cir_buf_pnt == (WORD32)(attack_time_samples))
+ peak_limiter->cir_buf_pnt = 0;
+ maximum = max_buf[peak_limiter->max_idx];
+
+ if (maximum > limit_threshold) {
+ gain = limit_threshold / maximum;
+ } else {
+ gain = 1;
+ }
+
+ if (gain < pre_smoothed_gain) {
+ gain_modified =
+ MIN(gain_modified, (gain - 0.1f * (FLOAT32)pre_smoothed_gain) * 1.11111111f);
+ } else {
+ gain_modified = gain;
+ }
+
+ if (gain_modified < pre_smoothed_gain) {
+ pre_smoothed_gain = attack_constant * (pre_smoothed_gain - gain_modified) + gain_modified;
+ pre_smoothed_gain = MAX(pre_smoothed_gain, gain);
+ } else {
+ pre_smoothed_gain =
+ release_constant * (pre_smoothed_gain - gain_modified) + gain_modified;
+ }
+
+ gain = (FLOAT32)pre_smoothed_gain;
+
+ for (j = 0; j < num_channels; j++) {
+ tmp = delayed_input[delayed_input_index * num_channels + j];
+ delayed_input[delayed_input_index * num_channels + j] = samples[j][i];
+
+ tmp *= gain;
+
+ if (tmp > limit_threshold)
+ tmp = limit_threshold;
+ else if (tmp < -limit_threshold)
+ tmp = -limit_threshold;
+
+ samples[j][i] = tmp;
+ }
+
+ delayed_input_index++;
+ if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
+
+ if (gain < min_gain) min_gain = gain;
+ }
+ } else {
+ for (i = 0; i < frame_len; i++) {
+ for (j = 0; j < num_channels; j++) {
+ tmp = delayed_input[delayed_input_index * num_channels + j];
+ delayed_input[delayed_input_index * num_channels + j] = samples[j][i];
+ samples[j][i] = tmp;
+ }
+
+ delayed_input_index++;
+ if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
+ }
+ }
+
+ peak_limiter->gain_modified = gain_modified;
+ peak_limiter->delayed_input_index = delayed_input_index;
+ peak_limiter->pre_smoothed_gain = pre_smoothed_gain;
+ peak_limiter->min_gain = min_gain;
+
+ return;
+}
/**
* ixheaacd_peak_limiter_process
@@ -102,7 +205,7 @@ VOID ixheaacd_peak_limiter_process(ia_peak_limiter_struct *peak_limiter,
FLOAT32 *delayed_input = peak_limiter->delayed_input;
UWORD32 delayed_input_index = peak_limiter->delayed_input_index;
FLOAT64 pre_smoothed_gain = peak_limiter->pre_smoothed_gain;
- WORD32 limit_threshold = 2147483647;
+ WORD32 limit_threshold = PEAK_LIM_THR_FIX;
WORD32 *samples = (WORD32 *)samples_t;
@@ -204,3 +307,28 @@ VOID ixheaacd_peak_limiter_process(ia_peak_limiter_struct *peak_limiter,
return;
}
+
+/**
+ * ixheaacd_scale_adjust
+ *
+ * \brief Scale adjust process
+ *
+ * \param [in/out] samples
+ * \param [in] qshift_adj
+ * \param [in] frame_len
+ *
+ * \return WORD32
+ *
+ */
+
+VOID ixheaacd_scale_adjust(WORD32 *samples, UWORD32 frame_len,
+ WORD8 *qshift_adj, WORD num_channels) {
+ UWORD32 i;
+ WORD32 j;
+ for (i = 0; i < frame_len; i++) {
+ for (j = 0; j < num_channels; j++) {
+ WORD32 gain_t = (WORD32)(1 << *(qshift_adj + j));
+ samples[i * num_channels + j] = (samples[i * num_channels + j] * gain_t);
+ }
+ }
+} \ No newline at end of file
diff --git a/decoder/ixheaacd_peak_limiter_struct_def.h b/decoder/ixheaacd_peak_limiter_struct_def.h
index 1241418..dfc3eb6 100644
--- a/decoder/ixheaacd_peak_limiter_struct_def.h
+++ b/decoder/ixheaacd_peak_limiter_struct_def.h
@@ -20,13 +20,11 @@
#ifndef IXHEAACD_PEAK_LIMITER_STRUCT_DEF_H
#define IXHEAACD_PEAK_LIMITER_STRUCT_DEF_H
-#define MAX_CHANNEL 6
-/*(PEAK_LIM_SIZE = ATTACK_TIME * MAX_SAMPLING_RATE / 1000) + 1*/
-#define PEAK_LIM_SIZE 481
-#define PEAK_LIM_BUFFER_SIZE PEAK_LIM_SIZE *(MAX_CHANNEL + 1)
-
+#define PEAK_LIM_SIZE (1024 * 16)
#define DEFAULT_ATTACK_TIME_MS (5.0f)
#define DEFAULT_RELEASE_TIME_MS (50.0f)
+#define PEAK_LIM_THR_FLOAT (29203.6f)
+#define PEAK_LIM_THR_FIX (2147483647)
typedef struct ia_peak_limiter_struct {
FLOAT32 attack_time;
@@ -44,7 +42,7 @@ typedef struct ia_peak_limiter_struct {
UWORD32 delayed_input_index;
FLOAT32 *max_buf;
FLOAT32 min_gain;
- FLOAT32 buffer[PEAK_LIM_BUFFER_SIZE];
+ FLOAT32 buffer[PEAK_LIM_SIZE];
WORD32 max_idx;
WORD32 cir_buf_pnt;
} ia_peak_limiter_struct;
diff --git a/decoder/ixheaacd_pns_js_thumb.c b/decoder/ixheaacd_pns_js_thumb.c
index 47b2aaf..b41e201 100644
--- a/decoder/ixheaacd_pns_js_thumb.c
+++ b/decoder/ixheaacd_pns_js_thumb.c
@@ -45,8 +45,10 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
-#include "ixheaacd_channelinfo.h"
#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_block.h"
@@ -368,12 +370,9 @@ VOID ixheaacd_aac_tns_process(
if (filter->direction == -1) {
position = stop - 1;
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
if (((win * maximum_bins_short) + position) < filter->order) continue;
- }
- else
- {
+ } else {
if (((win << 7) + position) < filter->order) continue;
}
diff --git a/decoder/ixheaacd_process.c b/decoder/ixheaacd_process.c
index 426ab59..599908b 100644
--- a/decoder/ixheaacd_process.c
+++ b/decoder/ixheaacd_process.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
-
+#include "ixheaacd_constants.h"
#include "ixheaacd_type_def.h"
#include "ixheaacd_memory_standards.h"
#include "ixheaacd_sbrdecsettings.h"
@@ -38,6 +38,9 @@
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_channel.h"
#include "ixheaacd_sbrdecoder.h"
@@ -52,6 +55,10 @@
#include "ixheaacd_hybrid.h"
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
#include "ixheaacd_mps_interface.h"
#include "ixheaacd_struct_def.h"
@@ -70,6 +77,7 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
#include "ixheaacd_main.h"
+#include "ixheaacd_ec.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_bit_extract.h"
#include "ixheaacd_create.h"
@@ -106,7 +114,8 @@ IA_ERRORCODE ixheaacd_esbr_process(ia_usac_data_struct *usac_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 stereo_config_idx,
WORD16 num_channels,
- WORD32 audio_object_type) {
+ WORD32 audio_object_type,
+ WORD32 heaac_mps_present) {
WORD32 ch;
WORD32 err_code = 0;
ia_aac_dec_sbr_bitstream_struct *esbr_bit_str = &usac_data->esbr_bit_str[0];
@@ -125,6 +134,13 @@ IA_ERRORCODE ixheaacd_esbr_process(ia_usac_data_struct *usac_data,
self->sbr_mode = usac_data->sbr_mode;
self->aot_usac_flag = usac_data->usac_flag;
+ self->esbr_hq = usac_data->esbr_hq;
+ self->enh_sbr = usac_data->enh_sbr;
+ self->enh_sbr_ps = usac_data->enh_sbr_ps;
+ self->ec_flag = usac_data->ec_flag;
+ self->first_frame = usac_data->first_frame;
+ self->frame_ok = usac_data->frame_ok;
+ self->sbr_parse_complete = usac_data->sbr_parse_complete;
for (ch = 0; ch < num_channels; ch++) {
if ((self->pstr_sbr_channel[ch]
@@ -135,15 +151,67 @@ IA_ERRORCODE ixheaacd_esbr_process(ia_usac_data_struct *usac_data,
err_code = ixheaacd_applysbr(self, esbr_bit_str, NULL, &num_channels, 1, 0, 0,
&sbr_scratch_struct, 0, 1, 0, it_bit_buff, NULL,
- 0, audio_object_type, 0, 0, 1024);
+ 0, audio_object_type, 0, 0, 1024,
+ heaac_mps_present, self->ec_flag, self->first_frame);
+
+ usac_data->sbr_mode = self->sbr_mode;
+
+ return err_code;
+}
+
+IA_ERRORCODE ixheaacd_esbr_parse(ia_usac_data_struct *usac_data, ia_bit_buf_struct *it_bit_buff,
+ WORD32 stereo_config_idx, WORD16 num_channels,
+ WORD32 audio_object_type)
+{
+ WORD32 err_code = 0;
+ ia_aac_dec_sbr_bitstream_struct *esbr_bit_str = &usac_data->esbr_bit_str[0];
+ ia_handle_sbr_dec_inst_struct self = usac_data->pstr_esbr_dec;
+
+ ia_sbr_scr_struct sbr_scratch_struct;
+ jmp_buf local;
+ ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, usac_data->sbr_scratch_mem_base, NULL, 2, 1,
+ audio_object_type, 0, NULL, 0, 0);
+
+ self->usac_independency_flag = usac_data->usac_independency_flg;
+
+ self->time_sample_buf[0] = usac_data->time_sample_vector[0];
+ self->time_sample_buf[1] = usac_data->time_sample_vector[1];
+ self->stereo_config_idx = stereo_config_idx;
+ self->pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
+ self->pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
+
+ self->sbr_mode = usac_data->sbr_mode;
+ self->aot_usac_flag = usac_data->usac_flag;
+ self->esbr_hq = usac_data->esbr_hq;
+ self->enh_sbr = usac_data->enh_sbr;
+ self->enh_sbr_ps = usac_data->enh_sbr_ps;
+ self->ec_flag = usac_data->ec_flag;
+ self->first_frame = usac_data->first_frame;
+ self->frame_ok = usac_data->frame_ok;
+ self->sbr_parse_err_flag = usac_data->sbr_parse_err_flag;
+
+ if (usac_data->ec_flag) {
+ err_code = setjmp(local);
+ }
+ if (err_code == 0) {
+ if (usac_data->ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ err_code = ixheaacd_parse_sbr(self, esbr_bit_str, &num_channels, self->frame_ok,
+ &sbr_scratch_struct, it_bit_buff, audio_object_type);
+ } else {
+ usac_data->frame_ok = 0;
+ self->frame_ok = usac_data->frame_ok;
+ }
usac_data->sbr_mode = self->sbr_mode;
+ usac_data->sbr_parse_err_flag = self->sbr_parse_err_flag;
+ usac_data->sbr_parse_complete = self->sbr_parse_complete;
return err_code;
}
-static VOID ixheaacd_sbr_ext_data_read(
- ia_bit_buf_struct *it_bit_buff,
+static VOID ixheaacd_sbr_ext_data_read(ia_bit_buf_struct *it_bit_buff,
ia_aac_dec_sbr_bitstream_struct *esbr_bit_str) {
WORD32 count = 0;
WORD32 read_bits = 0;
@@ -171,10 +239,13 @@ static VOID ixheaacd_sbr_ext_data_read(
}
}
-static WORD32 ixheaacd_read_ext_element(
- UWORD32 usac_ext_element_default_length,
- UWORD32 usac_ext_element_payload_frag, ia_bit_buf_struct *it_bit_buff,
- ia_usac_decoder_config_struct *pstr_usac_dec_config, WORD32 elem_idx) {
+static WORD32 ixheaacd_read_ext_element(UWORD32 usac_ext_element_default_length,
+ UWORD32 usac_ext_element_payload_frag,
+ ia_bit_buf_struct *it_bit_buff
+ ,
+ ia_usac_decoder_config_struct *pstr_usac_dec_config,
+ WORD32 elem_idx,
+ WORD32 *frame_ok) {
UWORD32 usac_ext_element_present;
UWORD32 usac_ext_element_use_dft_length;
UWORD32 pay_load_length;
@@ -195,8 +266,10 @@ static WORD32 ixheaacd_read_ext_element(
pay_load_length = (UWORD32)((WORD32)pay_load_length + val_add - 2);
}
}
- if ((it_bit_buff->cnt_bits >> 3) < (WORD32)pay_load_length)
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ if ((it_bit_buff->cnt_bits >> 3) < (WORD32)pay_load_length) {
+ *frame_ok = 0;
+ longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ }
if (pay_load_length > 0) {
if (usac_ext_element_payload_frag)
ixheaacd_read_bits_buf(it_bit_buff, 2);
@@ -221,7 +294,7 @@ static WORD32 ixheaacd_read_ext_element(
} else {
if (it_bit_buff->cnt_bits < (WORD32)(pay_load_length << 3)) {
longjmp(*(it_bit_buff->xaac_jmp_buf),
- IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
}
it_bit_buff->ptr_read_next =
it_bit_buff->ptr_read_next + pay_load_length;
@@ -309,142 +382,229 @@ WORD32 ixheaacd_usac_process(ia_dec_data_struct *pstr_dec_data,
WORD32 elem_idx = 0;
WORD32 num_ch_out = 0;
WORD32 num_elements = pstr_usac_dec_config->num_elements;
+ UWORD32 ec_flag = p_state_aac_dec->p_config->ui_err_conceal;
+
+ if (ec_flag) {
+ if (it_bit_buff->cnt_bits < 16) {
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ }
+ if (pstr_dec_data->str_usac_data.frame_ok == 1) {
+ pstr_usac_data->usac_independency_flg = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ }
+ } else {
+ pstr_usac_data->usac_independency_flg = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ }
- pstr_usac_data->usac_independency_flg =
- ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (pstr_usac_data->ec_flag && pstr_dec_data->str_usac_data.frame_ok == 1) {
+ if (!(pstr_usac_data->last_frame_ok) && !(pstr_usac_data->usac_independency_flg)) {
+ pstr_dec_data->str_usac_data.frame_ok = 0;
+ } else {
+ pstr_dec_data->str_usac_data.frame_ok = 1;
+ }
+ }
for (elem_idx = 0; elem_idx < num_elements; elem_idx++) {
WORD32 stereo_config_index =
pstr_usac_config->str_usac_dec_config.str_usac_element_config[elem_idx]
.stereo_config_index;
+ jmp_buf local;
+ if (ec_flag) {
+ err = setjmp(local);
+ }
pstr_usac_data->esbr_bit_str[0].no_elements = 0;
pstr_usac_data->esbr_bit_str[1].no_elements = 0;
- switch (ele_id = pstr_usac_dec_config->usac_element_type[elem_idx]) {
- case ID_USAC_SCE:
- nr_core_coder_channels = 1;
- num_ch_out += 1;
- goto core_data_extracting;
+ if (!err) {
+ if (ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ switch (ele_id = pstr_usac_dec_config->usac_element_type[elem_idx]) {
+ case ID_USAC_SCE:
+ nr_core_coder_channels = 1;
+ num_ch_out += 1;
+ goto core_data_extracting;
+
+ case ID_USAC_CPE:
+ nr_core_coder_channels = (stereo_config_index == 1) ? 1 : 2;
+ if (((stereo_config_index > 1) || (stereo_config_index == 0)) &&
+ (p_state_aac_dec->num_of_output_ch < 2))
+ return -1;
+ num_ch_out += 2;
+ goto core_data_extracting;
+ case ID_USAC_LFE:
+ nr_core_coder_channels = 1;
+ num_ch_out += 1;
+
+ core_data_extracting:
+ if (!ec_flag) {
+ if (ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) return -1;
+ if (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
+ } else {
+ if ((ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) ||
+ (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2)) {
+ pstr_usac_data->frame_ok = 0;
+ }
+ }
- case ID_USAC_CPE:
- nr_core_coder_channels = (stereo_config_index == 1) ? 1 : 2;
- if (((stereo_config_index > 1) || (stereo_config_index == 0)) &&
- (p_state_aac_dec->num_of_output_ch < 2))
- return -1;
- num_ch_out += 2;
- goto core_data_extracting;
- case ID_USAC_LFE:
- nr_core_coder_channels = 1;
- num_ch_out += 1;
-
- core_data_extracting:
- if (ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) return -1;
- if (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
- err = ixheaacd_core_coder_data(ele_id, pstr_usac_data, elem_idx,
- ch_offset, it_bit_buff,
- nr_core_coder_channels);
- if (err != 0) return -1;
-
- ixheaacd_sbr_ele_type_set(&pstr_usac_data->esbr_bit_str[0],
- &pstr_usac_data->esbr_bit_str[1], ele_id,
- stereo_config_index);
-
- if (pstr_usac_data->mps_pseudo_lr[elem_idx])
- ixheaacd_ms_processing(pstr_usac_data);
-
- if (ele_id != ID_USAC_LFE) {
- if (pstr_usac_data->sbr_ratio_idx > 0)
- ixheaacd_sbr_ext_data_read(it_bit_buff,
- &pstr_usac_data->esbr_bit_str[0]);
- }
+ err = ixheaacd_core_coder_data(ele_id, pstr_usac_data, elem_idx, ch_offset, it_bit_buff,
+ nr_core_coder_channels);
+ if (!ec_flag) {
+ if (err != 0) return -1;
+ } else {
+ if (err != 0) pstr_usac_data->frame_ok = 0;
+ }
- if ((pstr_usac_data->sbr_ratio_idx > 0) &&
- (pstr_usac_data->esbr_bit_str[0].no_elements != 0)) {
- err_code = ixheaacd_esbr_process(
- pstr_usac_data, it_bit_buff, stereo_config_index,
- nr_core_coder_channels,
- pstr_dec_data->str_usac_data.audio_object_type);
- if (err_code < 0) return err_code;
- }
+ ixheaacd_sbr_ele_type_set(&pstr_usac_data->esbr_bit_str[0],
+ &pstr_usac_data->esbr_bit_str[1], ele_id,
+ stereo_config_index);
- if (stereo_config_index > 0 && pstr_usac_data->sbr_ratio_idx > 0) {
- FLOAT32 **ptr_inp[2 * 2];
- WORD32 ch;
-
- *num_out_channels = p_state_aac_dec->mps_dec_handle.out_ch_count;
-
- err = ixheaacd_mps_frame_parsing(
- &p_state_aac_dec->mps_dec_handle,
- pstr_usac_data->usac_independency_flg, it_bit_buff);
- if (err) return err;
-
- p_state_aac_dec->mps_dec_handle.band_count[0] =
- pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[0]
- ->str_sbr_dec.band_count;
- p_state_aac_dec->mps_dec_handle.band_count[1] =
- pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
- ->str_sbr_dec.band_count;
-
- for (ch = 0; ch < nr_core_coder_channels; ch++) {
- ptr_inp[2 * ch] =
- pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
- ->str_sbr_dec.pp_qmf_buf_real;
- ptr_inp[2 * ch + 1] =
- pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
- ->str_sbr_dec.pp_qmf_buf_imag;
- p_state_aac_dec->mps_dec_handle.p_sbr_dec[ch] =
- (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
- ->str_sbr_dec);
- p_state_aac_dec->mps_dec_handle.p_sbr_header[ch] =
- (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[ch]);
- p_state_aac_dec->mps_dec_handle.p_sbr_frame[ch] =
- (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[ch]);
+ if (pstr_usac_data->mps_pseudo_lr[elem_idx]) ixheaacd_ms_processing(pstr_usac_data);
+
+ if (ele_id != ID_USAC_LFE) {
+ if (pstr_usac_data->sbr_ratio_idx > 0)
+ ixheaacd_sbr_ext_data_read(it_bit_buff, &pstr_usac_data->esbr_bit_str[0]);
}
- if (nr_core_coder_channels == 1) {
- if (p_state_aac_dec->mps_dec_handle.res_ch_count != 0) {
- ptr_inp[2] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
- ->str_sbr_dec.pp_qmf_buf_real;
- ptr_inp[2 + 1] =
- pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
- ->str_sbr_dec.pp_qmf_buf_imag;
+
+ if ((pstr_usac_data->sbr_ratio_idx > 0) &&
+ (pstr_usac_data->esbr_bit_str[0].no_elements != 0)) {
+ if (ec_flag) {
+ pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
+ }
+ err_code = ixheaacd_esbr_process(
+ pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
+ pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type,
+ p_state_aac_dec->heaac_mps_handle.heaac_mps_present);
+ if (!ec_flag) {
+ if (err_code < 0) return err_code;
+ } else {
+ if (err_code < 0) pstr_usac_data->frame_ok = 0;
}
- p_state_aac_dec->mps_dec_handle.p_sbr_dec[1] =
- (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
- ->str_sbr_dec);
- p_state_aac_dec->mps_dec_handle.p_sbr_header[1] =
- (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[1]);
- p_state_aac_dec->mps_dec_handle.p_sbr_frame[1] =
- (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[1]);
}
- err = ixheaacd_mps_apply(&p_state_aac_dec->mps_dec_handle, ptr_inp,
- pstr_usac_data->time_sample_vector);
- if (err) return err;
- }
+ if (stereo_config_index > 0 && pstr_usac_data->sbr_ratio_idx > 0) {
+ FLOAT32 **ptr_inp[2 * 2];
+ WORD32 ch;
- ch_offset += nr_core_coder_channels;
- break;
+ *num_out_channels = p_state_aac_dec->mps_dec_handle.out_ch_count;
- case ID_USAC_EXT: {
- ia_usac_dec_element_config_struct *pusac_element_config =
- &pstr_usac_dec_config->str_usac_element_config[elem_idx];
- err = ixheaacd_read_ext_element(
- pusac_element_config->usac_ext_eleme_def_len,
- pusac_element_config->usac_ext_elem_pld_frag, it_bit_buff,
- pstr_usac_dec_config, elem_idx);
- if (err != 0) return err;
+ if (!ec_flag && pstr_usac_data->frame_ok == 1) {
+ if (ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ err =
+ ixheaacd_mps_frame_parsing(&p_state_aac_dec->mps_dec_handle,
+ pstr_usac_data->usac_independency_flg, it_bit_buff);
+ if (err) return err;
+ }
- break;
- }
+ p_state_aac_dec->mps_dec_handle.band_count[0] =
+ pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[0]->str_sbr_dec.band_count;
+ p_state_aac_dec->mps_dec_handle.band_count[1] =
+ pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec.band_count;
+
+ for (ch = 0; ch < nr_core_coder_channels; ch++) {
+ ptr_inp[2 * ch] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
+ ->str_sbr_dec.pp_qmf_buf_real;
+ ptr_inp[2 * ch + 1] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
+ ->str_sbr_dec.pp_qmf_buf_imag;
+ p_state_aac_dec->mps_dec_handle.p_sbr_dec[ch] =
+ (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]->str_sbr_dec);
+ p_state_aac_dec->mps_dec_handle.p_sbr_header[ch] =
+ (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[ch]);
+ p_state_aac_dec->mps_dec_handle.p_sbr_frame[ch] =
+ (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[ch]);
+ }
+ if (nr_core_coder_channels == 1) {
+ if (p_state_aac_dec->mps_dec_handle.res_ch_count != 0) {
+ ptr_inp[2] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
+ ->str_sbr_dec.pp_qmf_buf_real;
+ ptr_inp[2 + 1] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
+ ->str_sbr_dec.pp_qmf_buf_imag;
+ }
+ p_state_aac_dec->mps_dec_handle.p_sbr_dec[1] =
+ (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec);
+ p_state_aac_dec->mps_dec_handle.p_sbr_header[1] =
+ (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[1]);
+ p_state_aac_dec->mps_dec_handle.p_sbr_frame[1] =
+ (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[1]);
+ }
+ if ((!ec_flag || !p_state_aac_dec->first_frame) &&
+ p_state_aac_dec->mps_dec_handle.mps_init_done == 1) {
+ err = ixheaacd_mps_apply(&p_state_aac_dec->mps_dec_handle, ptr_inp,
+ pstr_usac_data->time_sample_vector);
+ if (!ec_flag) {
+ if (err) return err;
+ } else {
+ if (err) pstr_usac_data->frame_ok = 0;
+ }
+ }
+ if (ec_flag) {
+ pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
+ err_code = ixheaacd_esbr_parse(
+ pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
+ pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type);
+
+ if (err_code < 0) pstr_usac_data->frame_ok = 0;
+ if (ec_flag) {
+ err = setjmp(local);
+ }
+ if (err == 0 && pstr_usac_data->frame_ok == 1) {
+ if (ec_flag) {
+ it_bit_buff->xaac_jmp_buf = &local;
+ }
+ err = ixheaacd_mps_frame_parsing(&p_state_aac_dec->mps_dec_handle,
+ pstr_usac_data->usac_independency_flg,
+ it_bit_buff);
+ if (err) pstr_usac_data->frame_ok = 0;
+ } else {
+ pstr_usac_data->frame_ok = 0;
+ if (p_state_aac_dec->mps_dec_handle.num_parameter_sets_prev < 1) {
+ p_state_aac_dec->mps_dec_handle.num_parameter_sets_prev = 1;
+ }
+ }
+ }
+ } else if ((pstr_usac_data->sbr_ratio_idx > 0) &&
+ (pstr_usac_data->esbr_bit_str[0].no_elements != 0) && ec_flag) {
+ pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
+ err_code = ixheaacd_esbr_parse(
+ pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
+ pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type);
+ if (err_code < 0) pstr_usac_data->frame_ok = 0;
+ }
+ if (ec_flag) {
+ p_state_aac_dec->first_frame = 0;
+ }
- default:
+ ch_offset += nr_core_coder_channels;
+ break;
+
+ case ID_USAC_EXT: {
+ ia_usac_dec_element_config_struct *pusac_element_config =
+ &pstr_usac_dec_config->str_usac_element_config[elem_idx];
+ if (pstr_usac_data->frame_ok) {
+ err = ixheaacd_read_ext_element(pusac_element_config->usac_ext_eleme_def_len,
+ pusac_element_config->usac_ext_elem_pld_frag,
+ it_bit_buff, pstr_usac_dec_config, elem_idx,
+ &pstr_usac_data->frame_ok);
+ if (!ec_flag) {
+ if (err != 0) return err;
+ } else {
+ if (err) pstr_usac_data->frame_ok = 0;
+ }
+ }
+ break;
+ }
- return -1;
+ default:
- break;
+ return -1;
+
+ break;
+ }
}
}
+ pstr_usac_data->last_frame_ok = pstr_usac_data->frame_ok;
return 0;
}
diff --git a/decoder/ixheaacd_ps_bitdec.h b/decoder/ixheaacd_ps_bitdec.h
index aee58f0..154a170 100644
--- a/decoder/ixheaacd_ps_bitdec.h
+++ b/decoder/ixheaacd_ps_bitdec.h
@@ -22,9 +22,10 @@
#define EXTENSION_ID_PS_CODING 2
-WORD16 ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec,
- ia_bit_buf_struct *it_bit_buff, WORD16 n_bits_left,
- ia_ps_tables_struct *ps_tables_ptr);
+#define EXTENSION_ID_ENHSBR_CODING 3
+
+IA_ERRORCODE ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec, ia_bit_buf_struct *it_bit_buff,
+ WORD16 n_bits_left, ia_ps_tables_struct *ps_tables_ptr);
VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size);
diff --git a/decoder/ixheaacd_ps_dec.c b/decoder/ixheaacd_ps_dec.c
index f03611f..74c019e 100644
--- a/decoder/ixheaacd_ps_dec.c
+++ b/decoder/ixheaacd_ps_dec.c
@@ -44,6 +44,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/decoder/ixheaacd_ps_dec.h b/decoder/ixheaacd_ps_dec.h
index e241a63..059e5e0 100644
--- a/decoder/ixheaacd_ps_dec.h
+++ b/decoder/ixheaacd_ps_dec.h
@@ -36,13 +36,60 @@
#define NUM_OF_QUAD_MIRROR_FILTER_ICC_CHNLS \
(NUM_OF_QUAD_MIRROR_FILTER_ALL_PASS_CHNLS + NUM_OF_DEL_CHNLS)
#define PEAK_DECAYING_FACT 0x620a
-#define NUM_SER_AP_LINKS 3
+
#define MAXIM_NUM_OF_PS_ENVLOPS 5
#define PSC_SQRT05F (0x5a82)
#define NUM_OF_BINS (20)
#define NUM_BANDS_FINE (34)
#define NUM_SUB_SAMPLES_960 30
+#define CORE_CODEC_FRAME_SIZE 1024
+#define NUM_SUB_SAMPLES (CORE_CODEC_FRAME_SIZE / 32)
+
+#define NRG_INT_COEFF 0.75f
+#define INIT_FILT_COEFF (1.0f - NRG_INT_COEFF)
+
+#define NEGATE_IPD_MASK (0x00001000)
+
+#define NUM_IPD_STEPS (8)
+#define NUM_OPD_STEPS (8)
+
+#define NUM_HI_RES_BINS (34)
+#define NUM_MID_RES_BINS (20)
+
+#define NUM_HI_RES_IPD_BINS (17)
+
+#define NUM_MID_RES_IPD_BINS (11)
+
+#define NUM_LOW_RES_IPD_BINS (5)
+
+#ifndef _M_PI_
+#define _M_PI_ (3.141592653589793238462643383279)
+#endif
+#define PSC_SQRT2 (1.41421356237309504880)
+#define PSC_PIF ((FLOAT32)_M_PI_)
+#define PSC_SQRT2F ((FLOAT32)PSC_SQRT2)
+
+#define IPD_HALF_RANGE (PSC_PIF)
+#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
+#define OPD_HALF_RANGE (PSC_PIF)
+#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
+#define NEGATE_IPD_MASK (0x00001000)
+
+#define DECAY_CUTOFF 3
+#define DECAY_CUTOFF_HI_RES 5
+#define DECAY_SLOPE 0.05f
+
+#define PHASE_SMOOTH_HIST1 (0.5f)
+#define PHASE_SMOOTH_HIST2 (0.25f)
+
+#define NUM_QMF_BANDS_IN_HYBRID20 3
+#define NUM_QMF_BANDS_IN_HYBRID34 5
+
+#define MAX_NUM_QMF_CHANNELS_IN_HYBRID (NUM_QMF_BANDS_IN_HYBRID34)
+
+#define PEAK_DECAY_FACTOR_FAST (0.765928338364649f)
+
typedef WORD16((*REVERB_BUFFERS_RI)[NUM_SER_AP_LINKS])[32 * 2];
typedef WORD16((REVERB_BUFFERS_CH_RI[5])[NUM_SER_AP_LINKS])[16 * 2];
@@ -112,10 +159,106 @@ typedef struct {
WORD16 icc_par_table[MAXIM_NUM_OF_PS_ENVLOPS + 2][NUM_BANDS_FINE];
ia_hybrid_struct str_hybrid;
+ FLOAT32 hyb_left_re[CORE_CODEC_FRAME_SIZE / MAX_NUM_COLUMNS][MAX_NUM_COLUMNS];
+ FLOAT32 hyb_left_im[CORE_CODEC_FRAME_SIZE / MAX_NUM_COLUMNS][MAX_NUM_COLUMNS];
+ FLOAT32 hyb_right_re[CORE_CODEC_FRAME_SIZE / MAX_NUM_COLUMNS][MAX_NUM_COLUMNS];
+ FLOAT32 hyb_right_im[CORE_CODEC_FRAME_SIZE / MAX_NUM_COLUMNS][MAX_NUM_COLUMNS];
+
+ FLOAT32 h11_re_vec[NUM_HI_RES_BINS];
+ FLOAT32 h11_im_vec[NUM_HI_RES_BINS];
+ FLOAT32 h12_re_vec[NUM_HI_RES_BINS];
+ FLOAT32 h12_im_vec[NUM_HI_RES_BINS];
+ FLOAT32 h21_re_vec[NUM_HI_RES_BINS];
+ FLOAT32 h21_im_vec[NUM_HI_RES_BINS];
+ FLOAT32 h22_re_vec[NUM_HI_RES_BINS];
+ FLOAT32 h22_im_vec[NUM_HI_RES_BINS];
+
+ FLOAT32 h11_re_prev[NUM_HI_RES_BINS];
+ FLOAT32 h11_im_prev[NUM_HI_RES_BINS];
+ FLOAT32 h12_re_prev[NUM_HI_RES_BINS];
+ FLOAT32 h12_im_prev[NUM_HI_RES_BINS];
+ FLOAT32 h21_re_prev[NUM_HI_RES_BINS];
+ FLOAT32 h21_im_prev[NUM_HI_RES_BINS];
+ FLOAT32 h22_re_prev[NUM_HI_RES_BINS];
+ FLOAT32 h22_im_prev[NUM_HI_RES_BINS];
+
+ FLOAT32 qmf_delay_buf_re[HIGH_DEL][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 qmf_delay_buf_im[HIGH_DEL][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 sub_qmf_delay_buf_re[HIGH_DEL][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 sub_qmf_delay_buf_im[HIGH_DEL][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 ser_qmf_delay_buf_re[NUM_SER_AP_LINKS][5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 ser_qmf_delay_buf_im[NUM_SER_AP_LINKS][5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+
+ ia_hybrid_flt_struct *ptr_hybrid;
+ ia_hybrid_flt_struct str_flt_hybrid20;
+ ia_hybrid_flt_struct str_flt_hybrid34;
+ WORD32 use_34_st_bands;
+ WORD32 use_34_st_bands_prev;
+ WORD32 ps_mode;
+
+ WORD32 *ptr_group_borders;
+ WORD32 num_groups;
+ WORD32 num_sub_qmf_groups;
+ WORD32 num_bins;
+ WORD32 first_delay_gr;
+ WORD32 *ptr_bins_group_map;
+ WORD32 num_sub_samples;
+ WORD32 num_chans;
+ WORD32 use_pca_rot_flg;
+ WORD32 freq_res_ipd;
+ WORD32 delay_qmf_delay_buf_idx[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ WORD32 delay_qmf_delay_num_samp[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 peak_decay_fast_bin[NUM_HI_RES_BINS];
+ FLOAT32 prev_nrg_bin[NUM_HI_RES_BINS];
+ FLOAT32 prev_peak_diff_bin[NUM_HI_RES_BINS];
+ WORD32 ipd_idx_map_1[NUM_HI_RES_IPD_BINS];
+ WORD32 opd_idx_map_1[NUM_HI_RES_IPD_BINS];
+ WORD32 ipd_idx_map_2[NUM_HI_RES_IPD_BINS];
+ WORD32 opd_idx_map_2[NUM_HI_RES_IPD_BINS];
+
+ WORD32 ipd_idx_map[MAXIM_NUM_OF_PS_ENVLOPS][NUM_HI_RES_IPD_BINS];
+ WORD32 opd_idx_map[MAXIM_NUM_OF_PS_ENVLOPS][NUM_HI_RES_IPD_BINS];
+
+ FLOAT32 ser_sub_qmf_dealy_buf_re[NUM_SER_AP_LINKS][5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 ser_sub_qmf_dealy_buf_im[NUM_SER_AP_LINKS][5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+
+ FLOAT32 hyb_work_re_20[NUM_SUB_SAMPLES + HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_work_im_20[NUM_SUB_SAMPLES + HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_qmf_buf_re_20[MAX_NUM_QMF_CHANNELS_IN_HYBRID][HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_qmf_buf_im_20[MAX_NUM_QMF_CHANNELS_IN_HYBRID][HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_temp_re_20[NUM_SUB_SAMPLES][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 hyb_temp_im_20[NUM_SUB_SAMPLES][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+
+ FLOAT32 hyb_work_re_34[NUM_SUB_SAMPLES + HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_work_im_34[NUM_SUB_SAMPLES + HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_qmf_buf_re_34[MAX_NUM_QMF_CHANNELS_IN_HYBRID][HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_qmf_buf_im_34[MAX_NUM_QMF_CHANNELS_IN_HYBRID][HYBRID_FILTER_LENGTH - 1];
+ FLOAT32 hyb_temp_re_34[NUM_SUB_SAMPLES][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 hyb_temp_im_34[NUM_SUB_SAMPLES][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+
+ FLOAT32 **pp_qmf_buf_real[2];
+ FLOAT32 **pp_qmf_buf_imag[2];
+ FLOAT32 *time_sample_buf[2];
+
} ia_ps_dec_struct;
+typedef struct {
+ FLAG enable_iid;
+ FLAG enable_icc;
+ WORD16 iid_mode;
+ WORD16 icc_mode;
+ FLAG frame_class;
+ WORD32 freq_res_ipd;
+ WORD16 border_position[MAXIM_NUM_OF_PS_ENVLOPS + 2];
+ FLAG iid_dt[MAXIM_NUM_OF_PS_ENVLOPS];
+ FLAG icc_dt[MAXIM_NUM_OF_PS_ENVLOPS];
+ WORD16 iid_par_table[MAXIM_NUM_OF_PS_ENVLOPS + 2][NUM_BANDS_FINE];
+ WORD16 icc_par_table[MAXIM_NUM_OF_PS_ENVLOPS + 2][NUM_BANDS_FINE];
+} ia_ps_dec_config_struct;
+
VOID ixheaacd_create_psdec(ia_ps_dec_struct *ptr_ps_dec,
- VOID *sbr_persistent_mem, WORD32 *ptr_overlap_buf);
+ VOID *sbr_persistent_mem, WORD32 *ptr_overlap_buf,
+ WORD32 frame_size);
VOID ixheaacd_decorr_filter1_dec(ia_ps_dec_struct *ptr_ps_dec,
ia_ps_tables_struct *ps_tables_ptr,
@@ -180,6 +323,45 @@ VOID ixheaacd_apply_rot_armv7(ia_ps_dec_struct *ptr_ps_dec,
VOID ixheaacd_scale_ps_states(ia_ps_dec_struct *ptr_ps_dec, WORD16 scale);
+VOID
+ixheaacd_esbr_apply_ps(ia_ps_dec_struct * ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ WORD32 usb, ia_ps_tables_struct *ptr_ps_tables,
+ WORD32 num_time_slot);
+
+VOID
+ixheaacd_esbr_ps_de_correlate(ia_ps_dec_struct *ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ ia_ps_tables_struct *ptr_ps_tables);
+
+VOID
+ixheaacd_esbr_ps_apply_rotation(ia_ps_dec_struct *ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ ia_ps_tables_struct *ptr_ps_tables);
+
+WORD32
+ixheaacd_create_hyb_filterbank_esbr_ps(ia_hybrid_flt_struct *pHybrid,
+ WORD32 frameSize,
+ WORD32 noBands);
+
+WORD32 ixheaacd_create_ps_esbr_dec(ia_ps_dec_struct *ptr_ps_dec_struct,
+ ia_ps_tables_struct *ptr_ps_tables,
+ UWORD32 noQmfChans,
+ UWORD32 num_sub_samples,
+ WORD32 ps_mode);
+
+VOID ResetPsDec(ia_ps_dec_struct * ptr_ps_dec);
+VOID ResetPsDeCor(ia_ps_dec_struct * ptr_ps_dec);
+
extern WORD16 ixheaacd_divideby2(WORD32 op);
extern WORD16 ixheaacd_divideby3(WORD32 op);
diff --git a/decoder/ixheaacd_ps_dec_flt.c b/decoder/ixheaacd_ps_dec_flt.c
new file mode 100644
index 0000000..d16858e
--- /dev/null
+++ b/decoder/ixheaacd_ps_dec_flt.c
@@ -0,0 +1,1224 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+ */
+#include <string.h>
+#include <math.h>
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_type_def.h"
+
+#include "ixheaacd_constants.h"
+#include "ixheaacd_basic_ops32.h"
+#include "ixheaacd_basic_ops16.h"
+#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_basic_ops_arr.h"
+#include "ixheaacd_basic_ops.h"
+
+#include "ixheaacd_defines.h"
+#include "ixheaacd_basic_op.h"
+#include "ixheaacd_intrinsics.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_basic_funcs.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_defines.h"
+
+#include "ixheaacd_pns.h"
+
+#include "ixheaacd_aac_rom.h"
+#include "ixheaacd_pulsedata.h"
+
+#include "ixheaacd_drc_data_struct.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_drc_dec.h"
+
+#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_sbr_scale.h"
+#include "ixheaacd_lpp_tran.h"
+#include "ixheaacd_env_extr_part.h"
+#include "ixheaacd_sbr_rom.h"
+
+#include "ixheaacd_hybrid.h"
+#include "ixheaacd_ps_dec.h"
+
+#include "ixheaacd_env_extr.h"
+
+#include "ixheaacd_ps_dec.h"
+
+#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_env_calc.h"
+#include "ixheaacd_sbr_const.h"
+
+#include "ixheaacd_pvc_dec.h"
+#include "ixheaacd_sbr_dec.h"
+#include "ixheaacd_function_selector.h"
+
+VOID ixheaacd_k_chan_filt(const FLOAT32 *ptr_qmf_re, const FLOAT32 *ptr_qmf_im,
+ FLOAT32 (*ptr_tmp_hyb_re)[MAX_NUM_QMF_CHANNELS],
+ FLOAT32 (*ptr_tmp_hyb_im)[MAX_NUM_QMF_CHANNELS], WORD32 nSamples,
+ WORD32 k, WORD32 bCplx, const FLOAT32 *p,
+ FLOAT32 *cos_sin_mod_tbl) {
+ WORD32 i, n, q;
+ FLOAT32 real, imag;
+ FLOAT32 cos_val, sin_val;
+ FLOAT32 *p_real_imag = cos_sin_mod_tbl;
+
+ if (bCplx) {
+ for (i = 0; i < nSamples; i++) {
+ for (q = 0; q < k; q++) {
+ real = 0;
+ imag = 0;
+ for (n = 0; n < 13; n++) {
+ cos_val = *p_real_imag++;
+ sin_val = *p_real_imag++;
+ real += p[n] * (ptr_qmf_re[n + i] * cos_val - ptr_qmf_im[n + i] * sin_val);
+ imag += p[n] * (ptr_qmf_im[n + i] * cos_val + ptr_qmf_re[n + i] * sin_val);
+ }
+ ptr_tmp_hyb_re[i][q] = real;
+ ptr_tmp_hyb_im[i][q] = imag;
+ }
+ p_real_imag -= (13 * k * 2);
+ }
+ } else {
+ for (i = 0; i < nSamples; i++) {
+ for (q = 0; q < k; q++) {
+ real = 0;
+ imag = 0;
+ for (n = 0; n < 13; n++) {
+ cos_val = *p_real_imag++;
+ real += p[n] * (ptr_qmf_re[n + i] * cos_val);
+ imag += p[n] * (ptr_qmf_im[n + i] * cos_val);
+ }
+ ptr_tmp_hyb_re[i][q] = real;
+ ptr_tmp_hyb_im[i][q] = imag;
+ }
+ p_real_imag -= (13 * k);
+ }
+ }
+}
+
+VOID ixheaacd_hyb_anal(const FLOAT32 **ptr_qmf_re, const FLOAT32 **ptr_qmf_im,
+ ia_ps_dec_struct *ptr_ps_dec, ia_ps_tables_struct *ptr_ps_tables,
+ WORD32 use_34_st_bands) {
+ WORD32 k, n, band;
+ WORD32 band_res;
+ WORD32 frame_size;
+ WORD32 ch_offset = 0;
+ FLOAT32(*ptr_tmp_hyb_re)[MAX_NUM_COLUMNS];
+ FLOAT32(*ptr_tmp_hyb_im)[MAX_NUM_COLUMNS];
+ ia_hybrid_flt_struct *ptr_hybrid;
+ if (!use_34_st_bands) {
+ ptr_tmp_hyb_re = ptr_ps_dec->hyb_left_re;
+ ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
+ ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
+ } else {
+ ptr_tmp_hyb_re = NULL;
+ ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
+ ptr_hybrid = &ptr_ps_dec->str_flt_hybrid34;
+ }
+ frame_size = ptr_hybrid->frame_size;
+ for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
+ band_res = ptr_hybrid->ptr_resol[band];
+
+ memcpy(ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_qmf_buf_re[band],
+ (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_re[0]));
+ memcpy(ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_qmf_buf_im[band],
+ (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_im[0]));
+
+ for (n = 0; n < frame_size; n++) {
+ ptr_hybrid->ptr_work_re[(HYBRID_FILTER_LENGTH - 1) + n] =
+ ptr_qmf_re[n + HYBRID_FILTER_DELAY][band];
+ ptr_hybrid->ptr_work_im[(HYBRID_FILTER_LENGTH - 1) + n] =
+ ptr_qmf_im[n + HYBRID_FILTER_DELAY][band];
+ }
+
+ memcpy(ptr_hybrid->ptr_qmf_buf_re[band], ptr_hybrid->ptr_work_re + frame_size,
+ (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_re[band][0]));
+ memcpy(ptr_hybrid->ptr_qmf_buf_im[band], ptr_hybrid->ptr_work_im + frame_size,
+ (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_im[band][0]));
+
+ if (ptr_tmp_hyb_re) {
+ switch (band_res) {
+ case NO_HYBRID_CHANNELS_2:
+ ixheaacd_k_chan_filt(
+ ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
+ ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_2, REAL,
+ ptr_ps_tables->p2_13_20,
+ &ptr_ps_tables->cos_mod_2channel[0][0]);
+ break;
+ case NO_HYBRID_CHANNELS_4:
+ ixheaacd_k_chan_filt(
+ ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
+ ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_4, CPLX,
+ ptr_ps_tables->p4_13_34,
+ &ptr_ps_tables->cos_sin_mod_4channel[0][0]);
+ break;
+ case NO_HYBRID_CHANNELS_8:
+ ixheaacd_k_chan_filt(
+ ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
+ ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_8, CPLX,
+ use_34_st_bands ? ptr_ps_tables->p8_13_34 : ptr_ps_tables->p8_13_20,
+ &ptr_ps_tables->cos_sin_mod_8channel[0][0]);
+ break;
+ case NO_HYBRID_CHANNELS_12:
+ ixheaacd_k_chan_filt(ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im,
+ ptr_hybrid->ptr_temp_re, ptr_hybrid->ptr_temp_im, frame_size,
+ NO_HYBRID_CHANNELS_12, CPLX, ptr_ps_tables->p12_13_34,
+ &ptr_ps_tables->cos_sin_mod_12channel[0][0]);
+ break;
+ default:
+ break;
+ }
+
+ for (n = 0; n < frame_size; n++) {
+ for (k = 0; k < (WORD32)band_res; k++) {
+ ptr_tmp_hyb_re[n][ch_offset + k] = ptr_hybrid->ptr_temp_re[n][k];
+ ptr_tmp_hyb_im[n][ch_offset + k] = ptr_hybrid->ptr_temp_im[n][k];
+ }
+ }
+ ch_offset += band_res;
+ }
+ }
+}
+
+VOID ixheaacd_hyb_synth(
+ FLOAT32 (*ptr_tmp_hyb_re)[MAX_NUM_COLUMNS],
+ FLOAT32 (*ptr_tmp_hyb_im)[MAX_NUM_COLUMNS],
+ FLOAT32 **ptr_qmf_re,
+ FLOAT32 **ptr_qmf_im,
+ ia_hybrid_flt_struct *ptr_hybrid) {
+ WORD32 k, n, band;
+ WORD16 band_res;
+ WORD32 frame_size = ptr_hybrid->frame_size;
+ WORD32 ch_offset = 0;
+
+ for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
+ band_res = ptr_hybrid->ptr_resol[band];
+
+ for (n = 0; n < frame_size; n++) {
+ ptr_qmf_re[n][band] = ptr_qmf_im[n][band] = 0;
+
+ for (k = 0; k < (WORD32)band_res; k++) {
+ ptr_qmf_re[n][band] += ptr_tmp_hyb_re[n][ch_offset + k];
+ ptr_qmf_im[n][band] += ptr_tmp_hyb_im[n][ch_offset + k];
+ }
+ }
+ ch_offset += band_res;
+ }
+}
+
+VOID ixheaacd_map_34_float_to_20(FLOAT32 *ptr_index) {
+ ptr_index[0] = (2 * ptr_index[0] + ptr_index[1]) / 3.0f;
+ ptr_index[1] = (ptr_index[1] + 2 * ptr_index[2]) / 3.0f;
+ ptr_index[2] = (2 * ptr_index[3] + ptr_index[4]) / 3.0f;
+ ptr_index[3] = (ptr_index[4] + 2 * ptr_index[5]) / 3.0f;
+ ptr_index[4] = (ptr_index[6] + ptr_index[7]) / 2.0f;
+ ptr_index[5] = (ptr_index[8] + ptr_index[9]) / 2.0f;
+ ptr_index[6] = ptr_index[10];
+ ptr_index[7] = ptr_index[11];
+ ptr_index[8] = (ptr_index[12] + ptr_index[13]) / 2.0f;
+ ptr_index[9] = (ptr_index[14] + ptr_index[15]) / 2.0f;
+ ptr_index[10] = ptr_index[16];
+ ptr_index[11] = ptr_index[17];
+ ptr_index[12] = ptr_index[18];
+ ptr_index[13] = ptr_index[19];
+ ptr_index[14] = (ptr_index[20] + ptr_index[21]) / 2.0f;
+ ptr_index[15] = (ptr_index[22] + ptr_index[23]) / 2.0f;
+ ptr_index[16] = (ptr_index[24] + ptr_index[25]) / 2.0f;
+ ptr_index[17] = (ptr_index[26] + ptr_index[27]) / 2.0f;
+ ptr_index[18] = (ptr_index[28] + ptr_index[29] + ptr_index[30] + ptr_index[31]) / 4.0f;
+ ptr_index[19] = (ptr_index[32] + ptr_index[33]) / 2.0f;
+}
+
+VOID ixheaacd_map_20_float_to_34(FLOAT32 *ptr_index) {
+ FLOAT32 arr_temp[NUM_HI_RES_BINS];
+ WORD32 i;
+
+ arr_temp[0] = ptr_index[0];
+ arr_temp[1] = (ptr_index[0] + ptr_index[1]) / 2.0f;
+ arr_temp[2] = ptr_index[1];
+ arr_temp[3] = ptr_index[2];
+ arr_temp[4] = (ptr_index[2] + ptr_index[3]) / 2.0f;
+ arr_temp[5] = ptr_index[3];
+ arr_temp[6] = ptr_index[4];
+ arr_temp[7] = ptr_index[4];
+ arr_temp[8] = ptr_index[5];
+ arr_temp[9] = ptr_index[5];
+ arr_temp[10] = ptr_index[6];
+ arr_temp[11] = ptr_index[7];
+ arr_temp[12] = ptr_index[8];
+ arr_temp[13] = ptr_index[8];
+ arr_temp[14] = ptr_index[9];
+ arr_temp[15] = ptr_index[9];
+ arr_temp[16] = ptr_index[10];
+ arr_temp[17] = ptr_index[11];
+ arr_temp[18] = ptr_index[12];
+ arr_temp[19] = ptr_index[13];
+ arr_temp[20] = ptr_index[14];
+ arr_temp[21] = ptr_index[14];
+ arr_temp[22] = ptr_index[15];
+ arr_temp[23] = ptr_index[15];
+ arr_temp[24] = ptr_index[16];
+ arr_temp[25] = ptr_index[16];
+ arr_temp[26] = ptr_index[17];
+ arr_temp[27] = ptr_index[17];
+ arr_temp[28] = ptr_index[18];
+ arr_temp[29] = ptr_index[18];
+ arr_temp[30] = ptr_index[18];
+ arr_temp[31] = ptr_index[18];
+ arr_temp[32] = ptr_index[19];
+ arr_temp[33] = ptr_index[19];
+
+ for (i = 0; i < 34; i++) {
+ ptr_index[i] = arr_temp[i];
+ }
+}
+
+WORD32 ixheaacd_create_ps_esbr_dec(ia_ps_dec_struct *ptr_ps_dec_struct,
+ ia_ps_tables_struct *ptr_ps_tables, UWORD32 noQmfChans,
+ UWORD32 num_sub_samples, WORD32 ps_mode) {
+ UWORD32 i;
+ ia_ps_dec_struct *ptr_ps_dec = ptr_ps_dec_struct;
+
+ ptr_ps_dec = ptr_ps_dec_struct;
+
+ ptr_ps_dec->num_sub_samples = num_sub_samples;
+ ptr_ps_dec->num_chans = noQmfChans;
+ ptr_ps_dec->ps_mode = ps_mode;
+
+ ptr_ps_dec->ps_data_present = 0;
+ ptr_ps_dec->enable_iid = 0;
+ ptr_ps_dec->iid_mode = 0;
+ ptr_ps_dec->enable_icc = 0;
+ ptr_ps_dec->icc_mode = 0;
+ ptr_ps_dec->enable_ext = 0;
+
+ ptr_ps_dec->use_pca_rot_flg = 0;
+ ptr_ps_dec->freq_res_ipd = 0;
+ ptr_ps_dec->use_34_st_bands = 0;
+ ptr_ps_dec->use_34_st_bands_prev = 0;
+
+ ptr_ps_dec->str_flt_hybrid20.frame_size = ptr_ps_dec->num_sub_samples;
+ ptr_ps_dec->str_flt_hybrid20.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID20;
+ ptr_ps_dec->str_flt_hybrid20.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb20[0];
+ ptr_ps_dec->str_flt_hybrid20.ptr_work_re = &ptr_ps_dec->hyb_work_re_20[0];
+ ptr_ps_dec->str_flt_hybrid20.ptr_work_im = &ptr_ps_dec->hyb_work_im_20[0];
+ ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_20;
+ ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_20;
+ ptr_ps_dec->str_flt_hybrid20.ptr_temp_re = ptr_ps_dec->hyb_temp_re_20;
+ ptr_ps_dec->str_flt_hybrid20.ptr_temp_im = ptr_ps_dec->hyb_temp_im_20;
+
+ ptr_ps_dec->str_flt_hybrid34.frame_size = ptr_ps_dec->num_sub_samples;
+ ptr_ps_dec->str_flt_hybrid34.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID34;
+ ptr_ps_dec->str_flt_hybrid34.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb34[0];
+ ptr_ps_dec->str_flt_hybrid34.ptr_work_re = &ptr_ps_dec->hyb_work_re_34[0];
+ ptr_ps_dec->str_flt_hybrid34.ptr_work_im = &ptr_ps_dec->hyb_work_im_34[0];
+ ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_34;
+ ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_34;
+ ptr_ps_dec->str_flt_hybrid34.ptr_temp_re = ptr_ps_dec->hyb_temp_re_34;
+ ptr_ps_dec->str_flt_hybrid34.ptr_temp_im = ptr_ps_dec->hyb_temp_im_34;
+
+ ptr_ps_dec->delay_buf_idx = 0;
+
+ for (i = 0; i < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; i++) {
+ ptr_ps_dec->delay_qmf_delay_buf_idx[i] = 0;
+ ptr_ps_dec->delay_qmf_delay_num_samp[i] = ptr_ps_tables->qmf_delay_idx_tbl[i];
+ }
+
+ for (i = 0; i < NUM_HI_RES_BINS; i++) {
+ ptr_ps_dec->h11_re_prev[i] = 1.0f;
+ ptr_ps_dec->h12_re_prev[i] = 1.0f;
+ }
+
+ memset(ptr_ps_dec->h11_im_prev, 0, sizeof(ptr_ps_dec->h11_im_prev));
+ memset(ptr_ps_dec->h12_im_prev, 0, sizeof(ptr_ps_dec->h12_im_prev));
+ memset(ptr_ps_dec->h21_re_prev, 0, sizeof(ptr_ps_dec->h21_re_prev));
+ memset(ptr_ps_dec->h22_re_prev, 0, sizeof(ptr_ps_dec->h22_re_prev));
+ memset(ptr_ps_dec->h21_im_prev, 0, sizeof(ptr_ps_dec->h21_im_prev));
+ memset(ptr_ps_dec->h22_im_prev, 0, sizeof(ptr_ps_dec->h22_im_prev));
+
+ memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
+ memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
+ memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
+ memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
+
+ for (i = 0; i < NUM_HI_RES_BINS; i++) {
+ ptr_ps_dec->peak_decay_fast_bin[i] = 0.0f;
+ ptr_ps_dec->prev_nrg_bin[i] = 0.0f;
+ ptr_ps_dec->prev_peak_diff_bin[i] = 0.0f;
+ }
+
+ memset(ptr_ps_dec->qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->qmf_delay_buf_re));
+ memset(ptr_ps_dec->qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->qmf_delay_buf_im));
+ memset(ptr_ps_dec->sub_qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_re));
+ memset(ptr_ps_dec->sub_qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_im));
+
+ for (i = 0; i < NUM_SER_AP_LINKS; i++) {
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
+ }
+
+ return 0;
+}
+
+VOID ixheaacd_esbr_apply_ps(ia_ps_dec_struct *ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ WORD32 usb, ia_ps_tables_struct *ptr_ps_tables,
+ WORD32 num_time_slot) {
+ WORD32 sb;
+ WORD32 i, k;
+
+ WORD32 max_num_column;
+
+ if (num_time_slot == 15)
+ max_num_column = MAX_NUM_COLUMNS_960;
+ else
+ max_num_column = MAX_NUM_COLUMNS;
+
+ if (ptr_ps_dec->use_34_st_bands) {
+ ptr_ps_dec->ptr_group_borders = (WORD32 *)&ptr_ps_tables->group_borders_34_tbl[0];
+ ptr_ps_dec->ptr_bins_group_map = (WORD32 *)&ptr_ps_tables->bin_group_map_34[0];
+ ptr_ps_dec->ptr_hybrid = &ptr_ps_dec->str_flt_hybrid34;
+ ptr_ps_dec->num_groups = NUM_IID_GROUPS_HI_RES;
+ ptr_ps_dec->num_sub_qmf_groups = SUBQMF_GROUPS_HI_RES;
+ ptr_ps_dec->num_bins = NUM_HI_RES_BINS;
+ ptr_ps_dec->first_delay_gr = SUBQMF_GROUPS_HI_RES;
+ } else {
+ ptr_ps_dec->ptr_group_borders = (WORD32 *)&ptr_ps_tables->group_borders_20_tbl[0];
+ ptr_ps_dec->ptr_bins_group_map = (WORD32 *)&ptr_ps_tables->bin_group_map_20[0];
+ ptr_ps_dec->ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
+ ptr_ps_dec->num_groups = NUM_IID_GROUPS;
+ ptr_ps_dec->num_sub_qmf_groups = SUBQMF_GROUPS;
+ ptr_ps_dec->num_bins = NUM_MID_RES_BINS;
+ ptr_ps_dec->first_delay_gr = SUBQMF_GROUPS;
+ }
+
+ for (sb = usb; sb < ptr_ps_dec->num_chans; sb++) {
+ for (i = 0; i < NUM_SER_AP_LINKS; i++) {
+ for (k = 0; k < ptr_ps_dec->delay_sample_ser[i]; k++) {
+ ptr_ps_dec->ser_qmf_delay_buf_re[i][k][sb] = 0;
+ ptr_ps_dec->ser_qmf_delay_buf_im[i][k][sb] = 0;
+ }
+ }
+ for (k = 0; k < HIGH_DEL; k++) {
+ ptr_ps_dec->qmf_delay_buf_re[k][sb] = 0;
+ ptr_ps_dec->qmf_delay_buf_im[k][sb] = 0;
+ }
+ }
+ ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
+ (const FLOAT32 **)pp_qmf_buf_im_left,
+ ptr_ps_dec, ptr_ps_tables, 0);
+ ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
+ (const FLOAT32 **)pp_qmf_buf_im_left,
+ ptr_ps_dec, ptr_ps_tables, 1);
+
+ if (!ptr_ps_dec->use_34_st_bands) {
+ WORD32 k;
+ for (k = 0; k < (WORD32)ptr_ps_dec->num_sub_samples; k++) {
+ ptr_ps_dec->hyb_left_re[k][3] += ptr_ps_dec->hyb_left_re[k][4];
+ ptr_ps_dec->hyb_left_im[k][3] += ptr_ps_dec->hyb_left_im[k][4];
+ ptr_ps_dec->hyb_left_re[k][4] = 0.;
+ ptr_ps_dec->hyb_left_im[k][4] = 0.;
+
+ ptr_ps_dec->hyb_left_re[k][2] += ptr_ps_dec->hyb_left_re[k][5];
+ ptr_ps_dec->hyb_left_im[k][2] += ptr_ps_dec->hyb_left_im[k][5];
+ ptr_ps_dec->hyb_left_re[k][5] = 0.;
+ ptr_ps_dec->hyb_left_im[k][5] = 0.;
+ }
+ }
+
+ if (ptr_ps_dec->ps_mode & 0x0080) {
+ WORD32 i, j;
+ for (i = 0; i < max_num_column; i++) {
+ for (j = 0; j < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; j++) {
+ pp_qmf_buf_im_right[i][j] = pp_qmf_buf_im_left[i][j];
+ pp_qmf_buf_re_right[i][j] = pp_qmf_buf_re_left[i][j];
+ }
+ }
+ for (i = 0; i < max_num_column; i++) {
+ for (j = 0; j < NUM_SUB_QMF_CHANNELS_HI_RES; j++) {
+ ptr_ps_dec->hyb_right_re[i][j] = ptr_ps_dec->hyb_left_re[i][j];
+ ptr_ps_dec->hyb_right_im[i][j] = ptr_ps_dec->hyb_left_im[i][j];
+ }
+ }
+ } else {
+ if (ptr_ps_dec->ps_mode & 0x0002) {
+ WORD32 i, j;
+ for (i = 0; i < max_num_column; i++) {
+ for (j = 0; j < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; j++) {
+ pp_qmf_buf_im_right[i][j] = 0.;
+ pp_qmf_buf_re_right[i][j] = 0.;
+ }
+ }
+ for (i = 0; i < max_num_column; i++) {
+ for (j = 0; j < NUM_SUB_QMF_CHANNELS_HI_RES; j++) {
+ ptr_ps_dec->hyb_right_re[i][j] = 0.;
+ ptr_ps_dec->hyb_right_im[i][j] = 0.;
+ }
+ }
+ } else {
+ ixheaacd_esbr_ps_de_correlate(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
+ pp_qmf_buf_re_right, pp_qmf_buf_im_right,
+ ptr_ps_tables);
+ }
+
+ if (!(ptr_ps_dec->ps_mode & 0x0040)) {
+ ixheaacd_esbr_ps_apply_rotation(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
+ pp_qmf_buf_re_right, pp_qmf_buf_im_right,
+ ptr_ps_tables);
+ }
+ }
+
+ ixheaacd_hyb_synth(ptr_ps_dec->hyb_left_re, ptr_ps_dec->hyb_left_im,
+ pp_qmf_buf_re_left, pp_qmf_buf_im_left, ptr_ps_dec->ptr_hybrid);
+
+ ixheaacd_hyb_synth(ptr_ps_dec->hyb_right_re, ptr_ps_dec->hyb_right_im,
+ pp_qmf_buf_re_right, pp_qmf_buf_im_right, ptr_ps_dec->ptr_hybrid);
+
+ ptr_ps_dec->use_34_st_bands_prev = ptr_ps_dec->use_34_st_bands;
+
+}
+
+VOID ixheaacd_esbr_ps_de_correlate(
+ ia_ps_dec_struct *ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ ia_ps_tables_struct *ptr_ps_tables) {
+ WORD32 sb, maxsb, gr, k;
+ WORD32 m;
+ WORD32 l_delay = 0;
+ WORD32 l_ser_delay_arr[NUM_SER_AP_LINKS] = {0};
+ FLOAT32 re_left;
+ FLOAT32 im_left;
+ FLOAT32 peak_diff, nrg, trans_ratio;
+
+ FLOAT32(*pp_hyb_left_re)[MAX_NUM_COLUMNS];
+ FLOAT32(*pp_hyb_left_im)[MAX_NUM_COLUMNS];
+ FLOAT32(*pp_hyb_right_re)[MAX_NUM_COLUMNS];
+ FLOAT32(*pp_hyb_right_im)[MAX_NUM_COLUMNS];
+
+ FLOAT32(*ppp_ser_sub_qmf_dealy_buf_re)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32(*ppp_ser_sub_qmf_dealy_buf_im)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32(*pp_sub_qmf_delay_buf_re)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32(*pp_sub_qmf_delay_buf_im)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
+
+ FLOAT32 *pp_frac_delay_phase_fac_re;
+ FLOAT32 *pp_frac_delay_phase_fac_im;
+ FLOAT32(*pp_frac_delay_phase_fac_ser_re)[NUM_SER_AP_LINKS];
+ FLOAT32(*pp_frac_delay_phase_fac_ser_im)[NUM_SER_AP_LINKS];
+
+ WORD32 *p_delay_qmf_delay_num_samp = NULL;
+ WORD32 *p_delay_qmf_delay_buf_idx = NULL;
+
+ FLOAT32 pow_arr[32][NUM_HI_RES_BINS];
+ FLOAT32 trans_ratio_arr[32][NUM_HI_RES_BINS];
+ WORD32 bin;
+ FLOAT32 decay_cutoff;
+
+ pp_hyb_left_re = ptr_ps_dec->hyb_left_re;
+ pp_hyb_left_im = ptr_ps_dec->hyb_left_im;
+ pp_hyb_right_re = ptr_ps_dec->hyb_right_re;
+ pp_hyb_right_im = ptr_ps_dec->hyb_right_im;
+
+ ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_sub_qmf_dealy_buf_re;
+ ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_sub_qmf_dealy_buf_im;
+
+ pp_sub_qmf_delay_buf_re = ptr_ps_dec->sub_qmf_delay_buf_re;
+ pp_sub_qmf_delay_buf_im = ptr_ps_dec->sub_qmf_delay_buf_im;
+
+ if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
+ if (ptr_ps_dec->use_34_st_bands) {
+ WORD32 i;
+ for (i = 0; i < NUM_SER_AP_LINKS; i++) {
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
+ }
+ return;
+ } else {
+ WORD32 i;
+ for (i = 0; i < NUM_SER_AP_LINKS; i++) {
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
+ memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
+ memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
+ sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
+ }
+
+ return;
+ }
+ }
+
+ if (ptr_ps_dec->use_34_st_bands) {
+ pp_frac_delay_phase_fac_re = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_re_34;
+ pp_frac_delay_phase_fac_im = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_im_34;
+ pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_re_34;
+ pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_im_34;
+ } else {
+ pp_frac_delay_phase_fac_re = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_re_20;
+ pp_frac_delay_phase_fac_im = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_im_20;
+ pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_re_20;
+ pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_im_20;
+ }
+
+ for (k = 0; k < 32; k++) {
+ for (bin = 0; bin < NUM_HI_RES_BINS; bin++) {
+ pow_arr[k][bin] = 0;
+ }
+ }
+
+ for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
+ maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
+ for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
+ for (k = ptr_ps_dec->border_position[0];
+ k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
+ im_left = pp_hyb_left_re[k][sb];
+ re_left = pp_hyb_left_im[k][sb];
+ pow_arr[k][bin] += im_left * im_left + re_left * re_left;
+ }
+ }
+ }
+ for (; gr < ptr_ps_dec->num_groups; gr++) {
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
+ maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
+ for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
+ for (k = ptr_ps_dec->border_position[0];
+ k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
+ im_left = pp_qmf_buf_re_left[k][sb];
+ re_left = pp_qmf_buf_im_left[k][sb];
+ pow_arr[k][bin] += im_left * im_left + re_left * re_left;
+ }
+ }
+ }
+
+ for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
+ for (k = ptr_ps_dec->border_position[0];
+ k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
+ FLOAT32 q = 1.5f;
+
+ ptr_ps_dec->peak_decay_fast_bin[bin] *= PEAK_DECAY_FACTOR_FAST;
+ if (ptr_ps_dec->peak_decay_fast_bin[bin] < pow_arr[k][bin])
+ ptr_ps_dec->peak_decay_fast_bin[bin] = pow_arr[k][bin];
+
+ peak_diff = ptr_ps_dec->prev_peak_diff_bin[bin];
+ peak_diff += INIT_FILT_COEFF * (ptr_ps_dec->peak_decay_fast_bin[bin] -
+ pow_arr[k][bin] -
+ ptr_ps_dec->prev_peak_diff_bin[bin]);
+ ptr_ps_dec->prev_peak_diff_bin[bin] = peak_diff;
+
+ nrg = ptr_ps_dec->prev_nrg_bin[bin];
+ nrg += INIT_FILT_COEFF * (pow_arr[k][bin] - ptr_ps_dec->prev_nrg_bin[bin]);
+ ptr_ps_dec->prev_nrg_bin[bin] = nrg;
+ if (q * peak_diff <= nrg) {
+ trans_ratio_arr[k][bin] = 1.0f;
+ } else {
+ trans_ratio_arr[k][bin] = nrg / (q * peak_diff);
+ }
+ }
+ }
+
+ if (ptr_ps_dec->use_34_st_bands) {
+ decay_cutoff = DECAY_CUTOFF_HI_RES;
+ } else {
+ decay_cutoff = DECAY_CUTOFF;
+ }
+
+ for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
+ maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
+
+ for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
+ FLOAT32 decay_scale_factor;
+
+ decay_scale_factor = 1.0f;
+
+ decay_scale_factor = max(decay_scale_factor, 0.0f);
+
+ l_delay = ptr_ps_dec->delay_buf_idx;
+ for (k = 0; k < NUM_SER_AP_LINKS; k++)
+ l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
+
+ for (k = ptr_ps_dec->border_position[0];
+ k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
+ FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
+
+ im_left = pp_hyb_left_re[k][sb];
+ re_left = pp_hyb_left_im[k][sb];
+
+ {
+ real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
+ imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
+ pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
+ pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
+
+ real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
+ pp_frac_delay_phase_fac_im[sb];
+ imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
+ pp_frac_delay_phase_fac_re[sb];
+
+ r_r0 = real;
+ i_r0 = imag;
+ for (m = 0; m < NUM_SER_AP_LINKS; m++) {
+ real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
+ imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
+ real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
+ imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
+ imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
+ imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
+
+ real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
+ imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
+ ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
+ r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
+ ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
+ i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
+ r_r0 = real;
+ i_r0 = imag;
+ }
+ }
+
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
+ trans_ratio = trans_ratio_arr[k][bin];
+
+ pp_hyb_right_re[k][sb] = trans_ratio * r_r0;
+ pp_hyb_right_im[k][sb] = trans_ratio * i_r0;
+
+ if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
+
+ for (m = 0; m < NUM_SER_AP_LINKS; m++) {
+ if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
+ l_ser_delay_arr[m] = 0;
+ }
+ }
+ }
+ }
+ }
+ {
+ ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_qmf_delay_buf_re;
+ ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_qmf_delay_buf_im;
+
+ pp_sub_qmf_delay_buf_re = ptr_ps_dec->qmf_delay_buf_re;
+ pp_sub_qmf_delay_buf_im = ptr_ps_dec->qmf_delay_buf_im;
+
+ pp_frac_delay_phase_fac_re = ptr_ps_tables->qmf_fract_delay_phase_factor_re;
+ pp_frac_delay_phase_fac_im = ptr_ps_tables->qmf_fract_delay_phase_factor_im;
+
+ pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_re;
+ pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_im;
+
+ p_delay_qmf_delay_buf_idx = ptr_ps_dec->delay_qmf_delay_buf_idx;
+ p_delay_qmf_delay_num_samp = ptr_ps_dec->delay_qmf_delay_num_samp;
+ }
+ for (; gr < ptr_ps_dec->num_groups; gr++) {
+ maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
+
+ for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
+ FLOAT32 decay_scale_factor;
+ if (sb <= decay_cutoff)
+ decay_scale_factor = 1.0f;
+ else
+ decay_scale_factor = 1.0f + decay_cutoff * DECAY_SLOPE - DECAY_SLOPE * sb;
+
+ decay_scale_factor = max(decay_scale_factor, 0.0f);
+
+ l_delay = ptr_ps_dec->delay_buf_idx;
+ for (k = 0; k < NUM_SER_AP_LINKS; k++)
+ l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
+
+ for (k = ptr_ps_dec->border_position[0];
+ k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
+ FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
+
+ im_left = pp_qmf_buf_re_left[k][sb];
+ re_left = pp_qmf_buf_im_left[k][sb];
+
+ if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
+ real = pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb];
+ imag = pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb];
+ r_r0 = real;
+ i_r0 = imag;
+ pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb] = im_left;
+ pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb] = re_left;
+ } else {
+ real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
+ imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
+ pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
+ pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
+
+ real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
+ pp_frac_delay_phase_fac_im[sb];
+ imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
+ pp_frac_delay_phase_fac_re[sb];
+
+ r_r0 = real;
+ i_r0 = imag;
+ for (m = 0; m < NUM_SER_AP_LINKS; m++) {
+ real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
+ imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
+ real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
+ imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
+ imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
+ imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
+
+ real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
+ imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
+ ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
+ r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
+ ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
+ i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
+ r_r0 = real;
+ i_r0 = imag;
+ }
+ }
+
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
+ trans_ratio = trans_ratio_arr[k][bin];
+
+ pp_qmf_buf_re_right[k][sb] = trans_ratio * r_r0;
+ pp_qmf_buf_im_right[k][sb] = trans_ratio * i_r0;
+
+ if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
+
+ if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
+ if (++p_delay_qmf_delay_buf_idx[sb] >= p_delay_qmf_delay_num_samp[sb]) {
+ p_delay_qmf_delay_buf_idx[sb] = 0;
+ }
+ }
+
+ for (m = 0; m < NUM_SER_AP_LINKS; m++) {
+ if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
+ l_ser_delay_arr[m] = 0;
+ }
+ }
+ }
+ }
+ }
+
+ ptr_ps_dec->delay_buf_idx = l_delay;
+ for (m = 0; m < NUM_SER_AP_LINKS; m++) {
+ ptr_ps_dec->delay_buf_idx_ser[m] = l_ser_delay_arr[m];
+ }
+}
+
+VOID ixheaacd_esbr_ps_apply_rotation(
+ ia_ps_dec_struct *ptr_ps_dec,
+ FLOAT32 **pp_qmf_buf_re_left,
+ FLOAT32 **pp_qmf_buf_im_left,
+ FLOAT32 **pp_qmf_buf_re_right,
+ FLOAT32 **pp_qmf_buf_im_right,
+ ia_ps_tables_struct *ptr_ps_tables) {
+ WORD32 i;
+ WORD32 group;
+ WORD32 bin = 0;
+ WORD32 subband, max_subband;
+ WORD32 env;
+ FLOAT32(*p_hyb_left_re)[MAX_NUM_COLUMNS];
+ FLOAT32(*p_hyb_left_im)[MAX_NUM_COLUMNS];
+ FLOAT32(*p_hyb_rigth_re)[MAX_NUM_COLUMNS];
+ FLOAT32(*p_hyb_rigth_im)[MAX_NUM_COLUMNS];
+ FLOAT32 scale_fac_l, scale_fac_r;
+ FLOAT32 alpha, beta;
+ FLOAT32 ipd, opd;
+ FLOAT32 ipd1, opd1;
+ FLOAT32 ipd2, opd2;
+
+ FLOAT32 h11r, h12r, h21r, h22r;
+ FLOAT32 h11i, h12i, h21i, h22i;
+ FLOAT32 H11r, H12r, H21r, H22r;
+ FLOAT32 H11i, H12i, H21i, H22i;
+ FLOAT32 deltaH11r, deltaH12r, deltaH21r, deltaH22r;
+ FLOAT32 deltaH11i, deltaH12i, deltaH21i, deltaH22i;
+ FLOAT32 l_left_re, l_left_im;
+ FLOAT32 l_right_re, l_right_im;
+
+ WORD32 L;
+ FLOAT32 *ptr_scale_factors;
+ const WORD32 *ptr_quantized_iids;
+ WORD32 num_iid_steps;
+
+ if (ptr_ps_dec->iid_quant) {
+ num_iid_steps = NUM_IID_STEPS_FINE;
+ ptr_scale_factors = ptr_ps_tables->scale_factors_fine_flt;
+ ptr_quantized_iids = ptr_ps_tables->quantized_iids_fine;
+ } else {
+ num_iid_steps = NUM_IID_STEPS;
+ ptr_scale_factors = ptr_ps_tables->scale_factors_flt;
+ ptr_quantized_iids = ptr_ps_tables->quantized_iids;
+ }
+
+ if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
+ if (ptr_ps_dec->use_34_st_bands) {
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h11_re_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h12_re_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h21_re_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h22_re_prev);
+
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h11_im_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h12_im_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h21_im_prev);
+ ixheaacd_map_20_float_to_34(ptr_ps_dec->h22_im_prev);
+
+ memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
+ memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
+ memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
+ memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
+ } else {
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h11_re_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h12_re_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h21_re_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h22_re_prev);
+
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h11_im_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h12_im_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h21_im_prev);
+ ixheaacd_map_34_float_to_20(ptr_ps_dec->h22_im_prev);
+
+ memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
+ memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
+ memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
+ memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
+ }
+ }
+
+ for (env = 0; env < ptr_ps_dec->num_env; env++) {
+ for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
+ if (!ptr_ps_dec->use_pca_rot_flg) {
+ scale_fac_r = ptr_scale_factors[num_iid_steps +
+ ptr_ps_dec->iid_par_table[env][bin]];
+ scale_fac_l = ptr_scale_factors[num_iid_steps -
+ ptr_ps_dec->iid_par_table[env][bin]];
+
+ alpha = ptr_ps_tables->alphas[ptr_ps_dec->icc_par_table[env][bin]];
+
+ beta = alpha * (scale_fac_r - scale_fac_l) / PSC_SQRT2F;
+
+ h11r = (FLOAT32)(scale_fac_l * cos(beta + alpha));
+ h12r = (FLOAT32)(scale_fac_r * cos(beta - alpha));
+ h21r = (FLOAT32)(scale_fac_l * sin(beta + alpha));
+ h22r = (FLOAT32)(scale_fac_r * sin(beta - alpha));
+ } else {
+ FLOAT32 c, rho, mu, alpha, gamma;
+ WORD32 i;
+
+ i = ptr_ps_dec->iid_par_table[env][bin];
+ c = (FLOAT32)pow(
+ 10.0,
+ ((i) ? (((i > 0) ? 1 : -1) * ptr_quantized_iids[((i > 0) ? i : -i) - 1]) : 0.) /
+ 20.0);
+ rho = ptr_ps_tables->quantized_rhos[ptr_ps_dec->icc_par_table[env][bin]];
+ rho = max(rho, 0.05f);
+
+ if (rho == 0.0f && c == 1.) {
+ alpha = (FLOAT32)PI / 4.0f;
+ } else {
+ if (rho <= 0.05f) {
+ rho = 0.05f;
+ }
+ alpha = 0.5f * (FLOAT32)atan((2.0f * c * rho) / (c * c - 1.0f));
+
+ if (alpha < 0.) {
+ alpha += (FLOAT32)PI / 2.0f;
+ }
+ }
+ mu = c + 1.0f / c;
+ mu = 1 + (4.0f * rho * rho - 4.0f) / (mu * mu);
+ gamma = (FLOAT32)atan(sqrt((1.0f - sqrt(mu)) / (1.0f + sqrt(mu))));
+
+ h11r = (FLOAT32)(sqrt(2.) * cos(alpha) * cos(gamma));
+ h12r = (FLOAT32)(sqrt(2.) * sin(alpha) * cos(gamma));
+ h21r = (FLOAT32)(sqrt(2.) * -sin(alpha) * sin(gamma));
+ h22r = (FLOAT32)(sqrt(2.) * cos(alpha) * sin(gamma));
+ }
+
+ if (bin >= ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]) {
+ h11i = h12i = h21i = h22i = 0.0f;
+ } else {
+ ipd = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map[env][bin];
+ opd = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map[env][bin];
+ ipd1 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_1[bin];
+ opd1 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_1[bin];
+ ipd2 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_2[bin];
+ opd2 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_2[bin];
+
+ l_left_re = (FLOAT32)cos(ipd);
+ l_left_im = (FLOAT32)sin(ipd);
+ l_right_re = (FLOAT32)cos(opd);
+ l_right_im = (FLOAT32)sin(opd);
+
+ l_left_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(ipd1);
+ l_left_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(ipd1);
+ l_right_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(opd1);
+ l_right_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(opd1);
+
+ l_left_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(ipd2);
+ l_left_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(ipd2);
+ l_right_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(opd2);
+ l_right_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(opd2);
+
+ ipd = (FLOAT32)atan2(l_left_im, l_left_re);
+ opd = (FLOAT32)atan2(l_right_im, l_right_re);
+
+ l_left_re = (FLOAT32)cos(opd);
+ l_left_im = (FLOAT32)sin(opd);
+ opd -= ipd;
+ l_right_re = (FLOAT32)cos(opd);
+ l_right_im = (FLOAT32)sin(opd);
+
+ h11i = h11r * l_left_im;
+ h12i = h12r * l_right_im;
+ h21i = h21r * l_left_im;
+ h22i = h22r * l_right_im;
+
+ h11r *= l_left_re;
+ h12r *= l_right_re;
+ h21r *= l_left_re;
+ h22r *= l_right_re;
+ }
+
+ ptr_ps_dec->h11_re_vec[bin] = h11r;
+ ptr_ps_dec->h12_re_vec[bin] = h12r;
+ ptr_ps_dec->h21_re_vec[bin] = h21r;
+ ptr_ps_dec->h22_re_vec[bin] = h22r;
+ ptr_ps_dec->h11_im_vec[bin] = h11i;
+ ptr_ps_dec->h12_im_vec[bin] = h12i;
+ ptr_ps_dec->h21_im_vec[bin] = h21i;
+ ptr_ps_dec->h22_im_vec[bin] = h22i;
+
+ }
+
+ p_hyb_left_re = ptr_ps_dec->hyb_left_re;
+ p_hyb_left_im = ptr_ps_dec->hyb_left_im;
+ p_hyb_rigth_re = ptr_ps_dec->hyb_right_re;
+ p_hyb_rigth_im = ptr_ps_dec->hyb_right_im;
+
+ for (group = 0; group < ptr_ps_dec->num_sub_qmf_groups; group++) {
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
+
+ max_subband = ptr_ps_dec->ptr_group_borders[group] + 1;
+
+ L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
+
+ H11r = ptr_ps_dec->h11_re_prev[bin];
+ H12r = ptr_ps_dec->h12_re_prev[bin];
+ H21r = ptr_ps_dec->h21_re_prev[bin];
+ H22r = ptr_ps_dec->h22_re_prev[bin];
+ if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
+ H11i = -ptr_ps_dec->h11_im_prev[bin];
+ H12i = -ptr_ps_dec->h12_im_prev[bin];
+ H21i = -ptr_ps_dec->h21_im_prev[bin];
+ H22i = -ptr_ps_dec->h22_im_prev[bin];
+ } else {
+ H11i = ptr_ps_dec->h11_im_prev[bin];
+ H12i = ptr_ps_dec->h12_im_prev[bin];
+ H21i = ptr_ps_dec->h21_im_prev[bin];
+ H22i = ptr_ps_dec->h22_im_prev[bin];
+ }
+
+ h11r = ptr_ps_dec->h11_re_vec[bin];
+ h12r = ptr_ps_dec->h12_re_vec[bin];
+ h21r = ptr_ps_dec->h21_re_vec[bin];
+ h22r = ptr_ps_dec->h22_re_vec[bin];
+ if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
+ h11i = -ptr_ps_dec->h11_im_vec[bin];
+ h12i = -ptr_ps_dec->h12_im_vec[bin];
+ h21i = -ptr_ps_dec->h21_im_vec[bin];
+ h22i = -ptr_ps_dec->h22_im_vec[bin];
+ } else {
+ h11i = ptr_ps_dec->h11_im_vec[bin];
+ h12i = ptr_ps_dec->h12_im_vec[bin];
+ h21i = ptr_ps_dec->h21_im_vec[bin];
+ h22i = ptr_ps_dec->h22_im_vec[bin];
+ }
+
+ deltaH11r = (h11r - H11r) / L;
+ deltaH12r = (h12r - H12r) / L;
+ deltaH21r = (h21r - H21r) / L;
+ deltaH22r = (h22r - H22r) / L;
+
+ deltaH11i = (h11i - H11i) / L;
+ deltaH12i = (h12i - H12i) / L;
+ deltaH21i = (h21i - H21i) / L;
+ deltaH22i = (h22i - H22i) / L;
+
+ for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
+ i++) {
+ H11r += deltaH11r;
+ H12r += deltaH12r;
+ H21r += deltaH21r;
+ H22r += deltaH22r;
+
+ H11i += deltaH11i;
+ H12i += deltaH12i;
+ H21i += deltaH21i;
+ H22i += deltaH22i;
+
+ for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
+ subband++) {
+ l_left_re = H11r * p_hyb_left_re[i][subband] - H11i * p_hyb_left_im[i][subband] +
+ H21r * p_hyb_rigth_re[i][subband] - H21i * p_hyb_rigth_im[i][subband];
+
+ l_left_im = H11i * p_hyb_left_re[i][subband] + H11r * p_hyb_left_im[i][subband] +
+ H21i * p_hyb_rigth_re[i][subband] + H21r * p_hyb_rigth_im[i][subband];
+
+ l_right_re = H12r * p_hyb_left_re[i][subband] - H12i * p_hyb_left_im[i][subband] +
+ H22r * p_hyb_rigth_re[i][subband] - H22i * p_hyb_rigth_im[i][subband];
+
+ l_right_im = H12i * p_hyb_left_re[i][subband] + H12r * p_hyb_left_im[i][subband] +
+ H22i * p_hyb_rigth_re[i][subband] + H22r * p_hyb_rigth_im[i][subband];
+
+ p_hyb_left_re[i][subband] = l_left_re;
+ p_hyb_left_im[i][subband] = l_left_im;
+ p_hyb_rigth_re[i][subband] = l_right_re;
+ p_hyb_rigth_im[i][subband] = l_right_im;
+ }
+ }
+ }
+
+ for (; group < ptr_ps_dec->num_groups; group++) {
+ bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
+
+ max_subband = ptr_ps_dec->ptr_group_borders[group + 1];
+
+ L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
+
+ H11r = ptr_ps_dec->h11_re_prev[bin];
+ H12r = ptr_ps_dec->h12_re_prev[bin];
+ H21r = ptr_ps_dec->h21_re_prev[bin];
+ H22r = ptr_ps_dec->h22_re_prev[bin];
+ if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
+ H11i = -ptr_ps_dec->h11_im_prev[bin];
+ H12i = -ptr_ps_dec->h12_im_prev[bin];
+ H21i = -ptr_ps_dec->h21_im_prev[bin];
+ H22i = -ptr_ps_dec->h22_im_prev[bin];
+ } else {
+ H11i = ptr_ps_dec->h11_im_prev[bin];
+ H12i = ptr_ps_dec->h12_im_prev[bin];
+ H21i = ptr_ps_dec->h21_im_prev[bin];
+ H22i = ptr_ps_dec->h22_im_prev[bin];
+ }
+
+ h11r = ptr_ps_dec->h11_re_vec[bin];
+ h12r = ptr_ps_dec->h12_re_vec[bin];
+ h21r = ptr_ps_dec->h21_re_vec[bin];
+ h22r = ptr_ps_dec->h22_re_vec[bin];
+ if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
+ h11i = -ptr_ps_dec->h11_im_vec[bin];
+ h12i = -ptr_ps_dec->h12_im_vec[bin];
+ h21i = -ptr_ps_dec->h21_im_vec[bin];
+ h22i = -ptr_ps_dec->h22_im_vec[bin];
+ } else {
+ h11i = ptr_ps_dec->h11_im_vec[bin];
+ h12i = ptr_ps_dec->h12_im_vec[bin];
+ h21i = ptr_ps_dec->h21_im_vec[bin];
+ h22i = ptr_ps_dec->h22_im_vec[bin];
+ }
+
+ deltaH11r = (h11r - H11r) / L;
+ deltaH12r = (h12r - H12r) / L;
+ deltaH21r = (h21r - H21r) / L;
+ deltaH22r = (h22r - H22r) / L;
+
+ deltaH11i = (h11i - H11i) / L;
+ deltaH12i = (h12i - H12i) / L;
+ deltaH21i = (h21i - H21i) / L;
+ deltaH22i = (h22i - H22i) / L;
+
+ for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
+ i++) {
+ H11r += deltaH11r;
+ H12r += deltaH12r;
+ H21r += deltaH21r;
+ H22r += deltaH22r;
+
+ H11i += deltaH11i;
+ H12i += deltaH12i;
+ H21i += deltaH21i;
+ H22i += deltaH22i;
+
+ for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
+ subband++) {
+ l_left_re = H11r * pp_qmf_buf_re_left[i][subband] - H11i *
+ pp_qmf_buf_im_left[i][subband] +
+ H21r * pp_qmf_buf_re_right[i][subband] - H21i *
+ pp_qmf_buf_im_right[i][subband];
+
+ l_left_im = H11i * pp_qmf_buf_re_left[i][subband] + H11r *
+ pp_qmf_buf_im_left[i][subband] +
+ H21i * pp_qmf_buf_re_right[i][subband] + H21r *
+ pp_qmf_buf_im_right[i][subband];
+
+ l_right_re = H12r * pp_qmf_buf_re_left[i][subband] - H12i *
+ pp_qmf_buf_im_left[i][subband] +
+ H22r * pp_qmf_buf_re_right[i][subband] - H22i *
+ pp_qmf_buf_im_right[i][subband];
+
+ l_right_im = H12i * pp_qmf_buf_re_left[i][subband] + H12r *
+ pp_qmf_buf_im_left[i][subband] +
+ H22i * pp_qmf_buf_re_right[i][subband] + H22r *
+ pp_qmf_buf_im_right[i][subband];
+
+ pp_qmf_buf_re_left[i][subband] = l_left_re;
+ pp_qmf_buf_im_left[i][subband] = l_left_im;
+ pp_qmf_buf_re_right[i][subband] = l_right_re;
+ pp_qmf_buf_im_right[i][subband] = l_right_im;
+ }
+ }
+ }
+ for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
+ ptr_ps_dec->h11_re_prev[bin] = ptr_ps_dec->h11_re_vec[bin];
+ ptr_ps_dec->h12_re_prev[bin] = ptr_ps_dec->h12_re_vec[bin];
+ ptr_ps_dec->h21_re_prev[bin] = ptr_ps_dec->h21_re_vec[bin];
+ ptr_ps_dec->h22_re_prev[bin] = ptr_ps_dec->h22_re_vec[bin];
+
+ ptr_ps_dec->h11_im_prev[bin] = ptr_ps_dec->h11_im_vec[bin];
+ ptr_ps_dec->h12_im_prev[bin] = ptr_ps_dec->h12_im_vec[bin];
+ ptr_ps_dec->h21_im_prev[bin] = ptr_ps_dec->h21_im_vec[bin];
+ ptr_ps_dec->h22_im_prev[bin] = ptr_ps_dec->h22_im_vec[bin];
+ }
+
+ for (bin = 0; bin < ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]; bin++) {
+ ptr_ps_dec->ipd_idx_map_2[bin] = ptr_ps_dec->ipd_idx_map_1[bin];
+ ptr_ps_dec->opd_idx_map_2[bin] = ptr_ps_dec->opd_idx_map_1[bin];
+ ptr_ps_dec->ipd_idx_map_1[bin] = ptr_ps_dec->ipd_idx_map[env][bin];
+ ptr_ps_dec->opd_idx_map_1[bin] = ptr_ps_dec->opd_idx_map[env][bin];
+ }
+ }
+}
diff --git a/decoder/ixheaacd_qmf_dec.c b/decoder/ixheaacd_qmf_dec.c
index 05cd7e7..7e7ddea 100644
--- a/decoder/ixheaacd_qmf_dec.c
+++ b/decoder/ixheaacd_qmf_dec.c
@@ -490,13 +490,13 @@ VOID ixheaacd_sbr_qmfanal32_winadd_eld(WORD16 *inp1, WORD16 *inp2,
for (n = 0; n < 32; n += 2) {
WORD32 accu;
accu = ixheaacd_mult16x16in32(inp1[n + 0], p_qmf1[(n + 0)]);
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp1[n + 64], p_qmf1[(n + 64)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp1[n + 128], p_qmf1[(n + 128)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp1[n + 192], p_qmf1[(n + 192)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp1[n + 256], p_qmf1[(n + 256)]));
p_out[n] = accu;
@@ -512,13 +512,13 @@ VOID ixheaacd_sbr_qmfanal32_winadd_eld(WORD16 *inp1, WORD16 *inp2,
p_out[n + 1] = accu;
accu = ixheaacd_mult16x16in32(inp2[n + 0], p_qmf2[(n + 0)]);
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp2[n + 64], p_qmf2[(n + 64)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp2[n + 128], p_qmf2[(n + 128)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp2[n + 192], p_qmf2[(n + 192)]));
- accu = ixheaacd_add32(
+ accu = ixheaacd_add32_sat(
accu, ixheaacd_mult16x16in32(inp2[n + 256], p_qmf2[(n + 256)]));
p_out[n + 32] = accu;
@@ -733,9 +733,18 @@ VOID ixheaacd_esbr_qmfanal32_winadd(WORD32 *inp1, WORD32 *inp2, WORD32 *p_qmf1,
VOID ixheaacd_esbr_inv_modulation(
WORD32 *qmf_real, ia_sbr_qmf_filter_bank_struct *syn_qmf,
- ia_qmf_dec_tables_struct *qmf_dec_tables_ptr) {
- ixheaacd_esbr_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->esbr_w_32,
- qmf_dec_tables_ptr->dig_rev_table2_32);
+ ia_qmf_dec_tables_struct *qmf_dec_tables_ptr, WORD32 no_synthesis_channels) {
+
+ if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED)
+ {
+ ixheaacd_esbr_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->esbr_w_16,
+ qmf_dec_tables_ptr->dig_rev_table4_16);
+ }
+ else
+ {
+ ixheaacd_esbr_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->esbr_w_32,
+ qmf_dec_tables_ptr->dig_rev_table2_32);
+ }
}
VOID ixheaacd_sbr_qmfsyn32_winadd(WORD16 *tmp1, WORD16 *tmp2, WORD16 *inp1,
diff --git a/decoder/ixheaacd_qmf_dec.h b/decoder/ixheaacd_qmf_dec.h
index d9c4955..f9868da 100644
--- a/decoder/ixheaacd_qmf_dec.h
+++ b/decoder/ixheaacd_qmf_dec.h
@@ -72,12 +72,10 @@ typedef struct {
} ia_sbr_qmf_filter_bank_struct;
VOID ixheaacd_cplx_anal_qmffilt(const WORD16 *time_inp,
- ia_sbr_scale_fact_struct *sbr_scale_factor,
- WORD32 **qmf_real, WORD32 **qmf_imag,
- ia_sbr_qmf_filter_bank_struct *qmf_bank,
- ia_qmf_dec_tables_struct *qmf_dec_tables_ptr,
- WORD ch_fac, WORD32 low_pow_flag,
- WORD audio_object_type, WORD32 ldmps_present);
+ ia_sbr_scale_fact_struct *sbr_scale_factor, WORD32 **qmf_real,
+ WORD32 **qmf_imag, ia_sbr_qmf_filter_bank_struct *qmf_bank,
+ ia_qmf_dec_tables_struct *qmf_dec_tables_ptr, WORD ch_fac,
+ WORD32 low_pow_flag, WORD audio_object_type);
VOID ixheaacd_cplx_anal_qmffilt_32(const WORD32 *time_inp,
ia_sbr_scale_fact_struct *sbr_scale_factor,
@@ -105,14 +103,18 @@ VOID ixheaacd_esbr_fwd_modulation(const WORD32 *time_in, WORD32 *r_subband,
VOID ixheaacd_esbr_inv_modulation(WORD32 *qmf_real,
ia_sbr_qmf_filter_bank_struct *syn_qmf,
- ia_qmf_dec_tables_struct *qmf_dec_tables_ptr);
+ ia_qmf_dec_tables_struct *qmf_dec_tables_ptr,
+ WORD32 no_synthesis_channels);
VOID ixheaacd_shiftrountine_with_rnd_hq(WORD32 *qmf_real, WORD32 *qmf_imag,
WORD32 *filter_states, WORD32 len,
WORD32 shift);
-VOID ixheaacd_esbr_qmfsyn64_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *tmp3,
- WORD32 *sample_buffer, WORD ch_fac);
+VOID ixheaacd_esbr_qmfsyn64_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
+ WORD32 *sample_buffer, WORD32 ch_fac);
+
+VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
+ WORD32 *sample_buffer, WORD32 ch_fac);
VOID ixheaacd_sbr_qmfanal32_winadds(WORD16 *fp1, WORD16 *fp2, WORD16 *filter_1,
WORD16 *filter_2, WORD32 *analysis_buffer,
diff --git a/decoder/ixheaacd_qmf_poly.h b/decoder/ixheaacd_qmf_poly.h
index 0cafcf1..a3952b4 100644
--- a/decoder/ixheaacd_qmf_poly.h
+++ b/decoder/ixheaacd_qmf_poly.h
@@ -37,4 +37,8 @@ VOID ixheaacd_real_synth_fft_p2(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points);
VOID ixheaacd_real_synth_fft_p3(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points);
+WORD32 ixheaacd_dft_hbe_cplx_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ FLOAT32 qmf_buf_real[][64],
+ FLOAT32 qmf_buf_imag[][64]);
+
#endif
diff --git a/decoder/ixheaacd_rev_vlc.c b/decoder/ixheaacd_rev_vlc.c
index a7b6d29..1e9b3b4 100644
--- a/decoder/ixheaacd_rev_vlc.c
+++ b/decoder/ixheaacd_rev_vlc.c
@@ -38,6 +38,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -66,32 +69,26 @@
#include "ixheaacd_hybrid.h"
#include "ixheaacd_ps_dec.h"
#include "ixheaacd_qmf_dec.h"
+#include "ixheaacd_mps_macro_def.h"
+#include "ixheaacd_mps_struct_def.h"
+#include "ixheaacd_mps_res_rom.h"
+#include "ixheaacd_mps_aac_struct.h"
#include "ixheaacd_mps_dec.h"
+#include "ixheaacd_mps_interface.h"
#include "ixheaacd_struct_def.h"
-
#include "ixheaacd_cnst.h"
-
#include "ixheaacd_error_standards.h"
#define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000
-#define RVLC_ERROR_RVL_SUM_BIT_COUNTER_BELOW_ZERO_FWD 0x40000000
-#define RVLC_ERROR_RVL_SUM_BIT_COUNTER_BELOW_ZERO_BWD 0x20000000
#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD 0x08000000
#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD 0x04000000
#define FWD 0
#define BWD 1
-#define MAX_RVL 7
-#define MIN_RVL -7
-#define MAX_ALLOWED_DPCM_INDEX 14
-#define TABLE_OFFSET 7
#define MAX_LEN_RVLC_CODE_WORD 9
#define MAX_LEN_RVLC_ESCAPE_WORD 20
-#define DPCM_NOISE_NRG_BITS 9
-#define SF_OFFSET 100
-
#define CONCEAL_MAX_INIT 1311
#define CONCEAL_MIN_INIT -1311
@@ -100,8 +97,6 @@
#define MASK_LEFT 0xFFF000
#define MASK_RIGHT 0xFFF
#define CLR_BIT_10 0x3FF
-#define NODE_MASK 0x400
-
#define LEFT_OFFSET 12
#define ixheaacd_bitbuf_checkpoint(it_bit_buf, saved_bit_buf) \
@@ -109,8 +104,8 @@
#define ixheaacd_bitbuf_restore(it_bit_buf, saved_bit_buf) \
(it_bit_buf) = (saved_bit_buf)
-static int ixheaacd_rvlc_decode(short cw, int len, int *found) {
- short indx = 0;
+static WORD32 ixheaacd_rvlc_decode(WORD16 cw, WORD32 len, WORD32 *found) {
+ WORD16 indx = 0;
*found = 0;
switch (len) {
case 1:
@@ -207,8 +202,8 @@ static int ixheaacd_rvlc_decode(short cw, int len, int *found) {
return indx;
}
-static int ixheaacd_rvlc_decode_esc(int cw, int len, int *found) {
- short indx = 0;
+static WORD32 ixheaacd_rvlc_decode_esc(WORD32 cw, WORD32 len, WORD32 *found) {
+ WORD16 indx = 0;
*found = 0;
switch (len) {
case 2:
@@ -1008,7 +1003,7 @@ static IA_ERRORCODE ixheaacd_rvlc_init(
it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
}
if (it_bit_buff->cnt_bits < 0) {
- return IA_ENHAACPLUS_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
+ return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
} else
return IA_NO_ERROR;
}
diff --git a/decoder/ixheaacd_rom.c b/decoder/ixheaacd_rom.c
index e35a0f8..f61e49a 100644
--- a/decoder/ixheaacd_rom.c
+++ b/decoder/ixheaacd_rom.c
@@ -320,50 +320,6 @@ const FLOAT32 ixheaacd_int_leave_gain_table[256] = {
1.176229F, 6.717108F, 1.179008F, 2.011940F, 1.187735F, 0.963552F,
1.199569F, 4.891432F, 1.206311F, 3.316329F, 1.215323F, 2.507536F,
1.223150F, 1.387102F, 1.296012F, 9.684225F};
-const WORD32 twiddle_table_fft[257] = {
- 0x00007fff, 0xff377fff, 0xfe6e7ffe, 0xfda57ffa, 0xfcdc7ff6, 0xfc137ff1,
- 0xfb4a7fea, 0xfa817fe2, 0xf9b87fd9, 0xf8ef7fce, 0xf8277fc2, 0xf75e7fb5,
- 0xf6957fa7, 0xf5cd7f98, 0xf5057f87, 0xf43c7f75, 0xf3747f62, 0xf2ac7f4e,
- 0xf1e47f38, 0xf11c7f22, 0xf0557f0a, 0xef8d7ef0, 0xeec67ed6, 0xedff7eba,
- 0xed387e9d, 0xec717e7f, 0xebab7e60, 0xeae47e3f, 0xea1e7e1e, 0xe9587dfb,
- 0xe8927dd6, 0xe7cd7db1, 0xe7077d8a, 0xe6427d63, 0xe57d7d3a, 0xe4b97d0f,
- 0xe3f47ce4, 0xe3307cb7, 0xe26d7c89, 0xe1a97c5a, 0xe0e67c2a, 0xe0237bf9,
- 0xdf617bc6, 0xde9e7b92, 0xdddc7b5d, 0xdd1b7b27, 0xdc597aef, 0xdb997ab7,
- 0xdad87a7d, 0xda187a42, 0xd9587a06, 0xd89879c9, 0xd7d9798a, 0xd71b794a,
- 0xd65c790a, 0xd59e78c8, 0xd4e17885, 0xd4247840, 0xd36777fb, 0xd2ab77b4,
- 0xd1ef776c, 0xd1347723, 0xd07976d9, 0xcfbe768e, 0xcf047642, 0xce4b75f4,
- 0xcd9275a6, 0xccd97556, 0xcc217505, 0xcb6974b3, 0xcab27460, 0xc9fc740b,
- 0xc94673b6, 0xc890735f, 0xc7db7308, 0xc72772af, 0xc6737255, 0xc5c071fa,
- 0xc50d719e, 0xc45b7141, 0xc3a970e3, 0xc2f87083, 0xc2487023, 0xc1986fc2,
- 0xc0e96f5f, 0xc03a6efb, 0xbf8c6e97, 0xbedf6e31, 0xbe326dca, 0xbd866d62,
- 0xbcda6cf9, 0xbc2f6c8f, 0xbb856c24, 0xbadc6bb8, 0xba336b4b, 0xb98b6add,
- 0xb8e36a6e, 0xb83c69fd, 0xb796698c, 0xb6f1691a, 0xb64c68a7, 0xb5a86832,
- 0xb50567bd, 0xb4626747, 0xb3c066d0, 0xb31f6657, 0xb27f65de, 0xb1df6564,
- 0xb14064e9, 0xb0a2646c, 0xb00563ef, 0xaf686371, 0xaecc62f2, 0xae316272,
- 0xad9761f1, 0xacfd616f, 0xac6560ec, 0xabcd6068, 0xab365fe4, 0xaaa05f5e,
- 0xaa0a5ed7, 0xa9765e50, 0xa8e25dc8, 0xa84f5d3e, 0xa7bd5cb4, 0xa72c5c29,
- 0xa69c5b9d, 0xa60c5b10, 0xa57e5a82, 0xa4f059f4, 0xa4635964, 0xa3d758d4,
- 0xa34c5843, 0xa2c257b1, 0xa238571e, 0xa1b0568a, 0xa12955f6, 0xa0a25560,
- 0xa01c54ca, 0x9f985433, 0x9f14539b, 0x9e915303, 0x9e0f5269, 0x9d8e51cf,
- 0x9d0e5134, 0x9c8f5098, 0x9c114ffb, 0x9b944f5e, 0x9b174ec0, 0x9a9c4e21,
- 0x9a224d81, 0x99a94ce1, 0x99304c40, 0x98b94b9e, 0x98434afb, 0x97ce4a58,
- 0x975949b4, 0x96e6490f, 0x9674486a, 0x960347c4, 0x9592471d, 0x95234675,
- 0x94b545cd, 0x94484524, 0x93dc447b, 0x937143d1, 0x93074326, 0x929e427a,
- 0x923641ce, 0x91cf4121, 0x91694074, 0x91053fc6, 0x90a13f17, 0x903e3e68,
- 0x8fdd3db8, 0x8f7d3d08, 0x8f1d3c57, 0x8ebf3ba5, 0x8e623af3, 0x8e063a40,
- 0x8dab398d, 0x8d5138d9, 0x8cf83825, 0x8ca13770, 0x8c4a36ba, 0x8bf53604,
- 0x8ba0354e, 0x8b4d3497, 0x8afb33df, 0x8aaa3327, 0x8a5a326e, 0x8a0c31b5,
- 0x89be30fc, 0x89723042, 0x89272f87, 0x88dd2ecc, 0x88942e11, 0x884c2d55,
- 0x88052c99, 0x87c02bdc, 0x877b2b1f, 0x87382a62, 0x86f629a4, 0x86b628e5,
- 0x86762827, 0x86372768, 0x85fa26a8, 0x85be25e8, 0x85832528, 0x85492467,
- 0x851123a7, 0x84d922e5, 0x84a32224, 0x846e2162, 0x843a209f, 0x84071fdd,
- 0x83d61f1a, 0x83a61e57, 0x83771d93, 0x83491cd0, 0x831c1c0c, 0x82f11b47,
- 0x82c61a83, 0x829d19be, 0x827618f9, 0x824f1833, 0x822a176e, 0x820516a8,
- 0x81e215e2, 0x81c1151c, 0x81a01455, 0x8181138f, 0x816312c8, 0x81461201,
- 0x812a113a, 0x81101073, 0x80f60fab, 0x80de0ee4, 0x80c80e1c, 0x80b20d54,
- 0x809e0c8c, 0x808b0bc4, 0x80790afb, 0x80680a33, 0x8059096b, 0x804b08a2,
- 0x803e07d9, 0x80320711, 0x80270648, 0x801e057f, 0x801604b6, 0x800f03ed,
- 0x800a0324, 0x8006025b, 0x80020192, 0x800100c9, 0x80000000};
const WORD32 ixheaacd_twiddle_table_fft_32x32[514] = {
0x00000000, 0x7fffffff, 0xff36f079, 0x7fff6215, 0xfe6de2e1, 0x7ffd8859,
diff --git a/decoder/ixheaacd_sbr_const.h b/decoder/ixheaacd_sbr_const.h
index 2fe3793..b09c3c2 100644
--- a/decoder/ixheaacd_sbr_const.h
+++ b/decoder/ixheaacd_sbr_const.h
@@ -97,11 +97,11 @@
#define MAX_NUM_QMF_BANDS_ESBR 128
#define SBR_HF_ADJ_OFFSET 2
-#define MPS_SBR_DELAY 6 /* 6 qmf samples */
+#define MPS_SBR_DELAY (6)
#define MPS_SBR_DELAY_960 5
-#define ESBR_HBE_DELAY_OFFSET 32 /* 32 qmf samples */
+#define ESBR_HBE_DELAY_OFFSET (32)
#define ESBR_HBE_DELAY_OFFSET_960 30
@@ -112,9 +112,10 @@
#define MAX_NO_COLS_VALUE 64
#define MAX_NO_COLS_VALUE_BY_2 (MAX_NO_COLS_VALUE >> 1)
-#define MAX_QMF_X_INBUF_SIZE (MAX_NO_COLS_VALUE_BY_2 + HBE_OPER_WIN_LEN - 1)
+#define MAX_QMF_X_INBUF_SIZE MAX_NO_COLS_VALUE
#define MAX_QMF_X_OUTBUF_SIZE \
- 2 * (MAX_NO_COLS_VALUE_BY_2 + HBE_OPER_WIN_LEN - 1)
+ 2 * MAX_QMF_X_INBUF_SIZE
+
#define MAX_QMF_X_IN_REAL_BUF (NO_QMF_SYNTH_CHANNELS * MAX_QMF_X_INBUF_SIZE)
#define MAX_QMF_X_IN_IMAG_BUF (NO_QMF_SYNTH_CHANNELS * MAX_QMF_X_INBUF_SIZE)
diff --git a/decoder/ixheaacd_sbr_dec.c b/decoder/ixheaacd_sbr_dec.c
index 7f3aca2..2a73ed8 100644
--- a/decoder/ixheaacd_sbr_dec.c
+++ b/decoder/ixheaacd_sbr_dec.c
@@ -41,6 +41,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
@@ -445,18 +448,11 @@ VOID ixheaacd_esbr_synthesis_filt_block(
ia_sbr_dec_struct *ptr_sbr_dec, ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_frame_data, WORD32 apply_processing,
FLOAT32 **qmf_buf_real, FLOAT32 **qmf_buf_imag, WORD32 stereo_config_idx,
- ia_sbr_tables_struct *sbr_tables_ptr, WORD32 mps_sbr_flag, WORD32 ch_fac) {
- if (!mps_sbr_flag) {
- ixheaacd_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
- ptr_sbr_dec, ptr_frame_data, ptr_header_data,
- stereo_config_idx, apply_processing);
- } else {
- ixheaacd_mps_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
- ptr_sbr_dec, stereo_config_idx);
- }
+ ia_sbr_tables_struct *sbr_tables_ptr, WORD32 mps_sbr_flag, WORD32 ch_fac,
+ WORD32 ps_enable, WORD32 skip_re_grouping, ia_ps_dec_struct *ptr_ps_dec,
+ FLAG drc_on, WORD32 drc_sbr_factors[][64]) {
- if (stereo_config_idx <= 0) {
- WORD32 i, k, p1;
+ WORD32 i, k;
WORD32 *ptr_filt_states;
WORD32 *ptr_filt_states_1;
WORD32 *ptr_filt_states_2;
@@ -464,39 +460,132 @@ VOID ixheaacd_esbr_synthesis_filt_block(
WORD32 *ploc_qmf_buf_real;
WORD32 *ploc_qmf_buf_imag;
WORD32 out_scalefactor;
- WORD32 sixty4;
+ WORD32 sixty4, thrity2;
WORD32 no_synthesis_channels;
WORD32 ixheaacd_drc_offset;
FLOAT32 *syn_buffer;
WORD32 *local_qmf_buffer = ptr_sbr_dec->sbr_scratch_local;
WORD32 *time_out = &(ptr_sbr_dec->sbr_scratch_local[128]);
+ FLOAT32 *time_sample_buf;
+ if (ps_enable) {
+ time_sample_buf = ptr_ps_dec->time_sample_buf[0];
+ } else {
+ time_sample_buf = ptr_sbr_dec->time_sample_buf;
+ }
ia_sbr_qmf_filter_bank_struct *qmf_bank =
&ptr_sbr_dec->str_synthesis_qmf_bank;
ia_qmf_dec_tables_struct *qmf_dec_tables_ptr =
sbr_tables_ptr->qmf_dec_tables_ptr;
+
+ if (!skip_re_grouping) {
+ if (!mps_sbr_flag) {
+ ixheaacd_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
+ ptr_sbr_dec, ptr_frame_data, ptr_header_data,
+ stereo_config_idx, apply_processing);
+ if (ps_enable) {
+ FLOAT32 factor = 1.0f;
+ for (i = ptr_ps_dec->num_sub_samples;i < (WORD32)ptr_ps_dec->num_sub_samples + 6;i++) {
+ for (k = 0; k < 5; k++)
+ {
+ if (drc_on)
+ {
+ if (ptr_sbr_dec->str_codec_qmf_bank.num_time_slots == 30)
+ {
+ factor = (FLOAT32)drc_sbr_factors[i + 30 - 25][k] / Q25;
+ }
+ else
+ {
+ factor = (FLOAT32)drc_sbr_factors[i + 32 - 26][k] / Q25;
+ }
+ }
+ ptr_ps_dec->pp_qmf_buf_real[0][i][k] =
+ factor * ptr_sbr_dec->qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
+ ptr_ps_dec->pp_qmf_buf_imag[0][i][k] =
+ factor * ptr_sbr_dec->qmf_buf_imag[SBR_HF_ADJ_OFFSET + i][k];
+ }
+ }
+ }
+ if (ps_enable && apply_processing) {
+ WORD32 usb = ptr_header_data->pstr_freq_band_data->sub_band_end;
+
+ ixheaacd_esbr_apply_ps(ptr_ps_dec,
+ ptr_ps_dec->pp_qmf_buf_real[0],
+ ptr_ps_dec->pp_qmf_buf_imag[0],
+ ptr_ps_dec->pp_qmf_buf_real[1],
+ ptr_ps_dec->pp_qmf_buf_imag[1],
+ usb, sbr_tables_ptr->ps_tables_ptr,
+ ptr_header_data->num_time_slots);
+ } else if (ps_enable) {
+ for (i = 0; i < (ptr_header_data->num_time_slots * 2); i++) {
+ for (k = 0; k < 64; k++) {
+ ptr_ps_dec->pp_qmf_buf_real[1][i][k] = ptr_ps_dec->pp_qmf_buf_real[0][i][k];
+ ptr_ps_dec->pp_qmf_buf_imag[1][i][k] = ptr_ps_dec->pp_qmf_buf_imag[0][i][k];
+ }
+ }
+ }
+ } else {
+ ixheaacd_mps_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
+ ptr_sbr_dec, stereo_config_idx);
+ }
+ } else {
+ if (ps_enable) {
+ time_sample_buf = ptr_ps_dec->time_sample_buf[1];
+ }
+ }
+
+ if (drc_on)
+ {
+ FLOAT32 factor = 1.0f;
+ for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++)
+ {
+ for (k = 0; k < 64; k++)
+ {
+ if (ptr_sbr_dec->str_codec_qmf_bank.num_time_slots == 30)
+ {
+ factor = (FLOAT32)drc_sbr_factors[i + 30 - 25][k] / Q25;
+ }
+ else
+ {
+ factor = (FLOAT32)drc_sbr_factors[i + 32 - 26][k] / Q25;
+ }
+ qmf_buf_real[i][k] *= factor;
+ qmf_buf_imag[i][k] *= factor;
+ }
+ }
+ }
+
+ if (stereo_config_idx <= 0) {
out_scalefactor = 5;
- qmf_bank->no_channels = 64;
- qmf_bank->esbr_cos_twiddle =
+ no_synthesis_channels = qmf_bank->no_channels;
+ sixty4 = NO_SYNTHESIS_CHANNELS;
+ thrity2 = qmf_bank->no_channels;
+
+ if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED)
+ {
+ qmf_bank->esbr_cos_twiddle =
+ (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
+ qmf_bank->esbr_alt_sin_twiddle =
+ (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
+ }
+ else
+ {
+ qmf_bank->esbr_cos_twiddle =
(WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l64;
- qmf_bank->esbr_alt_sin_twiddle =
+ qmf_bank->esbr_alt_sin_twiddle =
(WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l64;
+ }
qmf_bank->filter_pos_syn_32 +=
qmf_dec_tables_ptr->esbr_qmf_c - qmf_bank->p_filter_32;
qmf_bank->p_filter_32 = qmf_dec_tables_ptr->esbr_qmf_c;
- sixty4 = NO_SYNTHESIS_CHANNELS;
-
ptr_filt_states = qmf_bank->filter_states_32;
- no_synthesis_channels = qmf_bank->no_channels;
ptr_filt_states_1 = &ptr_filt_states[0];
ptr_filt_states_2 = ptr_filt_states_1 + no_synthesis_channels;
filter_l = qmf_bank->filter_pos_syn_32;
- p1 = 0;
-
ixheaacd_drc_offset = qmf_bank->ixheaacd_drc_offset;
for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
@@ -509,34 +598,58 @@ VOID ixheaacd_esbr_synthesis_filt_block(
ixheaacd_esbr_inv_modulation(ploc_qmf_buf_real,
&ptr_sbr_dec->str_synthesis_qmf_bank,
- sbr_tables_ptr->qmf_dec_tables_ptr);
+ sbr_tables_ptr->qmf_dec_tables_ptr,
+ no_synthesis_channels);
ixheaacd_shiftrountine_with_rnd_hq(ploc_qmf_buf_real, ploc_qmf_buf_imag,
&ptr_filt_states[ixheaacd_drc_offset],
no_synthesis_channels,
out_scalefactor + 1);
- ixheaacd_esbr_qmfsyn64_winadd(ptr_filt_states_1, ptr_filt_states_2,
- filter_l, &time_out[0], ch_fac);
+ if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED) {
+ ixheaacd_esbr_qmfsyn32_winadd(ptr_filt_states_1, ptr_filt_states_2,
+ filter_l, &time_out[0], ch_fac);
- syn_buffer = ptr_sbr_dec->time_sample_buf + i * 64;
- for (k = 0; k < 64; k++) {
- syn_buffer[k] = (FLOAT32)time_out[k] / (1 << 16);
- }
+ if (!mps_sbr_flag) {
+ syn_buffer = time_sample_buf + i * 32;
+ } else {
+ syn_buffer = ptr_sbr_dec->time_sample_buf + i * 32;
+ }
+ for (k = 0; k < 32; k++) {
+ syn_buffer[k] = (FLOAT32)time_out[k] / (1 << 16);
+ }
- ptr_filt_states_1 += sixty4;
- ptr_filt_states_2 -= sixty4;
- sixty4 = -sixty4;
- ixheaacd_drc_offset -= 128;
+ ptr_filt_states_1 += thrity2;
+ ptr_filt_states_2 -= thrity2;
+ thrity2 = -thrity2;
+ ixheaacd_drc_offset -= 64;
- if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 1280;
+ if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 640;
+ } else {
+ ixheaacd_esbr_qmfsyn64_winadd(ptr_filt_states_1, ptr_filt_states_2,
+ filter_l, &time_out[0], ch_fac);
+
+ if (!mps_sbr_flag) {
+ syn_buffer = time_sample_buf + i * 64;
+ } else {
+ syn_buffer = ptr_sbr_dec->time_sample_buf + i * 64;
+ }
+ for (k = 0; k < 64; k++) {
+ syn_buffer[k] = (FLOAT32)time_out[k] / (1 << 16);
+ }
+
+ ptr_filt_states_1 += sixty4;
+ ptr_filt_states_2 -= sixty4;
+ sixty4 = -sixty4;
+ ixheaacd_drc_offset -= 128;
+
+ if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 1280;
+ }
filter_l += 64;
if (filter_l == qmf_bank->p_filter_32 + 640)
filter_l = (WORD32 *)qmf_bank->p_filter_32;
-
- p1 += no_synthesis_channels;
}
qmf_bank->filter_pos_syn_32 = filter_l;
@@ -544,27 +657,18 @@ VOID ixheaacd_esbr_synthesis_filt_block(
}
if (!mps_sbr_flag) ptr_frame_data->reset_flag = 0;
-
- if (apply_processing && !mps_sbr_flag) {
- ptr_header_data->pstr_freq_band_data->qmf_sb_prev =
- ptr_header_data->pstr_freq_band_data->sub_band_start;
- }
}
-WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_frame_data,
- ia_sbr_prev_frame_data_struct *ptr_frame_data_prev,
- ia_ps_dec_struct *ptr_ps_dec,
- ia_sbr_qmf_filter_bank_struct *ptr_qmf_synth_bank_r,
- ia_sbr_scale_fact_struct *ptr_sbr_sf_r,
- FLAG apply_processing, FLAG low_pow_flag,
- WORD32 *ptr_work_buf_core,
- ia_sbr_tables_struct *sbr_tables_ptr,
- ixheaacd_misc_tables *pstr_common_tables, WORD ch_fac,
- ia_pvc_data_struct *ptr_pvc_data, FLAG drc_on,
- WORD32 drc_sbr_factors[][64], WORD32 audio_object_type,
- WORD32 ldmps_present) {
+WORD32 ixheaacd_sbr_dec(
+ ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
+ ia_sbr_header_data_struct *ptr_header_data, ia_sbr_frame_info_data_struct *ptr_frame_data,
+ ia_sbr_prev_frame_data_struct *ptr_frame_data_prev, ia_ps_dec_struct *ptr_ps_dec,
+ ia_sbr_qmf_filter_bank_struct *ptr_qmf_synth_bank_r, ia_sbr_scale_fact_struct *ptr_sbr_sf_r,
+ FLAG apply_processing, FLAG low_pow_flag, WORD32 *ptr_work_buf_core,
+ ia_sbr_tables_struct *sbr_tables_ptr, ixheaacd_misc_tables *pstr_common_tables, WORD ch_fac,
+ ia_pvc_data_struct *ptr_pvc_data, FLAG drc_on, WORD32 drc_sbr_factors[][64],
+ WORD32 audio_object_type, WORD32 ldmps_present, VOID *self, WORD32 heaac_mps_present,
+ WORD32 ec_flag) {
WORD i, j, k;
WORD slot, reserve;
WORD save_lb_scale;
@@ -590,8 +694,8 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
FLOAT32 *pvc_qmf_enrg_arr = (FLOAT32 *)ptr_sbr_dec->pvc_qmf_enrg_arr;
+ WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
WORD32 esbr_hbe_delay_offsets;
-
if (ptr_header_data->num_time_slots == 15)
esbr_hbe_delay_offsets = ESBR_HBE_DELAY_OFFSET_960;
else
@@ -607,7 +711,8 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
if (ldmps_present == 1) add_slot = SBR_HF_ADJ_OFFSET;
- if (usac_flag) {
+ if (!((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD))) {
+ ch_fac = 1;
pp_qmf_buf_real = ptr_sbr_dec->pp_qmf_buf_real;
pp_qmf_buf_imag = ptr_sbr_dec->pp_qmf_buf_imag;
if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
@@ -617,20 +722,26 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
no_bins = (ptr_header_data->num_time_slots * ptr_header_data->time_step);
- if (!usac_flag) {
+ if ((audio_object_type == AOT_ER_AAC_ELD) ||
+ (audio_object_type == AOT_ER_AAC_LD)) {
WORD32 num = op_delay;
WORD32 *ptr_pers_qmf_real = ptr_sbr_dec->ptr_sbr_overlap_buf;
WORD32 *p_scr_qmf_real = ptr_work_buf_core + (2 << (6 + !low_pow_flag));
- if (ptr_header_data->num_time_slots != 15)
- {
- if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS))
- return -1;
- }
- else
- {
- if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS_960))
- return -1;
+ if (ptr_header_data->num_time_slots != 15) {
+ if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS)) {
+ if (ec_flag)
+ no_bins = LPC_ORDER;
+ else
+ return -1;
+ }
+ } else {
+ if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS_960)) {
+ if (ec_flag)
+ no_bins = LPC_ORDER;
+ else
+ return -1;
+ }
}
if (!low_pow_flag) {
@@ -661,13 +772,31 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
}
}
- if (usac_flag) {
+ if ((audio_object_type == AOT_AAC_LC) && (heaac_mps_present == 1)) {
WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
- WORD32 codec_x_delay = 0;
- WORD32 frame_move = 288;
+ WORD32 frame_move = 9 * num_anal_bands;
WORD32 core_frame_size = ptr_header_data->core_frame_size;
- if (hbe_flag) {
+ memcpy(&ptr_sbr_dec->core_sample_buf[core_frame_size],
+ &ptr_sbr_dec->time_sample_buf[core_frame_size - frame_move],
+ frame_move * sizeof(FLOAT32));
+
+ memmove(&ptr_sbr_dec->time_sample_buf[frame_move], &ptr_sbr_dec->time_sample_buf[0],
+ (core_frame_size - frame_move));
+
+ memcpy(&ptr_sbr_dec->time_sample_buf[0], &ptr_sbr_dec->core_sample_buf[0],
+ frame_move * sizeof(FLOAT32));
+
+ memcpy(&ptr_sbr_dec->core_sample_buf[0], &ptr_sbr_dec->core_sample_buf[core_frame_size],
+ frame_move * sizeof(FLOAT32));
+ }
+
+
+ if ((audio_object_type != AOT_ER_AAC_ELD) &&
+ (audio_object_type != AOT_ER_AAC_LD)) {
+ WORD32 codec_x_delay = 0;
+
+ if (hbe_flag || !usac_flag) {
codec_x_delay = esbr_hbe_delay_offsets;
}
if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
@@ -675,23 +804,13 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
}
/* fixed decoder delay for bitstreams with SBR 4:1 and stereoConfigIndex 3
*/
- if (ptr_header_data->num_time_slots != 15)
- {
+ if (ptr_header_data->num_time_slots != 15) {
if (mps_sbr_flag) op_delay = MPS_SBR_DELAY;
- }
- else
- {
+ } else {
if (mps_sbr_flag) op_delay = MPS_SBR_DELAY_960;
}
- frame_move = 9 * num_anal_bands;
-
- memmove(ptr_sbr_dec->core_sample_buf,
- ptr_sbr_dec->core_sample_buf + core_frame_size,
- frame_move * sizeof(FLOAT32));
- memcpy(&ptr_sbr_dec->core_sample_buf[frame_move],
- &ptr_sbr_dec->time_sample_buf[0], core_frame_size * sizeof(FLOAT32));
-
+ {
memmove(
&ptr_sbr_dec->qmf_buf_real[0][0],
&ptr_sbr_dec
@@ -724,13 +843,25 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ptr_sbr_dec->ph_vocod_qmf_imag +
ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
64 * sizeof(FLOAT32) * (op_delay + SBR_HF_ADJ_OFFSET));
+ if (!usac_flag) {
+ WORD32 qmf_sb_prev = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
+ for (i = SBR_HF_ADJ_OFFSET; i < op_delay + SBR_HF_ADJ_OFFSET; ++i) {
+ memset(&ptr_sbr_dec->qmf_buf_real[i][qmf_sb_prev], 0, (64 - qmf_sb_prev));
+ memset(&ptr_sbr_dec->qmf_buf_imag[i][qmf_sb_prev], 0, (64 - qmf_sb_prev));
+ }
+ }
+ }
}
ixheaacd_esbr_analysis_filt_block(
ptr_sbr_dec, sbr_tables_ptr,
op_delay + codec_x_delay + SBR_HF_ADJ_OFFSET);
- if (hbe_flag) {
- err_code = ixheaacd_qmf_hbe_apply(
+ if (hbe_flag && apply_processing) {
+ if (dft_hbe_flag == 1) {
+ WORD32 err_code = 0;
+ ptr_sbr_dec->p_hbe_txposer->oversampling_flag =
+ ptr_frame_data->over_sampling_flag;
+ err_code = ixheaacd_dft_hbe_apply(
ptr_sbr_dec->p_hbe_txposer,
ptr_sbr_dec->qmf_buf_real + (op_delay + SBR_HF_ADJ_OFFSET) +
esbr_hbe_delay_offsets,
@@ -739,35 +870,49 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
- ptr_frame_data->pitch_in_bins);
- if (err_code) return err_code;
-
- if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
- ixheaacd_hbe_repl_spec(
- &ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
- ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
- ptr_sbr_dec->p_hbe_txposer->max_stretch);
+ ptr_frame_data->pitch_in_bins, (FLOAT32 *)ptr_work_buf_core);
+ if (err_code) return err_code;
+ } else {
+ WORD32 err_code = ixheaacd_qmf_hbe_apply(
+ ptr_sbr_dec->p_hbe_txposer,
+ ptr_sbr_dec->qmf_buf_real + (op_delay + SBR_HF_ADJ_OFFSET) +
+ esbr_hbe_delay_offsets,
+ ptr_sbr_dec->qmf_buf_imag + (op_delay + SBR_HF_ADJ_OFFSET) +
+ esbr_hbe_delay_offsets,
+ ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
+ ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
+ ptr_frame_data->pitch_in_bins, ptr_header_data);
+ if (err_code) return err_code;
+
+ if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
+ ixheaacd_hbe_repl_spec(
+ &ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
+ ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
+ ptr_sbr_dec->p_hbe_txposer->max_stretch);
+ }
}
}
-
if (!mps_sbr_flag && apply_processing) {
- err_code = ixheaacd_generate_hf(
- ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET), ptr_frame_data,
- ptr_header_data, ldmps_present,
- ptr_sbr_dec->str_codec_qmf_bank.num_time_slots);
+ err_code = ixheaacd_generate_hf(ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_frame_data, ptr_header_data, ldmps_present,
+ ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
if (err_code) return err_code;
ptr_pvc_data->pvc_rate = ptr_header_data->upsamp_fac;
if (sbr_mode == PVC_SBR) {
ixheaacd_qmf_enrg_calc(ptr_sbr_dec, upsample_ratio_idx, low_pow_flag);
+ if (ec_flag) {
+ ptr_pvc_data->pvc_mode = 1;
+ }
err_code = ixheaacd_pvc_process(
ptr_pvc_data, ptr_header_data->pstr_freq_band_data->sub_band_start,
ptr_frame_data->str_pvc_frame_info.border_vec[0],
@@ -791,10 +936,8 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
- (ptr_header_data->hbe_flag == 0)
- ? NULL
- : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
- ptr_sbr_dec->scratch_buff, pvc_dec_out_buf, ldmps_present);
+ (ptr_header_data->hbe_flag == 0) ? NULL : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
+ ptr_sbr_dec->scratch_buff, pvc_dec_out_buf, ldmps_present, ec_flag);
if (err_code) return err_code;
@@ -814,14 +957,43 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ixheaacd_esbr_synthesis_filt_block(
ptr_sbr_dec, ptr_header_data, ptr_frame_data, apply_processing,
pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, sbr_tables_ptr,
- mps_sbr_flag, ch_fac);
-
+ mps_sbr_flag, ch_fac,
+ ((ptr_header_data->channel_mode == PS_STEREO) || ptr_header_data->enh_sbr_ps),
+ 0, ptr_ps_dec, drc_on, drc_sbr_factors);
+
+ if (ptr_header_data->enh_sbr_ps || ptr_header_data->channel_mode == PS_STEREO) {
+ pp_qmf_buf_real = ptr_ps_dec->pp_qmf_buf_real[1];
+ pp_qmf_buf_imag = ptr_ps_dec->pp_qmf_buf_imag[1];
+ ixheaacd_esbr_synthesis_filt_block(
+ (ia_sbr_dec_struct *)
+ (&(((ia_handle_sbr_dec_inst_struct)self)->pstr_sbr_channel[1]->str_sbr_dec)),
+ (ia_sbr_header_data_struct *)
+ (&(((ia_handle_sbr_dec_inst_struct)self)->pstr_sbr_header[1])),
+ (ia_sbr_frame_info_data_struct *)
+ (&(((ia_handle_sbr_dec_inst_struct)self)->frame_buffer[1])), apply_processing,
+ pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, sbr_tables_ptr,
+ mps_sbr_flag, ch_fac,
+ ((ptr_header_data->channel_mode == PS_STEREO) || ptr_header_data->enh_sbr_ps),
+ 1, ptr_ps_dec, drc_on, drc_sbr_factors);
+ }
+ if (apply_processing && ec_flag) {
+ WORD16 *border_vec = ptr_frame_data->str_frame_info_details.border_vec;
+ ptr_frame_data_prev->end_position =
+ border_vec[ptr_frame_data->str_frame_info_details.num_env];
+ }
ptr_frame_data->prev_sbr_mode = sbr_mode;
return 0;
}
if (ldmps_present) {
+ if (ptr_sbr_dec->str_codec_qmf_bank.no_channels > 32) {
+ if (ec_flag) {
+ ptr_sbr_dec->str_codec_qmf_bank.no_channels = 32;
+ } else {
+ return IA_FATAL_ERROR;
+ }
+ }
ixheaacd_cplx_anal_qmffilt_32(
(WORD32 *)ptr_time_data, &ptr_sbr_dec->str_sbr_scale_fact,
&p_arr_qmf_buf_real[op_delay], &p_arr_qmf_buf_imag[op_delay],
@@ -829,10 +1001,9 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ch_fac, 1);
} else {
ixheaacd_cplx_anal_qmffilt(
- ptr_time_data, &ptr_sbr_dec->str_sbr_scale_fact,
- &p_arr_qmf_buf_real[op_delay], &p_arr_qmf_buf_imag[op_delay],
- &ptr_sbr_dec->str_codec_qmf_bank, sbr_tables_ptr->qmf_dec_tables_ptr,
- ch_fac, low_pow_flag, audio_object_type, ldmps_present);
+ ptr_time_data, &ptr_sbr_dec->str_sbr_scale_fact, &p_arr_qmf_buf_real[op_delay],
+ &p_arr_qmf_buf_imag[op_delay], &ptr_sbr_dec->str_codec_qmf_bank,
+ sbr_tables_ptr->qmf_dec_tables_ptr, ch_fac, low_pow_flag, audio_object_type);
}
if (ldmps_present == 1) {
@@ -963,15 +1134,14 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
(WORD16)(com_low_band_scale - 2);
} else {
if (ldmps_present == 1) {
- err_code = ixheaacd_generate_hf(
- ptr_sbr_dec->mps_qmf_buf_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->mps_qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET), ptr_frame_data,
- ptr_header_data, ldmps_present,
- ptr_sbr_dec->str_codec_qmf_bank.num_time_slots);
+ err_code = ixheaacd_generate_hf(ptr_sbr_dec->mps_qmf_buf_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->mps_qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
+ ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
+ ptr_frame_data, ptr_header_data, ldmps_present,
+ ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
if (err_code) return err_code;
} else {
ixheaacd_hf_generator(
@@ -993,8 +1163,8 @@ WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
ptr_frame_data, ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
- ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET), NULL,
- ptr_sbr_dec->scratch_buff, pvc_dec_out_buf, ldmps_present);
+ ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET), NULL, ptr_sbr_dec->scratch_buff,
+ pvc_dec_out_buf, ldmps_present, ec_flag);
for (j = 0; j < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots + 2; j++) {
for (k = ptr_sbr_dec->str_codec_qmf_bank.usb; k < 64; k++) {
@@ -1127,7 +1297,6 @@ WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
FLOAT32 **pp_qmf_buf_imag = ptr_sbr_dec->pp_qmf_buf_imag;
WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
- WORD32 core_frame_size = ptr_header_data->core_frame_size;
WORD32 mps_sbr_flag = ptr_frame_data->mps_sbr_flag;
WORD32 stereo_config_idx = ptr_frame_data->stereo_config_idx;
@@ -1141,8 +1310,6 @@ WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
ptr_sbr_dec->str_sbr_scale_fact.lb_scale = 0;
{
- WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
- WORD32 frame_move = 288;
if (hbe_flag) {
codec_x_delay = 32;
}
@@ -1150,15 +1317,6 @@ WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
codec_x_delay = 2 * codec_x_delay;
}
- frame_move = 9 * num_anal_bands;
-
- memmove(ptr_sbr_dec->core_sample_buf,
- ptr_sbr_dec->core_sample_buf + core_frame_size,
- frame_move * sizeof(FLOAT32));
-
- memcpy(&ptr_sbr_dec->core_sample_buf[frame_move],
- &ptr_sbr_dec->time_sample_buf[0], core_frame_size * sizeof(FLOAT32));
-
memmove(
&ptr_sbr_dec->qmf_buf_real[0][0],
&ptr_sbr_dec
@@ -1205,7 +1363,7 @@ WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
- ptr_frame_data->pitch_in_bins);
+ ptr_frame_data->pitch_in_bins, ptr_header_data);
if (err) return err;
if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
@@ -1229,14 +1387,14 @@ WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
ixheaacd_esbr_synthesis_filt_block(
ptr_sbr_dec, ptr_header_data, ptr_frame_data, apply_processing,
pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, ptr_sbr_tables,
- mps_sbr_flag, ch_fac);
+ mps_sbr_flag, ch_fac, 0, 0, NULL, 0, NULL);
ptr_frame_data->prev_sbr_mode = sbr_mode;
return 0;
}
-WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec,
- VOID *p_sbr_frame, VOID *p_sbr_header) {
+WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec, VOID *p_sbr_frame,
+ VOID *p_sbr_header, WORD32 ec_flag) {
WORD32 i, k;
ia_sbr_frame_info_data_struct *ptr_frame_data =
(ia_sbr_frame_info_data_struct *)p_sbr_frame;
@@ -1303,12 +1461,12 @@ WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec,
ptr_header_data->pstr_freq_band_data->qmf_sb_prev =
ptr_header_data->pstr_freq_band_data->sub_band_start;
- err = ixheaacd_generate_hf(
- ptr_sbr_dec->mps_qmf_buf_real + SBR_HF_ADJ_OFFSET,
- ptr_sbr_dec->mps_qmf_buf_imag + SBR_HF_ADJ_OFFSET, NULL, NULL,
- ptr_sbr_dec->mps_sbr_qmf_buf_real + SBR_HF_ADJ_OFFSET,
- ptr_sbr_dec->mps_sbr_qmf_buf_imag + SBR_HF_ADJ_OFFSET, ptr_frame_data,
- ptr_header_data, 0, ptr_sbr_dec->str_codec_qmf_bank.num_time_slots);
+ err = ixheaacd_generate_hf(ptr_sbr_dec->mps_qmf_buf_real + SBR_HF_ADJ_OFFSET,
+ ptr_sbr_dec->mps_qmf_buf_imag + SBR_HF_ADJ_OFFSET, NULL, NULL,
+ ptr_sbr_dec->mps_sbr_qmf_buf_real + SBR_HF_ADJ_OFFSET,
+ ptr_sbr_dec->mps_sbr_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
+ ptr_frame_data, ptr_header_data, 0,
+ ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
if (err) return err;
ptr_frame_data->pstr_sbr_header = ptr_header_data;
@@ -1319,9 +1477,8 @@ WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec,
ptr_sbr_dec->mps_sbr_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
ptr_sbr_dec->mps_qmf_buf_real + SBR_HF_ADJ_OFFSET,
ptr_sbr_dec->mps_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
- (ptr_header_data->hbe_flag == 0) ? NULL
- : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
- ptr_sbr_dec->scratch_buff, NULL, 0);
+ (ptr_header_data->hbe_flag == 0) ? NULL : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
+ ptr_sbr_dec->scratch_buff, NULL, 0, ec_flag);
if (err) return err;
for (i = 0; i < no_bins; i++) {
diff --git a/decoder/ixheaacd_sbr_dec.h b/decoder/ixheaacd_sbr_dec.h
index d24c9c8..f4a2238 100644
--- a/decoder/ixheaacd_sbr_dec.h
+++ b/decoder/ixheaacd_sbr_dec.h
@@ -23,6 +23,11 @@
#include <setjmp.h>
typedef struct {
+ FLOAT32 real[64][128];
+ FLOAT32 imag[64][128];
+} ia_dft_hbe_anal_coeff;
+
+typedef struct {
WORD32 x_over_qmf[MAX_NUM_PATCHES];
WORD32 max_stretch;
WORD32 core_frame_length;
@@ -54,6 +59,42 @@ typedef struct {
VOID (*ixheaacd_cmplx_anal_fft)(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points);
+ WORD32 esbr_hq;
+ WORD32 in_hop_size;
+ WORD32 fft_size[2];
+
+ FLOAT32 *anal_window;
+ FLOAT32 *synth_window;
+
+ FLOAT32 *ptr_spectrum;
+ FLOAT32 *ptr_spectrum_tx;
+ FLOAT32 *mag;
+ FLOAT32 *phase;
+ FLOAT32 *ptr_output_buf;
+ WORD32 ana_fft_size[2];
+ WORD32 syn_fft_size[2];
+ WORD32 out_hop_size;
+ WORD32 analy_size;
+ WORD32 x_over_bin[MAX_STRETCH][2];
+ WORD32 a_start;
+
+ FLOAT32 spectrum_buf[1536];
+ FLOAT32 spectrum_transposed_buf[1536];
+ FLOAT32 mag_buf[1536];
+ FLOAT32 phase_buf[1536];
+ FLOAT32 output_buf[4096];
+ FLOAT32 fd_win_buf[3][3][1536];
+
+ FLOAT32 analysis_window_buf[1024];
+ FLOAT32 synthesis_window_buf[1024];
+
+ WORD32 oversampling_flag;
+ ia_dft_hbe_anal_coeff str_dft_hbe_anal_coeff;
+ VOID (*ixheaacd_hbe_anal_fft)(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 sign);
+ VOID (*ixheaacd_hbe_synth_ifft)(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 sign);
+ FLOAT32 *syn_cos_sin_tab;
+ FLOAT32 *ana_cos_sin_tab;
+
} ia_esbr_hbe_txposer_struct;
typedef struct {
@@ -104,6 +145,7 @@ typedef struct {
struct ia_sbr_dec_inst_struct {
ia_ps_dec_struct *pstr_ps_stereo_dec;
+ ia_ps_dec_config_struct str_ps_config_prev;
FLAG ps_present;
ia_sbr_channel_struct *pstr_sbr_channel[MAXNRSBRCHANNELS];
ia_sbr_header_data_struct *pstr_sbr_header[MAXNRSBRCHANNELS];
@@ -124,10 +166,22 @@ struct ia_sbr_dec_inst_struct {
FLAG prev_sbr_mode;
FLAG inter_tes_flag;
FLAG aot_usac_flag;
+ WORD32 band_count[MAXNRSBRCHANNELS];
jmp_buf *xaac_jmp_buf;
WORD8 *ptr_mps_data;
WORD32 left_mps_bits;
WORD32 mps_bits_pos;
+ FLAG esbr_hq;
+ FLAG enh_sbr;
+ FLAG enh_sbr_ps;
+ FLAG eld_sbr;
+ WORD32 num_delay_frames;
+ FLAG sbr_parse_err_flag;
+ FLAG frame_ok;
+ FLAG ec_flag;
+ FLAG first_frame;
+ FLAG prev_usac_independency_flag;
+ FLAG sbr_parse_complete;
};
typedef struct ia_sbr_pers_struct {
@@ -157,20 +211,16 @@ typedef struct ia_sbr_pers_struct {
} ia_sbr_pers_struct;
-WORD32 ixheaacd_sbr_dec(ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
- ia_sbr_header_data_struct *ptr_header_data,
- ia_sbr_frame_info_data_struct *ptr_frame_data,
- ia_sbr_prev_frame_data_struct *ptr_frame_data_prev,
- ia_ps_dec_struct *ptr_ps_dec,
- ia_sbr_qmf_filter_bank_struct *ptr_qmf_synth_bank_r,
- ia_sbr_scale_fact_struct *ptr_sbr_sf_r,
- FLAG apply_processing, FLAG low_pow_flag,
- WORD32 *ptr_work_buf_core,
- ia_sbr_tables_struct *sbr_tables_ptr,
- ixheaacd_misc_tables *pstr_common_tables, WORD ch_fac,
- ia_pvc_data_struct *ptr_pvc_data_str, FLAG drc_on,
- WORD32 drc_sbr_factors[][64], WORD32 audio_object_type,
- WORD32 ldmps_present);
+WORD32 ixheaacd_sbr_dec(
+ ia_sbr_dec_struct *ptr_sbr_dec, WORD16 *ptr_time_data,
+ ia_sbr_header_data_struct *ptr_header_data, ia_sbr_frame_info_data_struct *ptr_frame_data,
+ ia_sbr_prev_frame_data_struct *ptr_frame_data_prev, ia_ps_dec_struct *ptr_ps_dec,
+ ia_sbr_qmf_filter_bank_struct *ptr_qmf_synth_bank_r, ia_sbr_scale_fact_struct *ptr_sbr_sf_r,
+ FLAG apply_processing, FLAG low_pow_flag, WORD32 *ptr_work_buf_core,
+ ia_sbr_tables_struct *sbr_tables_ptr, ixheaacd_misc_tables *pstr_common_tables, WORD ch_fac,
+ ia_pvc_data_struct *ptr_pvc_data_str, FLAG drc_on, WORD32 drc_sbr_factors[][64],
+ WORD32 audio_object_type, WORD32 ldmps_present, VOID *self, WORD32 heaac_mps_present,
+ WORD32 ec_flag);
WORD16 ixheaacd_create_sbrdec(ixheaacd_misc_tables *pstr_common_table,
ia_sbr_channel_struct *ptr_sbr_channel,
@@ -182,33 +232,54 @@ WORD16 ixheaacd_create_sbrdec(ixheaacd_misc_tables *pstr_common_table,
#define MAX_NUM_QMF_BANDS_ESBR 128
-WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec,
- VOID *p_sbr_frame, VOID *p_sbr_header);
+WORD32 ixheaacd_sbr_dec_from_mps(FLOAT32 *p_mps_qmf_output, VOID *p_sbr_dec, VOID *p_sbr_frame,
+ VOID *p_sbr_header, WORD32 ec_flag);
WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *h_hbe_txposer,
FLOAT32 qmf_buf_real[][64],
FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
FLOAT32 pv_qmf_buf_real[][64],
FLOAT32 pv_qmf_buf_imag[][64],
- WORD32 pitch_in_bins);
-
-WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data,
- FLOAT32 input_real[][64], FLOAT32 input_imag[][64],
- FLOAT32 input_real1[][64],
- FLOAT32 input_imag1[][64],
- WORD32 x_over_qmf[MAX_NUM_PATCHES],
- FLOAT32 *scratch_buff, FLOAT32 *env_out,
- WORD32 ldmps_present);
-
-WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
- FLOAT32 ptr_src_buf_imag[][64],
+ WORD32 pitch_in_bins,
+ ia_sbr_header_data_struct *ptr_header_data);
+
+VOID ixheaacd_hbe_apply_cfftn(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass, WORD32 i_sign);
+
+VOID ixheaacd_hbe_apply_cfftn_gen(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass,
+ WORD32 i_sign);
+
+VOID ixheaacd_hbe_apply_fft_288(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 i_sign);
+
+VOID ixheaacd_hbe_apply_ifft_224(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD32 i_sign);
+
+VOID ixheaacd_hbe_apply_fft_3(FLOAT32 *inp, FLOAT32 *op, WORD32 i_sign);
+
+VOID ixheaacd_hbe_apply_ifft_7(FLOAT32 *inp, FLOAT32 *op);
+
+VOID ixheaacd_hbe_apply_ifft_336(FLOAT32 *inp, FLOAT32 *ptr_scratch, WORD32 len,
+ WORD32 i_sign);
+
+WORD32 ixheaacd_dft_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ FLOAT32 qmf_buf_real[][64],
+ FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
+ FLOAT32 pv_qmf_buf_real[][64],
+ FLOAT32 pv_qmf_buf_imag[][64],
+ WORD32 pitch_in_bins,
+ FLOAT32 *dft_hbe_scratch_buf);
+
+WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32 input_real[][64],
+ FLOAT32 input_imag[][64], FLOAT32 input_real1[][64],
+ FLOAT32 input_imag1[][64], WORD32 x_over_qmf[MAX_NUM_PATCHES],
+ FLOAT32 *scratch_buff, FLOAT32 *env_out, WORD32 ldmps_present,
+ WORD32 ec_flag);
+
+WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64], FLOAT32 ptr_src_buf_imag[][64],
FLOAT32 ptr_ph_vocod_buf_real[][64],
- FLOAT32 ptr_ph_vocod_buf_imag[][64],
- FLOAT32 ptr_dst_buf_real[][64],
+ FLOAT32 ptr_ph_vocod_buf_imag[][64], FLOAT32 ptr_dst_buf_real[][64],
FLOAT32 ptr_dst_buf_imag[][64],
ia_sbr_frame_info_data_struct *ptr_frame_data,
- ia_sbr_header_data_struct *ptr_header_data,
- WORD32 audio_object_type, WORD32 time_slots);
+ ia_sbr_header_data_struct *ptr_header_data, WORD32 audio_object_type,
+ WORD32 time_slots, WORD32 ec_flag);
VOID ixheaacd_clr_subsamples(WORD32 *ptr_qmf_buf, WORD32 num, WORD32 size);
@@ -224,6 +295,9 @@ WORD32 ixheaacd_qmf_hbe_data_reinit(
WORD16 *ptr_freq_band_tbl[MAX_FREQ_COEFFS + 1], WORD16 *ptr_num_sf_bands,
WORD32 upsamp_4_flag);
+WORD32 ixheaacd_dft_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD16 *p_freq_band_tab[2], WORD16 *p_num_sfb);
+
WORD32 ixheaacd_sbr_read_pvc_sce(ia_sbr_frame_info_data_struct *ptr_frame_data,
ia_bit_buf_struct *it_bit_buff,
WORD32 hbe_flag,
@@ -231,13 +305,6 @@ WORD32 ixheaacd_sbr_read_pvc_sce(ia_sbr_frame_info_data_struct *ptr_frame_data,
ia_sbr_tables_struct *sbr_tables_ptr,
ia_sbr_header_data_struct *ptr_header_data);
-WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *h_hbe_txposer,
- FLOAT32 qmf_buf_real[][64],
- FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
- FLOAT32 pv_qmf_buf_real[][64],
- FLOAT32 pv_qmf_buf_imag[][64],
- WORD32 pitch_in_bins);
-
WORD32 ixheaacd_esbr_dec(ia_sbr_dec_struct *ptr_sbr_dec,
ia_sbr_header_data_struct *ptr_header_data,
ia_sbr_frame_info_data_struct *ptr_frame_data,
diff --git a/decoder/ixheaacd_sbr_payload.h b/decoder/ixheaacd_sbr_payload.h
index db3accc..57412a3 100644
--- a/decoder/ixheaacd_sbr_payload.h
+++ b/decoder/ixheaacd_sbr_payload.h
@@ -24,7 +24,9 @@ FLAG ixheaacd_check_for_sbr_payload(
ia_bit_buf_struct *it_bit_buff,
ia_aac_dec_sbr_bitstream_struct *pstr_stream_sbr, WORD16 prev_element,
ia_drc_dec_struct *pstr_drc_dec, WORD32 object_type, WORD32 adtsheader,
- WORD32 cnt_bits, WORD32 ld_sbr_crc_flag, ia_drc_dec_struct *drc_dummy);
+ WORD32 cnt_bits, WORD32 ld_sbr_crc_flag, ia_drc_dec_struct *drc_dummy,
+ UWORD8 *mps_buffer, WORD32 *mps_header, WORD32 *mps_bytes,
+ WORD32 is_init, WORD32 *is_first, WORD32 ec_flag);
WORD8 ixheaacd_aac_plus_get_payload(
ia_bit_buf_struct *it_bit_buff,
diff --git a/decoder/ixheaacd_sbr_rom.c b/decoder/ixheaacd_sbr_rom.c
index f45f55c..25edaa3 100644
--- a/decoder/ixheaacd_sbr_rom.c
+++ b/decoder/ixheaacd_sbr_rom.c
@@ -29,6 +29,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -2041,6 +2044,11 @@ const ia_env_extr_tables_struct ixheaacd_aac_dec_env_extr_tables = {
0,
0,
0,
+ 0,
+
+ 0,
+ 0,
+ 0,
0},
// WORD16 ixheaacd_t_huffman_env_bal_1_5db_inp_table[50];
@@ -2599,4 +2607,1121 @@ const ia_ps_tables_struct ixheaacd_aac_dec_ps_tables = {
(WORD16)0x3538, (WORD16)0x3637, (WORD16)-0x2222, (WORD16)-0x2424,
(WORD16)0x393a, (WORD16)-0x5d5d, (WORD16)-0x532c, (WORD16)-0x4f30,
},
- 0};
+ 0,
+ // const FLOAT32 qmf_fract_delay_phase_factor_im[NUM_OF_QUAD_MIRROR_FILTER_CHNLS] =
+ {
+ -0.5750052333f, -0.9645574093f, -0.0784592107f, 0.9114032388f, 0.6959129572f,
+ -0.4399389625f, -0.9939609766f, -0.2334456891f, 0.8358071446f, 0.7996849418f,
+ -0.2940398753f, -0.9988898635f, -0.3826839626f, 0.7396306992f, 0.8837659359f,
+ -0.1409005374f, -0.9792226553f, -0.5224992633f, 0.6252419949f, 0.9460856318f,
+ 0.0157082379f, -0.9354436994f, -0.6494488120f, 0.4954577386f, 0.9851095080f,
+ 0.1719302237f, -0.8686309457f, -0.7604067922f, 0.3534736335f, 0.9998766780f,
+ 0.3239187002f, -0.7804295421f, -0.8526409268f, 0.2027858198f, 0.9900234342f,
+ 0.4679312110f, -0.6730113029f, -0.9238801599f, 0.0471047238f, 0.9557924867f,
+ 0.6004216671f, -0.5490212440f, -0.9723703861f, -0.1097362563f, 0.8980267048f,
+ 0.7181277275f, -0.4115124643f, -0.9969174862f, -0.2638751566f, 0.8181484342f,
+ 0.8181509972f, -0.2638708055f, -0.9969171286f, -0.4115165472f, 0.7181245685f,
+ 0.8980286717f, -0.1097317860f, -0.9723693132f, -0.5490249991f, 0.6004180908f,
+ 0.9557937980f, 0.0471092127f, -0.9238784313f, -0.6730146408f,
+ },
+ // const FLOAT32 qmf_fract_delay_phase_factor_re[NUM_OF_QUAD_MIRROR_FILTER_CHNLS] =
+ {
+ 0.8181497455f, -0.2638729811f, -0.9969173074f, -0.4115144908f, 0.7181261778f,
+ 0.8980276585f, -0.1097340211f, -0.9723698497f, -0.5490231514f, 0.6004198790f,
+ 0.9557931423f, 0.0471069664f, -0.9238793254f, -0.6730129719f, 0.4679292440f,
+ 0.9900237322f, 0.2027880251f, -0.8526397347f, -0.7804309130f, 0.3239165843f,
+ 0.9998766184f, 0.3534757495f, -0.7604053020f, -0.8686320186f, 0.1719280183f,
+ 0.9851091504f, 0.4954597056f, -0.6494470835f, -0.9354444742f, 0.0157059915f,
+ 0.9460849166f, 0.6252437830f, -0.5224972963f, -0.9792231321f, -0.1409027725f,
+ 0.8837648630f, 0.7396321893f, -0.3826818764f, -0.9988899827f, -0.2940420210f,
+ 0.7996835709f, 0.8358083963f, -0.2334435135f, -0.9939607382f, -0.4399409592f,
+ 0.6959113479f, 0.9114041328f, -0.0784569681f, -0.9645568728f, -0.5750070810f,
+ 0.5750033855f, 0.9645580053f, 0.0784614459f, -0.9114022851f, -0.6959145665f,
+ 0.4399369359f, 0.9939612150f, 0.2334478796f, -0.8358058929f, -0.7996862531f,
+ 0.2940377295f, 0.9988897443f, 0.3826860189f, -0.7396291494f,
+ },
+ // const FLOAT32 frac_delay_phase_fac_qmf_sub_im_20[NUM_SUB_QMF_CHANNELS] =
+ {
+ -0.1525546163f, -0.4434623122f, -0.6930873394f, -0.8781917691f, -0.0000000000f,
+ -0.0000000000f, 0.4434623122f, 0.1525546163f, -0.8400936127f, -0.9992290139f,
+ -0.3754156530f, 0.2258011401f,
+ },
+ // const FLOAT32 frac_delay_phase_fac_qmf_sub_re_20[NUM_SUB_QMF_CHANNELS] =
+ {
+ 0.9882950187f, 0.8962930441f, 0.7208536267f, 0.4783087671f, 1.0000000000f,
+ 1.0000000000f, 0.8962930441f, 0.9882950187f, -0.5424414873f, 0.0392598733f,
+ -0.9268565774f, -0.9741734266f,
+ },
+ // const FLOAT32 frac_delay_phase_fac_qmf_sub_im_34[NUM_SUB_QMF_CHANNELS_HI_RES] =
+ {
+ -0.1019244567f, -0.3015379608f, -0.4886212051f, -0.6554001570f, -0.7949443460f,
+ -0.9014551044f, -0.9705064893f, -0.9992290139f, -0.9864292741f, 0.4886212051f,
+ 0.3015379608f, 0.1019244567f, -0.5124176741f, -0.2296251953f, -0.6930873394f,
+ -0.8781917691f, -0.9815438390f, -0.9935223460f, -0.9130122662f, -0.7475084066f,
+ -0.3754156530f, 0.2258011401f, 0.7448939681f, -0.8400936127f, 0.8800634146f,
+ 0.2258011401f, 0.7448939681f, 0.9930684566f, 0.8800634146f, 0.4469788074f,
+ -0.1486721933f, 0.9930684566f,
+ },
+ // const FLOAT32 frac_delay_phase_fac_qmf_sub_re_34[NUM_SUB_QMF_CHANNELS_HI_RES] =
+ {
+ 0.9947921634f, 0.9534541965f, 0.8724960089f, 0.7552818656f, 0.6066823602f,
+ 0.4328725934f, 0.2410750538f, 0.0392598733f, -0.1641867310f, 0.8724960089f,
+ 0.9534541965f, 0.9947921634f, -0.8587363362f, -0.9732791185f, 0.7208536267f,
+ 0.4783087671f, 0.1912373453f, -0.1136366725f, -0.4079320431f, -0.6642524004f,
+ -0.9268565774f, -0.9741734266f, -0.6671828628f, -0.5424414873f, 0.4748562276f,
+ -0.9741734266f, -0.6671828628f, -0.1175375655f, 0.4748562276f, 0.8945445418f,
+ 0.9888865352f, -0.1175375655f,
+ },
+ // const FLOAT32
+ // qmf_ser_fract_delay_phase_factor_im[NUM_QUAD_MIRROR_FILTER_CHNLS][NUM_SER_AP_LINKS] =
+ {
+ {
+ -0.6252426505f, -0.9238795042f, -0.5184748173f,
+ },
+ {
+ -0.8980275393f, 0.3826834261f, -0.9979268909f,
+ },
+ {
+ 0.2334454209f, 0.3826834261f, -0.4043435752f,
+ },
+ {
+ 0.9998766184f, -0.9238795042f, 0.6240159869f,
+ },
+ {
+ 0.2027871907f, 0.9238795042f, 0.9813933372f,
+ },
+ {
+ -0.9114032984f, -0.3826834261f, 0.2835132182f,
+ },
+ {
+ -0.6004201174f, -0.3826834261f, -0.7192186117f,
+ },
+ {
+ 0.6494481564f, 0.9238795042f, -0.9486001730f,
+ },
+ {
+ 0.8837655187f, -0.9238795042f, -0.1579856575f,
+ },
+ {
+ -0.2638732493f, 0.3826834261f, 0.8025052547f,
+ },
+ {
+ -0.9988898635f, 0.3826834261f, 0.9000906944f,
+ },
+ {
+ -0.1719288528f, -0.9238795042f, 0.0298405960f,
+ },
+ {
+ 0.9238796234f, 0.9238795042f, -0.8724960685f,
+ },
+ {
+ 0.5750049949f, -0.3826834261f, -0.8366686702f,
+ },
+ {
+ -0.6730127335f, -0.3826834261f, 0.0987988561f,
+ },
+ {
+ -0.8686313629f, 0.9238795042f, 0.9280315042f,
+ },
+ {
+ 0.2940406799f, -0.9238795042f, 0.7593847513f,
+ },
+ {
+ 0.9969173074f, 0.3826834261f, -0.2258014232f,
+ },
+ {
+ 0.1409008205f, 0.3826834261f, -0.9681913853f,
+ },
+ {
+ -0.9354441762f, -0.9238795042f, -0.6695194840f,
+ },
+ {
+ -0.5490224361f, 0.9238795042f, 0.3490629196f,
+ },
+ {
+ 0.6959131360f, -0.3826834261f, 0.9923103452f,
+ },
+ {
+ 0.8526399136f, -0.3826834261f, 0.5685616732f,
+ },
+ {
+ -0.3239179254f, 0.9238795042f, -0.4665412009f,
+ },
+ {
+ -0.9939609170f, -0.9238795042f, -0.9999889135f,
+ },
+ {
+ -0.1097337380f, 0.3826834261f, -0.4581840038f,
+ },
+ {
+ 0.9460855722f, 0.3826834261f, 0.5762898922f,
+ },
+ {
+ 0.5224980116f, -0.9238795042f, 0.9910997152f,
+ },
+ {
+ -0.7181267142f, 0.9238795042f, 0.3402152061f,
+ },
+ {
+ -0.8358070254f, -0.3826834261f, -0.6764906645f,
+ },
+ {
+ 0.3534754813f, -0.3826834261f, -0.9657900929f,
+ },
+ {
+ 0.9900235534f, 0.9238795042f, -0.2166097313f,
+ },
+ {
+ 0.0784583688f, -0.9238795042f, 0.7654833794f,
+ },
+ {
+ -0.9557932615f, 0.3826834261f, 0.9244794250f,
+ },
+ {
+ -0.4954580069f, 0.3826834261f, 0.0894154981f,
+ },
+ {
+ 0.7396316528f, -0.9238795042f, -0.8417937160f,
+ },
+ {
+ 0.8181492686f, 0.9238795042f, -0.8678520322f,
+ },
+ {
+ -0.3826842010f, -0.3826834261f, 0.0392601527f,
+ },
+ {
+ -0.9851091504f, -0.3826834261f, 0.9041572809f,
+ },
+ {
+ -0.0471055657f, 0.9238795042f, 0.7968461514f,
+ },
+ {
+ 0.9645576477f, -0.9238795042f, -0.1672853529f,
+ },
+ {
+ 0.4679289758f, 0.3826834261f, -0.9515408874f,
+ },
+ {
+ -0.7604066133f, 0.3826834261f, -0.7126382589f,
+ },
+ {
+ -0.7996840477f, -0.9238795042f, 0.2925389707f,
+ },
+ {
+ 0.4115152657f, 0.9238795042f, 0.9831594229f,
+ },
+ {
+ 0.9792225957f, -0.3826834261f, 0.6166234016f,
+ },
+ {
+ 0.0157062728f, -0.3826834261f, -0.4129458666f,
+ },
+ {
+ -0.9723701477f, 0.9238795042f, -0.9984891415f,
+ },
+ {
+ -0.4399381876f, -0.9238795042f, -0.5103924870f,
+ },
+ {
+ 0.7804310918f, 0.3826834261f, 0.5265110731f,
+ },
+ {
+ 0.7804297209f, 0.3826834261f, 0.9972759485f,
+ },
+ {
+ -0.4399402142f, -0.9238795042f, 0.3957053721f,
+ },
+ {
+ -0.9723696709f, 0.9238795042f, -0.6313531399f,
+ },
+ {
+ 0.0157085191f, -0.3826834261f, -0.9795400500f,
+ },
+ {
+ 0.9792230725f, -0.3826834261f, -0.2744622827f,
+ },
+ {
+ 0.4115132093f, 0.9238795042f, 0.7257350087f,
+ },
+ {
+ -0.7996854186f, -0.9238795042f, 0.9455752373f,
+ },
+ {
+ -0.7604051232f, 0.3826834261f, 0.1486719251f,
+ },
+ {
+ 0.4679309726f, 0.3826834261f, -0.8080930114f,
+ },
+ {
+ 0.9645570517f, -0.9238795042f, -0.8959442377f,
+ },
+ {
+ -0.0471078083f, 0.9238795042f, -0.0204183888f,
+ },
+ {
+ -0.9851095676f, -0.3826834261f, 0.8770626187f,
+ },
+ {
+ -0.3826821446f, -0.3826834261f, 0.8314692974f,
+ },
+ {
+ 0.8181505203f, 0.9238795042f, -0.1081734300f,
+ },
+
+ },
+ // const FLOAT32
+ // qmf_ser_fract_delay_phase_factor_re[NUM_OF_QUAD_MIRROR_FILTER_CHNLS]
+ // [NUM_SER_AP_LINKS] =
+ {
+ {
+ 0.7804303765f, 0.3826834261f, 0.8550928831f,
+ },
+ {
+ -0.4399392009f, -0.9238795042f, -0.0643581524f,
+ },
+ {
+ -0.9723699093f, 0.9238795042f, -0.9146071672f,
+ },
+ {
+ 0.0157073960f, -0.3826834261f, -0.7814115286f,
+ },
+ {
+ 0.9792228341f, -0.3826834261f, 0.1920081824f,
+ },
+ {
+ 0.4115142524f, 0.9238795042f, 0.9589683414f,
+ },
+ {
+ -0.7996847630f, -0.9238795042f, 0.6947838664f,
+ },
+ {
+ -0.7604058385f, 0.3826834261f, -0.3164770305f,
+ },
+ {
+ 0.4679299891f, 0.3826834261f, -0.9874414206f,
+ },
+ {
+ 0.9645573497f, -0.9238795042f, -0.5966450572f,
+ },
+ {
+ -0.0471066870f, 0.9238795042f, 0.4357025325f,
+ },
+ {
+ -0.9851093888f, -0.3826834261f, 0.9995546937f,
+ },
+ {
+ -0.3826831877f, -0.3826834261f, 0.4886211455f,
+ },
+ {
+ 0.8181498647f, 0.9238795042f, -0.5477093458f,
+ },
+ {
+ 0.7396308780f, -0.9238795042f, -0.9951074123f,
+ },
+ {
+ -0.4954589605f, 0.3826834261f, -0.3725017905f,
+ },
+ {
+ -0.9557929039f, 0.3826834261f, 0.6506417990f,
+ },
+ {
+ 0.0784594864f, -0.9238795042f, 0.9741733670f,
+ },
+ {
+ 0.9900237322f, 0.9238795042f, 0.2502108514f,
+ },
+ {
+ 0.3534744382f, -0.3826834261f, -0.7427945137f,
+ },
+ {
+ -0.8358076215f, -0.3826834261f, -0.9370992780f,
+ },
+ {
+ -0.7181259394f, 0.9238795042f, -0.1237744763f,
+ },
+ {
+ 0.5224990249f, -0.9238795042f, 0.8226406574f,
+ },
+ {
+ 0.9460852146f, 0.3826834261f, 0.8844994903f,
+ },
+ {
+ -0.1097348556f, 0.3826834261f, -0.0047125919f,
+ },
+ {
+ -0.9939610362f, -0.9238795042f, -0.8888573647f,
+ },
+ {
+ -0.3239168525f, 0.9238795042f, -0.8172453642f,
+ },
+ {
+ 0.8526405096f, -0.3826834261f, 0.1331215799f,
+ },
+ {
+ 0.6959123611f, -0.3826834261f, 0.9403476119f,
+ },
+ {
+ -0.5490233898f, 0.9238795042f, 0.7364512086f,
+ },
+ {
+ -0.9354437590f, -0.9238795042f, -0.2593250275f,
+ },
+ {
+ 0.1409019381f, 0.3826834261f, -0.9762582779f,
+ },
+ {
+ 0.9969173670f, 0.3826834261f, -0.6434556246f,
+ },
+ {
+ 0.2940396070f, -0.9238795042f, 0.3812320232f,
+ },
+ {
+ -0.8686318994f, 0.9238795042f, 0.9959943891f,
+ },
+ {
+ -0.6730118990f, -0.3826834261f, 0.5397993922f,
+ },
+ {
+ 0.5750059485f, -0.3826834261f, -0.4968227744f,
+ },
+ {
+ 0.9238792062f, 0.9238795042f, -0.9992290139f,
+ },
+ {
+ -0.1719299555f, -0.9238795042f, -0.4271997511f,
+ },
+ {
+ -0.9988899231f, 0.3826834261f, 0.6041822433f,
+ },
+ {
+ -0.2638721764f, 0.3826834261f, 0.9859085083f,
+ },
+ {
+ 0.8837660551f, -0.9238795042f, 0.3075223565f,
+ },
+ {
+ 0.6494473219f, 0.9238795042f, -0.7015317082f,
+ },
+ {
+ -0.6004210114f, -0.3826834261f, -0.9562535882f,
+ },
+ {
+ -0.9114028811f, -0.3826834261f, -0.1827499419f,
+ },
+ {
+ 0.2027882934f, 0.9238795042f, 0.7872582674f,
+ },
+ {
+ 0.9998766780f, -0.9238795042f, 0.9107555747f,
+ },
+ {
+ 0.2334443331f, 0.3826834261f, 0.0549497530f,
+ },
+ {
+ -0.8980280757f, 0.3826834261f, -0.8599416018f,
+ },
+ {
+ -0.6252418160f, -0.9238795042f, -0.8501682281f,
+ },
+ {
+ 0.6252435446f, 0.9238795042f, 0.0737608299f,
+ },
+ {
+ 0.8980270624f, -0.3826834261f, 0.9183775187f,
+ },
+ {
+ -0.2334465086f, -0.3826834261f, 0.7754954696f,
+ },
+ {
+ -0.9998766184f, 0.9238795042f, -0.2012493610f,
+ },
+ {
+ -0.2027861029f, -0.9238795042f, -0.9615978599f,
+ },
+ {
+ 0.9114037752f, 0.3826834261f, -0.6879743338f,
+ },
+ {
+ 0.6004192233f, 0.3826834261f, 0.3254036009f,
+ },
+ {
+ -0.6494490504f, -0.9238795042f, 0.9888865948f,
+ },
+ {
+ -0.8837650418f, 0.9238795042f, 0.5890548825f,
+ },
+ {
+ 0.2638743520f, -0.3826834261f, -0.4441666007f,
+ },
+ {
+ 0.9988898039f, -0.3826834261f, -0.9997915030f,
+ },
+ {
+ 0.1719277352f, 0.9238795042f, -0.4803760946f,
+ },
+ {
+ -0.9238800406f, -0.9238795042f, 0.5555707216f,
+ },
+ {
+ -0.5750041008f, 0.3826834261f, 0.9941320419f,
+ },
+
+ },
+ // const FLOAT32
+ // frac_delay_phase_fac_ser_qmf_sub_im_20[NUM_SUB_QMF_CHANNELS][NUM_SER_AP_LINKS] =
+ {
+ {
+ -0.1680592746f, -0.2902846634f, -0.1358452588f,
+ },
+ {
+ -0.4851911962f, -0.7730104327f, -0.3975082636f,
+ },
+ {
+ -0.7475083470f, -0.9951847196f, -0.6298289299f,
+ },
+ {
+ -0.9253752232f, -0.8819212914f, -0.8156582713f,
+ },
+ {
+ -0.0000000000f, -0.0000000000f, -0.0000000000f,
+ },
+ {
+ -0.0000000000f, -0.0000000000f, -0.0000000000f,
+ },
+ {
+ 0.4851911962f, 0.7730104327f, 0.3975082636f,
+ },
+ {
+ 0.1680592746f, 0.2902846634f, 0.1358452588f,
+ },
+ {
+ -0.7015314102f, 0.8314695954f, -0.9437720776f,
+ },
+ {
+ -0.9930684566f, -0.1950903237f, -0.9784189463f,
+ },
+ {
+ -0.1019244045f, 0.8314695954f, -0.6356067061f,
+ },
+ {
+ 0.5424416065f, -0.1950903237f, -0.1432335079f,
+ },
+
+ },
+ // const FLOAT32
+ // frac_delay_phase_fac_ser_qmf_sub_re_20[NUM_SUB_QMF_CHANNELS][NUM_SER_AP_LINKS] =
+ {
+ {
+ 0.9857769012f, 0.9569403529f, 0.9907300472f,
+ },
+ {
+ 0.8744080663f, 0.6343932748f, 0.9175986052f,
+ },
+ {
+ 0.6642524004f, 0.0980171412f, 0.7767338753f,
+ },
+ {
+ 0.3790524006f, -0.4713967443f, 0.5785340071f,
+ },
+ {
+ 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ },
+ {
+ 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ },
+ {
+ 0.8744080663f, 0.6343932748f, 0.9175986052f,
+ },
+ {
+ 0.9857769012f, 0.9569403529f, 0.9907300472f,
+ },
+ {
+ -0.7126385570f, -0.5555702448f, -0.3305967748f,
+ },
+ {
+ -0.1175374240f, -0.9807852507f, 0.2066311091f,
+ },
+ {
+ -0.9947921634f, 0.5555702448f, -0.7720130086f,
+ },
+ {
+ -0.8400934935f, 0.9807852507f, -0.9896889329f,
+ },
+
+ },
+ // const FLOAT32
+ // frac_delay_phase_fac_ser_qmf_sub_im_34[NUM_SUB_QMF_CHANNELS_HI_RES]
+ // [NUM_SER_AP_LINKS] =
+ {
+ {
+ -0.1123361215f, -0.1950903237f, -0.0907194912f,
+ },
+ {
+ -0.3313378990f, -0.5555702448f, -0.2691719830f,
+ },
+ {
+ -0.5336145163f, -0.8314695954f, -0.4387632608f,
+ },
+ {
+ -0.7089555264f, -0.9807852507f, -0.5939104557f,
+ },
+ {
+ -0.8485102057f, -0.9807852507f, -0.7295060754f,
+ },
+ {
+ -0.9452341199f, -0.8314695954f, -0.8410862088f,
+ },
+ {
+ -0.9942448139f, -0.5555701256f, -0.9249777794f,
+ },
+ {
+ -0.9930684566f, -0.1950903237f, -0.9784189463f,
+ },
+ {
+ -0.9417643547f, 0.1950902343f, -0.9996504188f,
+ },
+ {
+ 0.5336145163f, 0.8314695954f, 0.4387632608f,
+ },
+ {
+ 0.3313378990f, 0.5555702448f, 0.2691719830f,
+ },
+ {
+ 0.1123361215f, 0.1950903237f, 0.0907194912f,
+ },
+ {
+ -0.2676587701f, 0.9569403529f, -0.7345889807f,
+ },
+ {
+ 0.0667093173f, 0.6343932748f, -0.5248404145f,
+ },
+ {
+ -0.7475083470f, -0.9951847196f, -0.6298289299f,
+ },
+ {
+ -0.9253752232f, -0.8819212914f, -0.8156582713f,
+ },
+ {
+ -0.9986971617f, -0.4713967443f, -0.9412791729f,
+ },
+ {
+ -0.9591906667f, 0.0980171412f, -0.9974188805f,
+ },
+ {
+ -0.8113189340f, 0.6343932748f, -0.9799333811f,
+ },
+ {
+ -0.5717879534f, 0.9569403529f, -0.8901134133f,
+ },
+ {
+ -0.1019244045f, 0.8314695954f, -0.6356067061f,
+ },
+ {
+ 0.5424416065f, -0.1950903237f, -0.1432335079f,
+ },
+ {
+ 0.9486002326f, -0.9807852507f, 0.3906508386f,
+ },
+ {
+ -0.7015314102f, 0.8314695954f, -0.9437720776f,
+ },
+ {
+ 0.5157858133f, 0.5555702448f, 0.9968553782f,
+ },
+ {
+ 0.5424416065f, -0.1950903237f, -0.1432335079f,
+ },
+ {
+ 0.9486002326f, -0.9807852507f, 0.3906508386f,
+ },
+ {
+ 0.9381912947f, -0.5555702448f, 0.8113189936f,
+ },
+ {
+ 0.5157858133f, 0.5555702448f, 0.9968553782f,
+ },
+ {
+ -0.1331214458f, 0.9807852507f, 0.8934889436f,
+ },
+ {
+ -0.7235698700f, 0.1950903237f, 0.5311767459f,
+ },
+ {
+ 0.9381912947f, -0.5555702448f, 0.8113189936f,
+ },
+
+ },
+ // const FLOAT32
+ // frac_delay_phase_fac_ser_qmf_sub_re_34[NUM_SUB_QMF_CHANNELS_HI_RES]
+ // [NUM_SER_AP_LINKS] =
+ {
+ {
+ 0.9936702847f, 0.9807852507f, 0.9958764911f,
+ },
+ {
+ 0.9435121417f, 0.8314695954f, 0.9630921483f,
+ },
+ {
+ 0.8457278013f, 0.5555702448f, 0.8986026645f,
+ },
+ {
+ 0.7052531838f, 0.1950903684f, 0.8045311570f,
+ },
+ {
+ 0.5291789770f, -0.1950903237f, 0.6839743853f,
+ },
+ {
+ 0.3263930976f, -0.5555702448f, 0.5409010649f,
+ },
+ {
+ 0.1071316749f, -0.8314696550f, 0.3800212145f,
+ },
+ {
+ -0.1175374240f, -0.9807852507f, 0.2066311091f,
+ },
+ {
+ -0.3362735212f, -0.9807853103f, 0.0264386870f,
+ },
+ {
+ 0.8457278013f, 0.5555702448f, 0.8986026645f,
+ },
+ {
+ 0.9435121417f, 0.8314695954f, 0.9630921483f,
+ },
+ {
+ 0.9936702847f, 0.9807852507f, 0.9958764911f,
+ },
+ {
+ -0.9635137916f, 0.2902846634f, -0.6785123348f,
+ },
+ {
+ -0.9977724552f, 0.7730104327f, -0.8512006402f,
+ },
+ {
+ 0.6642524004f, 0.0980171412f, 0.7767338753f,
+ },
+ {
+ 0.3790524006f, -0.4713967443f, 0.5785340071f,
+ },
+ {
+ 0.0510286838f, -0.8819212914f, 0.3376292288f,
+ },
+ {
+ -0.2827600539f, -0.9951847196f, 0.0718020797f,
+ },
+ {
+ -0.5846037269f, -0.7730104327f, -0.1993251890f,
+ },
+ {
+ -0.8204014897f, -0.2902846634f, -0.4557391405f,
+ },
+ {
+ -0.9947921634f, 0.5555702448f, -0.7720130086f,
+ },
+ {
+ -0.8400934935f, 0.9807852507f, -0.9896889329f,
+ },
+ {
+ -0.3164769113f, 0.1950903237f, -0.9205389619f,
+ },
+ {
+ -0.7126385570f, -0.5555702448f, -0.3305967748f,
+ },
+ {
+ 0.8567175865f, -0.8314695954f, -0.0792420134f,
+ },
+ {
+ -0.8400934935f, 0.9807852507f, -0.9896889329f,
+ },
+ {
+ -0.3164769113f, 0.1950903237f, -0.9205389619f,
+ },
+ {
+ 0.3461171389f, -0.8314695954f, -0.5846037269f,
+ },
+ {
+ 0.8567175865f, -0.8314695954f, -0.0792420134f,
+ },
+ {
+ 0.9910997152f, 0.1950903237f, 0.4490851462f,
+ },
+ {
+ 0.6902511716f, 0.9807852507f, 0.8472610116f,
+ },
+ {
+ 0.3461171389f, -0.8314695954f, -0.5846037269f,
+ },
+
+ },
+ // const FLOAT32 scale_factors_flt[NO_IID_LEVELS] =
+ {
+ 1.4119827747f, 1.4031381607f, 1.3868767023f, 1.3483997583f, 1.2912493944f,
+ 1.1960374117f, 1.1073724031f, 1.0000000000f, 0.8796171546f, 0.7546485662f,
+ 0.5767799020f, 0.4264014363f, 0.2767182887f, 0.1766446233f, 0.0794016272f,
+ },
+ // const FLOAT32
+ // scale_factors_fine_flt[NO_IID_LEVELS_FINE] =
+ {
+ 1.4142065048f, 1.4141912460f, 1.4141428471f, 1.4139900208f, 1.4135069847f,
+ 1.4119827747f, 1.4097729921f, 1.4053947926f, 1.3967796564f, 1.3800530434f,
+ 1.3483997583f, 1.3139201403f, 1.2643101215f, 1.1960374117f, 1.1073724031f,
+ 1.0000000000f, 0.8796171546f, 0.7546485662f, 0.6336560845f, 0.5230810642f,
+ 0.4264014363f, 0.3089554012f, 0.2213746458f, 0.1576878875f, 0.1119822487f,
+ 0.0794016272f, 0.0446990170f, 0.0251446925f, 0.0141414283f, 0.0079525812f,
+ 0.0044721137f,
+ },
+ // const FLOAT32 alphas[NUM_ICC_LEVELS] =
+ {
+ 0.0000000000f, 0.1784276664f, 0.2856673002f, 0.4630723596f, 0.5971631408f,
+ 0.7853981853f, 1.1003085375f, 1.5707963705f,
+ },
+
+ // const FLOAT32 all_pass_link_decay_ser[NUM_SER_AP_LINKS] =
+ {
+ 0.6514390707f, 0.5647181273f, 0.4895416498f,
+ },
+
+ // const FLOAT32 p8_13_20[13] =
+ {0.00746082949812f, 0.02270420949825f, 0.04546865930473f, 0.07266113929591f,
+ 0.09885108575264f, 0.11793710567217f, 0.125f, 0.11793710567217f, 0.09885108575264f,
+ 0.07266113929591f, 0.04546865930473f, 0.02270420949825f, 0.00746082949812f},
+
+ // const FLOAT32 p2_13_20[13] =
+ {0.0f, 0.01899487526049f, 0.0f, -0.07293139167538f, 0.0f, 0.30596630545168f, 0.5f,
+ 0.30596630545168f, 0.0f, -0.07293139167538f, 0.0f, 0.01899487526049f, 0.0f},
+
+ // const FLOAT32 p12_13_34[13] =
+ {0.04081179924692f, 0.03812810994926f, 0.05144908135699f, 0.06399831151592f,
+ 0.07428313801106f, 0.08100347892914f, 0.08333333333333f, 0.08100347892914f,
+ 0.07428313801106f, 0.06399831151592f, 0.05144908135699f, 0.03812810994926f,
+ 0.04081179924692f},
+ // const FLOAT32 p8_13_34[13] =
+ {0.01565675600122f, 0.03752716391991f, 0.05417891378782f, 0.08417044116767f,
+ 0.10307344158036f, 0.12222452249753f, 0.12500000000000f, 0.12222452249753f,
+ 0.10307344158036f, 0.08417044116767f, 0.05417891378782f, 0.03752716391991f,
+ 0.01565675600122f},
+ // const FLOAT32 p4_13_34[13] =
+ {-0.05908211155639f, -0.04871498374946f, 0.0f, 0.07778723915851f, 0.16486303567403f,
+ 0.23279856662996f, 0.25f, 0.23279856662996f, 0.16486303567403f, 0.07778723915851f,
+ 0.0f, -0.04871498374946f, -0.05908211155639f},
+ // const FLOAT32 cos_mod_2channel[2][13] =
+ {
+ {
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ 1.0000000000f, 1.0000000000f, 1.0000000000f,
+ },
+ {
+ 1.0000000000f, -1.0000000000f, 1.0000000000f, -1.0000000000f, 1.0000000000f,
+ -1.0000000000f, 1.0000000000f, -1.0000000000f, 1.0000000000f, -1.0000000000f,
+ 1.0000000000f, -1.0000000000f, 1.0000000000f,
+ },
+ },
+ // const FLOAT32 cos_sin_mod_4channel[4][13 * 2] =
+ {
+ {
+ -0.0000000000f, -1.0000000000f, -0.7071067691f, -0.7071067691f, -1.0000000000f,
+ 0.0000000000f, -0.7071067691f, 0.7071067691f, 0.0000000000f, 1.0000000000f,
+ 0.7071067691f, 0.7071067691f, 1.0000000000f, -0.0000000000f, 0.7071067691f,
+ -0.7071067691f, 0.0000000000f, -1.0000000000f, -0.7071067691f, -0.7071067691f,
+ -1.0000000000f, -0.0000000000f, -0.7071067691f, 0.7071067691f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ 0.0000000000f, 1.0000000000f, 0.7071067691f, -0.7071067691f, -1.0000000000f,
+ 0.0000000000f, 0.7071067691f, 0.7071067691f, -0.0000000000f, -1.0000000000f,
+ -0.7071067691f, 0.7071067691f, 1.0000000000f, -0.0000000000f, -0.7071067691f,
+ -0.7071067691f, -0.0000000000f, 1.0000000000f, 0.7071067691f, -0.7071067691f,
+ -1.0000000000f, -0.0000000000f, 0.7071067691f, 0.7071067691f, 0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, 0.7071067691f, 0.7071067691f, -1.0000000000f,
+ 0.0000000000f, 0.7071067691f, -0.7071067691f, 0.0000000000f, 1.0000000000f,
+ -0.7071067691f, -0.7071067691f, 1.0000000000f, -0.0000000000f, -0.7071067691f,
+ 0.7071067691f, 0.0000000000f, -1.0000000000f, 0.7071067691f, 0.7071067691f,
+ -1.0000000000f, -0.0000000000f, 0.7071067691f, -0.7071067691f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ -0.0000000000f, 1.0000000000f, -0.7071067691f, 0.7071067691f, -1.0000000000f,
+ 0.0000000000f, -0.7071067691f, -0.7071067691f, -0.0000000000f, -1.0000000000f,
+ 0.7071067691f, -0.7071067691f, 1.0000000000f, -0.0000000000f, 0.7071067691f,
+ 0.7071067691f, -0.0000000000f, 1.0000000000f, -0.7071067691f, 0.7071067691f,
+ -1.0000000000f, -0.0000000000f, -0.7071067691f, -0.7071067691f, -0.0000000000f,
+ -1.0000000000f,
+ },
+ },
+ // const FLOAT32 cos_sin_mod_8channel[8][13 * 2] =
+ {
+ {
+ -0.7071067691f, 0.7071067691f, -0.3826834261f, 0.9238795042f, 0.0000000000f,
+ 1.0000000000f, 0.3826834261f, 0.9238795042f, 0.7071067691f, 0.7071067691f,
+ 0.9238795042f, 0.3826834261f, 1.0000000000f, -0.0000000000f, 0.9238795042f,
+ -0.3826834261f, 0.7071067691f, -0.7071067691f, 0.3826834261f, -0.9238795042f,
+ 0.0000000000f, -1.0000000000f, -0.3826834261f, -0.9238795042f, -0.7071067691f,
+ -0.7071067691f,
+ },
+ {
+ 0.7071067691f, 0.7071067691f, 0.9238795042f, -0.3826834261f, -0.0000000000f,
+ -1.0000000000f, -0.9238795042f, -0.3826834261f, -0.7071067691f, 0.7071067691f,
+ 0.3826834261f, 0.9238795042f, 1.0000000000f, -0.0000000000f, 0.3826834261f,
+ -0.9238795042f, -0.7071067691f, -0.7071067691f, -0.9238795042f, 0.3826834261f,
+ -0.0000000000f, 1.0000000000f, 0.9238795042f, 0.3826834261f, 0.7071067691f,
+ -0.7071067691f,
+ },
+ {
+ 0.7071067691f, -0.7071067691f, -0.9238795042f, -0.3826834261f, 0.0000000000f,
+ 1.0000000000f, 0.9238795042f, -0.3826834261f, -0.7071067691f, -0.7071067691f,
+ -0.3826834261f, 0.9238795042f, 1.0000000000f, -0.0000000000f, -0.3826834261f,
+ -0.9238795042f, -0.7071067691f, 0.7071067691f, 0.9238795042f, 0.3826834261f,
+ 0.0000000000f, -1.0000000000f, -0.9238795042f, 0.3826834261f, 0.7071067691f,
+ 0.7071067691f,
+ },
+ {
+ -0.7071067691f, -0.7071067691f, 0.3826834261f, 0.9238795042f, -0.0000000000f,
+ -1.0000000000f, -0.3826834261f, 0.9238795042f, 0.7071067691f, -0.7071067691f,
+ -0.9238795042f, 0.3826834261f, 1.0000000000f, -0.0000000000f, -0.9238795042f,
+ -0.3826834261f, 0.7071067691f, 0.7071067691f, -0.3826834261f, -0.9238795042f,
+ -0.0000000000f, 1.0000000000f, 0.3826834261f, -0.9238795042f, -0.7071067691f,
+ 0.7071067691f,
+ },
+ {
+ -0.7071067691f, 0.7071067691f, 0.3826834261f, -0.9238795042f, 0.0000000000f,
+ 1.0000000000f, -0.3826834261f, -0.9238795042f, 0.7071067691f, 0.7071067691f,
+ -0.9238795042f, -0.3826834261f, 1.0000000000f, -0.0000000000f, -0.9238795042f,
+ 0.3826834261f, 0.7071067691f, -0.7071067691f, -0.3826834261f, 0.9238795042f,
+ 0.0000000000f, -1.0000000000f, 0.3826834261f, 0.9238795042f, -0.7071067691f,
+ -0.7071067691f,
+ },
+ {
+ 0.7071067691f, 0.7071067691f, -0.9238795042f, 0.3826834261f, -0.0000000000f,
+ -1.0000000000f, 0.9238795042f, 0.3826834261f, -0.7071067691f, 0.7071067691f,
+ -0.3826834261f, -0.9238795042f, 1.0000000000f, -0.0000000000f, -0.3826834261f,
+ 0.9238795042f, -0.7071067691f, -0.7071067691f, 0.9238795042f, -0.3826834261f,
+ -0.0000000000f, 1.0000000000f, -0.9238795042f, -0.3826834261f, 0.7071067691f,
+ -0.7071067691f,
+ },
+ {
+ 0.7071067691f, -0.7071067691f, 0.9238795042f, 0.3826834261f, -0.0000000000f,
+ 1.0000000000f, -0.9238795042f, 0.3826834261f, -0.7071067691f, -0.7071067691f,
+ 0.3826834261f, -0.9238795042f, 1.0000000000f, -0.0000000000f, 0.3826834261f,
+ 0.9238795042f, -0.7071067691f, 0.7071067691f, -0.9238795042f, -0.3826834261f,
+ -0.0000000000f, -1.0000000000f, 0.9238795042f, -0.3826834261f, 0.7071067691f,
+ 0.7071067691f,
+ },
+ {
+ -0.7071067691f, -0.7071067691f, -0.3826834261f, -0.9238795042f, -0.0000000000f,
+ -1.0000000000f, 0.3826834261f, -0.9238795042f, 0.7071067691f, -0.7071067691f,
+ 0.9238795042f, -0.3826834261f, 1.0000000000f, -0.0000000000f, 0.9238795042f,
+ 0.3826834261f, 0.7071067691f, 0.7071067691f, 0.3826834261f, 0.9238795042f,
+ -0.0000000000f, 1.0000000000f, -0.3826834261f, 0.9238795042f, -0.7071067691f,
+ 0.7071067691f,
+ },
+ },
+ // const FLOAT32 cos_sin_mod_12channel[12][13 * 2] =
+ {
+ {
+ 0.0000000000f, 1.0000000000f, 0.2588190436f, 0.9659258127f, 0.5000000000f,
+ 0.8660253882f, 0.7071067691f, 0.7071067691f, 0.8660253882f, 0.5000000000f,
+ 0.9659258127f, 0.2588190436f, 1.0000000000f, -0.0000000000f, 0.9659258127f,
+ -0.2588190436f, 0.8660253882f, -0.5000000000f, 0.7071067691f, -0.7071067691f,
+ 0.5000000000f, -0.8660253882f, 0.2588190436f, -0.9659258127f, 0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, -0.7071067691f, -0.7071067691f, -1.0000000000f,
+ 0.0000000000f, -0.7071067691f, 0.7071067691f, 0.0000000000f, 1.0000000000f,
+ 0.7071067691f, 0.7071067691f, 1.0000000000f, -0.0000000000f, 0.7071067691f,
+ -0.7071067691f, 0.0000000000f, -1.0000000000f, -0.7071067691f, -0.7071067691f,
+ -1.0000000000f, -0.0000000000f, -0.7071067691f, 0.7071067691f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ 0.0000000000f, 1.0000000000f, 0.9659258127f, 0.2588190436f, 0.5000000000f,
+ -0.8660253882f, -0.7071067691f, -0.7071067691f, -0.8660253882f, 0.5000000000f,
+ 0.2588190436f, 0.9659258127f, 1.0000000000f, -0.0000000000f, 0.2588190436f,
+ -0.9659258127f, -0.8660253882f, -0.5000000000f, -0.7071067691f, 0.7071067691f,
+ 0.5000000000f, 0.8660253882f, 0.9659258127f, -0.2588190436f, 0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, -0.9659258127f, 0.2588190436f, 0.5000000000f,
+ 0.8660253882f, 0.7071067691f, -0.7071067691f, -0.8660253882f, -0.5000000000f,
+ -0.2588190436f, 0.9659258127f, 1.0000000000f, -0.0000000000f, -0.2588190436f,
+ -0.9659258127f, -0.8660253882f, 0.5000000000f, 0.7071067691f, 0.7071067691f,
+ 0.5000000000f, -0.8660253882f, -0.9659258127f, -0.2588190436f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ 0.0000000000f, 1.0000000000f, 0.7071067691f, -0.7071067691f, -1.0000000000f,
+ 0.0000000000f, 0.7071067691f, 0.7071067691f, -0.0000000000f, -1.0000000000f,
+ -0.7071067691f, 0.7071067691f, 1.0000000000f, -0.0000000000f, -0.7071067691f,
+ -0.7071067691f, -0.0000000000f, 1.0000000000f, 0.7071067691f, -0.7071067691f,
+ -1.0000000000f, -0.0000000000f, 0.7071067691f, 0.7071067691f, 0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, -0.2588190436f, 0.9659258127f, 0.5000000000f,
+ -0.8660253882f, -0.7071067691f, 0.7071067691f, 0.8660253882f, -0.5000000000f,
+ -0.9659258127f, 0.2588190436f, 1.0000000000f, -0.0000000000f, -0.9659258127f,
+ -0.2588190436f, 0.8660253882f, 0.5000000000f, -0.7071067691f, -0.7071067691f,
+ 0.5000000000f, 0.8660253882f, -0.2588190436f, -0.9659258127f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ -0.0000000000f, 1.0000000000f, -0.2588190436f, -0.9659258127f, 0.5000000000f,
+ 0.8660253882f, -0.7071067691f, -0.7071067691f, 0.8660253882f, 0.5000000000f,
+ -0.9659258127f, -0.2588190436f, 1.0000000000f, -0.0000000000f, -0.9659258127f,
+ 0.2588190436f, 0.8660253882f, -0.5000000000f, -0.7071067691f, 0.7071067691f,
+ 0.5000000000f, -0.8660253882f, -0.2588190436f, 0.9659258127f, -0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, 0.7071067691f, 0.7071067691f, -1.0000000000f,
+ 0.0000000000f, 0.7071067691f, -0.7071067691f, 0.0000000000f, 1.0000000000f,
+ -0.7071067691f, -0.7071067691f, 1.0000000000f, -0.0000000000f, -0.7071067691f,
+ 0.7071067691f, 0.0000000000f, -1.0000000000f, 0.7071067691f, 0.7071067691f,
+ -1.0000000000f, -0.0000000000f, 0.7071067691f, -0.7071067691f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ -0.0000000000f, 1.0000000000f, -0.9659258127f, -0.2588190436f, 0.5000000000f,
+ -0.8660253882f, 0.7071067691f, 0.7071067691f, -0.8660253882f, 0.5000000000f,
+ -0.2588190436f, -0.9659258127f, 1.0000000000f, -0.0000000000f, -0.2588190436f,
+ 0.9659258127f, -0.8660253882f, -0.5000000000f, 0.7071067691f, -0.7071067691f,
+ 0.5000000000f, 0.8660253882f, -0.9659258127f, 0.2588190436f, -0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, 0.9659258127f, -0.2588190436f, 0.5000000000f,
+ 0.8660253882f, -0.7071067691f, 0.7071067691f, -0.8660253882f, -0.5000000000f,
+ 0.2588190436f, -0.9659258127f, 1.0000000000f, -0.0000000000f, 0.2588190436f,
+ 0.9659258127f, -0.8660253882f, 0.5000000000f, -0.7071067691f, -0.7071067691f,
+ 0.5000000000f, -0.8660253882f, 0.9659258127f, 0.2588190436f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ {
+ -0.0000000000f, 1.0000000000f, -0.7071067691f, 0.7071067691f, -1.0000000000f,
+ 0.0000000000f, -0.7071067691f, -0.7071067691f, -0.0000000000f, -1.0000000000f,
+ 0.7071067691f, -0.7071067691f, 1.0000000000f, -0.0000000000f, 0.7071067691f,
+ 0.7071067691f, -0.0000000000f, 1.0000000000f, -0.7071067691f, 0.7071067691f,
+ -1.0000000000f, -0.0000000000f, -0.7071067691f, -0.7071067691f, -0.0000000000f,
+ -1.0000000000f,
+ },
+ {
+ -0.0000000000f, -1.0000000000f, 0.2588190436f, -0.9659258127f, 0.5000000000f,
+ -0.8660253882f, 0.7071067691f, -0.7071067691f, 0.8660253882f, -0.5000000000f,
+ 0.9659258127f, -0.2588190436f, 1.0000000000f, -0.0000000000f, 0.9659258127f,
+ 0.2588190436f, 0.8660253882f, 0.5000000000f, 0.7071067691f, 0.7071067691f,
+ 0.5000000000f, 0.8660253882f, 0.2588190436f, 0.9659258127f, -0.0000000000f,
+ 1.0000000000f,
+ },
+ },
+
+ // const WORD32 qmf_delay_idx_tbl[NUM_OF_QUAD_MIRROR_FILTER_CHNLS]
+ {14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
+
+ // const WORD32 group_borders_20_tbl[NUM_IID_GROUPS + 1]
+ {6, 7, 0, 1, 2, 3, 9, 8, 10, 11, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64},
+
+ // const WORD32
+ // group_borders_34_tbl[NUM_IID_GROUPS_HI_RES + 1] =
+ {0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32 - 27, 33 - 27, 34 - 27, 35 - 27,
+ 36 - 27, 37 - 27, 38 - 27, 40 - 27, 42 - 27, 44 - 27, 46 - 27, 48 - 27, 51 - 27,
+ 54 - 27, 57 - 27, 60 - 27, 64 - 27, 68 - 27, 91 - 27},
+
+ // const WORD32 bin_group_map_20[NUM_IID_GROUPS] =
+ {(NEGATE_IPD_MASK | 1),
+ (NEGATE_IPD_MASK | 0),
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19},
+
+ // const WORD32 bin_group_map_34[NUM_IID_GROUPS_HI_RES] =
+ {0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 6,
+ 7,
+ (NEGATE_IPD_MASK | 2),
+ (NEGATE_IPD_MASK | 1),
+ (NEGATE_IPD_MASK | 0),
+ 10,
+ 10,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12,
+ 9,
+ 14,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 16,
+ 13,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 26,
+ 27,
+ 28,
+ 29,
+ 30,
+ 31,
+ 32,
+ 33},
+ // const WORD32 quantized_iids[NUM_IID_STEPS] =
+ {2, 4, 7, 10, 14, 18, 25},
+ // const WORD32 quantized_iids_fine[NUM_IID_STEPS_FINE]
+ {2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 30, 35, 40, 45, 50},
+ // FLOAT32 quantized_rhos[NUM_ICC_STEPS]
+ {1.0f, 0.937f, 0.84118f, 0.60092f, 0.36764f, 0.0f, -0.589f, -1.0f},
+ // const WORD32 ipd_bins_tbl[3]
+ {NUM_LOW_RES_IPD_BINS, NUM_MID_RES_IPD_BINS, NUM_HI_RES_IPD_BINS},
+ // const WORD16 band_res_hyb20[3]
+ {NO_HYBRID_CHANNELS_8, NO_HYBRID_CHANNELS_2, NO_HYBRID_CHANNELS_2},
+ // const WORD16 band_res_hyb34[5] =
+ {NO_HYBRID_CHANNELS_12, NO_HYBRID_CHANNELS_8, NO_HYBRID_CHANNELS_4,
+ NO_HYBRID_CHANNELS_4, NO_HYBRID_CHANNELS_4},
+};
diff --git a/decoder/ixheaacd_sbr_rom.h b/decoder/ixheaacd_sbr_rom.h
index fc15fce..45feb33 100644
--- a/decoder/ixheaacd_sbr_rom.h
+++ b/decoder/ixheaacd_sbr_rom.h
@@ -33,6 +33,28 @@
#define NO_IID_LEVELS_FINE (2 * NUM_IID_LEVELS_FINE + 1)
#define NO_ICC_LEVELS (NUM_ICC_LEVELS)
+#define IPD_QMF_GROUPS (3)
+
+#define SUBQMF_GROUPS_HI_RES (32)
+#define QMF_GROUPS_HI_RES (18)
+#define IPD_QMF_GROUPS_HI_RES (1)
+
+#define NUM_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
+#define NUM_IPD_GROUPS (SUBQMF_GROUPS + IPD_QMF_GROUPS)
+
+#define NUM_IID_GROUPS_HI_RES (SUBQMF_GROUPS_HI_RES + QMF_GROUPS_HI_RES)
+#define NUM_IPD_GROUPS_HI_RES (SUBQMF_GROUPS_HI_RES + IPD_QMF_GROUPS_HI_RES)
+
+#define NUM_SUB_QMF_CHANNELS 12
+#define NUM_SUB_QMF_CHANNELS_HI_RES 32
+
+#define NUM_QUAD_MIRROR_FILTER_CHNLS 64
+
+#define NUM_IID_STEPS (7)
+#define NUM_IID_STEPS_FINE (15)
+#define NUM_ICC_STEPS (8)
+#define HYBRID_FILTER_LENGTH 13
+
typedef struct {
WORD16 sbr_lim_gains_m[8];
@@ -166,6 +188,53 @@ typedef struct {
WORD16 huff_iid_df_fine[60];
WORD32 dummy;
+ FLOAT32 qmf_fract_delay_phase_factor_im[NUM_QUAD_MIRROR_FILTER_CHNLS];
+ FLOAT32 qmf_fract_delay_phase_factor_re[NUM_QUAD_MIRROR_FILTER_CHNLS];
+
+ FLOAT32 frac_delay_phase_fac_qmf_sub_im_20[NUM_SUB_QMF_CHANNELS];
+ FLOAT32 frac_delay_phase_fac_qmf_sub_re_20[NUM_SUB_QMF_CHANNELS];
+ FLOAT32 frac_delay_phase_fac_qmf_sub_im_34[NUM_SUB_QMF_CHANNELS_HI_RES];
+ FLOAT32 frac_delay_phase_fac_qmf_sub_re_34[NUM_SUB_QMF_CHANNELS_HI_RES];
+
+ FLOAT32 qmf_ser_fract_delay_phase_factor_im[NUM_QUAD_MIRROR_FILTER_CHNLS]
+ [NUM_SER_AP_LINKS];
+ FLOAT32 qmf_ser_fract_delay_phase_factor_re[NUM_QUAD_MIRROR_FILTER_CHNLS]
+ [NUM_SER_AP_LINKS];
+
+ FLOAT32 frac_delay_phase_fac_ser_qmf_sub_im_20[NUM_SUB_QMF_CHANNELS][NUM_SER_AP_LINKS];
+ FLOAT32 frac_delay_phase_fac_ser_qmf_sub_re_20[NUM_SUB_QMF_CHANNELS][NUM_SER_AP_LINKS];
+ FLOAT32 frac_delay_phase_fac_ser_qmf_sub_im_34[NUM_SUB_QMF_CHANNELS_HI_RES]
+ [NUM_SER_AP_LINKS];
+ FLOAT32 frac_delay_phase_fac_ser_qmf_sub_re_34[NUM_SUB_QMF_CHANNELS_HI_RES]
+ [NUM_SER_AP_LINKS];
+
+ FLOAT32 scale_factors_flt[NO_IID_LEVELS];
+ FLOAT32 scale_factors_fine_flt[NO_IID_LEVELS_FINE];
+
+ FLOAT32 alphas[NUM_ICC_LEVELS];
+ FLOAT32 all_pass_link_decay_ser[NUM_SER_AP_LINKS];
+ FLOAT32 p8_13_20[HYBRID_FILTER_LENGTH];
+ FLOAT32 p2_13_20[HYBRID_FILTER_LENGTH];
+ FLOAT32 p12_13_34[HYBRID_FILTER_LENGTH];
+ FLOAT32 p8_13_34[HYBRID_FILTER_LENGTH];
+ FLOAT32 p4_13_34[HYBRID_FILTER_LENGTH];
+ FLOAT32 cos_mod_2channel[2][HYBRID_FILTER_LENGTH];
+ FLOAT32 cos_sin_mod_4channel[4][HYBRID_FILTER_LENGTH * 2];
+ FLOAT32 cos_sin_mod_8channel[8][HYBRID_FILTER_LENGTH * 2];
+ FLOAT32 cos_sin_mod_12channel[12][HYBRID_FILTER_LENGTH * 2];
+
+ WORD32 qmf_delay_idx_tbl[NUM_QUAD_MIRROR_FILTER_CHNLS];
+ WORD32 group_borders_20_tbl[NUM_IID_GROUPS + 1];
+ WORD32 group_borders_34_tbl[NUM_IID_GROUPS_HI_RES + 1];
+ WORD32 bin_group_map_20[NUM_IID_GROUPS];
+ WORD32 bin_group_map_34[NUM_IID_GROUPS_HI_RES];
+ WORD32 quantized_iids[NUM_IID_STEPS];
+ WORD32 quantized_iids_fine[NUM_IID_STEPS_FINE];
+ FLOAT32 quantized_rhos[NUM_ICC_STEPS];
+ WORD32 ipd_bins_tbl[3];
+
+ WORD16 band_res_hyb20[3];
+ WORD16 band_res_hyb34[5];
} ia_ps_tables_struct;
extern const ia_ps_tables_struct ixheaacd_aac_dec_ps_tables;
diff --git a/decoder/ixheaacd_sbrdec_initfuncs.c b/decoder/ixheaacd_sbrdec_initfuncs.c
index f0f1f38..15d6981 100644
--- a/decoder/ixheaacd_sbrdec_initfuncs.c
+++ b/decoder/ixheaacd_sbrdec_initfuncs.c
@@ -40,6 +40,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -66,7 +69,7 @@
#include "ixheaacd_env_dec.h"
#include "ixheaacd_basic_funcs.h"
#include "ixheaacd_sbr_crc.h"
-#include "ixheaacd_error_standards.h"
+
#include "ixheaacd_sbrqmftrans.h"
#include "ixheaacd_audioobjtypes.h"
@@ -75,6 +78,8 @@ extern const WORD32 ixheaacd_ldmps_polyphase_filter_coeff_fix[1280];
#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
+#define FD_OVERSAMPLING_FAC (1.5f)
+
WORD32 ixheaacd_getsize_sbr_persistent() {
return (ALIGN_SIZE64(sizeof(ia_sbr_pers_struct)));
}
@@ -82,7 +87,8 @@ WORD32 ixheaacd_getsize_sbr_persistent() {
VOID ixheaacd_esbr_hbe_data_init(
ia_esbr_hbe_txposer_struct *pstr_esbr_hbe_txposer,
const WORD32 num_aac_samples, WORD32 samp_fac_4_flag,
- const WORD32 num_out_samples, VOID *persistent_hbe_mem) {
+ const WORD32 num_out_samples, VOID *persistent_hbe_mem,
+ WORD32 *total_persistant) {
WORD32 i;
WORD32 used_persistent = 0;
@@ -92,9 +98,8 @@ VOID ixheaacd_esbr_hbe_data_init(
pstr_esbr_hbe_txposer->core_frame_length = num_aac_samples;
pstr_esbr_hbe_txposer->no_bins = num_out_samples / NO_QMF_SYNTH_CHANNELS;
-
pstr_esbr_hbe_txposer->hbe_qmf_in_len =
- pstr_esbr_hbe_txposer->no_bins / 2 + HBE_OPER_WIN_LEN - 1;
+ pstr_esbr_hbe_txposer->no_bins;
pstr_esbr_hbe_txposer->hbe_qmf_out_len =
2 * pstr_esbr_hbe_txposer->hbe_qmf_in_len;
@@ -126,8 +131,19 @@ VOID ixheaacd_esbr_hbe_data_init(
used_persistent += (TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
}
pstr_esbr_hbe_txposer->upsamp_4_flag = samp_fac_4_flag;
+ if (pstr_esbr_hbe_txposer) {
+ pstr_esbr_hbe_txposer->fft_size[0] = num_aac_samples;
+ pstr_esbr_hbe_txposer->fft_size[1] = (WORD32)(FD_OVERSAMPLING_FAC * num_aac_samples);
+
+ pstr_esbr_hbe_txposer->ptr_spectrum = &pstr_esbr_hbe_txposer->spectrum_buf[0];
+ pstr_esbr_hbe_txposer->ptr_spectrum_tx =
+ &pstr_esbr_hbe_txposer->spectrum_transposed_buf[0];
+ pstr_esbr_hbe_txposer->mag = &pstr_esbr_hbe_txposer->mag_buf[0];
+ pstr_esbr_hbe_txposer->phase = &pstr_esbr_hbe_txposer->phase_buf[0];
+ pstr_esbr_hbe_txposer->ptr_output_buf = &pstr_esbr_hbe_txposer->output_buf[0];
+ }
}
-
+ *total_persistant = used_persistent;
return;
}
@@ -152,6 +168,7 @@ VOID ixheaacd_set_sbr_persistent_buffers(VOID *sbr_persistent_mem_v,
struct ia_sbr_dec_inst_struct *p_str_sbr_dec_inst =
&sbr_persistent_mem->str_sbr_dec_inst;
+ num_channel = max(2, num_channel);
memset(sbr_persistent_mem, 0, sizeof(struct ia_sbr_pers_struct));
sbr_persistent_mem->sbr_qmf_analy_states =
@@ -391,61 +408,6 @@ VOID ixheaacd_set_sbr_persistent_buffers(VOID *sbr_persistent_mem_v,
*persistent_used = used_persistent;
}
-WORD32 ia_enhaacplus_dec_get_sbr_buffers_size(WORD32 channels) {
- WORD32 sbr_buffers_size = 0;
- WORD32 temp, temp2;
- WORD32 num_channel = channels;
- WORD32 i;
-
- temp = num_channel * ((QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) *
- sizeof(WORD16));
- sbr_buffers_size += temp;
-
- temp2 =
- (num_channel * ((QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) *
- sizeof(WORD16)));
- sbr_buffers_size += temp2;
-
- for (i = 0; i < num_channel; i++) {
- sbr_buffers_size +=
- 2 * MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32);
- }
-
- for (i = 0; i < num_channel; i++) {
- int j;
- sbr_buffers_size += LPC_ORDER * sizeof(VOID *);
-
- for (j = 0; j < LPC_ORDER; j++) {
- sbr_buffers_size += NO_ANALYSIS_CHANNELS * sizeof(WORD32);
- }
- }
-
- for (i = 0; i < num_channel; i++) {
- int j;
- sbr_buffers_size += LPC_ORDER * sizeof(WORD32);
- for (j = 0; j < LPC_ORDER; j++) {
- sbr_buffers_size += NO_ANALYSIS_CHANNELS * sizeof(WORD32);
- }
- }
-
- for (i = 0; i < num_channel; i++) {
- WORD32 temp_used = sbr_buffers_size;
-
- temp_used += 2 * MAX_FREQ_COEFFS * sizeof(WORD16);
- temp_used += MAX_FREQ_COEFFS * sizeof(WORD16);
- temp_used += ALIGN_SIZE64(sizeof(ia_freq_band_data_struct));
- temp_used += ALIGN_SIZE64(sizeof(ia_sbr_prev_frame_data_struct));
- temp_used += ALIGN_SIZE64(sizeof(ia_sbr_channel_struct));
- temp_used += ALIGN_SIZE64(sizeof(ia_sbr_header_data_struct));
-
- sbr_buffers_size = temp_used;
- }
-
- sbr_buffers_size += sizeof(ia_ps_dec_struct);
-
- return sbr_buffers_size;
-}
-
static PLATFORM_INLINE VOID ixheaacd_init_headerdata(
ia_sbr_header_data_struct *ptr_header_data, WORD32 sample_rate_dec,
WORD32 samp_per_frame, ia_freq_band_data_struct *freq_band_data,
@@ -547,6 +509,8 @@ ia_handle_sbr_dec_inst_struct ixheaacd_init_sbr(
ptr_header_data[i]->status = 1;
ptr_sbr_dec[i]->band_count = 64;
+ ptr_header_data[i]->pstr_freq_band_data[0].qmf_sb_prev = 64;
+ ptr_header_data[i]->pstr_freq_band_data[1].qmf_sb_prev = 64;
if (err) {
return NULL;
@@ -558,15 +522,16 @@ ia_handle_sbr_dec_inst_struct ixheaacd_init_sbr(
if (audio_object_type == AOT_ER_AAC_ELD)
ixheaacd_create_psdec(
sbr_persistent_mem->str_sbr_dec_inst.pstr_ps_stereo_dec,
- sbr_persistent_mem, &ptr_overlap_buf[512 * 4]);
+ sbr_persistent_mem, &ptr_overlap_buf[512 * 4], samp_per_frame);
else
ixheaacd_create_psdec(
sbr_persistent_mem->str_sbr_dec_inst.pstr_ps_stereo_dec,
- sbr_persistent_mem, ptr_overlap_buf);
+ sbr_persistent_mem, ptr_overlap_buf, samp_per_frame);
}
}
- if (use_hbe != NULL) {
+ if ((use_hbe != NULL) && !((audio_object_type == AOT_ER_AAC_ELD) ||
+ (audio_object_type == AOT_ER_AAC_LD))) {
ia_sbr_header_data_struct *ptr_sbr_dflt_header =
&sbr_persistent_mem->str_sbr_dec_inst.str_sbr_dflt_header;
ia_sbr_header_data_struct *ptr_usac_dflt_header =
@@ -591,17 +556,18 @@ ia_handle_sbr_dec_inst_struct ixheaacd_init_sbr(
ptr_header_data[1]->esbr_start_up = 1;
ptr_header_data[1]->esbr_start_up_pvc = 1;
}
- if (hbe_txposer_buffers != NULL && (use_hbe[0] == 1)) {
+ if (hbe_txposer_buffers != NULL) {
+ WORD32 persistant_used = 0;
ixheaacd_esbr_hbe_data_init(ptr_sbr_dec[0]->p_hbe_txposer, samp_per_frame,
sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1 ? 1 : 0,
- output_frame_size, hbe_txposer_buffers);
+ output_frame_size, hbe_txposer_buffers, &persistant_used);
hbe_txposer_buffers =
(WORD8 *)hbe_txposer_buffers + MAX_HBE_PERSISTENT_SIZE;
ixheaacd_esbr_hbe_data_init(ptr_sbr_dec[1]->p_hbe_txposer, samp_per_frame,
sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1 ? 1 : 0,
- output_frame_size, hbe_txposer_buffers);
+ output_frame_size, hbe_txposer_buffers, &persistant_used);
}
p_str_sbr_dec_inst->ptr_pvc_data_str->prev_first_bnd_idx = -1;
@@ -631,11 +597,11 @@ ia_handle_sbr_dec_inst_struct ixheaacd_init_sbr(
ptr_header_data[0]->upsamp_fac = 1;
ptr_sbr_dec[1]->str_codec_qmf_bank.no_channels = 32;
- ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_cos_twiddle =
+ ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_cos_twiddle =
(WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
- ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
+ ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
(WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
- ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_t_cos =
+ ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_t_cos =
(WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l32;
ptr_header_data[1]->is_usf_4 = 0;
ptr_header_data[1]->upsamp_fac = 1;
@@ -719,30 +685,32 @@ ia_handle_sbr_dec_inst_struct ixheaacd_init_sbr(
break;
}
- ptr_sbr_dflt_header->start_freq = ptr_usac_dflt_header->start_freq;
- ptr_sbr_dflt_header->stop_freq = ptr_usac_dflt_header->stop_freq;
-
- if (ptr_usac_dflt_header->header_extra_1) {
- ptr_sbr_dflt_header->freq_scale = ptr_usac_dflt_header->freq_scale;
- ptr_sbr_dflt_header->alter_scale = ptr_usac_dflt_header->alter_scale;
- ptr_sbr_dflt_header->noise_bands = ptr_usac_dflt_header->noise_bands;
- } else {
- ptr_sbr_dflt_header->freq_scale = SBR_FREQ_SCALE_DEFAULT;
- ptr_sbr_dflt_header->alter_scale = SBR_ALTER_SCALE_DEFAULT;
- ptr_sbr_dflt_header->noise_bands = SBR_NOISE_BANDS_DEFAULT;
- }
+ if (ptr_usac_dflt_header != NULL) {
+ ptr_sbr_dflt_header->start_freq = ptr_usac_dflt_header->start_freq;
+ ptr_sbr_dflt_header->stop_freq = ptr_usac_dflt_header->stop_freq;
+
+ if (ptr_usac_dflt_header->header_extra_1) {
+ ptr_sbr_dflt_header->freq_scale = ptr_usac_dflt_header->freq_scale;
+ ptr_sbr_dflt_header->alter_scale = ptr_usac_dflt_header->alter_scale;
+ ptr_sbr_dflt_header->noise_bands = ptr_usac_dflt_header->noise_bands;
+ } else {
+ ptr_sbr_dflt_header->freq_scale = SBR_FREQ_SCALE_DEFAULT;
+ ptr_sbr_dflt_header->alter_scale = SBR_ALTER_SCALE_DEFAULT;
+ ptr_sbr_dflt_header->noise_bands = SBR_NOISE_BANDS_DEFAULT;
+ }
- if (ptr_usac_dflt_header->header_extra_2) {
- ptr_sbr_dflt_header->limiter_bands = ptr_usac_dflt_header->limiter_bands;
- ptr_sbr_dflt_header->limiter_gains = ptr_usac_dflt_header->limiter_gains;
- ptr_sbr_dflt_header->interpol_freq = ptr_usac_dflt_header->interpol_freq;
- ptr_sbr_dflt_header->smoothing_mode =
- ptr_usac_dflt_header->smoothing_mode;
- } else {
- ptr_sbr_dflt_header->limiter_bands = SBR_LIMITER_BANDS_DEFAULT;
- ptr_sbr_dflt_header->limiter_gains = SBR_LIMITER_GAINS_DEFAULT;
- ptr_sbr_dflt_header->interpol_freq = SBR_INTERPOL_FREQ_DEFAULT;
- ptr_sbr_dflt_header->smoothing_mode = SBR_SMOOTHING_LENGTH_DEFAULT;
+ if (ptr_usac_dflt_header->header_extra_2) {
+ ptr_sbr_dflt_header->limiter_bands = ptr_usac_dflt_header->limiter_bands;
+ ptr_sbr_dflt_header->limiter_gains = ptr_usac_dflt_header->limiter_gains;
+ ptr_sbr_dflt_header->interpol_freq = ptr_usac_dflt_header->interpol_freq;
+ ptr_sbr_dflt_header->smoothing_mode =
+ ptr_usac_dflt_header->smoothing_mode;
+ } else {
+ ptr_sbr_dflt_header->limiter_bands = SBR_LIMITER_BANDS_DEFAULT;
+ ptr_sbr_dflt_header->limiter_gains = SBR_LIMITER_GAINS_DEFAULT;
+ ptr_sbr_dflt_header->interpol_freq = SBR_INTERPOL_FREQ_DEFAULT;
+ ptr_sbr_dflt_header->smoothing_mode = SBR_SMOOTHING_LENGTH_DEFAULT;
+ }
}
}
return &(sbr_persistent_mem->str_sbr_dec_inst);
@@ -870,7 +838,7 @@ static PLATFORM_INLINE VOID ixheaacd_create_hf_generator(
VOID ixheaacd_create_psdec(ia_ps_dec_struct *ptr_ps_dec,
VOID *sbr_persistent_mem_v,
- WORD32 *ptr_overlap_buf) {
+ WORD32 *ptr_overlap_buf, WORD32 frame_size) {
ia_sbr_pers_struct *sbr_persistent_mem =
(ia_sbr_pers_struct *)sbr_persistent_mem_v;
@@ -954,6 +922,15 @@ VOID ixheaacd_create_psdec(ia_ps_dec_struct *ptr_ps_dec,
(NO_IID_GROUPS + 2) * 2 * sizeof(WORD16));
memset(ptr_ps_dec->h21_h22_vec, 0, sizeof(ptr_ps_dec->h21_h22_vec));
+ if (frame_size == 960)
+ ptr_ps_dec->num_sub_samples = NUM_SUB_SAMPLES_960;
+ else
+ ptr_ps_dec->num_sub_samples = NUM_SUB_SAMPLES;
+
+
+ ixheaacd_create_ps_esbr_dec(ptr_ps_dec, sbr_tables_ptr->ps_tables_ptr,
+ 64, ptr_ps_dec->num_sub_samples, 0);
+
return;
}
diff --git a/decoder/ixheaacd_sbrdec_lpfuncs.c b/decoder/ixheaacd_sbrdec_lpfuncs.c
index 33920c2..015e323 100644
--- a/decoder/ixheaacd_sbrdec_lpfuncs.c
+++ b/decoder/ixheaacd_sbrdec_lpfuncs.c
@@ -41,6 +41,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -70,6 +73,7 @@
#include "ixheaacd_function_selector.h"
#include "ixheaacd_audioobjtypes.h"
+#include "ixheaacd_error_codes.h"
#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
@@ -111,8 +115,8 @@ VOID ixheaacd_derive_lim_band_tbl(
WORD16 sub_band_start = f_low_tbl[0];
WORD16 sub_band_end = f_low_tbl[num_low_bnd];
- static const WORD16 limbnd_per_oct[4] = {(WORD16)0x2000, (WORD16)0x2666,
- (WORD16)0x4000, (WORD16)0x6000};
+ const WORD16 limbnd_per_oct[4] = {(WORD16)0x2000, (WORD16)0x2666, (WORD16)0x4000,
+ (WORD16)0x6000};
if (limiter_bands == 0) {
f_lim_tbl[0] = 0;
@@ -236,7 +240,7 @@ VOID ixheaacd_lean_sbrconcealment(
step = 1;
- if (ptr_sbr_data->amp_res - SBR_AMPLITUDE_RESOLUTION_1_5 == 0) {
+ if (ptr_header_data->amp_res - SBR_AMPLITUDE_RESOLUTION_1_5 == 0) {
target = (target << 1);
step = (step << 1);
}
@@ -251,7 +255,7 @@ VOID ixheaacd_lean_sbrconcealment(
ptr_sbr_data->del_cod_dir_noise_arr[0] = DTDF_DIR_TIME;
memset(ptr_sbr_data->int_noise_floor, 0,
- sizeof(WORD16) * ptr_header_data->pstr_freq_band_data->num_nf_bands);
+ sizeof(ptr_sbr_data->int_noise_floor));
memset(ptr_sbr_data->add_harmonics, 0, sizeof(FLAG) * MAX_FREQ_COEFFS);
}
@@ -570,10 +574,9 @@ VOID ixheaacd_map_34_params_to_20(WORD16 *params) {
extern const WORD16 ixheaacd_num_bands[3];
-WORD16 ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec,
- ia_bit_buf_struct *it_bit_buff,
- WORD16 num_bits_left,
- ia_ps_tables_struct *ps_tables_ptr) {
+IA_ERRORCODE ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec, ia_bit_buf_struct *it_bit_buff,
+ WORD16 num_bits_left, ia_ps_tables_struct *ps_tables_ptr)
+{
WORD b, e, temp;
const WORD16 num_env_tab[4] = {0, 1, 2, 4};
WORD cnt_bits;
@@ -610,9 +613,19 @@ WORD16 ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec,
if (ptr_ps_dec->icc_mode > 2) {
ptr_ps_dec->icc_mode -= 3;
+ ptr_ps_dec->use_pca_rot_flg = 1;
+ } else {
+ ptr_ps_dec->use_pca_rot_flg = 0;
+ }
+ ptr_ps_dec->freq_res_ipd = ptr_ps_dec->iid_mode;
+ if (ptr_ps_dec->freq_res_ipd > 2) {
+ return IA_FATAL_ERROR;
}
}
+ ptr_ps_dec->use_34_st_bands = 0;
+ ptr_ps_dec->use_pca_rot_flg = 0;
+
if ((ptr_ps_dec->enable_iid && ptr_ps_dec->iid_mode > 2) ||
(ptr_ps_dec->enable_icc && ptr_ps_dec->icc_mode > 2)) {
ptr_ps_dec->ps_data_present = 0;
@@ -623,7 +636,9 @@ WORD16 ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec,
ixheaacd_read_bits_buf(it_bit_buff, 8);
num_bits_left -= 8;
}
- ixheaacd_read_bits_buf(it_bit_buff, num_bits_left);
+ if (num_bits_left >= 0) {
+ ixheaacd_read_bits_buf(it_bit_buff, num_bits_left);
+ }
return (cnt_bits - it_bit_buff->cnt_bits);
}
@@ -682,8 +697,7 @@ WORD16 ixheaacd_read_ps_data(ia_ps_dec_struct *ptr_ps_dec,
}
for (b = 0; b < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; b++) {
- ptr_ps_dec->icc_par_table[e][b] =
- ixheaacd_ssc_huff_dec(huffman_table, it_bit_buff);
+ ptr_ps_dec->icc_par_table[e][b] = ixheaacd_ssc_huff_dec(huffman_table, it_bit_buff);
}
}
}
@@ -952,15 +966,13 @@ VOID ixheaacd_pre_processing(FLOAT32 ptr_src_buf_real[][64],
}
}
-WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
- FLOAT32 ptr_src_buf_imag[][64],
+WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64], FLOAT32 ptr_src_buf_imag[][64],
FLOAT32 ptr_ph_vocod_buf_real[][64],
- FLOAT32 ptr_ph_vocod_buf_imag[][64],
- FLOAT32 ptr_dst_buf_real[][64],
+ FLOAT32 ptr_ph_vocod_buf_imag[][64], FLOAT32 ptr_dst_buf_real[][64],
FLOAT32 ptr_dst_buf_imag[][64],
ia_sbr_frame_info_data_struct *ptr_frame_data,
- ia_sbr_header_data_struct *ptr_header_data,
- WORD32 ldmps_present, WORD32 time_slots) {
+ ia_sbr_header_data_struct *ptr_header_data, WORD32 ldmps_present,
+ WORD32 time_slots, WORD32 ec_flag) {
WORD32 bw_index, i, k, k2, patch = 0;
WORD32 co_var_len;
WORD32 start_sample, end_sample, goal_sb;
@@ -1039,6 +1051,7 @@ WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
}
if (sbr_patching_mode || !hbe_flag) {
+ WORD32 flag_break = 0;
FLOAT32 alpha_real[64][2] = {{0}}, alpha_imag[64][2] = {{0}};
if (ptr_frame_data->mps_sbr_flag) {
cov_count = (f_master_tbl[0] < ptr_frame_data->cov_count)
@@ -1111,7 +1124,13 @@ WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
patch = 0;
while (sb < usb) {
- if (MAX_NUM_PATCHES <= patch) return -1;
+ if (MAX_NUM_PATCHES <= patch) {
+ if (ec_flag) {
+ break;
+ } else {
+ return -1;
+ }
+ }
ptr_frame_data->patch_param.start_subband[patch] = sb;
num_bands_in_patch = goal_sb - sb;
@@ -1147,8 +1166,15 @@ WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
break;
}
- if (num_bands_in_patch <= 0) {
- return -1;
+ if (num_bands_in_patch < 0 && flag_break == 1) {
+ break;
+ }
+
+ if (num_bands_in_patch < 0) {
+ flag_break = 1;
+ continue;
+ } else {
+ flag_break = 0;
}
for (k2 = sb; k2 < sb + num_bands_in_patch; k2++) {
@@ -1156,10 +1182,21 @@ WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
bw_index = 0;
while (k2 >= ptr_invf_band_tbl[bw_index]) {
bw_index++;
- if (bw_index >= MAX_NOISE_COEFFS) return -1;
+ if (bw_index >= MAX_NOISE_COEFFS) {
+ if (ec_flag) {
+ bw_index = MAX_NOISE_COEFFS - 1;
+ break;
+ } else
+ return -1;
+ }
}
- if (bw_index >= MAX_NUM_PATCHES) return -1;
+ if (bw_index >= MAX_NUM_PATCHES) {
+ if (ec_flag)
+ bw_index = MAX_NUM_PATCHES - 1;
+ else
+ return -1;
+ }
bw = bw_array[bw_index];
a0r = bw * alpha_real[k][0];
@@ -1199,99 +1236,110 @@ WORD32 ixheaacd_generate_hf(FLOAT32 ptr_src_buf_real[][64],
}
}
- if (hbe_flag && !sbr_patching_mode) {
- FLOAT32 alpha_real[2], alpha_imag[2];
+ if (NULL != ptr_ph_vocod_buf_real && NULL != ptr_ph_vocod_buf_imag) {
+ if (hbe_flag && !sbr_patching_mode) {
+ FLOAT32 alpha_real[2], alpha_imag[2];
- bw_index = 0, patch = 1;
- if (NULL == ptr_ph_vocod_buf_real || NULL == ptr_ph_vocod_buf_imag)
- return -1;
+ bw_index = 0, patch = 1;
- for (k2 = sub_band_start; k2 < f_master_tbl[num_mf_bands]; k2++) {
- ixheaacd_esbr_calc_co_variance(&str_auto_corr, &ptr_ph_vocod_buf_real[0],
- &ptr_ph_vocod_buf_imag[0], k2, co_var_len);
+ for (k2 = sub_band_start; k2 < f_master_tbl[num_mf_bands]; k2++) {
+ ixheaacd_esbr_calc_co_variance(&str_auto_corr, &ptr_ph_vocod_buf_real[0],
+ &ptr_ph_vocod_buf_imag[0], k2, co_var_len);
- if (str_auto_corr.det == 0.0f) {
- alpha_real[1] = alpha_imag[1] = 0;
- } else {
- fac = 1.0f / str_auto_corr.det;
- alpha_real[1] =
- (str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_real -
- str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_imag -
- str_auto_corr.phi_0_2_real * str_auto_corr.phi_1_1) *
- fac;
- alpha_imag[1] =
- (str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_real +
- str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_imag -
- str_auto_corr.phi_0_2_imag * str_auto_corr.phi_1_1) *
- fac;
- }
+ if (str_auto_corr.det == 0.0f) {
+ alpha_real[1] = alpha_imag[1] = 0;
+ } else {
+ fac = 1.0f / str_auto_corr.det;
+ alpha_real[1] = (str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_real -
+ str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_imag -
+ str_auto_corr.phi_0_2_real * str_auto_corr.phi_1_1) *
+ fac;
+ alpha_imag[1] = (str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_real +
+ str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_imag -
+ str_auto_corr.phi_0_2_imag * str_auto_corr.phi_1_1) *
+ fac;
+ }
- if (str_auto_corr.phi_1_1 == 0) {
- alpha_real[0] = alpha_imag[0] = 0;
- } else {
- fac = 1.0f / str_auto_corr.phi_1_1;
- alpha_real[0] = -(str_auto_corr.phi_0_1_real +
- alpha_real[1] * str_auto_corr.phi_1_2_real +
- alpha_imag[1] * str_auto_corr.phi_1_2_imag) *
- fac;
- alpha_imag[0] = -(str_auto_corr.phi_0_1_imag +
- alpha_imag[1] * str_auto_corr.phi_1_2_real -
- alpha_real[1] * str_auto_corr.phi_1_2_imag) *
- fac;
- }
+ if (str_auto_corr.phi_1_1 == 0) {
+ alpha_real[0] = alpha_imag[0] = 0;
+ } else {
+ fac = 1.0f / str_auto_corr.phi_1_1;
+ alpha_real[0] =
+ -(str_auto_corr.phi_0_1_real + alpha_real[1] * str_auto_corr.phi_1_2_real +
+ alpha_imag[1] * str_auto_corr.phi_1_2_imag) *
+ fac;
+ alpha_imag[0] =
+ -(str_auto_corr.phi_0_1_imag + alpha_imag[1] * str_auto_corr.phi_1_2_real -
+ alpha_real[1] * str_auto_corr.phi_1_2_imag) *
+ fac;
+ }
- if (alpha_real[0] * alpha_real[0] + alpha_imag[0] * alpha_imag[0] >=
- 16.0f ||
- alpha_real[1] * alpha_real[1] + alpha_imag[1] * alpha_imag[1] >=
- 16.0f) {
- alpha_real[0] = 0.0f;
- alpha_imag[0] = 0.0f;
- alpha_real[1] = 0.0f;
- alpha_imag[1] = 0.0f;
- }
+ if (alpha_real[0] * alpha_real[0] + alpha_imag[0] * alpha_imag[0] >= 16.0f ||
+ alpha_real[1] * alpha_real[1] + alpha_imag[1] * alpha_imag[1] >= 16.0f) {
+ alpha_real[0] = 0.0f;
+ alpha_imag[0] = 0.0f;
+ alpha_real[1] = 0.0f;
+ alpha_imag[1] = 0.0f;
+ }
- while (k2 >= ptr_invf_band_tbl[bw_index]) {
- bw_index++;
- if (bw_index >= MAX_NOISE_COEFFS) return -1;
- }
+ while (k2 >= ptr_invf_band_tbl[bw_index]) {
+ bw_index++;
+ if (bw_index >= MAX_NOISE_COEFFS) {
+ if (ec_flag) {
+ bw_index = MAX_NOISE_COEFFS - 1;
+ break;
+ } else
+ return -1;
+ }
+ }
- if (bw_index >= MAX_NUM_PATCHES) return -1;
- bw = bw_array[bw_index];
-
- a0r = bw * alpha_real[0];
- a0i = bw * alpha_imag[0];
- bw *= bw;
- a1r = bw * alpha_real[1];
- a1i = bw * alpha_imag[1];
-
- if (bw > 0.0f) {
- for (i = start_sample; i < end_sample; i++) {
- FLOAT32 real1, imag1, real2, imag2, realTarget, imag_target;
-
- realTarget = ptr_ph_vocod_buf_real[i][k2];
- imag_target = ptr_ph_vocod_buf_imag[i][k2];
- real1 = ptr_ph_vocod_buf_real[i - 1][k2];
- imag1 = ptr_ph_vocod_buf_imag[i - 1][k2];
- real2 = ptr_ph_vocod_buf_real[i - 2][k2];
- imag2 = ptr_ph_vocod_buf_imag[i - 2][k2];
- realTarget +=
- ((a0r * real1 - a0i * imag1) + (a1r * real2 - a1i * imag2));
- imag_target +=
- ((a0i * real1 + a0r * imag1) + (a1i * real2 + a1r * imag2));
-
- ptr_dst_buf_real[i][k2] = realTarget;
- ptr_dst_buf_imag[i][k2] = imag_target;
+ if (bw_index >= MAX_NUM_PATCHES) {
+ if (ec_flag)
+ bw_index = MAX_NUM_PATCHES - 1;
+ else
+ return -1;
}
- } else {
- for (i = start_sample; i < end_sample; i++) {
- ptr_dst_buf_real[i][k2] = ptr_ph_vocod_buf_real[i][k2];
- ptr_dst_buf_imag[i][k2] = ptr_ph_vocod_buf_imag[i][k2];
+ bw = bw_array[bw_index];
+
+ a0r = bw * alpha_real[0];
+ a0i = bw * alpha_imag[0];
+ bw *= bw;
+ a1r = bw * alpha_real[1];
+ a1i = bw * alpha_imag[1];
+
+ if (bw > 0.0f) {
+ for (i = start_sample; i < end_sample; i++) {
+ FLOAT32 real1, imag1, real2, imag2, realTarget, imag_target;
+
+ realTarget = ptr_ph_vocod_buf_real[i][k2];
+ imag_target = ptr_ph_vocod_buf_imag[i][k2];
+ real1 = ptr_ph_vocod_buf_real[i - 1][k2];
+ imag1 = ptr_ph_vocod_buf_imag[i - 1][k2];
+ real2 = ptr_ph_vocod_buf_real[i - 2][k2];
+ imag2 = ptr_ph_vocod_buf_imag[i - 2][k2];
+ realTarget += ((a0r * real1 - a0i * imag1) + (a1r * real2 - a1i * imag2));
+ imag_target += ((a0i * real1 + a0r * imag1) + (a1i * real2 + a1r * imag2));
+
+ ptr_dst_buf_real[i][k2] = realTarget;
+ ptr_dst_buf_imag[i][k2] = imag_target;
+ }
+ } else {
+ for (i = start_sample; i < end_sample; i++) {
+ ptr_dst_buf_real[i][k2] = ptr_ph_vocod_buf_real[i][k2];
+ ptr_dst_buf_imag[i][k2] = ptr_ph_vocod_buf_imag[i][k2];
+ }
}
}
}
}
+ if ((MAX_NUM_PATCHES + 1) <= patch) {
+ if (ec_flag) {
+ patch = MAX_NUM_PATCHES;
+ } else {
+ return -1;
+ }
+ }
ptr_frame_data->patch_param.num_patches = patch;
- if (patch >= (MAX_NUM_PATCHES + 1)) return -1;
for (i = 0; i < num_if_bands; i++) {
bw_array_prev[i] = bw_array[i];
}
diff --git a/decoder/ixheaacd_sbrdecoder.c b/decoder/ixheaacd_sbrdecoder.c
index 5159b11..6bb0801 100644
--- a/decoder/ixheaacd_sbrdecoder.c
+++ b/decoder/ixheaacd_sbrdecoder.c
@@ -27,6 +27,7 @@
#include "ixheaacd_basic_ops40.h"
#include "ixheaacd_basic_ops.h"
#include "ixheaacd_defines.h"
+#include "ixheaacd_error_codes.h"
#include "ixheaacd_intrinsics.h"
#include "ixheaacd_sbr_const.h"
@@ -40,6 +41,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
@@ -69,6 +73,20 @@
#include "ixheaacd_audioobjtypes.h"
+static VOID ixheaacd_ec_set_frame_error_flag(ia_sbr_element_stream_struct *pstr_sbr_element,
+ WORD32 value) {
+ if (pstr_sbr_element != NULL) {
+ switch (value) {
+ case FRAME_ERROR_ALLSLOTS:
+ pstr_sbr_element->frame_error_flag[0] = FRAME_ERROR;
+ pstr_sbr_element->frame_error_flag[1] = FRAME_ERROR;
+ break;
+ default:
+ pstr_sbr_element->frame_error_flag[pstr_sbr_element->use_frame_slot] = value;
+ }
+ }
+}
+
VOID ixheaacd_downmix_to_monosbr(WORD16 *core_sample_buf, WORD32 ch_fac) {
WORD32 i;
WORD16 *ptr1 = &core_sample_buf[0];
@@ -87,7 +105,8 @@ static WORD32 ixheaacd_sbr_dec_reset(ia_sbr_dec_struct *ptr_sbr_dec,
FLAG low_pow_flag,
ixheaacd_misc_tables *pstr_common_tables,
WORD32 pitch_in_bins,
- WORD32 audio_object_type) {
+ WORD32 audio_object_type,
+ WORD32 *ptr_work_buf_core) {
WORD32 old_lsb, new_lsb;
WORD32 l;
WORD32 err = 0;
@@ -131,8 +150,7 @@ static WORD32 ixheaacd_sbr_dec_reset(ia_sbr_dec_struct *ptr_sbr_dec,
}
}
}
-
- if (usac_flag) {
+ if (1) {
WORD32 start_band;
WORD32 stop_band;
WORD32 start_slot = SBR_HF_ADJ_OFFSET;
@@ -140,7 +158,7 @@ static WORD32 ixheaacd_sbr_dec_reset(ia_sbr_dec_struct *ptr_sbr_dec,
start_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
stop_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
- if (!hbe_flag) {
+ if (usac_flag && !hbe_flag) {
for (l = 0; l < SBR_HF_ADJ_OFFSET; l++) {
for (k = start_band; k < stop_band; k++) {
ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
@@ -154,13 +172,21 @@ static WORD32 ixheaacd_sbr_dec_reset(ia_sbr_dec_struct *ptr_sbr_dec,
}
}
}
- if (hbe_flag && ptr_sbr_dec->p_hbe_txposer != NULL) {
+ if (ptr_sbr_dec->p_hbe_txposer != NULL && (usac_flag || hbe_flag)) {
WORD32 k, i;
- WORD32 err = ixheaacd_qmf_hbe_data_reinit(
- ptr_sbr_dec->p_hbe_txposer,
- ptr_header_data->pstr_freq_band_data->freq_band_table,
- ptr_header_data->pstr_freq_band_data->num_sf_bands,
- ptr_header_data->is_usf_4);
+ WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
+ if (dft_hbe_flag == 1) {
+ err = ixheaacd_dft_hbe_data_reinit(
+ ptr_sbr_dec->p_hbe_txposer,
+ ptr_header_data->pstr_freq_band_data->freq_band_table,
+ ptr_header_data->pstr_freq_band_data->num_sf_bands);
+ } else {
+ err = ixheaacd_qmf_hbe_data_reinit(
+ ptr_sbr_dec->p_hbe_txposer,
+ ptr_header_data->pstr_freq_band_data->freq_band_table,
+ ptr_header_data->pstr_freq_band_data->num_sf_bands,
+ ptr_header_data->is_usf_4);
+ }
if (err) return err;
for (k = 0; k < 2; k++) {
@@ -178,14 +204,26 @@ static WORD32 ixheaacd_sbr_dec_reset(ia_sbr_dec_struct *ptr_sbr_dec,
ptr_sbr_dec->ph_vocod_qmf_imag[num_time_slots + i],
64 * sizeof(FLOAT32));
}
-
- err = ixheaacd_qmf_hbe_apply(
- ptr_sbr_dec->p_hbe_txposer,
- ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
- ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
- ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
- ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins);
+ if (dft_hbe_flag == 1) {
+ err = ixheaacd_dft_hbe_apply(
+ ptr_sbr_dec->p_hbe_txposer,
+ ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
+ ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
+ ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
+ ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
+ (FLOAT32 *)ptr_work_buf_core);
+ if (err)
+ return err;
+ } else {
+ err = ixheaacd_qmf_hbe_apply(
+ ptr_sbr_dec->p_hbe_txposer,
+ ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
+ ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
+ ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
+ ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
+ ptr_header_data);
if (err) return err;
+ }
if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
ixheaacd_hbe_repl_spec(&ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
@@ -237,14 +275,48 @@ VOID ixheaacd_prepare_upsamp(ia_sbr_header_data_struct **ptr_header_data,
return;
}
+static VOID ixheaacd_copy_prev_ps_params(ia_ps_dec_struct *ps_config_curr,
+ ia_ps_dec_config_struct *ps_config_prev,
+ WORD32 frame_status) {
+ if (frame_status == 0) {
+ ps_config_curr->enable_iid = ps_config_prev->enable_iid;
+ ps_config_curr->iid_mode = ps_config_prev->iid_mode;
+ ps_config_curr->enable_icc = ps_config_prev->enable_icc;
+ ps_config_curr->icc_mode = ps_config_prev->icc_mode;
+ ps_config_curr->frame_class = ps_config_prev->frame_class;
+ ps_config_curr->freq_res_ipd = ps_config_prev->freq_res_ipd;
+ memcpy(ps_config_curr->border_position, ps_config_prev->border_position,
+ sizeof(ps_config_curr->border_position));
+ memcpy(ps_config_curr->iid_dt, ps_config_prev->iid_dt, sizeof(ps_config_curr->iid_dt));
+ memcpy(ps_config_curr->iid_par_table, ps_config_prev->iid_par_table,
+ sizeof(ps_config_curr->iid_par_table));
+ memcpy(ps_config_curr->icc_dt, ps_config_prev->icc_dt, sizeof(ps_config_curr->icc_dt));
+ memcpy(ps_config_curr->icc_par_table, ps_config_prev->icc_par_table,
+ sizeof(ps_config_curr->icc_par_table));
+ } else {
+ ps_config_prev->enable_iid = ps_config_curr->enable_iid;
+ ps_config_prev->iid_mode = ps_config_curr->iid_mode;
+ ps_config_prev->enable_icc = ps_config_curr->enable_icc;
+ ps_config_prev->icc_mode = ps_config_curr->icc_mode;
+ ps_config_prev->frame_class = ps_config_curr->frame_class;
+ ps_config_prev->freq_res_ipd = ps_config_curr->freq_res_ipd;
+ memcpy(ps_config_prev->border_position, ps_config_curr->border_position,
+ sizeof(ps_config_prev->border_position));
+ memcpy(ps_config_prev->iid_dt, ps_config_curr->iid_dt, sizeof(ps_config_prev->iid_dt));
+ memcpy(ps_config_prev->iid_par_table, ps_config_curr->iid_par_table,
+ sizeof(ps_config_prev->iid_par_table));
+ memcpy(ps_config_prev->icc_dt, ps_config_curr->icc_dt, sizeof(ps_config_prev->icc_dt));
+ memcpy(ps_config_prev->icc_par_table, ps_config_curr->icc_par_table,
+ sizeof(ps_config_prev->icc_par_table));
+ }
+}
IA_ERRORCODE ixheaacd_applysbr(
- ia_handle_sbr_dec_inst_struct self,
- ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream, WORD16 *core_sample_buf,
- WORD16 *codec_num_channels, FLAG frame_status, FLAG down_samp_flag,
- FLAG down_mix_flag, ia_sbr_scr_struct *sbr_scratch_struct, WORD32 ps_enable,
- WORD32 ch_fac, WORD32 slot_element, ia_bit_buf_struct *it_bit_buff,
- ia_drc_dec_struct *pstr_drc_dec, WORD eld_sbr_flag,
- WORD32 audio_object_type, WORD32 init_flag, WORD32 ldmps_present, WORD32 frame_size) {
+ ia_handle_sbr_dec_inst_struct self, ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream,
+ WORD16 *core_sample_buf, WORD16 *codec_num_channels, FLAG frame_status, FLAG down_samp_flag,
+ FLAG down_mix_flag, ia_sbr_scr_struct *sbr_scratch_struct, WORD32 ps_enable, WORD32 ch_fac,
+ WORD32 slot_element, ia_bit_buf_struct *it_bit_buff, ia_drc_dec_struct *pstr_drc_dec,
+ WORD eld_sbr_flag, WORD32 audio_object_type, WORD32 init_flag, WORD32 ldmps_present,
+ WORD32 frame_size, WORD32 heaac_mps_present, WORD32 ec_flag, FLAG first_frame) {
WORD32 k;
FLAG prev_ps_flag = 0;
FLAG ps_flag = 0;
@@ -269,503 +341,972 @@ IA_ERRORCODE ixheaacd_applysbr(
(ia_sbr_header_data_struct *)(&self->str_sbr_dflt_header);
ia_sbr_frame_info_data_struct *ptr_frame_data[2];
+ self->num_delay_frames = 1;
self->ptr_mps_data = NULL;
- for (k = 0; k < 2; k++) {
- ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
+ if (!ec_flag || !usac_flag) {
+ for (k = 0; k < 2; k++) {
+ ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
- pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
+ pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
- ptr_header_data[k] = self->pstr_sbr_header[k];
+ ptr_header_data[k] = self->pstr_sbr_header[k];
- if (audio_object_type == AOT_ER_AAC_ELD) {
- ptr_frame_data[k]->eld_sbr_flag = eld_sbr_flag;
- ptr_frame_data[k]->num_time_slots = ptr_header_data[0]->num_time_slots;
- }
+ if (audio_object_type == AOT_ER_AAC_ELD) {
+ ptr_frame_data[k]->eld_sbr_flag = eld_sbr_flag;
+ ptr_frame_data[k]->num_time_slots = ptr_header_data[0]->num_time_slots;
+ }
- ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
- ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
- ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
- ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
- ptr_frame_data[k]->sbr_mode = self->sbr_mode;
+ ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
+ ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
+ ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
+ ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
+ ptr_frame_data[k]->sbr_mode = self->sbr_mode;
- if (!usac_flag) {
- ptr_frame_data[k]->usac_independency_flag = 0;
- ptr_frame_data[k]->mps_sbr_flag = 0;
- ptr_frame_data[k]->stereo_config_idx = -1;
- ptr_frame_data[k]->inter_tes_flag = 0;
- ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ if (!usac_flag) {
+ ptr_frame_data[k]->usac_independency_flag = 0;
+ ptr_frame_data[k]->mps_sbr_flag = 0;
+ ptr_frame_data[k]->stereo_config_idx = -1;
+ ptr_frame_data[k]->inter_tes_flag = 0;
+ ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ }
}
- }
- if (init_flag) {
- ptr_frame_data[1]->reset_flag = 1;
- ptr_frame_data[0]->reset_flag = 1;
- }
+ if (init_flag) {
+ ptr_frame_data[1]->reset_flag = 1;
+ ptr_frame_data[0]->reset_flag = 1;
+ }
- for (k = 0; k < *codec_num_channels; k++) {
- ptr_header_data[k]->usac_flag = self->aot_usac_flag;
+ for (k = 0; k < *codec_num_channels; k++) {
+ ptr_header_data[k]->usac_flag = self->aot_usac_flag;
+ ptr_header_data[k]->enh_sbr = self->enh_sbr;
+ ptr_header_data[k]->enh_sbr_ps =
+ ((self->enh_sbr_ps) | (ptr_header_data[k]->channel_mode == PS_STEREO));
- ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
- ptr_header_data[k]->hbe_flag = self->hbe_flag;
- ptr_header_data[k]->pvc_flag = self->pvc_flag;
+ ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
+ ptr_header_data[k]->hbe_flag = self->hbe_flag;
+ ptr_header_data[k]->pvc_flag = self->pvc_flag;
- if (!usac_flag) {
- ptr_header_data[k]->usac_independency_flag = 0;
- ptr_header_data[k]->hbe_flag = 0;
- ptr_header_data[k]->pvc_flag = 0;
+ if (!usac_flag) {
+ ptr_header_data[k]->usac_independency_flag = 0;
+ ptr_header_data[k]->hbe_flag = 0;
+ ptr_header_data[k]->pvc_flag = 0;
+ }
+ ptr_header_data[k]->esbr_hq = self->esbr_hq;
+ if (!usac_flag &&
+ (!(audio_object_type == AOT_ER_AAC_ELD || audio_object_type == AOT_ER_AAC_LD))) {
+ ptr_header_data[k]->hbe_flag = 1;
+ }
}
- }
- initial_sync_state = ptr_header_data[0]->sync_state;
+ initial_sync_state = ptr_header_data[0]->sync_state;
- low_pow_flag = !usac_flag;
- self->pstr_sbr_tables->sbr_rand_ph =
- self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
+ low_pow_flag = !usac_flag;
+ self->pstr_sbr_tables->sbr_rand_ph = self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
- if (ps_enable) {
- if (num_channels == 1) {
- low_pow_flag = 0;
+ if (ps_enable) {
+ if (num_channels == 1) {
+ low_pow_flag = 0;
+ }
}
- }
-
- if (audio_object_type == AOT_ER_AAC_ELD) {
- low_pow_flag = 0;
- }
- prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
+ if (audio_object_type == AOT_ER_AAC_ELD) {
+ low_pow_flag = 0;
+ }
- if (ps_enable) prev_ps_flag = (ptr_header_data[0]->channel_mode == PS_STEREO);
+ prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
- ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
+ if (ps_enable) prev_ps_flag = (ptr_header_data[0]->channel_mode == PS_STEREO);
- if (p_sbr_bit_stream->no_elements == 0) {
- frame_status = 0;
- ptr_header_data[0]->sync_state = UPSAMPLING;
- if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
- }
+ ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
- if ((usac_flag)) {
- if ((p_sbr_bit_stream->no_elements) &&
- (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
- num_elements = p_sbr_bit_stream->no_elements;
- } else {
- num_elements = 0;
+ if (p_sbr_bit_stream->no_elements == 0) {
+ frame_status = 0;
+ ptr_header_data[0]->sync_state = UPSAMPLING;
+ if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
}
- }
- for (k = 0; k < num_elements; k++) {
- struct ia_bit_buf_struct local_bit_buf = {0};
- ia_sbr_element_stream_struct *ptr_bit_str_ele =
- &p_sbr_bit_stream->str_sbr_ele[k];
- ele_channels =
- (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
+ if ((usac_flag)) {
+ if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
+ num_elements = p_sbr_bit_stream->no_elements;
+ } else {
+ num_elements = 0;
+ }
+ }
- switch (ptr_bit_str_ele->sbr_ele_id) {
- case SBR_ID_SCE:
- case SBR_ID_CCE:
- if (num_channels == 2) {
- dual_mono = 1;
- }
- stereo = 0;
- break;
- case SBR_ID_CPE:
- stereo = 1;
- ptr_header_data[1] = ptr_header_data[0];
+ for (k = 0; k < num_elements; k++) {
+ struct ia_bit_buf_struct local_bit_buf = {0};
+ ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
+ ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
+ if (!frame_status && ptr_header_data[k]->sync_state == SBR_ACTIVE && ec_flag) {
+ ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_ERROR_ALLSLOTS);
+ }
- memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
- sizeof(ia_sbr_header_data_struct));
- break;
- default:
- frame_status = 0;
- }
+ switch (ptr_bit_str_ele->sbr_ele_id) {
+ case SBR_ID_SCE:
+ case SBR_ID_CCE:
+ if (num_channels == 2) {
+ dual_mono = 1;
+ }
+ stereo = 0;
+ break;
+ case SBR_ID_CPE:
+ stereo = 1;
+ ptr_header_data[1] = ptr_header_data[0];
+
+ memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
+ sizeof(ia_sbr_header_data_struct));
+ break;
+ default:
+ frame_status = 0;
+ }
- if (frame_status) {
- if (!usac_flag) {
- ixheaacd_create_init_bit_buf(&local_bit_buf,
- (UWORD8 *)ptr_bit_str_ele->ptr_sbr_data,
- ptr_bit_str_ele->size_payload);
+ if (frame_status) {
+ if (!usac_flag) {
+ if (!(audio_object_type == AOT_ER_AAC_LD || audio_object_type == AOT_ER_AAC_ELD)) {
+ WORD8 tmp[1024];
+ WORD32 tmp_payload;
+ memcpy(&tmp[0], ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->size_payload);
+ memcpy(ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->ptr_prev_sbr_data,
+ ptr_bit_str_ele->prev_size_payload);
+ memcpy(ptr_bit_str_ele->ptr_prev_sbr_data, &tmp[0], ptr_bit_str_ele->size_payload);
+ tmp_payload = ptr_bit_str_ele->size_payload;
+ ptr_bit_str_ele->size_payload = ptr_bit_str_ele->prev_size_payload;
+ ptr_bit_str_ele->prev_size_payload = tmp_payload;
+ }
+ if (!ptr_bit_str_ele->size_payload) {
+ continue;
+ }
- it_bit_buff = &local_bit_buf;
- it_bit_buff->xaac_jmp_buf = self->xaac_jmp_buf;
- total_bits_left = it_bit_buff->cnt_bits;
+ ixheaacd_create_init_bit_buf(&local_bit_buf, (UWORD8 *)ptr_bit_str_ele->ptr_sbr_data,
+ ptr_bit_str_ele->size_payload);
+ it_bit_buff = &local_bit_buf;
+ it_bit_buff->xaac_jmp_buf = self->xaac_jmp_buf;
+ total_bits_left = it_bit_buff->cnt_bits;
- if (audio_object_type == AOT_ER_AAC_ELD) {
- if (eld_sbr_flag != 1) {
+ if (audio_object_type == AOT_ER_AAC_ELD) {
+ if (eld_sbr_flag != 1) {
+ ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
+ }
+ } else {
ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
}
- } else {
- ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
}
- }
- if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
- WORD32 crc_bits = 0;
- WORD32 crc_check_flag = 0;
- crc_check_flag = 1;
- crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) +
- (4 - SBR_CYC_REDCY_CHK_BITS));
-
- if (crc_bits < 0) {
- crc_check_flag = 0;
- frame_status = 0;
+ if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
+ WORD32 crc_bits = 0;
+ WORD32 crc_check_flag = 0;
+ crc_check_flag = 1;
+ crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) + (4 - SBR_CYC_REDCY_CHK_BITS));
+
+ if (crc_bits < 0) {
+ crc_check_flag = 0;
+ frame_status = 0;
+ }
+ if (crc_check_flag) frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
}
- if (crc_check_flag)
- frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
- }
- if (!usac_flag) header_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
+ if (!usac_flag) header_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
- if (audio_object_type != AOT_ER_AAC_ELD) {
- if (header_flag) {
- header_flag = ixheaacd_sbr_read_header_data(
- ptr_header_data[k], it_bit_buff, stereo, ptr_sbr_dflt_header);
- if (usac_flag) {
- if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
- (ptr_header_data[k]->pvc_mode != 0)) {
- self->ptr_pvc_data_str->prev_pvc_id = 0;
+ if (audio_object_type != AOT_ER_AAC_ELD) {
+ if (header_flag) {
+ header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
+ ptr_sbr_dflt_header);
+ if (usac_flag) {
+ if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
+ (ptr_header_data[k]->pvc_mode != 0)) {
+ self->ptr_pvc_data_str->prev_pvc_id = 0;
+ }
+ self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
+ if (ptr_header_data[k]->pvc_mode == 0) {
+ ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ } else {
+ ptr_frame_data[k]->sbr_mode = PVC_SBR;
+ }
}
- self->ptr_pvc_data_str->prev_pvc_mode =
- ptr_header_data[k]->pvc_mode;
- if (ptr_header_data[k]->pvc_mode == 0) {
- ptr_frame_data[k]->sbr_mode = ORIG_SBR;
- } else {
- ptr_frame_data[k]->sbr_mode = PVC_SBR;
+ if (header_flag == SBR_RESET) {
+ err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
+
+ self->pstr_common_tables);
+ if (!err) {
+ WORD32 lr;
+ WORD32 lr1 = ps_enable ? 2 : num_channels;
+ for (lr = 0; lr < lr1; lr++) {
+ if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
+ if ((SBR_NOT_INITIALIZED == ptr_header_data[lr]->sync_state) && !usac_flag) {
+ ptr_frame_data[lr]->sbr_patching_mode = 1;
+ ptr_frame_data[lr]->over_sampling_flag = 0;
+ ptr_frame_data[lr]->pitch_in_bins = 0;
+ ptr_header_data[lr]->pre_proc_flag = 0;
+ }
+ err |= ixheaacd_sbr_dec_reset(
+ &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
+ self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins,
+ audio_object_type, sbr_scratch_struct->ptr_work_buf_core);
+ if (err < 0) return err;
+ }
+ }
+
+ if (err == 0) {
+ ptr_header_data[k]->sync_state = SBR_ACTIVE;
+ }
}
}
- if (header_flag == SBR_RESET) {
- err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
+ } else {
+ if (header_flag) {
+ header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
+ ptr_sbr_dflt_header);
+ if (usac_flag) {
+ if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
+ (ptr_header_data[k]->pvc_mode != 0)) {
+ self->ptr_pvc_data_str->prev_pvc_id = 0;
+ }
+ self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
+ if (ptr_header_data[k]->pvc_mode == 0) {
+ ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ } else {
+ ptr_frame_data[k]->sbr_mode = PVC_SBR;
+ }
+ }
- self->pstr_common_tables);
- if (!err) {
- WORD32 lr;
- WORD32 lr1 = ps_enable ? 2 : num_channels;
- for (lr = 0; lr < lr1; lr++) {
- ptr_frame_data[lr]->reset_flag = 1;
+ if (header_flag == SBR_RESET) {
+ err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
+ self->pstr_common_tables);
+ if (err) {
+ return err;
+ }
+ }
+ }
+
+ {
+ WORD32 lr;
+ WORD32 lr1 = ps_enable ? 2 : num_channels;
+ for (lr = 0; lr < lr1; lr++) {
+ if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
+ if (ptr_header_data[k]->status) {
err |= ixheaacd_sbr_dec_reset(
- &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k],
- low_pow_flag, self->pstr_common_tables,
- ptr_frame_data[k]->pitch_in_bins, audio_object_type);
+ &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
+ self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins, audio_object_type,
+ sbr_scratch_struct->ptr_work_buf_core);
if (err < 0) return err;
}
}
+ ptr_header_data[k]->status = 0;
+ }
- if (err == 0) {
- ptr_header_data[k]->sync_state = SBR_ACTIVE;
- }
+ if (err == 0) {
+ ptr_header_data[k]->sync_state = SBR_ACTIVE;
}
}
- } else {
- if (header_flag) {
- header_flag = ixheaacd_sbr_read_header_data(
- ptr_header_data[k], it_bit_buff, stereo, ptr_sbr_dflt_header);
- if (usac_flag) {
- if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
- (ptr_header_data[k]->pvc_mode != 0)) {
- self->ptr_pvc_data_str->prev_pvc_id = 0;
- }
- self->ptr_pvc_data_str->prev_pvc_mode =
- ptr_header_data[k]->pvc_mode;
- if (ptr_header_data[k]->pvc_mode == 0) {
- ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ }
+
+ if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
+ WORD32 lr1 = ps_enable ? 2 : num_channels;
+ ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
+ if (err) return err;
+ }
+
+ if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
+ if (stereo) {
+ frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data, it_bit_buff,
+ self->pstr_sbr_tables, audio_object_type);
+ if (frame_status < 0) return frame_status;
+ } else {
+ if (ps_enable) {
+ if (down_mix_flag) {
+ self->pstr_ps_stereo_dec->force_mono = 1;
} else {
- ptr_frame_data[k]->sbr_mode = PVC_SBR;
+ self->pstr_ps_stereo_dec->force_mono = 0;
}
+ } else {
+ self->pstr_ps_stereo_dec = 0;
}
-
- if (header_flag == SBR_RESET) {
- err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
-
- self->pstr_common_tables);
- if (err) {
- return err;
+ if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
+ frame_status = ixheaacd_sbr_read_sce(
+ ptr_header_data[k], ptr_frame_data[k], self->pstr_ps_stereo_dec, it_bit_buff,
+ self->pstr_sbr_tables, audio_object_type, ec_flag);
+ if (frame_status < 0) return frame_status;
+ if (ec_flag && self->pstr_ps_stereo_dec != NULL) {
+ ixheaacd_copy_prev_ps_params(self->pstr_ps_stereo_dec, &self->str_ps_config_prev,
+ frame_status);
}
+ } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
+ frame_status = ixheaacd_sbr_read_pvc_sce(ptr_frame_data[k], it_bit_buff, 0,
+ self->ptr_pvc_data_str,
+ self->pstr_sbr_tables, ptr_header_data[k]);
+ if (frame_status < 0) return frame_status;
}
}
-
- {
- WORD32 lr;
- WORD32 lr1 = ps_enable ? 2 : num_channels;
- for (lr = 0; lr < lr1; lr++) {
- if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
- if (ptr_header_data[k]->status) {
- err |= ixheaacd_sbr_dec_reset(
- &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k],
- low_pow_flag, self->pstr_common_tables,
- ptr_frame_data[k]->pitch_in_bins, audio_object_type);
- if (err < 0) return err;
+ if (audio_object_type != AOT_ER_AAC_ELD) {
+ WORD32 total_bits_read;
+ total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
+ if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
+ total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
+ frame_status = 0;
+ }
+ if (ec_flag) {
+ if (!frame_status) {
+ ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_ERROR);
+ } else {
+ ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_OK);
}
}
- ptr_header_data[k]->status = 0;
}
-
- if (err == 0) {
- ptr_header_data[k]->sync_state = SBR_ACTIVE;
+ }
+ if ((ldmps_present == 1) && (it_bit_buff)) {
+ WORD32 bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
+ self->ptr_mps_data = (WORD8 *)it_bit_buff->ptr_read_next;
+ self->left_mps_bits = (total_bits_left - bits_decoded);
+ self->mps_bits_pos = it_bit_buff->bit_pos;
+ }
+ if (ec_flag) {
+ if (frame_status && !init_flag) {
+ ptr_bit_str_ele->use_frame_slot =
+ (ptr_bit_str_ele->use_frame_slot + 1) % (self->num_delay_frames + 1);
+ }
+ if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
+ ptr_header_data[k]->err_flag =
+ ptr_bit_str_ele->frame_error_flag[ptr_bit_str_ele->use_frame_slot];
}
}
}
- if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
- WORD32 lr1 = ps_enable ? 2 : num_channels;
- ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
- if (err) return err;
+ if (!usac_flag) {
+ if (!frame_status || (ptr_header_data[0]->sync_state != SBR_ACTIVE) ||
+ ptr_header_data[0]->err_flag) {
+ ptr_header_data[0]->err_flag = 1;
+ stereo = (num_channels == 2) ? 1 : 0;
+ if (ptr_header_data[0]->channel_mode == 0) {
+ ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
+ }
+ }
+
+ if (!(stereo || dual_mono)) {
+ ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
+ ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
+ }
+
+ if (ptr_header_data[0]->sync_state == SBR_NOT_INITIALIZED && !ec_flag) {
+ WORD32 lr1 = ps_enable ? 2 : num_channels;
+ ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
+ }
}
- if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
+ if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
+ if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
+ err = ixheaacd_dec_sbrdata_for_pvc(ptr_header_data[0], ptr_frame_data[0],
+ pstr_sbr_channel[0]->pstr_prev_frame_data,
+ audio_object_type);
+ if (err) return err;
+ } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
+ err = ixheaacd_dec_sbrdata(
+ ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
+ pstr_sbr_channel[0]->pstr_prev_frame_data,
+ (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
+ (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data : NULL,
+ self->pstr_common_tables, ldmps_present, audio_object_type, ec_flag);
+
+ if (err) return err;
+ }
+
+ if (ptr_header_data[0]->channel_mode == PS_STEREO &&
+ (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)) {
+ ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, frame_size);
+ ps_flag = 1;
+ self->ps_present = ps_flag;
+ }
+ if (ptr_header_data[0]->enh_sbr_ps) {
+ ps_flag = 1;
+ self->ps_present = ps_flag;
+ }
+ ptr_frame_data[0]->max_qmf_subband_aac =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
if (stereo) {
- frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data,
- it_bit_buff, self->pstr_sbr_tables,
- audio_object_type);
- } else {
- if (ps_enable) {
- if (down_mix_flag) {
- self->pstr_ps_stereo_dec->force_mono = 1;
- } else {
- self->pstr_ps_stereo_dec->force_mono = 0;
- }
- } else {
- self->pstr_ps_stereo_dec = 0;
- }
- if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
- frame_status = ixheaacd_sbr_read_sce(
- ptr_header_data[k], ptr_frame_data[k], self->pstr_ps_stereo_dec,
- it_bit_buff, self->pstr_sbr_tables, audio_object_type);
- if (frame_status < 0) return frame_status;
- } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
- frame_status = ixheaacd_sbr_read_pvc_sce(
- ptr_frame_data[k], it_bit_buff, 0, self->ptr_pvc_data_str,
- self->pstr_sbr_tables, ptr_header_data[k]);
- if (frame_status < 0) return frame_status;
+ ptr_frame_data[1]->max_qmf_subband_aac =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ }
+ if (ldmps_present == 1) {
+ ptr_frame_data[0]->rate = 1;
+ if (stereo) {
+ ptr_frame_data[1]->rate = 1;
}
}
+ }
+ if (audio_object_type == AOT_ER_AAC_ELD && ec_flag) {
+ if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
+ ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
+ }
+ } else {
if (audio_object_type != AOT_ER_AAC_ELD) {
- WORD32 total_bits_read;
- total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
- if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
- total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
- frame_status = 0;
+ if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
+ ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
}
+ } else {
+ ptr_header_data[0]->sync_state = SBR_ACTIVE;
}
}
- if ((ldmps_present == 1) && (it_bit_buff)) {
- WORD32 bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
- self->ptr_mps_data = (WORD8 *)it_bit_buff->ptr_read_next;
- self->left_mps_bits = (total_bits_left - bits_decoded);
- self->mps_bits_pos = it_bit_buff->bit_pos;
- }
- }
- if (!usac_flag) {
- if (!frame_status || (ptr_header_data[0]->sync_state != SBR_ACTIVE) ||
- ptr_header_data[0]->err_flag) {
- ptr_header_data[0]->err_flag = 1;
- stereo = (num_channels == 2) ? 1 : 0;
- if (ptr_header_data[0]->channel_mode == 0) {
- ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
- }
+ if ((num_channels == 2) && !(stereo || dual_mono)) {
+ ixheaacd_downmix_to_monosbr(&core_sample_buf[slot_element], ch_fac);
}
- if (!(stereo || dual_mono)) {
- ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
- ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
- }
+ if ((!prev_stereo && !prev_ps_flag) && (ps_flag)) {
+ WORD32 copy_size;
+ if (down_samp_flag)
+ copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
+ else
+ copy_size = QMF_FILTER_STATE_SYN_SIZE;
- if (ptr_header_data[0]->sync_state == SBR_NOT_INITIALIZED) {
- WORD32 lr1 = ps_enable ? 2 : num_channels;
- ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ copy_size * sizeof(WORD16));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
}
- }
- if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
- if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
- err = ixheaacd_dec_sbrdata_for_pvc(
- ptr_header_data[0], ptr_frame_data[0],
- pstr_sbr_channel[0]->pstr_prev_frame_data);
- if (err) return err;
- } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
- err = ixheaacd_dec_sbrdata(
- ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
- pstr_sbr_channel[0]->pstr_prev_frame_data,
- (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
- (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data
- : NULL,
- self->pstr_common_tables, ldmps_present);
+ if ((!prev_stereo && stereo && (num_channels == 2)) &&
+ (audio_object_type != AOT_ER_AAC_ELD)) {
+ WORD32 copy_size;
+ if (down_samp_flag)
+ copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
+ else
+ copy_size = QMF_FILTER_STATE_SYN_SIZE;
- if (err) return err;
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ copy_size * sizeof(WORD16));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
+
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
+ pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
+ QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
+
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
+ pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
+ MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
+ }
+ pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
+ if (self->pstr_ps_stereo_dec != NULL && (ps_enable || self->enh_sbr_ps)) {
+ self->pstr_ps_stereo_dec->pp_qmf_buf_real[0] =
+ pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real;
+ self->pstr_ps_stereo_dec->pp_qmf_buf_imag[0] =
+ pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag;
+ self->pstr_ps_stereo_dec->pp_qmf_buf_real[1] =
+ pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real;
+ self->pstr_ps_stereo_dec->pp_qmf_buf_imag[1] =
+ pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag;
+ self->pstr_ps_stereo_dec->time_sample_buf[0] = self->time_sample_buf[0];
+ self->pstr_ps_stereo_dec->time_sample_buf[1] = self->time_sample_buf[1];
}
+ } else {
+ for (k = 0; k < 2; k++) {
+ ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
+
+ pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
- if (ptr_header_data[0]->channel_mode == PS_STEREO &&
- (audio_object_type != AOT_ER_AAC_ELD &&
- audio_object_type != AOT_ER_AAC_LD)) {
- ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, frame_size);
- ps_flag = 1;
- self->ps_present = ps_flag;
+ ptr_header_data[k] = self->pstr_sbr_header[k];
+ ptr_header_data[k]->usac_flag = self->aot_usac_flag;
}
- ptr_frame_data[0]->max_qmf_subband_aac =
- ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
- if (stereo) {
- ptr_frame_data[1]->max_qmf_subband_aac =
- ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
+ num_elements = p_sbr_bit_stream->no_elements;
+ } else {
+ num_elements = 0;
}
- if (ldmps_present == 1) {
- ptr_frame_data[0]->rate = 1;
- if (stereo) {
- ptr_frame_data[1]->rate = 1;
+
+ for (k = 0; k < num_elements; k++) {
+ ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
+ ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
+ {
+ switch (ptr_bit_str_ele->sbr_ele_id) {
+ case SBR_ID_SCE:
+ case SBR_ID_CCE:
+ if (num_channels == 2) {
+ dual_mono = 1;
+ }
+ stereo = 0;
+ break;
+ case SBR_ID_CPE:
+ stereo = 1;
+ ptr_header_data[1] = ptr_header_data[0];
+
+ memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
+ sizeof(ia_sbr_header_data_struct));
+ break;
+ default:
+ frame_status = 0;
+ }
}
}
}
- if (audio_object_type != AOT_ER_AAC_ELD) {
- if ((initial_sync_state == SBR_NOT_INITIALIZED) &&
- ptr_header_data[0]->err_flag) {
- ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
+ if (ec_flag) {
+ for (k = 0; k < 2; k++) {
+ if (pstr_sbr_channel[k]->str_sbr_dec.band_count == 0) {
+ pstr_sbr_channel[k]->str_sbr_dec.band_count =
+ pstr_sbr_channel[k]->str_sbr_dec.str_codec_qmf_bank.no_channels;
+ }
}
- } else {
- ptr_header_data[0]->sync_state = SBR_ACTIVE;
}
-
- if ((num_channels == 2) && !(stereo || dual_mono)) {
- ixheaacd_downmix_to_monosbr(&core_sample_buf[slot_element], ch_fac);
+ if (ec_flag && usac_flag && !first_frame && !self->sbr_parse_complete) {
+ return IA_FATAL_ERROR;
}
+ if (!ec_flag || !first_frame || init_flag) {
+ if (pstr_drc_dec == NULL) {
+ WORD32 err_code = 0;
+ err_code = ixheaacd_sbr_dec(
+ &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
+ ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
+ &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
+ &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
+ (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
+ sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
+ ch_fac, self->ptr_pvc_data_str, 0, NULL, audio_object_type, ldmps_present, self,
+ heaac_mps_present, ec_flag);
+ if (err_code) return err_code;
+ if (!self->enh_sbr_ps) {
+ if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag &&
+ ch_fac != 2) {
+ ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
+ }
+ } else {
+ if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
+ ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
+ }
+ }
+ } else {
+ WORD32 err_code = 0;
+ err_code = ixheaacd_sbr_dec(
+ &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
+ ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
+ &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
+ &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
+ (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
+ sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
+ ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
+ pstr_drc_dec->str_drc_channel_data[0].drc_factors_sbr, audio_object_type, ldmps_present,
+ self, heaac_mps_present, ec_flag);
+ if (err_code) return err_code;
+ if (!self->enh_sbr_ps) {
+ if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag &&
+ num_channels != 2) {
+ ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
+ }
+ } else {
+ if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
+ ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
+ }
+ }
+ }
- if ((!prev_stereo && !prev_ps_flag) && (ps_flag)) {
- WORD32 copy_size;
- if (down_samp_flag)
- copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
- else
- copy_size = QMF_FILTER_STATE_SYN_SIZE;
+ if (!down_mix_flag && (stereo || dual_mono) && (num_channels == 2)) {
+ pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
- memcpy(
- pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
- pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
- copy_size * sizeof(WORD16));
+ if (ele_channels == 1 && usac_flag) {
+ WORD32 err_code =
+ ixheaacd_esbr_dec(&pstr_sbr_channel[1]->str_sbr_dec, ptr_header_data[1],
+ ptr_frame_data[1], (ptr_header_data[1]->sync_state == SBR_ACTIVE),
+ low_pow_flag, self->pstr_sbr_tables, ch_fac);
+ if (err_code) return err_code;
+ } else {
+ if (pstr_drc_dec == NULL) {
+ WORD32 err_code = ixheaacd_sbr_dec(
+ &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
+ ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
+ NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
+ sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
+ self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, 0, NULL,
+ audio_object_type, ldmps_present, self, heaac_mps_present, ec_flag);
+ if (err_code) return err_code;
+ if (!self->enh_sbr_ps) {
+ if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
+ !ptr_frame_data[0]->mps_sbr_flag) {
+ ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ }
+ } else {
+ if (ptr_header_data[1]->sync_state == SBR_ACTIVE) {
+ ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ }
+ }
+ } else {
+ WORD32 err_code = ixheaacd_sbr_dec(
+ &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
+ ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
+ NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
+ sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
+ self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
+ pstr_drc_dec->str_drc_channel_data[1].drc_factors_sbr, audio_object_type,
+ ldmps_present, self, heaac_mps_present, ec_flag);
+ if (err_code) return err_code;
+ if (!self->enh_sbr_ps) {
+ if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
+ !ptr_frame_data[0]->mps_sbr_flag) {
+ ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ }
+ } else {
+ if (ptr_header_data[1]->sync_state == SBR_ACTIVE) {
+ ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
+ }
+ }
+ }
+ }
- pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
- pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
- }
+ } else {
+ if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)
- if ((!prev_stereo && stereo && (num_channels == 2)) &&
- (audio_object_type != AOT_ER_AAC_ELD)) {
- WORD32 copy_size;
- if (down_samp_flag)
- copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
- else
- copy_size = QMF_FILTER_STATE_SYN_SIZE;
-
- memcpy(
- pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
- pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
- copy_size * sizeof(WORD16));
-
- pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
- pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
-
- memcpy(
- pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
- pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
- QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
-
- pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
- pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
-
- memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
- pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
- MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
-
- pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
- pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
- pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
- pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
- }
- pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
- if (pstr_drc_dec == NULL) {
- WORD32 err_code = 0;
- err_code = ixheaacd_sbr_dec(
- &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element,
- ptr_header_data[0], ptr_frame_data[0],
- pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
- &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
- &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
- (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
- sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
- self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, 0, NULL,
- audio_object_type, ldmps_present);
- if (err_code) return err_code;
- } else {
- WORD32 err_code = 0;
- err_code = ixheaacd_sbr_dec(
- &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element,
- ptr_header_data[0], ptr_frame_data[0],
- pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
- &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
- &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
- (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
- sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
- self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str,
- pstr_drc_dec->drc_on,
- pstr_drc_dec->str_drc_channel_data[0].drc_factors_sbr,
- audio_object_type, ldmps_present);
- if (err_code) return err_code;
+ {
+ if (sub_d((WORD16)ptr_header_data[0]->channel_mode, PS_STEREO) == 0) {
+ num_channels = 2;
+ }
+ if (ptr_header_data[0]->enh_sbr_ps) {
+ num_channels = 2;
+ }
+ }
+ }
+ *codec_num_channels = num_channels;
+ self->sbr_mode = ptr_frame_data[0]->sbr_mode;
+
+ if ((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD)) {
+ if (pstr_drc_dec != NULL) {
+ WORD32 i, j;
+ for (i = 0; i < *codec_num_channels; i++) {
+ for (j = 0; j < 32; j++) {
+ memcpy(pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j],
+ pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j + 32],
+ 64 * sizeof(WORD32));
+ }
+ }
+ }
+ }
+ if (ec_flag) {
+ self->band_count[0] = pstr_sbr_channel[0]->str_sbr_dec.band_count;
+ self->band_count[1] = pstr_sbr_channel[1]->str_sbr_dec.band_count;
+ }
}
- if (!down_mix_flag && (stereo || dual_mono) && (num_channels == 2)) {
- pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
+ return SBRDEC_OK;
+}
- if (ele_channels == 1 && usac_flag) {
- WORD32 err_code = ixheaacd_esbr_dec(
- &pstr_sbr_channel[1]->str_sbr_dec, ptr_header_data[1],
- ptr_frame_data[1], (ptr_header_data[1]->sync_state == SBR_ACTIVE),
- low_pow_flag, self->pstr_sbr_tables, ch_fac);
- if (err_code) return err_code;
+IA_ERRORCODE ixheaacd_parse_sbr(ia_handle_sbr_dec_inst_struct self,
+ ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream,
+ WORD16 *codec_num_channels, FLAG frame_status,
+ ia_sbr_scr_struct *sbr_scratch_struct,
+ ia_bit_buf_struct *it_bit_buff, WORD32 audio_object_type) {
+ WORD32 k;
+ FLAG ps_flag = 0;
+ FLAG stereo = 0;
+ FLAG low_pow_flag = 0;
+ FLAG header_flag = 1;
+ FLAG dual_mono = 0;
+ WORD32 err = 0;
+ WORD32 num_channels = *codec_num_channels;
+ FLAG prev_stereo;
+ WORD32 num_elements = p_sbr_bit_stream->no_elements;
+ WORD32 usac_flag = self->aot_usac_flag;
+
+ ia_sbr_channel_struct *pstr_sbr_channel[2];
+ ia_sbr_header_data_struct *ptr_header_data[MAXNRSBRCHANNELS];
+
+ WORD32 initial_sync_state;
+
+ ia_sbr_header_data_struct *ptr_sbr_dflt_header =
+ (ia_sbr_header_data_struct *)(&self->str_sbr_dflt_header);
+
+ ia_sbr_frame_info_data_struct *ptr_frame_data[2];
+
+ self->num_delay_frames = 1;
+
+ self->ptr_mps_data = NULL;
+
+ if (usac_flag && self->ec_flag) {
+ for (k = 0; k < 2; k++) {
+ ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
+
+ pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
+
+ ptr_header_data[k] = self->pstr_sbr_header[k];
+
+ ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
+ ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
+ ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
+ ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
+ ptr_frame_data[k]->sbr_mode = self->sbr_mode;
+ }
+
+ for (k = 0; k < *codec_num_channels; k++) {
+ ptr_header_data[k]->usac_flag = self->aot_usac_flag;
+
+ ptr_header_data[k]->enh_sbr = self->enh_sbr;
+ ptr_header_data[k]->enh_sbr_ps =
+ ((self->enh_sbr_ps) | (ptr_header_data[k]->channel_mode == PS_STEREO));
+ ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
+ ptr_header_data[k]->hbe_flag = self->hbe_flag;
+ ptr_header_data[k]->pvc_flag = self->pvc_flag;
+
+ ptr_header_data[k]->esbr_hq = self->esbr_hq;
+ }
+
+ initial_sync_state = ptr_header_data[0]->sync_state;
+
+ low_pow_flag = 0;
+ self->pstr_sbr_tables->sbr_rand_ph = self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
+
+ prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
+
+ ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
+
+ if (p_sbr_bit_stream->no_elements == 0) {
+ frame_status = 0;
+ ptr_header_data[0]->sync_state = UPSAMPLING;
+ if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
+ }
+
+ if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
+ num_elements = p_sbr_bit_stream->no_elements;
} else {
- if (pstr_drc_dec == NULL) {
- WORD32 err_code = ixheaacd_sbr_dec(
- &pstr_sbr_channel[1]->str_sbr_dec,
- core_sample_buf + slot_element + 1, ptr_header_data[1],
- ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data, NULL,
- NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE),
- low_pow_flag, sbr_scratch_struct->ptr_work_buf_core,
- self->pstr_sbr_tables, self->pstr_common_tables, ch_fac,
- self->ptr_pvc_data_str, 0, NULL, audio_object_type, ldmps_present);
- if (err_code) return err_code;
+ num_elements = 0;
+ }
+
+ for (k = 0; k < num_elements; k++) {
+ ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
+
+ switch (ptr_bit_str_ele->sbr_ele_id) {
+ case SBR_ID_SCE:
+ case SBR_ID_CCE:
+ if (num_channels == 2) {
+ dual_mono = 1;
+ }
+ stereo = 0;
+ break;
+ case SBR_ID_CPE:
+ stereo = 1;
+ ptr_header_data[1] = ptr_header_data[0];
+
+ memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
+ sizeof(*(self->pstr_sbr_header[1])));
+ break;
+ default:
+ frame_status = 0;
+ }
+
+ if (frame_status) {
+ if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
+ WORD32 crc_bits = 0;
+ WORD32 crc_check_flag = 0;
+ crc_check_flag = 1;
+ crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) + (4 - SBR_CYC_REDCY_CHK_BITS));
+
+ if (crc_bits < 0) {
+ crc_check_flag = 0;
+ frame_status = 0;
+ }
+ if (crc_check_flag && frame_status == 1)
+ frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
+ }
+
+ if (frame_status == 1) {
+ header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
+ ptr_sbr_dflt_header);
+ }
+ if (usac_flag) {
+ if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
+ (ptr_header_data[k]->pvc_mode != 0)) {
+ self->ptr_pvc_data_str->prev_pvc_id = 0;
+ }
+ self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
+ if (ptr_header_data[k]->pvc_mode == 0) {
+ ptr_frame_data[k]->sbr_mode = ORIG_SBR;
+ } else {
+ ptr_frame_data[k]->sbr_mode = PVC_SBR;
+ }
+ }
+ if (header_flag == SBR_RESET) {
+ err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
+
+ self->pstr_common_tables);
+ if (!err) {
+ WORD32 lr;
+ WORD32 lr1 = num_channels;
+ for (lr = 0; lr < lr1; lr++) {
+ ptr_frame_data[lr]->reset_flag = 1;
+ if ((SBR_NOT_INITIALIZED == ptr_header_data[lr]->sync_state) && !usac_flag) {
+ ptr_frame_data[lr]->sbr_patching_mode = 1;
+ ptr_frame_data[lr]->over_sampling_flag = 0;
+ ptr_frame_data[lr]->pitch_in_bins = 0;
+ ptr_header_data[lr]->pre_proc_flag = 0;
+ }
+
+ err |= ixheaacd_sbr_dec_reset(
+ &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
+ self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins, audio_object_type,
+ sbr_scratch_struct->ptr_work_buf_core);
+ if (err < 0) {
+ if (self->ec_flag) {
+ self->frame_ok = 0;
+ } else {
+ return err;
+ }
+ }
+ }
+ }
+
+ if (err == 0) {
+ ptr_header_data[k]->sync_state = SBR_ACTIVE;
+ }
+ }
+ }
+
+ if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
+ WORD32 lr1 = num_channels;
+ ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
+ if (err && !self->ec_flag) {
+ return err;
+ }
+ }
+
+ if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
+ if (stereo) {
+ frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data, it_bit_buff,
+ self->pstr_sbr_tables, audio_object_type);
+ if (frame_status < 0) return frame_status;
+ } else {
+ self->pstr_ps_stereo_dec = 0;
+
+ if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
+ frame_status = ixheaacd_sbr_read_sce(ptr_header_data[k], ptr_frame_data[k],
+ self->pstr_ps_stereo_dec, it_bit_buff,
+ self->pstr_sbr_tables, audio_object_type, 0);
+ if (frame_status < 0) return frame_status;
+ } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
+ frame_status = ixheaacd_sbr_read_pvc_sce(ptr_frame_data[k], it_bit_buff, 0,
+ self->ptr_pvc_data_str,
+ self->pstr_sbr_tables, ptr_header_data[k]);
+ if (frame_status < 0) return frame_status;
+ }
+ }
+ {
+ WORD32 total_bits_read;
+ total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
+ if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
+ total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
+ frame_status = 0;
+ }
+ }
} else {
- WORD32 err_code = ixheaacd_sbr_dec(
- &pstr_sbr_channel[1]->str_sbr_dec,
- core_sample_buf + slot_element + 1, ptr_header_data[1],
- ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data, NULL,
- NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE),
- low_pow_flag, sbr_scratch_struct->ptr_work_buf_core,
- self->pstr_sbr_tables, self->pstr_common_tables, ch_fac,
- self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
- pstr_drc_dec->str_drc_channel_data[1].drc_factors_sbr,
- audio_object_type, ldmps_present);
- if (err_code) return err_code;
+ if (frame_status && self->ec_flag) {
+ err = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_PARSE_ERROR;
+ self->sbr_parse_err_flag = 1;
+ }
+ if (!frame_status) {
+ ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_ERROR);
+ } else {
+ ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_OK);
+ }
}
}
+ if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
+ if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
+ err = ixheaacd_dec_sbrdata_for_pvc(ptr_header_data[0], ptr_frame_data[0],
+ pstr_sbr_channel[0]->pstr_prev_frame_data,
+ audio_object_type);
+ if (err) {
+ if (self->ec_flag) {
+ self->frame_ok = 0;
+ } else {
+ return err;
+ }
+ }
+ } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
+ err = ixheaacd_dec_sbrdata(
+ ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
+ pstr_sbr_channel[0]->pstr_prev_frame_data,
+ (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
+ (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data : NULL,
+ self->pstr_common_tables, 0, audio_object_type, self->ec_flag);
+
+ if (err) {
+ if (self->ec_flag) {
+ self->frame_ok = 0;
+ } else {
+ return err;
+ }
+ }
+ }
- } else {
- if (audio_object_type != AOT_ER_AAC_ELD &&
- audio_object_type != AOT_ER_AAC_LD)
+ if (ptr_header_data[0]->channel_mode == PS_STEREO &&
+ (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)) {
+ ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, 1024);
+ ps_flag = 1;
+ self->ps_present = ps_flag;
+ }
- {
- if (sub_d((WORD16)ptr_header_data[0]->channel_mode, PS_STEREO) == 0) {
- num_channels = 2;
+ if (ptr_header_data[0]->enh_sbr_ps) {
+ ps_flag = 1;
+ self->ps_present = ps_flag;
}
- }
- }
- *codec_num_channels = num_channels;
- self->sbr_mode = ptr_frame_data[0]->sbr_mode;
- if (pstr_drc_dec != NULL) {
- WORD32 i, j;
- for (i = 0; i < *codec_num_channels; i++) {
- for (j = 0; j < 32; j++) {
- memcpy(pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j],
- pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j + 32],
- 64 * sizeof(WORD32));
+ ptr_frame_data[0]->max_qmf_subband_aac =
+ ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
+ if (stereo) {
+ ptr_frame_data[1]->max_qmf_subband_aac =
+ ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
}
}
+ if (audio_object_type != AOT_ER_AAC_ELD) {
+ if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
+ ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
+ }
+ } else {
+ ptr_header_data[0]->sync_state = SBR_ACTIVE;
+ }
+
+ if ((!prev_stereo && stereo && (num_channels == 2)) &&
+ (audio_object_type != AOT_ER_AAC_ELD)) {
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
+ QMF_FILTER_STATE_SYN_SIZE * sizeof(WORD16));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
+
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
+ pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
+ QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
+
+ memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
+ pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
+ MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
+
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
+ pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
+ pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
+ }
+
+ pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
+ self->sbr_parse_complete = 1;
}
- return SBRDEC_OK;
-}
+ return err;
+} \ No newline at end of file
diff --git a/decoder/ixheaacd_sbrdecoder.h b/decoder/ixheaacd_sbrdecoder.h
index 8af17b3..846fc02 100644
--- a/decoder/ixheaacd_sbrdecoder.h
+++ b/decoder/ixheaacd_sbrdecoder.h
@@ -22,6 +22,7 @@
#define EXT_DYNAMIC_RANGE 11
+#define EXT_SAC_DATA 12
#define SBR_EXTENSION 13
#define SBR_EXTENSION_CRC 14
@@ -48,6 +49,14 @@ typedef struct {
WORD32 extension_type;
WORD32 size_payload;
WORD8 *ptr_sbr_data;
+ WORD8 *ptr_prev_sbr_data;
+ WORD32 prev_size_payload;
+ WORD32 frame_error_flag[2];
+ WORD32 use_frame_slot;
+ WORD32 prev_sbr_ele_id;
+ WORD32 prev_extension_type;
+ WORD32 size_payload_old;
+ WORD8 sbr_prev_data[MAXSBRBYTES];
} ia_sbr_element_stream_struct;
typedef struct {
@@ -65,13 +74,18 @@ typedef struct {
} ia_sbr_scr_struct;
IA_ERRORCODE ixheaacd_applysbr(
- ia_handle_sbr_dec_inst_struct self,
- ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream, WORD16 *core_sample_buf,
- WORD16 *codec_num_channels, FLAG frame_status, FLAG down_samp_flag,
- FLAG down_mix_flag, ia_sbr_scr_struct *sbr_scratch_struct, WORD32 ps_enable,
- WORD32 ch_fac, WORD32 slot_element, ia_bit_buf_struct *it_bit_buff,
- ia_drc_dec_struct *pstr_drc_dec, WORD eld_sbr_flag, WORD audio_object_type,
- WORD32 init_flag, WORD32 ldmps_present, WORD32 frame_size);
+ ia_handle_sbr_dec_inst_struct self, ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream,
+ WORD16 *core_sample_buf, WORD16 *codec_num_channels, FLAG frame_status, FLAG down_samp_flag,
+ FLAG down_mix_flag, ia_sbr_scr_struct *sbr_scratch_struct, WORD32 ps_enable, WORD32 ch_fac,
+ WORD32 slot_element, ia_bit_buf_struct *it_bit_buff, ia_drc_dec_struct *pstr_drc_dec,
+ WORD eld_sbr_flag, WORD audio_object_type, WORD32 init_flag, WORD32 ldmps_present,
+ WORD32 frame_size, WORD32 heaac_mps_present, WORD32 ec_flag, FLAG first_frame);
+
+IA_ERRORCODE ixheaacd_parse_sbr(ia_handle_sbr_dec_inst_struct self,
+ ia_aac_dec_sbr_bitstream_struct *p_sbr_bit_stream,
+ WORD16 *codec_num_channels, FLAG frame_status,
+ ia_sbr_scr_struct *sbr_scratch_struct,
+ ia_bit_buf_struct *it_bit_buff, WORD32 audio_object_type);
WORD32 ixheaacd_getsize_sbr_persistent();
@@ -79,4 +93,4 @@ VOID ixheaacd_set_sbr_persistent_buffers(VOID *aac_persistent_mem_v,
WORD32 *persistent_used,
WORD32 channels, WORD32 ps_enable);
-#endif
+#endif /* IXHEAACD_SBRDECODER_H */
diff --git a/decoder/ixheaacd_sbrqmftrans.h b/decoder/ixheaacd_sbrqmftrans.h
index 2b856b9..3522b84 100644
--- a/decoder/ixheaacd_sbrqmftrans.h
+++ b/decoder/ixheaacd_sbrqmftrans.h
@@ -25,15 +25,23 @@ WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *h_hbe_txposer,
FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
FLOAT32 pv_qmf_buf_real[][64],
FLOAT32 pv_qmf_buf_imag[][64],
- WORD32 pitch_in_bins);
+ WORD32 pitch_in_bins,
+ ia_sbr_header_data_struct *ptr_header_data);
+
+WORD32 ixheaacd_dft_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ FLOAT32 qmf_buf_real[][64],
+ FLOAT32 qmf_buf_imag[][64], WORD32 num_columns,
+ FLOAT32 pv_qmf_buf_real[][64],
+ FLOAT32 pv_qmf_buf_imag[][64],
+ WORD32 pitch_in_bins,
+ FLOAT32 *dft_hbe_scratch_buf);
WORD32 ixheaacd_qmf_hbe_data_reinit(
ia_esbr_hbe_txposer_struct *ptr_hbe_transposer_str,
WORD16 *ptr_freq_band_tbl[MAX_FREQ_COEFFS + 1], WORD16 *ptr_num_sf_bands,
WORD32 upsamp_4_flag);
-IA_ERRORCODE ixheaacd_hbe_post_anal_process(
- ia_esbr_hbe_txposer_struct *ptr_hbe_txposer, WORD32 pitch_in_bins,
- WORD32 sbr_upsamp_4_flg);
+IA_ERRORCODE ixheaacd_hbe_post_anal_process(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
+ WORD32 pitch_in_bins, WORD32 sbr_upsamp_4_flg);
#endif
diff --git a/decoder/ixheaacd_spectrum_dec.c b/decoder/ixheaacd_spectrum_dec.c
index 8d73ee6..995fc35 100644
--- a/decoder/ixheaacd_spectrum_dec.c
+++ b/decoder/ixheaacd_spectrum_dec.c
@@ -28,7 +28,7 @@
#include "ixheaacd_tns_usac.h"
#include "ixheaacd_cnst.h"
-
+#include "ixheaacd_error_codes.h"
#include "ixheaacd_acelp_info.h"
#include "ixheaacd_sbrdecsettings.h"
@@ -39,6 +39,8 @@
#include "ixheaacd_sbrdecoder.h"
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
@@ -321,7 +323,7 @@ VOID ixheaacd_section_data(ia_usac_data_struct *usac_data,
{
WORD32 bits_consumed;
bits_consumed = ((g_bs->ptr_read_next - start_read_pos) << 3) +
- (start_bit_pos - g_bs->bit_pos);
+ (start_bit_pos - g_bs->bit_pos);
g_bs->cnt_bits -= bits_consumed;
}
}
@@ -367,7 +369,15 @@ WORD32 ixheaacd_fd_channel_stream(
err_code = ixheaacd_ics_info(usac_data, chn, max_sfb, it_bit_buff,
window_sequence_last);
- if (err_code == -1) return err_code;
+ if (err_code == -1) {
+ if (usac_data->ec_flag) {
+ memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb, sizeof(pstr_core_coder->max_sfb));
+ longjmp(*(it_bit_buff->xaac_jmp_buf),
+ IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
+ } else {
+ return err_code;
+ }
+ }
}
info = usac_data->pstr_sfb_info[chn];
diff --git a/decoder/ixheaacd_stereo.c b/decoder/ixheaacd_stereo.c
index d0fd906..e091969 100644
--- a/decoder/ixheaacd_stereo.c
+++ b/decoder/ixheaacd_stereo.c
@@ -41,6 +41,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_channel.h"
#include "ixheaacd_drc_dec.h"
@@ -99,13 +102,10 @@ VOID ixheaacd_ms_stereo_process(
}
ptr_ms_used -= ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
l_spec = l_spec + maximum_bins_short - ixheaacd_drc_offset;
r_spec = r_spec + maximum_bins_short - ixheaacd_drc_offset;
- }
- else
- {
+ } else {
l_spec = l_spec + 128 - ixheaacd_drc_offset;
r_spec = r_spec + 128 - ixheaacd_drc_offset;
}
@@ -215,13 +215,10 @@ VOID ixheaacd_intensity_stereo_process(
}
}
- if (maximum_bins_short == 120)
- {
+ if (maximum_bins_short == 120) {
l_spec += maximum_bins_short - ixheaacd_drc_offset;
r_spec += maximum_bins_short - ixheaacd_drc_offset;
- }
- else
- {
+ } else {
l_spec += 128 - ixheaacd_drc_offset;
r_spec += 128 - ixheaacd_drc_offset;
}
diff --git a/decoder/ixheaacd_struct_def.h b/decoder/ixheaacd_struct_def.h
index f57895c..a098594 100644
--- a/decoder/ixheaacd_struct_def.h
+++ b/decoder/ixheaacd_struct_def.h
@@ -25,12 +25,13 @@
#include "ixheaacd_peak_limiter_struct_def.h"
#define MAX_DECOR_CONFIG_IDX (2)
-#define MAX_PARAMETER_BANDS_MPS (28)
#define MAX_TIME_SLOTS (72)
+#define NUM_MPS_TABLES (13)
#define MAX_PREROLL_FRAME_OFFSET 4
// max of escapedValue(4, 4, 8) i.e. 2^4 -1 + 2^4 -1 + 2^8 -1;
#define MAX_PREROLL_SIZE 285
+#define IA_ENHAACPLUS_DEC_MPS_PAYLOAD_SIZE (1024)
typedef struct {
WORD8 element_instance_tag;
@@ -92,7 +93,6 @@ typedef struct {
UWORD32 ui_pce_found_in_hdr;
UWORD32 ui_n_memtabs;
- WORD32 ui_drc_enable;
WORD32 ui_drc_boost;
WORD32 ui_drc_cut;
WORD32 ui_drc_target_level;
@@ -126,9 +126,17 @@ typedef struct {
WORD32 output_level;
WORD32 i_loud_ref_level;
UWORD8 dup_stereo_flag;
+ WORD32 peak_limiter_off;
+ WORD32 mps_present;
UWORD32 ui_frame_size;
+ WORD32 ui_enh_sbr;
+ WORD32 ui_hq_esbr;
+ WORD32 ui_enh_sbr_ps;
+ WORD32 ui_usac_flag;
+ WORD32 ui_err_conceal;
+ FLAG first_frame;
} ia_aac_dec_config_struct;
typedef struct ia_aac_dec_state_struct {
@@ -213,6 +221,9 @@ typedef struct ia_aac_dec_state_struct {
VOID *ia_audio_specific_config;
ia_mps_dec_state_struct mps_dec_handle;
+ ia_heaac_mps_state_struct heaac_mps_handle;
+ UWORD8 mps_buffer[IA_ENHAACPLUS_DEC_MPS_PAYLOAD_SIZE];
+
UWORD16 *huffman_code_book_scl;
UWORD32 *huffman_code_book_scl_index;
@@ -229,7 +240,7 @@ typedef struct ia_aac_dec_state_struct {
WORD32 ldmps_present;
WORD32 fatal_err_present;
WORD8 *pers_mem_ptr;
- bool preroll_config_present;
+ UWORD8 preroll_config_present;
UWORD8 preroll_config_prev[MAX_PREROLL_SIZE];
UWORD8 qshift_cnt;
@@ -239,8 +250,12 @@ typedef struct ia_aac_dec_state_struct {
ia_peak_limiter_struct peak_limiter;
UWORD8 sbr_present;
UWORD8 slot_pos;
+ WORD32 mps_header;
+ WORD32 ui_mps_out_bytes;
WORD32 drc_config_changed;
WORD32 apply_crossfade;
+ WORD32 ec_enable;
+ WORD32 first_frame;
} ia_aac_dec_state_struct;
typedef struct ia_exhaacplus_dec_api_struct {
@@ -260,14 +275,13 @@ typedef struct ia_exhaacplus_dec_api_struct {
WORD32 ixheaacd_aacdec_decodeframe(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec,
- ia_aac_dec_scratch_struct *aac_scratch_ptrs, VOID *time_data,
- FLAG frame_status, WORD *type, WORD *ch_idx, WORD init_flag, WORD channel,
- WORD *element_index_order, WORD skip_full_decode, WORD ch_fac,
- WORD slot_element, WORD max_channels, WORD32 total_channels,
- WORD32 frame_length, WORD32 frame_size, ia_drc_dec_struct *pstr_drc_dec,
- WORD32 object_type, WORD32 ch_config,
+ ia_aac_dec_scratch_struct *aac_scratch_ptrs, VOID *time_data, FLAG frame_status, WORD *type,
+ WORD *ch_idx, WORD init_flag, WORD channel, WORD *element_index_order, WORD skip_full_decode,
+ WORD ch_fac, WORD slot_element, WORD max_channels, WORD32 total_channels, WORD32 frame_length,
+ WORD32 frame_size, ia_drc_dec_struct *pstr_drc_dec, WORD32 object_type, WORD32 ch_config,
ia_eld_specific_config_struct eld_specific_config, WORD16 adtsheader,
- ia_drc_dec_struct *drc_dummy, WORD32 ldmps_present, UWORD8 *slot_pos);
+ ia_drc_dec_struct *drc_dummy, WORD32 ldmps_present, UWORD8 *slot_pos, UWORD8 *mps_buffer,
+ WORD32 *mps_header, WORD32 *mps_bytes, WORD32 is_init, WORD32 first_frame);
WORD ixheaacd_get_channel_mask(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec);
@@ -299,4 +313,22 @@ WORD32 ixheaacd_dec_table_api(
ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD32 i_cmd,
WORD32 i_idx, VOID *pv_value);
+IA_ERRORCODE ixheaacd_aac_mps_init(ia_exhaacplus_dec_api_struct *p_obj_mps_dec,
+ UWORD8 *databuf, WORD32 buffer_size,
+ WORD32 sample_rate);
+
+WORD32 ixheaacd_peak_limiter_init(ia_peak_limiter_struct *peak_limiter, UWORD32 num_channels,
+ UWORD32 sample_rate, FLOAT32 *buffer,
+ UWORD32 *delay_in_samples);
+
+VOID ixheaacd_peak_limiter_process(ia_peak_limiter_struct *peak_limiter, VOID *samples,
+ UWORD32 frame_len, WORD8 *qshift_adj);
+
+VOID ixheaacd_scale_adjust(VOID *samples, UWORD32 frame_len, WORD8 *qshift_adj,
+ WORD num_channels);
+VOID ixheaacd_peak_limiter_process_float(ia_peak_limiter_struct *peak_limiter,
+ FLOAT32 samples[MAX_NUM_CHANNELS][4096],
+ UWORD32 frame_len);
+
+
#endif /* IXHEAACD_STRUCT_DEF_H */
diff --git a/decoder/ixheaacd_tcx_fwd_alcnx.c b/decoder/ixheaacd_tcx_fwd_alcnx.c
index 411bf35..e0dd052 100644
--- a/decoder/ixheaacd_tcx_fwd_alcnx.c
+++ b/decoder/ixheaacd_tcx_fwd_alcnx.c
@@ -43,6 +43,8 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_func_def.h"
@@ -53,7 +55,6 @@
#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_basic_ops40.h"
-static FLOAT32 ixheaacd_randomsign(UWORD32 *seed);
#define ABS(A) ((A) < 0 ? (-A) : (A))
VOID ixheaacd_lpc_coeff_wt_apply(FLOAT32 *a, FLOAT32 *ap) {
@@ -135,17 +136,48 @@ static VOID ixheaacd_low_fq_deemphasis(FLOAT32 x[], WORD32 lg,
return;
}
+static WORD32 ixheaacd_calc_max_pitch(FLOAT32 x[LEN_SUPERFRAME], WORD32 n) {
+ FLOAT32 max_m;
+ FLOAT32 t_est;
+ WORD32 i, i_max, pitch_tcx;
+
+ max_m = 0;
+ i_max = 1;
+
+ for (i = 1; i < n; i++) {
+ FLOAT32 mag = (x[2 * i] * x[2 * i]) + (x[2 * i + 1] * x[2 * i + 1]);
+ if (mag > max_m) {
+ max_m = mag;
+ i_max = i;
+ }
+ }
+
+ t_est = (n / (FLOAT32)i_max);
+
+ if (t_est >= 256) {
+ pitch_tcx = 256;
+ } else {
+ FLOAT32 tmp_est = t_est;
+ while (tmp_est < 256) {
+ tmp_est += t_est;
+ }
+ pitch_tcx = (WORD32)(tmp_est - t_est);
+ }
+
+ return (pitch_tcx);
+}
+
WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
ia_td_frame_data_struct *pstr_td_frame_data,
WORD32 frame_index, FLOAT32 lp_flt_coff_a[], WORD32 lg,
ia_usac_lpd_decoder_handle st) {
WORD32 i, mode;
WORD32 *ptr_tcx_quant;
- FLOAT32 tmp, gain_tcx, noise_level, energy, temp;
+ FLOAT32 tmp, gain_tcx = 0.0f, noise_level, energy, temp;
FLOAT32 *ptr_a, i_ap[ORDER + 1];
const FLOAT32 *sine_window_prev, *sine_window;
WORD32 fac_length_prev;
- FLOAT32 alfd_gains[LEN_SUPERFRAME / (4 * 8)];
+ FLOAT32 alfd_gains[LEN_SUPERFRAME / (4 * 8)] = {0};
FLOAT32 x[LEN_SUPERFRAME], buf[ORDER + LEN_SUPERFRAME];
WORD32 int_x[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
WORD32 int_xn1[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
@@ -154,7 +186,7 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
FLOAT32 *xn;
FLOAT32 xn1[2 * FAC_LENGTH], facwindow[2 * FAC_LENGTH];
WORD32 TTT;
- WORD8 shiftp;
+ WORD8 shiftp = 0;
WORD32 preshift = 0;
WORD32 loop_count = 0;
FLOAT32 *exc = &usac_data->exc_buf[usac_data->len_subfrm * frame_index +
@@ -208,10 +240,8 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
st->exc_prev[i + fac_length + fac_length_prev + 1] = 0.0f;
}
}
-
- noise_level =
- 0.0625f *
- (8.0f - ((FLOAT32)pstr_td_frame_data->noise_factor[frame_index]));
+ if (usac_data->frame_ok == 1) {
+ noise_level = 0.0625f * (8.0f - ((FLOAT32)pstr_td_frame_data->noise_factor[frame_index]));
ptr_tcx_quant = pstr_td_frame_data->x_tcx_invquant;
for (i = 0; i < frame_index; i++)
@@ -219,6 +249,10 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
for (i = 0; i < lg; i++) x[i] = (FLOAT32)ptr_tcx_quant[i];
+ if (usac_data->ec_flag) {
+ st->last_tcx_pitch = ixheaacd_calc_max_pitch(x, (lg >> 5));
+ }
+
for (i = lg / 6; i < lg; i += 8) {
WORD32 k, max_k = min(lg, i + 8);
FLOAT32 tmp = 0.0f;
@@ -235,12 +269,10 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
ixheaacd_low_fq_deemphasis(x, lg, alfd_gains);
ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
- err = ixheaacd_lpc_to_td(i_ap, ORDER, gain1, usac_data->len_subfrm / 4);
- if (err) return err;
+ ixheaacd_lpc_to_td(i_ap, ORDER, gain1, usac_data->len_subfrm / 4);
ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (2 * (ORDER + 1)), i_ap);
- err = ixheaacd_lpc_to_td(i_ap, ORDER, gain2, usac_data->len_subfrm / 4);
- if (err) return err;
+ ixheaacd_lpc_to_td(i_ap, ORDER, gain2, usac_data->len_subfrm / 4);
energy = 0.01f;
for (i = 0; i < lg; i++) energy += x[i] * x[i];
@@ -252,14 +284,38 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
10.0f,
((FLOAT32)pstr_td_frame_data->global_gain[frame_index]) / 28.0f) /
(temp * 2.0f);
-
+ }
+ if (usac_data->ec_flag) {
+ if (usac_data->frame_ok == 1) {
+ usac_data->past_gain_tcx[usac_data->present_chan] = gain_tcx;
+ } else {
+ gain_tcx = usac_data->past_gain_tcx[usac_data->present_chan];
+ }
+ }
+ if (usac_data->frame_ok == 1) {
ixheaacd_noise_shaping(x, lg, (usac_data->len_subfrm) / 4, gain1, gain2);
-
shiftp = ixheaacd_float2fix(x, int_x, lg);
+ }
+ if (usac_data->ec_flag == 1) {
+ if (st->mode_prev != 0) {
+ if (usac_data->frame_ok == 1) {
+ memcpy(usac_data->tcx_spec_coeffs[usac_data->present_chan], int_x, lg * sizeof(int_x[0]));
+ usac_data->last_shiftp = shiftp;
+ } else {
+ memcpy(int_x, usac_data->tcx_spec_coeffs[usac_data->present_chan], lg * sizeof(int_x[0]));
+ shiftp = usac_data->last_shiftp;
+ }
+ }
+ } else {
+ if (lg & (lg - 1)) {
+ if ((lg != 48) && (lg != 96) && (lg != 192) && (lg != 384) && (lg != 768)) {
+ return -1;
+ }
+ }
+ }
- err = ixheaacd_acelp_mdct_main(usac_data, int_x, int_xn1, (2 * fac_length),
- lg - (2 * fac_length), &preshift);
- if (err == -1) return err;
+ ixheaacd_acelp_mdct_main(usac_data, int_x, int_xn1, (2 * fac_length), lg - (2 * fac_length),
+ &preshift);
ixheaacd_fix2float(int_xn1, xn_buf, (lg + (2 * fac_length)), &shiftp,
&preshift);
@@ -298,9 +354,16 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
preshift = 0;
shiftp = ixheaacd_float2fix(x, int_x, fac_length);
- err =
- ixheaacd_acelp_mdct(int_x, int_xn1, &preshift, fac_length, ptr_scratch);
- if (err == -1) return err;
+ if (usac_data->ec_flag == 0) {
+ if (fac_length & (fac_length - 1)) {
+ if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
+ (fac_length != 384) && (fac_length != 768)) {
+ return -1;
+ }
+ }
+ }
+
+ ixheaacd_acelp_mdct(int_x, int_xn1, &preshift, fac_length, ptr_scratch);
ixheaacd_fix2float(int_xn1, xn1, fac_length, &shiftp, &preshift);
@@ -377,7 +440,7 @@ WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
return err;
}
-static FLOAT32 ixheaacd_randomsign(UWORD32 *seed) {
+FLOAT32 ixheaacd_randomsign(UWORD32 *seed) {
FLOAT32 sign = 0.0f;
*seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
diff --git a/decoder/ixheaacd_tcx_fwd_mdct.c b/decoder/ixheaacd_tcx_fwd_mdct.c
index de153bb..9af0895 100644
--- a/decoder/ixheaacd_tcx_fwd_mdct.c
+++ b/decoder/ixheaacd_tcx_fwd_mdct.c
@@ -50,6 +50,8 @@
#include "ixheaacd_constants.h"
#include "ixheaacd_basic_ops32.h"
#include "ixheaacd_basic_ops40.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
@@ -113,7 +115,7 @@ VOID ixheaacd_lsp_to_lp_conversion(FLOAT32 *lsp, FLOAT32 *lp_flt_coff_a) {
return;
}
-WORD32 ixheaacd_lpc_to_td(float *coeff, WORD32 order, float *gains, WORD32 lg) {
+VOID ixheaacd_lpc_to_td(FLOAT32 *coeff, WORD32 order, FLOAT32 *gains, WORD32 lg) {
FLOAT32 data_r[LEN_SUPERFRAME * 2];
FLOAT32 data_i[LEN_SUPERFRAME * 2];
FLOAT64 avg_fac;
@@ -125,7 +127,6 @@ WORD32 ixheaacd_lpc_to_td(float *coeff, WORD32 order, float *gains, WORD32 lg) {
FLOAT32 ftemp = 0;
FLOAT32 tmp, qfac;
WORD32 i, size_n;
- WORD32 err = 0;
size_n = 2 * lg;
avg_fac = PI / (FLOAT32)(size_n);
@@ -153,8 +154,7 @@ WORD32 ixheaacd_lpc_to_td(float *coeff, WORD32 order, float *gains, WORD32 lg) {
idata_i[i] = (WORD32)(data_i[i] * ((WORD64)1 << qshift));
}
- err = ixheaacd_complex_fft(idata_r, idata_i, size_n, -1, &preshift);
- if (err) return err;
+ ixheaacd_complex_fft(idata_r, idata_i, size_n, -1, &preshift);
qfac = 1.0f / ((FLOAT32)((WORD64)1 << (qshift - preshift)));
@@ -168,7 +168,7 @@ WORD32 ixheaacd_lpc_to_td(float *coeff, WORD32 order, float *gains, WORD32 lg) {
(FLOAT32)(1.0f / sqrt(data_r[i] * data_r[i] + data_i[i] * data_i[i]));
}
- return err;
+ return;
}
VOID ixheaacd_noise_shaping(FLOAT32 r[], WORD32 lg, WORD32 M, FLOAT32 g1[],
diff --git a/decoder/ixheaacd_td_mdct.h b/decoder/ixheaacd_td_mdct.h
index ed8f13c..a99af30 100644
--- a/decoder/ixheaacd_td_mdct.h
+++ b/decoder/ixheaacd_td_mdct.h
@@ -25,7 +25,7 @@ WORD8 ixheaacd_float2fix(FLOAT32 *x, WORD32 *int_x, WORD32 length);
VOID ixheaacd_fix2float(WORD32 *int_xn1, FLOAT32 *xn1, WORD32 length,
WORD8 *shiftp, WORD32 *preshift);
-WORD32 ixheaacd_complex_fft(WORD32 *data_r, WORD32 *data_i, WORD32 len,
- WORD32 fft_mode, WORD32 *preshift);
+VOID ixheaacd_complex_fft(WORD32 *data_r, WORD32 *data_i, WORD32 len, WORD32 fft_mode,
+ WORD32 *preshift);
#endif
diff --git a/decoder/ixheaacd_thumb_ps_dec.c b/decoder/ixheaacd_thumb_ps_dec.c
index 6cb4413..52d6d73 100644
--- a/decoder/ixheaacd_thumb_ps_dec.c
+++ b/decoder/ixheaacd_thumb_ps_dec.c
@@ -42,6 +42,9 @@
#include "ixheaacd_drc_data_struct.h"
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
#include "ixheaacd_sbrdecoder.h"
diff --git a/decoder/ixheaacd_tns.c b/decoder/ixheaacd_tns.c
index a16736c..c4a2dea 100644
--- a/decoder/ixheaacd_tns.c
+++ b/decoder/ixheaacd_tns.c
@@ -39,6 +39,8 @@
#include "ixheaacd_mps_polyphase.h"
#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
#include "ixheaacd_main.h"
#include "ixheaacd_arith_dec.h"
#include "ixheaacd_function_selector.h"
diff --git a/decoder/ixheaacd_usac_ec.c b/decoder/ixheaacd_usac_ec.c
new file mode 100644
index 0000000..2e2006b
--- /dev/null
+++ b/decoder/ixheaacd_usac_ec.c
@@ -0,0 +1,642 @@
+/******************************************************************************
+ * *
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *****************************************************************************
+ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
+*/
+#include <string.h>
+#include <ixheaacd_type_def.h>
+#include <ixheaacd_constants.h>
+#include <ixheaacd_basic_ops32.h>
+#include <ixheaacd_basic_ops16.h>
+#include <ixheaacd_basic_ops40.h>
+#include "ixheaacd_sbr_common.h"
+#include "ixheaacd_intrinsics.h"
+#include "ixheaacd_common_rom.h"
+#include "ixheaacd_sbrdecsettings.h"
+#include "ixheaacd_bitbuffer.h"
+#include "ixheaacd_defines.h"
+#include "ixheaacd_pns.h"
+#include <ixheaacd_aac_rom.h>
+#include "ixheaacd_pulsedata.h"
+#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_drc_data_struct.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_rom.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_channelinfo.h"
+#include "ixheaacd_interface.h"
+#include "ixheaacd_acelp_info.h"
+#include "ixheaacd_tns_usac.h"
+#include "ixheaacd_info.h"
+#include "ixheaacd_drc_dec.h"
+#include "ixheaacd_sbrdecoder.h"
+#include "ixheaacd_mps_polyphase.h"
+#include "ixheaacd_sbr_const.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+#include "ixheaacd_main.h"
+#include "ixheaacd_acelp_com.h"
+
+static WORD32 ixheaacd_usac_ec_get_win_seq(WORD32 prev_win_seq) {
+ if (prev_win_seq == LONG_START_SEQUENCE || prev_win_seq == EIGHT_SHORT_SEQUENCE) {
+ return LONG_STOP_SEQUENCE;
+ } else {
+ return ONLY_LONG_SEQUENCE;
+ }
+}
+
+static VOID ixheaacd_usac_flip_spec_sign(WORD32 *ptr_spec_coeff, WORD32 samples_per_frame,
+ UWORD32 *seed_value) {
+ WORD32 i;
+ for (i = 0; i < samples_per_frame; i++) {
+ ptr_spec_coeff[i] = ixheaacd_mult32x16in32_sat(ptr_spec_coeff[i],
+ (WORD16)ixheaacd_randomsign(seed_value));
+ }
+}
+
+static VOID iexheaace_ec_sfb_nrg_q(WORD32 *ptr_spectrum, ia_ec_sfb_str *pstr_ec_sfb,
+ WORD32 win_seq, WORD32 win_trans, WORD32 *ptr_sfb_enrg) {
+ WORD16 *ptr_sfb_offset = pstr_ec_sfb->ptr_sfb_long;
+ WORD32 l = 0, sfb, num_sfb = pstr_ec_sfb->num_sfb_long;
+ switch (win_seq) {
+ case EIGHT_SHORT_SEQUENCE:
+ if (win_trans == NO_TRANSITION) {
+ num_sfb = pstr_ec_sfb->num_sfb_short;
+ ptr_sfb_offset = pstr_ec_sfb->ptr_sfb_short;
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ WORD64 accu = (WORD64)1;
+ WORD32 q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; l < ptr_sfb_offset[sfb + 1]; l++) {
+ accu += ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg);
+ }
+ ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu);
+ }
+ } else {
+ num_sfb = pstr_ec_sfb->num_sfb_long;
+ ptr_sfb_offset = pstr_ec_sfb->ptr_sfb_long;
+
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ WORD64 accu = (WORD64)1;
+ WORD32 q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; l < ptr_sfb_offset[sfb + 1]; l++) {
+ accu += ixheaacd_mul32_sh(ptr_spectrum[(l >> 3)], ptr_spectrum[(l >> 3)], q_nrg);
+ }
+ ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu);
+ }
+ }
+ break;
+ case ONLY_LONG_SEQUENCE:
+ case LONG_START_SEQUENCE:
+ case LONG_STOP_SEQUENCE:
+ if (win_trans == NO_TRANSITION) {
+ num_sfb = pstr_ec_sfb->num_sfb_long;
+ ptr_sfb_offset = pstr_ec_sfb->ptr_sfb_long;
+
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ WORD64 accu = (WORD64)1;
+ WORD32 q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; l < ptr_sfb_offset[sfb + 1]; l++) {
+ accu += ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg);
+ }
+ ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu);
+ }
+ } else {
+ num_sfb = pstr_ec_sfb->num_sfb_short;
+ ptr_sfb_offset = pstr_ec_sfb->ptr_sfb_short;
+
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ WORD64 accu = (WORD64)1;
+ WORD32 q_nrg = (sizeof(accu) << 3) -
+ ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
+ for (; l < ptr_sfb_offset[sfb + 1] << 3; l++) {
+ accu += (accu + (ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg))) >> 3;
+ }
+ ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu);
+ }
+ }
+ break;
+ }
+}
+
+static VOID ixheaacd_usac_ec_interpolate(WORD32 *ptr_spectrum, WORD16 *pq_spec_coeff_prev,
+ WORD16 *pq_spec_coeff_act, WORD16 *pq_spec_coeff_out,
+ WORD32 *ptr_nrg_prev, WORD32 *ptr_nrg_act,
+ WORD32 num_sfb, WORD16 *ptr_sfb_offset) {
+ WORD32 sfb, l = 0;
+ WORD32 fac_shift;
+ WORD32 fac_mod;
+
+ for (sfb = 0; sfb < num_sfb; sfb++) {
+ fac_shift =
+ ptr_nrg_prev[sfb] - ptr_nrg_act[sfb] + ((*pq_spec_coeff_act - *pq_spec_coeff_prev) << 1);
+ fac_mod = fac_shift & 3;
+ fac_shift = (fac_shift >> 2) + 1;
+ fac_shift += *pq_spec_coeff_prev - ixheaacd_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act);
+ fac_shift = ixheaacd_max32(ixheaacd_min32(fac_shift, INT_BITS - 1), -(INT_BITS - 1));
+
+ for (; l < ptr_sfb_offset[sfb + 1]; l++) {
+ WORD32 accu = ixheaacd_shl32_sat(
+ ixheaacd_mult32x32in32(ptr_spectrum[l], (WORD32)(ia_ec_interpolation_fac[fac_mod])), 1);
+ ptr_spectrum[l] = ixheaacd_shl32_dir_sat((WORD32)accu, fac_shift);
+ }
+ }
+ *pq_spec_coeff_out = ixheaacd_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act);
+}
+
+static VOID ixheaacd_usac_ec_interpolate_frame(ia_usac_data_struct *pstr_usac_data,
+ ia_ec_state_str *pstr_ec_state,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info,
+ WORD32 frame_ok, WORD32 chn) {
+ WORD32 frame_length = pstr_usac_data->ccfl;
+ WORD32 *ptr_spec_coeff = pstr_usac_data->coef_fix[chn];
+ WORD16 *ptr_spec_sf = pstr_usac_data->spec_scale[chn];
+
+ WORD32 i;
+ ia_ec_scratch_str *pstr_ec_scratch = pstr_ec_state->pstr_ec_scratch;
+ WORD16 num_sfb_long;
+ WORD16 *ptr_sfb_long = NULL;
+ WORD16 num_sfb_short;
+ WORD16 *ptr_sfb_short = NULL;
+
+ if (pstr_usac_data->core_mode == CORE_MODE_FD) {
+ num_sfb_long = pstr_samp_rate_info->num_sfb_1024;
+ ptr_sfb_long = (WORD16 *)pstr_samp_rate_info->ptr_sfb_1024;
+ num_sfb_short = pstr_samp_rate_info->num_sfb_128;
+ ptr_sfb_short = (WORD16 *)pstr_samp_rate_info->ptr_sfb_128;
+ if (pstr_usac_data->ccfl == WIN_LEN_768) {
+ num_sfb_long = pstr_samp_rate_info->num_sfb_768;
+ ptr_sfb_long = (WORD16 *)pstr_samp_rate_info->ptr_sfb_768;
+ num_sfb_short = pstr_samp_rate_info->num_sfb_96;
+ ptr_sfb_short = (WORD16 *)pstr_samp_rate_info->ptr_sfb_96;
+ }
+ pstr_ec_state->str_ec_sfb.num_sfb_long = num_sfb_long;
+ pstr_ec_state->str_ec_sfb.num_sfb_long = num_sfb_long;
+ pstr_ec_state->str_ec_sfb.ptr_sfb_long = ptr_sfb_long;
+ pstr_ec_state->str_ec_sfb.ptr_sfb_long = ptr_sfb_long;
+
+ memset(pstr_ec_scratch->prev_sfb_nrg, 0, sizeof(pstr_ec_scratch->prev_sfb_nrg));
+ memset(pstr_ec_scratch->pres_sfb_nrg, 0, sizeof(pstr_ec_scratch->pres_sfb_nrg));
+
+ if (!frame_ok) {
+ pstr_usac_data->window_shape[chn] = pstr_ec_state->win_shape;
+ pstr_usac_data->window_sequence[chn] = pstr_ec_state->win_seq;
+ memcpy(ptr_spec_coeff, pstr_ec_state->spectral_coeff,
+ sizeof(*ptr_spec_coeff) * frame_length);
+ memcpy(ptr_spec_sf, pstr_ec_state->q_spec_coeff, sizeof(pstr_ec_state->q_spec_coeff));
+ }
+ }
+
+ if (!pstr_ec_state->prev_frame_ok[1]) {
+ if (frame_ok && pstr_ec_state->prev_frame_ok[0] &&
+ pstr_usac_data->core_mode == CORE_MODE_FD) {
+ if (pstr_usac_data->window_sequence[chn] == EIGHT_SHORT_SEQUENCE) {
+ WORD32 wnd;
+
+ if (pstr_ec_state->win_seq == EIGHT_SHORT_SEQUENCE) {
+ WORD32 num_sfb = num_sfb_short;
+ WORD16 *ptr_sfb_offset = ptr_sfb_short;
+ pstr_usac_data->window_shape[chn] = 1;
+ pstr_usac_data->window_sequence[chn] = EIGHT_SHORT_SEQUENCE;
+
+ for (wnd = 0; wnd < 8; wnd++) {
+ iexheaace_ec_sfb_nrg_q(&ptr_spec_coeff[wnd * (frame_length >> 3)],
+ &pstr_ec_state->str_ec_sfb, EIGHT_SHORT_SEQUENCE,
+ NO_TRANSITION, pstr_ec_scratch->prev_sfb_nrg);
+
+ iexheaace_ec_sfb_nrg_q(&pstr_ec_state->spectral_coeff[wnd * (frame_length >> 3)],
+ &pstr_ec_state->str_ec_sfb, EIGHT_SHORT_SEQUENCE,
+ NO_TRANSITION, pstr_ec_scratch->pres_sfb_nrg);
+
+ ixheaacd_usac_ec_interpolate(&ptr_spec_coeff[wnd * (frame_length / 8)],
+ &ptr_spec_sf[wnd], &pstr_ec_state->q_spec_coeff[wnd],
+ &ptr_spec_sf[wnd], pstr_ec_scratch->prev_sfb_nrg,
+ pstr_ec_scratch->pres_sfb_nrg, num_sfb, ptr_sfb_offset);
+ }
+ } else {
+ WORD32 num_sfb = num_sfb_long;
+ WORD16 *ptr_sfb_offset = ptr_sfb_long;
+ WORD16 q_spec_coeff_out;
+
+ iexheaace_ec_sfb_nrg_q(&ptr_spec_coeff[frame_length - (frame_length >> 3)],
+ &pstr_ec_state->str_ec_sfb, EIGHT_SHORT_SEQUENCE,
+ TRANS_SHORT_LONG, pstr_ec_scratch->pres_sfb_nrg);
+
+ iexheaace_ec_sfb_nrg_q(pstr_ec_state->spectral_coeff, &pstr_ec_state->str_ec_sfb,
+ ONLY_LONG_SEQUENCE, NO_TRANSITION,
+ pstr_ec_scratch->prev_sfb_nrg);
+
+ pstr_usac_data->window_shape[chn] = 0;
+ pstr_usac_data->window_sequence[chn] = LONG_STOP_SEQUENCE;
+ memcpy(&ptr_spec_coeff[0], pstr_ec_state->spectral_coeff,
+ frame_length * sizeof(ptr_spec_coeff[0]));
+
+ for (i = 0; i < 8; i++) {
+ if (ptr_spec_sf[i] > ptr_spec_sf[0]) {
+ ptr_spec_sf[0] = ptr_spec_sf[i];
+ }
+ }
+
+ ixheaacd_usac_ec_interpolate(ptr_spec_coeff, &pstr_ec_state->q_spec_coeff[0],
+ &ptr_spec_sf[0], &q_spec_coeff_out,
+ pstr_ec_scratch->prev_sfb_nrg,
+ pstr_ec_scratch->pres_sfb_nrg, num_sfb, ptr_sfb_offset);
+
+ ptr_spec_sf[0] = q_spec_coeff_out;
+ }
+ } else {
+ WORD32 num_sfb = num_sfb_long;
+ WORD16 *ptr_sfb_offset = ptr_sfb_long;
+ WORD16 q_spec_coeff_act = pstr_ec_state->q_spec_coeff[0];
+
+ iexheaace_ec_sfb_nrg_q(ptr_spec_coeff, &pstr_ec_state->str_ec_sfb, ONLY_LONG_SEQUENCE,
+ NO_TRANSITION, pstr_ec_scratch->prev_sfb_nrg);
+
+ if (pstr_ec_state->win_seq == EIGHT_SHORT_SEQUENCE) {
+ pstr_usac_data->window_shape[chn] = 1;
+ pstr_usac_data->window_sequence[chn] = LONG_START_SEQUENCE;
+
+ for (i = 1; i < 8; i++) {
+ if (pstr_ec_state->q_spec_coeff[i] > q_spec_coeff_act) {
+ q_spec_coeff_act = pstr_ec_state->q_spec_coeff[i];
+ }
+ }
+
+ iexheaace_ec_sfb_nrg_q(pstr_ec_state->spectral_coeff, &pstr_ec_state->str_ec_sfb,
+ EIGHT_SHORT_SEQUENCE, TRANS_SHORT_LONG,
+ pstr_ec_scratch->pres_sfb_nrg);
+ } else {
+ pstr_usac_data->window_shape[chn] = 0;
+ pstr_usac_data->window_sequence[chn] = ONLY_LONG_SEQUENCE;
+ iexheaace_ec_sfb_nrg_q(pstr_ec_state->spectral_coeff, &pstr_ec_state->str_ec_sfb,
+ ONLY_LONG_SEQUENCE, NO_TRANSITION,
+ pstr_ec_scratch->pres_sfb_nrg);
+ }
+ ixheaacd_usac_ec_interpolate(ptr_spec_coeff, &ptr_spec_sf[0], &q_spec_coeff_act,
+ &ptr_spec_sf[0], pstr_ec_scratch->prev_sfb_nrg,
+ pstr_ec_scratch->pres_sfb_nrg, num_sfb, ptr_sfb_offset);
+ }
+ }
+ ixheaacd_usac_flip_spec_sign(ptr_spec_coeff, frame_length, &pstr_usac_data->seed_value[chn]);
+ }
+
+ if (FRAME_MUTE == pstr_ec_state->conceal_state) {
+ pstr_usac_data->window_shape[chn] = pstr_ec_state->win_shape;
+ pstr_usac_data->window_sequence[chn] = ixheaacd_usac_ec_get_win_seq(pstr_ec_state->win_seq);
+ pstr_ec_state->win_seq = pstr_usac_data->window_sequence[chn];
+ memset(ptr_spec_coeff, 0, frame_length * sizeof(ptr_spec_coeff[0]));
+ }
+
+ return;
+}
+
+static VOID ixheaacd_usac_lpc_ec_state(ia_ec_state_str *pstr_ec_state, WORD32 frame_ok) {
+ if (frame_ok == 0) {
+ if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx++;
+ }
+ pstr_ec_state->conceal_state = FRAME_CONCEAL_SINGLE;
+ } else {
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ }
+ if (pstr_ec_state->fade_idx >= MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx = MAX_FADE_FRAMES;
+ pstr_ec_state->conceal_state = FRAME_MUTE;
+ }
+ if (pstr_ec_state->fade_idx < 0) {
+ pstr_ec_state->fade_idx = 0;
+ }
+ return;
+}
+
+static VOID ixheaacd_usac_ec_state(ia_ec_state_str *pstr_ec_state, WORD32 frame_ok) {
+ WORD32 ec_state_val = (pstr_ec_state->prev_frame_ok[0] << 2) +
+ (pstr_ec_state->prev_frame_ok[1] << 1) + (frame_ok);
+
+ switch (ec_state_val) {
+ case 0:
+ case 4:
+ if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx++;
+ }
+ pstr_ec_state->conceal_state = FRAME_CONCEAL_SINGLE;
+ break;
+ case 1:
+ case 2:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_FADE;
+ break;
+ case 5:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ break;
+ break;
+ case 3:
+ case 6:
+ case 7:
+ if (pstr_ec_state->fade_idx > 0) {
+ pstr_ec_state->fade_idx--;
+ }
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ break;
+ default:
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+ }
+ if (pstr_ec_state->fade_idx > MAX_FADE_FRAMES) {
+ pstr_ec_state->fade_idx = MAX_FADE_FRAMES;
+ }
+ if (pstr_ec_state->fade_idx == MAX_FADE_FRAMES) {
+ pstr_ec_state->conceal_state = FRAME_MUTE;
+ }
+ if (pstr_ec_state->fade_idx < 0) {
+ pstr_ec_state->fade_idx = 0;
+ }
+}
+
+VOID ixheaacd_usac_ec_init(ia_ec_state_str *pstr_ec_state, WORD32 core_coder_mode) {
+ pstr_ec_state->win_shape = 1;
+ pstr_ec_state->win_seq = ONLY_LONG_SEQUENCE;
+ pstr_ec_state->prev_win_group_len = 1;
+
+ pstr_ec_state->conceal_state = FRAME_OKAY;
+
+ memset(pstr_ec_state->spectral_coeff, 0, sizeof(pstr_ec_state->spectral_coeff));
+ memset(pstr_ec_state->q_spec_coeff, 0, sizeof(pstr_ec_state->q_spec_coeff));
+
+ pstr_ec_state->prev_frame_ok[0] = 1;
+ pstr_ec_state->prev_frame_ok[1] = 1;
+
+ pstr_ec_state->fade_idx = 0;
+
+ pstr_ec_state->prev_core_mode = core_coder_mode;
+}
+
+VOID ixheaacd_usac_lpc_ec(FLOAT32 lsp[][ORDER], FLOAT32 *lpc4_lsf, FLOAT32 *lsf_adaptive_mean,
+ const WORD32 first_lpd_flag) {
+ WORD32 i, j;
+
+ if (first_lpd_flag) {
+ memcpy(lsp[0], lsf_init, sizeof(lsf_init));
+ memcpy(lpc4_lsf, lsf_init, sizeof(lsf_init));
+ } else {
+ memcpy(lsp[0], lpc4_lsf, ORDER * sizeof(lpc4_lsf[0]));
+ }
+
+ for (i = 0; i < ORDER; i++) {
+ FLOAT32 lsf_mean = (BETA * lsf_init[i]) + (ONE_BETA * lsf_adaptive_mean[i]);
+ lsp[1][i] = (BFI_FAC * lpc4_lsf[i]) + (ONE_BFI_FAC * lsf_mean);
+ }
+
+ for (j = 2; j <= 4; j++) {
+ for (i = 0; i < ORDER; i++) {
+ FLOAT32 lsf_mean = ((BETA + (j * ONE_BFI_FAC)) * lsf_init[i]) +
+ ((ONE_BETA - (j * ONE_BFI_FAC)) * lsf_adaptive_mean[i]);
+ lsp[j][i] = (BFI_FAC * lsp[j - 1][i]) + (ONE_BFI_FAC * lsf_mean);
+ }
+ }
+
+ memcpy(lpc4_lsf, lsp[4], ORDER * sizeof(lpc4_lsf[0]));
+}
+
+VOID ixheaacd_usac_ec_save_states(ia_ec_state_str *pstr_ec_state,
+ ia_usac_data_struct *pstr_usac_data, WORD32 ch) {
+ if (pstr_usac_data->core_mode == CORE_MODE_FD &&
+ (pstr_usac_data->frame_ok == 1 && pstr_ec_state->prev_frame_ok[1] == 1)) {
+ WORD32 *ptr_spec_coeff = pstr_usac_data->coef_fix[ch];
+ WORD16 *ptr_spec_scale = pstr_usac_data->spec_scale[ch];
+ WORD16 q_spec_coeff[MAX_SPEC_SCALE_LEN_EC];
+ UWORD8 win_shape = pstr_ec_state->win_shape;
+ UWORD8 win_shape_prev = pstr_ec_state->win_shape_prev;
+ WORD32 win_seq = pstr_ec_state->win_seq;
+ WORD32 td_frame_prev = pstr_ec_state->td_frame_prev;
+ WORD32 fac_data_present = pstr_ec_state->fac_data_present;
+
+ ia_sfb_info_struct *sfb_info =
+ pstr_usac_data->pstr_usac_winmap[pstr_usac_data->window_sequence[ch]];
+ WORD32 *ptr_scratch_buf = &pstr_ec_state->pstr_ec_scratch->spec_coeff[0];
+
+ memcpy(q_spec_coeff, pstr_ec_state->q_spec_coeff, sizeof(q_spec_coeff));
+ pstr_ec_state->win_seq = pstr_usac_data->window_sequence[ch];
+ pstr_ec_state->win_shape = pstr_usac_data->window_shape[ch];
+ pstr_ec_state->td_frame_prev = pstr_usac_data->td_frame_prev[ch];
+ pstr_ec_state->fac_data_present = pstr_usac_data->fac_data_present[ch];
+ pstr_ec_state->win_shape_prev = pstr_usac_data->window_shape_prev[ch];
+ pstr_ec_state->prev_win_group_len = (WORD32)sfb_info->group_len[sfb_info->num_groups - 1];
+
+ memcpy(pstr_ec_state->q_spec_coeff, ptr_spec_scale, sizeof(pstr_ec_state->q_spec_coeff));
+
+ memcpy(ptr_scratch_buf, ptr_spec_coeff, pstr_usac_data->ccfl * sizeof(ptr_scratch_buf[0]));
+ memcpy(ptr_spec_coeff, &pstr_ec_state->spectral_coeff[0],
+ pstr_usac_data->ccfl * sizeof(ptr_spec_coeff[0]));
+ memcpy(&pstr_ec_state->spectral_coeff[0], ptr_scratch_buf,
+ pstr_usac_data->ccfl * sizeof(ptr_spec_coeff[0]));
+
+ if (!pstr_usac_data->first_frame) {
+ pstr_usac_data->window_sequence[ch] = win_seq;
+ pstr_usac_data->window_shape[ch] = win_shape;
+ pstr_usac_data->td_frame_prev_ec[ch] = td_frame_prev;
+ pstr_usac_data->fac_data_present[ch] = fac_data_present;
+ pstr_usac_data->window_shape_prev[ch] = win_shape_prev;
+ }
+
+ memcpy(ptr_spec_scale, q_spec_coeff, sizeof(q_spec_coeff));
+ }
+}
+
+VOID ixheaacd_usac_apply_ec(ia_usac_data_struct *pstr_usac_data,
+ const ia_usac_samp_rate_info *pstr_samp_rate_info, WORD32 ch) {
+ WORD32 frame_ok = pstr_usac_data->frame_ok;
+ ia_ec_state_str *pstr_ec_state = &pstr_usac_data->str_error_concealment[ch];
+
+ if (pstr_usac_data->core_mode == CORE_MODE_FD) {
+ if (pstr_ec_state->win_shape == (UWORD8)-1) {
+ pstr_ec_state->win_shape = pstr_usac_data->window_shape[ch];
+ }
+
+ ixheaacd_usac_ec_state(pstr_ec_state, frame_ok);
+
+ if (pstr_ec_state->conceal_state == FRAME_OKAY) {
+ pstr_ec_state->prev_core_mode = pstr_usac_data->core_mode;
+ ixheaacd_usac_ec_save_states(pstr_ec_state, pstr_usac_data, ch);
+ } else if (pstr_ec_state->conceal_state == FRAME_CONCEAL_SINGLE) {
+ ixheaacd_usac_ec_interpolate_frame(pstr_usac_data, pstr_ec_state, pstr_samp_rate_info,
+ frame_ok, ch);
+ } else {
+ }
+ if (!frame_ok) {
+ WORD32 *ptr_spec_coeff = pstr_usac_data->coef_fix[ch];
+ WORD16 *ptr_spec_scale = pstr_usac_data->spec_scale[ch];
+
+ pstr_usac_data->window_sequence[ch] = pstr_ec_state->win_seq;
+ pstr_usac_data->window_shape[ch] = pstr_ec_state->win_shape;
+
+ if (pstr_ec_state->conceal_state != FRAME_MUTE) {
+ memcpy(ptr_spec_scale, pstr_ec_state->q_spec_coeff, sizeof(pstr_ec_state->q_spec_coeff));
+ memcpy(ptr_spec_coeff, pstr_ec_state->spectral_coeff,
+ sizeof(pstr_ec_state->spectral_coeff));
+ } else {
+ memset(ptr_spec_scale, 0, MAX_SPEC_SCALE_LEN * sizeof(ptr_spec_scale[0]));
+ memset(ptr_spec_coeff, 0, pstr_usac_data->ccfl * sizeof(ptr_spec_coeff[0]));
+ }
+ }
+ } else {
+ ixheaacd_usac_lpc_ec_state(pstr_ec_state, frame_ok);
+
+ if (pstr_ec_state->conceal_state == FRAME_OKAY) {
+ memcpy(pstr_ec_state->lsf4, pstr_usac_data->lpc4_lsf, sizeof(pstr_ec_state->lsf4));
+ } else if (pstr_ec_state->conceal_state == FRAME_CONCEAL_SINGLE) {
+ WORD32 frame_length = pstr_usac_data->ccfl;
+ WORD32 *ptr_spec_coeff = pstr_usac_data->tcx_spec_coeffs[ch];
+
+ ixheaacd_usac_flip_spec_sign(ptr_spec_coeff, frame_length,
+ &pstr_usac_data->seed_value[ch]);
+ } else {
+ WORD32 *ptr_spec_coeff = pstr_usac_data->tcx_spec_coeffs[ch];
+ memset(ptr_spec_coeff, 0, pstr_usac_data->ccfl * sizeof(ptr_spec_coeff[0]));
+ }
+ if (!frame_ok) {
+ memcpy(pstr_usac_data->lpc4_lsf, pstr_ec_state->lsf4, sizeof(pstr_usac_data->lpc4_lsf));
+ }
+ }
+
+ pstr_ec_state->prev_frame_ok[0] = pstr_ec_state->prev_frame_ok[1];
+ pstr_ec_state->prev_frame_ok[1] = frame_ok;
+
+ return;
+}
+
+static VOID ixheaacd_lpc_wt_tool(FLOAT32 a[], WORD32 l) {
+ WORD32 i;
+
+ for (i = 0; i < l; i++) {
+ a[i] = a[i] * ixheaacd_gamma_table[i];
+ }
+
+ return;
+}
+static VOID ixheaacd_lpc_coef_gen_ec(FLOAT32 lsf_old[], FLOAT32 lsf_new[], FLOAT32 a[],
+ WORD32 m) {
+ FLOAT32 lsf[ORDER], *ptr_a;
+ FLOAT32 inc, fnew, fold;
+ WORD32 i;
+
+ ptr_a = a;
+
+ inc = 1.0f / (FLOAT32)m;
+ fnew = 0.5f - (0.5f * inc);
+ fold = 1.0f - fnew;
+
+ for (i = 0; i < ORDER; i++) {
+ lsf[i] = (lsf_old[i] * fold) + (lsf_new[i] * fnew);
+ }
+ ixheaacd_lsp_to_lp_conversion(lsf, ptr_a);
+
+ return;
+}
+
+VOID ixheaacd_usac_tcx_ec(ia_usac_data_struct *pstr_usac_data, ia_usac_lpd_decoder_handle st,
+ FLOAT32 *ptr_lsp_curr, WORD32 frame_idx, FLOAT32 *lp_flt_coff_a) {
+ WORD32 ch = pstr_usac_data->present_chan;
+ FLOAT32 synth_buf[ORDER + LEN_FRAME], temp;
+ FLOAT32 exc_buf[MAX_PITCH + ORDER + 1 + LEN_FRAME];
+ FLOAT32 *ptr_syn = synth_buf + ORDER;
+ FLOAT32 *ptr_exc = exc_buf + MAX_PITCH + ORDER + 1;
+ FLOAT32 est_fac_est = 0.1f;
+ WORD32 i, sf_idx;
+ FLOAT32 synth_sig_buf[LEN_SUBFR + 1];
+ FLOAT32 *synth_signal = synth_sig_buf + 1;
+ WORD32 num_lost_frames = pstr_usac_data->num_lost_lpd_frames[ch];
+ WORD32 len_subfrm = pstr_usac_data->len_subfrm;
+ FLOAT32 past_tcx_gain = pstr_usac_data->past_gain_tcx[ch];
+ WORD32 l_div_part = MAX_PITCH + ORDER + 1 - len_subfrm;
+ FLOAT32 *synth = pstr_usac_data->synth_buf + MAX_PITCH - LEN_SUBFR;
+ FLOAT32 *ptr_synth = &synth[512 + frame_idx * len_subfrm];
+ FLOAT32 syn_buf[MAX_PITCH + ORDER + 1];
+ FLOAT32 *ptr_syn_buf = &syn_buf[ORDER];
+
+ memcpy(syn_buf, &ptr_synth[-(MAX_PITCH + ORDER + 1)],
+ sizeof(syn_buf));
+ memcpy(st->synth_prev_ec, &syn_buf[MAX_PITCH + 1], sizeof(st->synth_prev_ec));
+ ixheaacd_residual_tool_float(pstr_usac_data->lp_flt_coff_a_ec, ptr_syn_buf, st->xcitation_prev,
+ pstr_usac_data->len_subfrm, 1);
+ ixheaacd_residual_tool_float(lp_flt_coff_a, &syn_buf[l_div_part],
+ st->xcitation_prev + l_div_part, pstr_usac_data->len_subfrm, 1);
+ if (st->last_tcx_pitch > MAX_PITCH) {
+ st->last_tcx_pitch = MAX_PITCH;
+ }
+
+ memcpy(synth_buf, st->synth_prev_ec, ORDER * sizeof(FLOAT32));
+ memcpy(exc_buf, st->xcitation_prev, (MAX_PITCH + ORDER + 1) * sizeof(FLOAT32));
+
+ if (num_lost_frames <= 8) {
+ est_fac_est = ixheaacd_exc_fade_fac[num_lost_frames - 1];
+ }
+
+ for (i = 0; i < len_subfrm; i++) {
+ ptr_exc[i] = est_fac_est * ptr_exc[i - st->last_tcx_pitch];
+ }
+ synth_signal[-1] = ptr_exc[-1];
+
+ for (sf_idx = 0; sf_idx < len_subfrm; sf_idx += LEN_SUBFR) {
+ FLOAT32 lp_coef[ORDER + 1];
+
+ ixheaacd_lpc_coef_gen_ec(st->lspold, ptr_lsp_curr, lp_coef, len_subfrm / LEN_SUBFR);
+
+ ixheaacd_synthesis_tool_float(lp_coef, &ptr_exc[sf_idx], &ptr_syn[sf_idx], LEN_SUBFR,
+ synth_buf);
+
+ ixheaacd_lpc_wt_tool(lp_coef, ORDER);
+
+ ixheaacd_residual_tool_float(lp_coef, &ptr_syn[sf_idx], synth_signal, LEN_SUBFR, 1);
+
+ ixheaacd_deemphsis_tool(synth_signal, LEN_SUBFR, synth_signal[-1]);
+
+ temp = (est_fac_est * past_tcx_gain);
+
+ for (i = 0; i < LEN_SUBFR; i++) {
+ if (synth_signal[i] > temp) {
+ synth_signal[i] = temp;
+ } else {
+ if (synth_signal[i] < -temp) {
+ synth_signal[i] = -temp;
+ }
+ }
+ }
+
+ for (i = LEN_SUBFR - 1; i >= 0; i--) {
+ synth_signal[i] = (synth_signal[i] - (PREEMPH_FILT_FAC * synth_signal[i - 1]));
+ }
+ ixheaacd_synthesis_tool_float(lp_coef, synth_signal, &ptr_syn[sf_idx], LEN_SUBFR, synth_buf);
+
+ memmove(&ptr_synth[sf_idx], &ptr_syn[sf_idx], LEN_SUBFR * sizeof(FLOAT32));
+ }
+
+ memcpy(st->xcitation_prev, ptr_exc + len_subfrm - (MAX_PITCH + ORDER + 1),
+ sizeof(FLOAT32) * (MAX_PITCH + ORDER + 1));
+ memcpy(st->synth_prev_ec, synth_buf + len_subfrm, sizeof(FLOAT32) * ORDER);
+ return;
+}
diff --git a/decoder/ixheaacd_vec_baisc_ops.h b/decoder/ixheaacd_vec_baisc_ops.h
index 03571c5..c57e17d 100644
--- a/decoder/ixheaacd_vec_baisc_ops.h
+++ b/decoder/ixheaacd_vec_baisc_ops.h
@@ -20,8 +20,6 @@
#ifndef IXHEAACD_VEC_BAISC_OPS_H
#define IXHEAACD_VEC_BAISC_OPS_H
-#define ONE_BY_TWO_POW_15 0.000030517578125
-
VOID ixheaacd_combine_fac(WORD32 *src1, WORD32 *src2, WORD32 *dest, WORD32 len,
WORD8 shift1, WORD8 shift2);
diff --git a/decoder/ixheaacd_windows.h b/decoder/ixheaacd_windows.h
index 7d3a614..0d8bc7f 100644
--- a/decoder/ixheaacd_windows.h
+++ b/decoder/ixheaacd_windows.h
@@ -45,10 +45,9 @@ extern const FLOAT32 ixheaacd_sine_window128[128];
extern const FLOAT32 ixheaacd_sine_window192[192];
extern const FLOAT32 ixheaacd__sine_window256[256];
-WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 len, WORD32 wfun_select);
+WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 len, WORD32 wfun_select, WORD32 ec_flag);
-WORD32 ixheaacd_acelp_imdct(WORD32 *imdct_in, WORD32 npoints, WORD8 *qshift,
- WORD32 *scratch);
+VOID ixheaacd_acelp_imdct(WORD32 *imdct_in, WORD32 npoints, WORD8 *qshift, WORD32 *scratch);
typedef struct {
WORD32 lfac;
diff --git a/decoder/x86/CMakeLists.txt b/decoder/x86/CMakeLists.txt
new file mode 100644
index 0000000..f22b8d2
--- /dev/null
+++ b/decoder/x86/CMakeLists.txt
@@ -0,0 +1,5 @@
+#src files
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/x86/ixheaacd_function_selector_x86.c"
+ "${XAAC_ROOT}/decoder/generic/ixheaacd_qmf_dec_generic.c")
diff --git a/decoder/x86/ixheaacd_function_selector_x86.c b/decoder/x86/ixheaacd_function_selector_x86.c
index dbeb987..33575df 100644
--- a/decoder/x86/ixheaacd_function_selector_x86.c
+++ b/decoder/x86/ixheaacd_function_selector_x86.c
@@ -45,6 +45,10 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/decoder/x86_64/CMakeLists.txt b/decoder/x86_64/CMakeLists.txt
new file mode 100644
index 0000000..9819606
--- /dev/null
+++ b/decoder/x86_64/CMakeLists.txt
@@ -0,0 +1,5 @@
+#src files
+target_sources(libxaacdec
+ PRIVATE
+ "${XAAC_ROOT}/decoder/x86_64/ixheaacd_function_selector_x86_64.c"
+ "${XAAC_ROOT}/decoder/generic/ixheaacd_qmf_dec_generic.c")
diff --git a/decoder/x86_64/ixheaacd_function_selector_x86_64.c b/decoder/x86_64/ixheaacd_function_selector_x86_64.c
index 3eff5ac..8698005 100644
--- a/decoder/x86_64/ixheaacd_function_selector_x86_64.c
+++ b/decoder/x86_64/ixheaacd_function_selector_x86_64.c
@@ -45,6 +45,10 @@
#include "ixheaacd_lt_predict.h"
+#include "ixheaacd_cnst.h"
+#include "ixheaacd_ec_defines.h"
+#include "ixheaacd_ec_struct_def.h"
+
#include "ixheaacd_channelinfo.h"
#include "ixheaacd_drc_dec.h"
diff --git a/fuzzer/CMakeLists.txt b/fuzzer/CMakeLists.txt
new file mode 100644
index 0000000..ca26fd9
--- /dev/null
+++ b/fuzzer/CMakeLists.txt
@@ -0,0 +1,21 @@
+list(APPEND XAACDEC_SRCS
+ "${XAAC_ROOT}/fuzzer/xaac_dec_fuzzer.cpp")
+
+set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/test ${XAAC_ROOT}/decoder/drc_src)
+
+include_directories(${LIBXAACDEC_INCLUDES})
+
+add_executable(xaac_dec_fuzzer ${XAACDEC_SRCS})
+
+if(MSVC)
+ target_link_libraries(xaac_dec_fuzzer LINK_PUBLIC libxaacdec)
+else()
+ target_link_libraries(xaac_dec_fuzzer LINK_PUBLIC libxaacdec m)
+endif()
+
+set_target_properties(
+ xaac_dec_fuzzer
+ PROPERTIES
+ LINK_FLAGS
+ -fsanitize=fuzzer,${SANITIZE}
+) \ No newline at end of file
diff --git a/fuzzer/README.md b/fuzzer/README.md
index efa9907..97e4281 100644
--- a/fuzzer/README.md
+++ b/fuzzer/README.md
@@ -21,18 +21,13 @@ Create a directory inside libxaac and change directory
$ mkdir build
$ cd build
```
-Build libxaac using cmake
+
+Build fuzzer with required sanitizers (-DSANITIZE=fuzzer-no-link is mandatory to enable fuzzers)
```
- $ CC=clang CXX=clang++ cmake ../ \
- -DSANITIZE=fuzzer-no-link,address,signed-integer-overflow
+ $ cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
+ -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=fuzzer-no-link,address,\
+ signed-integer-overflow,unsigned-integer-overflow
$ make
- ```
-Build the fuzzer
-```
- $ clang++ -std=c++11 -fsanitize=fuzzer,address -I. -I../ -I../common \
- -I../decoder -I../decoder/drc_src -Wl,--start-group \
- ../fuzzer/xaac_dec_fuzzer.cpp -o ./xaac_dec_fuzzer ./libxaacdec.a \
- -Wl,--end-group
```
### Steps to run
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..46b47ff
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,24 @@
+list(APPEND XAACDEC_SRCS
+ "${XAAC_ROOT}/test/ixheaacd_error.c"
+ "${XAAC_ROOT}/test/ixheaacd_fileifc.c"
+ "${XAAC_ROOT}/test/ixheaacd_main.c"
+ "${XAAC_ROOT}/test/ixheaacd_metadata_read.c")
+
+set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/test ${XAAC_ROOT}/decoder/drc_src)
+
+include_directories(${LIBXAACDEC_INCLUDES})
+
+add_executable(xaacdec ${XAACDEC_SRCS})
+
+if(MSVC)
+ target_link_libraries(xaacdec LINK_PUBLIC libxaacdec)
+else()
+ target_link_libraries(xaacdec LINK_PUBLIC libxaacdec m)
+endif()
+
+set_target_properties(
+ xaacdec
+ PROPERTIES
+ COMPILE_FLAGS
+ "-UARM_PROFILE_HW -UARM_PROFILE_BOARD -DDRC_ENABLE -DMULTICHANNEL_ENABLE -DECLIPSE -DWIN32"
+)
diff --git a/test/ixheaacd_error.c b/test/ixheaacd_error.c
index b6ed649..048c95e 100644
--- a/test/ixheaacd_error.c
+++ b/test/ixheaacd_error.c
@@ -54,30 +54,26 @@ pWORD8 ixheaacd_ppb_api_fatal[IA_MAX_ERROR_SUB_CODE] = {
pWORD8 ixheaacd_ppb_config_non_fatal[IA_MAX_ERROR_SUB_CODE] = {
(pWORD8) "Invalid Output PCM WORD Size. Setting to default, 16 ",
(pWORD8) "Invalid Down-mix flag option. Setting to default, 0 ",
+ (pWORD8) "Invalid eSBR PS flag option. Setting to default, 0 ",
+ (pWORD8) "Invalid downmix to stereo flag option. Setting to default, 0 ",
(pWORD8) "Invalid interleave to stereo flag option. Setting to default, 1 ",
(pWORD8) "Invalid downsample flag option. Setting to default, 0 ",
- (pWORD8) "Invalid Frame OK option. Setting to default, 1 ",
- (pWORD8) "Invalid MP4 Flag option. Setting to default, 0 ",
+ (pWORD8) "Invalid peak limiter flag option. Setting to default, 1 ",
+ (pWORD8) "Invalid MP4 flag option. Setting to default, 0 ",
(pWORD8) "Invalid maximum number of channels. limiting to between 2 and 8",
(pWORD8) "Invalid instance for coupling channel. Setting to default 1",
- (pWORD8) "Following feature is not supported in this build. ",
- (pWORD8) "Invalid Disable Sync Flag option. Setting to default, 0 ",
+ (pWORD8) "Invalid error concealment flag option. Setting to default 0",
+ (pWORD8) "Invalid Disable Sync flag option. Setting to default, 0 ",
(pWORD8) "Invalid Auto SBR upsample option. Setting to default, 1 ",
- (pWORD8) "Invalid LOAS flag",
- (pWORD8) "Invalid DRC flag",
+ (pWORD8) "Invalid DRC heavy compression flag option. Setting to default 0",
(pWORD8) "Invalid DRC cut value",
(pWORD8) "Invalid DRC boost value",
(pWORD8) "Invalid DRC target",
(pWORD8) "Invalid Frame size",
(pWORD8) "Invalid LD testing flag option. Setting to default 0",
- (pWORD8) "Invalid delay mode",
- (pWORD8) "Invalid decode type",
- (pWORD8) "Invalid peak limiter flag",
- (pWORD8) "Invalid control param index",
- (pWORD8) "Inalid gain delay",
- (pWORD8) "Invalid constant delay mode",
(pWORD8) "Invalid effect type",
(pWORD8) "Invalid target loudness value",
+ (pWORD8) "Invalid HQ eSBR flag option. Setting to default 0",
(pWORD8) "Invalid frame length flag option. Setting to default 0"};
/* Fatal Errors */
pWORD8 ixheaacd_ppb_config_fatal[IA_MAX_ERROR_SUB_CODE] = {
@@ -88,44 +84,68 @@ pWORD8 ixheaacd_ppb_config_fatal[IA_MAX_ERROR_SUB_CODE] = {
/*****************************************************************************/
/* Non Fatal Errors */
pWORD8 ixheaacd_ppb_init_non_fatal[IA_MAX_ERROR_SUB_CODE] = {
- (pWORD8)"Both 16 kHz and 8 kHz output config set. Giving 16 kHz output",
- (pWORD8)"Output sampling frequency is 8 kHz, 16 kHz output disabled ",
- (pWORD8)"Header not found at the beginning of input data continuing syncing"
-};
+ (pWORD8) "Header not found at the beginning of input data continuing syncing",
+ (pWORD8) "Invalid number of QMF bands", (pWORD8) "Decoder initialization failed",
+ (pWORD8) "Input bytes insufficient for decoding", (pWORD8) "Error in AAC decoding"};
/* Fatal Errors */
pWORD8 ixheaacd_ppb_init_fatal[IA_MAX_ERROR_SUB_CODE] = {
(pWORD8) "AAC Decoder initialization failed",
(pWORD8) "End of input reached during initialization",
(pWORD8) "No. of channels in stream greater than max channels defined",
- (pWORD8) "AudioObjectType is not supported"};
+ (pWORD8) "Audio object type is not supported",
+ (pWORD8) "Decoder initialization failed",
+ (pWORD8) "Channel coupling not supported"};
/*****************************************************************************/
/* Class 3: Execution Errors
*/
/*****************************************************************************/
/* Non Fatal Errors */
pWORD8 ixheaacd_ppb_exe_non_fatal[IA_MAX_ERROR_SUB_CODE] = {
- (pWORD8)"ADTS syncronization is lost. Re-syncing",
- (pWORD8)"Though SBR was present in previous frame, not present in current frame (SBR turned off)",
- (pWORD8)"SBR was not present in previous frame, but it is present in current frame (SBR turned on)",
- (pWORD8)"ADTS Header CRC failed.Re-syncing",
- (pWORD8)"Input bytes insufficient for decoding",
- (pWORD8)"Element instance tag mismatch, because of new channel mode",
- (pWORD8)"max huffman decoded value exceeded",
- (pWORD8)"Error in AAC decoding",
- (pWORD8)"Scale factor exceeds the transmitted boundary",
- (pWORD8)"Gain control not supported",
- (pWORD8)"Filter Order of TNS data is greater than maximum order",
- (pWORD8)"LTP data found, not supported",
- (pWORD8)"The base sampling frequency has changed in ADTS header",
- (pWORD8)"Pulse Data exceeds the permitted boundary",
- (pWORD8)"Invalid code ixheaacd_book number in ia_huffman_data_type decoding",
-// (pWORD8)"The base sampling frequency has changed in ADTS header"
-};
+ (pWORD8) "ADTS syncronization is lost. Re-syncing",
+ (pWORD8) "Though SBR was present in previous frame, not present in current"
+ "frame (SBR turned off)",
+ (pWORD8) "SBR was not present in previous frame, but it is present in"
+ "current frame (SBR turned on)",
+ (pWORD8) "ADTS Header CRC failed.Re-syncing",
+ (pWORD8) "Input bytes insufficient for decoding",
+ (pWORD8) "Element instance tag mismatch, because of new channel mode",
+ (pWORD8) "max huffman decoded value exceeded",
+ (pWORD8) "Error in AAC decoding",
+ (pWORD8) "Scale factor exceeds the transmitted boundary",
+ (pWORD8) "Gain control not supported",
+ (pWORD8) "Filter Order of TNS data is greater than maximum order",
+ (pWORD8) "LTP data found, not supported",
+ (pWORD8) "The base sampling frequency has changed in ADTS header",
+ (pWORD8) "Pulse Data exceeds the permitted boundary",
+ (pWORD8) "Invalid code ixheaacd_book number in ia_huffman_data_type decoding",
+ (pWORD8) "Channel index not within allowed range",
+ (pWORD8) "Smoothing mode not within allowed range",
+ (pWORD8) "Smoothing time not within allowed range",
+ (pWORD8) "Extension type in the bitstream not within allowed range",
+ (pWORD8) "QMF update type in the bitstream not within allowed range",
+ (pWORD8) "Window type in the bitstream not within allowed range",
+ (pWORD8) "Evaluated sine parameter not within allowed range"};
/* Fatal Errors */
pWORD8 ixheaacd_ppb_exe_fatal[IA_MAX_ERROR_SUB_CODE] = {
(pWORD8) "Channel coupling not supported",
- (pWORD8) "TNS data range is errorneous", (pWORD8) "Invalid LOAS header",
- (pWORD8) "Invalid ER profile", (pWORD8) "Invalid DRC data"};
+ (pWORD8) "TNS data range is errorneous",
+ (pWORD8) "Invalid LOAS header",
+ (pWORD8) "Invalid DRC data",
+ (pWORD8) "MPS reshaping input not valid",
+ (pWORD8) "Tree config present in bit stream not valid",
+ (pWORD8) "Number of timeslots not valid",
+ (pWORD8) "MPS dequantization parameter not valid",
+ (pWORD8) "MPS quantization mode not valid",
+ (pWORD8) "MPS input channels not valid",
+ (pWORD8) "Bitstream data in arbitrary downmix spatial frame not valid",
+ (pWORD8) "Window sequence value not valid",
+ (pWORD8) "Temporal shape config in the bitstream not valid",
+ (pWORD8) "3D audio HRTF set present in the bitstream not valid",
+ (pWORD8) "TTT mode read from the bitstream not valid",
+ (pWORD8) "Number of OTT boxes in the bitstream not valid",
+ (pWORD8) "Number of parameter sets present in the bitstream not valid",
+ (pWORD8) "Mapping of index data failed during decoding",
+ (pWORD8) "Number of parameter bands present in the bitstream not valid"};
/*****************************************************************************/
/* error info structure */
@@ -301,9 +321,15 @@ IA_ERRORCODE ixheaacd_error_handler(ia_error_info_struct *p_mod_err_info,
return IA_NO_ERROR;
}
{
- WORD is_fatal = (((UWORD)code & 0x8000) >> 15);
- WORD err_class = (((UWORD)code & 0x7800) >> 11);
- WORD err_sub_code = (((UWORD)code & 0x07FF));
+ WORD is_fatal, err_class, err_sub_code;
+
+ if (code == IA_FATAL_ERROR)
+ is_fatal = 1;
+ else
+ is_fatal = (((UWORD)code & 0x8000) >> 15);
+
+ err_class = (((UWORD)code & 0x7800) >> 11);
+ err_sub_code = (((UWORD)code & 0x07FF));
if (!is_fatal) {
printf("non ");
diff --git a/test/ixheaacd_main.c b/test/ixheaacd_main.c
index a340d78..2c453c8 100644
--- a/test/ixheaacd_main.c
+++ b/test/ixheaacd_main.c
@@ -71,7 +71,7 @@ extern ia_error_info_struct ixheaacd_error_info;
#ifdef ARM_PROFILE_HW
#include <sys/time.h>
-#define CLK_FREQ_BOARD_MHZ 716 // a9 omap4430 board
+#define CLK_FREQ_BOARD_MHZ 716 // a9 omap4430 board
//#define CLK_FREQ_BOARD_MHZ 1555 //Nexus6P
//#define CLK_FREQ_BOARD_MHZ 2035 //Tegra Board
//#define CLK_FREQ_BOARD_MHZ 550 //a8 board
@@ -102,10 +102,13 @@ WORD32 mpeg_d_drc_on = 0;
metadata_info meta_info; // metadata pointer;
WORD32 ixheaacd_i_bytes_to_read;
+WORD32 prev_i_bytes_to_read;
+WORD32 flush_frame = 0;
FILE *g_pf_meta;
WORD32 raw_testing = 0;
WORD32 eld_testing = 0;
+WORD32 ec_enable = 0;
#define _IA_PRINT_ERROR(p_mod_err_info, context, e) \
if ((e) != IA_NO_ERROR) { \
@@ -383,13 +386,22 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
ia_error_info_struct *p_proc_err_info = &ixheaacd_error_info;
for (i = 0; i < argc; i++) {
+ /* To indicate if its a MP4 file or not. */
+ if (!strncmp((pCHAR8)argv[i], "-mp4:", 5)) {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 5);
+ UWORD32 ui_mp4_flag = atoi(pb_arg_val);
+ err_code = (*p_ia_process_api)(
+ p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG, &ui_mp4_flag);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
/* PCM WORD Size (For single input file) */
if (!strncmp((pCHAR8)argv[i], "-pcmsz:", 7)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 7);
UWORD32 ui_pcm_wd_sz = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ, &ui_pcm_wd_sz);
+ IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ, &ui_pcm_wd_sz);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* Down-mix stereo to mono. */
@@ -398,7 +410,23 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_down_mix = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX, &ui_down_mix);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX, &ui_down_mix);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ if (!strncmp((pCHAR8)argv[i], "-esbr_hq:", 9)) {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 9);
+ UWORD32 ui_esbr_hq = atoi(pb_arg_val);
+ err_code = (*p_ia_process_api)(
+ p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR, &ui_esbr_hq);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ if (!strncmp((pCHAR8)argv[i], "-esbr_ps:", 9)) {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 9);
+ UWORD32 ui_esbr_ps = atoi(pb_arg_val);
+ err_code = (*p_ia_process_api)(
+ p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE, &ui_esbr_ps);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
#ifdef RESAMPLE_SUPPORT
@@ -427,7 +455,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_to_stereo = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_TOSTEREO, &ui_to_stereo);
+ IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO, &ui_to_stereo);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* Downsampled synthesis to be used */
@@ -436,16 +464,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_dsample = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DSAMPLE, &ui_dsample);
- _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
- }
- /* To indicate if its a MP4 file or not. */
- if (!strncmp((pCHAR8)argv[i], "-mp4:", 5)) {
- pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 5);
- UWORD32 ui_mp4_flag = atoi(pb_arg_val);
- err_code = (*p_ia_process_api)(
- p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4, &ui_mp4_flag);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE, &ui_dsample);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -475,55 +494,71 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
#endif
#ifdef DRC_ENABLE
- if (!strncmp((pCHAR8)argv[i], "-drc:", 5)) {
- pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 5);
- UWORD32 ui_drc_enable = atoi(pb_arg_val);
- err_code = (*p_ia_process_api)(
- p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_ENABLE, &ui_drc_enable);
- _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
- }
if (!strncmp((pCHAR8)argv[i], "-drc_cut_fac:", 13)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 13);
- UWORD32 ui_drc_enable = atoi(pb_arg_val);
+ UWORD32 ui_drc_cut = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT, &ui_drc_enable);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT, &ui_drc_cut);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
if (!strncmp((pCHAR8)argv[i], "-drc_boost_fac:", 15)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 15);
- UWORD32 ui_drc_enable = atoi(pb_arg_val);
+ UWORD32 ui_drc_boost = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST, &ui_drc_enable);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST, &ui_drc_boost);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
if (!strncmp((pCHAR8)argv[i], "-drc_target_level:", 18)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 18);
- UWORD32 ui_drc_enable = atoi(pb_arg_val);
+ UWORD32 ui_drc_target = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL, &ui_drc_enable);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL, &ui_drc_target);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
if (!strncmp((pCHAR8)argv[i], "-drc_heavy_comp:", 16)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 16);
- UWORD32 ui_drc_enable = atoi(pb_arg_val);
+ UWORD32 ui_drc_heavy_comp = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP, &ui_drc_enable);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP, &ui_drc_heavy_comp);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
#endif
+ /* For MPEG-D DRC effect type */
+ if (!strncmp((pCHAR8)argv[i], "-effect:", 8)) {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 8);
+ WORD32 ui_effect = atoi(pb_arg_val);
+ err_code =
+ (*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE, &ui_effect);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ mpeg_d_drc_on = 1;
+ }
+ /* For MPEG-D DRC target loudness */
+ if (!strncmp((pCHAR8)argv[i], "-target_loudness:", 17)) {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 17);
+ WORD32 ui_target_loudness = atoi(pb_arg_val);
+ if ((ui_target_loudness > 0) || (ui_target_loudness < -63)) {
+ ui_target_loudness = 0;
+ }
+ ui_target_loudness = -(ui_target_loudness << 2);
+ err_code = (*p_ia_process_api)(
+ p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS, &ui_target_loudness);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ mpeg_d_drc_on = 1;
+ }
/* To indicate if its a MP4 file or not. */
if (!strncmp((pCHAR8)argv[i], "-nosync:", 8)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 8);
UWORD32 ui_disable_sync = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DISABLE_SYNC, &ui_disable_sync);
+ IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC, &ui_disable_sync);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* To indicate SBR upsampling. */
@@ -532,7 +567,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_auto_sbr_upsample = atoi(pb_arg_val);
err_code =
(*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE,
+ IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE,
&ui_auto_sbr_upsample);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -542,7 +577,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_fl_flag = atoi(pb_arg_val);
err_code =
(*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG,
+ IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG,
&ui_fl_flag);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -553,7 +588,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_samp_freq = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ, &ui_samp_freq);
+ IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ, &ui_samp_freq);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* To indicate the number of maximum channels */
@@ -562,7 +597,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_max_channel = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_MAX_CHANNEL, &ui_max_channel);
+ IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL, &ui_max_channel);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -572,7 +607,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_coupling_channel = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_COUP_CHANNEL, &ui_coupling_channel);
+ IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL, &ui_coupling_channel);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -582,7 +617,7 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_downmix = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DOWNMIX_STEREO, &ui_downmix);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO, &ui_downmix);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -592,41 +627,35 @@ IA_ERRORCODE ixheaacd_set_config_param(WORD32 argc, pWORD8 argv[],
UWORD32 ui_fs480 = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_FRAMESIZE, &ui_fs480);
+ IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE, &ui_fs480);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
- /*For MPEG-D DRC effect type*/
- if (!strncmp((pCHAR8)argv[i], "-effect:", 8)) {
- pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 8);
- WORD32 ui_effect = atoi(pb_arg_val);
- err_code =
- (*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE, &ui_effect);
- _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
- mpeg_d_drc_on = 1;
- }
- /*For MPEG-D DRC target loudness*/
- if (!strncmp((pCHAR8)argv[i], "-target_loudness:", 17)) {
- pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 17);
- WORD32 ui_target_loudness = atoi(pb_arg_val);
- if ((ui_target_loudness > 0) || (ui_target_loudness < -63)) {
- ui_target_loudness = 0;
- }
- ui_target_loudness = -(ui_target_loudness << 2);
- err_code = (*p_ia_process_api)(
- p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS, &ui_target_loudness);
- _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
- mpeg_d_drc_on = 1;
- }
if (!strncmp((pCHAR8)argv[i], "-ld_testing:", 12)) {
pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 12);
UWORD32 ld_testing = atoi(pb_arg_val);
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_LD_TESTING, &ld_testing);
+ IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING, &ld_testing);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ if (!strncmp((pCHAR8)argv[i], "-peak_limiter_off:", 18))
+ {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 18);
+ UWORD32 peak_limiter_flag = atoi(pb_arg_val);
+ err_code = (*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER, &peak_limiter_flag);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ /* For Error concealment */
+ if (!strncmp((pCHAR8)argv[i], "-err_conceal:", 13))
+ {
+ pCHAR8 pb_arg_val = (pCHAR8)(argv[i] + 13);
+ UWORD32 ui_err_conceal = atoi(pb_arg_val);
+ err_code = (*p_ia_process_api)(p_ia_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_ERROR_CONCEALMENT, &ui_err_conceal);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ ec_enable = ui_err_conceal;
}
}
@@ -665,7 +694,9 @@ IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
pWORD32 pi_samp_freq,
pWORD32 pi_num_chan,
pWORD32 pi_pcm_wd_sz,
- pWORD32 pi_channel_mask) {
+ pWORD32 pi_channel_mask,
+ pWORD32 pi_sbr_mode,
+ pWORD32 pi_aot) {
IA_ERRORCODE err_code = IA_NO_ERROR;
/* the process API function */
IA_ERRORCODE(*p_ia_process_api)
@@ -677,28 +708,28 @@ IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
{
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ, pi_samp_freq);
+ IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ, pi_samp_freq);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* Total Number of Channels */
{
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_NUM_CHANNELS, pi_num_chan);
+ IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS, pi_num_chan);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* PCM word size */
{
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ, pi_pcm_wd_sz);
+ IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ, pi_pcm_wd_sz);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
/* channel mask to tell the arrangement of channels in bit stream */
{
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MASK, pi_channel_mask);
+ IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK, pi_channel_mask);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
@@ -707,7 +738,7 @@ IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
UWORD32 ui_channel_mode;
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MODE, &ui_channel_mode);
+ IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MODE, &ui_channel_mode);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
if (ui_channel_mode == 0)
printf("Channel Mode: MONO_OR_PS\n");
@@ -724,7 +755,7 @@ IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
UWORD32 ui_sbr_mode;
err_code = (*p_ia_process_api)(
p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE, &ui_sbr_mode);
+ IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE, &ui_sbr_mode);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
if (ui_sbr_mode == 0)
printf("SBR Mode: NOT_PRESENT\n");
@@ -736,6 +767,15 @@ IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
printf("ESBR Mode: UPSAMPLING FACTOR 4\n");
else
printf("ui_sbr_mode not vaild\n");
+ *pi_sbr_mode = ui_sbr_mode;
+ }
+ {
+ UWORD32 ui_aot;
+ err_code = (*p_ia_process_api)(
+ p_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
+ IA_XHEAAC_DEC_CONFIG_PARAM_AOT, &ui_aot);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ *pi_aot = ui_aot;
}
return IA_NO_ERROR;
}
@@ -842,7 +882,7 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
WORD32 i_out_bytes, i_total_bytes = 0;
WORD32 i_samp_freq, i_num_chan, i_pcm_wd_sz, i_channel_mask;
- UWORD32 i_sbr_mode;
+ WORD32 i_sbr_mode;
WORD32 i_effect_type = 0;
WORD32 i_target_loudness = 0;
WORD32 i_loud_norm = 0;
@@ -861,7 +901,8 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
/* The get config from API */
IA_ERRORCODE(*p_get_config_param)
(pVOID p_ia_process_api_obj, pWORD32 pi_samp_freq, pWORD32 pi_num_chan,
- pWORD32 pi_pcm_wd_sz, pWORD32 pi_channel_mask);
+ pWORD32 pi_pcm_wd_sz, pWORD32 pi_channel_mask, pWORD32 pi_sbr_mode, pWORD32 pi_aot);
+ WORD32 ui_aot = 0;
/* The error init function */
VOID (*p_error_init)();
@@ -1099,16 +1140,9 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
err_code =
(*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq, &i_num_chan,
- &i_pcm_wd_sz, &i_channel_mask);
+ &i_pcm_wd_sz, &i_channel_mask, &i_sbr_mode, &ui_aot);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
- /*if (ui_type == IA_MEMTYPE_OUTPUT) {
- if (i_pcm_wd_sz == 16)
- ui_size = 11 * 2048 * sizeof(WORD16);
- else
- ui_size = 11 * 2048 * 3 * sizeof(WORD8);
- }*/
-
g_pv_arr_alloc_memory[g_w_malloc_count] = malloc(ui_size + ui_alignment);
if (g_pv_arr_alloc_memory[g_w_malloc_count] == NULL) {
@@ -1197,7 +1231,8 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
err_code =
(*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq,
- &i_num_chan, &i_pcm_wd_sz, &i_channel_mask);
+ &i_num_chan, &i_pcm_wd_sz, &i_channel_mask,
+ &i_sbr_mode, &ui_aot);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
// This is done in those cases, where file decodes ends at init time
@@ -1283,11 +1318,13 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
} while (!ui_init_done);
-
+ if (ec_enable == 1) {
+ mpeg_d_drc_on = 0;
+ }
if (mpeg_d_drc_on == 1) {
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE, &i_sbr_mode);
+ IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE, &i_sbr_mode);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
if (i_sbr_mode != 0) {
@@ -1308,7 +1345,7 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
err_code =
(*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq, &i_num_chan,
- &i_pcm_wd_sz, &i_channel_mask);
+ &i_pcm_wd_sz, &i_channel_mask, &i_sbr_mode, &ui_aot);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
/* Sampling Frequency */
@@ -1339,7 +1376,7 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
{
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE, &i_effect_type);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE, &i_effect_type);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
err_code =
@@ -1353,7 +1390,7 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
{
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS,
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS,
&i_target_loudness);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
@@ -1367,7 +1404,7 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
{
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_LOUD_NORM, &i_loud_norm);
+ IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUD_NORM, &i_loud_norm);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
err_code =
@@ -1592,11 +1629,18 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
/* ******************************************************************/
err_code = (*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq,
- &i_num_chan, &i_pcm_wd_sz, &i_channel_mask);
+ &i_num_chan, &i_pcm_wd_sz, &i_channel_mask,
+ &i_sbr_mode, &ui_aot);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
if (raw_testing) {
skip_samples = get_start_offset_in_samples(meta_info);
+ if (ui_aot >= 23) {
+ skip_samples = skip_samples - 2048;
+ if (skip_samples < 0) {
+ skip_samples = 0;
+ }
+ }
if (eld_testing == 0) total_samples = get_play_time_in_samples(meta_info);
}
@@ -1617,43 +1661,87 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
do {
if (((WORD32)ui_inp_size - (WORD32)(i_buff_size - i_bytes_consumed)) > 0) {
- for (i = 0; i < (i_buff_size - i_bytes_consumed); i++) {
- pb_inp_buf[i] = pb_inp_buf[i + i_bytes_consumed];
- }
-#ifdef ENABLE_LD_DEC
- if (0 != frame_counter) {
-#endif
- FileWrapper_Read(
- g_pf_inp,
- (unsigned char *)(pb_inp_buf + i_buff_size - i_bytes_consumed),
+ if (i_sbr_mode && (ui_aot < 23)) {
+ if (meta_info.ia_mp4_stsz_entries != frame_counter) {
+ for (i = 0; i < (i_buff_size - i_bytes_consumed); i++) {
+ pb_inp_buf[i] = pb_inp_buf[i + i_bytes_consumed];
+ }
+
+ FileWrapper_Read(
+ g_pf_inp,
+ (unsigned char *)(pb_inp_buf + i_buff_size - i_bytes_consumed),
+ ((WORD32)ui_inp_size - (WORD32)(i_buff_size - i_bytes_consumed)),
+ (pUWORD32)&i_bytes_read);
+
+ i_buff_size = i_buff_size - (i_bytes_consumed - i_bytes_read);
+
+ if ((i_buff_size <= 0) ||
+ ((err_code_reinit == 0x00001804) && i_bytes_read == 0)) {
+ i_buff_size = 0;
+ raw_testing = 0;
+ /* Tell that the input is over in this buffer */
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj,
+ IA_API_CMD_INPUT_OVER, 0, NULL);
+
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ }
+ } else {
+ for (i = 0; i < (i_buff_size - i_bytes_consumed); i++) {
+ pb_inp_buf[i] = pb_inp_buf[i + i_bytes_consumed];
+ }
+
+ FileWrapper_Read(g_pf_inp, (unsigned char *)(pb_inp_buf + i_buff_size -
+ i_bytes_consumed),
((WORD32)ui_inp_size - (WORD32)(i_buff_size - i_bytes_consumed)),
(pUWORD32)&i_bytes_read);
-#ifdef ENABLE_LD_DEC
- } else
- i_bytes_read = 0;
-#endif
- i_buff_size = i_buff_size - (i_bytes_consumed - i_bytes_read);
+ i_buff_size = i_buff_size - (i_bytes_consumed - i_bytes_read);
- if ((i_buff_size <= 0) ||
- ((err_code_reinit == 0x00001804) && i_bytes_read == 0)) {
- i_buff_size = 0;
- raw_testing = 0;
- /* Tell that the input is over in this buffer */
- err_code = (*p_ia_process_api)(pv_ia_process_api_obj,
- IA_API_CMD_INPUT_OVER, 0, NULL);
+ if ((i_buff_size <= 0) ||
+ ((err_code_reinit == 0x00001804) && i_bytes_read == 0)) {
+ i_buff_size = 0;
+ raw_testing = 0;
- _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj,
+ IA_API_CMD_INPUT_OVER, 0, NULL);
+
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
}
}
+ if (i_sbr_mode && (ui_aot < 23)) {
+ if (meta_info.ia_mp4_stsz_entries != frame_counter) {
+ if (raw_testing) {
+ ixheaacd_i_bytes_to_read =
+ get_metadata_dec_exec(meta_info, frame_counter);
+
+ if (ixheaacd_i_bytes_to_read > (WORD32)ui_inp_size)
+ return IA_FATAL_ERROR;
+ if (ixheaacd_i_bytes_to_read <= 0 && ec_enable == 0) {
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj,
+ IA_API_CMD_INPUT_OVER, 0, NULL);
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+
+ return IA_NO_ERROR;
+ }
+ err_code =
+ (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES,
+ 0, &ixheaacd_i_bytes_to_read);
+ } else {
+ err_code = (*p_ia_process_api)(
+ pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES, 0, &i_buff_size);
+ }
+ }
+ } else {
if (raw_testing) {
ixheaacd_i_bytes_to_read =
get_metadata_dec_exec(meta_info, frame_counter);
if (ixheaacd_i_bytes_to_read > (WORD32)ui_inp_size) return IA_FATAL_ERROR;
- if (ixheaacd_i_bytes_to_read <= 0) {
+ if (ixheaacd_i_bytes_to_read <= 0 && ec_enable == 0) {
err_code = (*p_ia_process_api)(pv_ia_process_api_obj,
IA_API_CMD_INPUT_OVER, 0, NULL);
@@ -1662,13 +1750,33 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
return IA_NO_ERROR;
}
- err_code =
- (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES,
- 0, &ixheaacd_i_bytes_to_read);
+ if (ec_enable == 1) {
+ if (ixheaacd_i_bytes_to_read != 0) {
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES, 0,
+ &ixheaacd_i_bytes_to_read);
+ } else {
+ if (i_buff_size != 0) {
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES, 0,
+ &i_buff_size);
+ }
+ }
+ } else {
+ err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES, 0,
+ &ixheaacd_i_bytes_to_read);
+ }
} else {
/* Set number of bytes to be processed */
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_SET_INPUT_BYTES, 0, &i_buff_size);
+
+ if (i_buff_size <= 0)
+ {
+ err_code = (*p_ia_process_api)(
+ pv_ia_process_api_obj, IA_API_CMD_INPUT_OVER, 0, NULL);
+
+ _IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
+ }
+ }
}
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
@@ -1771,14 +1879,18 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
if (err_code_reinit != 0) memset(pb_out_buf, 0, i_out_bytes);
- i_total_bytes += i_out_bytes;
-
+ if (i_sbr_mode && (ui_aot < 23)) {
+ if (frame_counter > 0)
+ i_total_bytes += i_out_bytes;
+ } else {
+ i_total_bytes += i_out_bytes;
+ }
if (mpegd_drc_present == 1) {
WORD32 is_config_changed = 0, apply_crossfade = 0;
err_code = (*p_ia_process_api)(
pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
- IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE, &i_sbr_mode);
+ IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE, &i_sbr_mode);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
if (i_sbr_mode != 0) {
@@ -1943,7 +2055,8 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
if (i_total_bytes <= skip_samples * i_num_chan * (i_pcm_wd_sz >> 3)) {
err_code =
(*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq,
- &i_num_chan, &i_pcm_wd_sz, &i_channel_mask);
+ &i_num_chan, &i_pcm_wd_sz, &i_channel_mask,
+ &i_sbr_mode, &ui_aot);
write_flag = 0;
} else {
@@ -1981,23 +2094,23 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
#endif
#else
#ifndef ARM_PROFILE_BOARD
+ if (i_sbr_mode && (ui_aot < 23)) {
+ if (frame_counter != 0) {
+ fwrite(pb_out_buf + ixheaacd_drc_offset, sizeof(WORD8), i_out_bytes,
+ g_pf_out);
+ fflush(g_pf_out);
+ }
+ } else {
fwrite(pb_out_buf + ixheaacd_drc_offset, sizeof(WORD8), i_out_bytes,
g_pf_out);
fflush(g_pf_out);
+ }
#endif
#endif
}
frame_counter++;
-#ifdef _DEBUG
- if (frame_counter == 80) frame_counter = frame_counter;
-// ui_exec_done=1;
-// frame_counter = frame_counter;
-
-// printf("frame_counter = %d\n", frame_counter);
-#endif
-
#ifdef ARM_PROFILE_HW
if (i_out_bytes != 0) {
int i_out_samples = i_out_bytes >> 2;
@@ -2032,9 +2145,9 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
fprintf(stdout, " Peak frame = %d\n", Peak_frame_b);
#endif
fprintf(stderr, "TOTAL FRAMES : [%5d] \n", frame_counter);
-
err_code = (*p_get_config_param)(pv_ia_process_api_obj, &i_samp_freq,
- &i_num_chan, &i_pcm_wd_sz, &i_channel_mask);
+ &i_num_chan, &i_pcm_wd_sz, &i_channel_mask,
+ &i_sbr_mode, &ui_aot);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
#ifdef WAV_HEADER
@@ -2075,69 +2188,97 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
/*****************************************************************************/
void print_usage() {
+#ifdef DISPLAY_MESSAGE
+ ia_lib_info_struct str_lib_info = {0};
+ ixheaacd_get_lib_id_strings(&str_lib_info);
+
+ ia_display_id_message(str_lib_info.p_lib_name, str_lib_info.p_version_num);
+#endif
printf("\n Usage \n");
- printf("\n <exceutable> -ifile:<input_file> -ofile:<out_file> [options]\n");
+ printf("\n <executable> -ifile:<input_file> -imeta:<meta_data_file> -ofile:<output_file> "
+ "[options]\n");
printf("\n[options] can be,");
+ printf("\n[-mp4:<mp4_flag>]");
printf("\n[-pcmsz:<pcmwordsize>]");
printf("\n[-dmix:<down_mix>]");
-#ifdef RESAMPLE_SUPPORT
- /* By default not available */
- printf("\n[-f08:<out_08khz>]");
- printf("\n[-f16:<out_16khz>]");
-#endif
+ printf("\n[-esbr_hq:<esbr_hq_flag>]");
+ printf("\n[-esbr_ps:<esbr_ps_flag>]");
printf("\n[-tostereo:<interleave_to_stereo>]");
printf("\n[-dsample:<down_sample_sbr>]");
- printf("\n[-fs:<RAW_sample_rate>]");
+ printf("\n[-drc_cut_fac:<drc_cut_factor>]");
+ printf("\n[-drc_boost_fac:<drc_boost_factor>]");
+ printf("\n[-drc_target_level:<drc_target_level>]");
+ printf("\n[-drc_heavy_comp:<drc_heavy_compression>]");
+ printf("\n[-effect:<effect_type>]");
+ printf("\n[-target_loudness:<target_loudness>]");
printf("\n[-nosync:<disable_sync>]");
printf("\n[-sbrup:<auto_sbr_upsample>]");
-
- printf("\n[-maxchannel:<maximum_num_channels>]");
printf("\n[-flflag:<framelength_flag>}");
+ printf("\n[-fs:<RAW_sample_rate>]");
+ printf("\n[-maxchannel:<maximum_num_channels>]");
#ifdef MULTICHANNEL_ENABLE
printf("\n[-coupchannel:<coupling_channel>]");
printf("\n[-downmix:<down_mix_stereo>]");
#endif
-
- printf("\n\nwhere, \n <inputfile> is the input AAC file name");
- printf("\n <outputfile> is the output file name");
- printf("\n <pcmwordsize> is the bits per sample info. Only 16 is valid");
-
- printf("\n <down_mix> is to enable/disable always mono output. Default 0");
-#ifdef RESAMPLE_SUPPORT
- printf("\n <out_08khz> is to enable/disable 8 kHz output. Default 0 ");
- printf("\n <out_16khz> is to enable/disable 16 kHz output. Default 0 ");
-#endif
+ printf("\n[-fs480:<ld_frame_size>]");
+ printf("\n[-ld_testing:<ld_testing_flag>]");
+ printf("\n[-peak_limiter_off:<peak_limiter_off_flag>]");
+ printf("\n[-err_conceal:<error_concealment_flag>]");
+ printf("\n\nwhere, \n <input_file> is the input AAC/HEAACv1/HEAACv2/USAC file name");
+ printf("\n <meta_data_file> is a text file which contains metadata.");
+ printf("\n To be given when -mp4:1 is enabled");
+ printf("\n <output_file> is the output file name");
+ printf("\n <mp4_flag> is a flag that should be set to 1 when passing ");
+ printf("\n raw stream along with meta data text file ");
+ printf("\n <pcmwordsize> is the bits per sample info. 16/24");
+ printf("\n <down_mix> is to enable/disable always mono output. Default 1");
+ printf("\n <esbr_hq_flag> is to enable/disable high quality eSBR. Default 0");
+ printf("\n <esbr_ps_flag> is to indicate eSBR with PS. Default 0");
printf("\n <interleave_to_stereo> is to enable/disable always ");
printf("\n interleaved to stereo output. Default 1 ");
printf("\n <down_sample_sbr> is to enable/disable down-sampled SBR ");
printf("\n output. Default auto identification from header");
- printf("\n <RAW_sample_rate> is to indicate the core AAC sample rate for");
- printf("\n a RAW stream. If this is specified no other file format");
- printf("\n headers are searched for. \n");
+ printf("\n <drc_cut_factor> is to set DRC cut factor value. Default value is 0");
+ printf("\n <drc_boost_factor> is to set DRC boost factor. Default value is 0");
+ printf("\n <drc_target_level> is to set DRC target reference level.");
+ printf("\n Default value is 108");
+ printf("\n <drc_heavy_compression> is to enable / disable DRC heavy compression.");
+ printf("\n Default value is 0");
+ printf("\n <effect_type> is set DRC effect type. Default value is 0");
+ printf("\n <target_loudness> is to set target loudness level.");
+ printf("\n Default value is -24");
printf("\n <disable_sync> is to disable the ADTS/ADIF sync search i.e");
printf("\n when enabled the decoder expects the header to ");
printf("\n be at the start of input buffer. Default 0");
- printf(
- "\n <auto_sbr_upsample> is to enable(1) or disable(0) auto SBR "
- "upsample ");
- printf(
- "\n in case of stream changing from SBR present to SBR not present. "
- "Default 1");
-
- printf("\n <maximum_num_channels> is the number of maxiumum ");
- printf("\n channels the input may have. Default is 6 (5.1)");
-
- printf("\n <framelength_flag> is flag for Decoding framelength of 1024 or 960.");
+ printf("\n <auto_sbr_upsample> is to enable(1) or disable(0) auto SBR "
+ "upsample ");
+ printf("\n in case of stream changing from SBR present to SBR not present. "
+ "Default 1");
+ printf("\n <framelength_flag> is flag for decoding framelength of 1024 or 960.");
printf("\n 1 to decode 960 frame length, 0 to decode 1024 frame length");
printf("\n Frame length value in the GA header will override this option.");
printf("\n Default 0 ");
-
+ printf("\n <RAW_sample_rate> is to indicate the core AAC sample rate for");
+ printf("\n a RAW stream. If this is specified no other file format");
+ printf("\n headers are searched for.");
+ printf("\n <maximum_num_channels> is the number of maxiumum ");
+ printf("\n channels the input may have. Default is 6 ");
+ printf("\n for multichannel libraries and 2 for stereo libraries");
#ifdef MULTICHANNEL_ENABLE
printf("\n <coupling_channel> is element instance tag of ");
printf("\n independent coupling channel to be mixed. Default is 0");
printf("\n <down_mix_stereo> is flag for Downmix. Give 1 to");
printf("\n get stereo (downmix) output. Default is 0");
#endif
+ printf("\n <ld_frame_size> is to indicate ld frame size.");
+ printf("\n 0 is for 512 frame length, 1 is for 480 frame length.");
+ printf("\n Default value is 512 (0)");
+ printf("\n <ld_testing_flag> is to enable / disable ld decoder testing.");
+ printf("\n Default value is 0");
+ printf("\n <peak_limiter_off_flag> is to enable / disable peak limiter.");
+ printf("\n Default value is 0");
+ printf("\n <error_concealment_flag> is to enable / disable error concealment.");
+ printf("\n Default value is 0\n\n");
}
/*******************************************************************************/
diff --git a/test/ixheaacd_metadata_read.c b/test/ixheaacd_metadata_read.c
index 6eda6a0..1b6ea88 100644
--- a/test/ixheaacd_metadata_read.c
+++ b/test/ixheaacd_metadata_read.c
@@ -155,7 +155,7 @@ int get_use_edit_list(metadata_info meta_info) {
}
int get_start_offset_in_samples(metadata_info meta_info) {
- return meta_info.startOffsetInSamples[0];
+ return (meta_info.startOffsetInSamples[0] + 2048);
}
int get_play_time_in_samples(metadata_info meta_info) {