98 bsi->iCache = ((
uint32_t)(*bsi->bytePtr++)) << 24;
99 bsi->iCache |= ((
uint32_t)(*bsi->bytePtr++)) << 16;
100 bsi->iCache |= ((
uint32_t)(*bsi->bytePtr++)) << 8;
101 bsi->iCache |= ((
uint32_t)(*bsi->bytePtr++));
102 bsi->cachedBits = 32;
107 bsi->iCache |= (*bsi->bytePtr++);
110 bsi->iCache <<= ((3 - bsi->nBytes)*8);
111 bsi->cachedBits = 8*bsi->nBytes;
139 data = bsi->iCache >> (31 - nBits);
141 bsi->iCache <<= nBits;
142 bsi->cachedBits -= nBits;
145 if (bsi->cachedBits < 0) {
146 lowBits = -bsi->cachedBits;
148 data |= bsi->iCache >> (32 - lowBits);
150 bsi->cachedBits -= lowBits;
151 bsi->iCache <<= lowBits;
174 bitsUsed = (bsi->bytePtr - startBuf) * 8;
175 bitsUsed -= bsi->cachedBits;
176 bitsUsed -= startOffset;
198 if (!mp3DecInfo || !mp3DecInfo->FrameHeaderPS)
236 verIdx = (buf[1] >> 3) & 0x03;
238 fh->
layer = 4 - ((buf[1] >> 1) & 0x03);
239 fh->
crc = 1 - ((buf[1] >> 0) & 0x01);
240 fh->
brIdx = (buf[2] >> 4) & 0x0f;
241 fh->
srIdx = (buf[2] >> 2) & 0x03;
245 fh->
modeExt = (buf[3] >> 4) & 0x03;
246 fh->
copyFlag = (buf[3] >> 3) & 0x01;
247 fh->
origFlag = (buf[3] >> 2) & 0x01;
248 fh->
emphasis = (buf[3] >> 0) & 0x03;
259 mp3DecInfo->nChans = (fh->
sMode ==
Mono ? 1 : 2);
263 mp3DecInfo->layer = fh->
layer;
264 mp3DecInfo->version = fh->
ver;
282 fh->
CRCWord = ((int)buf[4] << 8 | (int)buf[5] << 0);
306 int gr, ch, bd, nBytes;
313 if (!mp3DecInfo || !mp3DecInfo->FrameHeaderPS || !mp3DecInfo->SideInfoPS)
317 si = ((
SideInfo *)(mp3DecInfo->SideInfoPS));
319 bsi = &bitStreamInfo;
327 for (ch = 0; ch < mp3DecInfo->nChans; ch++)
338 for(gr =0; gr < mp3DecInfo->nGrans; gr++) {
339 for (ch = 0; ch < mp3DecInfo->nChans; ch++) {
340 sis = &si->
sis[gr][ch];
#define SIBYTES_MPEG2_MONO
#define SIBYTES_MPEG1_MONO
#define SIBYTES_MPEG2_STEREO
#define SIBYTES_MPEG1_STEREO
struct _MP3DecInfo MP3DecInfo
struct fl::third_party::_BitStreamInfo BitStreamInfo
const short slotTab[3][3][15]
const short sideBytesTab[3][2]
int UnpackFrameHeader(MP3DecInfo *mp3DecInfo, const unsigned char *buf) FL_NOEXCEPT
const int32_t samplerateTab[3][3]
struct fl::third_party::_FrameHeader FrameHeader
uint32_t GetBits(BitStreamInfo *bsi, int32_t nBits) FL_NOEXCEPT
void SetBitstreamPointer(BitStreamInfo *bsi, int32_t nBytes, const unsigned char *buf) FL_NOEXCEPT
int UnpackSideInfo(MP3DecInfo *mp3DecInfo, const unsigned char *buf) FL_NOEXCEPT
struct fl::third_party::_SideInfo SideInfo
const short samplesPerFrameTab[3][3]
const SFBandTable sfBandTable[3][3]
struct fl::third_party::_SideInfoSub SideInfoSub
const short bitrateTab[3][3][15]
int CheckPadBit(MP3DecInfo *mp3DecInfo) FL_NOEXCEPT
static __inline void RefillBitstreamCache(BitStreamInfo *bsi) FL_NOEXCEPT
int32_t CalcBitsUsed(BitStreamInfo *bsi, const unsigned char *startBuf, int32_t startOffset) FL_NOEXCEPT
int32_t count1TableSelect
const SFBandTable * sfBand
SideInfoSub sis[MAX_NGRAN][MAX_NCHAN]
int32_t scfsi[MAX_NCHAN][MAX_SCFBD]
Base definition for an LED controller.