亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91精品福利在线一区二区三区| 欧美成人一区二区三区片免费| 日韩精品视频网| 久久久99精品久久| 欧美视频在线播放| 丁香六月综合激情| 日日摸夜夜添夜夜添精品视频| 国产日韩欧美电影| 欧美一区永久视频免费观看| 99久久久国产精品| 国产一区二区三区黄视频 | 午夜欧美大尺度福利影院在线看 | 26uuu欧美| 欧美日韩高清一区二区三区| 懂色av一区二区三区蜜臀| 日韩一区欧美二区| 亚洲黄色av一区| 国产精品免费视频观看| 欧美成人三级在线| 欧美日韩亚洲综合一区二区三区| 成人深夜在线观看| 国内不卡的二区三区中文字幕| 亚洲成人1区2区| 亚洲狼人国产精品| 国产欧美一区二区精品性色| 日韩精品最新网址| 91精品国产综合久久精品| 91福利在线免费观看| 91同城在线观看| 成人高清免费观看| 懂色av中文字幕一区二区三区| 国产一区不卡在线| 国产自产v一区二区三区c| 麻豆精品一区二区综合av| 日韩精品电影一区亚洲| 亚洲国产日日夜夜| 亚洲最大成人综合| 亚洲激情一二三区| 亚洲激情校园春色| 亚洲精品中文在线观看| 亚洲精品老司机| 亚洲在线视频免费观看| 亚洲成人免费电影| 亚洲国产精品人人做人人爽| 亚洲图片一区二区| 天堂va蜜桃一区二区三区漫画版| 亚洲国产精品久久久男人的天堂 | 国产剧情av麻豆香蕉精品| 精品一区在线看| 国产在线精品一区二区三区不卡 | 日韩午夜精品电影| 日韩一区二区电影网| 日韩欧美电影一区| www亚洲一区| 欧美国产97人人爽人人喊| 国产精品毛片a∨一区二区三区| 国产精品网站导航| 亚洲美女少妇撒尿| 亚洲福利视频一区| 老司机精品视频线观看86 | 大陆成人av片| 91麻豆免费观看| 欧美三区免费完整视频在线观看| 欧美日韩国产a| 精品99一区二区| 久久九九久久九九| 亚洲乱码国产乱码精品精的特点| 亚洲国产aⅴ天堂久久| 蜜桃av一区二区三区| 国产一区二区电影| 91久久精品一区二区三区| 91精品婷婷国产综合久久 | 久久综合久久综合久久综合| 日本一二三不卡| 亚洲一二三四在线观看| 免费成人美女在线观看.| 高清免费成人av| 欧美日韩激情一区二区| 精品三级在线看| 中文字幕字幕中文在线中不卡视频| 亚洲高清久久久| 国产成人8x视频一区二区| 色婷婷综合五月| 日韩三级视频在线看| 国产精品久久久久久久久图文区 | 欧美日韩一区二区三区四区五区| 日韩欧美激情四射| 亚洲青青青在线视频| 免费成人美女在线观看.| av不卡一区二区三区| 欧美久久久久久蜜桃| 国产日韩成人精品| 午夜精品国产更新| 成人综合日日夜夜| 91精品欧美综合在线观看最新| 国产精品嫩草久久久久| 蜜臀av一区二区在线观看| av在线播放成人| 精品久久久久久久人人人人传媒 | 欧美精品一区二区三区在线 | 国产欧美日韩中文久久| 亚洲国产另类av| 成人精品在线视频观看| 欧美精品一二三| 亚洲日韩欧美一区二区在线| 国产在线播放一区二区三区| 欧美熟乱第一页| 亚洲色图欧洲色图婷婷| 国产米奇在线777精品观看| 欧美日韩午夜精品| 国产精品对白交换视频 | 久久99日本精品| 欧美体内she精高潮| 亚洲少妇屁股交4| 成人中文字幕在线| 亚洲精品一区二区三区99| 午夜欧美电影在线观看| 色狠狠综合天天综合综合| 国产精品天干天干在观线| 九九国产精品视频| 51精品国自产在线| 亚洲午夜激情av| 在线中文字幕一区二区| 国产精品的网站| 丁香婷婷综合激情五月色| 精品国产百合女同互慰| 蜜桃视频在线观看一区| 欧美日韩不卡在线| 亚洲成人av电影在线| 欧美午夜一区二区三区免费大片| 国产精品久久久久影院亚瑟| 国产精品一区二区视频| 精品对白一区国产伦| 国产自产视频一区二区三区| 精品乱人伦小说| 国内精品视频一区二区三区八戒| 欧美一级专区免费大片| 日韩国产成人精品| 4438x成人网最大色成网站| 日韩电影免费在线看| 欧美精品三级日韩久久| 日韩高清一区二区| 日韩一区二区三区电影在线观看 | 欧美成人福利视频| 麻豆国产精品视频| 久久综合色播五月| 国产精品一区专区| 国产精品私人自拍| 99久久久国产精品免费蜜臀| 亚洲欧美aⅴ...| 在线观看日韩国产| 亚洲成人在线免费| 精品久久人人做人人爱| 精品午夜久久福利影院| 久久久久久免费网| 99国产麻豆精品| 亚洲福利国产精品| 日韩精品一区二区三区在线播放 | 在线电影院国产精品| 美女尤物国产一区| 精品处破学生在线二十三| 成人av资源在线观看| 亚洲欧美激情一区二区| 欧美日韩一区二区在线观看视频| 日本v片在线高清不卡在线观看| 精品国产精品一区二区夜夜嗨| 成人午夜免费av| 亚洲激情图片qvod| 日韩美女一区二区三区| 成人午夜免费av| 亚洲va韩国va欧美va| 国产性天天综合网| 91视频免费观看| 热久久国产精品| 日本一区二区成人| 欧美日韩国产综合一区二区三区| 麻豆精品在线看| 一区二区三区日韩欧美| 国内精品久久久久影院色| 久久嫩草精品久久久久| 亚洲va在线va天堂| 精品三级在线观看| 一本高清dvd不卡在线观看| 日韩中文字幕av电影| 国产激情精品久久久第一区二区| 国产区在线观看成人精品| 91蜜桃传媒精品久久久一区二区| 婷婷成人综合网| 中文字幕欧美国产| 欧美丰满一区二区免费视频| 国产在线不卡一卡二卡三卡四卡| 一区二区三区四区国产精品| 精品粉嫩超白一线天av| 欧美午夜精品一区二区蜜桃| 国产成人免费视频一区| 水野朝阳av一区二区三区| 国产精品美女视频| 欧美精品一区二区三区一线天视频 | 欧美日韩精品系列| 91在线你懂得|