1 /****************************************************************************** 2 * * 3 * Copyright (C) 2018 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 #ifndef IXHEAACD_INTERFACE_H 21 #define IXHEAACD_INTERFACE_H 22 23 enum { 24 LN = 2048, 25 SN = 256, 26 LN2 = LN / 2, 27 SN2 = SN / 2, 28 LN4 = LN / 4, 29 SN4 = SN / 4, 30 NSHORT = LN / SN, 31 MAX_SBK = NSHORT, 32 33 MAXBANDS = 16 * NSHORT, 34 MAXFAC = 121, 35 MIDFAC = (MAXFAC - 1) / 2, 36 SF_OFFSET = 100, 37 38 LEN_TAG = 4, 39 LEN_MAX_SFBS = 4, 40 LEN_MAX_SFBL = 6, 41 LEN_SAMP_IDX = 4, 42 LEN_PC_COMM = 8, 43 }; 44 45 WORD32 ixheaacd_dec_main(VOID *handle, WORD8 *inbuffer, WORD8 *outbuffer, 46 WORD32 *out_bytes, WORD32 frames_done, WORD32 pcmsize, 47 WORD32 *num_channel_out); 48 49 VOID ixheaacd_complex_fft_p3(WORD32 *xr, WORD32 *xi, WORD32 nlength, 50 WORD32 fft_mode, WORD32 *preshift); 51 52 VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength, 53 WORD32 fft_mode, WORD32 *preshift); 54 55 VOID ixheaacd_complex_fft_p2_armv7(WORD32 *xr, WORD32 *xi, WORD32 nlength, 56 WORD32 fft_mode, WORD32 *preshift); 57 58 VOID ixheaacd_mps_complex_fft_64_dec(WORD32 *ptr_x, WORD32 *fin_re, 59 WORD32 *fin_im, WORD32 nlength); 60 61 VOID ixheaacd_mps_complex_fft_64_armv7(WORD32 *ptr_x, WORD32 *fin_re, 62 WORD32 *fin_im, WORD32 nlength); 63 64 VOID ixheaacd_mps_complex_fft_64_asm(const WORD32 *table, WORD32 nlength, 65 WORD32 *ptr_x, WORD32 *ptr_y, 66 const WORD8 *table2); 67 68 VOID ixheaacd_complex_ifft_p2_asm(const WORD32 *table, WORD32 nlength, 69 WORD32 *ptr_x, WORD32 *ptr_y); 70 71 VOID ixheaacd_complex_fft_p2_asm(const WORD32 *table, WORD32 nlength, 72 WORD32 *ptr_x, WORD32 *ptr_y); 73 74 VOID ixheaacd_mps_synt_pre_twiddle_dec(WORD32 *ptr_in, const WORD32 *table_re, 75 const WORD32 *table_im, 76 WORD32 resolution); 77 78 VOID ixheaacd_mps_synt_pre_twiddle_armv7(WORD32 *ptr_in, const WORD32 *table_re, 79 const WORD32 *table_im, 80 WORD32 resolution); 81 82 VOID ixheaacd_mps_synt_post_twiddle_dec(WORD32 *ptr_in, const WORD32 *table_re, 83 const WORD32 *table_im, 84 WORD32 resolution); 85 86 VOID ixheaacd_mps_synt_post_twiddle_armv7(WORD32 *ptr_in, 87 const WORD32 *table_re, 88 const WORD32 *table_im, 89 WORD32 resolution); 90 91 VOID ixheaacd_calc_pre_twid_dec(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr, 92 WORD32 nlength, const WORD32 *cos_ptr, 93 const WORD32 *sin_ptr); 94 95 VOID ixheaacd_calc_pre_twid_armv7(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr, 96 WORD32 nlength, const WORD32 *cos_ptr, 97 const WORD32 *sin_ptr); 98 99 VOID ixheaacd_calc_post_twid_dec(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr, 100 WORD32 nlength, const WORD32 *cos_ptr, 101 const WORD32 *sin_ptr); 102 103 VOID ixheaacd_calc_post_twid_armv7(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr, 104 WORD32 nlength, const WORD32 *cos_ptr, 105 const WORD32 *sin_ptr); 106 107 VOID ixheaacd_mps_synt_post_fft_twiddle_dec(WORD32 resolution, WORD32 *fin_re, 108 WORD32 *fin_im, 109 const WORD32 *table_re, 110 const WORD32 *table_im, 111 WORD32 *state); 112 113 VOID ixheaacd_mps_synt_post_fft_twiddle_armv7(WORD32 resolution, WORD32 *fin_re, 114 WORD32 *fin_im, 115 const WORD32 *table_re, 116 const WORD32 *table_im, 117 WORD32 *state); 118 119 VOID ixheaacd_mps_synt_out_calc_dec(WORD32 resolution, WORD32 *out, 120 WORD32 *state, const WORD32 *filter_coeff); 121 122 VOID ixheaacd_mps_synt_out_calc_armv7(WORD32 resolution, WORD32 *out, 123 WORD32 *state, 124 const WORD32 *filter_coeff); 125 #endif /* #ifndef IXHEAACD_INTERFACE_H */ 126