Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::DecompressMP3 Class Reference

Process audio data compressed with MP3. More...

Inheritance diagram for Burger::DecompressMP3:
Collaboration diagram for Burger::DecompressMP3:

Classes

struct  BandInfo_t
 
struct  Chunk_t
 
struct  FrameHeader_t
 Decoded 32 bit MP3 packet header. More...
 
struct  FrameHeaderExt_t
 Decoded 32 bit MP3 packet header with extended information. More...
 
struct  GranuleInfo_t
 
struct  HuffmanCodeHeader_t
 
struct  Layer2_AllocEntry_t
 Preset tables for Version 1, Layer 2 allocation entries. More...
 
struct  Layer3Huffman_t
 
struct  Layer3SideInfo_t
 
struct  XingChunk_t
 

Public Types

enum  eMPEGAudioVersionID { MPEG_VERSION_2_5 , MPEG_VERSION_RESERVED , MPEG_VERSION_2 , MPEG_VERSION_1 }
 
enum  eMPEGLayerDescription { MPEG_LAYER_RESERVED , MPEG_LAYER_3 , MPEG_LAYER_2 , MPEG_LAYER_1 }
 
enum  eMPEGChannelMode {
  MPEG_MODE_STEREO , MPEG_MODE_JOINT_STEREO , MPEG_MODE_DUAL_CHANNEL , MPEG_MODE_MONO ,
  MPEG_MODE_UNKNOWN
}
 
enum  eMPEGModeExtension { MPEG_MODEEXT_LR_LR , MPEG_MODEEXT_LR_I , MPEG_MODEEXT_MS_LR , MPEG_MODEEXT_MS_I }
 
enum  eMPEGEmphasis { MPEG_EMP_NONE , MPEG_EMP_50_15MS , MPEG_EMP_RESERVED , MPEG_EMP_CCITJ17 }
 
enum  eGranuleBlockType { BLOCK_TYPE_NORM , BLOCK_TYPE_START , BLOCK_TYPE_SHORT , BLOCK_TYPE_STOP }
 

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 DecompressMP3 ()
 Default constructor.
 
virtual ~DecompressMP3 ()
 Default destructor.
 
eError Reset (void) override
 Resets the decompresser to defaults.
 
eError Process (void *pOutput, uintptr_t uOutputChunkSize, const void *pInput, uintptr_t uInputChunkLength) override
 Decompress audio data using alaw.
 
Chunk_tAddChunk (const uint8_t *pData, uintptr_t uSize)
 Add a new data chunk into the linked list.
 
void RemoveLastChunk (void)
 Dispose of the last data chunk.
 
void RemoveAllChunks (void)
 Dispose of all of the data chunks.
 
uint_t GetByte (void)
 Fetch a byte from the chunk stream.
 
void GetBytesFromChunks (uintptr_t uSize)
 Copy data from the chunk list into the bit stream.
 
uint_t GetBit (void)
 Fetch a single bit from the m_pWorkPointer stream.
 
uint_t GetBits (uint_t uBitCount)
 Fetch a stream of bits from the bit stream.
 
uint_t SeekBuffer (uintptr_t uNegativeOffset)
 Update the internal buffer.
 
void GetMP3Header (void)
 Fetch the 32 bit MP3 header from the chunk stream.
 
uintptr_t ScanForFramePacket (uint_t bFreeMatchMode) const
 Scan ahead for an MP3 frame packet.
 
int Layer3AudioDataPrecedesFrame (void) const
 Determine how many bytes to backtrack to next frame.
 
int AudioDataPrecedesFrame (void) const
 Determine how many bytes to backtrack to next frame.
 
void Layer3GetSideInfoType1 (uint_t uChannelCount, uint_t bMSStereo, uint_t uSampleRateIndex)
 Parse Side information for Layer 1 Docs in mp3_theory.pdf section 5.1.2 Side Information.
 
void Layer3GetSideInfoType2 (uint_t uChannelCount, uint_t bMSStereo, uint_t uSampleRateIndex)
 Parse Side information for Layer 2 or 3.
 
int Layer3GetSideInfo (void)
 Parse Side information.
 
uint_t Layer3GetScaleFactors1 (uint_t *pScaleFactorIndexes, const GranuleInfo_t *pGranuleInfo)
 Parse scale factor indexes for MPeg 1.0.
 
uint_t Layer3GetScaleFactors2 (uint_t *pScaleFactorIndexes, GranuleInfo_t *pGranuleInfo, uint_t bStereo)
 Parse scale factor indexes for MPeg 2.0 or 2.5.
 
uint_t Layer3Dequantize (float *pHybridBuffer, const uint_t *pScaleFactorIndexes, GranuleInfo_t *pGranuleInfo, uint_t uSampleRateIndex, uint_t uBitsPreviouslyParsed)
 dequantize the Hybrid buffer
 
void Layer3ProcessHybridBuffer (float *pHybridInput, float *pHybridOutput, uint_t uChannel, const GranuleInfo_t *pGranuleInfo)
 Process the hybrid buffers.
 
uint_t ExtractXingHeader (uintptr_t uSkipAhead)
 Extract data from the Xing chunk.
 
uintptr_t ProcessMonoSamples (int16_t *pOutput, uintptr_t uOffset, const float *pBand)
 Create samples from audio band information (Mono)
 
uintptr_t ProcessMonoSamples (float *pOutput, uintptr_t uOffset, const float *pBand)
 Create samples from audio band information (Mono)
 
uintptr_t ProcessStereoSamples (int16_t *pOutput, uintptr_t uOffset, uint_t uChannel, const float *pBand)
 Create samples from audio band information (Stereo)
 
uintptr_t ProcessStereoSamples (float *pOutput, uintptr_t uOffset, uint_t uChannel, const float *pBand)
 Create samples from audio band information (Stereo)
 
uintptr_t Layer3DecodeFrame (int16_t *pOutput, uintptr_t uOffset)
 Process a frame of Layer 3 data into 64 samples.
 
uintptr_t Layer3DecodeFrame (float *pOutput, uintptr_t uOffset)
 Process a frame of Layer 3 data into 64 samples.
 
eError Decode (int16_t *pOutput, uintptr_t uOutputSize, const uint8_t *pInput, uintptr_t uInputSize, uintptr_t *pProcessed)
 Decode MP3 data.
 
eError Decode (float *pOutput, uintptr_t uOutputSize, const uint8_t *pInput, uintptr_t uInputSize, uintptr_t *pProcessed)
 Decode MP3 data.
 
- Public Member Functions inherited from Burger::DecompressAudio
SoundManager::eDataType GetDataType (void) const
 Returns the uncompressed data type this codec will output.
 
void SetMono (void)
 Alert the decompression codec to create a single audio channel.
 
void SetStereo (void)
 Alert the decompression codec to create stereo channels.
 
uint_t IsStereo (void) const
 Obtain the stereo/mono state of the decompresser.
 
- Public Member Functions inherited from Burger::Decompress
 Decompress (void)
 Default constructor.
 
uintptr_t GetTotalInputSize (void) const noexcept
 Get the total processed input data in bytes.
 
uintptr_t GetTotalOutputSize (void) const noexcept
 Get the total processed output data in bytes.
 
uintptr_t GetProcessedInputSize (void) const noexcept
 Get the total processed output data in bytes from the last process pass.
 
uintptr_t GetProcessedOutputSize (void) const noexcept
 Get the total processed output data in bytes from the last process pass.
 
uint32_t GetSignature (void) const noexcept
 Return the signature for this decompressor.
 
- Public Member Functions inherited from Burger::Base
const char * get_class_name (void) const noexcept
 Get the name of the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Member Functions

static DecompressMP3New (void)
 Allocate and initialize a DecompressMP3.
 

Public Attributes

Chunk_tm_pNext
 First entry in the linked list of data chunks.
 
Chunk_tm_pPrev
 Last entry in the linked list of data chunks.
 
uint8_t * m_pWorkPointer
 Pointer to m_ByteStreamBuffers.
 
uintptr_t m_uRemainingBytes
 Number of bytes remaining stored in the entire linked list.
 
uintptr_t m_uPreviousFrameSize
 Previous data frame size, UINTPTR_MAX is none was found.
 
uintptr_t m_uFrameSize
 Number of bytes in the frame.
 
uintptr_t m_uSideInfoSize
 Number of bytes for Side Information (Including CRC if present)
 
uintptr_t m_uMP3DataSize
 Number of compressed byte in the current packet.
 
uint_t m_uBitIndex
 Which bit is being parse for bit streaming (0-7)
 
uint_t m_uVBRFrames
 VBR frames from the Xing packet.
 
int m_iEncodingDelay
 Encoding delay from 0-3000 (or -1 if invalid)
 
int m_iEncodingPadding
 Encoding padding from 0-3000 (or -1 if invalid)
 
uint_t m_uWhichBuffer
 Which byte stream buffer is active? (0 or 1)
 
uint_t m_uSynthBufferOffset
 Synthesizer buffer offset (0-15)
 
uint_t m_bVBRHeaderValid
 TRUE if a Variable Bit Rate header was parsed.
 
uint_t m_bSideInfoValid
 TRUE if MP3 side information was parsed.
 
uint_t m_bDataValid
 TRUE if packet data was found.
 
uint_t m_bFreeFrame
 TRUE if in free format mode (Sample rate can change)
 
uint_t m_bPreviousFreeFrame
 TRUE if it was free format mode in the last pass.
 
uint_t m_uPreviousFramePadding
 Number of bits from the previous frame's padding.
 
uint_t m_bBitStreamNotSynced
 TRUE if the bit stream hadn't reached a sync marker.
 
FrameHeaderExt_t m_FrameHeaderExt
 Data frame state.
 
