亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mp3dec.h

?? 基于DSP的MP3音頻編碼源程序、方便TCP網絡傳輸
?? H
字號:
/* MPEG AUDIO LAYER 3 DECODER */
/* Bjorn Wesen 1997           */

#ifndef MP3DEC_H
#define MP3DEC_H

/* enable the assembler version of the IDCT in the subband synth */
#ifdef WIN32
#define USE_INLINE_ASM
#endif

#ifndef INT_MATH
/* enable the fast implementation of the IMDCT */
#define LEE_IMDCT
#endif

#ifndef WIN32
#undef MAKE_DATA
#define USE_DATA
#else
#undef USE_DATA
#undef MAKE_DATA
#endif

#ifdef DSP
/* in wait of a real math runtime... */
float tan(float f);
float sin(float f);
float cos(float f);
float sqrt(float f);
#else
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* enable clipping in the sample output */
#define OVERFLOW_CHECKING
#endif

#ifndef PI
#define PI 3.1415926535897932385
#endif

#define MAXCH 2           /* number of channels - 2 is stereo */
#define NUM_SUBBANDS 32   /* number of frequency subbands */
#define NUM_DCTBANDS 18   /* number of DCT lines */

#ifdef DSP
#define BITSTREAM_BUFSIZE 1024
#else
#define BITSTREAM_BUFSIZE 131072
#endif

/* ISO-MPEG layers */
#define LAYER1 3
#define LAYER2 2
#define LAYER3 1
#define LAYERRS 0

/* for the sampling_frequency field in a Frame */
#define FREQ_44 0    /* 44.1kHz sampling rate */
#define FREQ_48 1    /* 48kHz sampling rate */
#define FREQ_32 2    /* 32kHz sampling rate */
#define FREQ_RS 3    /* reserved */

/* stereo-mode of a Frame */
#define MODE_STEREO 0
#define MODE_JOINT_STEREO 1
#define MODE_DUAL_CHANNEL 2
#define MODE_SINGLE_CHANNEL 3

/* mode-extensions of joint_stereo in layer 3 */
/* maybe recode these to be two on/off fields instead! */
#define EXT_INT_OFF_MS_OFF 0
#define EXT_INT_ON_MS_OFF 1
#define EXT_INT_OFF_MS_ON 2
#define EXT_INT_ON_MS_ON 3

/* types of de-emphasis */
#define EMPH_NONE 0      /* no de-emphasis */
#define EMPH_5015 1      /* 50/15 microseconds */
#define EMPH_RS 2        /* reserved */
#define EMPH_CCITT 3     /* CCITT J.17 */


typedef int ibool;
#ifndef INT_MATH
#ifdef MAKE_DATA
typedef double mpfloat;   /* use extra precision while doing tables */
#else
typedef float mpfloat;   /* used for audio data calculations */
#endif
#define ISCALE(x)
#else

#define INTFACT 32767
#define ISCALE(x) (x).scale()

class mpfloat {
private:
    mpfloat(int i) { _val = i; }
public:
    mpfloat() { _val = 0; }
//    mpfloat(float f) { _val = (int)(f*INTFACT); } 
    mpfloat(double d) { _val = (int)(d*INTFACT); }

    void scale(int i = 16) {
//	printf("Scaling from 0x%8x.\n", _val);
	_val >>= i;
    }

    int operator!=(mpfloat a) {
	return a._val != _val;
    }

    int operator==(mpfloat a) {
	return a._val == _val;
    }

    mpfloat& operator=(mpfloat a) { 
	_val = a._val;
	return *this;
    }

    mpfloat& operator=(float a) { 
	_val = (int)(a*INTFACT);
	return *this;
    }

    mpfloat& operator=(double a) { 
	_val = (int)(a*INTFACT);
	return *this;
    }

    mpfloat& operator+=(mpfloat a) { 
	_val += a._val;
	return *this;
    }

    mpfloat& operator-=(mpfloat a) { 
	_val -= a._val;
	return *this;
    }

