Nut/OS  5.0.5
API Reference
coder.h File Reference
#include "mp3common.h"
Include dependency graph for coder.h:

Go to the source code of this file.

Data Structures

struct  _BitStreamInfo
struct  _FrameHeader
struct  _SideInfoSub
struct  _SideInfo
struct  CriticalBandInfo
struct  _DequantInfo
struct  _HuffmanInfo
struct  _HuffTabLookup
struct  _IMDCTInfo
struct  _BlockCount
struct  _ScaleFactorInfoSub
struct  _ScaleFactorJS
struct  _ScaleFactorInfo
struct  _SubbandInfo

Defines

#define ASSERT(x)
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN(a, b)   ((a) < (b) ? (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   ((192-126)*3)
#define VBUF_LENGTH   (17 * 2 * NBANDS)
#define SetBitstreamPointer   STATNAME(SetBitstreamPointer)
#define GetBits   STATNAME(GetBits)
#define CalcBitsUsed   STATNAME(CalcBitsUsed)
#define DequantChannel   STATNAME(DequantChannel)
#define MidSideProc   STATNAME(MidSideProc)
#define IntensityProcMPEG1   STATNAME(IntensityProcMPEG1)
#define IntensityProcMPEG2   STATNAME(IntensityProcMPEG2)
#define PolyphaseMono   STATNAME(PolyphaseMono)
#define PolyphaseStereo   STATNAME(PolyphaseStereo)
#define FDCT32   STATNAME(FDCT32)
#define ISFMpeg1   STATNAME(ISFMpeg1)
#define ISFMpeg2   STATNAME(ISFMpeg2)
#define ISFIIP   STATNAME(ISFIIP)
#define uniqueIDTab   STATNAME(uniqueIDTab)
#define coef32   STATNAME(coef32)
#define polyCoef   STATNAME(polyCoef)
#define csa   STATNAME(csa)
#define imdctWin   STATNAME(imdctWin)
#define huffTable   STATNAME(huffTable)
#define huffTabOffset   STATNAME(huffTabOffset)
#define huffTabLookup   STATNAME(huffTabLookup)
#define quadTable   STATNAME(quadTable)
#define quadTabOffset   STATNAME(quadTabOffset)
#define quadTabMaxBits   STATNAME(quadTabMaxBits)

Typedefs

typedef struct _BitStreamInfo BitStreamInfo
typedef struct _FrameHeader FrameHeader
typedef struct _SideInfoSub SideInfoSub
typedef struct _SideInfo SideInfo
typedef struct _DequantInfo DequantInfo
typedef struct _HuffmanInfo HuffmanInfo
typedef enum _HuffTabType HuffTabType
typedef struct _HuffTabLookup HuffTabLookup
typedef struct _IMDCTInfo IMDCTInfo
typedef struct _BlockCount BlockCount
typedef struct _ScaleFactorInfoSub ScaleFactorInfoSub
typedef struct _ScaleFactorJS ScaleFactorJS
typedef struct _ScaleFactorInfo ScaleFactorInfo
typedef struct _SubbandInfo SubbandInfo

Enumerations

enum  StereoMode { Stereo = 0x00, Joint = 0x01, Dual = 0x02, Mono = 0x03 }
enum  _HuffTabType {
  noBits, oneShot, loopNoLinbits, loopLinbits,
  quadA, quadB, invalidTab
}

Functions

void SetBitstreamPointer (BitStreamInfo *bsi, int nBytes, unsigned char *buf)
unsigned int GetBits (BitStreamInfo *bsi, int nBits)
int CalcBitsUsed (BitStreamInfo *bsi, unsigned char *startBuf, int startOffset)
int DequantChannel (int *sampleBuf, int *workBuf, int *nonZeroBound, FrameHeader *fh, SideInfoSub *sis, ScaleFactorInfoSub *sfis, CriticalBandInfo *cbi)
void MidSideProc (int x[MAX_NCHAN][MAX_NSAMP], int nSamps, int mOut[2])
void IntensityProcMPEG1 (int x[MAX_NCHAN][MAX_NSAMP], int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis, CriticalBandInfo *cbi, int midSideFlag, int mixFlag, int mOut[2])
void IntensityProcMPEG2 (int x[MAX_NCHAN][MAX_NSAMP], int nSamps, FrameHeader *fh, ScaleFactorInfoSub *sfis, CriticalBandInfo *cbi, ScaleFactorJS *sfjs, int midSideFlag, int mixFlag, int mOut[2])
void FDCT32 (int *x, int *d, int offset, int oddBlock, int gb)
void PolyphaseMono (short *pcm, int *vbuf, const int *coefBase)
void PolyphaseStereo (short *pcm, int *vbuf, const int *coefBase)

Variables

const HuffTabLookup huffTabLookup [HUFF_PAIRTABS]
const int huffTabOffset [HUFF_PAIRTABS]
const unsigned short huffTable []
const unsigned char quadTable [64+16]
const int quadTabOffset [2]
const int quadTabMaxBits [2]
const int imdctWin [4][36]
const int ISFMpeg1 [2][7]
const int ISFMpeg2 [2][2][16]
const int ISFIIP [2][2]
const int csa [8][2]
const int coef32 [31]
const int polyCoef [264]

Define Documentation

#define ASSERT (   x)
#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))
#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))
#define CLIP_2N (   y,
 
)
Value:
{ \
    int sign = (y) >> 31;  \
    if (sign != (y) >> (n))  { \
        (y) = sign ^ ((1 << (n)) - 1); \
    } \
}
#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   ((192-126)*3)
#define VBUF_LENGTH   (17 * 2 * NBANDS)
#define SetBitstreamPointer   STATNAME(SetBitstreamPointer)
#define GetBits   STATNAME(GetBits)
#define CalcBitsUsed   STATNAME(CalcBitsUsed)
#define DequantChannel   STATNAME(DequantChannel)
#define MidSideProc   STATNAME(MidSideProc)
#define IntensityProcMPEG1   STATNAME(IntensityProcMPEG1)
#define IntensityProcMPEG2   STATNAME(IntensityProcMPEG2)
#define PolyphaseMono   STATNAME(PolyphaseMono)
#define PolyphaseStereo   STATNAME(PolyphaseStereo)
#define FDCT32   STATNAME(FDCT32)
#define ISFMpeg1   STATNAME(ISFMpeg1)
#define ISFMpeg2   STATNAME(ISFMpeg2)
#define ISFIIP   STATNAME(ISFIIP)
#define uniqueIDTab   STATNAME(uniqueIDTab)
#define coef32   STATNAME(coef32)
#define polyCoef   STATNAME(polyCoef)
#define csa   STATNAME(csa)
#define imdctWin   STATNAME(imdctWin)
#define huffTable   STATNAME(huffTable)
#define huffTabOffset   STATNAME(huffTabOffset)
#define huffTabLookup   STATNAME(huffTabLookup)
#define quadTable   STATNAME(quadTable)
#define quadTabOffset   STATNAME(quadTabOffset)
#define quadTabMaxBits   STATNAME(quadTabMaxBits)

Typedef Documentation

typedef struct _BitStreamInfo BitStreamInfo
typedef struct _FrameHeader FrameHeader
typedef struct _SideInfoSub SideInfoSub
typedef struct _SideInfo SideInfo
typedef struct _DequantInfo DequantInfo
typedef struct _HuffmanInfo HuffmanInfo
typedef enum _HuffTabType HuffTabType
typedef struct _HuffTabLookup HuffTabLookup
typedef struct _IMDCTInfo IMDCTInfo
typedef struct _BlockCount BlockCount
typedef struct _ScaleFactorJS ScaleFactorJS
typedef struct _SubbandInfo SubbandInfo

Enumeration Type Documentation

enum StereoMode
Enumerator:
Stereo 
Joint 
Dual 
Mono 
Enumerator:
noBits 
oneShot 
loopNoLinbits 
loopLinbits 
quadA 
quadB 
invalidTab 

Function Documentation

void SetBitstreamPointer ( BitStreamInfo bsi,
int  nBytes,
unsigned char *  buf 
)
unsigned int GetBits ( BitStreamInfo bsi,
int  nBits 
)
int CalcBitsUsed ( BitStreamInfo bsi,
unsigned char *  startBuf,
int  startOffset 
)
int DequantChannel ( int *  sampleBuf,
int *  workBuf,
int *  nonZeroBound,
FrameHeader fh,
SideInfoSub sis,
ScaleFactorInfoSub sfis,
CriticalBandInfo cbi 
)
void MidSideProc ( int  x[MAX_NCHAN][MAX_NSAMP],
int  nSamps,
int  mOut[2] 
)
void IntensityProcMPEG1 ( int  x[MAX_NCHAN][MAX_NSAMP],
int  nSamps,
FrameHeader fh,
ScaleFactorInfoSub sfis,
CriticalBandInfo cbi,
int  midSideFlag,
int  mixFlag,
int  mOut[2] 
)
void IntensityProcMPEG2 ( int  x[MAX_NCHAN][MAX_NSAMP],
int  nSamps,
FrameHeader fh,
ScaleFactorInfoSub sfis,
CriticalBandInfo cbi,
ScaleFactorJS sfjs,
int  midSideFlag,
int  mixFlag,
int  mOut[2] 
)
void FDCT32 ( int *  x,
int *  d,
int  offset,
int  oddBlock,
int  gb 
)
void PolyphaseMono ( short *  pcm,
int *  vbuf,
const int *  coefBase 
)
void PolyphaseStereo ( short *  pcm,
int *  vbuf,
const int *  coefBase 
)

Variable Documentation

const HuffTabLookup huffTabLookup[HUFF_PAIRTABS]
const int huffTabOffset[HUFF_PAIRTABS]
const unsigned short huffTable[]
const unsigned char quadTable[64+16]
const int quadTabOffset[2]
const int quadTabMaxBits[2]
const int imdctWin[4][36]
const int ISFMpeg1[2][7]
const int ISFMpeg2[2][2][16]
const int ISFIIP[2][2]
const int csa[8][2]
const int coef32[31]
const int polyCoef[264]