 |
RSeries astromech firmware
|
|
Go to the documentation of this file.
3 #pragma GCC optimize ("O3")
8 #define AAC_ENABLE_MPEG4
14 #define MAX(a,b) ((a) > (b) ? (a) : (b))
18 #define MIN(a,b) ((a) < (b) ? (a) : (b))
361 #ifdef AAC_ENABLE_SBR
362 int sbrWorkBuf[2][1024];
434 #define CLIP_2N(y, n) { \
435 int sign = (y) >> 31; \
436 if (sign != (y) >> (n)) { \
437 (y) = sign ^ ((1 << (n)) - 1); \
442 #define CLIP_2N_SHIFT30(y, n) { \
443 int sign = (y) >> 31; \
444 if (sign != (y) >> (30 - (n))) { \
445 (y) = sign ^ (0x3fffffff); \
456 int AACDecode(uint8_t *inbuf,
int *bytesLeft,
short *outbuf);
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);
477 void DCT4(
int tabidx,
int *coef,
int gb);
481 void R4Core(
int *x,
int bg,
int gp,
int *wtab);
482 void R4FFT(
int tabidx,
int *x);
489 void DecWindowOverlap(
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);
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);
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);
525 int SqrtFix(
int q,
int fBitsIn,
int *fBitsOut);
535 unsigned int GetBits(
int nBits);
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);
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);
569 int CalcCovariance1(
int *XBuf,
int *p01reN,
int *p01imN,
int *p12reN,
int *p12imN,
int *p11reN,
int *p22reN);
571 void CalcLPCoefs(
int *XBuf,
int *a0re,
int *a0im,
int *a1re,
int *a1im,
int gb);
576 int DequantizeEnvelope(
int nBands,
int ampRes,
signed char *envQuant,
int *envDequant);
577 void DequantizeNoise(
int nBands,
signed char *noiseQuant,
int *noiseDequant);
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);
595 int numNoiseFloors,
unsigned char *deltaFlagNoise);
597 void UnpackSinusoids(
int nHigh,
int addHarmonicFlag,
unsigned char *addHarmonic);
int CalcFreqLimiter(unsigned char *freqLimiter, unsigned char *patchNumSubbands, unsigned char *freqLow, int nLow, int kStart, int limiterBands, int numPatches)
unsigned char sampRateIdx
Definition: aac_decoder.h:228
int smBoost[48]
Definition: aac_decoder.h:414
@ ERR_AAC_SBR_PCM_FORMAT
Definition: aac_decoder.h:63
int maxBits
Definition: aac_decoder.h:146
@ ERR_AAC_UNKNOWN
Definition: aac_decoder.h:67
int rawSampleBytes
Definition: aac_decoder.h:95
void UncoupleSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR)
unsigned char numPulse
Definition: aac_decoder.h:153
unsigned char * fillBuf
Definition: aac_decoder.h:98
void UnpackQuads(int cb, int nVals, int *coef)
unsigned char winGroupLen[8]
Definition: aac_decoder.h:189
SBRChan sbrChan[2]
Definition: aac_decoder.h:378
signed char noiseDataQuant[2][5]
Definition: aac_decoder.h:315
Definition: aac_decoder.h:335
short scaleFactors[2][15 *8]
Definition: aac_decoder.h:347
int CalcFreqTables(SBRHeader *sbrHdr, SBRFreq *sbrFreq, int sampRateIdx)
signed char la
Definition: aac_decoder.h:393
unsigned char numEnvPrev
Definition: aac_decoder.h:280
Definition: aac_decoder.h:125
SBRFreq sbrFreq[2]
Definition: aac_decoder.h:377
@ AAC_FF_Unknown
Definition: aac_decoder.h:24
int profile
Definition: aac_decoder.h:140
struct _aac_BitStreamInfo_t aac_BitStreamInfo_t
unsigned char numNoiseFloors
Definition: aac_decoder.h:277
int qFiltLast[48]
Definition: aac_decoder.h:422
int sumECurrGLim
Definition: aac_decoder.h:409
void UnpackSBRSingleChannel(int chBase)
struct _PulseInfo_t PulseInfo_t
int cachedBits
Definition: aac_decoder.h:121
int64_t w64
Definition: aac_decoder.h:126
int DecodeDataStreamElement()
void DecodeLPCCoefs(int order, int res, int8_t *filtCoef, int *a, int *b)
int InvRNormalized(int r)
@ ERR_AAC_SBR_INIT
Definition: aac_decoder.h:60
int DecodeNextElement(uint8_t **buf, int *bitOffset, int *bitsAvail)
void GenerateNoiseVector(int *coef, int *last, int nVals)
@ ERR_AAC_INVALID_FRAME
Definition: aac_decoder.h:49
int AACSetRawBlockParams(int copyLast, int nChans, int sampRateCore, int profile)
unsigned char numFCE
Definition: aac_decoder.h:229
int currInstTag
Definition: aac_decoder.h:103
unsigned char msMaskBits[(15 *8+7) >> 3]
Definition: aac_decoder.h:350
unsigned char lce[3]
Definition: aac_decoder.h:241
int frameCount
Definition: aac_decoder.h:371
void ApplyBoost(SBRFreq *sbrFreq, int lim, int fbitsDQ)
int qmLimBoost[48]
Definition: aac_decoder.h:413
int nChans
Definition: aac_decoder.h:135
void PreMultiply(int tabidx, int *zbuf1)
SBRHeader sbrHdr[2]
Definition: aac_decoder.h:375
int sMapped
Definition: aac_decoder.h:404
@ SBR_GRID_FIXFIX
Definition: aac_decoder.h:71
int FindFreq(unsigned char *freq, int nFreq, unsigned char val)
unsigned char profile
Definition: aac_decoder.h:227
unsigned char predictionUsed[41]
Definition: aac_decoder.h:187
void BubbleSort(unsigned char *v, int nItems)
unsigned char freqMaster[48+1]
Definition: aac_decoder.h:298
int sumQM
Definition: aac_decoder.h:411
void R4FFT(int tabidx, int *x)
void UnpackSBRChannelPair(int chBase)
int DequantBlock(int *inbuf, int nSamps, int scale)
void DecodeSpectrumLong(int ch)
@ HuffTabSBR_fEnv30b
Definition: aac_decoder.h:85
struct _SBRHeader SBRHeader
int sampRateIdx
Definition: aac_decoder.h:372
struct _ADTSHeader_t ADTSHeader_t
unsigned char order[8]
Definition: aac_decoder.h:164
unsigned char gainControlDataPresent
Definition: aac_decoder.h:171
void PreMultiplyRescale(int tabidx, int *zbuf1, int es)
unsigned char icsResBit
Definition: aac_decoder.h:179
unsigned char numBCE
Definition: aac_decoder.h:231
int GetSampleRateIdxADIF(int nPCE)
void BitReverse(int *inout, int tabidx)
void DecWindowOverlapShort(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
unsigned char freqLimiter[48/2+5]
Definition: aac_decoder.h:302
int GetSMapped(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int band, int la)
int DecodeSBRBitstream(int chBase)
unsigned char offset[4]
Definition: aac_decoder.h:155
int AACFindSyncWord(unsigned char *buf, int nBytes)
@ HuffTabSBR_tNoise30b
Definition: aac_decoder.h:88
unsigned char pointer
Definition: aac_decoder.h:271
unsigned char patchNumSubbands[5+1]
Definition: aac_decoder.h:305
int chirpFact[5]
Definition: aac_decoder.h:318
void BitReverse32(int *inout)
unsigned char addHarmonicFlag[2]
Definition: aac_decoder.h:319
int dataCount
Definition: aac_decoder.h:336
int tnsUsed
Definition: aac_decoder.h:112
int highBand
Definition: aac_decoder.h:406
int fillCount
Definition: aac_decoder.h:99
@ ERR_AAC_MPEG4_UNSUPPORTED
Definition: aac_decoder.h:50
void CVKernel2(int *XBuf, int *accBuf)
int8_t coef[60]
Definition: aac_decoder.h:166
Definition: aac_decoder.h:170
void R8FirstPass(int *x, int bg)
Definition: aac_decoder.h:92
signed char laPrev
Definition: aac_decoder.h:323
void DecWindowOverlapLongStop(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
int nBytes
Definition: aac_decoder.h:122
unsigned char freqResPrev
Definition: aac_decoder.h:282
void DecodeGainControlInfo(int winSequence, GainControlInfo_t *gi)
int delayQMFS[2][10 *128]
Definition: aac_decoder.h:428
void UncoupleSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChanR)
struct _GainControlInfo_t GainControlInfo_t
signed char envDataQuant[5][48]
Definition: aac_decoder.h:314
int DecodeSingleChannelElement()
unsigned char numADE
Definition: aac_decoder.h:233
int ScaleNoiseVector(int *coef, int nVals, int sf)
int gFiltLast[48]
Definition: aac_decoder.h:421
unsigned char pulseDataPresent
Definition: aac_decoder.h:152
@ AAC_ID_END
Definition: aac_decoder.h:40
void PreMultiply64(int *zbuf1)
@ HuffTabSBR_tEnv15b
Definition: aac_decoder.h:80
int IMDCT(int ch, int chOut, short *outbuf)
int QMFAnalysis(int *inbuf, int *delay, int *XBuf, int fBitsIn, int *delayIdx, int qmfaBands)
int sumEOrigMapped
Definition: aac_decoder.h:408
int reset
Definition: aac_decoder.h:310
int couplingFlag
Definition: aac_decoder.h:396
Definition: aac_decoder.h:225
void ByteAlignBitstream()
int envDataDequant[2][5][48]
Definition: aac_decoder.h:387
unsigned char ampResFrame
Definition: aac_decoder.h:270
@ ERR_AAC_INDATA_UNDERFLOW
Definition: aac_decoder.h:45
unsigned char dataBuf[510]
Definition: aac_decoder.h:337
int gainNoiseIndex
Definition: aac_decoder.h:327
@ ERR_AAC_RAWBLOCK_PARAMS
Definition: aac_decoder.h:66
int XBuf[32+8][64][2]
Definition: aac_decoder.h:430
int tnsLPCBuf[20]
Definition: aac_decoder.h:356
unsigned int iCache
Definition: aac_decoder.h:120
void EstimateEnvelope(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int env)
@ ERR_AAC_PNS
Definition: aac_decoder.h:55
int RatioPowInv(int a, int b, int c)
unsigned char predictorResetGroupNum
Definition: aac_decoder.h:186
int UnpackADTSHeader(uint8_t **buf, int *bitOffset, int *bitsAvail)
unsigned char stereoMixdown
Definition: aac_decoder.h:236
@ HuffTabSBR_tEnv15
Definition: aac_decoder.h:78
void MapHF(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int env, int hfReset)
void AdjustHighFreq(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
@ AAC_FF_ADIF
Definition: aac_decoder.h:26
int fillExtType
Definition: aac_decoder.h:100
int numNoiseFloorBands
Definition: aac_decoder.h:293
struct _AACDecInfo_t AACDecInfo_t
void R8FirstPass32(int *r0)
unsigned char freqHigh[48+1]
Definition: aac_decoder.h:299
@ HuffTabSBR_fEnv15
Definition: aac_decoder.h:79
int CalcFreqMasterScaleZero(unsigned char *freqMaster, int alterScale, int k0, int k2)
int smBuf[48]
Definition: aac_decoder.h:416
int CalcFreqNoise(unsigned char *freqNoise, unsigned char *freqLow, int nLow, int kStart, int k2, int noiseBands)
void UnpackPairsNoEsc(int cb, int nVals, int *coef)
void PostMultiply64(int *fft1, int nSampsOut)
int nHigh
Definition: aac_decoder.h:289
@ SBR_GRID_VARFIX
Definition: aac_decoder.h:73
Definition: aac_decoder.h:369
int tnsUsed
Definition: aac_decoder.h:141
unsigned char patchStartSubband[5+1]
Definition: aac_decoder.h:306
int qp1Inv
Definition: aac_decoder.h:402
unsigned char alocCode[3][8][7]
Definition: aac_decoder.h:175
struct _ProgConfigElement_t ProgConfigElement_t
unsigned int GetBitsNoAdvance(int nBits)
int SetRawBlockParams(int copyLast, int nChans, int sampRate, int profile)
@ ERR_AAC_TNS
Definition: aac_decoder.h:57
@ ERR_AAC_INVALID_ADTS_HEADER
Definition: aac_decoder.h:47
void UnpackDeltaTimeFreq(int numEnv, unsigned char *deltaFlagEnv, int numNoiseFloors, unsigned char *deltaFlagNoise)
int gainMax
Definition: aac_decoder.h:399
@ SBR_GRID_VARVAR
Definition: aac_decoder.h:74
int sbrEnabled
Definition: aac_decoder.h:111
int DecodeNoiselessData(uint8_t **buf, int *bitOffset, int *bitsAvail, int ch)
@ ERR_AAC_SBR_NCHANS_TOO_HIGH
Definition: aac_decoder.h:64
int noiseFloorBand
Definition: aac_decoder.h:401
int eCurr[48]
Definition: aac_decoder.h:390
int bitsPerSample
Definition: aac_decoder.h:138
int numQMFBandsPrev
Definition: aac_decoder.h:296
@ AAC_ID_FIL
Definition: aac_decoder.h:39
void DecWindowOverlapLongStartNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
struct _ADIFHeader_t ADIFHeader_t
void QMFAnalysisConv(int *cTab, int *delay, int dIdx, int *uBuf)
unsigned char dataExtra
Definition: aac_decoder.h:381
@ ERR_AAC_INVALID_ADIF_HEADER
Definition: aac_decoder.h:48
void DequantizeNoise(int nBands, signed char *noiseQuant, int *noiseDequant)
int gainMaxFBits
Definition: aac_decoder.h:400
int CalcFreqMaster(unsigned char *freqMaster, int freqScale, int alterScale, int k0, int k2)
@ ERR_AAC_SBR_DATA
Definition: aac_decoder.h:62
int gLimFbits[48]
Definition: aac_decoder.h:419
Definition: aac_decoder.h:268
unsigned char numFilt[8]
Definition: aac_decoder.h:161
@ HuffTabSBR_tEnv30b
Definition: aac_decoder.h:84
void CalcGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env)
unsigned char predictorReset
Definition: aac_decoder.h:185
unsigned char deltaFlagNoise[2]
Definition: aac_decoder.h:312
int sampRateIdx
Definition: aac_decoder.h:343
int sampRate
Definition: aac_decoder.h:108
unsigned char matrixMixdown
Definition: aac_decoder.h:237
@ HuffTabSBR_fEnv30
Definition: aac_decoder.h:83
int CalcCovariance1(int *XBuf, int *p01reN, int *p01imN, int *p12reN, int *p12imN, int *p11reN, int *p22reN)
void DecodeScaleFactors(int numWinGrp, int maxSFB, int globalGain, uint8_t *sfbCodeBook, short *scaleFactors)
int SqrtFix(int q, int fBitsIn, int *fBitsOut)
int UnpackADIFHeader(uint8_t **buf, int *bitOffset, int *bitsAvail)
struct _ICSInfo_t ICSInfo_t
int DecodeProgramConfigElement(uint8_t idx)
unsigned char freqNoise[5+1]
Definition: aac_decoder.h:301
Definition: aac_decoder.h:178
int pnsUsed[2]
Definition: aac_decoder.h:351
int delayIdxQMFS[2]
Definition: aac_decoder.h:427
@ AAC_ID_PCE
Definition: aac_decoder.h:38
unsigned char winSequence
Definition: aac_decoder.h:180
void CopyNoiseVector(int *coefL, int *coefR, int nVals)
struct _PSInfoSBR PSInfoSBR_t
int sinIndex
Definition: aac_decoder.h:326
void DecodeSectionData(int winSequence, int numWinGrp, int maxSFB, uint8_t *sfbCodeBook)
unsigned char predictorDataPresent
Definition: aac_decoder.h:184
unsigned char sce[15]
Definition: aac_decoder.h:239
void DecodeTNSInfo(int winSequence, TNSInfo_t *ti, int8_t *tnsCoef)
void RemoveFreq(unsigned char *freq, int nFreq, int removeIdx)
@ AAC_ID_LFE
Definition: aac_decoder.h:36
unsigned int lo32
Definition: aac_decoder.h:128
void DecodeICSInfo(ICSInfo_t *icsInfo, int sampRateIdx)
int DecodeChannelPairElement()
int offset
Definition: aac_decoder.h:148
unsigned char maxBand
Definition: aac_decoder.h:172
unsigned char elemInstTag
Definition: aac_decoder.h:226
unsigned char amp[4]
Definition: aac_decoder.h:156
void DecodePulseInfo(uint8_t ch)
void DecodeSBREnvelope(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
unsigned char envTimeBorder[5+1]
Definition: aac_decoder.h:274
int extendedDataSize
Definition: aac_decoder.h:384
int AACDequantize(int ch)
unsigned char numPatches
Definition: aac_decoder.h:304
int overlap[2][1024]
Definition: aac_decoder.h:365
@ ERR_AAC_IMDCT
Definition: aac_decoder.h:58
void QMFSynthesis(int *inbuf, int *delay, int *delayIdx, int qmfsBands, short *outbuf, int nChans)
int GetNumChannelsADIF(int nPCE)
void PostMultiplyRescale(int tabidx, int *fft1, int es)
int gTemp[5][48]
Definition: aac_decoder.h:328
unsigned char numEnv
Definition: aac_decoder.h:273
unsigned int Get32BitVal(unsigned int *last)
unsigned char maxSFB
Definition: aac_decoder.h:182
void UnpackPairsEsc(int cb, int nVals, int *coef)
int prevBlockID
Definition: aac_decoder.h:101
void UnpackInverseFilterMode(int numNoiseFloorBands, unsigned char *mode)
int UnpackSBRHeader(SBRHeader *sbrHdr)
signed char envDataDequantScale[2][5]
Definition: aac_decoder.h:386
unsigned char eCurrExp[48]
Definition: aac_decoder.h:391
@ AAC_ID_DSE
Definition: aac_decoder.h:37
void RefillBitstreamCache()
@ ERR_AAC_SBR_BITSTREAM
Definition: aac_decoder.h:61
TNSInfo_t tnsInfo[2]
Definition: aac_decoder.h:355
unsigned char freqRes[5]
Definition: aac_decoder.h:275
struct _PSInfoBase_t PSInfoBase_t
int intensityUsed[2]
Definition: aac_decoder.h:353
unsigned char adjNum[3][8]
Definition: aac_decoder.h:173
SBRGrid sbrGrid[2]
Definition: aac_decoder.h:376
int frameCount
Definition: aac_decoder.h:114
int useImpChanMap
Definition: aac_decoder.h:342
int delayIdxQMFA[2]
Definition: aac_decoder.h:425
unsigned char bce[15]
Definition: aac_decoder.h:240
@ AAC_ID_INVALID
Definition: aac_decoder.h:32
void UnpackZeros(int nVals, int *coef)
@ ERR_AAC_NULL_POINTER
Definition: aac_decoder.h:46
int sbDeinterleaveReqd[2]
Definition: aac_decoder.h:104
void DecWindowOverlapLongStopNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
int eOMGainMax
Definition: aac_decoder.h:398
GainControlInfo_t gainControlInfo[2]
Definition: aac_decoder.h:358
unsigned char alevCode[3][8][7]
Definition: aac_decoder.h:174
int qqp1Inv
Definition: aac_decoder.h:403
struct _AACFrameInfo_t AACFrameInfo_t
unsigned char sfbCodeBook[2][15 *8]
Definition: aac_decoder.h:348
unsigned char deltaFlagEnv[5]
Definition: aac_decoder.h:311
void DecWindowOverlapShortNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
int nChans
Definition: aac_decoder.h:341
unsigned char frameClass
Definition: aac_decoder.h:269
void UnpackSinusoids(int nHigh, int addHarmonicFlag, unsigned char *addHarmonic)
void CVKernel1(int *XBuf, int *accBuf)
@ AAC_FF_RAW
Definition: aac_decoder.h:27
int gLimBoost[48]
Definition: aac_decoder.h:412
unsigned char numSCE
Definition: aac_decoder.h:230
@ ERR_AAC_SYNTAX_ELEMENT
Definition: aac_decoder.h:52
unsigned char cce[15]
Definition: aac_decoder.h:243
int nChans
Definition: aac_decoder.h:107
unsigned char fce[15]
Definition: aac_decoder.h:238
int bitRate
Definition: aac_decoder.h:134
int sampRateCore
Definition: aac_decoder.h:136
unsigned char length[8]
Definition: aac_decoder.h:163
int nMaster
Definition: aac_decoder.h:288
void UnpackSBRGrid(SBRHeader *sbrHdr, SBRGrid *sbrGrid)
unsigned char tnsDataPresent
Definition: aac_decoder.h:160
int profile
Definition: aac_decoder.h:109
int coef[2][1024]
Definition: aac_decoder.h:360
@ AAC_ID_CPE
Definition: aac_decoder.h:34
int delayQMFA[2][10 *32]
Definition: aac_decoder.h:426
int gLimBuf[48]
Definition: aac_decoder.h:418
@ ERR_AAC_NCHANS_TOO_HIGH
Definition: aac_decoder.h:59
Definition: aac_decoder.h:145
@ AAC_FF_ADTS
Definition: aac_decoder.h:25
int envBand
Definition: aac_decoder.h:397
unsigned char ade[7]
Definition: aac_decoder.h:242
int CalcFreqLow(unsigned char *freqLow, unsigned char *freqHigh, int nHigh)
int GetSampRateIdx(int sampRate)
int currBlockID
Definition: aac_decoder.h:102
ICSInfo_t icsInfo[2]
Definition: aac_decoder.h:345
unsigned char numNoiseFloorsPrev
Definition: aac_decoder.h:281
int DecodeSBRData(int chBase, short *outbuf)
int BuildPatches(unsigned char *patchNumSubbands, unsigned char *patchStartSubband, unsigned char *freqMaster, int nMaster, int k0, int kStart, int numQMFBands, int sampRateIdx)
int numQMFBands
Definition: aac_decoder.h:292
int msMaskPresent
Definition: aac_decoder.h:349
@ ERR_AAC_DEQUANT
Definition: aac_decoder.h:53
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
Definition: aac_decoder.h:81
int prevWinShape[2]
Definition: aac_decoder.h:366
@ ERR_AAC_STEREO_PROCESS
Definition: aac_decoder.h:54
int format
Definition: aac_decoder.h:110
int AACGetBitsPerSample()
unsigned char monoMixdown
Definition: aac_decoder.h:235
int GetADTSChannelMapping(uint8_t *buf, int bitOffset, int bitsAvail)
int noiseTabIndex
Definition: aac_decoder.h:325
@ HuffTabSBR_tEnv30
Definition: aac_decoder.h:82
int gbCurrent[2]
Definition: aac_decoder.h:359
int XBufDelay[2][8][64][2]
Definition: aac_decoder.h:429
unsigned char dir[8]
Definition: aac_decoder.h:165
int sBand
Definition: aac_decoder.h:405
int sumSM
Definition: aac_decoder.h:410
int gbMask[2]
Definition: aac_decoder.h:322
void QMFSynthesisConv(int *cPtr, int *delay, int dIdx, short *outbuf, int nChans)
@ ERR_AAC_CHANNEL_MAP
Definition: aac_decoder.h:51
void CalcLPCoefs(int *XBuf, int *a0re, int *a0im, int *a1re, int *a1im, int gb)
@ HuffTabSBR_fNoise30
Definition: aac_decoder.h:87
void DCT4(int tabidx, int *coef, int gb)
int pnsLastVal
Definition: aac_decoder.h:352
void CalcComponentGains(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch, int env, int lim, int fbitsDQ)
unsigned char resBitsData
Definition: aac_decoder.h:382
@ HuffTabSBR_fNoise30b
Definition: aac_decoder.h:89
unsigned char invfMode[2][5]
Definition: aac_decoder.h:317
unsigned char numCCE
Definition: aac_decoder.h:234
int CalcBitsUsed(uint8_t *startBuf, int startOffset)
int DequantizeEnvelope(int nBands, int ampRes, signed char *envQuant, int *envDequant)
unsigned char addHarmonic[2][64]
Definition: aac_decoder.h:320
@ SBR_GRID_FIXVAR
Definition: aac_decoder.h:72
int DeinterleaveShortBlocks(int ch)
struct _TNSInfo_t TNSInfo_t
@ ERR_AAC_SHORT_BLOCK_DEINT
Definition: aac_decoder.h:56
unsigned char eCurrExpMax
Definition: aac_decoder.h:392
void DecWindowOverlap(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
int nLimiter
Definition: aac_decoder.h:291
int CalcFreqHigh(unsigned char *freqHigh, unsigned char *freqMaster, int nMaster, int crossOverBand)
unsigned char freqLow[48/2+1]
Definition: aac_decoder.h:300
int nLow
Definition: aac_decoder.h:290
Definition: aac_decoder.h:286
int DecodeOneScaleFactor()
int sampRateOut
Definition: aac_decoder.h:137
unsigned char * bytePtr
Definition: aac_decoder.h:119
int fillCount
Definition: aac_decoder.h:338
void CopyCouplingGrid(SBRGrid *sbrGridLeft, SBRGrid *sbrGridRight)
unsigned char numWinGroup
Definition: aac_decoder.h:188
Definition: aac_decoder.h:118
void AdvanceBitstream(int nBits)
@ HuffTabSBR_tNoise30
Definition: aac_decoder.h:86
int adtsBlocksLeft
Definition: aac_decoder.h:105
int rawSampleFBits
Definition: aac_decoder.h:96
void CopyCouplingInverseFilterMode(int numNoiseFloorBands, unsigned char *modeLeft, unsigned char *modeRight)
void CalcMaxGain(SBRHeader *sbrHdr, SBRGrid *sbrGrid, SBRFreq *sbrFreq, int ch, int env, int lim, int fbitsDQ)
signed int hi32
Definition: aac_decoder.h:129
void DecodeSBRNoise(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
int kStart
Definition: aac_decoder.h:287
int qTemp[5][48]
Definition: aac_decoder.h:329
@ AAC_ID_CCE
Definition: aac_decoder.h:35
void R4Core(int *x, int bg, int gp, int *wtab)
int DecodeLFEChannelElement()
int outputSamps
Definition: aac_decoder.h:139
void DecWindowOverlapLongStart(int *buf0, int *over0, short *pcm0, int nChans, int winTypeCurr, int winTypePrev)
int DecodeOneSymbol(int huffTabIndex)
unsigned char winShape
Definition: aac_decoder.h:181
@ AAC_ID_SCE
Definition: aac_decoder.h:33
Definition: aac_decoder.h:151
unsigned char fillBuf[269]
Definition: aac_decoder.h:339
void GenerateHighFreq(SBRGrid *sbrGrid, SBRFreq *sbrFreq, SBRChan *sbrChan, int ch)
void PostMultiply(int tabidx, int *fft1)
int bitRate
Definition: aac_decoder.h:106
int pnsUsed
Definition: aac_decoder.h:113
void DecWindowOverlapNoClip(int *buf0, int *over0, int *out0, int winTypeCurr, int winTypePrev)
int tnsWorkBuf[20]
Definition: aac_decoder.h:357
unsigned int GetBits(int nBits)
unsigned char VMax(unsigned char *v, int nItems)
void R4FirstPass(int *x, int bg)
void CalcNoiseDivFactors(int q, int *qp1Inv, int *qqp1Inv)
void * rawSampleBuf[2]
Definition: aac_decoder.h:94
int commonWin
Definition: aac_decoder.h:346
int AACDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf)
int crcCheckWord
Definition: aac_decoder.h:395
void DecodeSpectrumShort(int ch)
int CalcCovariance2(int *XBuf, int *p02reN, int *p02imN)
Definition: aac_decoder.h:309
Definition: aac_decoder.h:133
unsigned char sfGroup
Definition: aac_decoder.h:183
@ ERR_AAC_NONE
Definition: aac_decoder.h:44
int kStartPrev
Definition: aac_decoder.h:295
void SetBitstreamPointer(int nBytes, uint8_t *buf)
int DecodeHuffmanScalar(const signed short *huffTab, const HuffInfo_t *huffTabInfo, unsigned int bitBuf, int32_t *val)
struct _HuffInfo_t HuffInfo_t
unsigned char startSFB
Definition: aac_decoder.h:154
int FilterRegion(int size, int dir, int order, int *audioCoef, int *a, int *hist)
unsigned char count[20]
Definition: aac_decoder.h:147
Definition: aac_decoder.h:159
int noiseDataDequant[2][2][5]
Definition: aac_decoder.h:388
bool AACDecoder_AllocateBuffers(void)
unsigned char noiseTimeBorder[2+1]
Definition: aac_decoder.h:278
unsigned char VMin(unsigned char *v, int nItems)
unsigned char coefRes[8]
Definition: aac_decoder.h:162
@ ERR_AAC_SBR_SINGLERATE_UNSUPPORTED
Definition: aac_decoder.h:65
unsigned char numLCE
Definition: aac_decoder.h:232
int qmLimBuf[48]
Definition: aac_decoder.h:417
void AACDecoder_FreeBuffers(void)
int pnsUsed
Definition: aac_decoder.h:142
unsigned char extendedDataPresent
Definition: aac_decoder.h:383