• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2023 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_MPS_AAC_STRUCT_H
21 #define IXHEAACD_MPS_AAC_STRUCT_H
22 
23 #include "ixheaacd_defines.h"
24 
25 #define PNS_BAND_FLAGS_SIZE 16
26 #define MAX_WINDOWS 8
27 #define MAX_SFB_SHORT 16
28 #define MAXIMUM_LINES 4
29 
30 typedef struct {
31   WORD16 a_scale_factor[MAX_WINDOWS * MAX_SFB_SHORT];
32   WORD8 a_code_book[MAX_WINDOWS * MAX_SFB_SHORT];
33 } ia_mps_dec_residual_dynamic_data_struct;
34 
35 typedef struct {
36   WORD16 window_sequence;
37   WORD16 max_sf_bands;
38   WORD16 total_sf_bands;
39   WORD16 sampling_rate_index;
40   WORD16 window_groups;
41   WORD8 window_group_length[8];
42   WORD16 frame_length;
43 
44 } ia_mps_dec_residual_ics_info_struct;
45 
46 typedef struct {
47   WORD16 start_band;
48   WORD16 stop_band;
49   WORD8 direction;
50   WORD8 resolution;
51   WORD8 order;
52   WORD8 coeff[MAX_ORDER];
53 } ia_mps_dec_residual_filter_struct;
54 
55 typedef struct {
56   FLAG tns_data_present;
57   WORD8 number_of_filters[MAX_WINDOWS];
58   ia_mps_dec_residual_filter_struct filter[MAX_WINDOWS][MAX_FILTERS];
59 } ia_mps_dec_residual_tns_data;
60 
61 typedef struct {
62   FLAG pulse_data_present;
63   WORD16 number_pulse;
64   WORD16 pulse_start_band;
65   WORD8 pulse_offset[MAXIMUM_LINES];
66   WORD8 pulse_amp[MAXIMUM_LINES];
67 } ia_mps_dec_residual_pulse_data_struct;
68 
69 typedef struct {
70   UWORD8 pns_used[PNS_BAND_FLAGS_SIZE * 8];
71   WORD16 current_energy;
72   UWORD16 pns_active;
73 } ia_mps_dec_residual_pns_data_struct;
74 
75 typedef struct {
76   WORD16 *p_scale_factor;
77   WORD8 *p_code_book;
78   WORD32 *p_spectral_coefficient;
79   ia_mps_dec_residual_ics_info_struct ics_info;
80   ia_mps_dec_residual_tns_data tns_data;
81   ia_mps_dec_residual_pulse_data_struct pulse_data;
82   ia_mps_dec_residual_pns_data_struct pns_data;
83   WORD16 common_window;
84   WORD16 global_gain;
85   WORD32 *p_tns_scratch;
86 } ia_mps_dec_residual_channel_info_struct;
87 
88 typedef struct {
89   WORD16 sfb_long_idx[52];
90   WORD16 sfb_short_idx[16];
91 
92 } ia_mps_dec_residual_sfband_info_struct;
93 
94 #endif /* IXHEAACD_MPS_AAC_STRUCT_H */
95