comparison aac.h @ 7539:4fca7939ad48 libavcodec

More OKed hunks of the AAC decoder from SoC
author superdump
date Mon, 11 Aug 2008 11:16:06 +0000
parents a3f7ffdb676d
children a05954c505ab
comparison
equal deleted inserted replaced
7538:06c291f42d5f 7539:4fca7939ad48
41 ff_aac_spectral_bits[num], sizeof( ff_aac_spectral_bits[num][0]), sizeof( ff_aac_spectral_bits[num][0]), \ 41 ff_aac_spectral_bits[num], sizeof( ff_aac_spectral_bits[num][0]), sizeof( ff_aac_spectral_bits[num][0]), \
42 ff_aac_spectral_codes[num], sizeof(ff_aac_spectral_codes[num][0]), sizeof(ff_aac_spectral_codes[num][0]), \ 42 ff_aac_spectral_codes[num], sizeof(ff_aac_spectral_codes[num][0]), sizeof(ff_aac_spectral_codes[num][0]), \
43 size); 43 size);
44 44
45 #define MAX_CHANNELS 64 45 #define MAX_CHANNELS 64
46 #define MAX_ELEM_ID 16
46 47
47 #define IVQUANT_SIZE 1024 48 #define IVQUANT_SIZE 1024
48 49
49 enum AudioObjectType { 50 enum AudioObjectType {
50 AOT_NULL, 51 AOT_NULL,
74 AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise 75 AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise
75 AOT_ER_PARAM, ///< N Error Resilient Parametric 76 AOT_ER_PARAM, ///< N Error Resilient Parametric
76 AOT_SSC, ///< N SinuSoidal Coding 77 AOT_SSC, ///< N SinuSoidal Coding
77 }; 78 };
78 79
80 enum RawDataBlockType {
81 TYPE_SCE,
82 TYPE_CPE,
83 TYPE_CCE,
84 TYPE_LFE,
85 TYPE_DSE,
86 TYPE_PCE,
87 TYPE_FIL,
88 TYPE_END,
89 };
90
79 enum ExtensionPayloadID { 91 enum ExtensionPayloadID {
80 EXT_FILL, 92 EXT_FILL,
81 EXT_FILL_DATA, 93 EXT_FILL_DATA,
82 EXT_DATA_ELEMENT, 94 EXT_DATA_ELEMENT,
83 EXT_DYNAMIC_RANGE = 0xb, 95 EXT_DYNAMIC_RANGE = 0xb,
109 AAC_CHANNEL_BACK = 3, 121 AAC_CHANNEL_BACK = 3,
110 AAC_CHANNEL_LFE = 4, 122 AAC_CHANNEL_LFE = 4,
111 AAC_CHANNEL_CC = 5, 123 AAC_CHANNEL_CC = 5,
112 }; 124 };
113 125
126 /**
127 * The point during decoding at which channel coupling is applied.
128 */
129 enum CouplingPoint {
130 BEFORE_TNS,
131 BETWEEN_TNS_AND_IMDCT,
132 AFTER_IMDCT = 3,
133 };
134
135 /**
136 * Individual Channel Stream
137 */
138
139 /**
140 * Dynamic Range Control - decoded from the bitstream but not processed further.
141 */
142 typedef struct {
143 int pce_instance_tag; ///< Indicates with which program the DRC info is associated.
144 int dyn_rng_sgn[17]; ///< DRC sign information; 0 - positive, 1 - negative
145 int dyn_rng_ctl[17]; ///< DRC magnitude information
146 int exclude_mask[MAX_CHANNELS]; ///< Channels to be excluded from DRC processing.
147 int band_incr; ///< Number of DRC bands greater than 1 having DRC info.
148 int interpolation_scheme; ///< Indicates the interpolation scheme used in the SBR QMF domain.
149 int band_top[17]; ///< Indicates the top of the i-th DRC band in units of 4 spectral lines.
150 int prog_ref_level; /**< A reference level for the long-term program audio level for all
151 * channels combined.
152 */
153 } DynamicRangeControl;
154
114 typedef struct { 155 typedef struct {
115 int num_pulse; 156 int num_pulse;
116 int start; 157 int start;
117 int offset[4]; 158 int offset[4];
118 int amp[4]; 159 int amp[4];
132 MPEG4AudioConfig m4ac; 173 MPEG4AudioConfig m4ac;
133 174
134 int is_saved; ///< Set if elements have stored overlap from previous frame. 175 int is_saved; ///< Set if elements have stored overlap from previous frame.
135 DynamicRangeControl che_drc; 176 DynamicRangeControl che_drc;
136 177
178 /**
179 * @defgroup elements
180 * @{
181 */
137 enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the 182 enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
138 * first index as the first 4 raw data block types 183 * first index as the first 4 raw data block types
139 */ 184 */
185 ChannelElement * che[4][MAX_ELEM_ID];
186 /** @} */
140 187
141 /** 188 /**
142 * @defgroup tables Computed / set up during initialization. 189 * @defgroup tables Computed / set up during initialization.
143 * @{ 190 * @{
144 */ 191 */
145 MDCTContext mdct; 192 MDCTContext mdct;
146 MDCTContext mdct_small; 193 MDCTContext mdct_small;
147 DSPContext dsp; 194 DSPContext dsp;
195 int random_state;
148 /** @} */ 196 /** @} */
149 197
150 /** 198 /**
151 * @defgroup output Members used for output interleaving. 199 * @defgroup output Members used for output interleaving.
152 * @{ 200 * @{