xref: /aosp_15_r20/external/libxaac/decoder/ixheaacd_acelp_com.h (revision 15dc779a375ca8b5125643b829a8aa4b70d7f451)
1*15dc779aSAndroid Build Coastguard Worker /******************************************************************************
2*15dc779aSAndroid Build Coastguard Worker  *                                                                            *
3*15dc779aSAndroid Build Coastguard Worker  * Copyright (C) 2018 The Android Open Source Project
4*15dc779aSAndroid Build Coastguard Worker  *
5*15dc779aSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
6*15dc779aSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
7*15dc779aSAndroid Build Coastguard Worker  * You may obtain a copy of the License at:
8*15dc779aSAndroid Build Coastguard Worker  *
9*15dc779aSAndroid Build Coastguard Worker  * http://www.apache.org/licenses/LICENSE-2.0
10*15dc779aSAndroid Build Coastguard Worker  *
11*15dc779aSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
12*15dc779aSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
13*15dc779aSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*15dc779aSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
15*15dc779aSAndroid Build Coastguard Worker  * limitations under the License.
16*15dc779aSAndroid Build Coastguard Worker  *
17*15dc779aSAndroid Build Coastguard Worker  *****************************************************************************
18*15dc779aSAndroid Build Coastguard Worker  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*15dc779aSAndroid Build Coastguard Worker */
20*15dc779aSAndroid Build Coastguard Worker #ifndef IXHEAACD_ACELP_COM_H
21*15dc779aSAndroid Build Coastguard Worker #define IXHEAACD_ACELP_COM_H
22*15dc779aSAndroid Build Coastguard Worker 
23*15dc779aSAndroid Build Coastguard Worker #define LEN_ABS_LEADER 37
24*15dc779aSAndroid Build Coastguard Worker #define LEN_SIGN_LEADER 226
25*15dc779aSAndroid Build Coastguard Worker #define LEN_I3 9
26*15dc779aSAndroid Build Coastguard Worker #define LEN_I4 28
27*15dc779aSAndroid Build Coastguard Worker 
28*15dc779aSAndroid Build Coastguard Worker extern const FLOAT32 ixheaacd_int_leave_gain_table[256];
29*15dc779aSAndroid Build Coastguard Worker 
30*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_rotated_gosset_mtx_dec(WORD32 qn, WORD32 code_book_idx,
31*15dc779aSAndroid Build Coastguard Worker                                      WORD32 kv[], WORD32 y[]);
32*15dc779aSAndroid Build Coastguard Worker 
33*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_residual_tool(WORD32 *a, WORD32 *x, WORD32 *y, WORD32 l,
34*15dc779aSAndroid Build Coastguard Worker                             WORD32 n);
35*15dc779aSAndroid Build Coastguard Worker 
36*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_synthesis_tool_float(FLOAT32 a[], FLOAT32 x[], FLOAT32 y[],
37*15dc779aSAndroid Build Coastguard Worker                                    WORD32 l, FLOAT32 mem[]);
38*15dc779aSAndroid Build Coastguard Worker 
39*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_synthesis_tool_float1(FLOAT32 a[], FLOAT32 x[], WORD32 l);
40*15dc779aSAndroid Build Coastguard Worker 
41*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_lpc_wt_synthesis_tool(FLOAT32 a[], FLOAT32 x[], WORD32 l);
42*15dc779aSAndroid Build Coastguard Worker 
43*15dc779aSAndroid Build Coastguard Worker WORD16 ixheaacd_rand_gen(WORD16 *seed);
44*15dc779aSAndroid Build Coastguard Worker 
45*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_preemphsis_tool(WORD32 *signal, WORD32 mu, WORD32 len,
46*15dc779aSAndroid Build Coastguard Worker                               WORD32 mem);
47*15dc779aSAndroid Build Coastguard Worker 
48*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_deemphsis_tool(FLOAT32 *signal, WORD32 len, FLOAT32 mem);
49*15dc779aSAndroid Build Coastguard Worker 
50*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_residual_tool_float(FLOAT32 *a, FLOAT32 *x, FLOAT32 *y, WORD32 l,
51*15dc779aSAndroid Build Coastguard Worker                                   WORD32 loop_count);
52*15dc779aSAndroid Build Coastguard Worker 
53*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_residual_tool_float1(FLOAT32 *a, FLOAT32 *x, FLOAT32 *y, WORD32 l,
54*15dc779aSAndroid Build Coastguard Worker                                    WORD32 loop_count);
55*15dc779aSAndroid Build Coastguard Worker 
56*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_preemphsis_tool_float(FLOAT32 *signal, FLOAT32 mu, WORD32 len,
57*15dc779aSAndroid Build Coastguard Worker                                     FLOAT32 mem);
58*15dc779aSAndroid Build Coastguard Worker 
59*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_lsp_to_lp_conversion(FLOAT32 *lsp, FLOAT32 *a);
60*15dc779aSAndroid Build Coastguard Worker 
61*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_lpc_coeff_wt_apply(FLOAT32 *a, FLOAT32 *ap);
62*15dc779aSAndroid Build Coastguard Worker 
63*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_acelp_pitch_sharpening(FLOAT32 *x, WORD32 pit_lag);
64*15dc779aSAndroid Build Coastguard Worker 
65*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_acelp_decode_pulses_per_track(WORD32 index[], const WORD16 nbbits,
66*15dc779aSAndroid Build Coastguard Worker                                             FLOAT32 code[]);
67*15dc779aSAndroid Build Coastguard Worker 
68*15dc779aSAndroid Build Coastguard Worker #endif
69