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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? subband_layer_2.cc

?? ac3的解碼程序
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/*   File: subband_layer_2.cc*/#include <stdio.h>#include <stdlib.h>#include <fstream.h>#ifdef IRIX#include <dmedia/audio.h>#endif#ifdef SOLARIS#include <sys/audioio.h>#endif#include "athread.hh"#include "error.hh"#include "debug.hh"#include "util.hh"#include "sync.hh"#include "mpeg2const.hh"#include "mpeg2buff.hh"#include "astream.hh"#include "crc.hh"#include "header.hh"#include "obuffer.hh"#include "synthesis_filter.hh"#include "subband.hh"#include "subband_layer_1.hh"#include "subband_layer_2.hh"#include "scalefactors.hh"// data taken from ISO/IEC DIS 11172, Annexes 3-B.2[abcd] and 3-B.4:// subbands 0-2 in tables 3-B.2a and 2b: (index is allocation)static const uint32 table_ab1_codelength[16] =  // bits per codeword{ 0, 5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };static const uint32 table_ab1_quantizationsteps[16] =  // number of steps if grouped, 0 if ungrouped{ 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };static const real table_ab1_factor[16] =  // factor for requantization: (real)sample * factor - 1.0 gives requantized sample{ 0.0, 1.0/2.0, 1.0/4.0, 1.0/8.0, 1.0/16.0, 1.0/32.0, 1.0/64.0,  1.0/128.0, 1.0/256.0, 1.0/512.0, 1.0/1024.0, 1.0/2048.0,  1.0/4096.0, 1.0/8192.0, 1.0/16384.0, 1.0/32768.0 };static const real table_ab1_c[16] =  // factor c for requantization from table 3-B.4{ 0.0,           1.33333333333, 1.14285714286, 1.06666666666, 1.03225806452,  1.01587301587, 1.00787401575, 1.00392156863, 1.00195694716, 1.00097751711,  1.00048851979, 1.00024420024, 1.00012208522, 1.00006103888, 1.00003051851,  1.00001525902 };static const real table_ab1_d[16] =  // addend d for requantization from table 3-B.4{ 0.0,           0.50000000000, 0.25000000000, 0.12500000000, 0.06250000000,  0.03125000000, 0.01562500000, 0.00781250000, 0.00390625000, 0.00195312500,  0.00097656250, 0.00048828125, 0.00024414063, 0.00012207031, 0.00006103516,  0.00003051758 };// subbands 3-... tables 3-B.2a and 2b:static const uint32 table_ab234_quantizationsteps[16] ={ 0, 3, 5, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };// subbands 3-10 in tables 3-B.2a and 2b:static const uint32 table_ab2_codelength[16] ={ 0, 5, 7, 3, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 };static const real table_ab2_factor[16] ={ 0.0, 1.0/2.0, 1.0/4.0, 1.0/4.0, 1.0/8.0, 1.0/8.0, 1.0/16.0,  1.0/32.0, 1.0/64.0, 1.0/128.0, 1.0/256.0, 1.0/512.0,  1.0/1024.0, 1.0/2048.0, 1.0/4096.0, 1.0/32768.0 };static const real table_ab2_c[16] ={ 0.0,           1.33333333333, 1.60000000000, 1.14285714286, 1.77777777777,  1.06666666666, 1.03225806452, 1.01587301587, 1.00787401575, 1.00392156863,  1.00195694716, 1.00097751711, 1.00048851979, 1.00024420024, 1.00012208522,  1.00001525902 };static const real table_ab2_d[16] ={ 0.0,           0.50000000000, 0.50000000000, 0.25000000000, 0.50000000000,  0.12500000000, 0.06250000000, 0.03125000000, 0.01562500000, 0.00781250000,  0.00390625000, 0.00195312500, 0.00097656250, 0.00048828125, 0.00024414063,  0.00003051758 };// subbands 11-22 in tables 3-B.2a and 2b:static const uint32 table_ab3_codelength[8] = { 0, 5, 7, 3, 10, 4, 5, 16 };static const real table_ab3_factor[8] ={ 0.0, 1.0/2.0, 1.0/4.0, 1.0/4.0, 1.0/8.0, 1.0/8.0, 1.0/16.0, 1.0/32768.0 };static const real table_ab3_c[8] ={ 0.0,           1.33333333333, 1.60000000000, 1.14285714286, 1.77777777777,  1.06666666666, 1.03225806452, 1.00001525902 };static const real table_ab3_d[8] ={ 0.0,           0.50000000000, 0.50000000000, 0.25000000000, 0.50000000000,  0.12500000000, 0.06250000000, 0.00003051758 };// subbands 23-... in tables 3-B.2a and 2b:static const uint32 table_ab4_codelength[4] = { 0, 5, 7, 16 };static const real table_ab4_factor[8] = { 0.0, 1.0/2.0, 1.0/4.0, 1.0/32768.0 };static const real table_ab4_c[4] = { 0.0, 1.33333333333, 1.60000000000, 1.00001525902 };static const real table_ab4_d[4] = { 0.0, 0.50000000000, 0.50000000000, 0.00003051758 };// subbands in tables 3-B.2c and 2d:static const uint32 table_cd_codelength[16] ={ 0, 5, 7, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };static const uint32 table_cd_quantizationsteps[16] ={ 0, 3, 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };static const real table_cd_factor[16] ={ 0.0, 1.0/2.0, 1.0/4.0, 1.0/8.0, 1.0/8.0, 1.0/16.0, 1.0/32.0, 1.0/64.0,  1.0/128.0, 1.0/256.0, 1.0/512.0, 1.0/1024.0, 1.0/2048.0, 1.0/4096.0,  1.0/8192.0, 1.0/16384.0 };static const real table_cd_c[16] ={ 0.0,           1.33333333333, 1.60000000000, 1.77777777777, 1.06666666666,  1.03225806452, 1.01587301587, 1.00787401575, 1.00392156863, 1.00195694716,  1.00097751711, 1.00048851979, 1.00024420024, 1.00012208522, 1.00006103888,  1.00003051851 };static const real table_cd_d[16] ={ 0.0,           0.50000000000, 0.50000000000, 0.50000000000, 0.12500000000,  0.06250000000, 0.03125000000, 0.01562500000, 0.00781250000, 0.00390625000,  0.00195312500, 0.00097656250, 0.00048828125, 0.00024414063, 0.00012207031,  0.00006103516 };/**********************/	// used for single channel mode/*** Standard Class ***/	// and in derived class for intensity/**********************/	// stereo modeSubbandLayer2::SubbandLayer2(uint32 subbandnumber){  this->subbandnumber=subbandnumber;  groupnumber=samplenumber=0;}uint32 SubbandLayer2::get_allocationlength (Header *header){  uint32 channel_bitrate = header->bitrate_index ();  // calculate bitrate per channel:  if (header->mode () != single_channel)    if (channel_bitrate == 4)      channel_bitrate = 1;    else      channel_bitrate -= 4;  if (channel_bitrate == 1 || channel_bitrate == 2)    // table 3-B.2c or 3-B.2d    if (subbandnumber <= 1)      return 4;    else      return 3;  else    // tables 3-B.2a or 3-B.2b    if (subbandnumber <= 10)      return 4;    else if (subbandnumber <= 22)      return 3;    else      return 2;}uint32 SubbandLayer2::prepare_sample_reading(Header *header, uint32 allocation, bool *grouping,	 uint32 *quantizationsteps, real *factor, uint32 *codelength, real *c, real *d){  uint32 channel_bitrate = header->bitrate_index ();  // calculate bitrate per channel:  if (header->mode () != single_channel)    if (channel_bitrate == 4)  channel_bitrate = 1;    else                       channel_bitrate -= 4;  *grouping = False;  if (channel_bitrate == 1 || channel_bitrate == 2){    // table 3-B.2c or 3-B.2d    if ((*quantizationsteps=table_cd_quantizationsteps[allocation])!=0)      *grouping=True;    *factor=table_cd_factor[allocation];    *codelength=table_cd_codelength[allocation];    *c=table_cd_c[allocation];    *d=table_cd_d[allocation];  }  else {    // tables 3-B.2a or 3-B.2b    if (subbandnumber <= 2){      if ((*quantizationsteps=table_ab1_quantizationsteps[allocation])!=0)        *grouping = True;      *factor = table_ab1_factor[allocation];      *codelength = table_ab1_codelength[allocation];      *c = table_ab1_c[allocation];      *d = table_ab1_d[allocation];    }    else {      if ((*quantizationsteps=table_ab234_quantizationsteps[allocation])!=0)        *grouping = True;      if (subbandnumber <= 10){        *factor = table_ab2_factor[allocation];        *codelength = table_ab2_codelength[allocation];        *c = table_ab2_c[allocation];        *d = table_ab2_d[allocation];      }      else if (subbandnumber <= 22){        *factor = table_ab3_factor[allocation];        *codelength = table_ab3_codelength[allocation];        *c = table_ab3_c[allocation];        *d = table_ab3_d[allocation];      }      else {        *factor = table_ab4_factor[allocation];        *codelength = table_ab4_codelength[allocation];        *c = table_ab4_c[allocation];        *d = table_ab4_d[allocation];      }    }  }    return channel_bitrate;}void SubbandLayer2::read_allocation(AudioStream *stream, Header *header, Crc16 *crc){  register uint32 length = get_allocationlength (header);  allocation = stream->get_bits (length);  if (crc)    crc->add_bits (allocation, length);}void SubbandLayer2::read_scalefactor_selection(AudioStream *stream, Crc16 *crc){  if (allocation){    scfsi = stream->get_bits (2);    if (crc) crc->add_bits (scfsi, 2);  }}void SubbandLayer2::read_scalefactor(AudioStream *stream, Header *header){  if (allocation){    switch (scfsi){      case 0:	scalefactor1 = stream->get_bits (6);	scalefactor2 = stream->get_bits (6);	scalefactor3 = stream->get_bits (6);	break;      case 1:	scalefactor1 = scalefactor2 = stream->get_bits (6);	scalefactor3 = stream->get_bits (6);	break;      case 2:	scalefactor1 = scalefactor2 = scalefactor3 = stream->get_bits (6);	break;      case 3:	scalefactor1 = stream->get_bits (6);	scalefactor2 = scalefactor3 = stream->get_bits (6);	break;    }    if (scalefactor1 == 63 || scalefactor2 == 63 || scalefactor3 == 63)      cerr << "WARNING: stream contains an illegal scalefactor!\n";	// MPEG-stream is corrupted!    prepare_sample_reading (header, allocation, &grouping, &quantizationsteps,			    &factor, &codelength, &c, &d);  }}bool SubbandLayer2::read_sampledata(AudioStream *stream){  if (allocation)    if (grouping){      uint32 samplecode = stream->get_bits (codelength);#ifdef DEBUG      if (samplecode == (1 << codelength) - 1)        cerr << "WARNING: stream contains an illegal subband sample!\n";  // MPEG-stream is corrupted!#endif      samples[0] = real (samplecode % quantizationsteps) * factor - 1.0;      samplecode /= quantizationsteps;      samples[1] = real (samplecode % quantizationsteps) * factor - 1.0;      samplecode /= quantizationsteps;      samples[2] = real (samplecode % quantizationsteps) * factor - 1.0;    }    else {      samples[0] = real (stream->get_bits (codelength)) * factor - 1.0;#ifdef DEBUG      if (samples[0] == (1 << codelength) - 1)        cerr << "WARNING: stream contains an illegal subband sample!\n";  // MPEG-stream is corrupted!#endif      samples[1] = real (stream->get_bits (codelength)) * factor - 1.0;#ifdef DEBUG      if (samples[1] == (1 << codelength) - 1)        cerr << "WARNING: stream contains an illegal subband sample!\n";  // MPEG-stream is corrupted!#endif      samples[2] = real (stream->get_bits (codelength)) * factor - 1.0;#ifdef DEBUG      if (samples[2] == (1 << codelength) - 1)        cerr << "WARNING: stream contains an illegal subband sample!\n";  // MPEG-stream is corrupted!#endif    }  samplenumber = 0;  return (++groupnumber == 12) ? True : False;}bool SubbandLayer2::put_next_sample(e_channels channels,				     SynthesisFilter *filter1, SynthesisFilter*){

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产乱子伦| 亚洲mv在线观看| 精品精品国产高清a毛片牛牛 | 日韩女优制服丝袜电影| 国产九色精品成人porny| 热久久一区二区| 亚洲aaa精品| 青青草一区二区三区| 午夜成人在线视频| 丝袜脚交一区二区| 一区二区三区免费网站| 一区二区三区在线观看网站| 国产精品久久毛片av大全日韩| 国产亚洲欧美中文| 久久久高清一区二区三区| 91精品国产入口在线| 欧美日韩高清一区二区三区| 国产一区二区视频在线| 成人激情免费网站| 国产麻豆视频精品| 97久久精品人人做人人爽| 懂色av噜噜一区二区三区av| 99久久精品免费看国产| 色婷婷综合激情| 91老司机福利 在线| 成人综合婷婷国产精品久久免费| 国产剧情一区在线| 欧美性感一区二区三区| 欧美精品一区二区三区久久久| 国产精品网曝门| 国产精品久久夜| 亚洲第一福利一区| 国产高清久久久久| 91蜜桃传媒精品久久久一区二区| 国产老女人精品毛片久久| 欧美午夜精品一区二区蜜桃| 日韩免费视频一区| 国内精品国产成人国产三级粉色 | 国产一区视频网站| 欧美日韩国产大片| 一区二区三区日韩欧美| 亚洲欧美日韩久久| 国产一区二区三区久久久| 一本大道久久a久久综合婷婷| 欧美美女直播网站| 香蕉加勒比综合久久| 成人sese在线| 日本一区二区三区电影| 久久se精品一区精品二区| 欧美专区日韩专区| 一区二区免费在线播放| 99精品偷自拍| 国产性天天综合网| 日本不卡一区二区| 欧美日韩国产不卡| 国产精品综合一区二区三区| 精品污污网站免费看| 亚洲综合视频在线观看| 成人av电影观看| 玉足女爽爽91| 色狠狠综合天天综合综合| 亚洲欧美色综合| 在线这里只有精品| 亚洲线精品一区二区三区八戒| 欧美精品在线观看一区二区| 国产精品1024| 午夜精品久久一牛影视| 国产精品私人自拍| 91精品国产乱码| 丁香啪啪综合成人亚洲小说| 日韩电影一区二区三区四区| 久久午夜老司机| 欧美三级日本三级少妇99| 免费三级欧美电影| 亚洲制服丝袜在线| 久久无码av三级| 欧美美女bb生活片| 色婷婷久久久亚洲一区二区三区| 国产毛片精品视频| 国产九色sp调教91| 激情六月婷婷久久| 日韩av成人高清| 亚洲成人福利片| 性感美女极品91精品| 亚洲免费在线播放| 亚洲日本丝袜连裤袜办公室| 久久色视频免费观看| 成人在线一区二区三区| 国产传媒一区在线| 成人免费毛片a| 99精品在线观看视频| 91香蕉视频在线| 欧美日韩在线播放一区| 欧美日产国产精品| 欧美大片一区二区三区| 日韩午夜精品电影| 国产精品毛片无遮挡高清| 综合电影一区二区三区 | 久久丝袜美腿综合| 国产伦精品一区二区三区视频青涩 | 一区二区三区四区不卡视频| 中文字幕亚洲视频| 亚洲精品免费在线播放| 久久精品国产秦先生| 国产经典欧美精品| av在线不卡免费看| 欧美精品一二三| 欧美精品一区二区久久婷婷 | 欧美日韩日日摸| 日韩一区二区影院| 国产精品三级电影| 奇米影视7777精品一区二区| 岛国一区二区在线观看| 欧美网站一区二区| 国产日韩欧美亚洲| 婷婷一区二区三区| 91香蕉视频污| 欧美成人官网二区| 亚洲成av人片在线观看| av一区二区不卡| 日韩精品中午字幕| 亚洲成人av电影在线| 99久久99久久精品免费观看| 欧美成人一区二区| 亚洲精品中文字幕在线观看| 国产综合久久久久久久久久久久| 欧美亚洲日本国产| 亚洲色图一区二区三区| 久久爱www久久做| 精品久久一区二区三区| 午夜精品视频在线观看| 91久久精品一区二区| 亚洲成av人在线观看| 在线观看三级视频欧美| 亚洲麻豆国产自偷在线| 色婷婷av一区| 性久久久久久久久久久久| 91美女在线观看| 午夜精品影院在线观看| 亚洲精品在线免费播放| 久久9热精品视频| 久久久精品国产免费观看同学| 免费人成在线不卡| 久久一二三国产| 国产成人av在线影院| 国产精品久久久久影视| 欧美精品乱码久久久久久| 日韩精品1区2区3区| 国产婷婷色一区二区三区在线| 福利一区在线观看| 亚洲人快播电影网| 欧美精品电影在线播放| 精品亚洲porn| 中文字幕一区二区三| 欧美日韩午夜在线视频| 韩国v欧美v亚洲v日本v| 中文字幕在线观看一区二区| 欧美一区二区三区免费大片 | 日韩在线a电影| 国产亚洲精品7777| 6080亚洲精品一区二区| eeuss鲁片一区二区三区| 午夜精品久久久久| 亚洲精品视频一区二区| 久久精品免视看| 日韩亚洲欧美在线| 欧美亚州韩日在线看免费版国语版| 国产一区二区h| 捆绑紧缚一区二区三区视频| 亚洲影视资源网| 亚洲伊人伊色伊影伊综合网| 国产精品国产三级国产三级人妇| 久久久99久久精品欧美| 欧美一级久久久| 欧美一卡2卡3卡4卡| 欧美一区二区三区在线观看视频| 精品久久久久香蕉网| 成人黄色av网站在线| 午夜久久久影院| 亚洲蜜臀av乱码久久精品蜜桃| 中文字幕高清不卡| 精品久久久久久久久久久久久久久 | 蜜桃av噜噜一区二区三区小说| 蜜桃一区二区三区四区| 美女性感视频久久| 国产综合久久久久久久久久久久| 国产成人免费在线观看不卡| 丁香另类激情小说| 日本高清无吗v一区| 日韩精品中文字幕一区| 精品久久久久av影院 | 亚洲精品乱码久久久久| 一区二区三区在线视频免费| 日韩精品欧美精品| 国产一区二区三区免费在线观看| 极品少妇xxxx精品少妇偷拍| 99国产欧美另类久久久精品| 欧美一区二区在线视频| 国产午夜久久久久| 日韩中文字幕不卡|