• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_HYBRID_H
21 #define IXHEAACD_HYBRID_H
22 
23 #define HYBRID_FILTER_LENGTH 13
24 #define HYBRID_FILTER_DELAY 6
25 #define NO_QMF_CHANNELS_IN_HYBRID 3
26 #define NO_HYBRID_CHANNELS_LOW 2
27 #define NO_HYBRID_CHANNELS_HIGH 8
28 
29 #define NO_HYBRID_CHANNELS_2 2
30 #define NO_HYBRID_CHANNELS_4 4
31 #define NO_HYBRID_CHANNELS_8 8
32 #define NO_HYBRID_CHANNELS_12 12
33 #define MAX_NUM_QMF_CHANNELS 64
34 
35 #define REAL 0
36 #define CPLX 1
37 
38 typedef struct {
39   const WORD16 *ptr_resol;
40   WORD8 ptr_qmf_buf;
41   WORD32 *ptr_work_re;
42   WORD32 *ptr_work_im;
43   WORD32 *ptr_qmf_buf_re[NO_QMF_CHANNELS_IN_HYBRID];
44   WORD32 *ptr_qmf_buf_im[NO_QMF_CHANNELS_IN_HYBRID];
45   WORD32 *ptr_temp_re;
46   WORD32 *ptr_temp_im;
47 } ia_hybrid_struct;
48 
49 typedef struct {
50   WORD32 num_qmf_bands;
51   WORD32 frame_size;
52   WORD16 *ptr_resol;
53   FLOAT32 *ptr_work_re;
54   FLOAT32 *ptr_work_im;
55   FLOAT32 (*ptr_qmf_buf_re)[HYBRID_FILTER_LENGTH - 1];
56   FLOAT32 (*ptr_qmf_buf_im)[HYBRID_FILTER_LENGTH - 1];
57   FLOAT32 (*ptr_temp_re)[MAX_NUM_QMF_CHANNELS];
58   FLOAT32 (*ptr_temp_im)[MAX_NUM_QMF_CHANNELS];
59 } ia_hybrid_flt_struct;
60 
61 VOID ixheaacd_hybrid_analysis(const WORD32 *ptr_qmf_real, WORD32 *ptr_hyb_real,
62                               WORD32 *ptr_hyb_imag,
63                               ia_hybrid_struct *ptr_hybrid, WORD16 scale,
64                               ia_sbr_tables_struct *sbr_tables_ptr);
65 
66 #endif /* IXHEAACD_HYBRID_H */
67