    mpfloat& operator*=(mpfloat a) { 
	_val *= a._val;
	return *this;
    }

    mpfloat& operator/=(mpfloat a) { 
	_val /= a._val;
	return *this;
    }

    friend mpfloat operator+(mpfloat, mpfloat);
    friend mpfloat operator-(mpfloat, mpfloat);
    friend mpfloat operator-(mpfloat);
    friend mpfloat operator*(mpfloat, mpfloat);
    friend mpfloat operator/(mpfloat, mpfloat);

    operator int () const { return _val / INTFACT; }
    operator float () const { return (float)_val / INTFACT; }
//    operator double () const { return (double)_val / INTFACT; }

    int rint() const { return _val; }

private:
    int _val;

};

#endif

typedef short PCMSample;
#define MIN(a,b) (a < b ? a : b)

/* Bitstream handles the streaming of a file into bits */

struct Bitstream {
#ifndef DSP
    FILE *f;
#endif
    int offset;      /* offset into file f - next byte to be read */
    ibool eof_found;   /* true if the file has hit eof */
    
    int write_index; /* load pointer in buffer */
    
#ifdef DSP
    unsigned char *buffer;  /* circular bytebuffer */
#else
    unsigned char buffer[BITSTREAM_BUFSIZE + 4];  /* circular bytebuffer */
    unsigned long *buffer32;  /* inbuffer, not huffbuff */
#endif
    int bit_index;  /* next bit to read */
#if 0
    int byte_index; /* byte to read - mapped into buffer by %BITSTREAM_BUFSIZE */
#endif
    int pos;        /* bit position in the stream */

};

typedef struct Bitstream Bitstream;


/* gets numbits bits from the bitstream bs */
#ifdef WIN32
unsigned int __inline Bitstream_get(Bitstream *bs, int numbits);
unsigned int __inline Bitstream_get1(Bitstream *bs);
#else
inline unsigned int Bitstream_get(Bitstream *bs, int numbits);
inline unsigned int Bitstream_get1(Bitstream *bs);
#endif

unsigned int Bitstream_viewbits(Bitstream *bs, int n);
void Bitstream_flushbits(Bitstream *bs, int n);

/* write a byte to the stream */
void Bitstream_putbyte(Bitstream *bs, unsigned int val);

/* rewind the read pointer n bits */
void Bitstream_rewindbits(Bitstream *bs, int n);

/* rewind the read pointer n bytes */
void Bitstream_rewindbytes(Bitstream *bs, int n);

/* returns true if the bitstream is at EOF */
ibool Bitstream_eof(Bitstream *bs);


/* seek synchronization word - return true if found */
ibool Bitstream_seek_sync(Bitstream *bs);
#if 0
typedef unsigned char Hufnode[2];

struct HuffmanTable {
    int number;                 /* number of the table, 0-33 in mpeg layer 3 */
    int xlen, ylen;             /* size */
    Hufnode *code;              /* decoder data tree */
    int codelen;                /* length of the decoder tree */
    int linbits;                /* number of linbits */
};

typedef struct HuffmanTable HuffmanTable;
extern HuffmanTable Huffman_h[34];
#endif

void HuffmanTable_boot(Bitstream *bs);
int HuffmanTable_bitsused(Bitstream *bs);
int HuffmanTable_decode(int htable, Bitstream *bs,
			int *x, int *y, int *v, int *w);


/* used in Granule.block_type */
#define BLOCKTYPE_NORMAL 0
#define BLOCKTYPE_START 1
#define BLOCKTYPE_3WIN 2
#define BLOCKTYPE_STOP 3

/* structure describing side information for one granule */

struct Granule {
  int part2_3_length;     /* nbr of bits used for sfactors and Huffman data */
  int big_values;         /* some weird value for huffman energies */
  int global_gain;        /* quantizer step size information for the granule */
  int scalefac_compress;  /* selects bitsize for transmission of sfactors */
  ibool window_switching_flag; /* signals that a special block type is used */

