File nut/include/contrib/hxmp3/coder.h

* Fixed-point MP3 decoder * Jon Recker (jrecker@real.com), Ken Cooke (kenc@real.com) * June 2003 * * coder.h - private, implementation-specific header file


Included Files


Preprocessor definitions

#define _CODER_H

#define ASSERT( x )

#define MAX( a, b )

#define MIN( a, b )

#define CLIP_2N( y, n )

#define SIBYTES_MPEG1_MONO 17

#define SIBYTES_MPEG1_STEREO 32

#define SIBYTES_MPEG2_MONO 9

#define SIBYTES_MPEG2_STEREO 17

#define POW43_FRACBITS_LOW 22

#define POW43_FRACBITS_HIGH 12

#define DQ_FRACBITS_OUT 25

#define IMDCT_SCALE 2

#define HUFF_PAIRTABS 32

#define BLOCK_SIZE 18

#define NBANDS 32

#define MAX_REORDER_SAMPS

#define VBUF_LENGTH

#define SetBitstreamPointer

#define GetBits

#define CalcBitsUsed

#define DequantChannel

#define MidSideProc

#define IntensityProcMPEG1

#define IntensityProcMPEG2

#define PolyphaseMono

#define PolyphaseStereo

#define FDCT32

#define ISFMpeg1

#define ISFMpeg2

#define ISFIIP

#define uniqueIDTab

#define coef32

#define polyCoef

#define csa

#define imdctWin

#define huffTable

#define huffTabOffset

#define huffTabLookup

#define quadTable

#define quadTabOffset

#define quadTabMaxBits


Typedef StereoMode

typedef enum {...} StereoMode
enum  
   {  
      Stereo;  
      Joint;  
      Dual;  
      Mono;  
   }  

Typedef BitStreamInfo

typedef struct _BitStreamInfo BitStreamInfo
struct _BitStreamInfo  
   {  
      unsigned char* bytePtr;  
      unsigned int iCache;  
      int cachedBits;  
      int nBytes;  
   }  

Typedef FrameHeader

typedef struct _FrameHeader FrameHeader
struct _FrameHeader  
   {  
      MPEGVersion ver;  
      int layer;  
      int crc;  
      int brIdx;  
      int srIdx;  
      int paddingBit;  
      int privateBit;  
      StereoMode sMode;  
      int modeExt;  
      int copyFlag;  
      int origFlag;  
      int emphasis;  
      int CRCWord;  
      const SFBandTable* sfBand;  
   }  

Typedef SideInfoSub

typedef struct _SideInfoSub SideInfoSub
struct _SideInfoSub  
   {  
      int part23Length;  
      int nBigvals;  
      int globalGain;  
      int sfCompress;  
      int winSwitchFlag;  
      int blockType;  
      int mixedBlock;  
      int tableSelect[3];  
      int subBlockGain[3];  
      int region0Count;  
      int region1Count;  
      int preFlag;  
      int sfactScale;  
      int count1TableSelect;  
   }  

Typedef SideInfo

typedef struct _SideInfo SideInfo
struct _SideInfo  
   {  
      int mainDataBegin;  
      int privateBits;  
      int scfsi[2][4];  
      SideInfoSub sis[2][2];  
   }  

Typedef CriticalBandInfo

typedef struct {...} CriticalBandInfo
struct  
   {  
      int cbType;  
      int cbEndS[3];  
      int cbEndSMax;  
      int cbEndL;  
   }  

Typedef DequantInfo

typedef struct _DequantInfo DequantInfo
struct _DequantInfo  
   {  
      int workBuf[((192-126)*3)];  
      CriticalBandInfo cbi[2];  
   }  

Typedef HuffmanInfo

typedef struct _HuffmanInfo HuffmanInfo
struct _HuffmanInfo  
   {  
      int huffDecBuf[2][576];  
      int nonZeroBound[2];  
      int gb[2];  
   }  

Typedef HuffTabType

typedef enum _HuffTabType HuffTabType
enum _HuffTabType  
   {  
      noBits;  
      oneShot;  
      loopNoLinbits;  
      loopLinbits;  
      quadA;  
      quadB;  
      invalidTab;  
   }  

Typedef HuffTabLookup

typedef struct _HuffTabLookup HuffTabLookup
struct _HuffTabLookup  
   {  
      int linBits;  
      HuffTabType tabType;  
   }  

Typedef IMDCTInfo

typedef struct _IMDCTInfo IMDCTInfo
struct _IMDCTInfo  
   {  
      int outBuf[2][18][32];  
      int overBuf[2][576/2];  
      int numPrevIMDCT[2];  
      int prevType[2];  
      int prevWinSwitch[2];  
      int gb[2];  
   }  

Typedef BlockCount

typedef struct _BlockCount BlockCount
struct _BlockCount  
   {  
      int nBlocksLong;  
      int nBlocksTotal;  
      int nBlocksPrev;  
      int prevType;  
      int prevWinSwitch;  
      int currWinSwitch;  
      int gbIn;  
      int gbOut;  
   }  

Typedef ScaleFactorInfoSub

typedef struct _ScaleFactorInfoSub ScaleFactorInfoSub
struct _ScaleFactorInfoSub  
   {  
      char l[23];  
      char s[13][3];  
   }  

Typedef ScaleFactorJS

typedef struct _ScaleFactorJS ScaleFactorJS
struct _ScaleFactorJS  
   {  
      int intensityScale;  
      int slen[4];  
      int nr[4];  
   }  

Typedef ScaleFactorInfo

typedef struct _ScaleFactorInfo ScaleFactorInfo
struct _ScaleFactorInfo  
   {  
      ScaleFactorInfoSub sfis[2][2];  
      ScaleFactorJS sfjs;  
   }  

Typedef SubbandInfo

typedef struct _SubbandInfo SubbandInfo
struct _SubbandInfo  
   {  
      int vbuf[2*(17*2*32)];  
      int vindex;  
   }  

External Variables

xmp3_huffTabLookup
extern const HuffTabLookup xmp3_huffTabLookup[32]

xmp3_huffTabOffset
extern const int xmp3_huffTabOffset[32]

xmp3_huffTable
extern const unsigned short xmp3_huffTable[]

xmp3_quadTable
extern const unsigned char xmp3_quadTable[64+16]

xmp3_quadTabOffset
extern const int xmp3_quadTabOffset[2]

xmp3_quadTabMaxBits
extern const int xmp3_quadTabMaxBits[2]

xmp3_imdctWin
extern const int xmp3_imdctWin[4][36]

xmp3_ISFMpeg1
extern const int xmp3_ISFMpeg1[2][7]

xmp3_ISFMpeg2
extern const int xmp3_ISFMpeg2[2][2][16]

xmp3_ISFIIP
extern const int xmp3_ISFIIP[2][2]

xmp3_csa
extern const int xmp3_csa[8][2]

xmp3_coef32
extern const int xmp3_coef32[31]

xmp3_polyCoef
extern const int xmp3_polyCoef[264]