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

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

?? lame.c

?? MP3編碼程序和資料
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* *	LAME MP3 encoding engine * *	Copyright (c) 1999 Mark Taylor * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <assert.h>#include "gtkanal.h"#include "lame.h"#include "util.h"#include "timestatus.h"#include "psymodel.h"#include "newmdct.h"#include "quantize.h"#include "quantize-pvt.h"#include "bitstream.h"#include "version.h"#include "VbrTag.h"#include "id3tag.h"#include "tables.h"#include "brhist.h"#include "get_audio.h"#ifdef __riscos__#include "asmstuff.h"#endif/******************************************************************** *   initialize internal params based on data in gf *   (globalflags struct filled in by calling program) * ********************************************************************/int lame_init_params(lame_global_flags *gfp){  int i;  lame_internal_flags *gfc=gfp->internal_flags;  gfc->lame_init_params_init=1;  memset(&gfc->bs, 0, sizeof(Bit_stream_struc));  memset(&gfc->l3_side,0x00,sizeof(III_side_info_t));  memset((char *) gfc->mfbuf, 0, sizeof(short)*2*MFSIZE);  /* The reason for   *       int mf_samples_to_encode = ENCDELAY + 288;   * ENCDELAY = internal encoder delay.  And then we have to add 288   * because of the 50% MDCT overlap.  A 576 MDCT granule decodes to   * 1152 samples.  To synthesize the 576 samples centered under this granule   * we need the previous granule for the first 288 samples (no problem), and   * the next granule for the next 288 samples (not possible if this is last   * granule).  So we need to pad with 288 samples to make sure we can   * encode the 576 samples we are interested in.   */  gfc->mf_samples_to_encode = ENCDELAY+288;  gfc->mf_size=ENCDELAY-MDCTDELAY;  /* we pad input with this many 0's */  gfp->frameNum=0;  if (gfp->num_channels==1) {    gfp->mode = MPG_MD_MONO;  }  gfc->stereo=2;  if (gfp->mode == MPG_MD_MONO) gfc->stereo=1;  if (gfp->silent) {   gfp->brhist_disp=0;  /* turn of VBR historgram */  }  if (gfp->VBR==vbr_off) {    gfp->brhist_disp=0;  /* turn of VBR historgram */  }  if (gfp->VBR!=vbr_off) {    gfp->free_format=0;  /* VBR cant mix with free format */  }  if (gfp->VBR==vbr_off && gfp->brate==0) {    /* no bitrate or compression ratio specified, use 11 */    if (gfp->compression_ratio==0) gfp->compression_ratio=11;  }  /* find bitrate if user specify a compression ratio */  if (gfp->VBR==vbr_off && gfp->compression_ratio > 0) {        if (gfp->out_samplerate==0)       gfp->out_samplerate=validSamplerate(gfp->in_samplerate);           /* choose a bitrate for the output samplerate which achieves     * specifed compression ratio      */    gfp->brate =       gfp->out_samplerate*16*gfc->stereo/(1000.0*gfp->compression_ratio);    /* we need the version for the bitrate table look up */    gfc->samplerate_index = SmpFrqIndex((long)gfp->out_samplerate, &gfp->version);    /* find the nearest allowed bitrate */    if (!gfp->free_format)      gfp->brate = FindNearestBitrate(gfp->brate,gfp->version,gfp->out_samplerate);  }  if (gfp->brate >= 320) gfp->VBR=vbr_off;  /* dont bother with VBR at 320kbs */  /* set the output sampling rate, and resample options if necessary     samplerate = input sample rate     resamplerate = ouput sample rate  */  if (gfp->out_samplerate==0) {    /* user did not specify output sample rate */    gfp->out_samplerate=gfp->in_samplerate;   /* default */    /* if resamplerate is not valid, find a valid value */    gfp->out_samplerate = validSamplerate(gfp->out_samplerate);    if (gfp->VBR==vbr_off && gfp->brate>0) {      /* check if user specified bitrate requires downsampling */      gfp->compression_ratio = gfp->out_samplerate*16*gfc->stereo/(1000.0*gfp->brate);      if (gfp->compression_ratio > 13 ) {	/* automatic downsample, if possible */	gfp->out_samplerate = validSamplerate((10*1000L*gfp->brate)/(16*gfc->stereo));      }    }    if (gfp->VBR==vbr_abr) {      /* check if user specified bitrate requires downsampling */      gfp->compression_ratio = gfp->out_samplerate*16*gfc->stereo/(1000.0*gfp->VBR_mean_bitrate_kbps);      if (gfp->compression_ratio > 13 ) {	/* automatic downsample, if possible */	gfp->out_samplerate = validSamplerate((10*1000L*gfp->VBR_mean_bitrate_kbps)/(16*gfc->stereo));      }    }  }  gfc->mode_gr = (gfp->out_samplerate <= 24000) ? 1 : 2;  /* mode_gr = 2 */  gfp->encoder_delay = ENCDELAY;  gfp->framesize = gfc->mode_gr*576;  if (gfp->ogg) gfp->framesize = 1024;  gfc->resample_ratio=1;  if (gfp->out_samplerate != gfp->in_samplerate)         gfc->resample_ratio = (FLOAT)gfp->in_samplerate/(FLOAT)gfp->out_samplerate;  /* estimate total frames.  must be done after setting sampling rate so   * we know the framesize.  */  gfp->totalframes=0;  gfp->totalframes = 2+ gfp->num_samples/(gfc->resample_ratio*gfp->framesize);  /* 44.1kHz at 56kbs/channel: compression factor of 12.6     44.1kHz at 64kbs/channel: compression factor of 11.025     44.1kHz at 80kbs/channel: compression factor of 8.82     22.05kHz at 24kbs:  14.7     22.05kHz at 32kbs:  11.025     22.05kHz at 40kbs:  8.82     16kHz at 16kbs:  16.0     16kHz at 24kbs:  10.7     compression_ratio        11                                .70?        12                   sox resample .66        14.7                 sox resample .45  */  /* for VBR, take a guess at the compression_ratio. for example: */  /* VBR_q           compression       like                      4.4             320kbs/41khz     0-1              5.5             256kbs/41khz     2                7.3             192kbs/41khz     4                8.8             160kbs/41khz     6                11              128kbs/41khz     9                14.7             96kbs     for lower bitrates, downsample with --resample  */  if (gfp->VBR==vbr_mt || gfp->VBR==vbr_rh) {    gfp->compression_ratio = 5.0 + gfp->VBR_q;  }else  if (gfp->VBR==vbr_abr) {    gfp->compression_ratio = gfp->out_samplerate*16*gfc->stereo/(1000.0*gfp->VBR_mean_bitrate_kbps);  }else{    gfp->compression_ratio = gfp->out_samplerate*16*gfc->stereo/(1000.0*gfp->brate);  }  /* At higher quality (lower compression) use STEREO instead of JSTEREO.   * (unless the user explicitly specified a mode ) */  if ( (!gfp->mode_fixed) && (gfp->mode !=MPG_MD_MONO)) {    if (gfp->compression_ratio < 9 ) {      gfp->mode = MPG_MD_STEREO;    }  }  /****************************************************************/  /* if a filter has not been enabled, see if we should add one: */  /****************************************************************/  if (gfp->lowpassfreq == 0) {    /* If the user has not selected their own filter, add a lowpass     * filter based on the compression ratio.  Formula based on          44.1   /160    4.4x          44.1   /128    5.5x      keep all bands          44.1   /96kbs  7.3x      keep band 28          44.1   /80kbs  8.8x      keep band 25          44.1khz/64kbs  11x       keep band 21  22?	  16khz/24kbs  10.7x       keep band 21	  22kHz/32kbs  11x         keep band ?	  22kHz/24kbs  14.7x       keep band 16          16    16     16x         keep band 14    */    /* Should we use some lowpass filters? */    int band = 1+floor(.5 + 14-18*log(gfp->compression_ratio/16.0));    if (gfc->resample_ratio != 1) {      /* resampling.  if we are resampling, add lowpass at least 90% */      band = Min(band,29);    }    if (band < 31) {      gfc->lowpass1 = band/31.0;      gfc->lowpass2 = band/31.0;    }  }  /****************************************************************/  /* apply user driven filters*/  /****************************************************************/  if ( gfp->highpassfreq > 0 ) {    gfc->highpass1 = 2.0*gfp->highpassfreq/gfp->out_samplerate; /* will always be >=0 */    if ( gfp->highpasswidth >= 0 ) {      gfc->highpass2 = 2.0*(gfp->highpassfreq+gfp->highpasswidth)/gfp->out_samplerate;    } else {      /* 15% above on default */      /* gfc->highpass2 = 1.15*2.0*gfp->highpassfreq/gfp->out_samplerate;  */      gfc->highpass2 = 1.00*2.0*gfp->highpassfreq/gfp->out_samplerate;     }  }  if ( gfp->lowpassfreq > 0 ) {    gfc->lowpass2 = 2.0*gfp->lowpassfreq/gfp->out_samplerate; /* will always be >=0 */    if ( gfp->lowpasswidth >= 0 ) {      gfc->lowpass1 = 2.0*(gfp->lowpassfreq-gfp->lowpasswidth)/gfp->out_samplerate;      if ( gfc->lowpass1 < 0 ) { /* has to be >= 0 */	gfc->lowpass1 = 0;      }    } else {      /* 15% below on default */      /* gfc->lowpass1 = 0.85*2.0*gfp->lowpassfreq/gfp->out_samplerate;  */      gfc->lowpass1 = 1.00*2.0*gfp->lowpassfreq/gfp->out_samplerate;    }  }  /***************************************************************/  /* compute info needed for polyphase filter (filter type==0, default)   */  /***************************************************************/  {    int band,maxband,minband;    FLOAT8 freq;    if (gfc->lowpass1 > 0) {      minband=999;      maxband=-1;      for (band=0;  band <=31 ; ++band) { 	freq = band/31.0;	gfc->amp_lowpass[band] = 1;	/* this band and above will be zeroed: */	if (freq >= gfc->lowpass2) {	  gfc->lowpass_band= Min(gfc->lowpass_band,band);	  gfc->amp_lowpass[band]=0;	}	if (gfc->lowpass1 < freq && freq < gfc->lowpass2) {          minband = Min(minband,band);          maxband = Max(maxband,band);	  gfc->amp_lowpass[band] = cos((PI/2)*(gfc->lowpass1-freq)/(gfc->lowpass2-gfc->lowpass1));	}	/*	DEBUGF("lowpass band=%i  amp=%f \n",band,gfc->amp_lowpass[band]);	*/      }      /* compute the *actual* transition band implemented by the polyphase filter */      if (minband==999) gfc->lowpass1 = (gfc->lowpass_band-.75)/31.0;      else gfc->lowpass1 = (minband-.75)/31.0;      gfc->lowpass2 = gfc->lowpass_band/31.0;            gfc->lowpass_start_band = minband;      gfc->lowpass_end_band   = maxband;            /* as the lowpass may have changed above       * calculate the amplification here again       */      for (band=minband;  band <=maxband; ++band) { 	freq = band/31.0;	gfc->amp_lowpass[band] = cos((PI/2)*(gfc->lowpass1-freq)/(gfc->lowpass2-gfc->lowpass1));      }    } else {      gfc->lowpass_start_band = 0;      gfc->lowpass_end_band   = -1;  /* do not to run into for-loops */    }    /* make sure highpass filter is within 90% of what the effective highpass     * frequency will be */    if (gfc->highpass2 > 0)       if (gfc->highpass2 <  .9*(.75/31.0) ) {	gfc->highpass1=0; gfc->highpass2=0;	MSGF("Warning: highpass filter disabled.  highpass frequency to small\n");      }        if (gfc->highpass2 > 0) {      minband=999;      maxband=-1;      for (band=0;  band <=31; ++band) { 	freq = band/31.0;	gfc->amp_highpass[band] = 1;	/* this band and below will be zereod */	if (freq <= gfc->highpass1) {	  gfc->highpass_band = Max(gfc->highpass_band,band);	  gfc->amp_highpass[band]=0;	}	if (gfc->highpass1 < freq && freq < gfc->highpass2) {          minband = Min(minband,band);          maxband = Max(maxband,band);	  gfc->amp_highpass[band] = cos((PI/2)*(gfc->highpass2-freq)/(gfc->highpass2-gfc->highpass1));	}	/*		DEBUGF("highpass band=%i  amp=%f \n",band,gfc->amp_highpass[band]);	*/      }      /* compute the *actual* transition band implemented by the polyphase filter */      gfc->highpass1 = gfc->highpass_band/31.0;      if (maxband==-1) gfc->highpass2 = (gfc->highpass_band+.75)/31.0;      else gfc->highpass2 = (maxband+.75)/31.0;            gfc->highpass_start_band = minband;      gfc->highpass_end_band   = maxband;      /* as the highpass may have changed above       * calculate the amplification here again       */      for (band=minband;  band <=maxband; ++band) { 	freq = band/31.0;	gfc->amp_highpass[band] = cos((PI/2)*(gfc->highpass2-freq)/(gfc->highpass2-gfc->highpass1));      }    } else {      gfc->highpass_start_band = 0;      gfc->highpass_end_band   = -1;  /* do not to run into for-loops */    }    /*    DEBUGF("lowpass band with amp=0:  %i \n",gfc->lowpass_band);    DEBUGF("highpass band with amp=0:  %i \n",gfc->highpass_band);    DEBUGF("lowpass band start:  %i \n",gfc->lowpass_start_band);    DEBUGF("lowpass band end:    %i \n",gfc->lowpass_end_band);    DEBUGF("highpass band start:  %i \n",gfc->highpass_start_band);    DEBUGF("highpass band end:    %i \n",gfc->highpass_end_band);    */  }  /***************************************************************/  /* compute info needed for FIR filter (filter_type==1) */  /***************************************************************/  gfc->mode_ext=MPG_MD_LR_LR;  gfc->stereo = (gfp->mode == MPG_MD_MONO) ? 1 : 2;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜嗨av一区二区三区四季av| 欧美亚洲免费在线一区| 麻豆精品视频在线| 亚洲不卡av一区二区三区| 亚洲欧美视频在线观看视频| 国产精品国产自产拍在线| 国产欧美日韩一区二区三区在线观看| 日韩一级片在线播放| 欧美疯狂做受xxxx富婆| 欧美精品三级日韩久久| 欧美区视频在线观看| 国产成人精品www牛牛影视| 亚洲美女少妇撒尿| 一区二区三区四区高清精品免费观看 | 天天色天天爱天天射综合| 一区二区三区在线视频观看58| 亚洲美女精品一区| 天堂成人免费av电影一区| 久久草av在线| 色天天综合色天天久久| 欧美日韩高清一区| 亚洲精品一区二区三区香蕉| 日韩精品在线网站| 日韩欧美三级在线| 精品国产一区二区在线观看| www国产精品av| 亚洲福利视频一区二区| 国产一区二区三区蝌蚪| 欧美日韩精品一区二区三区四区| 337p粉嫩大胆噜噜噜噜噜91av| 欧美国产一区二区| 日本不卡不码高清免费观看| 美女高潮久久久| 欧美亚州韩日在线看免费版国语版| 欧美一区二区三区免费| 一区二区中文视频| 成人性生交大片| 91精品国产麻豆国产自产在线 | 国产一区在线观看麻豆| 欧美日韩国产区一| 亚洲美女免费视频| 成人av在线资源网站| 精品日韩一区二区| 亚洲一区二区三区四区不卡| 成人福利视频在线| 国产三级精品三级| 精品在线亚洲视频| 日韩免费视频线观看| 蜜臀av在线播放一区二区三区| 国产高清不卡一区| 国产日韩av一区二区| 国产精品白丝jk白祙喷水网站| 2欧美一区二区三区在线观看视频| 性感美女久久精品| 91精品免费观看| 久久精品72免费观看| 国产校园另类小说区| av电影天堂一区二区在线观看| 欧美激情一区二区三区不卡 | 91麻豆免费观看| 一区二区三区在线视频观看| 欧美图区在线视频| 韩国女主播成人在线| 综合久久一区二区三区| 在线观看国产91| 九一久久久久久| 精品少妇一区二区三区在线视频| 国产一区二区精品久久91| 国产精品久久久久一区二区三区共| 国产风韵犹存在线视精品| 国产色产综合产在线视频| 国产精品一二三四区| 日本一区二区三区久久久久久久久不| 高清视频一区二区| 亚洲福利电影网| 国产精品久久久久aaaa樱花| 日韩情涩欧美日韩视频| 在线精品亚洲一区二区不卡| 激情图区综合网| 亚洲mv在线观看| 国产日韩欧美高清在线| 欧美日韩综合一区| 在线观看成人小视频| 色偷偷88欧美精品久久久| 国产乱子伦视频一区二区三区 | 1024成人网| 国产精品丝袜一区| 日韩一区二区三区电影| 欧美日韩国产bt| 色视频成人在线观看免| 99re亚洲国产精品| 国产精品一区二区在线播放| 最新不卡av在线| 一色屋精品亚洲香蕉网站| 欧美亚洲图片小说| 欧美色倩网站大全免费| 在线视频一区二区免费| 欧美视频一区二区在线观看| 欧美亚洲国产一卡| 欧美另类变人与禽xxxxx| 欧美三级资源在线| 日韩欧美专区在线| 国产色综合一区| 久久久久久99精品| 国产精品久久国产精麻豆99网站 | 日韩一区二区麻豆国产| 日韩欧美第一区| 精品国产亚洲在线| 久久精品人人做人人爽人人| 亚洲欧美一区二区久久| 亚洲国产一二三| 久久精品国产在热久久| 九九在线精品视频| 91香蕉视频在线| 日韩亚洲欧美综合| 精品福利一区二区三区| 欧美激情一区二区三区| 亚洲电影一级黄| 久久爱另类一区二区小说| 成人h动漫精品一区二| 日韩欧美在线观看一区二区三区| 久久精品夜色噜噜亚洲a∨| 国产精品卡一卡二卡三| 视频在线观看91| 国产美女一区二区| 欧美高清视频不卡网| 亚洲精品一二三| 粉嫩绯色av一区二区在线观看| 6080日韩午夜伦伦午夜伦| 国产欧美日韩中文久久| 亚洲国产一区在线观看| 97久久精品人人做人人爽| 中文字幕国产精品一区二区| 看电视剧不卡顿的网站| 欧美日精品一区视频| 中文字幕国产精品一区二区| 亚洲国产裸拍裸体视频在线观看乱了| 狠狠色2019综合网| 欧美一区二区三区系列电影| 亚洲最新在线观看| 色狠狠色噜噜噜综合网| 亚洲欧洲成人精品av97| 91麻豆免费在线观看| 亚洲欧美偷拍另类a∨色屁股| 精品亚洲成a人| 欧美欧美欧美欧美| 久久99精品久久久久久久久久久久| 欧美疯狂性受xxxxx喷水图片| 午夜精品福利一区二区三区av| 97久久超碰国产精品电影| 亚洲视频电影在线| 欧美日韩电影一区| 久久国产欧美日韩精品| 亚洲国产精品精华液2区45| 风间由美一区二区三区在线观看 | 国产精品18久久久久久久网站| 久久久精品2019中文字幕之3| 成人看片黄a免费看在线| 一区二区三区 在线观看视频| 日韩午夜三级在线| 国产高清不卡一区| 丝袜亚洲另类欧美综合| 欧美高清激情brazzers| 国产69精品一区二区亚洲孕妇| 无吗不卡中文字幕| 欧美激情综合在线| 欧美—级在线免费片| 欧美一级在线免费| 国产一区二区三区高清播放| 日日夜夜精品视频天天综合网| 亚洲精品自拍动漫在线| 亚洲三级在线播放| 亚洲视频免费在线| 久久亚洲欧美国产精品乐播| 久久理论电影网| 欧美精品一区二区蜜臀亚洲| 日韩欧美国产麻豆| 欧美激情一二三区| 亚洲色图.com| 自拍偷自拍亚洲精品播放| 亚洲色图丝袜美腿| 日本强好片久久久久久aaa| 麻豆精品一区二区三区| 精品写真视频在线观看| 国产精品69毛片高清亚洲| 一本到一区二区三区| 欧美中文字幕一区| 日韩一级二级三级精品视频| 国产欧美精品国产国产专区| 亚洲天堂网中文字| 久久99国产精品麻豆| 国产成人综合在线| 欧美精品精品一区| 国产精品三级av在线播放| 亚洲最大色网站| 国产成人精品综合在线观看| 在线看国产一区二区| 中文字幕免费一区| 麻豆91在线看| 欧美性猛片aaaaaaa做受|