FFmpeg
aacdec_proc_template.c
Go to the documentation of this file.
1 /*
2  * AAC decoder
3  * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
4  * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
5  * Copyright (c) 2008-2013 Alex Converse <alex.converse@gmail.com>
6  *
7  * AAC LATM decoder
8  * Copyright (c) 2008-2010 Paul Kendall <paul@kcbbs.gen.nz>
9  * Copyright (c) 2010 Janne Grunau <janne-libav@jannau.net>
10  *
11  * AAC decoder fixed-point implementation
12  * Copyright (c) 2013
13  * MIPS Technologies, Inc., California.
14  *
15  * This file is part of FFmpeg.
16  *
17  * FFmpeg is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * FFmpeg is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with FFmpeg; if not, write to the Free Software
29  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30  */
31 
32 /**
33  * linear congruential pseudorandom number generator
34  *
35  * @param previous_val pointer to the current state of the generator
36  *
37  * @return Returns a 32-bit pseudorandom integer
38  */
39 static av_always_inline int lcg_random(unsigned previous_val)
40 {
41  union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
42  return v.s;
43 }
44 
45 /**
46  * Decode spectral data; reference: table 4.50.
47  * Dequantize and scale spectral data; reference: 4.6.3.3.
48  *
49  * @param coef array of dequantized, scaled spectral data
50  * @param sf array of scalefactors or intensity stereo positions
51  * @param pulse_present set if pulses are present
52  * @param pulse pointer to pulse data struct
53  * @param band_type array of the used band type
54  *
55  * @return Returns error status. 0 - OK, !0 - error
56  */
58  GetBitContext *gb,
59  const Pulse *pulse,
61 {
62  int i, k, g, idx = 0;
63  INTFLOAT *coef = sce->AAC_RENAME(coeffs);
64  IndividualChannelStream *ics = &sce->ics;
65  const int c = 1024 / ics->num_windows;
66  const uint16_t *offsets = ics->swb_offset;
67  const INTFLOAT *sf = sce->AAC_RENAME(sf);
68  const enum BandType *band_type = sce->band_type;
69  INTFLOAT *coef_base = coef;
70 
71  for (g = 0; g < ics->num_windows; g++)
72  memset(coef + g * 128 + offsets[ics->max_sfb], 0,
73  sizeof(INTFLOAT) * (c - offsets[ics->max_sfb]));
74 
75  for (g = 0; g < ics->num_window_groups; g++) {
76  unsigned g_len = ics->group_len[g];
77 
78  for (i = 0; i < ics->max_sfb; i++, idx++) {
79  const unsigned cbt_m1 = band_type[idx] - 1;
80  INTFLOAT *cfo = coef + offsets[i];
81  int off_len = offsets[i + 1] - offsets[i];
82  int group;
83 
84  if (cbt_m1 >= INTENSITY_BT2 - 1) {
85  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
86  memset(cfo, 0, off_len * sizeof(*cfo));
87  }
88  } else if (cbt_m1 == NOISE_BT - 1) {
89  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
90  INTFLOAT band_energy;
91 #if USE_FIXED
92  for (k = 0; k < off_len; k++) {
93  ac->random_state = lcg_random(ac->random_state);
94  cfo[k] = ac->random_state >> 3;
95  }
96 
97  band_energy = ac->fdsp->scalarproduct_fixed(cfo, cfo, off_len);
98  band_energy = fixed_sqrt(band_energy, 31);
99  noise_scale(cfo, sf[idx], band_energy, off_len);
100 #else
101  float scale;
102 
103  for (k = 0; k < off_len; k++) {
104  ac->random_state = lcg_random(ac->random_state);
105  cfo[k] = ac->random_state;
106  }
107 
108  band_energy = ac->fdsp->scalarproduct_float(cfo, cfo, off_len);
109  scale = sf[idx] / sqrtf(band_energy);
110  ac->fdsp->vector_fmul_scalar(cfo, cfo, scale, off_len);
111 #endif /* USE_FIXED */
112  }
113  } else {
114 #if !USE_FIXED
115  const float *vq = ff_aac_codebook_vector_vals[cbt_m1];
116 #endif /* !USE_FIXED */
117  const VLCElem *vlc_tab = ff_vlc_spectral[cbt_m1];
118  OPEN_READER(re, gb);
119 
120  switch (cbt_m1 >> 1) {
121  case 0:
122  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
123  INTFLOAT *cf = cfo;
124  int len = off_len;
125 
126  do {
127  int code;
128  unsigned cb_idx;
129 
130  UPDATE_CACHE(re, gb);
131  GET_VLC(code, re, gb, vlc_tab, 8, 2);
132  cb_idx = code;
133 #if USE_FIXED
134  cf = DEC_SQUAD(cf, cb_idx);
135 #else
136  cf = VMUL4(cf, vq, cb_idx, sf + idx);
137 #endif /* USE_FIXED */
138  } while (len -= 4);
139  }
140  break;
141 
142  case 1:
143  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
144  INTFLOAT *cf = cfo;
145  int len = off_len;
146 
147  do {
148  int code;
149  unsigned nnz;
150  unsigned cb_idx;
151  uint32_t bits;
152 
153  UPDATE_CACHE(re, gb);
154  GET_VLC(code, re, gb, vlc_tab, 8, 2);
155  cb_idx = code;
156  nnz = cb_idx >> 8 & 15;
157  bits = nnz ? GET_CACHE(re, gb) : 0;
158  LAST_SKIP_BITS(re, gb, nnz);
159 #if USE_FIXED
160  cf = DEC_UQUAD(cf, cb_idx, bits);
161 #else
162  cf = VMUL4S(cf, vq, cb_idx, bits, sf + idx);
163 #endif /* USE_FIXED */
164  } while (len -= 4);
165  }
166  break;
167 
168  case 2:
169  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
170  INTFLOAT *cf = cfo;
171  int len = off_len;
172 
173  do {
174  int code;
175  unsigned cb_idx;
176 
177  UPDATE_CACHE(re, gb);
178  GET_VLC(code, re, gb, vlc_tab, 8, 2);
179  cb_idx = code;
180 #if USE_FIXED
181  cf = DEC_SPAIR(cf, cb_idx);
182 #else
183  cf = VMUL2(cf, vq, cb_idx, sf + idx);
184 #endif /* USE_FIXED */
185  } while (len -= 2);
186  }
187  break;
188 
189  case 3:
190  case 4:
191  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
192  INTFLOAT *cf = cfo;
193  int len = off_len;
194 
195  do {
196  int code;
197  unsigned nnz;
198  unsigned cb_idx;
199  unsigned sign;
200 
201  UPDATE_CACHE(re, gb);
202  GET_VLC(code, re, gb, vlc_tab, 8, 2);
203  cb_idx = code;
204  nnz = cb_idx >> 8 & 15;
205  sign = nnz ? SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12) : 0;
206  LAST_SKIP_BITS(re, gb, nnz);
207 #if USE_FIXED
208  cf = DEC_UPAIR(cf, cb_idx, sign);
209 #else
210  cf = VMUL2S(cf, vq, cb_idx, sign, sf + idx);
211 #endif /* USE_FIXED */
212  } while (len -= 2);
213  }
214  break;
215 
216  default:
217  for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
218 #if USE_FIXED
219  int *icf = cfo;
220  int v;
221 #else
222  float *cf = cfo;
223  uint32_t *icf = (uint32_t *) cf;
224 #endif /* USE_FIXED */
225  int len = off_len;
226 
227  do {
228  int code;
229  unsigned nzt, nnz;
230  unsigned cb_idx;
231  uint32_t bits;
232  int j;
233 
234  UPDATE_CACHE(re, gb);
235  GET_VLC(code, re, gb, vlc_tab, 8, 2);
236  cb_idx = code;
237 
238  if (cb_idx == 0x0000) {
239  *icf++ = 0;
240  *icf++ = 0;
241  continue;
242  }
243 
244  nnz = cb_idx >> 12;
245  nzt = cb_idx >> 8;
246  bits = SHOW_UBITS(re, gb, nnz) << (32-nnz);
247  LAST_SKIP_BITS(re, gb, nnz);
248 
249  for (j = 0; j < 2; j++) {
250  if (nzt & 1<<j) {
251  uint32_t b;
252  int n;
253  /* The total length of escape_sequence must be < 22 bits according
254  to the specification (i.e. max is 111111110xxxxxxxxxxxx). */
255  UPDATE_CACHE(re, gb);
256  b = GET_CACHE(re, gb);
257  b = 31 - av_log2(~b);
258 
259  if (b > 8) {
260  av_log(ac->avctx, AV_LOG_ERROR, "error in spectral data, ESC overflow\n");
261  return AVERROR_INVALIDDATA;
262  }
263 
264  SKIP_BITS(re, gb, b + 1);
265  b += 4;
266  n = (1 << b) + SHOW_UBITS(re, gb, b);
267  LAST_SKIP_BITS(re, gb, b);
268 #if USE_FIXED
269  v = n;
270  if (bits & 1U<<31)
271  v = -v;
272  *icf++ = v;
273 #else
274  *icf++ = ff_cbrt_tab[n] | (bits & 1U<<31);
275 #endif /* USE_FIXED */
276  bits <<= 1;
277  } else {
278 #if USE_FIXED
279  v = cb_idx & 15;
280  if (bits & 1U<<31)
281  v = -v;
282  *icf++ = v;
283 #else
284  unsigned v = ((const uint32_t*)vq)[cb_idx & 15];
285  *icf++ = (bits & 1U<<31) | v;
286 #endif /* USE_FIXED */
287  bits <<= !!v;
288  }
289  cb_idx >>= 4;
290  }
291  } while (len -= 2);
292 #if !USE_FIXED
293  ac->fdsp->vector_fmul_scalar(cfo, cfo, sf[idx], off_len);
294 #endif /* !USE_FIXED */
295  }
296  }
297 
298  CLOSE_READER(re, gb);
299  }
300  }
301  coef += g_len << 7;
302  }
303 
304  if (pulse) {
305  idx = 0;
306  for (i = 0; i < pulse->num_pulse; i++) {
307  INTFLOAT co = coef_base[ pulse->pos[i] ];
308  while (offsets[idx + 1] <= pulse->pos[i])
309  idx++;
310  if (band_type[idx] != NOISE_BT && sf[idx]) {
311  INTFLOAT ico = -pulse->amp[i];
312 #if USE_FIXED
313  if (co) {
314  ico = co + (co > 0 ? -ico : ico);
315  }
316  coef_base[ pulse->pos[i] ] = ico;
317 #else
318  if (co) {
319  co /= sf[idx];
320  ico = co / sqrtf(sqrtf(fabsf(co))) + (co > 0 ? -ico : ico);
321  }
322  coef_base[ pulse->pos[i] ] = cbrtf(fabsf(ico)) * ico * sf[idx];
323 #endif /* USE_FIXED */
324  }
325  }
326  }
327 #if USE_FIXED
328  coef = coef_base;
329  idx = 0;
330  for (g = 0; g < ics->num_window_groups; g++) {
331  unsigned g_len = ics->group_len[g];
332 
333  for (i = 0; i < ics->max_sfb; i++, idx++) {
334  const unsigned cbt_m1 = band_type[idx] - 1;
335  int *cfo = coef + offsets[i];
336  int off_len = offsets[i + 1] - offsets[i];
337  int group;
338 
339  if (cbt_m1 < NOISE_BT - 1) {
340  for (group = 0; group < (int)g_len; group++, cfo+=128) {
341  vector_pow43(cfo, off_len);
342  subband_scale(cfo, cfo, sf[idx], 34, off_len, ac->avctx);
343  }
344  }
345  }
346  coef += g_len << 7;
347  }
348 #endif /* USE_FIXED */
349  return 0;
350 }
351 
352 /**
353  * Decode coupling_channel_element; reference: table 4.8.
354  *
355  * @return Returns error status. 0 - OK, !0 - error
356  */
358 {
359  int num_gain = 0;
360  int c, g, sfb, ret;
361  int sign;
362  INTFLOAT scale;
363  SingleChannelElement *sce = &che->ch[0];
364  ChannelCoupling *coup = &che->coup;
365 
366  coup->coupling_point = 2 * get_bits1(gb);
367  coup->num_coupled = get_bits(gb, 3);
368  for (c = 0; c <= coup->num_coupled; c++) {
369  num_gain++;
370  coup->type[c] = get_bits1(gb) ? TYPE_CPE : TYPE_SCE;
371  coup->id_select[c] = get_bits(gb, 4);
372  if (coup->type[c] == TYPE_CPE) {
373  coup->ch_select[c] = get_bits(gb, 2);
374  if (coup->ch_select[c] == 3)
375  num_gain++;
376  } else
377  coup->ch_select[c] = 2;
378  }
379  coup->coupling_point += get_bits1(gb) || (coup->coupling_point >> 1);
380 
381  sign = get_bits(gb, 1);
382 #if USE_FIXED
383  scale = get_bits(gb, 2);
384 #else
385  scale = cce_scale[get_bits(gb, 2)];
386 #endif
387 
388  if ((ret = ff_aac_decode_ics(ac, sce, gb, 0, 0)))
389  return ret;
390 
391  for (c = 0; c < num_gain; c++) {
392  int idx = 0;
393  int cge = 1;
394  int gain = 0;
395  INTFLOAT gain_cache = FIXR10(1.);
396  if (c) {
397  cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb);
398  gain = cge ? get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - 60: 0;
399  gain_cache = GET_GAIN(scale, gain);
400 #if USE_FIXED
401  if ((abs(gain_cache)-1024) >> 3 > 30)
402  return AVERROR(ERANGE);
403 #endif
404  }
405  if (coup->coupling_point == AFTER_IMDCT) {
406  coup->gain[c][0] = gain_cache;
407  } else {
408  for (g = 0; g < sce->ics.num_window_groups; g++) {
409  for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) {
410  if (sce->band_type[idx] != ZERO_BT) {
411  if (!cge) {
412  int t = get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - 60;
413  if (t) {
414  int s = 1;
415  t = gain += t;
416  if (sign) {
417  s -= 2 * (t & 0x1);
418  t >>= 1;
419  }
420  gain_cache = GET_GAIN(scale, t) * s;
421 #if USE_FIXED
422  if ((abs(gain_cache)-1024) >> 3 > 30)
423  return AVERROR(ERANGE);
424 #endif
425  }
426  }
427  coup->gain[c][idx] = gain_cache;
428  }
429  }
430  }
431  }
432  }
433  return 0;
434 }
435 
437 {
438 #define SET(member) aac_proc->member = AAC_RENAME(member)
440  SET(decode_cce);
441 #undef SET
442 #define SET(member) aac_proc->member = AV_JOIN(ff_aac_, AAC_RENAME(member));
443  SET(sbr_ctx_alloc_init);
444  SET(sbr_decode_extension);
445  SET(sbr_apply);
446  SET(sbr_ctx_close);
447 #undef SET
448 }
ChannelCoupling::type
enum RawDataBlockType type[8]
Type of channel element to be coupled - SCE or CPE.
Definition: aacdec.h:199
decode_spectrum_and_dequant
static int AAC_RENAME() decode_spectrum_and_dequant(AACDecContext *ac, GetBitContext *gb, const Pulse *pulse, SingleChannelElement *sce)
Decode spectral data; reference: table 4.50.
Definition: aacdec_proc_template.c:57
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
GET_GAIN
#define GET_GAIN(x, y)
Definition: aac_defines.h:112
VMUL2
static float * VMUL2(float *dst, const float *v, unsigned idx, const float *scale)
Dequantization-related.
Definition: aacdec_float.c:92
u
#define u(width, name, range_min, range_max)
Definition: cbs_h2645.c:251
aac_proc_init
static av_cold void AAC_RENAME() aac_proc_init(AACDecProc *aac_proc)
Definition: aacdec_proc_template.c:436
ff_aac_codebook_vector_vals
const float *const ff_aac_codebook_vector_vals[]
Definition: aactab.c:1186
DEC_UQUAD
static int * DEC_UQUAD(int *dst, unsigned idx, unsigned sign)
Definition: aacdec_fixed_dequant.h:156
GET_VLC
#define GET_VLC(code, name, gb, table, bits, max_depth)
If the vlc code is invalid and max_depth=1, then no bits will be removed.
Definition: get_bits.h:574
AAC_SIGNE
unsigned AAC_SIGNE
Definition: aac_defines.h:106
b
#define b
Definition: input.c:41
VMUL2S
static float * VMUL2S(float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
Definition: aacdec_float.c:116
decode_cce
static int AAC_RENAME() decode_cce(AACDecContext *ac, GetBitContext *gb, ChannelElement *che)
Decode coupling_channel_element; reference: table 4.8.
Definition: aacdec_proc_template.c:357
UPDATE_CACHE
#define UPDATE_CACHE(name, gb)
Definition: get_bits.h:225
ff_aac_decode_ics
int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag)
Decode an individual_channel_stream payload; reference: table 4.44.
Definition: aacdec.c:1661
vector_pow43
static void vector_pow43(int *coefs, int len)
Definition: aacdec_fixed_dequant.h:37
GET_CACHE
#define GET_CACHE(name, gb)
Definition: get_bits.h:263
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:335
ChannelCoupling::coupling_point
enum CouplingPoint coupling_point
The point during decoding at which coupling is applied.
Definition: aacdec.h:197
ChannelCoupling::id_select
int id_select[8]
element id
Definition: aacdec.h:200
TYPE_CPE
@ TYPE_CPE
Definition: aac.h:41
GetBitContext
Definition: get_bits.h:108
DEC_SQUAD
static int * DEC_SQUAD(int *dst, unsigned idx)
Definition: aacdec_fixed_dequant.h:138
noise_scale
static void noise_scale(int *coefs, int scale, int band_energy, int len)
Definition: aacdec_fixed_dequant.h:89
fabsf
static __device__ float fabsf(float a)
Definition: cuda_runtime.h:181
SingleChannelElement::ics
IndividualChannelStream ics
Definition: aacdec.h:211
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
ZERO_BT
@ ZERO_BT
Scalefactors and spectral data are all zero.
Definition: aac.h:67
av_cold
#define av_cold
Definition: attributes.h:90
CLOSE_READER
#define CLOSE_READER(name, gb)
Definition: get_bits.h:188
NOISE_BT
@ NOISE_BT
Spectral data are scaled white noise not coded in the bitstream.
Definition: aac.h:71
s
#define s(width, name)
Definition: cbs_vp9.c:198
offsets
static const int offsets[]
Definition: hevc_pel.c:34
ChannelCoupling::num_coupled
int num_coupled
number of target elements
Definition: aacdec.h:198
g
const char * g
Definition: vf_curves.c:128
INTENSITY_BT2
@ INTENSITY_BT2
Scalefactor data are intensity stereo positions (out of phase).
Definition: aac.h:72
bits
uint8_t bits
Definition: vp3data.h:128
VMUL4
static float * VMUL4(float *dst, const float *v, unsigned idx, const float *scale)
Definition: aacdec_float.c:103
SKIP_BITS
#define SKIP_BITS(name, gb, num)
Definition: get_bits.h:241
IndividualChannelStream
Individual Channel Stream.
Definition: aacdec.h:162
FIXR10
#define FIXR10(x)
Definition: aac_defines.h:108
DEC_UPAIR
static int * DEC_UPAIR(int *dst, unsigned idx, unsigned sign)
Definition: aacdec_fixed_dequant.h:148
IndividualChannelStream::num_window_groups
int num_window_groups
Definition: aacdec.h:166
get_bits1
static unsigned int get_bits1(GetBitContext *s)
Definition: get_bits.h:388
LAST_SKIP_BITS
#define LAST_SKIP_BITS(name, gb, num)
Definition: get_bits.h:247
sqrtf
static __device__ float sqrtf(float a)
Definition: cuda_runtime.h:184
abs
#define abs(x)
Definition: cuda_runtime.h:35
get_vlc2
static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table, int bits, int max_depth)
Parse a vlc code.
Definition: get_bits.h:652
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
BandType
BandType
Definition: aac.h:66
ff_cbrt_tab
uint32_t ff_cbrt_tab[1<< 13]
VLCElem
Definition: vlc.h:32
subband_scale
static void subband_scale(int *dst, int *src, int scale, int offset, int len, void *log_context)
Definition: aacdec_fixed_dequant.h:57
OPEN_READER
#define OPEN_READER(name, gb)
Definition: get_bits.h:177
DEC_SPAIR
static int * DEC_SPAIR(int *dst, unsigned idx)
Definition: aacdec_fixed_dequant.h:130
SingleChannelElement::band_type
enum BandType band_type[128]
band types
Definition: aacdec.h:214
VMUL4S
static float * VMUL4S(float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
Definition: aacdec_float.c:133
SingleChannelElement
Single Channel Element - used for both SCE and LFE elements.
Definition: aacdec.h:210
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
code
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
Definition: filter_design.txt:178
IndividualChannelStream::num_windows
int num_windows
Definition: aacdec.h:172
ChannelElement
channel element - generic struct for SCE/CPE/CCE/LFE
Definition: aacdec.h:260
IndividualChannelStream::swb_offset
const uint16_t * swb_offset
table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular wind...
Definition: aacdec.h:170
av_always_inline
#define av_always_inline
Definition: attributes.h:49
cbrtf
static av_always_inline float cbrtf(float x)
Definition: libm.h:61
AAC_RENAME
#define AAC_RENAME(x)
Definition: aac_defines.h:99
TYPE_SCE
@ TYPE_SCE
Definition: aac.h:40
len
int len
Definition: vorbis_enc_data.h:426
ret
ret
Definition: filter_design.txt:187
ChannelCoupling::ch_select
int ch_select[8]
[0] shared list of gains; [1] list of gains for right channel; [2] list of gains for left channel; [3...
Definition: aacdec.h:201
U
#define U(x)
Definition: vpx_arith.h:37
AACDecContext
main AAC decoding context
Definition: aacdec.h:448
cce_scale
static const float cce_scale[]
Definition: aacdec_float.c:75
SHOW_UBITS
#define SHOW_UBITS(name, gb, num)
Definition: get_bits.h:259
SET
#define SET(member)
lcg_random
static av_always_inline int lcg_random(unsigned previous_val)
linear congruential pseudorandom number generator
Definition: aacdec_proc_template.c:39
scale
static void scale(int *out, const int *in, const int w, const int h, const int shift)
Definition: intra.c:291
ff_vlc_spectral
const VLCElem * ff_vlc_spectral[11]
Definition: aacdec_tab.c:112
ff_vlc_scalefactors
VLCElem ff_vlc_scalefactors[352]
Definition: aacdec_tab.c:111
ChannelCoupling
coupling parameters
Definition: aacdec.h:196
AACDecProc
Decode-specific primitives.
Definition: aacdec.h:395
IndividualChannelStream::max_sfb
uint8_t max_sfb
number of scalefactor bands per group
Definition: aacdec.h:163
Pulse
Definition: aac.h:99
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
fixed_sqrt
static av_always_inline int fixed_sqrt(int x, int bits)
Calculate the square root.
Definition: fixed_dsp.h:176
AFTER_IMDCT
@ AFTER_IMDCT
Definition: aacdec.h:71
int
int
Definition: ffmpeg_filter.c:424
IndividualChannelStream::group_len
uint8_t group_len[8]
Definition: aacdec.h:168
av_log2
int av_log2(unsigned v)
Definition: intmath.c:26
INTFLOAT
float INTFLOAT
Definition: aac_defines.h:101