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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? encode.c

?? ISO mp3 sources (distribution 10) Layer 1/2/3, C Source, 512 k Sources of the Mpeg 1,2 layer 1,2
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/********************************************************************** * ISO MPEG Audio Subgroup Software Simulation Group (1996) * ISO 13818-3 MPEG-2 Audio Encoder - Lower Sampling Frequency Extension * * $Id: encode.c,v 1.1 1996/02/14 04:04:23 rowlands Exp $ * * $Log: encode.c,v $ * Revision 1.1  1996/02/14 04:04:23  rowlands * Initial revision * * Received from Mike Coleman **********************************************************************//********************************************************************** *   date   programmers         comment                               * * 3/01/91  Douglas Wong,       start of version 1.1 records          * *          Davis Pan                                                 * * 3/06/91  Douglas Wong        rename: setup.h to endef.h            * *                                      efilter to enfilter           * *                                      ewindow to enwindow           * *                              integrated "quantizer", "scalefactor",* *                              and "transmission" files              * *                              update routine "window_subband"       * * 3/31/91  Bill Aspromonte     replaced read_filter by               * *                              create_an_filter                      * * 5/10/91  W. Joseph Carter    Ported to Macintosh and Unix.         * *                              Incorporated Jean-Georges Fritsch's   * *                              "bitstream.c" package.                * *                              Incorporated Bill Aspromonte's        * *                              filterbank coefficient matrix         * *                              calculation routines and added        * *                              roundoff to coincide with specs.      * *                              Modified to strictly adhere to        * *                              encoded bitstream specs, including    * *                              "Berlin changes".                     * *                              Modified PCM sound file handling to   * *                              process all incoming samples and fill * *                              out last encoded frame with zeros     * *                              (silence) if needed.                  * *                              Located and fixed numerous software   * *                              bugs and table data errors.           * * 19jun91  dpwe (Aware)        moved "alloc_*" reader to common.c    * *                              Globals sblimit, alloc replaced by new* *                              struct 'frame_params' passed as arg.  * *                              Added JOINT STEREO coding, layers I,II* *                              Affects: *_bit_allocation,            * *                              subband_quantization, encode_bit_alloc* *                              sample_encoding                       * * 6/10/91  Earle Jennings      modified II_subband_quantization to   * *                              resolve type cast problem for MS_DOS  * * 6/11/91  Earle Jennings      modified to avoid overflow on MS_DOS  * *                              in routine filter_subband             * * 7/10/91  Earle Jennings      port to MsDos from MacIntosh version  * * 8/ 8/91  Jens Spille         Change for MS-C6.00                   * *10/ 1/91  S.I. Sudharsanan,   Ported to IBM AIX platform.           * *          Don H. Lee,                                               * *          Peter W. Farrett                                          * *10/ 3/91  Don H. Lee          implemented CRC-16 error protection   * *                              newly introduced function encode_CRC  * *11/ 8/91  Kathy Wang          Documentation of code                 * *                              All variablenames are referred to     * *                              with surrounding pound (#) signs      * * 2/11/92  W. Joseph Carter    Ported new code to Macintosh.  Most   * *                              important fixes involved changing     * *                              16-bit ints to long or unsigned in    * *                              bit alloc routines for quant of 65535 * *                              and passing proper function args.     * *                              Removed "Other Joint Stereo" option   * *                              and made bitrate be total channel     * *                              bitrate, irrespective of the mode.    * *                              Fixed many small bugs & reorganized.  * * 6/16/92  Shaun Astarabadi    Changed I_scale_factor_calc() and     * *                              II_scale_factor_calc() to use scale   * *                              factor 0 thru 62 only and not to      * *                              encode index 63 into the bit stream.  * * 7/27/92  Mike Li             (re-)Port to MS-DOS                   * * 9/22/92  jddevine@aware.com  Fixed _scale_factor_calc() defs       * * 3/31/93  Giogio Dimino       changed II_a_bit_allocation() from:   * *                              if( ad > ...) to if(ad >= ...)        * * 8/05/93  TEST                changed I_a_bit_allocation() from:    * *                              if( ad > ...) to if(ad >= ...)        * * 8/02/95  mc@fivebats.com     Changed audio file reading code to    * *                              read samples big-endian               * *10/15/95  mc@fivebats.com     Modified get_audio() for layer3-LSF   * **********************************************************************/ #include "common.h"#include "encoder.h"#ifdef MS_DOSextern unsigned _stklen = 16384;#endif/*=======================================================================\|                                                                       || This segment contains all the core routines of the encoder,           || except for the psychoacoustic models.                                 ||                                                                       || The user can select either one of the two psychoacoustic              || models. Model I is a simple tonal and noise masking threshold         || generator, and Model II is a more sophisticated cochlear masking      || threshold generator. Model I is recommended for lower complexity      || applications whereas Model II gives better subjective quality at low  || bit rates.                                                            ||                                                                       || Layers I and II of mono, stereo, and joint stereo modes are supported.|| Routines associated with a given layer are prefixed by "I_" for layer || 1 and "II_" for layer 2.                                              |\=======================================================================*/ /************************************************************************** read_samples()** PURPOSE:  reads the PCM samples from a file to the buffer**  SEMANTICS:* Reads #samples_read# number of shorts from #musicin# filepointer* into #sample_buffer[]#.  Returns the number of samples read.*************************************************************************/unsigned long read_samples(musicin, sample_buffer, num_samples, frame_size)FILE *musicin;short sample_buffer[2304];unsigned long num_samples, frame_size;{    unsigned long samples_read;    static unsigned long samples_to_read;    static char init = TRUE;    if (init) {        samples_to_read = num_samples;        init = FALSE;    }    if (samples_to_read >= frame_size)        samples_read = frame_size;    else        samples_read = samples_to_read;    if ((samples_read =         fread(sample_buffer, sizeof(short), (int)samples_read, musicin)) == 0)        printf("Hit end of audio data\n");    /*       Samples are big-endian. If this is a little-endian machine       we must swap     */    if ( NativeByteOrder == order_unknown )      {	NativeByteOrder = DetermineByteOrder();	if ( NativeByteOrder == order_unknown )	  {	    fprintf( stderr, "byte order not determined\n" );	    exit( 1 );	  }      }    if ( NativeByteOrder == order_littleEndian )      SwapBytesInWords( sample_buffer, samples_read );    samples_to_read -= samples_read;    if (samples_read < frame_size && samples_read > 0) {        printf("Insufficient PCM input for one frame - fillout with zeros\n");        for (; samples_read < frame_size; sample_buffer[samples_read++] = 0);        samples_to_read = 0;    }    return(samples_read);}/************************************************************************** get_audio()** PURPOSE:  reads a frame of audio data from a file to the buffer,*   aligns the data for future processing, and separates the*   left and right channels**************************************************************************/ unsigned long get_audio( musicin, buffer, num_samples, stereo, info )FILE *musicin;short FAR buffer[2][1152];unsigned long num_samples;int stereo;layer *info;{    int j;    short insamp[2304];    unsigned long samples_read;    int lay;    lay = info->lay;    if ( (lay == 3) && (info->version == 0) )    {	if ( stereo == 2 )	{	    samples_read = read_samples( musicin, insamp, num_samples,					 (unsigned long) 1152 );	    for ( j = 0; j < 576; j++ )	    {		buffer[0][j] = insamp[2 * j];		buffer[1][j] = insamp[2 * j + 1];	    }	}	else	{	    samples_read = read_samples( musicin, insamp, num_samples,					 (unsigned long) 576 );	    for ( j = 0; j < 576; j++ )	    {		buffer[0][j] = insamp[j];		buffer[1][j] = 0;	    }	}    }    else    {	if (lay == 1){	    if(stereo == 2){ /* layer 1, stereo */		samples_read = read_samples(musicin, insamp, num_samples,					    (unsigned long) 768);		for(j=0;j<448;j++) {		    if(j<64) {			buffer[0][j] = buffer[0][j+384];			buffer[1][j] = buffer[1][j+384];		    }		    else {			buffer[0][j] = insamp[2*j-128];			buffer[1][j] = insamp[2*j-127];		    }		}	    }	    else { /* layer 1, mono */		samples_read = read_samples(musicin, insamp, num_samples,					    (unsigned long) 384);		for(j=0;j<448;j++){		    if(j<64) {			buffer[0][j] = buffer[0][j+384];			buffer[1][j] = 0;		    }		    else {			buffer[0][j] = insamp[j-64];			buffer[1][j] = 0;		    }		}	    }	}	else {	    if(stereo == 2){ /* layer 2 (or 3), stereo */		samples_read = read_samples(musicin, insamp, num_samples,					    (unsigned long) 2304);		for(j=0;j<1152;j++) {		    buffer[0][j] = insamp[2*j];		    buffer[1][j] = insamp[2*j+1];		}	    }	    else { /* layer 2 (or 3), mono */		samples_read = read_samples(musicin, insamp, num_samples,					    (unsigned long) 1152);		for(j=0;j<1152;j++){		    buffer[0][j] = insamp[j];		    buffer[1][j] = 0;		}	    }	}    }    return(samples_read);} /************************************************************************** read_ana_window()** PURPOSE:  Reads encoder window file "enwindow" into array #ana_win#*************************************************************************/ void read_ana_window(ana_win)double FAR ana_win[HAN_SIZE];{    int i,j[4];    FILE *fp;    double f[4];    char t[150];     if (!(fp = OpenTableFile("enwindow") ) ) {       printf("Please check analysis window table 'enwindow'\n");       exit(1);    }    for (i=0;i<512;i+=4) {       fgets(t, 150, fp);       sscanf(t,"C[%d] = %lf C[%d] = %lf C[%d] = %lf C[%d] = %lf\n",              j, f,j+1,f+1,j+2,f+2,j+3,f+3);       if (i==j[0]) {          ana_win[i] = f[0];          ana_win[i+1] = f[1];          ana_win[i+2] = f[2];          ana_win[i+3] = f[3];       }       else {          printf("Check index in analysis window table\n");          exit(1);       }       fgets(t,150,fp);    }    fclose(fp);}/************************************************************************** window_subband()** PURPOSE:  Overlapping window on PCM samples** SEMANTICS:* 32 16-bit pcm samples are scaled to fractional 2's complement and* concatenated to the end of the window buffer #x#. The updated window* buffer #x# is then windowed by the analysis window #c# to produce the* windowed sample #z#*************************************************************************/ void window_subband(buffer, z, k)short FAR **buffer;double FAR z[HAN_SIZE];int k;{    typedef double FAR XX[2][HAN_SIZE];    static XX FAR *x;    int i, j;    static off[2] = {0,0};    static char init = 0;    static double FAR *c;    if (!init) {        c = (double FAR *) mem_alloc(sizeof(double) * HAN_SIZE, "window");        read_ana_window(c);        x = (XX FAR *) mem_alloc(sizeof(XX),"x");        for (i=0;i<2;i++)            for (j=0;j<HAN_SIZE;j++)                (*x)[i][j] = 0;        init = 1;    }    /* replace 32 oldest samples with 32 new samples */    for (i=0;i<32;i++) (*x)[k][31-i+off[k]] = (double) *(*buffer)++/SCALE;    /* shift samples into proper window positions */    for (i=0;i<HAN_SIZE;i++) z[i] = (*x)[k][(i+off[k])&HAN_SIZE-1] * c[i];    off[k] += 480;              /*offset is modulo (HAN_SIZE-1)*/    off[k] &= HAN_SIZE-1;} /************************************************************************** create_ana_filter()** PURPOSE:  Calculates the analysis filter bank coefficients** SEMANTICS:* Calculates the analysis filterbank coefficients and rounds to the* 9th decimal place accuracy of the filterbank tables in the ISO* document.  The coefficients are stored in #filter#************************************************************************/ void create_ana_filter(filter)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av电影一区| bt7086福利一区国产| 日韩精品久久久久久| 亚洲免费视频成人| 亚洲欧美综合色| 国产精品日韩成人| 国产精品美日韩| 国产精品久久久久久妇女6080| 欧美变态tickling挠脚心| 欧美一区二区私人影院日本| 91精品国产综合久久久久久漫画| 欧美日韩一级大片网址| 欧美日韩在线免费视频| 欧美日韩在线播放一区| 欧美高清精品3d| 91精品国产免费| 精品少妇一区二区三区免费观看| 精品粉嫩aⅴ一区二区三区四区| 日韩精品最新网址| 精品国产免费人成在线观看| 久久久91精品国产一区二区三区| 精品久久人人做人人爱| 欧美激情一区在线观看| 一区在线中文字幕| 亚洲麻豆国产自偷在线| 亚洲国产三级在线| 日韩电影在线观看电影| 国产在线视视频有精品| 国产成人午夜视频| 色综合久久久网| 欧美日韩一级视频| 精品国产在天天线2019| 国产欧美日韩激情| 亚洲天堂网中文字| 亚洲国产日韩综合久久精品| 免费观看日韩电影| 国产成人午夜99999| av午夜一区麻豆| 欧美日韩精品一区二区三区| 欧美大片一区二区| 中文字幕亚洲不卡| 视频一区二区国产| 国产精品亚洲综合一区在线观看| 99re成人在线| 91精品国产一区二区三区| 久久九九久精品国产免费直播| 亚洲同性同志一二三专区| 日韩国产欧美一区二区三区| 国产一区二区三区av电影| av男人天堂一区| 日韩一级视频免费观看在线| 欧美国产丝袜视频| 亚洲成人你懂的| 国内成人精品2018免费看| 91丝袜美女网| 欧美成人三级电影在线| 国产精品系列在线| 日韩精品视频网| 成人精品高清在线| 欧美一区二区福利在线| 中文字幕一区二区三区视频| 日韩高清一级片| 91麻豆福利精品推荐| 精品国产乱码91久久久久久网站| 亚洲丝袜精品丝袜在线| 国精产品一区一区三区mba视频| 97久久超碰国产精品| 精品欧美黑人一区二区三区| 亚洲区小说区图片区qvod| 精品综合免费视频观看| 在线观看视频一区| 国产丝袜在线精品| 欧美96一区二区免费视频| 色婷婷亚洲一区二区三区| 久久综合久久综合九色| 天堂久久久久va久久久久| 成年人网站91| 国产午夜精品理论片a级大结局 | 久久精品在线观看| 亚洲国产欧美日韩另类综合| 成人av在线网| 久久中文字幕电影| 蜜乳av一区二区三区| 色婷婷综合久久久久中文一区二区 | 欧美一区二区三区精品| 亚洲欧美视频在线观看| 国产精品亚洲人在线观看| 欧美二区在线观看| 中文字幕永久在线不卡| 国产精品一区二区91| 欧美一区二区三区小说| 亚洲一二三四区不卡| 91色porny| 国产精品卡一卡二| 成人三级伦理片| 国产欧美日韩麻豆91| 国产麻豆午夜三级精品| 欧美一区二区人人喊爽| 天天综合网 天天综合色| 在线观看区一区二| 日韩久久一区二区| 99久久久免费精品国产一区二区| 国产欧美一区二区精品性色超碰| 久久成人av少妇免费| 日韩一区二区在线看片| 日本成人在线网站| 日韩一区二区三区三四区视频在线观看| 视频一区二区不卡| 宅男在线国产精品| 日本亚洲三级在线| 欧美日韩成人高清| 日产国产高清一区二区三区| 欧美精品黑人性xxxx| 日日夜夜精品免费视频| 91精品国产综合久久久久久漫画| 日韩高清国产一区在线| 精品久久久久99| 国产麻豆精品久久一二三| 久久久99免费| 成人精品视频一区二区三区| 国产精品天天看| 91片在线免费观看| 一区二区三区电影在线播| 欧美亚洲综合在线| 日韩精品电影在线| 欧美成人一区二区三区 | 日韩欧美精品三级| 国产最新精品免费| 中文字幕成人在线观看| 99久久精品国产观看| 亚洲精品成人少妇| 91.成人天堂一区| 九九视频精品免费| 中文字幕乱码日本亚洲一区二区| 成人av网址在线观看| 亚洲天堂中文字幕| 欧美一区二区三区在线观看 | 在线播放中文一区| 在线观看区一区二| 亚洲精品欧美激情| 一本到不卡免费一区二区| 一区二区三区精密机械公司| 欧美亚洲免费在线一区| 久久久久久97三级| 亚洲亚洲精品在线观看| 天天操天天色综合| 国产精品久久毛片a| 亚洲午夜三级在线| 欧美日韩免费观看一区二区三区| 国产日韩欧美制服另类| 午夜精品久久久久久久久久| 亚洲成人www| 午夜久久久影院| 久久精品国产99国产精品| 国内久久婷婷综合| 免费观看日韩av| gogo大胆日本视频一区| www.亚洲色图| 欧美日韩一卡二卡三卡| 欧美zozozo| 国产精品伦理在线| 蜜桃视频免费观看一区| 国产精品久久影院| 捆绑变态av一区二区三区| 欧美日韩一二三区| 国产精品亲子乱子伦xxxx裸| 美女一区二区在线观看| 欧美三片在线视频观看| 中文字幕不卡在线观看| 亚洲一二三四区不卡| 日本一不卡视频| 国产不卡免费视频| 欧美性色aⅴ视频一区日韩精品| 26uuu色噜噜精品一区二区| 亚洲国产精品自拍| 国产精品亚洲专一区二区三区 | 欧美大片在线观看| 欧美国产精品专区| 中文字幕二三区不卡| 美腿丝袜亚洲综合| 99精品国产视频| 精品国产伦理网| 亚洲国产精品久久艾草纯爱 | 亚洲人成精品久久久久| 美女一区二区视频| 成人看片黄a免费看在线| 91精品婷婷国产综合久久竹菊| 日韩不卡一二三区| 91精选在线观看| 视频一区二区中文字幕| 欧美日韩一区二区三区在线| 一区二区三区高清不卡| a在线欧美一区| 亚洲天堂a在线| 国产在线精品不卡| 国产日韩欧美麻豆| 色综合中文字幕国产 | 51久久夜色精品国产麻豆| 北条麻妃国产九九精品视频| 精品一区二区三区视频|