Layer3SideInfo_t m_Layer3SideInfo
 Side information for Layer 3 decoding.
 
uint8_t m_ByteStreamBuffers [2][cMaxFrameSize+1024]
 Internal buffers.
 
uint_t m_uHybridBlockIndexes [2]
 Which m_fHybridBlocks tables that are active (2 channels)
 
float m_fHybridBlocks [2][2][cSubBandLimit *cSideSampleLimit]
 Buffers for DCT tables.
 
float m_fSynthBuffers [2][2][256+16]
 Output buffers for DCT transforms (with 16 entry padding)
 

Static Public Attributes

static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
static const uint_t cSubBandLimit = 32
 Number of sub bands.
 
static const uint_t cSideSampleLimit = 18
 Number of side samples (Used with sub bands)
 
static const uint_t cCBands = 64
 Number of partition bands.
 
static const uint_t cDecoderDelay = 528
 Sample delay on decoding.
 
static const uint_t cEncoderDelay = 576
 Sample delay on encoding.
 
static const uint_t cPostDelay = 1152
 Sample delay for granule encoding.
 
static const uint_t cMaxFrameSize = 2880
 Largest allowed frame in samples.
 
static const uint_t cMDCTDelay = 48
 Cosine table delay.
 
static const uint_t cFFTIndex = cMDCTDelay + 224
 Index into the FFT entry.
 
static const uint_t cScaleBlock = 12
 Layer1 / Layer2 scale block.
 
static const uint32_float_t g_fDecodeWindow [544]
 MP3 decoding windows table.
 
static const Layer2_AllocEntry_tg_MP3Layer2Entries [5]
 Pointers to the MP3 Layer2 allocation tables.
 
static const uint8_t g_HuffLens32 [4 *4]
 Bit lengths for the special case for 32 bits.
 
static const uint8_t g_HuffLens33 [4 *4]
 Bit lengths for the 2nd special case.
 
static const HuffmanCodeHeader_t g_HuffmanCodeHeaders [34]
 Array of Huffman trees.
 
static const Layer3Huffman_t g_MP3CompashHash [2]
 Pointers to compact Huffman hash tables.
 
static const Layer3Huffman_t g_MP3LongHash [32]
 Pointers to long Huffman hash tables.
 
static const uint32_t g_HuffmanLengthTable16_24 [16 *16]
 Quick lookup for Huffman 16 and 24 bit tables.
 
static const uint32_t g_HuffmanLengthTable2_3 [3 *3]
 Quick lookup for Huffman 2 and 3 bit tables.
 
static const uint32_t g_HuffmanLengthTable5_6 [4 *4]
 Quick lookup for Huffman 5 and 6 bit tables.
 
static const uint_t g_BitrateTables [3][16]
 Expected bit rate for MP3 files.
 
static const uint16_t g_DataFrameBitrateTables [2][3][16]
 Bitrate lookup table for the DataFrame_t.
 
static const uint_t g_SampleRateTables [3][4]
 Expected sample rate for MP3 files.
 
static const uint_t g_SCFSI_BandTable [5] = { 0, 6, 11, 16, 21 }
 SCale Factor Selection Information.
 
static const uint_t g_MP3SampleRates [9]
 Table of sample rates supported by MP3.
 
static const BandInfo_t g_MP3BandInformation [9]
 Band tables for all levels of MP3 encoding.
 
static const uint_t cSizeofBandInfoDiffHashes = 156
 Length of each g_MP3BandInfoDiffHashes table in entries.
 
static const uint16_t * g_MP3BandInfoDiffHashes [9]
 Pointers to hash tables to g_MP3BandInformation differences (Long and short)
 
static const uint_t cSizeofBandInfoShortDiffHashes = 152
 Length of each g_MP3BandInfoShortDiffHashes table in entries.
 
static const uint16_t * g_MP3BandInfoShortDiffHashes [9]
 Pointers to hash tables to g_MP3BandInformation short differences.
 
static const uint_t cSizeofBandInfoLongDiffHashes = 44
 Length of each g_MP3BandInfoLongDiffHashes table in entries.
 
static const uint16_t * g_MP3BandInfoLongDiffHashes [9]
 Pointers to hash tables to g_MP3BandInformation long differences.
 
static const uint8_t g_MP3BandLongLimits [9][23]
 
static const uint8_t g_MP3BandShortLimits [9][14]
 
static const uint8_t g_GroupTable3 [3][3][3][3]
 MP3 Layer 2 Group table for 3*3*3 granularity.
 
static const uint8_t g_GroupTable5 [5][5][5][3]
 MP3 Layer 2 Group table for 5*5*5 granularity.
 
static const uint8_t g_GroupTable9 [9][9][9][3]
 MP3 Layer 2 Group table for 9*9*9 granularity.
 
static const uint32_float_t g_MP3MulTable64 [27][64]
 MP3 Layer 2 magnitude table.
 
static const uint32_float_t g_MP3Power3Div4 [8207]
 Table of pow(i,4/3)
 
static const uint32_float_t g_MP3GainPow2 [378]
 MP3 Layer 3 table for pow(2.0,(i-46)*-0.25)
 
static const uint32_float_t g_MP3AntiAliasTerms [8 *2]
 MP3 Layer 3 for anti-alias table.
 
static const uint32_float_t g_MP3BlockType0 [36]
 MP3 Layer 3 table for block type 0.
 
static const uint32_float_t g_MP3BlockType1 [36]
 MP3 Layer 3 table for block type 1.
 
static const uint32_float_t g_MP3BlockType2 [12]
 MP3 Layer 3 table for block type 2.
 
static const uint32_float_t g_MP3BlockType3 [36]
 MP3 Layer 3 table for block type 3.
 
static const float * g_MP3BlockTypes [4]
 MP3 Layer 3 index table for all block types.
 
static const uint32_float_t g_MP3PhasedBlockType0 [36]
 MP3 Layer 3 table for phase shifted block type 0.
 
static const uint32_float_t g_MP3PhasedBlockType1 [36]
 MP3 Layer 3 table for phase shifted block type 1.
 
static const uint32_float_t g_MP3PhasedBlockType2 [12]
 MP3 Layer 3 table for phase shifted block type 2.
 
static const uint32_float_t g_MP3PhasedBlockType3 [36]
 MP3 Layer 3 table for phase shifted block type 3.
 
static const float * g_MP3PhasedBlockTypes [4]
 MP3 Layer 3 index table for all phased block types.
 
static const uint32_float_t g_MP3TanDivTan [16]
 MP3 Layer 3 tangent table for tan((i * BURGER_PI) / 12.0) / (tan((i * BURGER_PI) / 12.0) + 1)
 
static const uint32_float_t g_MP3OneDivTan [16]
 MP3 Layer 3 tangent table for 1.0 / (tan((i * BURGER_PI) / 12.0) + 1)
 
static const uint32_float_t g_MP3Sqrt2TanDivTan [16]
 MP3 Layer 3 tangent table for sqrt(2) * tan((i * BURGER_PI) / 12.0) / (tan((i * BURGER_PI) / 12.0) + 1)
 
static const uint32_float_t g_MP3Sqrt2DivTan [16]
 MP3 Layer 3 tangent table for sqrt(2) / (tan((i * BURGER_PI) / 12.0) + 1)
 
static const uint32_float_t g_MP3PowMono1 [2][16]
 MP3 Layer 3 power table1 for mono.
 
static const uint32_float_t g_MP3PowMono2 [2][16]
 MP3 Layer 3 power table2 for mono.
 
static const uint32_float_t g_MP3PowStereo1 [2][16]
 MP3 Layer 3 power table1 for stereo.
 
static const uint32_float_t g_MP3PowStereo2 [2][16]
 MP3 Layer 3 power table2 for stereo.
 
static const uint32_float_t g_MP3FFTShortWindow [128]
 MP3 Short Blackman FFT window.
 
static const uint32_float_t g_MP3FFTWindow [1024]
 MP3 Blackman FFT window.
 
static const uint_t g_MP3IntensitySLen [256]
 MP3 Layer 3 stereo intensity table.
 
static const uint_t g_MP3NormalSLen [512]
 MP3 Layer 3 mono intensity table.
 
static const uint8_t g_Layer3ScaleFactors1 [2][16]
 Table of bit widths of scale factor indexes.
 
static const uint8_t g_Layer3ScaleFactors2 [3][6][4]
 Table of bit widths of scale factor indexes.
 
static const uint8_t g_Layer3PresetTables [2][22]
 Table of Huffman presets.
 
static const int16_t g_Table [256]
 
static const uint32_t Signature = 0x4D503320
 'MP3 '
 
- Static Public Attributes inherited from Burger::DecompressAudio
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::Decompress
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 
- Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 

Protected Types

enum  eState { STATE_INIT , STATE_CACHEFULL }
 

Protected Attributes

uint_t m_uCacheSize
 Number of valid bytes in m_uCache.
 
eState m_eState
 State of the decompression.
 
int16_t m_iCache
 Temp uncompressed data buffer.
 
- Protected Attributes inherited from Burger::DecompressAudio
SoundManager::eDataType m_eDataType
 Data type the decompresser will create.
 
uint_t m_bStereo
 TRUE if data is stereo
 
- Protected Attributes inherited from Burger::Decompress
uintptr_t m_uTotalInput
 Total number of bytes processed for input.
 
uintptr_t m_uTotalOutput
 Total number of bytes processed for output.
 
uintptr_t m_uInputLength
 Number of input bytes processed from the last call to Process()
 
uintptr_t m_uOutputLength
 Number of output bytes processed from the last call to Process()
 
uint32_t m_uSignature
 4 character code to identify this decompresser
 

Private Member Functions

 DecompressMP3 (const DecompressMP3 &)=delete
 