  /* these are only used if window_switching_flag is true */
  int block_type;         /* window type for this granule */
  ibool mixed_block_flag;  /* true if lower frequencies are special */
  int table_select[3];    /* selects Huffman tables for each region */
  int subblock_gain[3];   /* gain offsets for each subblock */
  int region0_count;      /* nbr of scalefactor bands in region 0 minus 1 */
  int region1_count;      /* nbr of scalefactor bands in region 1 minus 1 */
  ibool preflag;           /* true for high frequency amplification */
  ibool scalefac_scale;    /* scalefactor multiplier, false = 0.5, true = 1 */
  ibool count1table_select; /* selects huffman tables for some regions */

  int scalefac_l[23];     /* actual scalefactors for this granule */
  int scalefac_s[13][3];  /* scalefactors used in short windows */

    
};

typedef struct Granule Granule;

typedef int Granule_intfreqs[NUM_SUBBANDS * NUM_DCTBANDS + 10];
typedef mpfloat Granule_floatfreqs[NUM_SUBBANDS * NUM_DCTBANDS + 10];


/* This struct is the main object used when decoding a frame of audio. 
   A frame produces, in layer 3, 1152 samples per channel.
   */
typedef PCMSample SampleBlock[2][576][2];         /* this frames decoded PCM samples */

struct Frame {
    
    /* general header information for this frame */
    
    ibool CRC_enable;             /* true if CRC is enabled */
    int bitrate_index;           /* indicates the bitrate */
    int sampling_frequency;      /* indicates the sampling frequency */
    ibool padding_bit;            /* true if there is a padding slot */
    int mode;                    /* indicates the stereomode of this frame */
    int mode_extension;          /* indicates intensity and ms stereo on/off */
    ibool copyright;              /* true if the bitstream is copyrighted */
    ibool originality;            /* true if this bitstream is an original */
    int emphasis;                /* type of de-emphasis */
    
    int CRC;                     /* 16-bit CRC if error protection is on */
    
    int channels;                 /* number of channels, 2 for stereo */
    
    int main_data_begin;         /* bit offset to where the main data lives */
    int header_size;             /* size of header in bytes */
    int main_data_size;          /* number of bytes of main_data */
    
    ibool scfsi[MAXCH][4];        /* scalefactor selection information */
    
    Granule gr[2][MAXCH];        /* two granules per channel */
    
    PCMSample *samples;
    
#ifdef WIN32
    float *spectrum;
#endif

};

typedef struct Frame Frame;


#if defined(__cplusplus)
extern "C"
{
#endif
/* opens a binary file on disk for reading bits */
int Bitstream_open(Bitstream *bs, char *filename);

/* closes the file */
void Bitstream_close(Bitstream *bs);

/* fills the bitstreams internal buffer */
int Bitstream_fillbuffer(Bitstream *bs);
/* returns position of the read pointer, in bits */
int Bitstream_tell(Bitstream *bs);

void HuffmanTable_init();

void Frame_init();
void Frame_load(Frame *, Bitstream *, PCMSample *); 
void Granule_init();
extern int frameNum;

/* Function declarations */

#if defined(__cplusplus)
}
#endif 

/* load and decode a frame from the given bitstream */


#ifdef DECVERBOSE
void Frame_dump(Frame *);  /* dump verbose info about a frame */
#endif

/* debug code */
void dump_floats(mpfloat *f, int num);
void dump_ints(int *f, int num);


/* Granule operations - these constitute most of the decoding process */

void Granule_decode_info(Granule *gr, Bitstream *bs);
void Granule_decode_scalefactors(Granule *gr, Bitstream *bs,
				 int channel, int grnum, Frame *f);
void Granule_decode_huffman(Granule *gr, Bitstream *bs, 
			    int part2_start, Granule_intfreqs is, Frame *f);

void Granule_requantize(Granule *gr, Granule_intfreqs is,
			Granule_floatfreqs xr, Frame *f);

void Granule_process_stereo(Granule *grch0, Granule *grch1,
			    Granule_floatfreqs xr[2], 
			    Granule_floatfreqs lr[2], Frame *f);

