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

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

?? parse.c

?? DVD轉換到AVI的源代碼
?? C
字號:
/* 
 *	Copyright (C) Aaron Holtzman - May 1999
 *
 *  This file is part of ac3dec, a free Dolby AC-3 stream decoder.
 *	
 *  ac3dec is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  ac3dec 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 General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with GNU Make; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 *
 */

#include "ac3.h"
#include "bitstream.h"

/* Misc LUT */
static const uint_16 nfchans[8] = {2,1,2,3,3,4,4,5};

struct frmsize_s
{
	uint_16 bit_rate;
	uint_16 frm_size[3];
};

static const struct frmsize_s frmsizecod_tbl[64] = 
{
	{ 32  ,{64   ,69   ,96   } },
	{ 32  ,{64   ,70   ,96   } },
	{ 40  ,{80   ,87   ,120  } },
	{ 40  ,{80   ,88   ,120  } },
	{ 48  ,{96   ,104  ,144  } },
	{ 48  ,{96   ,105  ,144  } },
	{ 56  ,{112  ,121  ,168  } },
	{ 56  ,{112  ,122  ,168  } },
	{ 64  ,{128  ,139  ,192  } },
	{ 64  ,{128  ,140  ,192  } },
	{ 80  ,{160  ,174  ,240  } },
	{ 80  ,{160  ,175  ,240  } },
	{ 96  ,{192  ,208  ,288  } },
	{ 96  ,{192  ,209  ,288  } },
	{ 112 ,{224  ,243  ,336  } },
	{ 112 ,{224  ,244  ,336  } },
	{ 128 ,{256  ,278  ,384  } },
	{ 128 ,{256  ,279  ,384  } },
	{ 160 ,{320  ,348  ,480  } },
	{ 160 ,{320  ,349  ,480  } },
	{ 192 ,{384  ,417  ,576  } },
	{ 192 ,{384  ,418  ,576  } },
	{ 224 ,{448  ,487  ,672  } },
	{ 224 ,{448  ,488  ,672  } },
	{ 256 ,{512  ,557  ,768  } },
	{ 256 ,{512  ,558  ,768  } },
	{ 320 ,{640  ,696  ,960  } },
	{ 320 ,{640  ,697  ,960  } },
	{ 384 ,{768  ,835  ,1152 } },
	{ 384 ,{768  ,836  ,1152 } },
	{ 448 ,{896  ,975  ,1344 } },
	{ 448 ,{896  ,976  ,1344 } },
	{ 512 ,{1024 ,1114 ,1536 } },
	{ 512 ,{1024 ,1115 ,1536 } },
	{ 576 ,{1152 ,1253 ,1728 } },
	{ 576 ,{1152 ,1254 ,1728 } },
	{ 640 ,{1280 ,1393 ,1920 } },
	{ 640 ,{1280 ,1394 ,1920 } }
};

/* Parse a syncinfo structure, minus the sync word */
void parse_syncinfo(syncinfo_t *syncinfo,uint_8 *data)
{
	//
	// We need to read in the entire syncinfo struct (0x0b77 + 24 bits)
	// in order to determine how big the frame is
	//

	// Get the sampling rate 
	syncinfo->fscod = (data[2] >> 6) & 0x03;

	switch (syncinfo->fscod)
	{
		case 0:
			syncinfo->sampling_rate = 48000;
			break;

		case 1:
			syncinfo->sampling_rate = 44100;
			break;

		case 2:
			syncinfo->sampling_rate = 32000;
			break;

		default:
			error_flag = 1;	
			return;
	}

	// Get the frame size code 
	syncinfo->frmsizecod = data[2] & 0x3f;

	// Calculate the frame size and bitrate
	syncinfo->frame_size = frmsizecod_tbl[syncinfo->frmsizecod].frm_size[syncinfo->fscod];
	syncinfo->bit_rate = frmsizecod_tbl[syncinfo->frmsizecod].bit_rate;
}

/*
 * This routine fills a bsi struct from the AC3 stream
 */