DecompressMP3operator= (const DecompressMP3 &)=delete
 
 DecompressMP3 (DecompressMP3 &&)=delete
 
DecompressMP3operator= (DecompressMP3 &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from Burger::DecompressAudio
 DecompressAudio (SoundManager::eDataType uDataType)
 Constructor.
 

Detailed Description

Process audio data compressed with MP3.


Convert audio data compressed with MP3 to native 16 bit format

See also
Decompress and DecompressAudio

Member Enumeration Documentation

◆ eGranuleBlockType

Enumerator
BLOCK_TYPE_NORM 

Granule Block type.

Forbidden window type

BLOCK_TYPE_START 

Start window type.

BLOCK_TYPE_SHORT 

3 short windows

BLOCK_TYPE_STOP 

End window.

◆ eMPEGAudioVersionID

Enumerator
MPEG_VERSION_2_5 

MPEG Version 2.5 (later extension of MPEG 2)

MPEG_VERSION_RESERVED 

Not used (Illegal value if detected)

MPEG_VERSION_2 

MPEG Version 2 (ISO/IEC 13818-3)

MPEG_VERSION_1 

MPEG Version 1 (ISO/IEC 11172-3)

◆ eMPEGChannelMode

Enumerator
MPEG_MODE_STEREO 

Stereo (Spatially separate)

MPEG_MODE_JOINT_STEREO 

Joint stereo (Stereo with shared audio)

MPEG_MODE_DUAL_CHANNEL 

Dual channel (2 independent channels)

MPEG_MODE_MONO 

Single channel (Mono)

MPEG_MODE_UNKNOWN 

Unknown mode (Invalid internal value)

◆ eMPEGEmphasis

Enumerator
MPEG_EMP_NONE 

No equalization.

MPEG_EMP_50_15MS 

Apply a 50/15 ms equalization.

MPEG_EMP_RESERVED 

Not used (Illegal value if detected)

MPEG_EMP_CCITJ17 

Apply noise suppression.

◆ eMPEGLayerDescription

Enumerator
MPEG_LAYER_RESERVED 

Not used (Illegal value if detected)

MPEG_LAYER_3 

Layer 3.

MPEG_LAYER_2 

Layer 2.

MPEG_LAYER_1 

Layer 1.

◆ eMPEGModeExtension

Enumerator
MPEG_MODEEXT_LR_LR 

Left/Right Stereo, Left/Right Stereo.

MPEG_MODEEXT_LR_I 

Left/Right Stereo, Intensity stereo.

MPEG_MODEEXT_MS_LR 

Mid/Side Stereo, Left/Right Stereo.

MPEG_MODEEXT_MS_I 

Mid/Side Stereo, Intensity stereo.

◆ eState

Enumerator
STATE_INIT 

Basic state.

STATE_CACHEFULL 

Cache is full, need to output before more input.

Constructor & Destructor Documentation

◆ DecompressMP3() [1/3]

Burger::DecompressMP3::DecompressMP3 ( const DecompressMP3 & )
privatedelete

◆ DecompressMP3() [2/3]

Burger::DecompressMP3::DecompressMP3 ( DecompressMP3 && )
privatedelete

◆ DecompressMP3() [3/3]

Burger::DecompressMP3::DecompressMP3 ( )

Default constructor.


Initializes the defaults

◆ ~DecompressMP3()

Burger::DecompressMP3::~DecompressMP3 ( )
virtual

Default destructor.


Dispose all data

Member Function Documentation

◆ AddChunk()

Burger::DecompressMP3::Chunk_t *BURGER_API Burger::DecompressMP3::AddChunk ( const uint8_t * pData,
uintptr_t uSize )

Add a new data chunk into the linked list.


Delete the last chunk in the internal buffer linked list

◆ AudioDataPrecedesFrame()

int BURGER_API Burger::DecompressMP3::AudioDataPrecedesFrame ( void ) const

Determine how many bytes to backtrack to next frame.


This function works on all layers. If layer 1 or 2, it will return 0, on layer 3 it will return the frame count to backtrack

Returns
Number of frames to backtrack
See also
Layer3AudioDataPrecedesFrame(void) const

◆ Decode() [1/2]

Burger::eError BURGER_API Burger::DecompressMP3::Decode ( float * pOutput,
uintptr_t uOutputSize,
const uint8_t * pInput,
uintptr_t uInputSize,
uintptr_t * pProcessed )

Decode MP3 data.


Workhorse function, call with input data and continuously call this function until OK is returned alerting the calling function that the decoding is complete

This function will create 32 bit floating point output

Parameters
pOutputPointer to a buffer for the decompressed audio data
uOutputSizeNumber of bytes in the output buffer, must be at least 1152 * 2 * sizeof(int16_t)
pInputPointer to the input data
uInputSizeNumber of bytes in the input data
pProcessedPointer to a variable to receive the number of bytes placed in the output buffer
Returns
Error code
See also
Decode(int16_t *,uintptr_t,const uint8_t *,uintptr_t,uintptr_t *)

◆ Decode() [2/2]

Burger::eError BURGER_API Burger::DecompressMP3::Decode ( int16_t * pOutput,
uintptr_t uOutputSize,
const uint8_t * pInput,
uintptr_t uInputSize,
uintptr_t * pProcessed )

Decode MP3 data.


Workhorse function, call with input data and continuously call this function until OK is returned alerting the calling function that the decoding is complete

This function will create 16 bit integer output

Parameters
pOutputPointer to a buffer for the decompressed audio data
uOutputSizeNumber of bytes in the output buffer, must be at least 1152 * 2 * sizeof(int16_t)
pInputPointer to the input data
uInputSizeNumber of bytes in the input data
pProcessedPointer to a variable to receive the number of bytes placed in the output buffer
Returns
Error code
See also
Decode(float *,uintptr_t,const uint8_t *,uintptr_t,uintptr_t *)

◆ ExtractXingHeader()

uint_t BURGER_API Burger::DecompressMP3::ExtractXingHeader ( uintptr_t uSkipAhead)

Extract data from the Xing chunk.


Scan the packet and locate a Xing chunk and if one is found, parse it but don't update the data chunk pointer.

Parameters
uSkipAheadNumber of bytes to "skip ahead" before parsing the Xing record
Returns
The number of bytes that the header needed or 0 if there is no Xing record

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::DecompressMP3::get_StaticRTTI ( void ) const
overridevirtualnoexcept

Get the description to the class.


This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.

Returns
Pointer to a global, read only instance of StaticRTTI for the true class

Reimplemented from Burger::DecompressAudio.

◆ GetBit()

uint_t BURGER_API Burger::DecompressMP3::GetBit ( void )

Fetch a single bit from the m_pWorkPointer stream.


Returns
Next bit in the stream

◆ GetBits()

uint_t BURGER_API Burger::DecompressMP3::GetBits ( uint_t uBitCount)

Fetch a stream of bits from the bit stream.


Given a bit count of 0 to 16, fetch that number of bits from the bit stream

Parameters
uBitCountNumber of bits to fetch (0 - 16)
Returns
Value fetched from the stream or 0 if stream is empty or uBitCount is 0

◆ GetByte()

uint_t BURGER_API Burger::DecompressMP3::GetByte ( void )

Fetch a byte from the chunk stream.


Returns
Next byte in the stream, zero if the stream is empty

◆ GetBytesFromChunks()

void BURGER_API Burger::DecompressMP3::GetBytesFromChunks ( uintptr_t uSize)

Copy data from the chunk list into the bit stream.


Parameters
uSizeNumber of bytes to copy from the chunks

◆ GetMP3Header()

void BURGER_API Burger::DecompressMP3::GetMP3Header ( void )

Fetch the 32 bit MP3 header from the chunk stream.


◆ Layer3AudioDataPrecedesFrame()

int BURGER_API Burger::DecompressMP3::Layer3AudioDataPrecedesFrame ( void ) const

Determine how many bytes to backtrack to next frame.


This is an MP3 Layer 3 function. On Layer 1 or 2 files, it will return invalid values.

Returns
Number of frames to backtrack
See also
AudioDataPrecedesFrame(void) const

◆ Layer3DecodeFrame() [1/2]

uintptr_t BURGER_API Burger::DecompressMP3::Layer3DecodeFrame ( float * pOutput,
uintptr_t uOffset )

Process a frame of Layer 3 data into 64 samples.


Process a single MP3 frame and output 32 stereo 32 bit floating point samples

Parameters
pOutputPointer to a buffer of 64 samples (32 stereo samples)
uOffsetOffset from the pointer (Actual buffer is pOutput+uOffset)
Returns
Number of bytes output
See also
Layer3DecodeFrame(int16_t *,uintptr_t)

◆ Layer3DecodeFrame() [2/2]

uintptr_t BURGER_API Burger::DecompressMP3::Layer3DecodeFrame ( int16_t * pOutput,
uintptr_t uOffset )

Process a frame of Layer 3 data into 64 samples.


Process a single MP3 frame and output 32 stereo 16 bit signed samples

Parameters
pOutputPointer to a buffer of 64 samples (32 stereo samples)
uOffsetOffset from the pointer (Actual buffer is pOutput+uOffset)
Returns
Number of bytes output
See also
Layer3DecodeFrame(float *,uintptr_t)

◆ Layer3Dequantize()

uint_t BURGER_API Burger::DecompressMP3::Layer3Dequantize ( float * pHybridBuffer,
const uint_t * pScaleFactorIndexes,
GranuleInfo_t * pGranuleInfo,
uint_t uSampleRateIndex,
uint_t uBitsPreviouslyParsed )

dequantize the Hybrid buffer


Using a Huffman tree, extract data and create the hybrid buffer.

Parameters
pHybridBufferPointer to an uninitialized buffer that's cSubBandLimit*cSideSampleLimit in size
pScaleFactorIndexesPointer to the scale factor indexes
pGranuleInfoPointer to the GranuleInfo_t describing how to parse the stream
uSampleRateIndexSample rate index for selecting the Huffman tree
uBitsPreviouslyParsedNumber of bit processed in the packet before this function was called
Returns
Zero if no error, non-zero if there's a buffer starvation or other error

◆ Layer3GetScaleFactors1()

uint_t BURGER_API Burger::DecompressMP3::Layer3GetScaleFactors1 ( uint_t * pScaleFactorIndexes,
const GranuleInfo_t * pGranuleInfo )

Parse scale factor indexes for MPeg 1.0.


Read from the bit stream the scale factor index table

Parameters
pScaleFactorIndexesPointer to a buffer of at least 39 entries to store the indexes
pGranuleInfoPointer to the GranuleInfo_t describing how to parse the stream
Returns
Number of bits parsed
See also
Layer3GetScaleFactors2(uint_t *,GranuleInfo_t *,uint_t)

◆ Layer3GetScaleFactors2()

uint_t BURGER_API Burger::DecompressMP3::Layer3GetScaleFactors2 ( uint_t * pScaleFactorIndexes,
GranuleInfo_t * pGranuleInfo,
uint_t bStereo )

Parse scale factor indexes for MPeg 2.0 or 2.5.


Read from the bit stream the scale factor index table

Parameters
pScaleFactorIndexesPointer to a buffer of at least 39 entries to store the indexes
pGranuleInfoPointer to the GranuleInfo_t describing how to parse the stream
bStereoFALSE if mono, any other value for stereo parsing
Returns
Number of bits parsed
See also
Layer3GetScaleFactors1(uint_t *,GranuleInfo_t *)

◆ Layer3GetSideInfo()

int BURGER_API Burger::DecompressMP3::Layer3GetSideInfo ( void )

Parse Side information.


Docs in mp3_theory.pdf section 5.1.2 Side Information

Returns
Actual number of bits needed to parse the frame, if negative the buffer has all the data needed

◆ Layer3GetSideInfoType1()

void BURGER_API Burger::DecompressMP3::Layer3GetSideInfoType1 ( uint_t uChannelCount,
uint_t bMSStereo,
uint_t uSampleRateIndex )

Parse Side information for Layer 1 Docs in mp3_theory.pdf section 5.1.2 Side Information.


Parameters
uChannelCount1 for mono, 2 for stereo
bMSStereoTRUE if parsing MS Stereo
uSampleRateIndexSample rate index value

◆ Layer3GetSideInfoType2()

void BURGER_API Burger::DecompressMP3::Layer3GetSideInfoType2 ( uint_t uChannelCount,
uint_t bMSStereo,
uint_t uSampleRateIndex )

Parse Side information for Layer 2 or 3.


Docs in mp3_theory.pdf section 5.1.2 Side Information

Parameters
uChannelCount1 for mono, 2 for stereo
bMSStereoTRUE if parsing MS Stereo
uSampleRateIndexSample rate index value

◆ Layer3ProcessHybridBuffer()

void BURGER_API Burger::DecompressMP3::Layer3ProcessHybridBuffer ( float * pHybridInput,
float * pHybridOutput,
uint_t uChannel,
const GranuleInfo_t * pGranuleInfo )

Process the hybrid buffers.


Perform the magic! Invoke DCT functions onto the hybrid buffers to set up for audio sample generations.

Parameters
pHybridInputInput hybrid buffer
pHybridOutputOutput hybrid buffer
uChannelWhich audio channel (0 or 1)
pGranuleInfoPointer to a granule record for this packet

◆ New()

Burger::DecompressMP3 *BURGER_API Burger::DecompressMP3::New ( void )
static

Allocate and initialize a DecompressMP3.


Returns
A pointer to a default DecompressMP3 class or NULL if out of memory
See also
Delete(const T *)

◆ operator=() [1/2]

DecompressMP3 & Burger::DecompressMP3::operator= ( const DecompressMP3 & )
privatedelete

◆ operator=() [2/2]

DecompressMP3 & Burger::DecompressMP3::operator= ( DecompressMP3 && )
privatedelete

◆ Process()

Burger::eError Burger::DecompressMP3::Process ( void * pOutput,
uintptr_t uOutputChunkLength,
const void * pInput,
uintptr_t uInputChunkLength )
overridevirtual

Decompress audio data using alaw.


Input data is assumed to be alaw compressed bytes.

Parameters
pOutputPointer to the buffer to accept the decompressed data
uOutputChunkLengthNumber of bytes in the output buffer
pInputPointer to data to decompress
uInputChunkLengthNumber of bytes in the data to decompress
Returns
Decompress::eError code with zero if no failure, non-zero is an error code

Implements Burger::Decompress.

◆ ProcessMonoSamples() [1/2]

uintptr_t BURGER_API Burger::DecompressMP3::ProcessMonoSamples ( float * pOutput,
uintptr_t uOffset,
const float * pBand )

Create samples from audio band information (Mono)


Given the floats that describe the audio band frequencies, generate the next 32 entries of output sound.

This code is optimized to store audio data in 32 bit floating point format, used by most modern audio hardware.

Parameters
pOutputPointer a buffer of 32 entries for audio data
uOffsetOffset to the pOutput buffer to write to in bytes
pBandPointer to FFT table
Returns
uOffset + (32*sizeof(float))

◆ ProcessMonoSamples() [2/2]

uintptr_t BURGER_API Burger::DecompressMP3::ProcessMonoSamples ( int16_t * pOutput,
uintptr_t uOffset,
const float * pBand )

Create samples from audio band information (Mono)


Given the floats that describe the audio band frequencies, generate the next 32 entries of output sound.

This code is optimized to store audio data in 16 bit signed integer format, used by most older audio hardware.

Parameters
pOutputPointer a buffer of 32 entries for audio data
uOffsetOffset to the pOutput buffer to write to in bytes
pBandPointer to FFT table
Returns
uOffset + (32*sizeof(int16_t))

◆ ProcessStereoSamples() [1/2]

uintptr_t BURGER_API Burger::DecompressMP3::ProcessStereoSamples ( float * pOutput,
uintptr_t uOffset,
uint_t uChannel,
const float * pBand )

Create samples from audio band information (Stereo)


Given the floats that describe the audio band frequencies, generate the next 32 entries of output sound for one channel of interleaved stereo data. The output buffer must be 64 entries in size with every other value being written.

This code is optimized to store audio data in 32 bit floating point format, used by most modern audio hardware.

Parameters
pOutputPointer a buffer of 64 entries (32 left, 32 right)
uOffsetOffset to the pOutput buffer to write to in bytes
uChannel0 for even entries, 1 for odd entries
pBandPointer to FFT table
Returns
uOffset + (64*sizeof(float))

◆ ProcessStereoSamples() [2/2]

uintptr_t BURGER_API Burger::DecompressMP3::ProcessStereoSamples ( int16_t * pOutput,
uintptr_t uOffset,
uint_t uChannel,
const float * pBand )

Create samples from audio band information (Stereo)


Given the floats that describe the audio band frequencies, generate the next 32 entries of output sound for one channel of interleaved stereo data. The output buffer must be 64 entries in size with every other value being written.

This code is optimized to store audio data in 16 bit signed integer format, used by most older audio hardware.

Parameters
pOutputPointer a buffer of 64 entries (32 left, 32 right)
uOffsetOffset to the pOutput buffer to write to in bytes
uChannel0 for even entries, 1 for odd entries
pBandPointer to FFT table
Returns
uOffset + (64*sizeof(int16_t))

◆ RemoveAllChunks()

void BURGER_API Burger::DecompressMP3::RemoveAllChunks ( void )

Dispose of all of the data chunks.


Delete all data chunks

◆ RemoveLastChunk()

void BURGER_API Burger::DecompressMP3::RemoveLastChunk ( void )

Dispose of the last data chunk.


Delete the last chunk in the internal buffer linked list

◆ Reset()

Burger::eError Burger::DecompressMP3::Reset ( void )
overridevirtual

Resets the decompresser to defaults.


Returns
kErrorNone if successful

Implements Burger::Decompress.

◆ ScanForFramePacket()

uintptr_t BURGER_API Burger::DecompressMP3::ScanForFramePacket ( uint_t bFreeMatchMode) const

Scan ahead for an MP3 frame packet.


Scan ahead byte by byte until a packet ID is found and return the number of bytes to skip to get to the packet. If no packet was found, return -1

Parameters
bFreeMatchModeIf TRUE, look for packets that match the currently parsed sample rate and layer
Returns
-1 if a packet isn't found or the number of bytes to skip to get to the packet (Can be zero)

◆ SeekBuffer()

uint_t BURGER_API Burger::DecompressMP3::SeekBuffer ( uintptr_t uNegativeOffset)

Update the internal buffer.


If uNegativeOffset is non-zero, grab that many bytes from the previous data stream and apply it to the current stream

Returns
Next bit in the stream

Member Data Documentation

◆ cCBands

const uint_t Burger::DecompressMP3::cCBands = 64
static

Number of partition bands.

◆ cDecoderDelay

const uint_t Burger::DecompressMP3::cDecoderDelay = 528
static

Sample delay on decoding.

◆ cEncoderDelay

const uint_t Burger::DecompressMP3::cEncoderDelay = 576
static

Sample delay on encoding.

◆ cFFTIndex

const uint_t Burger::DecompressMP3::cFFTIndex = cMDCTDelay + 224
static

Index into the FFT entry.

◆ cMaxFrameSize

const uint_t Burger::DecompressMP3::cMaxFrameSize = 2880
static

Largest allowed frame in samples.

◆ cMDCTDelay

const uint_t Burger::DecompressMP3::cMDCTDelay = 48
static

Cosine table delay.

◆ cPostDelay

const uint_t Burger::DecompressMP3::cPostDelay = 1152
static

Sample delay for granule encoding.

◆ cScaleBlock

const uint_t Burger::DecompressMP3::cScaleBlock = 12
static

Layer1 / Layer2 scale block.

◆ cSideSampleLimit

const uint_t Burger::DecompressMP3::cSideSampleLimit = 18
static

Number of side samples (Used with sub bands)

◆ cSizeofBandInfoDiffHashes

const uint_t Burger::DecompressMP3::cSizeofBandInfoDiffHashes = 156
static

Length of each g_MP3BandInfoDiffHashes table in entries.

◆ cSizeofBandInfoLongDiffHashes

const uint_t Burger::DecompressMP3::cSizeofBandInfoLongDiffHashes = 44
static

Length of each g_MP3BandInfoLongDiffHashes table in entries.

◆ cSizeofBandInfoShortDiffHashes

const uint_t Burger::DecompressMP3::cSizeofBandInfoShortDiffHashes = 152
static

Length of each g_MP3BandInfoShortDiffHashes table in entries.

◆ cSubBandLimit

const uint_t Burger::DecompressMP3::cSubBandLimit = 32
static

Number of sub bands.

◆ g_BitrateTables

const uint_t Burger::DecompressMP3::g_BitrateTables
static
Initial value:
= {
{0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,BURGER_MAXUINT},
{0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,BURGER_MAXUINT},
}
#define BURGER_MAXUINT
Maximum value of an unsigned integer.
Definition burger.h:1500

Expected bit rate for MP3 files.


The first index is which type of MP3 file is being looked up and the second index with the bit rate constant.

The order is MPEG_VERSION_2, MPEG_VERSION_1, Special

◆ g_DataFrameBitrateTables

const uint16_t Burger::DecompressMP3::g_DataFrameBitrateTables
static
Initial value:
= {
{
{0,32,64,96,128,160,192,224,256,288,320,352,384,416,448},
{0,32,48,56,64,80,96,112,128,160,192,224,256,320,384},
{0,32,40,48,56,64,80,96,112,128,160,192,224,256,320}
},{
{0,32,48,56,64,80,96,112,128,144,160,176,192,224,256},
{0,8,16,24,32,40,48,56,64,80,96,112,128,144,160},
{0,8,16,24,32,40,48,56,64,80,96,112,128,144,160}
}}

Bitrate lookup table for the DataFrame_t.


Values stolen from this web page section E https://www.mp3-tech.org/programmer/frame_header.html

◆ g_fDecodeWindow

const Burger::uint32_float_t Burger::DecompressMP3::g_fDecodeWindow
static

MP3 decoding windows table.


512 + 32 entries of the decode window scaled to 32767.0f so it's used to scale to 16 bit integer output

◆ g_GroupTable3

const uint8_t Burger::DecompressMP3::g_GroupTable3
static
Initial value:
= {
{
{{1,1,1},{0,1,1},{2,1,1}},
{{1,0,1},{0,0,1},{2,0,1}},
{{1,2,1},{0,2,1},{2,2,1}}
},{
{{1,1,0},{0,1,0},{2,1,0}},
{{1,0,0},{0,0,0},{2,0,0}},
{{1,2,0},{0,2,0},{2,2,0}}
},{
{{1,1,2},{0,1,2},{2,1,2}},
{{1,0,2},{0,0,2},{2,0,2}},
{{1,2,2},{0,2,2},{2,2,2}}
}}

MP3 Layer 2 Group table for 3*3*3 granularity.


◆ g_GroupTable5

const uint8_t Burger::DecompressMP3::g_GroupTable5
static

MP3 Layer 2 Group table for 5*5*5 granularity.


◆ g_GroupTable9

const uint8_t Burger::DecompressMP3::g_GroupTable9
static

MP3 Layer 2 Group table for 9*9*9 granularity.


◆ g_HuffLens32

const uint8_t Burger::DecompressMP3::g_HuffLens32
static
Initial value:
= {
1 + 0, 4 + 1, 4 + 1, 5 + 2,
4 + 1, 6 + 2, 5 + 2, 6 + 3,
4 + 1, 5 + 2, 5 + 2, 6 + 3,
5 + 2, 6 + 3, 6 + 3, 6 + 4
}

Bit lengths for the special case for 32 bits.


◆ g_HuffLens33

const uint8_t Burger::DecompressMP3::g_HuffLens33
static
Initial value:
= {
4 + 0, 4 + 1, 4 + 1, 4 + 2,
4 + 1, 4 + 2, 4 + 2, 4 + 3,
4 + 1, 4 + 2, 4 + 2, 4 + 3,
4 + 2, 4 + 3, 4 + 3, 4 + 4
}

Bit lengths for the 2nd special case.


◆ g_HuffmanCodeHeaders

const Burger::DecompressMP3::HuffmanCodeHeader_t Burger::DecompressMP3::g_HuffmanCodeHeaders
static

Array of Huffman trees.


Array of pointers to all of the Huffman tree tables balanced for MP3 decoding

◆ g_HuffmanLengthTable16_24

const uint32_t Burger::DecompressMP3::g_HuffmanLengthTable16_24
static

Quick lookup for Huffman 16 and 24 bit tables.


Quick lookup table for the lengths of the 16 bit and the 24 bit tables with the 16 bit entry in the upper 16 bits and the 24 table length in the lower 16 bits. 32 bit integers are used for byte storage so addition can be performed as a 2 entry vector of 2 shorts in an integer

◆ g_HuffmanLengthTable2_3

const uint32_t Burger::DecompressMP3::g_HuffmanLengthTable2_3
static
Initial value:
= {
0x010002, 0x040003, 0x070007,
0x040004, 0x050004, 0x070007,
0x060006, 0x070007, 0x080008
}

Quick lookup for Huffman 2 and 3 bit tables.


Quick lookup table for the lengths of the 2 bit and the 3 bit tables with the 2 bit entry in the upper 16 bits and the 3 table length in the lower 16 bits. 32 bit integers are used for byte storage so addition can be performed as a 2 entry vector of 2 shorts in an integer

◆ g_HuffmanLengthTable5_6

const uint32_t Burger::DecompressMP3::g_HuffmanLengthTable5_6
static
Initial value:
= {
0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,
0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009
}

Quick lookup for Huffman 5 and 6 bit tables.


Quick lookup table for the lengths of the 5 bit and the 6 bit tables with the 5 bit entry in the upper 16 bits and the 6 table length in the lower 16 bits. 32 bit integers are used for byte storage so addition can be performed as a 2 entry vector of 2 shorts in an integer

◆ g_Layer3PresetTables

const uint8_t Burger::DecompressMP3::g_Layer3PresetTables
static
Initial value:
= {
{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
}

Table of Huffman presets.


See also
Layer3Dequantize(float *,const uint_t *,GranuleInfo_t ,uint_t,uint_t)

◆ g_Layer3ScaleFactors1

const uint8_t Burger::DecompressMP3::g_Layer3ScaleFactors1
static
Initial value:
= {
{0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4},
{0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3}
}

Table of bit widths of scale factor indexes.


See also
Layer3GetScaleFactors1(uint_t *,const GranuleInfo_t *)

◆ g_Layer3ScaleFactors2

const uint8_t Burger::DecompressMP3::g_Layer3ScaleFactors2
static
Initial value:
= {
{{6,5,5,5},{6,5, 7,3},{11,10,0,0},{ 7, 7, 7,0},{ 6, 6,6,3},{ 8, 8,5,0}},
{{9,9,9,9},{9,9,12,6},{18,18,0,0},{12,12,12,0},{12, 9,9,6},{15,12,9,0}},
{{6,9,9,9},{6,9,12,6},{15,18,0,0},{ 6,15,12,0},{ 6,12,9,6},{ 6,18,9,0}}
}

Table of bit widths of scale factor indexes.


See also
Layer3GetScaleFactors2(uint_t *,GranuleInfo_t *,uint_t)

◆ g_MP3AntiAliasTerms

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3AntiAliasTerms
static
Initial value:
= {
{0x3F5B84A8},{0x3F61B9D8},{0x3F731ADD},{0x3F7BBA81},{0x3F7EDA41},{0x3F7FC8FD},{0x3F7FF965},{0x3F7FFF8D},
{0xBF03B5FE},{0xBEF186DA},{0xBEA07302},{0xBE3A4774},{0xBDC1B01D},{0xBD27CB87},{0xBC68A11D},{0xBB727B46}
}

MP3 Layer 3 for anti-alias table.


The first 8 terms are 1.0 / sqrt(1.0 + value*value) The second 8 terms are value / sqrt(1.0 + value*value)

◆ g_MP3BandInfoDiffHashes

const uint16_t * Burger::DecompressMP3::g_MP3BandInfoDiffHashes
static
Initial value:
= {
g_MP3BandInfoDiffHash0,g_MP3BandInfoDiffHash1,g_MP3BandInfoDiffHash2,g_MP3BandInfoDiffHash3,
g_MP3BandInfoDiffHash4,g_MP3BandInfoDiffHash5,g_MP3BandInfoDiffHash6,g_MP3BandInfoDiffHash7,
g_MP3BandInfoDiffHash8
}

Pointers to hash tables to g_MP3BandInformation differences (Long and short)


◆ g_MP3BandInfoLongDiffHashes

const uint16_t * Burger::DecompressMP3::g_MP3BandInfoLongDiffHashes
static
Initial value:
= {
g_MP3BandInfoLongDiffHash0,g_MP3BandInfoLongDiffHash1,g_MP3BandInfoLongDiffHash2,g_MP3BandInfoLongDiffHash3,
g_MP3BandInfoLongDiffHash4,g_MP3BandInfoLongDiffHash5,g_MP3BandInfoLongDiffHash6,g_MP3BandInfoLongDiffHash7,
g_MP3BandInfoLongDiffHash8
}

Pointers to hash tables to g_MP3BandInformation long differences.


◆ g_MP3BandInformation

const Burger::DecompressMP3::BandInfo_t Burger::DecompressMP3::g_MP3BandInformation
static

Band tables for all levels of MP3 encoding.


◆ g_MP3BandInfoShortDiffHashes

const uint16_t * Burger::DecompressMP3::g_MP3BandInfoShortDiffHashes
static
Initial value:
= {
g_MP3BandInfoShortDiffHash0,g_MP3BandInfoShortDiffHash1,g_MP3BandInfoShortDiffHash2,g_MP3BandInfoShortDiffHash3,
g_MP3BandInfoShortDiffHash4,g_MP3BandInfoShortDiffHash5,g_MP3BandInfoShortDiffHash6,g_MP3BandInfoShortDiffHash7,
g_MP3BandInfoShortDiffHash8
}

Pointers to hash tables to g_MP3BandInformation short differences.


◆ g_MP3BandLongLimits

const uint8_t Burger::DecompressMP3::g_MP3BandLongLimits
static
Initial value:
= {
{1,1,1,2,2,2,2,3,3,3,4,4,5,6,7,8,10,12,14,17,20,24,32},
{1,1,1,2,2,2,2,3,3,3,4,4,5,6,7,8,10,11,14,16,19,22,32},
{1,1,1,2,2,2,2,3,3,3,4,5,5,7,8,10,12,14,17,21,26,31,32},
{1,1,2,2,2,3,3,3,4,5,5,6,7,9,10,12,14,17,20,23,27,30,32},
{1,1,2,2,2,3,3,3,4,5,5,6,7,8,10,12,14,16,19,23,27,31,32},
{1,1,2,2,2,3,3,3,4,5,5,6,7,9,10,12,14,17,20,23,27,30,32},
{1,1,2,2,2,3,3,3,4,5,5,6,7,9,10,12,14,17,20,23,27,30,32},
{1,1,2,2,2,3,3,3,4,5,5,6,7,9,10,12,14,17,20,23,27,30,32},
{1,2,2,3,4,4,5,6,7,8,10,12,14,16,20,23,27,32,32,32,32,32,32}
}

◆ g_MP3BandShortLimits

const uint8_t Burger::DecompressMP3::g_MP3BandShortLimits
static
Initial value:
= {
{1,1,2,2,3,4,5,7,9,11,14,18,23,32},
{1,1,2,2,3,4,5,7,9,11,14,17,21,32},
{1,1,2,2,3,4,5,7,10,13,18,23,30,32},
{1,1,2,2,3,4,6,7,10,13,17,22,29,32},
{1,1,2,2,3,5,6,8,11,14,18,23,30,32},
{1,1,2,2,3,5,6,8,11,14,18,23,29,32},
{1,1,2,2,3,5,6,8,11,14,18,23,29,32},
{1,1,2,2,3,5,6,8,11,14,18,23,29,32},
{1,2,3,4,6,9,12,16,21,27,27,28,28,32}
}

◆ g_MP3BlockType0

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3BlockType0
static
Initial value:
= {
{0x3D043A95},{0x3DDB8F02},{0x3E4E3F8B},{0x3EA6B730},{0x3F000000},{0x3F448CE2},
{0x3F9EE064},{0x40153EB0},{0x40F7D015},{0xC107385A},{0xC0427FED},{0xBFF962DE},
{0xBFBCC8EB},{0xBF9A827A},{0xBF843046},{0xBF6894D6},{0xBF5076D3},{0xBF3D489D},
{0xBF2D724E},{0xBF1FF5CE},{0xBF142BB2},{0xBF09A043},{0xBF000000},{0xBEEE1832},
{0xBEDD267E},{0xBECCD9DA},{0xBEBCEC3D},{0xBEAD1DA9},{0xBE9D300C},{0xBE8CE369},
{0xBE77E369},{0xBE5413CD},{0xBE2D92C2},{0xBE036505},{0xBDA87927},{0xBCF254B0}
}

MP3 Layer 3 table for block type 0.


◆ g_MP3BlockType1

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3BlockType1
static
Initial value:
= {
{0x3D043A95},{0x3DDB8F02},{0x3E4E3F8B},{0x3EA6B730},{0x3F000000},{0x3F448CE2},
{0x3F9EE064},{0x40153EB0},{0x40F7D015},{0xC107385A},{0xC0427FED},{0xBFF962DE},
{0xBFBCC8EB},{0xBF9A827A},{0xBF843046},{0xBF6894D6},{0xBF5076D3},{0xBF3D489D},
{0xBF2D9C9B},{0xBF215729},{0xBF17C4A9},{0xBF104E0D},{0xBF0A8BD4},{0xBF063634},
{0xBF01FC73},{0xBEEE8DD4},{0xBECB4ABD},{0xBE9BFDCC},{0xBE459FE7},{0xBD88E76C},
{0x00000000},{0x00000000},{0x00000000},{0x00000000},{0x00000000},{0x00000000}
}

MP3 Layer 3 table for block type 1.


◆ g_MP3BlockType2

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3BlockType2
static
Initial value:
= {
{0x3DDB8F02},{0x3F000000},{0x40153EB0},{0xC0427FED},{0xBF9A827A},{0xBF5076D3},
{0xBF1FF5CE},{0xBF000000},{0xBECCD9DA},{0xBE9D300C},{0xBE5413CD},{0xBDA87927}
}

MP3 Layer 3 table for block type 2.


◆ g_MP3BlockType3

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3BlockType3
static
Initial value:
= {
{0x00000000},{0x00000000},{0x00000000},{0x00000000},{0x00000000},{0x00000000},
{0x3E9A622D},{0x3FBBA375},{0x40DF4CA5},{0xC1118135},{0xC0627FED},{0xC0129517},
{0xBFD4D526},{0xBFA73D75},{0xBF8A9A83},{0xBF6E3A75},{0xBF524353},{0xBF3D76C6},
{0xBF2D724E},{0xBF1FF5CE},{0xBF142BB2},{0xBF09A043},{0xBF000000},{0xBEEE1832},
{0xBEDD267E},{0xBECCD9DA},{0xBEBCEC3D},{0xBEAD1DA9},{0xBE9D300C},{0xBE8CE369},
{0xBE77E369},{0xBE5413CD},{0xBE2D92C2},{0xBE036505},{0xBDA87927},{0xBCF254B0}
}

MP3 Layer 3 table for block type 3.


◆ g_MP3BlockTypes

const float * Burger::DecompressMP3::g_MP3BlockTypes
static
Initial value:
= {
}
static const uint32_float_t g_MP3BlockType2[12]
MP3 Layer 3 table for block type 2.
Definition burger.h:3236
static const uint32_float_t g_MP3BlockType3[36]
MP3 Layer 3 table for block type 3.
Definition burger.h:3247
static const uint32_float_t g_MP3BlockType0[36]
MP3 Layer 3 table for block type 0.
Definition burger.h:3206
static const uint32_float_t g_MP3BlockType1[36]
MP3 Layer 3 table for block type 1.
Definition burger.h:3221
float f
Value as a 32 bit float.
Definition burger.h:1776

MP3 Layer 3 index table for all block types.


◆ g_MP3CompashHash

const Burger::DecompressMP3::Layer3Huffman_t Burger::DecompressMP3::g_MP3CompashHash
static
Initial value:
= {
{0,g_CompactHash0},
{0,g_CompactHash1}
}

Pointers to compact Huffman hash tables.


◆ g_MP3FFTShortWindow

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3FFTShortWindow
static
Initial value:
= {
{0x381DE964},{0x39B1A200},{0x3A76A9A7},{0x3AF1A81A},{0x3B47A80A},{0x3B950D1D},{0x3BD00DB6},{0x3C0A665C},
{0x3C319FC5},{0x3C5DAD09},{0x3C8743AE},{0x3CA2139C},{0x3CBF422A},{0x3CDECADA},{0x3D005467},{0x3D126B67},
{0x3D25A7A3},{0x3D3A0623},{0x3D4F83C3},{0x3D661D33},{0x3D7DCEF6},{0x3D8B4AB3},{0x3D983658},{0x3DA5A86C},
{0x3DB39EDD},{0x3DC21782},{0x3DD11021},{0x3DE0866C},{0x3DF077FE},{0x3E007132},{0x3E08E18A},{0x3E118BBB},
{0x3E1A6E6E},{0x3E238844},{0x3E2CD7D7},{0x3E365BB6},{0x3E40126B},{0x3E49FA75},{0x3E54124E},{0x3E5E5866},
{0x3E68CB2A},{0x3E7368FB},{0x3E7E3038},{0x3E848F9B},{0x3E8A1A23},{0x3E8FB6D9},{0x3E9564DF},{0x3E9B2356},
{0x3EA0F15B},{0x3EA6CE09},{0x3EACB877},{0x3EB2AFBD},{0x3EB8B2EF},{0x3EBEC120},{0x3EC4D960},{0x3ECAFAC0},
{0x3ED1244C},{0x3ED75513},{0x3EDD8C1E},{0x3EE3C87A},{0x3EEA0930},{0x3EF04D49},{0x3EF693CD},{0x3EFCDBC6},
{0x3F01921D},{0x3F04B619},{0x3F07D95C},{0x3F0AFB68},{0x3F0E1BC3},{0x3F1139F1},{0x3F145577},{0x3F176DDA},
{0x3F1A82A0},{0x3F1D9350},{0x3F209F70},{0x3F23A688},{0x3F26A822},{0x3F29A3C5},{0x3F2C98FC},{0x3F2F8752},
{0x3F326E55},{0x3F354D90},{0x3F382494},{0x3F3AF2EF},{0x3F3DB833},{0x3F4073F2},{0x3F4325C1},{0x3F45CD36},
{0x3F4869E6},{0x3F4AFB6D},{0x3F4D8163},{0x3F4FFB65},{0x3F526912},{0x3F54CA0A},{0x3F571DEF},{0x3F596465},
{0x3F5B9D11},{0x3F5DC79D},{0x3F5FE3B4},{0x3F61F100},{0x3F63EF33},{0x3F65DDFC},{0x3F67BD10},{0x3F698C24},
{0x3F6B4AF2},{0x3F6CF935},{0x3F6E96AA},{0x3F702311},{0x3F719E2D},{0x3F7307C4},{0x3F745F9E},{0x3F75A586},
{0x3F76D94A},{0x3F77FABA},{0x3F7909A9},{0x3F7A05EF},{0x3F7AEF63},{0x3F7BC5E3},{0x3F7C894C},{0x3F7D3981},
{0x3F7DD667},{0x3F7E5FE5},{0x3F7ED5E6},{0x3F7F3858},{0x3F7F872C},{0x3F7FC256},{0x3F7FE9CC},{0x3F7FFD88}
}

MP3 Short Blackman FFT window.


◆ g_MP3FFTWindow

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3FFTWindow
static

MP3 Blackman FFT window.


◆ g_MP3GainPow2

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3GainPow2
static

MP3 Layer 3 table for pow(2.0,(i-46)*-0.25)


◆ g_MP3IntensitySLen

const uint_t Burger::DecompressMP3::g_MP3IntensitySLen
static

MP3 Layer 3 stereo intensity table.


See also
Layer3GetScaleFactors2(uint_t *,GranuleInfo_t *,uint_t)

◆ g_MP3Layer2Entries

const Burger::DecompressMP3::Layer2_AllocEntry_t * Burger::DecompressMP3::g_MP3Layer2Entries
static
Initial value:
= {
g_AllocEntry0,g_AllocEntry1,g_AllocEntry2,g_AllocEntry3,g_AllocEntry4
}

Pointers to the MP3 Layer2 allocation tables.


◆ g_MP3LongHash

const Burger::DecompressMP3::Layer3Huffman_t Burger::DecompressMP3::g_MP3LongHash
static

Pointers to long Huffman hash tables.


◆ g_MP3MulTable64

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3MulTable64
static

MP3 Layer 2 magnitude table.


◆ g_MP3NormalSLen

const uint_t Burger::DecompressMP3::g_MP3NormalSLen
static

MP3 Layer 3 mono intensity table.


See also
Layer3GetScaleFactors2(uint_t *,GranuleInfo_t *,uint_t)

◆ g_MP3OneDivTan

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3OneDivTan
static
Initial value:
= {
{0x3F800000},{0x3F49E69D},{0x3F224C29},{0x3F000000},{0x3EBB67AF},{0x3E58658C},{0x248D3132},{0xBEBB67AF},
{0xBFAED9EC},{0xD9800000},{0x40176CF6},{0x3FAED9EC},{0x3F800000},{0x3F49E69D},{0x3F224C29},{0x3F000000}
}

MP3 Layer 3 tangent table for 1.0 / (tan((i * BURGER_PI) / 12.0) + 1)


◆ g_MP3PhasedBlockType0

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PhasedBlockType0
static
Initial value:
= {
{0x3D043A95},{0xBDDB8F02},{0x3E4E3F8B},{0xBEA6B730},{0x3F000000},{0xBF448CE2},
{0x3F9EE064},{0xC0153EB0},{0x40F7D015},{0x4107385A},{0xC0427FED},{0x3FF962DE},
{0xBFBCC8EB},{0x3F9A827A},{0xBF843046},{0x3F6894D6},{0xBF5076D3},{0x3F3D489D},
{0xBF2D724E},{0x3F1FF5CE},{0xBF142BB2},{0x3F09A043},{0xBF000000},{0x3EEE1832},
{0xBEDD267E},{0x3ECCD9DA},{0xBEBCEC3D},{0x3EAD1DA9},{0xBE9D300C},{0x3E8CE369},
{0xBE77E369},{0x3E5413CD},{0xBE2D92C2},{0x3E036505},{0xBDA87927},{0x3CF254B0}
}

MP3 Layer 3 table for phase shifted block type 0.


◆ g_MP3PhasedBlockType1

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PhasedBlockType1
static
Initial value:
= {
{0x3D043A95},{0xBDDB8F02},{0x3E4E3F8B},{0xBEA6B730},{0x3F000000},{0xBF448CE2},
{0x3F9EE064},{0xC0153EB0},{0x40F7D015},{0x4107385A},{0xC0427FED},{0x3FF962DE},
{0xBFBCC8EB},{0x3F9A827A},{0xBF843046},{0x3F6894D6},{0xBF5076D3},{0x3F3D489D},
{0xBF2D9C9B},{0x3F215729},{0xBF17C4A9},{0x3F104E0D},{0xBF0A8BD4},{0x3F063634},
{0xBF01FC73},{0x3EEE8DD4},{0xBECB4ABD},{0x3E9BFDCC},{0xBE459FE7},{0x3D88E76C},
{0x00000000},{0x80000000},{0x00000000},{0x80000000},{0x00000000},{0x80000000}
}

MP3 Layer 3 table for phase shifted block type 1.


◆ g_MP3PhasedBlockType2

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PhasedBlockType2
static
Initial value:
= {
{0x3DDB8F02},{0xBF000000},{0x40153EB0},{0x40427FED},{0xBF9A827A},{0x3F5076D3},
{0xBF1FF5CE},{0x3F000000},{0xBECCD9DA},{0x3E9D300C},{0xBE5413CD},{0x3DA87927}
}

MP3 Layer 3 table for phase shifted block type 2.


◆ g_MP3PhasedBlockType3

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PhasedBlockType3
static
Initial value:
= {
{0x00000000},{0x80000000},{0x00000000},{0x80000000},{0x00000000},{0x80000000},
{0x3E9A622D},{0xBFBBA375},{0x40DF4CA5},{0x41118135},{0xC0627FED},{0x40129517},
{0xBFD4D526},{0x3FA73D75},{0xBF8A9A83},{0x3F6E3A75},{0xBF524353},{0x3F3D76C6},
{0xBF2D724E},{0x3F1FF5CE},{0xBF142BB2},{0x3F09A043},{0xBF000000},{0x3EEE1832},
{0xBEDD267E},{0x3ECCD9DA},{0xBEBCEC3D},{0x3EAD1DA9},{0xBE9D300C},{0x3E8CE369},
{0xBE77E369},{0x3E5413CD},{0xBE2D92C2},{0x3E036505},{0xBDA87927},{0x3CF254B0}
}

MP3 Layer 3 table for phase shifted block type 3.


◆ g_MP3PhasedBlockTypes

const float * Burger::DecompressMP3::g_MP3PhasedBlockTypes
static
Initial value:
= {
}
static const uint32_float_t g_MP3PhasedBlockType1[36]
MP3 Layer 3 table for phase shifted block type 1.
Definition burger.h:3293
static const uint32_float_t g_MP3PhasedBlockType0[36]
MP3 Layer 3 table for phase shifted block type 0.
Definition burger.h:3278
static const uint32_float_t g_MP3PhasedBlockType2[12]
MP3 Layer 3 table for phase shifted block type 2.
Definition burger.h:3308
static const uint32_float_t g_MP3PhasedBlockType3[36]
MP3 Layer 3 table for phase shifted block type 3.
Definition burger.h:3319

MP3 Layer 3 index table for all phased block types.


◆ g_MP3Power3Div4

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3Power3Div4
static

Table of pow(i,4/3)


◆ g_MP3PowMono1

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PowMono1
static
Initial value:
= {
{
{0x3F800000},{0x3F5744FD},{0x3F800000},{0x3F3504F3},{0x3F800000},{0x3F1837F0},{0x3F800000},{0x3F000000},
{0x3F800000},{0x3ED744FD},{0x3F800000},{0x3EB504F3},{0x3F800000},{0x3E9837F0},{0x3F800000},{0x3E800000}
},{
{0x3F800000},{0x3F3504F3},{0x3F800000},{0x3F000000},{0x3F800000},{0x3EB504F3},{0x3F800000},{0x3E800000},
{0x3F800000},{0x3E3504F3},{0x3F800000},{0x3E000000},{0x3F800000},{0x3DB504F3},{0x3F800000},{0x3D800000}
}}

MP3 Layer 3 power table1 for mono.


◆ g_MP3PowMono2

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PowMono2
static
Initial value:
= {
{
{0x3F800000},{0x3F800000},{0x3F5744FD},{0x3F800000},{0x3F3504F3},{0x3F800000},{0x3F1837F0},{0x3F800000},
{0x3F000000},{0x3F800000},{0x3ED744FD},{0x3F800000},{0x3EB504F3},{0x3F800000},{0x3E9837F0},{0x3F800000}
},{
{0x3F800000},{0x3F800000},{0x3F3504F3},{0x3F800000},{0x3F000000},{0x3F800000},{0x3EB504F3},{0x3F800000},
{0x3E800000},{0x3F800000},{0x3E3504F3},{0x3F800000},{0x3E000000},{0x3F800000},{0x3DB504F3},{0x3F800000}
}}

MP3 Layer 3 power table2 for mono.


◆ g_MP3PowStereo1

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PowStereo1
static
Initial value:
= {
{
{0x3FB504F3},{0x3F9837F0},{0x3FB504F3},{0x3F800000},{0x3FB504F3},{0x3F5744FD},{0x3FB504F3},{0x3F3504F3},
{0x3FB504F3},{0x3F1837F0},{0x3FB504F3},{0x3F000000},{0x3FB504F3},{0x3ED744FD},{0x3FB504F3},{0x3EB504F3}
},{
{0x3FB504F3},{0x3F800000},{0x3FB504F3},{0x3F3504F3},{0x3FB504F3},{0x3F000000},{0x3FB504F3},{0x3EB504F3},
{0x3FB504F3},{0x3E800000},{0x3FB504F3},{0x3E3504F3},{0x3FB504F3},{0x3E000000},{0x3FB504F3},{0x3DB504F3}
}}

MP3 Layer 3 power table1 for stereo.


◆ g_MP3PowStereo2

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3PowStereo2
static
Initial value:
= {
{
{0x3FB504F3},{0x3FB504F3},{0x3F9837F0},{0x3FB504F3},{0x3F800000},{0x3FB504F3},{0x3F5744FD},{0x3FB504F3},
{0x3F3504F3},{0x3FB504F3},{0x3F1837F0},{0x3FB504F3},{0x3F000000},{0x3FB504F3},{0x3ED744FD},{0x3FB504F3}
},{
{0x3FB504F3},{0x3FB504F3},{0x3F800000},{0x3FB504F3},{0x3F3504F3},{0x3FB504F3},{0x3F000000},{0x3FB504F3},
{0x3EB504F3},{0x3FB504F3},{0x3E800000},{0x3FB504F3},{0x3E3504F3},{0x3FB504F3},{0x3E000000},{0x3FB504F3}
}}

MP3 Layer 3 power table2 for stereo.


◆ g_MP3SampleRates

const uint_t Burger::DecompressMP3::g_MP3SampleRates
static
Initial value:
= {
44100,48000,32000,
22050,24000,16000,
11025,12000,8000
}

Table of sample rates supported by MP3.


Entries 0-2 are Version 1, 3-5 are Version 2, 6-8 are Version 2.5 indexed by m_uSamplingRateFrequencyIndex

Data found on https://www.mp3-tech.org/programmer/frame_header.html in entry F

◆ g_MP3Sqrt2DivTan

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3Sqrt2DivTan
static
Initial value:
= {
{0x3FB504F3},{0x3F8EC3F4},{0x3F6585F8},{0x3F3504F3},{0x3F0483EE},{0x3E9903FB},{0x24C7AD06},{0xBF0483EE},
{0xBFF746EA},{0xD9B504F3},{0x405625EF},{0x3FF746EA},{0x3FB504F3},{0x3F8EC3F4},{0x3F6585F8},{0x3F3504F3}
}

MP3 Layer 3 tangent table for sqrt(2) / (tan((i * BURGER_PI) / 12.0) + 1)


◆ g_MP3Sqrt2TanDivTan

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3Sqrt2TanDivTan
static
Initial value:
= {
{0x00000000},{0x3E9903FB},{0x3F0483EE},{0x3F3504F3},{0x3F6585F8},{0x3F8EC3F4},{0x3FB504F3},{0x3FF746EA},
{0x405625EF},{0x59B504F3},{0xBFF746EA},{0xBF0483EE},{0xA547AD06},{0x3E9903FB},{0x3F0483EE},{0x3F3504F3}
}

MP3 Layer 3 tangent table for sqrt(2) * tan((i * BURGER_PI) / 12.0) / (tan((i * BURGER_PI) / 12.0) + 1)


◆ g_MP3TanDivTan

const Burger::uint32_float_t Burger::DecompressMP3::g_MP3TanDivTan
static
Initial value:
= {
{0x00000000},{0x3E58658C},{0x3EBB67AF},{0x3F000000},{0x3F224C29},{0x3F49E69D},{0x3F800000},{0x3FAED9EC},
{0x40176CF6},{0x59800000},{0xBFAED9EC},{0xBEBB67AF},{0xA50D3132},{0x3E58658C},{0x3EBB67AF},{0x3F000000}
}

MP3 Layer 3 tangent table for tan((i * BURGER_PI) / 12.0) / (tan((i * BURGER_PI) / 12.0) + 1)


◆ g_SampleRateTables

const uint_t Burger::DecompressMP3::g_SampleRateTables
static
Initial value:
= {
{22050, 24000, 16000,BURGER_MAXUINT},
{44100, 48000, 32000,BURGER_MAXUINT},
{11025, 12000, 8000,BURGER_MAXUINT}
}

Expected sample rate for MP3 files.


The first index is which type of MP3 file is being looked up and the second index with the sample rate constant.

The order is Mpeg 2, Mpeg 1, Mpeg 2.5

◆ g_SCFSI_BandTable

const uint_t Burger::DecompressMP3::g_SCFSI_BandTable = { 0, 6, 11, 16, 21 }
static

SCale Factor Selection Information.


Table for determining the granule size for the current SCFSI band.

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::DecompressMP3::g_StaticRTTI
static

The global description of the class.


This record contains the name of this class and a reference to the parent

◆ g_Table

const int16_t Burger::DecompressMP3::g_Table
static

◆ m_bBitStreamNotSynced

uint_t Burger::DecompressMP3::m_bBitStreamNotSynced

TRUE if the bit stream hadn't reached a sync marker.

◆ m_bDataValid

uint_t Burger::DecompressMP3::m_bDataValid

TRUE if packet data was found.

◆ m_bFreeFrame

uint_t Burger::DecompressMP3::m_bFreeFrame

TRUE if in free format mode (Sample rate can change)

◆ m_bPreviousFreeFrame

uint_t Burger::DecompressMP3::m_bPreviousFreeFrame

TRUE if it was free format mode in the last pass.

◆ m_bSideInfoValid

uint_t Burger::DecompressMP3::m_bSideInfoValid

TRUE if MP3 side information was parsed.

◆ m_bVBRHeaderValid

uint_t Burger::DecompressMP3::m_bVBRHeaderValid

TRUE if a Variable Bit Rate header was parsed.

◆ m_ByteStreamBuffers

uint8_t Burger::DecompressMP3::m_ByteStreamBuffers[2][cMaxFrameSize+1024]

Internal buffers.

◆ m_eState

eState Burger::DecompressMP3::m_eState
protected

State of the decompression.

◆ m_fHybridBlocks

float Burger::DecompressMP3::m_fHybridBlocks[2][2][cSubBandLimit *cSideSampleLimit]

Buffers for DCT tables.

◆ m_FrameHeaderExt

FrameHeaderExt_t Burger::DecompressMP3::m_FrameHeaderExt

Data frame state.

◆ m_fSynthBuffers

float Burger::DecompressMP3::m_fSynthBuffers[2][2][256+16]

Output buffers for DCT transforms (with 16 entry padding)

◆ m_iCache

int16_t Burger::DecompressMP3::m_iCache
protected

Temp uncompressed data buffer.

◆ m_iEncodingDelay

int Burger::DecompressMP3::m_iEncodingDelay

Encoding delay from 0-3000 (or -1 if invalid)

◆ m_iEncodingPadding

int Burger::DecompressMP3::m_iEncodingPadding

Encoding padding from 0-3000 (or -1 if invalid)

◆ m_Layer3SideInfo

Layer3SideInfo_t Burger::DecompressMP3::m_Layer3SideInfo

Side information for Layer 3 decoding.

◆ m_pNext

Chunk_t* Burger::DecompressMP3::m_pNext

First entry in the linked list of data chunks.

◆ m_pPrev

Chunk_t* Burger::DecompressMP3::m_pPrev

Last entry in the linked list of data chunks.

◆ m_pWorkPointer

uint8_t* Burger::DecompressMP3::m_pWorkPointer

Pointer to m_ByteStreamBuffers.

◆ m_uBitIndex

uint_t Burger::DecompressMP3::m_uBitIndex

Which bit is being parse for bit streaming (0-7)

◆ m_uCacheSize

uint_t Burger::DecompressMP3::m_uCacheSize
protected

Number of valid bytes in m_uCache.

◆ m_uFrameSize

uintptr_t Burger::DecompressMP3::m_uFrameSize

Number of bytes in the frame.

◆ m_uHybridBlockIndexes

uint_t Burger::DecompressMP3::m_uHybridBlockIndexes[2]

Which m_fHybridBlocks tables that are active (2 channels)

◆ m_uMP3DataSize

uintptr_t Burger::DecompressMP3::m_uMP3DataSize

Number of compressed byte in the current packet.

◆ m_uPreviousFramePadding

uint_t Burger::DecompressMP3::m_uPreviousFramePadding

Number of bits from the previous frame's padding.

◆ m_uPreviousFrameSize

uintptr_t Burger::DecompressMP3::m_uPreviousFrameSize

Previous data frame size, UINTPTR_MAX is none was found.

◆ m_uRemainingBytes

uintptr_t Burger::DecompressMP3::m_uRemainingBytes

Number of bytes remaining stored in the entire linked list.

◆ m_uSideInfoSize

uintptr_t Burger::DecompressMP3::m_uSideInfoSize

Number of bytes for Side Information (Including CRC if present)

◆ m_uSynthBufferOffset

uint_t Burger::DecompressMP3::m_uSynthBufferOffset

Synthesizer buffer offset (0-15)

◆ m_uVBRFrames

uint_t Burger::DecompressMP3::m_uVBRFrames

VBR frames from the Xing packet.

◆ m_uWhichBuffer

uint_t Burger::DecompressMP3::m_uWhichBuffer

Which byte stream buffer is active? (0 or 1)

◆ Signature

const uint32_t Burger::DecompressMP3::Signature = 0x4D503320
static

'MP3 '