void Granule_reorder(Granule *gr, Granule_floatfreqs xr,
		     Granule_floatfreqs xr2, Frame *f);

void Granule_antialias(Granule *gr, Granule_floatfreqs xr);

void Granule_imdct(Granule *gr, int ch, Granule_floatfreqs X);

void Granule_freqinverse(Granule *gr, Granule_floatfreqs x);

void Granule_subband_synthesis(Granule *gr, int ch, Granule_floatfreqs s, 
			       PCMSample *S);

void Granule_subband_synthesis2(Granule *gr, Granule_floatfreqs s1,
				Granule_floatfreqs s2,
				PCMSample *S);



void fast_idct_init();
void fast_idct(mpfloat *in, mpfloat *out);
PCMSample *windowing(int ch, PCMSample *S);
void windowing_init();
extern mpfloat *Granule_sbsynth_V[2];

struct Frame_band {
    int l[23];
    int s[14];
};

extern struct Frame_band Frame_bands[3];

#ifdef ROCKFORD
void prof_start();
void prof_end();
#define PROFSTART prof_start()
#define PROFSTOP prof_stop()
#else
#define PROFSTART
#define PROFSTOP
#endif

#ifdef MAKE_DATA
void
make_data_file(const char *fname, const char *datname, mpfloat *nbrs, int len);
void
make_data_file_2d(const char *fname, 
		  const char *datname, mpfloat *nbrs, int len1, int len2);
#endif