void
parse_bsi(bsi_t *bsi)
{
	sint_32 i;

	/* Check the AC-3 version number */
	bsi->bsid = bitstream_get(5);

	/* Get the audio service provided by the steram */
	bsi->bsmod = bitstream_get(3);

	/* Get the audio coding mode (ie how many channels)*/
	bsi->acmod = bitstream_get(3);
	/* Predecode the number of full bandwidth channels as we use this
	 * number a lot */
	bsi->nfchans = nfchans[bsi->acmod];

	/* If it is in use, get the centre channel mix level */
	if ((bsi->acmod & 0x1) && bsi->acmod!=0x1)
		bsi->cmixlev = bitstream_get(2);

	/* If it is in use, get the surround channel mix level */
	if (bsi->acmod & 0x4)
		bsi->surmixlev = bitstream_get(2);

	/* Get the dolby surround mode if in 2/0 mode */
	if(bsi->acmod == 0x2)
		bsi->dsurmod= bitstream_get(2);

	/* Is the low frequency effects channel on? */
	bsi->lfeon = bitstream_get(1);

	/* Get the dialogue normalization level */
	bsi->dialnorm = bitstream_get(5);

	/* Does compression gain exist? */
	bsi->compre = bitstream_get(1);
	if (bsi->compre)
	{
		/* Get compression gain */
		bsi->compr = bitstream_get(8);
	}

	/* Does language code exist? */
	bsi->langcode = bitstream_get(1);
	if (bsi->langcode)
	{
		/* Get langauge code */
		bsi->langcod = bitstream_get(8);
	}

	/* Does audio production info exist? */
	bsi->audprodie = bitstream_get(1);
	if (bsi->audprodie)
	{
		/* Get mix level */
		bsi->mixlevel = bitstream_get(5);

		/* Get room type */
		bsi->roomtyp = bitstream_get(2);
	}

	/* If we're in dual mono mode then get some extra info */
	if (bsi->acmod ==0)
	{
		/* Get the dialogue normalization level two */
		bsi->dialnorm2 = bitstream_get(5);

		/* Does compression gain two exist? */
		bsi->compr2e = bitstream_get(1);
		if (bsi->compr2e)
		{
			/* Get compression gain two */
			bsi->compr2 = bitstream_get(8);
		}

		/* Does language code two exist? */
		bsi->langcod2e = bitstream_get(1);
		if (bsi->langcod2e)
		{
			/* Get langauge code two */
			bsi->langcod2 = bitstream_get(8);
		}

		/* Does audio production info two exist? */
		bsi->audprodi2e = bitstream_get(1);
		if (bsi->audprodi2e)
		{
			/* Get mix level two */
			bsi->mixlevel2 = bitstream_get(5);

			/* Get room type two */
			bsi->roomtyp2 = bitstream_get(2);
		}
	}

	/* Get the copyright bit */
	bsi->copyrightb = bitstream_get(1);

	/* Get the original bit */
	bsi->origbs = bitstream_get(1);
	
	/* Does timecode one exist? */
	bsi->timecod1e = bitstream_get(1);

	if(bsi->timecod1e)
		bsi->timecod1 = bitstream_get(14);

	/* Does timecode two exist? */
	bsi->timecod2e = bitstream_get(1);

	if(bsi->timecod2e)
		bsi->timecod2 = bitstream_get(14);

	/* Does addition info exist? */
	bsi->addbsie = bitstream_get(1);

	if(bsi->addbsie)
	{
		/* Get how much info is there */
		bsi->addbsil = bitstream_get(6);

		/* Get the additional info */
		for(i=0; i<(bsi->addbsil+1); i++)
			bsi->addbsi[i] = bitstream_get(8);
	}
}

