The MP3 coding API includes several data structures.
The structure IppMP3FrameHeader contains the complete set of header information associated with one frame.
The structure IppMP3SideInfo contains the complete set of side information associated with one granule of one channel.
The structure IppMP3HuffmanTable contains the complete set of information associated with Huffman table.
The structure IppMP3PsychoacousticModelTwoAnalysis contains the outputs generated by the Intel IPP implementation of ISO/IEC 11172-3 psychoacoustic analysis model 2, including estimates of the masked thresholds and perceptual entropy associated with the current frame. Masked thresholds are represented in terms of Mask-to-Signal Ratios (MSRs).
The structure IppMP3PsychoacousticModelTwoState contains the state information associated with the Intel IPP implementation of ISO/IEC 11172-3 psychoacoustic analysis model 2 to facilitate coherent block processing.
The structure IppMP3BitReservoir contains the state information associated with the quantization bit reservoir.
typedef struct {
int id; /* ID: 1 - MPEG-1, 0 - MPEG-2 */
int layer; /* layer index: 0x3 - Layer I
0x2 - Layer II
0x1 - Layer III * /
int protectionBit; /* CRC flag: 0 - CRC on, 1 - CRC off */
int bitRate; /* bit rate index */
int samplingFreq; /* sampling frequency index */
int paddingBit; /* padding flag: 0 - no padding, 1 -
padding */
int privateBit; /* private_bit, not used */
int mode; /* mono/stereo selection */
int modeExt; /* extension to mode */
int copyright; /* copyright or not: 0 - no, 1 - yes */
int originalCopy; /* original or copied: 0 - copy,
1 - original */
int emphasis; /* flag indicating the type of de-emphasis */
int CRCWord; /* CR-Ccheck word */
} IppMP3FrameHeader;
typedef struct {
int part23Len; /* number of main_data bits */
int bigVals; /* half the number of Huffman code words whose maximum amplitudes may be greater than 1 */
int globGain; /* quantizes step size information */
int sfCompress; /* number of bits used for scale factors */
int winSwitch; /* window switch flag */
int blockType; /* block type flag */
int mixedBlock; /* flag: 0 - non-mixed block, 1 - mixed
block */
int pTableSelect[3]; /* Huffman table index for the 3 rectangle in <big_values> field */
int pSubBlkGain[3]; /* gain offset from the global gain for one subblock */
int reg0Cnt; /*the number of scale factor bands in the first region of <big_values> less one */
int reg1Cnt; /*the number of scale factor bands in the second region of <big_values> less one */
int preFlag; /* flag indicating high frequency boost */
int sfScale; /* scale factor scaling */
int cntlTabSel; /* Huffman table index for the <count1> field of quadruples */
} IppMP3SideInfo;
typedef struct {
int tableSize; /* number of rows in table */
int linbits; /* variable used for encode if the magnitude of encoded value is greater or equal to 15 */
int maxBitsValue; /* maximum bit length of codewords */
Ipp16u *pHcod; /* pointer to Huffman code table */
Ipp8u *pSlen; /* pointer to Huffman length table */
} IppMP3HuffmanTable;
typedef struct{
Ipp32s pMSR[36]; /* MSRs for one granule/channel.
For long blocks, elements0- 20 represent the thresholds associated with the 21 SFBs. For short blocks, elements 0,3,6,..,33, elements 1,4,...,34, and elements 2,5,...,35, respectively, represent the thresholds associated with the 12 SFBs for each of the 3 consecutive short blocks in one granule/channel. That is, the block thresholds are interleaved such that the thresholds are grouped by SFB.*/
Ipp32s PE; /* Estimated perceptual entropy, one granule/channel */
} IppMP3PsychoacousticModelTwoAnalysis;
typedef struct {
Ipp64s pPrevMaskedThesholdLong[2][63]; /* long block masked threshold history buffer; contains masked threshold estimates for the threshold calculation partitions associated with the two most recent long blocks */
Ipp64s pPrevMaskedThesholdShort[IPP_MP3_PSY_BAND_SHORT_NUM]; /* short block masked threshold history buffer; contains masked threshold estimates for the threshold calculation partitions associated with the two most recent short blocks */
Ipp32sc pPrevFFT[2][FIRST_6_CW]; /*FFT history buffer; contains real and imaginary FFT components associated with the two most recent long blocks */
Ipp32s pPrevFFTMag[2][FIRST_6_CW]; /*FFT magnitude history buffer; contains FFT component magnitudes associated with the two most recent long blocks */
int nextPerceptualEntropy; /*PE estimate for next granule; one granule delay provided for synchronization with analysis filterbank */
int nextBlockType; /* Expected block type for next granule; either long (normal), short, or stop. Depending upon analysis results for the granule following the next, a long block could change to a start block, and a stop block could change to a short block. This buffer provides one granule of delay for synchronization with the analysis filterbank */
Ipp32s pNextMSRLong[21]; /*long block MSR estimates for next granule. One granule delay provided for synchronization with analysis filterbank */
Ipp32s pNextMSRShort[36]; /*short block MSR estimates for next granule. One granule delay provided for synchronization with analysis filterbank */
} IppMP3PsychoacousticModelTwoState;
typedef struct {
int BitsRemaining; /*bits currently remaining in the reservoir */
int MaxBits; /*maximum possible reservoir size, in bits, determined as follows: min(7680-avg_frame_len, 2^9*8), where: avg_frame_len is the average frame length (in bits), including padding bits and excluding side information bits */
} IppMP3BitReservoir;
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.