aboutsummaryrefslogtreecommitdiff
path: root/decoder/ixheaacd_env_extr_part.h
blob: fc3854614caf85dd066d9780d500b207f3f9dc3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/******************************************************************************
 *                                                                            *
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *****************************************************************************
 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#ifndef IXHEAACD_ENV_EXTR_PART_H
#define IXHEAACD_ENV_EXTR_PART_H

#define SBR_NOT_INITIALIZED 0
#define UPSAMPLING 1
#define SBR_ACTIVE 2

#define SBR_MONO 1
#define SBR_STEREO 2
#define PS_STEREO 3

#define SBR_RESET 1

typedef struct {
  WORD16 num_sf_bands[2];
  WORD16 num_nf_bands;
  WORD16 num_mf_bands;
  WORD16 sub_band_start;
  WORD16 sub_band_end;
  WORD16 freq_band_tbl_lim[MAX_NUM_LIMITERS + 1];
  WORD16 num_lf_bands;
  WORD16 num_if_bands;
  WORD16 *freq_band_table[2];
  WORD16 freq_band_tbl_lo[MAX_FREQ_COEFFS / 2 + 1];
  WORD16 freq_band_tbl_hi[MAX_FREQ_COEFFS + 1];
  WORD16 freq_band_tbl_noise[MAX_NOISE_COEFFS + 1];
  WORD16 f_master_tbl[MAX_FREQ_COEFFS + 1];

  WORD16 qmf_sb_prev;
} ia_freq_band_data_struct;

typedef struct {
  WORD32 sync_state;
  FLAG err_flag;
  FLAG err_flag_prev;
  WORD16 num_time_slots;
  WORD16 time_step;
  WORD16 core_frame_size;
  WORD32 out_sampling_freq;

  WORD32 channel_mode;
  WORD16 amp_res;

  WORD16 start_freq;
  WORD16 stop_freq;
  WORD16 xover_band;
  WORD16 freq_scale;
  WORD16 alter_scale;
  WORD16 noise_bands;

  WORD16 limiter_bands;
  WORD16 limiter_gains;
  WORD16 interpol_freq;
  WORD16 smoothing_mode;
  ia_freq_band_data_struct *pstr_freq_band_data;

  WORD16 header_extra_1;
  WORD16 header_extra_2;
  WORD16 pre_proc_flag;

  WORD32 status;

  WORD32 sbr_ratio_idx;
  WORD32 upsamp_fac;
  WORD32 is_usf_4;
  WORD32 output_framesize;
  WORD32 usac_independency_flag;
  FLAG pvc_flag;
  FLAG hbe_flag;

  WORD32 esbr_start_up;
  WORD32 esbr_start_up_pvc;
  WORD32 usac_flag;
  UWORD8 pvc_mode;

} ia_sbr_header_data_struct;

typedef struct {
  WORD16 frame_class;
  WORD16 num_env;
  WORD16 transient_env;
  WORD16 num_noise_env;
  WORD16 border_vec[MAX_ENVELOPES + 1];
  WORD16 freq_res[MAX_ENVELOPES];
  WORD16 noise_border_vec[MAX_NOISE_ENVELOPES + 1];
} ia_frame_info_struct;

#endif