/* More pain inducing parsing */
void parse_audblk(bsi_t *bsi,audblk_t *audblk)
{
	int i,j;

	for (i=0; i<bsi->nfchans; i++)
	{
		/* Is this channel an interleaved 256 + 256 block ? */
		audblk->blksw[i] = bitstream_get(1);
	}

	for (i=0; i<bsi->nfchans; i++)
	{
		/* Should we dither this channel? */
		audblk->dithflag[i] = bitstream_get(1);
	}

	/* Does dynamic range control exist? */
	audblk->dynrnge = bitstream_get(1);
	if (audblk->dynrnge)
	{
		/* Get dynamic range info */
		audblk->dynrng = bitstream_get(8);
	}

	/* If we're in dual mono mode then get the second channel DR info */
	if (bsi->acmod == 0)
	{
		/* Does dynamic range control two exist? */
		audblk->dynrng2e = bitstream_get(1);
		if (audblk->dynrng2e)
		{
			/* Get dynamic range info */
			audblk->dynrng2 = bitstream_get(8);
		}
	}

	/* Does coupling strategy exist? */
	audblk->cplstre = bitstream_get(1);
	if (audblk->cplstre)
	{
		/* Is coupling turned on? */
		audblk->cplinu = bitstream_get(1);
		if(audblk->cplinu)
		{
			for(i=0;i < bsi->nfchans; i++)
				audblk->chincpl[i] = bitstream_get(1);
			if(bsi->acmod == 0x2)
				audblk->phsflginu = bitstream_get(1);
			audblk->cplbegf = bitstream_get(4);
			audblk->cplendf = bitstream_get(4);
			audblk->ncplsubnd = (audblk->cplendf + 2) - audblk->cplbegf + 1;

			/* Calculate the start and end bins of the coupling channel */
			audblk->cplstrtmant = (audblk->cplbegf * 12) + 37 ; 
			audblk->cplendmant =  ((audblk->cplendf + 3) * 12) + 37;

			/* The number of combined subbands is ncplsubnd minus each combined band */
			audblk->ncplbnd = audblk->ncplsubnd; 

			for(i=1; i<audblk->ncplsubnd; i++)
			{
				audblk->cplbndstrc[i] = bitstream_get(1);
				audblk->ncplbnd -= audblk->cplbndstrc[i];
			}
		}
	}

	if(audblk->cplinu)
	{
		/* Loop through all the channels and get their coupling co-ords */	
		for(i=0; i<bsi->nfchans;i++)
		{
			if(!audblk->chincpl[i])
				continue;

			/* Is there new coupling co-ordinate info? */
			audblk->cplcoe[i] = bitstream_get(1);

			if(audblk->cplcoe[i])
			{
				audblk->mstrcplco[i] = bitstream_get(2); 
				for(j=0;j < audblk->ncplbnd; j++)
				{
					audblk->cplcoexp[i][j] = bitstream_get(4); 
					audblk->cplcomant[i][j] = bitstream_get(4); 
				}
			}
		}

		/* If we're in dual mono mode, there's going to be some phase info */
		if(bsi->acmod== 0x2 && audblk->phsflginu && (audblk->cplcoe[0] || audblk->cplcoe[1]))
		{
			for(j=0;j < audblk->ncplbnd; j++)
				audblk->phsflg[j] = bitstream_get(1);
		}
	}

	/* If we're in dual mono mode, there may be a rematrix strategy */
	if(bsi->acmod == 0x2)
	{
		audblk->rematstr = bitstream_get(1);
		if(audblk->rematstr)
		{
			if (audblk->cplinu == 0) 
			{ 
				for(i = 0; i < 4; i++) 
					audblk->rematflg[i] = bitstream_get(1);
			}
			if(audblk->cplbegf>2 && audblk->cplinu) 
			{
				for(i = 0; i < 4; i++) 
					audblk->rematflg[i] = bitstream_get(1);
			}
			if(audblk->cplbegf<=2 && audblk->cplinu) 
			{ 
				for(i = 0; i < 3; i++) 
					audblk->rematflg[i] = bitstream_get(1);
			} 
			if(audblk->cplbegf==0 && audblk->cplinu) 
				for(i = 0; i < 2; i++) 
					audblk->rematflg[i] = bitstream_get(1);
		}
	}

	if (audblk->cplinu)
	{
		/* Get the coupling channel exponent strategy */
		audblk->cplexpstr = bitstream_get(2);
		audblk->ncplgrps = (audblk->cplendmant - audblk->cplstrtmant) / 
				(3 << (audblk->cplexpstr-1));
	}

	for(i = 0; i < bsi->nfchans; i++)
		audblk->chexpstr[i] = bitstream_get(2);

	/* Get the exponent strategy for lfe channel */
	if(bsi->lfeon) 
		audblk->lfeexpstr = bitstream_get(1);

	/* Determine the bandwidths of all the fbw channels */
	for(i = 0; i < bsi->nfchans; i++) 
	{ 
		uint_16 grp_size;

		if(audblk->chexpstr[i] != EXP_REUSE) 
		{ 
			if (audblk->cplinu && audblk->chincpl[i]) 
			{
				audblk->endmant[i] = audblk->cplstrtmant;
			}
			else
			{
				audblk->chbwcod[i] = bitstream_get(6); 
				audblk->endmant[i] = ((audblk->chbwcod[i] + 12) * 3) + 37;
			}

			/* Calculate the number of exponent groups to fetch */
			grp_size =  3 * (1 << (audblk->chexpstr[i] - 1));
			audblk->nchgrps[i] = (audblk->endmant[i] - 1 + (grp_size - 3)) / grp_size;
		}
	}

	/* Get the coupling exponents if they exist */
	if(audblk->cplinu && audblk->cplexpstr!=EXP_REUSE)
	{
		audblk->cplabsexp = bitstream_get(4);
		for(i=0;i< audblk->ncplgrps;i++)
			audblk->cplexps[i] = bitstream_get(7);
	}

	/* Get the fwb channel exponents */
	for(i=0;i < bsi->nfchans; i++)
	{
		if(audblk->chexpstr[i] != EXP_REUSE)
		{
			audblk->exps[i][0] = bitstream_get(4);			
			for(j=1;j<=audblk->nchgrps[i];j++)
				audblk->exps[i][j] = bitstream_get(7);
			audblk->gainrng[i] = bitstream_get(2);
		}
	}

	/* Get the lfe channel exponents */
	if(bsi->lfeon && audblk->lfeexpstr!=EXP_REUSE)
	{
		audblk->lfeexps[0] = bitstream_get(4);
		audblk->lfeexps[1] = bitstream_get(7);
		audblk->lfeexps[2] = bitstream_get(7);
	}

	/* Get the parametric bit allocation parameters */
	audblk->baie = bitstream_get(1);

	if(audblk->baie)
	{
		audblk->sdcycod = bitstream_get(2);
		audblk->fdcycod = bitstream_get(2);
		audblk->sgaincod = bitstream_get(2);
		audblk->dbpbcod = bitstream_get(2);
		audblk->floorcod = bitstream_get(3);
	}

	/* Get the SNR off set info if it exists */
	audblk->snroffste = bitstream_get(1);

	if(audblk->snroffste)
	{
		audblk->csnroffst = bitstream_get(6);

		if(audblk->cplinu)
		{
			audblk->cplfsnroffst = bitstream_get(4);
			audblk->cplfgaincod = bitstream_get(3);
		}

		for(i=0; i<bsi->nfchans; i++)
		{
			audblk->fsnroffst[i] = bitstream_get(4);
			audblk->fgaincod[i] = bitstream_get(3);
		}
		if(bsi->lfeon)
		{
			audblk->lfefsnroffst = bitstream_get(4);
			audblk->lfefgaincod = bitstream_get(3);
		}
	}

	/* Get coupling leakage info if it exists */
	if(audblk->cplinu)
	{
		audblk->cplleake = bitstream_get(1);	
		
		if(audblk->cplleake)
		{
			audblk->cplfleak = bitstream_get(3);
			audblk->cplsleak = bitstream_get(3);
		}
	}
	
	/* Get the delta bit alloaction info */
	audblk->deltbaie = bitstream_get(1);	
	
	if(audblk->deltbaie)
	{
		if(audblk->cplinu)
			audblk->cpldeltbae = bitstream_get(2);

		for(i = 0;i < bsi->nfchans; i++)
			audblk->deltbae[i] = bitstream_get(2);

		if (audblk->cplinu && audblk->cpldeltbae==DELTA_BIT_NEW)
		{
			audblk->cpldeltnseg = bitstream_get(3);
			for(i = 0;i < audblk->cpldeltnseg + 1; i++)
			{
				audblk->cpldeltoffst[i] = bitstream_get(5);
				audblk->cpldeltlen[i] = bitstream_get(4);
				audblk->cpldeltba[i] = bitstream_get(3);
			}
		}

		for(i = 0;i < bsi->nfchans; i++)
		{
			if (audblk->deltbae[i] == DELTA_BIT_NEW)
			{
				audblk->deltnseg[i] = bitstream_get(3);
				for(j = 0; j < audblk->deltnseg[i] + 1; j++)
				{
					audblk->deltoffst[i][j] = bitstream_get(5);
					audblk->deltlen[i][j] = bitstream_get(4);
					audblk->deltba[i][j] = bitstream_get(3);
				}
			}
		}
	}

	/* Check to see if there's any dummy info to get */
	if((audblk->skiple =  bitstream_get(1)))
	{
		uint_16 skip_data;

		audblk->skipl = bitstream_get(9);

		for(i = 0; i < audblk->skipl ; i++)
			skip_data = bitstream_get(8);
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人深夜在线观看| 亚洲精品精品亚洲| 777久久久精品| 欧美日韩在线免费视频| 欧美亚洲国产怡红院影院| 欧美性大战xxxxx久久久| 91福利精品视频| 欧美色网一区二区| 日韩视频免费直播| 久久久久久久久久久久久女国产乱| 6080日韩午夜伦伦午夜伦| 日韩一区二区三区视频| 日韩一区二区三区电影在线观看 | 亚洲欧洲性图库| 日本亚洲天堂网| 精品一区中文字幕| 国产综合色视频| 丁香五精品蜜臀久久久久99网站| 不卡一区二区三区四区| 91偷拍与自偷拍精品| 欧美理论在线播放| 久久久国产精品麻豆| 日韩电影在线一区| 美女视频一区在线观看| 国产99久久久国产精品潘金| 99国内精品久久| 91精品国产欧美一区二区| 欧美精品一区二区久久婷婷| 国产精品美女一区二区| 日韩av在线播放中文字幕| 国产福利不卡视频| 欧美丝袜丝nylons| 久久久美女毛片| 天天av天天翘天天综合网 | 国产一二精品视频| 91色视频在线| 久久综合九色欧美综合狠狠| 亚洲免费视频成人| 国产麻豆一精品一av一免费 | 欧美亚一区二区| 久久久蜜桃精品| 天天综合日日夜夜精品| 成人激情电影免费在线观看| 欧美一卡二卡在线观看| 亚洲人成网站在线| 国产乱码字幕精品高清av| 欧美浪妇xxxx高跟鞋交| 欧美国产丝袜视频| 久久国产精品免费| 欧美日韩一级视频| 亚洲人成人一区二区在线观看| 日本欧美肥老太交大片| 欧美性受xxxx| 一区二区三区中文在线| 成人免费视频视频| 精品国产一区二区在线观看| 亚洲成人手机在线| 欧洲亚洲精品在线| 自拍视频在线观看一区二区| 国产精品一区不卡| 26uuu国产在线精品一区二区| 日本中文一区二区三区| 欧美日韩国产另类一区| 亚洲va韩国va欧美va| 在线观看视频91| 亚洲精品一卡二卡| 日本二三区不卡| 亚洲柠檬福利资源导航| 91年精品国产| 国产三区在线成人av| 国产一区二区三区久久久| 久久综合丝袜日本网| 国产一本一道久久香蕉| 国产亚洲精品中文字幕| 日本成人在线不卡视频| 欧美人与禽zozo性伦| 日本系列欧美系列| 日韩欧美在线123| 久国产精品韩国三级视频| 亚洲精品在线免费播放| 高清在线不卡av| 国产精品国产精品国产专区不片| caoporn国产一区二区| 国产精品久久久久久久久晋中| 99久久精品99国产精品| 亚洲宅男天堂在线观看无病毒| 欧美中文字幕不卡| 日本人妖一区二区| 国产三级一区二区| gogogo免费视频观看亚洲一| 亚洲一区二区三区四区五区黄| 欧美日韩一区二区在线观看| 奇米精品一区二区三区在线观看| 日韩精品中午字幕| 成人性视频网站| 一区二区三区免费网站| 91精品国产91综合久久蜜臀| 国产米奇在线777精品观看| 中文字幕一区av| 911精品国产一区二区在线| 国产一区二区在线观看免费| 国产精品久久免费看| 91成人网在线| 久久精品国产亚洲a| 亚洲同性gay激情无套| 51精品秘密在线观看| 国产成人亚洲综合a∨猫咪| 一区二区高清在线| 久久久久久99精品| 欧美日韩欧美一区二区| 国产不卡视频在线播放| 婷婷综合另类小说色区| 国产三级精品在线| 717成人午夜免费福利电影| 国产精品一线二线三线精华| 亚洲成av人片| 亚洲欧洲日韩综合一区二区| 日韩精品一区二区三区视频播放| 99久久国产综合色|国产精品| 美国三级日本三级久久99| 亚洲精品成人精品456| 久久久精品免费免费| 欧美高清你懂得| 色综合天天天天做夜夜夜夜做| 经典一区二区三区| 亚洲午夜精品网| 中文字幕一区在线观看| 国产午夜一区二区三区| 欧美一级理论性理论a| 一本高清dvd不卡在线观看| 国产高清成人在线| 免费不卡在线视频| 日日骚欧美日韩| 午夜电影一区二区| 亚洲一区二区在线免费看| 中文字幕一区在线观看视频| 国产色产综合产在线视频| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩视频在线第一区| 欧美日韩精品一区二区三区| 99精品视频中文字幕| 成人av资源在线观看| 国产精品正在播放| 国产毛片精品一区| 国产福利一区在线| 国产精品123| 丰满亚洲少妇av| 国产精品一二三| 国产成人免费视频网站 | 国内精品视频666| 黄页视频在线91| 精品一区二区av| 国产大陆亚洲精品国产| 国产成人午夜99999| 成人精品在线视频观看| 91麻豆视频网站| 欧美亚洲综合久久| 欧美裸体一区二区三区| 日韩一区二区三区观看| 精品国产一区二区三区不卡| 2021国产精品久久精品| 国产精品天干天干在线综合| 亚洲天天做日日做天天谢日日欢| 亚洲欧美一区二区三区孕妇| 一区二区成人在线视频| 日韩精品乱码av一区二区| 美女一区二区久久| 国产成人自拍高清视频在线免费播放| 成人网在线播放| 在线观看日韩电影| 6080yy午夜一二三区久久| 久久午夜色播影院免费高清| 国产精品久久久久影院老司| 亚洲综合在线视频| 久久成人18免费观看| 成人深夜视频在线观看| 欧美在线观看一区| 久久一留热品黄| 亚洲精品久久嫩草网站秘色| 秋霞av亚洲一区二区三| 粉嫩aⅴ一区二区三区四区五区 | 男女男精品视频网| 国产福利精品导航| 欧美色爱综合网| 国产亚洲短视频| 亚洲va韩国va欧美va| 成人免费视频视频| 日韩欧美成人一区二区| 中文字幕中文在线不卡住| 日韩高清在线不卡| av不卡在线播放| 精品少妇一区二区三区在线播放 | 色综合久久66| 2021中文字幕一区亚洲| 亚洲va国产天堂va久久en| 国产激情视频一区二区在线观看| 欧美日韩一区三区四区| 亚洲欧美在线另类| 狠狠色丁香婷综合久久| 欧美日韩激情一区二区三区|