• 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_ENV_EXTR_PART_H
21 #define IXHEAACD_ENV_EXTR_PART_H
22 
23 #define SBR_NOT_INITIALIZED 0
24 #define UPSAMPLING 1
25 #define SBR_ACTIVE 2
26 
27 #define SBR_MONO 1
28 #define SBR_STEREO 2
29 #define PS_STEREO 3
30 
31 #define SBR_RESET 1
32 
33 typedef struct {
34   WORD16 num_sf_bands[2];
35   WORD16 num_nf_bands;
36   WORD16 num_mf_bands;
37   WORD16 sub_band_start;
38   WORD16 sub_band_end;
39   WORD16 freq_band_tbl_lim[MAX_NUM_LIMITERS + 1];
40   WORD16 num_lf_bands;
41   WORD16 num_if_bands;
42   WORD16 *freq_band_table[2];
43   WORD16 freq_band_tbl_lo[MAX_FREQ_COEFFS / 2 + 1];
44   WORD16 freq_band_tbl_hi[MAX_FREQ_COEFFS + 1];
45   WORD16 freq_band_tbl_noise[MAX_NOISE_COEFFS + 1];
46   WORD16 f_master_tbl[MAX_FREQ_COEFFS + 1];
47 
48   WORD16 qmf_sb_prev;
49 } ia_freq_band_data_struct;
50 
51 typedef struct {
52   WORD32 sync_state;
53   FLAG err_flag;
54   FLAG err_flag_prev;
55   WORD16 num_time_slots;
56   WORD16 time_step;
57   WORD16 core_frame_size;
58   WORD32 out_sampling_freq;
59 
60   WORD32 channel_mode;
61   WORD16 amp_res;
62 
63   WORD16 start_freq;
64   WORD16 stop_freq;
65   WORD16 xover_band;
66   WORD16 freq_scale;
67   WORD16 alter_scale;
68   WORD16 noise_bands;
69 
70   WORD16 limiter_bands;
71   WORD16 limiter_gains;
72   WORD16 interpol_freq;
73   WORD16 smoothing_mode;
74   ia_freq_band_data_struct *pstr_freq_band_data;
75 
76   WORD16 header_extra_1;
77   WORD16 header_extra_2;
78   WORD16 pre_proc_flag;
79 
80   WORD32 status;
81 
82   WORD32 sbr_ratio_idx;
83   WORD32 upsamp_fac;
84   WORD32 is_usf_4;
85   WORD32 output_framesize;
86   WORD32 usac_independency_flag;
87   FLAG pvc_flag;
88   FLAG hbe_flag;
89 
90   WORD32 esbr_start_up;
91   WORD32 esbr_start_up_pvc;
92   WORD32 usac_flag;
93   UWORD8 pvc_mode;
94 
95 } ia_sbr_header_data_struct;
96 
97 typedef struct {
98   WORD16 frame_class;
99   WORD16 num_env;
100   WORD16 transient_env;
101   WORD16 num_noise_env;
102   WORD16 border_vec[MAX_ENVELOPES + 1];
103   WORD16 freq_res[MAX_ENVELOPES];
104   WORD16 noise_border_vec[MAX_NOISE_ENVELOPES + 1];
105 } ia_frame_info_struct;
106 
107 #endif
108