#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人啪午夜精品网站男同| 久久精品夜色噜噜亚洲a∨| 日韩美一区二区三区| 久久久蜜臀国产一区二区| 亚洲国产精品高清| 亚洲黄色av一区| 裸体歌舞表演一区二区| 不卡一区中文字幕| 欧美精品久久一区二区三区| 精品免费国产一区二区三区四区| 国产精品毛片a∨一区二区三区| 亚洲综合自拍偷拍| 奇米影视一区二区三区| 成人深夜视频在线观看| 欧美视频在线不卡| 欧美激情一区二区| 日本免费新一区视频| 不卡av在线网| 日韩久久精品一区| 亚洲精品乱码久久久久| 狠狠网亚洲精品| 在线国产电影不卡| 国产亚洲欧美色| 首页国产欧美久久| a4yy欧美一区二区三区| 日韩精品在线一区| 亚洲午夜国产一区99re久久| 国产成人免费视频网站高清观看视频 | 国产精品一区二区三区四区| 日本电影欧美片| 337p粉嫩大胆色噜噜噜噜亚洲| 一区二区三区不卡视频在线观看| 国内精品国产成人| 欧美区视频在线观看| 自拍偷拍亚洲综合| 国产乱码精品1区2区3区| 欧美性xxxxxx少妇| 亚洲三级小视频| 国产九色精品成人porny| 欧美日韩精品系列| 亚洲精品视频在线观看网站| 国产成人午夜99999| 欧美sm美女调教| 天堂蜜桃一区二区三区| 91猫先生在线| 国产欧美日本一区二区三区| 蜜臀av性久久久久蜜臀aⅴ | 日本在线不卡视频| 在线日韩国产精品| 中文字幕中文字幕在线一区| 国产高清久久久久| 精品999久久久| 美日韩一级片在线观看| 欧美三级日本三级少妇99| 亚洲日本在线天堂| av在线综合网| 国产精品久久久久aaaa| 国产成人99久久亚洲综合精品| 久久成人久久爱| 欧美日韩不卡在线| 美女网站视频久久| 久久久美女毛片| 岛国一区二区在线观看| 久久夜色精品一区| 日本欧美一区二区| 欧美xingq一区二区| 久久精品久久99精品久久| 欧美一区二区三级| 国产一区二区精品久久91| 国产女人aaa级久久久级 | 另类小说一区二区三区| 精品国内片67194| 福利一区福利二区| 日韩美女视频19| 欧美色视频在线| 美女在线视频一区| 国产精品久久久久9999吃药| 在线观看91精品国产入口| 香港成人在线视频| 久久综合久久综合九色| 一本久久a久久免费精品不卡| 日韩vs国产vs欧美| 亚洲激情一二三区| 国产欧美精品一区二区色综合| 亚洲国产精品一区二区www| 91色在线porny| 成人国产精品免费观看| 欧美日韩一二三区| 国产凹凸在线观看一区二区| 久久综合色婷婷| 成人深夜在线观看| 亚洲另类在线一区| 欧美午夜寂寞影院| 日韩电影在线观看一区| 久久综合色之久久综合| 成人av网站在线观看免费| 亚洲免费在线观看| 国产乱人伦偷精品视频不卡| 日韩电影在线观看电影| ●精品国产综合乱码久久久久| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲美女视频在线| 欧美电视剧在线看免费| 欧美日韩在线播放| 色婷婷综合中文久久一本| 国产精品综合一区二区| 久久国产精品无码网站| 视频一区中文字幕| 一区二区三区欧美在线观看| 国产情人综合久久777777| 日韩三级.com| 日韩欧美中文字幕公布| 欧美精品tushy高清| 欧美午夜电影一区| 欧美午夜精品理论片a级按摩| 色综合天天综合给合国产| 激情综合亚洲精品| 91在线免费播放| 成人激情综合网站| 欧美日韩黄色一区二区| 欧美影片第一页| 欧美日韩大陆在线| 色婷婷综合久久久久中文一区二区 | 日本中文字幕一区二区视频| 久久美女艺术照精彩视频福利播放 | 久久久99精品久久| 在线精品视频一区二区三四| 国产精品你懂的在线| 欧美激情综合五月色丁香小说| 欧美成人vr18sexvr| 久久美女艺术照精彩视频福利播放| 欧美va亚洲va香蕉在线| 国产日韩欧美电影| 综合av第一页| 天天综合色天天综合| 国产精品亚洲午夜一区二区三区 | 国产精品影视网| 国产一区二区三区国产| 成人国产一区二区三区精品| 欧美主播一区二区三区| 精品少妇一区二区三区免费观看 | 久久精品国产在热久久| 国产呦萝稀缺另类资源| 95精品视频在线| 日韩一卡二卡三卡四卡| 亚洲国产成人午夜在线一区| 亚洲国产综合视频在线观看| 国产电影一区二区三区| 精品视频一区三区九区| 久久久美女毛片| 国产在线精品一区在线观看麻豆| 高清不卡在线观看| 国产精品美女久久久久久| 亚洲成a人在线观看| 国产精品77777| 欧美视频一区二区三区在线观看| 夜夜爽夜夜爽精品视频| 久久久久久久久久看片| av电影在线观看完整版一区二区| 久久精品综合网| 欧美一区二区精品久久911| 欧美在线免费播放| 成人激情午夜影院| 国产精品一区二区三区网站| 蜜臀av亚洲一区中文字幕| 亚洲电影一级黄| 亚洲日本乱码在线观看| 国产精品免费av| 国产欧美一区二区三区沐欲| 精品少妇一区二区三区| 日韩女优av电影| 欧美一区二区三区啪啪| 欧美三级视频在线观看| 欧美在线免费观看视频| 日本伦理一区二区| 色狠狠av一区二区三区| 成人av在线资源网站| 不卡av电影在线播放| 国产成人av电影免费在线观看| 国产精品一二三四五| 国产麻豆精品在线| 国产盗摄女厕一区二区三区| 狠狠色综合日日| 国产一区二区不卡在线| 国产一区二区网址| 国产精品欧美精品| 欧美人牲a欧美精品| 在线观看91精品国产麻豆| 69堂国产成人免费视频| 欧美精品第1页| 欧美高清视频在线高清观看mv色露露十八 | www.99精品| 色综合色狠狠综合色| 在线视频亚洲一区| 欧美伊人精品成人久久综合97 | 日本午夜一区二区| 精品中文av资源站在线观看| 精品亚洲porn| 成人一道本在线| 96av麻豆蜜桃一区二区|