RSeries astromech firmware
aac_decoder.h
Go to the documentation of this file.
1 // based om helix aac decoder
2 #pragma once
3 #pragma GCC optimize ("O3")
4 //#pragma GCC diagnostic ignored "-Wnarrowing"
5 
6 #include "Arduino.h"
7 
8 #define AAC_ENABLE_MPEG4
9 //#define AAC_ENABLE_SBR // needs additional 60KB Heap,
10 
11 #define ASSERT(x) /* do nothing */
12 
13 #ifndef MAX
14 #define MAX(a,b) ((a) > (b) ? (a) : (b))
15 #endif
16 
17 #ifndef MIN
18 #define MIN(a,b) ((a) < (b) ? (a) : (b))
19 #endif
20 
21 
22 /* AAC file format */
23 enum {
24  AAC_FF_Unknown = 0, /* should be 0 on init */
28 };
29 
30 /* syntactic element type */
31 enum {
41 };
42 
43 enum {
55  ERR_AAC_PNS = -11,
57  ERR_AAC_TNS = -13,
68 };
69 
70 enum {
75 };
76 
77 enum {
90 };
91 
92 typedef struct _AACDecInfo_t {
93  /* raw decoded data, before rounding to 16-bit PCM (for postprocessing such as SBR) */
94  void *rawSampleBuf[2];
97  /* fill data (can be used for processing SBR or other extensions) */
98  unsigned char *fillBuf;
99  int fillCount;
101  int prevBlockID; /* block information */
104  int sbDeinterleaveReqd[2]; // [MAX_NCHANS_ELEM]
106  int bitRate; /* user-accessible info */
107  int nChans;
108  int sampRate;
109  int profile;
110  int format;
112  int tnsUsed;
113  int pnsUsed;
115 } AACDecInfo_t;
116 
117 
118 typedef struct _aac_BitStreamInfo_t {
119  unsigned char *bytePtr;
120  unsigned int iCache;
122  int nBytes;
124 
125 typedef union _U64 {
126  int64_t w64;
127  struct {
128  unsigned int lo32;
129  signed int hi32;
130  } r;
131 } U64;
132 
133 typedef struct _AACFrameInfo_t {
134  int bitRate;
135  int nChans;
140  int profile;
141  int tnsUsed;
142  int pnsUsed;
144 
145 typedef struct _HuffInfo_t {
146  int maxBits; /* number of bits in longest codeword */
147  unsigned char count[20]; /* count[MAX_HUFF_BITS] = number of codes with length i+1 bits */
148  int offset; /* offset into symbol table */
149 } HuffInfo_t;
150 
151 typedef struct _PulseInfo_t {
152  unsigned char pulseDataPresent;
153  unsigned char numPulse;
154  unsigned char startSFB;
155  unsigned char offset[4]; // [MAX_PULSES]
156  unsigned char amp[4]; // [MAX_PULSES]
157 } PulseInfo_t;
158 
159 typedef struct _TNSInfo_t {
160  unsigned char tnsDataPresent;
161  unsigned char numFilt[8]; // [MAX_TNS_FILTERS] max 1 filter each for 8 short windows, or 3 filters for 1 long window
162  unsigned char coefRes[8]; // [MAX_TNS_FILTERS]
163  unsigned char length[8]; // [MAX_TNS_FILTERS]
164  unsigned char order[8]; // [MAX_TNS_FILTERS]
165  unsigned char dir[8]; // [MAX_TNS_FILTERS]
166  int8_t coef[60]; // [MAX_TNS_COEFS] max 3 filters * 20 coefs for 1 long window,
167  // or 1 filter * 7 coefs for each of 8 short windows
168 } TNSInfo_t;
169 
170 typedef struct _GainControlInfo_t {
171  unsigned char gainControlDataPresent;
172  unsigned char maxBand;
173  unsigned char adjNum[3][8]; // [MAX_GAIN_BANDS][MAX_GAIN_WIN]
174  unsigned char alevCode[3][8][7]; // [MAX_GAIN_BANDS][MAX_GAIN_WIN][MAX_GAIN_ADJUST]
175  unsigned char alocCode[3][8][7]; // [MAX_GAIN_BANDS][MAX_GAIN_WIN][MAX_GAIN_ADJUST]
177 
178 typedef struct _ICSInfo_t {
179  unsigned char icsResBit;
180  unsigned char winSequence;
181  unsigned char winShape;
182  unsigned char maxSFB;
183  unsigned char sfGroup;
184  unsigned char predictorDataPresent;
185  unsigned char predictorReset;
186  unsigned char predictorResetGroupNum;
187  unsigned char predictionUsed[41]; // [MAX_PRED_SFB]
188  unsigned char numWinGroup;
189  unsigned char winGroupLen[8]; // [MAX_WIN_GROUPS]
190 } ICSInfo_t;
191 
192 typedef struct _ADTSHeader_t {
193  /* fixed */
194  unsigned char id; /* MPEG bit - should be 1 */
195  unsigned char layer; /* MPEG layer - should be 0 */
196  unsigned char protectBit; /* 0 = CRC word follows, 1 = no CRC word */
197  unsigned char profile; /* 0 = main, 1 = LC, 2 = SSR, 3 = reserved */
198  unsigned char sampRateIdx; /* sample rate index range = [0, 11] */
199  unsigned char privateBit; /* ignore */
200  unsigned char channelConfig; /* 0 = implicit, >0 = use default table */
201  unsigned char origCopy; /* 0 = copy, 1 = original */
202  unsigned char home; /* ignore */
203  /* variable */
204  unsigned char copyBit; /* 1 bit of the 72-bit copyright ID (transmitted as 1 bit per frame) */
205  unsigned char copyStart; /* 1 = this bit starts the 72-bit ID, 0 = it does not */
206  int frameLength; /* length of frame */
207  int bufferFull; /* number of 32-bit words left in enc buffer, 0x7FF = VBR */
208  unsigned char numRawDataBlocks; /* number of raw data blocks in frame */
209  /* CRC */
210  int crcCheckWord; /* 16-bit CRC check word (present if protectBit == 0) */
211 } ADTSHeader_t;
212 
213 typedef struct _ADIFHeader_t {
214  unsigned char copyBit; /* 0 = no copyright ID, 1 = 72-bit copyright ID follows immediately */
215  unsigned char origCopy; /* 0 = copy, 1 = original */
216  unsigned char home; /* ignore */
217  unsigned char bsType; /* bitstream type: 0 = CBR, 1 = VBR */
218  int bitRate; /* bitRate: CBR = bits/sec, VBR = peak bits/frame, 0 = unknown */
219  unsigned char numPCE; /* number of program config elements (max = 16) */
220  int bufferFull; /* bits left in bit reservoir */
221  unsigned char copyID[9]; /* [ADIF_COPYID_SIZE] optional 72-bit copyright ID */
222 } ADIFHeader_t;
223 
224 /* sizeof(ProgConfigElement_t) = 82 bytes (if KEEP_PCE_COMMENTS not defined) */
225 typedef struct _ProgConfigElement_t {
226  unsigned char elemInstTag; /* element instance tag */
227  unsigned char profile; /* 0 = main, 1 = LC, 2 = SSR, 3 = reserved */
228  unsigned char sampRateIdx; /* sample rate index range = [0, 11] */
229  unsigned char numFCE; /* number of front channel elements (max = 15) */
230  unsigned char numSCE; /* number of side channel elements (max = 15) */
231  unsigned char numBCE; /* number of back channel elements (max = 15) */
232  unsigned char numLCE; /* number of LFE channel elements (max = 3) */
233  unsigned char numADE; /* number of associated data elements (max = 7) */
234  unsigned char numCCE; /* number of valid channel coupling elements (max = 15) */
235  unsigned char monoMixdown; /* mono mixdown: bit 4 = present flag, bits 3-0 = element number */
236  unsigned char stereoMixdown; /* stereo mixdown: bit 4 = present flag, bits 3-0 = element number */
237  unsigned char matrixMixdown; /* bit 4 = present flag, bit 3 = unused,bits 2-1 = index, bit 0 = pseudo-surround enable */
238  unsigned char fce[15]; /* [MAX_NUM_FCE] front element channel pair: bit 4 = SCE/CPE flag, bits 3-0 = inst tag */
239  unsigned char sce[15]; /* [MAX_NUM_SCE] side element channel pair: bit 4 = SCE/CPE flag, bits 3-0 = inst tag */
240  unsigned char bce[15]; /* [MAX_NUM_BCE] back element channel pair: bit 4 = SCE/CPE flag, bits 3-0 = inst tag */
241  unsigned char lce[3]; /* [MAX_NUM_LCE] instance tag for LFE elements */
242  unsigned char ade[7]; /* [MAX_NUM_ADE] instance tag for ADE elements */
243  unsigned char cce[15]; /* [MAX_NUM_BCE] channel coupling elements: bit 4 = switching flag, bits 3-0 = inst tag */
245 
246 typedef struct _SBRHeader {
247  int count;
248 
249  unsigned char ampRes;
250  unsigned char startFreq;
251  unsigned char stopFreq;
252  unsigned char crossOverBand;
253  unsigned char resBitsHdr;
254  unsigned char hdrExtra1;
255  unsigned char hdrExtra2;
256 
257  unsigned char freqScale;
258  unsigned char alterScale;
259  unsigned char noiseBands;
260 
261  unsigned char limiterBands;
262  unsigned char limiterGains;
263  unsigned char interpFreq;
264  unsigned char smoothMode;
265 } SBRHeader;
266 
267 /* need one SBRGrid per channel, updated every frame */
268 typedef struct _SBRGrid {
269  unsigned char frameClass;
270  unsigned char ampResFrame;
271  unsigned char pointer;
272 
273  unsigned char numEnv; /* L_E */
274  unsigned char envTimeBorder[5 + 1]; // [MAX_NUM_ENV+1] /* t_E */
275  unsigned char freqRes[5]; // [MAX_NUM_ENV]/* r */
276 
277  unsigned char numNoiseFloors; /* L_Q */
278  unsigned char noiseTimeBorder[2 + 1]; // [MAX_NUM_NOISE_FLOORS+1] /* t_Q */
279 
280  unsigned char numEnvPrev;
281  unsigned char numNoiseFloorsPrev;
282  unsigned char freqResPrev;
283 } SBRGrid;
284 
285 /* need one SBRFreq per element (SCE/CPE/LFE), updated only on header reset */
286 typedef struct _SBRFreq {
287  int kStart; /* k_x */
288  int nMaster;
289  int nHigh;
290  int nLow;
291  int nLimiter; /* N_l */
292  int numQMFBands; /* M */
293  int numNoiseFloorBands; /* Nq */
294 
297 
298  unsigned char freqMaster[48 + 1]; // [MAX_QMF_BANDS + 1] /* not necessary to save this after derived tables are generated */
299  unsigned char freqHigh[48 + 1]; // [MAX_QMF_BANDS + 1]
300  unsigned char freqLow[48 / 2 + 1]; // [MAX_QMF_BANDS / 2 + 1] /* nLow = nHigh - (nHigh >> 1) */
301  unsigned char freqNoise[5 + 1]; // [MAX_NUM_NOISE_FLOOR_BANDS+1]
302  unsigned char freqLimiter[48 / 2 + 5];// [MAX_QMF_BANDS / 2 + MAX_NUM_PATCHES] /* max (intermediate) size = nLow + numPatches - 1 */
303 
304  unsigned char numPatches;
305  unsigned char patchNumSubbands[5 + 1]; // [MAX_NUM_PATCHES + 1]
306  unsigned char patchStartSubband[5 + 1]; // [MAX_NUM_PATCHES + 1]
307 } SBRFreq;
308 
309 typedef struct _SBRChan {
310  int reset;
311  unsigned char deltaFlagEnv[5]; // [MAX_NUM_ENV]
312  unsigned char deltaFlagNoise[2]; // [MAX_NUM_NOISE_FLOORS]
313 
314  signed char envDataQuant[5][48]; // [MAX_NUM_ENV][MAX_QMF_BANDS] /* range = [0, 127] */
315  signed char noiseDataQuant[2][5]; // [MAX_NUM_NOISE_FLOORS][MAX_NUM_NOISE_FLOOR_BANDS]
316 
317  unsigned char invfMode[2][5]; // [2][MAX_NUM_NOISE_FLOOR_BANDS] /* invfMode[0/1][band] = prev/curr */
318  int chirpFact[5]; // [MAX_NUM_NOISE_FLOOR_BANDS] /* bwArray */
319  unsigned char addHarmonicFlag[2]; /* addHarmonicFlag[0/1] = prev/curr */
320  unsigned char addHarmonic[2][64]; /* addHarmonic[0/1][band] = prev/curr */
321 
322  int gbMask[2]; /* gbMask[0/1] = XBuf[0-31]/XBuf[32-39] */
323  signed char laPrev;
324 
326  int sinIndex;
328  int gTemp[5][48]; // [MAX_NUM_SMOOTH_COEFS][MAX_QMF_BANDS]
329  int qTemp[5][48]; // [MAX_NUM_SMOOTH_COEFS][MAX_QMF_BANDS]
330 
331 } SBRChan;
332 
333 
334 /* state info struct for baseline (MPEG-4 LC) decoding */
335 typedef struct _PSInfoBase_t {
337  unsigned char dataBuf[510]; // [DATA_BUF_SIZE]
339  unsigned char fillBuf[269]; //[FILL_BUF_SIZE]
340  /* state information which is the same throughout whole frame */
341  int nChans;
344  /* state information which can be overwritten by subsequent elements within frame */
345  ICSInfo_t icsInfo[2]; // [MAX_NCHANS_ELEM]
347  short scaleFactors[2][15*8]; // [MAX_NCHANS_ELEM][MAX_SF_BANDS]
348  unsigned char sfbCodeBook[2][15*8]; // [MAX_NCHANS_ELEM][MAX_SF_BANDS]
350  unsigned char msMaskBits[(15 * 8 + 7) >> 3]; // [MAX_MS_MASK_BYTES]
351  int pnsUsed[2]; // [MAX_NCHANS_ELEM]
353  int intensityUsed[2]; // [MAX_NCHANS_ELEM]
354 // PulseInfo_t pulseInfo[2]; // [MAX_NCHANS_ELEM]
355  TNSInfo_t tnsInfo[2]; // [MAX_NCHANS_ELEM]
356  int tnsLPCBuf[20]; // [MAX_TNS_ORDER]
357  int tnsWorkBuf[20]; //[MAX_TNS_ORDER]
358  GainControlInfo_t gainControlInfo[2]; // [MAX_NCHANS_ELEM]
359  int gbCurrent[2]; // [MAX_NCHANS_ELEM]
360  int coef[2][1024]; // [MAX_NCHANS_ELEM][AAC_MAX_NSAMPS]
361 #ifdef AAC_ENABLE_SBR
362  int sbrWorkBuf[2][1024]; // [MAX_NCHANS_ELEM][AAC_MAX_NSAMPS];
363 #endif
364  /* state information which must be saved for each element and used in next frame */
365  int overlap[2][1024]; // [AAC_MAX_NCHANS][AAC_MAX_NSAMPS]
366  int prevWinShape[2]; // [AAC_MAX_NCHANS]
367 } PSInfoBase_t;
368 
369 typedef struct _PSInfoSBR {
370  /* save for entire file */
373 
374  /* state info that must be saved for each channel */
379 
380  /* temp variables, no need to save between blocks */
381  unsigned char dataExtra;
382  unsigned char resBitsData;
383  unsigned char extendedDataPresent;
385 
386  signed char envDataDequantScale[2][5]; // [MAX_NCHANS_ELEM][MAX_NUM_ENV
387  int envDataDequant[2][5][48]; // [MAX_NCHANS_ELEM][MAX_NUM_ENV][MAX_QMF_BANDS
388  int noiseDataDequant[2][2][5]; // [MAX_NCHANS_ELEM][MAX_NUM_NOISE_FLOORS][MAX_NUM_NOISE_FLOOR_BANDS]
389 
390  int eCurr[48]; // [MAX_QMF_BANDS]
391  unsigned char eCurrExp[48]; // [MAX_QMF_BANDS]
392  unsigned char eCurrExpMax;
393  signed char la;
394 
397  int envBand;
399  int gainMax;
402  int qp1Inv;
403  int qqp1Inv;
404  int sMapped;
405  int sBand;
406  int highBand;
407 
410  int sumSM;
411  int sumQM;
412  int gLimBoost[48];
413  int qmLimBoost[48];
414  int smBoost[48];
415 
416  int smBuf[48];
417  int qmLimBuf[48];
418  int gLimBuf[48];
419  int gLimFbits[48];
420 
421  int gFiltLast[48];
422  int qFiltLast[48];
423 
424  /* large buffers */
425  int delayIdxQMFA[2]; // [AAC_MAX_NCHANS]
426  int delayQMFA[2][10 * 32]; // [AAC_MAX_NCHANS][DELAY_SAMPS_QMFA]
427  int delayIdxQMFS[2]; // [AAC_MAX_NCHANS]
428  int delayQMFS[2][10 * 128]; // [AAC_MAX_NCHANS][DELAY_SAMPS_QMFS]
429  int XBufDelay[2][8][64][2]; // [AAC_MAX_NCHANS][HF_GEN][64][2]
430  int XBuf[32+8][64][2];
431 
432 } PSInfoSBR_t;
433 
434 #define CLIP_2N(y, n) { \
435  int sign = (y) >> 31; \
436  if (sign != (y) >> (n)) { \
437  (y) = sign ^ ((1 << (n)) - 1); \
438  } \
439 }
440 
441 /* do y <<= n, clipping to range [-2^30, 2^30 - 1] (i.e. output has one guard bit) */
442 #define CLIP_2N_SHIFT30(y, n) { \
443  int sign = (y) >> 31; \
444  if (sign != (y) >> (30 - (n))) { \
445  (y) = sign ^ (0x3fffffff); \
446  } else { \
447  (y) = (y) << (n); \
448  } \
449 }
450 
451 bool AACDecoder_AllocateBuffers(void);
452 int AACFlushCodec();
453 void AACDecoder_FreeBuffers(void);
454 int AACFindSyncWord(unsigned char *buf, int nBytes);
455 int AACSetRawBlockParams(int copyLast, int nChans, int sampRateCore, int profile);
456 int AACDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf);
457 int AACGetSampRate();
458 int AACGetChannels();
459 int AACGetBitsPerSample();
460 int AACGetBitrate();
461 int AACGetOutputSamps();
462 int AACGetBitrate();
463 void DecodeLPCCoefs(int order, int res, int8_t *filtCoef, int *a, int *b);
464 int FilterRegion(int size, int dir, int order, int *audioCoef, int *a, int *hist);
465 int TNSFilter(int ch);
470 int DecodeProgramConfigElement(uint8_t idx);
471 int DecodeFillElement();
472 int DecodeNextElement(uint8_t **buf, int *bitOffset, int *bitsAvail);
473 void PreMultiply(int tabidx, int *zbuf1);
474 void PostMultiply(int tabidx, int *fft1);
475 void PreMultiplyRescale(int tabidx, int *zbuf1, int es);
476 void PostMultiplyRescale(int tabidx, int *fft1, int es);
477 void DCT4(int tabidx, int *coef, int gb);
478 void BitReverse(int *inout, int tabidx);
479 void R4FirstPass(int *x, int bg);
480 void R8FirstPass(int *x, int bg);
481 void R4Core(int *x, int bg, int gp, int *wtab);
482 void R4FFT(int tabidx, int *x);
483 void UnpackZeros(int nVals, int *coef);
484 void UnpackQuads(int cb, int nVals, int *coef);
485 void UnpackPairsNoEsc(int cb, int nVals, int *coef);
486 void UnpackPairsEsc(int cb, int nVals, int *coef);
487 void DecodeSpectrumLong(int ch);
488 void DecodeSpectrumShort(int ch);
489 void DecWindowOverlap(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev);
490 void DecWindowOverlapLongStart(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev);
491 void DecWindowOverlapLongStop(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev);
492 void DecWindowOverlapShort(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev);
493 int IMDCT(int ch, int chOut, short *outbuf);
494 void DecodeICSInfo(ICSInfo_t *icsInfo, int sampRateIdx);
495 void DecodeSectionData(int winSequence, int numWinGrp, int maxSFB, uint8_t *sfbCodeBook);
497 void DecodeScaleFactors(int numWinGrp, int maxSFB, int globalGain, uint8_t *sfbCodeBook, short *scaleFactors);
498 void DecodePulseInfo(uint8_t ch);
499 void DecodeTNSInfo(int winSequence, TNSInfo_t *ti, int8_t *tnsCoef);
500 void DecodeGainControlInfo(int winSequence, GainControlInfo_t *gi);
501 void DecodeICS(int ch);
502 int DecodeNoiselessData(uint8_t **buf, int *bitOffset, int *bitsAvail, int ch);
503 int DecodeHuffmanScalar(const signed short *huffTab, const HuffInfo_t *huffTabInfo, unsigned int bitBuf, int32_t *val);
504 int UnpackADTSHeader(uint8_t **buf, int *bitOffset, int *bitsAvail);
505 int GetADTSChannelMapping(uint8_t *buf, int bitOffset, int bitsAvail);
506 int GetNumChannelsADIF(int nPCE);
507 int GetSampleRateIdxADIF(int nPCE);
508 int UnpackADIFHeader(uint8_t **buf, int *bitOffset, int *bitsAvail);
509 int SetRawBlockParams(int copyLast, int nChans, int sampRate, int profile);
510 int PrepareRawBlock();
511 int DequantBlock(int *inbuf, int nSamps, int scale);
512 int AACDequantize(int ch);
513 int DeinterleaveShortBlocks(int ch);
514 unsigned int Get32BitVal(unsigned int *last);
515 int InvRootR(int r);
516 int ScaleNoiseVector(int *coef, int nVals, int sf);
517 void GenerateNoiseVector(int *coef, int *last, int nVals);
518 void CopyNoiseVector(int *coefL, int *coefR, int nVals);
519 int PNS(int ch);
520 int GetSampRateIdx(int sampRate);
521 void StereoProcessGroup(int *coefL, int *coefR, const uint16_t *sfbTab, int msMaskPres, uint8_t *msMaskPtr,
522 int msMaskOffset, int maxSFB, uint8_t *cbRight, short *sfRight, int *gbCurrent);
523 int StereoProcess();
524 int RatioPowInv(int a, int b, int c);
525 int SqrtFix(int q, int fBitsIn, int *fBitsOut);
526 int InvRNormalized(int r);
527 void BitReverse32(int *inout);
528 void R8FirstPass32(int *r0);
529 void R4Core32(int *r0);
530 void FFT32C(int *x);
531 void CVKernel1(int *XBuf, int *accBuf);
532 void CVKernel2(int *XBuf, int *accBuf);
533 void SetBitstreamPointer(int nBytes, uint8_t *buf);
534 inline void RefillBitstreamCache();
535 unsigned int GetBits(int nBits);
536 unsigned int GetBitsNoAdvance(int nBits);
537 void AdvanceBitstream(int nBits);
538 int CalcBitsUsed(uint8_t *startBuf, int startOffset);
539 void ByteAlignBitstream();
540 // SBR
541 void InitSBRState();
542 int DecodeSBRBitstream(int chBase);
543 int DecodeSBRData(int chBase, short *outbuf);
544 int FlushCodecSBR();
545 void BubbleSort(unsigned char *v, int nItems);
546 unsigned char VMin(unsigned char *v, int nItems);
547 unsigned char VMax(unsigned char *v, int nItems);
548 int CalcFreqMasterScaleZero(unsigned char *freqMaster, int alterScale, int k0, int k2);
549 int CalcFreqMaster(unsigned char *freqMaster, int freqScale, int alterScale, int k0, int k2);
550 int CalcFreqHigh(unsigned char *freqHigh, unsigned char *freqMaster, int nMaster, int crossOverBand);
551 int CalcFreqLow(unsigned char *freqLow, unsigned char *freqHigh, int nHigh);
552 int CalcFreqNoise(unsigned char *freqNoise, unsigned char *freqLow, int nLow, int kStart, int k2, int noiseBands);
553 int BuildPatches(unsigned char *patchNumSubbands, unsigned char *patchStartSubband, unsigned char *freqMaster,
554  int nMaster, int k0, int kStart, int numQMFBands, int sampRateIdx);
555 int FindFreq(unsigned char *freq, int nFreq, unsigned char val);
556 void RemoveFreq(unsigned char *freq, int nFreq, int removeIdx);
557 int CalcFreqLimiter(unsigned char *freqLimiter, unsigned char *patchNumSubbands, unsigned char *freqLow,
558  int nLow, int kStart, int limiterBands, int numPatches);
559 int CalcFreqTables(SBRHeader *sbrHdr, SBRFreq *sbrFreq, int sampRateIdx);
560 void EstimateEnvelope(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int env);
561 int GetSMapped(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int band, int la);
562 void CalcMaxGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int ch, int env, int lim, int fbitsDQ);
563 void CalcNoiseDivFactors(int q, int *qp1Inv, int *qqp1Inv);
564 void CalcComponentGains(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env, int lim, int fbitsDQ);
565 void ApplyBoost(SBRFreq *sbrFreq, int lim, int fbitsDQ);
566 void CalcGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env);
567 void MapHF(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int hfReset);
568 void AdjustHighFreq(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch);
569 int CalcCovariance1(int *XBuf, int *p01reN, int *p01imN, int *p12reN, int *p12imN, int *p11reN, int *p22reN);
570 int CalcCovariance2(int *XBuf, int *p02reN, int *p02imN);
571 void CalcLPCoefs(int *XBuf, int *a0re, int *a0im, int *a1re, int *a1im, int gb);
572 void GenerateHighFreq(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch);
573 int DecodeHuffmanScalar(const signed /*short*/ int *huffTab, const HuffInfo_t *huffTabInfo, unsigned int bitBuf,
574  signed int *val);
575 int DecodeOneSymbol(int huffTabIndex);
576 int DequantizeEnvelope(int nBands, int ampRes, signed char *envQuant, int *envDequant);
577 void DequantizeNoise(int nBands, signed char *noiseQuant, int *noiseDequant);
578 void DecodeSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch);
579 void DecodeSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch);
580 void UncoupleSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR);
581 void UncoupleSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR);
582 void DecWindowOverlapNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev);
583 void DecWindowOverlapLongStartNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev);
584 void DecWindowOverlapLongStopNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev);
585 void DecWindowOverlapShortNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev);
586 void PreMultiply64(int *zbuf1);
587 void PostMultiply64(int *fft1, int nSampsOut);
588 void QMFAnalysisConv(int *cTab, int *delay, int dIdx, int *uBuf);
589 int QMFAnalysis(int *inbuf, int *delay, int *XBuf, int fBitsIn, int *delayIdx, int qmfaBands);
590 void QMFSynthesisConv(int *cPtr, int *delay, int dIdx, short *outbuf, int nChans);
591 void QMFSynthesis(int *inbuf, int *delay, int *delayIdx, int qmfsBands, short *outbuf, int nChans);
592 int UnpackSBRHeader(SBRHeader *sbrHdr);
593 void UnpackSBRGrid(SBRHeader *sbrHdr, SBRGrid *sbrGrid);
594 void UnpackDeltaTimeFreq(int numEnv, unsigned char *deltaFlagEnv,
595  int numNoiseFloors, unsigned char *deltaFlagNoise);
596 void UnpackInverseFilterMode(int numNoiseFloorBands, unsigned char *mode);
597 void UnpackSinusoids(int nHigh, int addHarmonicFlag, unsigned char *addHarmonic);
598 void CopyCouplingGrid(SBRGrid *sbrGridLeft, SBRGrid *sbrGridRight);
599 void CopyCouplingInverseFilterMode(int numNoiseFloorBands, unsigned char *modeLeft, unsigned char *modeRight);
600 void UnpackSBRSingleChannel(int chBase);
601 void UnpackSBRChannelPair(int chBase);
602 
603 
604 
605 
606 
607 
608 
609 
610 
611 
612 
CalcFreqLimiter
int CalcFreqLimiter(unsigned char *freqLimiter, unsigned char *patchNumSubbands, unsigned char *freqLow, int nLow, int kStart, int limiterBands, int numPatches)
_ProgConfigElement_t::sampRateIdx
unsigned char sampRateIdx
Definition: aac_decoder.h:228
_ADTSHeader_t::layer
unsigned char layer
Definition: aac_decoder.h:195
_PSInfoSBR::smBoost
int smBoost[48]
Definition: aac_decoder.h:414
ERR_AAC_SBR_PCM_FORMAT
@ ERR_AAC_SBR_PCM_FORMAT
Definition: aac_decoder.h:63
_HuffInfo_t::maxBits
int maxBits
Definition: aac_decoder.h:146
ERR_AAC_UNKNOWN
@ ERR_AAC_UNKNOWN
Definition: aac_decoder.h:67
_AACDecInfo_t::rawSampleBytes
int rawSampleBytes
Definition: aac_decoder.h:95
UncoupleSBREnvelope
void UncoupleSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR)
_PulseInfo_t::numPulse
unsigned char numPulse
Definition: aac_decoder.h:153
_AACDecInfo_t::fillBuf
unsigned char * fillBuf
Definition: aac_decoder.h:98
UnpackQuads
void UnpackQuads(int cb, int nVals, int *coef)
_ICSInfo_t::winGroupLen
unsigned char winGroupLen[8]
Definition: aac_decoder.h:189
_PSInfoSBR::sbrChan
SBRChan sbrChan[2]
Definition: aac_decoder.h:378
_SBRChan::noiseDataQuant
signed char noiseDataQuant[2][5]
Definition: aac_decoder.h:315
_PSInfoBase_t
Definition: aac_decoder.h:335
_PSInfoBase_t::scaleFactors
short scaleFactors[2][15 *8]
Definition: aac_decoder.h:347
CalcFreqTables
int CalcFreqTables(SBRHeader *sbrHdr, SBRFreq *sbrFreq, int sampRateIdx)
_PSInfoSBR::la
signed char la
Definition: aac_decoder.h:393
_SBRGrid::numEnvPrev
unsigned char numEnvPrev
Definition: aac_decoder.h:280
_ADIFHeader_t::bsType
unsigned char bsType
Definition: aac_decoder.h:217
_U64
Definition: aac_decoder.h:125
_PSInfoSBR::sbrFreq
SBRFreq sbrFreq[2]
Definition: aac_decoder.h:377
AAC_FF_Unknown
@ AAC_FF_Unknown
Definition: aac_decoder.h:24
_AACFrameInfo_t::profile
int profile
Definition: aac_decoder.h:140
aac_BitStreamInfo_t
struct _aac_BitStreamInfo_t aac_BitStreamInfo_t
_SBRGrid::numNoiseFloors
unsigned char numNoiseFloors
Definition: aac_decoder.h:277
_PSInfoSBR::qFiltLast
int qFiltLast[48]
Definition: aac_decoder.h:422
_PSInfoSBR::sumECurrGLim
int sumECurrGLim
Definition: aac_decoder.h:409
UnpackSBRSingleChannel
void UnpackSBRSingleChannel(int chBase)
PulseInfo_t
struct _PulseInfo_t PulseInfo_t
_aac_BitStreamInfo_t::cachedBits
int cachedBits
Definition: aac_decoder.h:121
_U64::w64
int64_t w64
Definition: aac_decoder.h:126
DecodeDataStreamElement
int DecodeDataStreamElement()
DecodeLPCCoefs
void DecodeLPCCoefs(int order, int res, int8_t *filtCoef, int *a, int *b)
InvRNormalized
int InvRNormalized(int r)
ERR_AAC_SBR_INIT
@ ERR_AAC_SBR_INIT
Definition: aac_decoder.h:60
DecodeNextElement
int DecodeNextElement(uint8_t **buf, int *bitOffset, int *bitsAvail)
_SBRHeader::crossOverBand
unsigned char crossOverBand
Definition: aac_decoder.h:252
GenerateNoiseVector
void GenerateNoiseVector(int *coef, int *last, int nVals)
ERR_AAC_INVALID_FRAME
@ ERR_AAC_INVALID_FRAME
Definition: aac_decoder.h:49
AACSetRawBlockParams
int AACSetRawBlockParams(int copyLast, int nChans, int sampRateCore, int profile)
_ProgConfigElement_t::numFCE
unsigned char numFCE
Definition: aac_decoder.h:229
_AACDecInfo_t::currInstTag
int currInstTag
Definition: aac_decoder.h:103
_PSInfoBase_t::msMaskBits
unsigned char msMaskBits[(15 *8+7) >> 3]
Definition: aac_decoder.h:350
_ProgConfigElement_t::lce
unsigned char lce[3]
Definition: aac_decoder.h:241
_PSInfoSBR::frameCount
int frameCount
Definition: aac_decoder.h:371
ApplyBoost
void ApplyBoost(SBRFreq *sbrFreq, int lim, int fbitsDQ)
_PSInfoSBR::qmLimBoost
int qmLimBoost[48]
Definition: aac_decoder.h:413
_AACFrameInfo_t::nChans
int nChans
Definition: aac_decoder.h:135
PreMultiply
void PreMultiply(int tabidx, int *zbuf1)
_PSInfoSBR::sbrHdr
SBRHeader sbrHdr[2]
Definition: aac_decoder.h:375
_PSInfoSBR::sMapped
int sMapped
Definition: aac_decoder.h:404
SBR_GRID_FIXFIX
@ SBR_GRID_FIXFIX
Definition: aac_decoder.h:71
FindFreq
int FindFreq(unsigned char *freq, int nFreq, unsigned char val)
_ProgConfigElement_t::profile
unsigned char profile
Definition: aac_decoder.h:227
_ICSInfo_t::predictionUsed
unsigned char predictionUsed[41]
Definition: aac_decoder.h:187
BubbleSort
void BubbleSort(unsigned char *v, int nItems)
_SBRFreq::freqMaster
unsigned char freqMaster[48+1]
Definition: aac_decoder.h:298
_PSInfoSBR::sumQM
int sumQM
Definition: aac_decoder.h:411
R4FFT
void R4FFT(int tabidx, int *x)
UnpackSBRChannelPair
void UnpackSBRChannelPair(int chBase)
DequantBlock
int DequantBlock(int *inbuf, int nSamps, int scale)
DecodeSpectrumLong
void DecodeSpectrumLong(int ch)
HuffTabSBR_fEnv30b
@ HuffTabSBR_fEnv30b
Definition: aac_decoder.h:85
SBRHeader
struct _SBRHeader SBRHeader
_PSInfoSBR::sampRateIdx
int sampRateIdx
Definition: aac_decoder.h:372
ADTSHeader_t
struct _ADTSHeader_t ADTSHeader_t
_TNSInfo_t::order
unsigned char order[8]
Definition: aac_decoder.h:164
_GainControlInfo_t::gainControlDataPresent
unsigned char gainControlDataPresent
Definition: aac_decoder.h:171
PreMultiplyRescale
void PreMultiplyRescale(int tabidx, int *zbuf1, int es)
_ICSInfo_t::icsResBit
unsigned char icsResBit
Definition: aac_decoder.h:179
_ProgConfigElement_t::numBCE
unsigned char numBCE
Definition: aac_decoder.h:231
GetSampleRateIdxADIF
int GetSampleRateIdxADIF(int nPCE)
_ADTSHeader_t::protectBit
unsigned char protectBit
Definition: aac_decoder.h:196
BitReverse
void BitReverse(int *inout, int tabidx)
DecWindowOverlapShort
void DecWindowOverlapShort(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
_SBRFreq::freqLimiter
unsigned char freqLimiter[48/2+5]
Definition: aac_decoder.h:302
GetSMapped
int GetSMapped(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int band, int la)
DecodeSBRBitstream
int DecodeSBRBitstream(int chBase)
_PulseInfo_t::offset
unsigned char offset[4]
Definition: aac_decoder.h:155
AACFindSyncWord
int AACFindSyncWord(unsigned char *buf, int nBytes)
HuffTabSBR_tNoise30b
@ HuffTabSBR_tNoise30b
Definition: aac_decoder.h:88
_SBRHeader::noiseBands
unsigned char noiseBands
Definition: aac_decoder.h:259
_SBRGrid::pointer
unsigned char pointer
Definition: aac_decoder.h:271
_SBRFreq::patchNumSubbands
unsigned char patchNumSubbands[5+1]
Definition: aac_decoder.h:305
_SBRChan::chirpFact
int chirpFact[5]
Definition: aac_decoder.h:318
BitReverse32
void BitReverse32(int *inout)
_SBRChan::addHarmonicFlag
unsigned char addHarmonicFlag[2]
Definition: aac_decoder.h:319
_PSInfoBase_t::dataCount
int dataCount
Definition: aac_decoder.h:336
AACGetBitrate
int AACGetBitrate()
_AACDecInfo_t::tnsUsed
int tnsUsed
Definition: aac_decoder.h:112
_PSInfoSBR::highBand
int highBand
Definition: aac_decoder.h:406
_AACDecInfo_t::fillCount
int fillCount
Definition: aac_decoder.h:99
ERR_AAC_MPEG4_UNSUPPORTED
@ ERR_AAC_MPEG4_UNSUPPORTED
Definition: aac_decoder.h:50
CVKernel2
void CVKernel2(int *XBuf, int *accBuf)
_TNSInfo_t::coef
int8_t coef[60]
Definition: aac_decoder.h:166
_GainControlInfo_t
Definition: aac_decoder.h:170
R8FirstPass
void R8FirstPass(int *x, int bg)
_AACDecInfo_t
Definition: aac_decoder.h:92
_SBRChan::laPrev
signed char laPrev
Definition: aac_decoder.h:323
_ADTSHeader_t::channelConfig
unsigned char channelConfig
Definition: aac_decoder.h:200
DecWindowOverlapLongStop
void DecWindowOverlapLongStop(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
_aac_BitStreamInfo_t::nBytes
int nBytes
Definition: aac_decoder.h:122
_SBRGrid::freqResPrev
unsigned char freqResPrev
Definition: aac_decoder.h:282
DecodeGainControlInfo
void DecodeGainControlInfo(int winSequence, GainControlInfo_t *gi)
_ADTSHeader_t::crcCheckWord
int crcCheckWord
Definition: aac_decoder.h:210
_PSInfoSBR::delayQMFS
int delayQMFS[2][10 *128]
Definition: aac_decoder.h:428
UncoupleSBRNoise
void UncoupleSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR)
GainControlInfo_t
struct _GainControlInfo_t GainControlInfo_t
_SBRChan::envDataQuant
signed char envDataQuant[5][48]
Definition: aac_decoder.h:314
DecodeSingleChannelElement
int DecodeSingleChannelElement()
_ProgConfigElement_t::numADE
unsigned char numADE
Definition: aac_decoder.h:233
ScaleNoiseVector
int ScaleNoiseVector(int *coef, int nVals, int sf)
_PSInfoSBR::gFiltLast
int gFiltLast[48]
Definition: aac_decoder.h:421
_PulseInfo_t::pulseDataPresent
unsigned char pulseDataPresent
Definition: aac_decoder.h:152
AAC_ID_END
@ AAC_ID_END
Definition: aac_decoder.h:40
PreMultiply64
void PreMultiply64(int *zbuf1)
HuffTabSBR_tEnv15b
@ HuffTabSBR_tEnv15b
Definition: aac_decoder.h:80
IMDCT
int IMDCT(int ch, int chOut, short *outbuf)
QMFAnalysis
int QMFAnalysis(int *inbuf, int *delay, int *XBuf, int fBitsIn, int *delayIdx, int qmfaBands)
_PSInfoSBR::sumEOrigMapped
int sumEOrigMapped
Definition: aac_decoder.h:408
_SBRChan::reset
int reset
Definition: aac_decoder.h:310
_PSInfoSBR::couplingFlag
int couplingFlag
Definition: aac_decoder.h:396
_ProgConfigElement_t
Definition: aac_decoder.h:225
InvRootR
int InvRootR(int r)
ByteAlignBitstream
void ByteAlignBitstream()
_PSInfoSBR::envDataDequant
int envDataDequant[2][5][48]
Definition: aac_decoder.h:387
_SBRGrid::ampResFrame
unsigned char ampResFrame
Definition: aac_decoder.h:270
_SBRHeader::limiterGains
unsigned char limiterGains
Definition: aac_decoder.h:262
ERR_AAC_INDATA_UNDERFLOW
@ ERR_AAC_INDATA_UNDERFLOW
Definition: aac_decoder.h:45
_PSInfoBase_t::dataBuf
unsigned char dataBuf[510]
Definition: aac_decoder.h:337
AACGetOutputSamps
int AACGetOutputSamps()
_SBRChan::gainNoiseIndex
int gainNoiseIndex
Definition: aac_decoder.h:327
ERR_AAC_RAWBLOCK_PARAMS
@ ERR_AAC_RAWBLOCK_PARAMS
Definition: aac_decoder.h:66
_PSInfoSBR::XBuf
int XBuf[32+8][64][2]
Definition: aac_decoder.h:430
_PSInfoBase_t::tnsLPCBuf
int tnsLPCBuf[20]
Definition: aac_decoder.h:356
_aac_BitStreamInfo_t::iCache
unsigned int iCache
Definition: aac_decoder.h:120
EstimateEnvelope
void EstimateEnvelope(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int env)
ERR_AAC_PNS
@ ERR_AAC_PNS
Definition: aac_decoder.h:55
RatioPowInv
int RatioPowInv(int a, int b, int c)
_ADIFHeader_t::home
unsigned char home
Definition: aac_decoder.h:216
_ICSInfo_t::predictorResetGroupNum
unsigned char predictorResetGroupNum
Definition: aac_decoder.h:186
UnpackADTSHeader
int UnpackADTSHeader(uint8_t **buf, int *bitOffset, int *bitsAvail)
_ProgConfigElement_t::stereoMixdown
unsigned char stereoMixdown
Definition: aac_decoder.h:236
HuffTabSBR_tEnv15
@ HuffTabSBR_tEnv15
Definition: aac_decoder.h:78
AACGetSampRate
int AACGetSampRate()
MapHF
void MapHF(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int hfReset)
AdjustHighFreq
void AdjustHighFreq(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
AAC_FF_ADIF
@ AAC_FF_ADIF
Definition: aac_decoder.h:26
_AACDecInfo_t::fillExtType
int fillExtType
Definition: aac_decoder.h:100
_SBRFreq::numNoiseFloorBands
int numNoiseFloorBands
Definition: aac_decoder.h:293
AACDecInfo_t
struct _AACDecInfo_t AACDecInfo_t
_SBRHeader::stopFreq
unsigned char stopFreq
Definition: aac_decoder.h:251
R8FirstPass32
void R8FirstPass32(int *r0)
_SBRFreq::freqHigh
unsigned char freqHigh[48+1]
Definition: aac_decoder.h:299
HuffTabSBR_fEnv15
@ HuffTabSBR_fEnv15
Definition: aac_decoder.h:79
CalcFreqMasterScaleZero
int CalcFreqMasterScaleZero(unsigned char *freqMaster, int alterScale, int k0, int k2)
_PSInfoSBR::smBuf
int smBuf[48]
Definition: aac_decoder.h:416
CalcFreqNoise
int CalcFreqNoise(unsigned char *freqNoise, unsigned char *freqLow, int nLow, int kStart, int k2, int noiseBands)
UnpackPairsNoEsc
void UnpackPairsNoEsc(int cb, int nVals, int *coef)
PostMultiply64
void PostMultiply64(int *fft1, int nSampsOut)
_SBRFreq::nHigh
int nHigh
Definition: aac_decoder.h:289
StereoProcess
int StereoProcess()
SBR_GRID_VARFIX
@ SBR_GRID_VARFIX
Definition: aac_decoder.h:73
_ADTSHeader_t::copyStart
unsigned char copyStart
Definition: aac_decoder.h:205
_PSInfoSBR
Definition: aac_decoder.h:369
_ADIFHeader_t
Definition: aac_decoder.h:213
_AACFrameInfo_t::tnsUsed
int tnsUsed
Definition: aac_decoder.h:141
_SBRFreq::patchStartSubband
unsigned char patchStartSubband[5+1]
Definition: aac_decoder.h:306
_PSInfoSBR::qp1Inv
int qp1Inv
Definition: aac_decoder.h:402
_GainControlInfo_t::alocCode
unsigned char alocCode[3][8][7]
Definition: aac_decoder.h:175
ProgConfigElement_t
struct _ProgConfigElement_t ProgConfigElement_t
SBRChan
struct _SBRChan SBRChan
GetBitsNoAdvance
unsigned int GetBitsNoAdvance(int nBits)
SetRawBlockParams
int SetRawBlockParams(int copyLast, int nChans, int sampRate, int profile)
ERR_AAC_TNS
@ ERR_AAC_TNS
Definition: aac_decoder.h:57
ERR_AAC_INVALID_ADTS_HEADER
@ ERR_AAC_INVALID_ADTS_HEADER
Definition: aac_decoder.h:47
UnpackDeltaTimeFreq
void UnpackDeltaTimeFreq(int numEnv, unsigned char *deltaFlagEnv, int numNoiseFloors, unsigned char *deltaFlagNoise)
_PSInfoSBR::gainMax
int gainMax
Definition: aac_decoder.h:399
_ADIFHeader_t::numPCE
unsigned char numPCE
Definition: aac_decoder.h:219
SBR_GRID_VARVAR
@ SBR_GRID_VARVAR
Definition: aac_decoder.h:74
_AACDecInfo_t::sbrEnabled
int sbrEnabled
Definition: aac_decoder.h:111
DecodeNoiselessData
int DecodeNoiselessData(uint8_t **buf, int *bitOffset, int *bitsAvail, int ch)
SBRGrid
struct _SBRGrid SBRGrid
ERR_AAC_SBR_NCHANS_TOO_HIGH
@ ERR_AAC_SBR_NCHANS_TOO_HIGH
Definition: aac_decoder.h:64
_PSInfoSBR::noiseFloorBand
int noiseFloorBand
Definition: aac_decoder.h:401
_PSInfoSBR::eCurr
int eCurr[48]
Definition: aac_decoder.h:390
_AACFrameInfo_t::bitsPerSample
int bitsPerSample
Definition: aac_decoder.h:138
_SBRFreq::numQMFBandsPrev
int numQMFBandsPrev
Definition: aac_decoder.h:296
AAC_ID_FIL
@ AAC_ID_FIL
Definition: aac_decoder.h:39
_ADTSHeader_t::profile
unsigned char profile
Definition: aac_decoder.h:197
DecWindowOverlapLongStartNoClip
void DecWindowOverlapLongStartNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
R4Core32
void R4Core32(int *r0)
ADIFHeader_t
struct _ADIFHeader_t ADIFHeader_t
QMFAnalysisConv
void QMFAnalysisConv(int *cTab, int *delay, int dIdx, int *uBuf)
_PSInfoSBR::dataExtra
unsigned char dataExtra
Definition: aac_decoder.h:381
ERR_AAC_INVALID_ADIF_HEADER
@ ERR_AAC_INVALID_ADIF_HEADER
Definition: aac_decoder.h:48
_ADTSHeader_t::numRawDataBlocks
unsigned char numRawDataBlocks
Definition: aac_decoder.h:208
DequantizeNoise
void DequantizeNoise(int nBands, signed char *noiseQuant, int *noiseDequant)
InitSBRState
void InitSBRState()
_PSInfoSBR::gainMaxFBits
int gainMaxFBits
Definition: aac_decoder.h:400
_U64::r
struct _U64::@10 r
CalcFreqMaster
int CalcFreqMaster(unsigned char *freqMaster, int freqScale, int alterScale, int k0, int k2)
ERR_AAC_SBR_DATA
@ ERR_AAC_SBR_DATA
Definition: aac_decoder.h:62
_PSInfoSBR::gLimFbits
int gLimFbits[48]
Definition: aac_decoder.h:419
_SBRGrid
Definition: aac_decoder.h:268
_TNSInfo_t::numFilt
unsigned char numFilt[8]
Definition: aac_decoder.h:161
SBRFreq
struct _SBRFreq SBRFreq
HuffTabSBR_tEnv30b
@ HuffTabSBR_tEnv30b
Definition: aac_decoder.h:84
_ADTSHeader_t::origCopy
unsigned char origCopy
Definition: aac_decoder.h:201
CalcGain
void CalcGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env)
_ADTSHeader_t::sampRateIdx
unsigned char sampRateIdx
Definition: aac_decoder.h:198
_ICSInfo_t::predictorReset
unsigned char predictorReset
Definition: aac_decoder.h:185
_SBRChan::deltaFlagNoise
unsigned char deltaFlagNoise[2]
Definition: aac_decoder.h:312
_PSInfoBase_t::sampRateIdx
int sampRateIdx
Definition: aac_decoder.h:343
FFT32C
void FFT32C(int *x)
TNSFilter
int TNSFilter(int ch)
_AACDecInfo_t::sampRate
int sampRate
Definition: aac_decoder.h:108
_ProgConfigElement_t::matrixMixdown
unsigned char matrixMixdown
Definition: aac_decoder.h:237
HuffTabSBR_fEnv30
@ HuffTabSBR_fEnv30
Definition: aac_decoder.h:83
CalcCovariance1
int CalcCovariance1(int *XBuf, int *p01reN, int *p01imN, int *p12reN, int *p12imN, int *p11reN, int *p22reN)
DecodeScaleFactors
void DecodeScaleFactors(int numWinGrp, int maxSFB, int globalGain, uint8_t *sfbCodeBook, short *scaleFactors)
SqrtFix
int SqrtFix(int q, int fBitsIn, int *fBitsOut)
UnpackADIFHeader
int UnpackADIFHeader(uint8_t **buf, int *bitOffset, int *bitsAvail)
ICSInfo_t
struct _ICSInfo_t ICSInfo_t
DecodeProgramConfigElement
int DecodeProgramConfigElement(uint8_t idx)
_SBRFreq::freqNoise
unsigned char freqNoise[5+1]
Definition: aac_decoder.h:301
_ICSInfo_t
Definition: aac_decoder.h:178
_PSInfoBase_t::pnsUsed
int pnsUsed[2]
Definition: aac_decoder.h:351
_PSInfoSBR::delayIdxQMFS
int delayIdxQMFS[2]
Definition: aac_decoder.h:427
AAC_ID_PCE
@ AAC_ID_PCE
Definition: aac_decoder.h:38
_ICSInfo_t::winSequence
unsigned char winSequence
Definition: aac_decoder.h:180
U64
union _U64 U64
_SBRHeader
Definition: aac_decoder.h:246
CopyNoiseVector
void CopyNoiseVector(int *coefL, int *coefR, int nVals)
PSInfoSBR_t
struct _PSInfoSBR PSInfoSBR_t
_SBRChan::sinIndex
int sinIndex
Definition: aac_decoder.h:326
DecodeSectionData
void DecodeSectionData(int winSequence, int numWinGrp, int maxSFB, uint8_t *sfbCodeBook)
_ICSInfo_t::predictorDataPresent
unsigned char predictorDataPresent
Definition: aac_decoder.h:184
_ProgConfigElement_t::sce
unsigned char sce[15]
Definition: aac_decoder.h:239
DecodeTNSInfo
void DecodeTNSInfo(int winSequence, TNSInfo_t *ti, int8_t *tnsCoef)
RemoveFreq
void RemoveFreq(unsigned char *freq, int nFreq, int removeIdx)
AAC_ID_LFE
@ AAC_ID_LFE
Definition: aac_decoder.h:36
_U64::lo32
unsigned int lo32
Definition: aac_decoder.h:128
DecodeICSInfo
void DecodeICSInfo(ICSInfo_t *icsInfo, int sampRateIdx)
DecodeChannelPairElement
int DecodeChannelPairElement()
_HuffInfo_t::offset
int offset
Definition: aac_decoder.h:148
_ADTSHeader_t::copyBit
unsigned char copyBit
Definition: aac_decoder.h:204
_GainControlInfo_t::maxBand
unsigned char maxBand
Definition: aac_decoder.h:172
_ProgConfigElement_t::elemInstTag
unsigned char elemInstTag
Definition: aac_decoder.h:226
_PulseInfo_t::amp
unsigned char amp[4]
Definition: aac_decoder.h:156
DecodePulseInfo
void DecodePulseInfo(uint8_t ch)
DecodeSBREnvelope
void DecodeSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
_SBRGrid::envTimeBorder
unsigned char envTimeBorder[5+1]
Definition: aac_decoder.h:274
_PSInfoSBR::extendedDataSize
int extendedDataSize
Definition: aac_decoder.h:384
AACDequantize
int AACDequantize(int ch)
_SBRFreq::numPatches
unsigned char numPatches
Definition: aac_decoder.h:304
_PSInfoBase_t::overlap
int overlap[2][1024]
Definition: aac_decoder.h:365
ERR_AAC_IMDCT
@ ERR_AAC_IMDCT
Definition: aac_decoder.h:58
QMFSynthesis
void QMFSynthesis(int *inbuf, int *delay, int *delayIdx, int qmfsBands, short *outbuf, int nChans)
GetNumChannelsADIF
int GetNumChannelsADIF(int nPCE)
PostMultiplyRescale
void PostMultiplyRescale(int tabidx, int *fft1, int es)
_SBRChan::gTemp
int gTemp[5][48]
Definition: aac_decoder.h:328
_SBRGrid::numEnv
unsigned char numEnv
Definition: aac_decoder.h:273
Get32BitVal
unsigned int Get32BitVal(unsigned int *last)
_ICSInfo_t::maxSFB
unsigned char maxSFB
Definition: aac_decoder.h:182
UnpackPairsEsc
void UnpackPairsEsc(int cb, int nVals, int *coef)
_AACDecInfo_t::prevBlockID
int prevBlockID
Definition: aac_decoder.h:101
UnpackInverseFilterMode
void UnpackInverseFilterMode(int numNoiseFloorBands, unsigned char *mode)
UnpackSBRHeader
int UnpackSBRHeader(SBRHeader *sbrHdr)
_PSInfoSBR::envDataDequantScale
signed char envDataDequantScale[2][5]
Definition: aac_decoder.h:386
_PSInfoSBR::eCurrExp
unsigned char eCurrExp[48]
Definition: aac_decoder.h:391
AAC_ID_DSE
@ AAC_ID_DSE
Definition: aac_decoder.h:37
RefillBitstreamCache
void RefillBitstreamCache()
ERR_AAC_SBR_BITSTREAM
@ ERR_AAC_SBR_BITSTREAM
Definition: aac_decoder.h:61
_PSInfoBase_t::tnsInfo
TNSInfo_t tnsInfo[2]
Definition: aac_decoder.h:355
_ADTSHeader_t::bufferFull
int bufferFull
Definition: aac_decoder.h:207
_SBRGrid::freqRes
unsigned char freqRes[5]
Definition: aac_decoder.h:275
PSInfoBase_t
struct _PSInfoBase_t PSInfoBase_t
_PSInfoBase_t::intensityUsed
int intensityUsed[2]
Definition: aac_decoder.h:353
_GainControlInfo_t::adjNum
unsigned char adjNum[3][8]
Definition: aac_decoder.h:173
_PSInfoSBR::sbrGrid
SBRGrid sbrGrid[2]
Definition: aac_decoder.h:376
_AACDecInfo_t::frameCount
int frameCount
Definition: aac_decoder.h:114
DecodeICS
void DecodeICS(int ch)
_PSInfoBase_t::useImpChanMap
int useImpChanMap
Definition: aac_decoder.h:342
_PSInfoSBR::delayIdxQMFA
int delayIdxQMFA[2]
Definition: aac_decoder.h:425
_ProgConfigElement_t::bce
unsigned char bce[15]
Definition: aac_decoder.h:240
AAC_ID_INVALID
@ AAC_ID_INVALID
Definition: aac_decoder.h:32
UnpackZeros
void UnpackZeros(int nVals, int *coef)
ERR_AAC_NULL_POINTER
@ ERR_AAC_NULL_POINTER
Definition: aac_decoder.h:46
_AACDecInfo_t::sbDeinterleaveReqd
int sbDeinterleaveReqd[2]
Definition: aac_decoder.h:104
DecWindowOverlapLongStopNoClip
void DecWindowOverlapLongStopNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
_PSInfoSBR::eOMGainMax
int eOMGainMax
Definition: aac_decoder.h:398
_PSInfoBase_t::gainControlInfo
GainControlInfo_t gainControlInfo[2]
Definition: aac_decoder.h:358
_GainControlInfo_t::alevCode
unsigned char alevCode[3][8][7]
Definition: aac_decoder.h:174
_ADIFHeader_t::bufferFull
int bufferFull
Definition: aac_decoder.h:220
_PSInfoSBR::qqp1Inv
int qqp1Inv
Definition: aac_decoder.h:403
AACFrameInfo_t
struct _AACFrameInfo_t AACFrameInfo_t
_PSInfoBase_t::sfbCodeBook
unsigned char sfbCodeBook[2][15 *8]
Definition: aac_decoder.h:348
FlushCodecSBR
int FlushCodecSBR()
_ADIFHeader_t::origCopy
unsigned char origCopy
Definition: aac_decoder.h:215
_SBRChan::deltaFlagEnv
unsigned char deltaFlagEnv[5]
Definition: aac_decoder.h:311
DecWindowOverlapShortNoClip
void DecWindowOverlapShortNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
_PSInfoBase_t::nChans
int nChans
Definition: aac_decoder.h:341
_SBRGrid::frameClass
unsigned char frameClass
Definition: aac_decoder.h:269
_ADTSHeader_t::frameLength
int frameLength
Definition: aac_decoder.h:206
UnpackSinusoids
void UnpackSinusoids(int nHigh, int addHarmonicFlag, unsigned char *addHarmonic)
_ADTSHeader_t::id
unsigned char id
Definition: aac_decoder.h:194
CVKernel1
void CVKernel1(int *XBuf, int *accBuf)
AAC_FF_RAW
@ AAC_FF_RAW
Definition: aac_decoder.h:27
_PSInfoSBR::gLimBoost
int gLimBoost[48]
Definition: aac_decoder.h:412
_ProgConfigElement_t::numSCE
unsigned char numSCE
Definition: aac_decoder.h:230
ERR_AAC_SYNTAX_ELEMENT
@ ERR_AAC_SYNTAX_ELEMENT
Definition: aac_decoder.h:52
_ProgConfigElement_t::cce
unsigned char cce[15]
Definition: aac_decoder.h:243
_AACDecInfo_t::nChans
int nChans
Definition: aac_decoder.h:107
_ProgConfigElement_t::fce
unsigned char fce[15]
Definition: aac_decoder.h:238
_AACFrameInfo_t::bitRate
int bitRate
Definition: aac_decoder.h:134
_AACFrameInfo_t::sampRateCore
int sampRateCore
Definition: aac_decoder.h:136
_TNSInfo_t::length
unsigned char length[8]
Definition: aac_decoder.h:163
_SBRFreq::nMaster
int nMaster
Definition: aac_decoder.h:288
UnpackSBRGrid
void UnpackSBRGrid(SBRHeader *sbrHdr, SBRGrid *sbrGrid)
_TNSInfo_t::tnsDataPresent
unsigned char tnsDataPresent
Definition: aac_decoder.h:160
_AACDecInfo_t::profile
int profile
Definition: aac_decoder.h:109
_PSInfoBase_t::coef
int coef[2][1024]
Definition: aac_decoder.h:360
AAC_ID_CPE
@ AAC_ID_CPE
Definition: aac_decoder.h:34
_PSInfoSBR::delayQMFA
int delayQMFA[2][10 *32]
Definition: aac_decoder.h:426
_SBRHeader::startFreq
unsigned char startFreq
Definition: aac_decoder.h:250
_PSInfoSBR::gLimBuf
int gLimBuf[48]
Definition: aac_decoder.h:418
AACGetChannels
int AACGetChannels()
ERR_AAC_NCHANS_TOO_HIGH
@ ERR_AAC_NCHANS_TOO_HIGH
Definition: aac_decoder.h:59
_HuffInfo_t
Definition: aac_decoder.h:145
_SBRHeader::interpFreq
unsigned char interpFreq
Definition: aac_decoder.h:263
AAC_FF_ADTS
@ AAC_FF_ADTS
Definition: aac_decoder.h:25
_PSInfoSBR::envBand
int envBand
Definition: aac_decoder.h:397
_ProgConfigElement_t::ade
unsigned char ade[7]
Definition: aac_decoder.h:242
CalcFreqLow
int CalcFreqLow(unsigned char *freqLow, unsigned char *freqHigh, int nHigh)
GetSampRateIdx
int GetSampRateIdx(int sampRate)
_AACDecInfo_t::currBlockID
int currBlockID
Definition: aac_decoder.h:102
_PSInfoBase_t::icsInfo
ICSInfo_t icsInfo[2]
Definition: aac_decoder.h:345
_SBRGrid::numNoiseFloorsPrev
unsigned char numNoiseFloorsPrev
Definition: aac_decoder.h:281
DecodeSBRData
int DecodeSBRData(int chBase, short *outbuf)
BuildPatches
int BuildPatches(unsigned char *patchNumSubbands, unsigned char *patchStartSubband, unsigned char *freqMaster, int nMaster, int k0, int kStart, int numQMFBands, int sampRateIdx)
_SBRFreq::numQMFBands
int numQMFBands
Definition: aac_decoder.h:292
_PSInfoBase_t::msMaskPresent
int msMaskPresent
Definition: aac_decoder.h:349
ERR_AAC_DEQUANT
@ ERR_AAC_DEQUANT
Definition: aac_decoder.h:53
_SBRHeader::count
int count
Definition: aac_decoder.h:247
StereoProcessGroup
void StereoProcessGroup(int *coefL, int *coefR, const uint16_t *sfbTab, int msMaskPres, uint8_t *msMaskPtr, int msMaskOffset, int maxSFB, uint8_t *cbRight, short *sfRight, int *gbCurrent)
HuffTabSBR_fEnv15b
@ HuffTabSBR_fEnv15b
Definition: aac_decoder.h:81
_SBRHeader::alterScale
unsigned char alterScale
Definition: aac_decoder.h:258
_PSInfoBase_t::prevWinShape
int prevWinShape[2]
Definition: aac_decoder.h:366
ERR_AAC_STEREO_PROCESS
@ ERR_AAC_STEREO_PROCESS
Definition: aac_decoder.h:54
_AACDecInfo_t::format
int format
Definition: aac_decoder.h:110
AACGetBitsPerSample
int AACGetBitsPerSample()
_ProgConfigElement_t::monoMixdown
unsigned char monoMixdown
Definition: aac_decoder.h:235
PNS
int PNS(int ch)
GetADTSChannelMapping
int GetADTSChannelMapping(uint8_t *buf, int bitOffset, int bitsAvail)
_SBRChan::noiseTabIndex
int noiseTabIndex
Definition: aac_decoder.h:325
HuffTabSBR_tEnv30
@ HuffTabSBR_tEnv30
Definition: aac_decoder.h:82
_PSInfoBase_t::gbCurrent
int gbCurrent[2]
Definition: aac_decoder.h:359
_PSInfoSBR::XBufDelay
int XBufDelay[2][8][64][2]
Definition: aac_decoder.h:429
_TNSInfo_t::dir
unsigned char dir[8]
Definition: aac_decoder.h:165
_PSInfoSBR::sBand
int sBand
Definition: aac_decoder.h:405
_PSInfoSBR::sumSM
int sumSM
Definition: aac_decoder.h:410
_SBRChan::gbMask
int gbMask[2]
Definition: aac_decoder.h:322
QMFSynthesisConv
void QMFSynthesisConv(int *cPtr, int *delay, int dIdx, short *outbuf, int nChans)
ERR_AAC_CHANNEL_MAP
@ ERR_AAC_CHANNEL_MAP
Definition: aac_decoder.h:51
CalcLPCoefs
void CalcLPCoefs(int *XBuf, int *a0re, int *a0im, int *a1re, int *a1im, int gb)
HuffTabSBR_fNoise30
@ HuffTabSBR_fNoise30
Definition: aac_decoder.h:87
DCT4
void DCT4(int tabidx, int *coef, int gb)
_PSInfoBase_t::pnsLastVal
int pnsLastVal
Definition: aac_decoder.h:352
CalcComponentGains
void CalcComponentGains(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env, int lim, int fbitsDQ)
_PSInfoSBR::resBitsData
unsigned char resBitsData
Definition: aac_decoder.h:382
HuffTabSBR_fNoise30b
@ HuffTabSBR_fNoise30b
Definition: aac_decoder.h:89
_SBRChan::invfMode
unsigned char invfMode[2][5]
Definition: aac_decoder.h:317
_ProgConfigElement_t::numCCE
unsigned char numCCE
Definition: aac_decoder.h:234
CalcBitsUsed
int CalcBitsUsed(uint8_t *startBuf, int startOffset)
_SBRHeader::smoothMode
unsigned char smoothMode
Definition: aac_decoder.h:264
DequantizeEnvelope
int DequantizeEnvelope(int nBands, int ampRes, signed char *envQuant, int *envDequant)
_SBRChan::addHarmonic
unsigned char addHarmonic[2][64]
Definition: aac_decoder.h:320
SBR_GRID_FIXVAR
@ SBR_GRID_FIXVAR
Definition: aac_decoder.h:72
DeinterleaveShortBlocks
int DeinterleaveShortBlocks(int ch)
TNSInfo_t
struct _TNSInfo_t TNSInfo_t
ERR_AAC_SHORT_BLOCK_DEINT
@ ERR_AAC_SHORT_BLOCK_DEINT
Definition: aac_decoder.h:56
_SBRHeader::limiterBands
unsigned char limiterBands
Definition: aac_decoder.h:261
_PSInfoSBR::eCurrExpMax
unsigned char eCurrExpMax
Definition: aac_decoder.h:392
DecWindowOverlap
void DecWindowOverlap(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
_SBRFreq::nLimiter
int nLimiter
Definition: aac_decoder.h:291
CalcFreqHigh
int CalcFreqHigh(unsigned char *freqHigh, unsigned char *freqMaster, int nMaster, int crossOverBand)
AACFlushCodec
int AACFlushCodec()
_SBRFreq::freqLow
unsigned char freqLow[48/2+1]
Definition: aac_decoder.h:300
_SBRFreq::nLow
int nLow
Definition: aac_decoder.h:290
_SBRFreq
Definition: aac_decoder.h:286
DecodeOneScaleFactor
int DecodeOneScaleFactor()
_AACFrameInfo_t::sampRateOut
int sampRateOut
Definition: aac_decoder.h:137
_aac_BitStreamInfo_t::bytePtr
unsigned char * bytePtr
Definition: aac_decoder.h:119
_PSInfoBase_t::fillCount
int fillCount
Definition: aac_decoder.h:338
_ADIFHeader_t::copyBit
unsigned char copyBit
Definition: aac_decoder.h:214
_SBRHeader::resBitsHdr
unsigned char resBitsHdr
Definition: aac_decoder.h:253
CopyCouplingGrid
void CopyCouplingGrid(SBRGrid *sbrGridLeft, SBRGrid *sbrGridRight)
_ICSInfo_t::numWinGroup
unsigned char numWinGroup
Definition: aac_decoder.h:188
_SBRHeader::ampRes
unsigned char ampRes
Definition: aac_decoder.h:249
_aac_BitStreamInfo_t
Definition: aac_decoder.h:118
AdvanceBitstream
void AdvanceBitstream(int nBits)
HuffTabSBR_tNoise30
@ HuffTabSBR_tNoise30
Definition: aac_decoder.h:86
_AACDecInfo_t::adtsBlocksLeft
int adtsBlocksLeft
Definition: aac_decoder.h:105
_AACDecInfo_t::rawSampleFBits
int rawSampleFBits
Definition: aac_decoder.h:96
CopyCouplingInverseFilterMode
void CopyCouplingInverseFilterMode(int numNoiseFloorBands, unsigned char *modeLeft, unsigned char *modeRight)
_SBRHeader::hdrExtra1
unsigned char hdrExtra1
Definition: aac_decoder.h:254
PrepareRawBlock
int PrepareRawBlock()
CalcMaxGain
void CalcMaxGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int ch, int env, int lim, int fbitsDQ)
_U64::hi32
signed int hi32
Definition: aac_decoder.h:129
DecodeSBRNoise
void DecodeSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
_SBRFreq::kStart
int kStart
Definition: aac_decoder.h:287
_SBRChan::qTemp
int qTemp[5][48]
Definition: aac_decoder.h:329
AAC_ID_CCE
@ AAC_ID_CCE
Definition: aac_decoder.h:35
R4Core
void R4Core(int *x, int bg, int gp, int *wtab)
DecodeLFEChannelElement
int DecodeLFEChannelElement()
_AACFrameInfo_t::outputSamps
int outputSamps
Definition: aac_decoder.h:139
_ADTSHeader_t::home
unsigned char home
Definition: aac_decoder.h:202
DecWindowOverlapLongStart
void DecWindowOverlapLongStart(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
DecodeOneSymbol
int DecodeOneSymbol(int huffTabIndex)
_ICSInfo_t::winShape
unsigned char winShape
Definition: aac_decoder.h:181
AAC_ID_SCE
@ AAC_ID_SCE
Definition: aac_decoder.h:33
_SBRHeader::freqScale
unsigned char freqScale
Definition: aac_decoder.h:257
_PulseInfo_t
Definition: aac_decoder.h:151
_ADIFHeader_t::copyID
unsigned char copyID[9]
Definition: aac_decoder.h:221
DecodeFillElement
int DecodeFillElement()
_PSInfoBase_t::fillBuf
unsigned char fillBuf[269]
Definition: aac_decoder.h:339
GenerateHighFreq
void GenerateHighFreq(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
PostMultiply
void PostMultiply(int tabidx, int *fft1)
_AACDecInfo_t::bitRate
int bitRate
Definition: aac_decoder.h:106
_AACDecInfo_t::pnsUsed
int pnsUsed
Definition: aac_decoder.h:113
DecWindowOverlapNoClip
void DecWindowOverlapNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
_PSInfoBase_t::tnsWorkBuf
int tnsWorkBuf[20]
Definition: aac_decoder.h:357
GetBits
unsigned int GetBits(int nBits)
VMax
unsigned char VMax(unsigned char *v, int nItems)
R4FirstPass
void R4FirstPass(int *x, int bg)
CalcNoiseDivFactors
void CalcNoiseDivFactors(int q, int *qp1Inv, int *qqp1Inv)
_AACDecInfo_t::rawSampleBuf
void * rawSampleBuf[2]
Definition: aac_decoder.h:94
_PSInfoBase_t::commonWin
int commonWin
Definition: aac_decoder.h:346
AACDecode
int AACDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf)
_PSInfoSBR::crcCheckWord
int crcCheckWord
Definition: aac_decoder.h:395
DecodeSpectrumShort
void DecodeSpectrumShort(int ch)
_SBRHeader::hdrExtra2
unsigned char hdrExtra2
Definition: aac_decoder.h:255
_ADIFHeader_t::bitRate
int bitRate
Definition: aac_decoder.h:218
_ADTSHeader_t
Definition: aac_decoder.h:192
CalcCovariance2
int CalcCovariance2(int *XBuf, int *p02reN, int *p02imN)
_SBRChan
Definition: aac_decoder.h:309
_AACFrameInfo_t
Definition: aac_decoder.h:133
_ICSInfo_t::sfGroup
unsigned char sfGroup
Definition: aac_decoder.h:183
ERR_AAC_NONE
@ ERR_AAC_NONE
Definition: aac_decoder.h:44
_SBRFreq::kStartPrev
int kStartPrev
Definition: aac_decoder.h:295
SetBitstreamPointer
void SetBitstreamPointer(int nBytes, uint8_t *buf)
DecodeHuffmanScalar
int DecodeHuffmanScalar(const signed short *huffTab, const HuffInfo_t *huffTabInfo, unsigned int bitBuf, int32_t *val)
HuffInfo_t
struct _HuffInfo_t HuffInfo_t
_PulseInfo_t::startSFB
unsigned char startSFB
Definition: aac_decoder.h:154
FilterRegion
int FilterRegion(int size, int dir, int order, int *audioCoef, int *a, int *hist)
_HuffInfo_t::count
unsigned char count[20]
Definition: aac_decoder.h:147
_TNSInfo_t
Definition: aac_decoder.h:159
_ADTSHeader_t::privateBit
unsigned char privateBit
Definition: aac_decoder.h:199
_PSInfoSBR::noiseDataDequant
int noiseDataDequant[2][2][5]
Definition: aac_decoder.h:388
AACDecoder_AllocateBuffers
bool AACDecoder_AllocateBuffers(void)
_SBRGrid::noiseTimeBorder
unsigned char noiseTimeBorder[2+1]
Definition: aac_decoder.h:278
VMin
unsigned char VMin(unsigned char *v, int nItems)
_TNSInfo_t::coefRes
unsigned char coefRes[8]
Definition: aac_decoder.h:162
ERR_AAC_SBR_SINGLERATE_UNSUPPORTED
@ ERR_AAC_SBR_SINGLERATE_UNSUPPORTED
Definition: aac_decoder.h:65
_ProgConfigElement_t::numLCE
unsigned char numLCE
Definition: aac_decoder.h:232
_PSInfoSBR::qmLimBuf
int qmLimBuf[48]
Definition: aac_decoder.h:417
AACDecoder_FreeBuffers
void AACDecoder_FreeBuffers(void)
_AACFrameInfo_t::pnsUsed
int pnsUsed
Definition: aac_decoder.h:142
_PSInfoSBR::extendedDataPresent
unsigned char extendedDataPresent
Definition: aac_decoder.h:383