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

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

?? bitstream.c

?? xvid解碼的精簡版本.非常好的版本,節(jié)省了分離xvid源代碼的過程
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************** * *  XVID MPEG-4 VIDEO CODEC *  - Bitstream reader/writer - * *  Copyright (C) 2001-2003 Peter Ross <pross@xvid.org> *                     2003 Cristoph Lampert <gruel@web.de> * *  This program 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 of the License, or *  (at your option) any later version. * *  This program 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 this program ; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA * * $Id: bitstream.c,v 1.55 2005/11/22 10:23:01 suxen_drol Exp $ * ****************************************************************************/#include <string.h>#include <stdio.h>#include "bitstream.h"#include "zigzag.h"#include "quant_matrix.h"#include "mbcoding.h"static const uint8_t log2_tab_16[16] =  { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 }; static uint32_t __inline log2bin(uint32_t value){  int n = 0;  if (value & 0xffff0000) {    value >>= 16;    n += 16;  }  if (value & 0xff00) {    value >>= 8;    n += 8;  }  if (value & 0xf0) {    value >>= 4;    n += 4;  } return n + log2_tab_16[value];}static const uint32_t intra_dc_threshold_table[] = {	32,							/* never use */	13,	15,	17,	19,	21,	23,	1,};static voidbs_get_matrix(Bitstream * bs,			  uint8_t * matrix){	int i = 0;	int last, value = 0;	do {		last = value;		value = BitstreamGetBits(bs, 8);		matrix[scan_tables[0][i++]] = value;	}	while (value != 0 && i < 64);	if (value != 0) return;	i--;	while (i < 64) {		matrix[scan_tables[0][i++]] = last;	}}/* * for PVOP addbits == fcode - 1 * for BVOP addbits == max(fcode,bcode) - 1 * returns mbpos */intread_video_packet_header(Bitstream *bs,						DECODER * dec,						const int addbits,						int * quant,						int * fcode_forward,						int  * fcode_backward,						int * intra_dc_threshold){	int startcode_bits = NUMBITS_VP_RESYNC_MARKER + addbits;	int mbnum_bits = log2bin(dec->mb_width *  dec->mb_height - 1);	int mbnum;	int hec = 0;	BitstreamSkip(bs, BitstreamNumBitsToByteAlign(bs));	BitstreamSkip(bs, startcode_bits);	DPRINTF(XVID_DEBUG_STARTCODE, "<video_packet_header>\n");	if (dec->shape != VIDOBJLAY_SHAPE_RECTANGULAR)	{		hec = BitstreamGetBit(bs);		/* header_extension_code */		if (hec && !(dec->sprite_enable == SPRITE_STATIC /* && current_coding_type = I_VOP */))		{			BitstreamSkip(bs, 13);			/* vop_width */			READ_MARKER();			BitstreamSkip(bs, 13);			/* vop_height */			READ_MARKER();			BitstreamSkip(bs, 13);			/* vop_horizontal_mc_spatial_ref */			READ_MARKER();			BitstreamSkip(bs, 13);			/* vop_vertical_mc_spatial_ref */			READ_MARKER();		}	}	mbnum = BitstreamGetBits(bs, mbnum_bits);		/* macroblock_number */	DPRINTF(XVID_DEBUG_HEADER, "mbnum %i\n", mbnum);	if (dec->shape != VIDOBJLAY_SHAPE_BINARY_ONLY)	{		*quant = BitstreamGetBits(bs, dec->quant_bits);	/* quant_scale */		DPRINTF(XVID_DEBUG_HEADER, "quant %i\n", *quant);	}	if (dec->shape == VIDOBJLAY_SHAPE_RECTANGULAR)		hec = BitstreamGetBit(bs);		/* header_extension_code */	DPRINTF(XVID_DEBUG_HEADER, "header_extension_code %i\n", hec);	if (hec)	{		int time_base;		int time_increment;		int coding_type;		for (time_base=0; BitstreamGetBit(bs)!=0; time_base++);		/* modulo_time_base */		READ_MARKER();		if (dec->time_inc_bits)			time_increment = (BitstreamGetBits(bs, dec->time_inc_bits));	/* vop_time_increment */		READ_MARKER();		DPRINTF(XVID_DEBUG_HEADER,"time %i:%i\n", time_base, time_increment);		coding_type = BitstreamGetBits(bs, 2);		DPRINTF(XVID_DEBUG_HEADER,"coding_type %i\n", coding_type);		if (dec->shape != VIDOBJLAY_SHAPE_RECTANGULAR)		{			BitstreamSkip(bs, 1);	/* change_conv_ratio_disable */			if (coding_type != I_VOP)				BitstreamSkip(bs, 1);	/* vop_shape_coding_type */		}		if (dec->shape != VIDOBJLAY_SHAPE_BINARY_ONLY)		{			*intra_dc_threshold = intra_dc_threshold_table[BitstreamGetBits(bs, 3)];			if (dec->sprite_enable == SPRITE_GMC && coding_type == S_VOP &&				dec->sprite_warping_points > 0)			{				/* TODO: sprite trajectory */			}			if (dec->reduced_resolution_enable &&				dec->shape == VIDOBJLAY_SHAPE_RECTANGULAR &&				(coding_type == P_VOP || coding_type == I_VOP))			{				BitstreamSkip(bs, 1); /* XXX: vop_reduced_resolution */			}			if (coding_type != I_VOP && fcode_forward)			{				*fcode_forward = BitstreamGetBits(bs, 3);				DPRINTF(XVID_DEBUG_HEADER,"fcode_forward %i\n", *fcode_forward);			}			if (coding_type == B_VOP && fcode_backward)			{				*fcode_backward = BitstreamGetBits(bs, 3);				DPRINTF(XVID_DEBUG_HEADER,"fcode_backward %i\n", *fcode_backward);			}		}	}	if (dec->newpred_enable)	{		int vop_id;		int vop_id_for_prediction;		vop_id = BitstreamGetBits(bs, MIN(dec->time_inc_bits + 3, 15));		DPRINTF(XVID_DEBUG_HEADER, "vop_id %i\n", vop_id);		if (BitstreamGetBit(bs))	/* vop_id_for_prediction_indication */		{			vop_id_for_prediction = BitstreamGetBits(bs, MIN(dec->time_inc_bits + 3, 15));			DPRINTF(XVID_DEBUG_HEADER, "vop_id_for_prediction %i\n", vop_id_for_prediction);		}		READ_MARKER();	}	return mbnum;}/* vol estimation header */static voidread_vol_complexity_estimation_header(Bitstream * bs, DECODER * dec){	ESTIMATION * e = &dec->estimation;	e->method = BitstreamGetBits(bs, 2);	/* estimation_method */	DPRINTF(XVID_DEBUG_HEADER,"+ complexity_estimation_header; method=%i\n", e->method);	if (e->method == 0 || e->method == 1)	{		if (!BitstreamGetBit(bs))		/* shape_complexity_estimation_disable */		{			e->opaque = BitstreamGetBit(bs);		/* opaque */			e->transparent = BitstreamGetBit(bs);		/* transparent */			e->intra_cae = BitstreamGetBit(bs);		/* intra_cae */			e->inter_cae = BitstreamGetBit(bs);		/* inter_cae */			e->no_update = BitstreamGetBit(bs);		/* no_update */			e->upsampling = BitstreamGetBit(bs);		/* upsampling */		}		if (!BitstreamGetBit(bs))	/* texture_complexity_estimation_set_1_disable */		{			e->intra_blocks = BitstreamGetBit(bs);		/* intra_blocks */			e->inter_blocks = BitstreamGetBit(bs);		/* inter_blocks */			e->inter4v_blocks = BitstreamGetBit(bs);		/* inter4v_blocks */			e->not_coded_blocks = BitstreamGetBit(bs);		/* not_coded_blocks */		}	}	READ_MARKER();	if (!BitstreamGetBit(bs))		/* texture_complexity_estimation_set_2_disable */	{		e->dct_coefs = BitstreamGetBit(bs);		/* dct_coefs */		e->dct_lines = BitstreamGetBit(bs);		/* dct_lines */		e->vlc_symbols = BitstreamGetBit(bs);		/* vlc_symbols */		e->vlc_bits = BitstreamGetBit(bs);		/* vlc_bits */	}	if (!BitstreamGetBit(bs))		/* motion_compensation_complexity_disable */	{		e->apm = BitstreamGetBit(bs);		/* apm */		e->npm = BitstreamGetBit(bs);		/* npm */		e->interpolate_mc_q = BitstreamGetBit(bs);		/* interpolate_mc_q */		e->forw_back_mc_q = BitstreamGetBit(bs);		/* forw_back_mc_q */		e->halfpel2 = BitstreamGetBit(bs);		/* halfpel2 */		e->halfpel4 = BitstreamGetBit(bs);		/* halfpel4 */	}	READ_MARKER();	if (e->method == 1)	{		if (!BitstreamGetBit(bs))	/* version2_complexity_estimation_disable */		{			e->sadct = BitstreamGetBit(bs);		/* sadct */			e->quarterpel = BitstreamGetBit(bs);		/* quarterpel */		}	}}/* vop estimation header */static voidread_vop_complexity_estimation_header(Bitstream * bs, DECODER * dec, int coding_type){	ESTIMATION * e = &dec->estimation;	if (e->method == 0 || e->method == 1)	{		if (coding_type == I_VOP) {			if (e->opaque)		BitstreamSkip(bs, 8);	/* dcecs_opaque */			if (e->transparent) BitstreamSkip(bs, 8);	/* */			if (e->intra_cae)	BitstreamSkip(bs, 8);	/* */			if (e->inter_cae)	BitstreamSkip(bs, 8);	/* */			if (e->no_update)	BitstreamSkip(bs, 8);	/* */			if (e->upsampling)	BitstreamSkip(bs, 8);	/* */			if (e->intra_blocks) BitstreamSkip(bs, 8);	/* */			if (e->not_coded_blocks) BitstreamSkip(bs, 8);	/* */			if (e->dct_coefs)	BitstreamSkip(bs, 8);	/* */			if (e->dct_lines)	BitstreamSkip(bs, 8);	/* */			if (e->vlc_symbols) BitstreamSkip(bs, 8);	/* */			if (e->vlc_bits)	BitstreamSkip(bs, 8);	/* */			if (e->sadct)		BitstreamSkip(bs, 8);	/* */		}		if (coding_type == P_VOP) {			if (e->opaque) BitstreamSkip(bs, 8);		/* */			if (e->transparent) BitstreamSkip(bs, 8);	/* */			if (e->intra_cae)	BitstreamSkip(bs, 8);	/* */			if (e->inter_cae)	BitstreamSkip(bs, 8);	/* */			if (e->no_update)	BitstreamSkip(bs, 8);	/* */			if (e->upsampling) BitstreamSkip(bs, 8);	/* */			if (e->intra_blocks) BitstreamSkip(bs, 8);	/* */			if (e->not_coded_blocks)	BitstreamSkip(bs, 8);	/* */			if (e->dct_coefs)	BitstreamSkip(bs, 8);	/* */			if (e->dct_lines)	BitstreamSkip(bs, 8);	/* */			if (e->vlc_symbols) BitstreamSkip(bs, 8);	/* */			if (e->vlc_bits)	BitstreamSkip(bs, 8);	/* */			if (e->inter_blocks) BitstreamSkip(bs, 8);	/* */			if (e->inter4v_blocks) BitstreamSkip(bs, 8);	/* */			if (e->apm)			BitstreamSkip(bs, 8);	/* */			if (e->npm)			BitstreamSkip(bs, 8);	/* */			if (e->forw_back_mc_q) BitstreamSkip(bs, 8);	/* */			if (e->halfpel2)	BitstreamSkip(bs, 8);	/* */			if (e->halfpel4)	BitstreamSkip(bs, 8);	/* */			if (e->sadct)		BitstreamSkip(bs, 8);	/* */			if (e->quarterpel)	BitstreamSkip(bs, 8);	/* */		}		if (coding_type == B_VOP) {			if (e->opaque)		BitstreamSkip(bs, 8);	/* */			if (e->transparent)	BitstreamSkip(bs, 8);	/* */			if (e->intra_cae)	BitstreamSkip(bs, 8);	/* */			if (e->inter_cae)	BitstreamSkip(bs, 8);	/* */			if (e->no_update)	BitstreamSkip(bs, 8);	/* */			if (e->upsampling)	BitstreamSkip(bs, 8);	/* */			if (e->intra_blocks) BitstreamSkip(bs, 8);	/* */			if (e->not_coded_blocks) BitstreamSkip(bs, 8);	/* */			if (e->dct_coefs)	BitstreamSkip(bs, 8);	/* */			if (e->dct_lines)	BitstreamSkip(bs, 8);	/* */			if (e->vlc_symbols)	BitstreamSkip(bs, 8);	/* */			if (e->vlc_bits)	BitstreamSkip(bs, 8);	/* */			if (e->inter_blocks) BitstreamSkip(bs, 8);	/* */			if (e->inter4v_blocks) BitstreamSkip(bs, 8);	/* */			if (e->apm)			BitstreamSkip(bs, 8);	/* */			if (e->npm)			BitstreamSkip(bs, 8);	/* */			if (e->forw_back_mc_q) BitstreamSkip(bs, 8);	/* */			if (e->halfpel2)	BitstreamSkip(bs, 8);	/* */			if (e->halfpel4)	BitstreamSkip(bs, 8);	/* */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区香蕉 | 亚洲精品欧美二区三区中文字幕| 一区二区三区在线观看欧美 | 天堂av在线一区| 丁香六月久久综合狠狠色| 久久伊99综合婷婷久久伊| 精品夜夜嗨av一区二区三区| 欧美v国产在线一区二区三区| 国产一区二区三区免费观看| 成人h动漫精品一区二区| 久久精品一区八戒影视| 99久久综合狠狠综合久久| 亚洲欧洲综合另类在线| 91精品国模一区二区三区| 国内精品伊人久久久久av影院| 337p日本欧洲亚洲大胆精品| 国产成人精品网址| 亚洲最色的网站| 欧美精品一区二区不卡| 色综合久久中文字幕综合网| 婷婷成人激情在线网| 精品福利一区二区三区免费视频| 久久精品噜噜噜成人av农村| 中文字幕亚洲一区二区av在线| 在线观看视频欧美| 国产成人鲁色资源国产91色综| 亚洲国产欧美日韩另类综合 | 日韩欧美亚洲一区二区| 老司机免费视频一区二区三区| 亚洲大片在线观看| 精品日韩99亚洲| 成人免费毛片嘿嘿连载视频| 亚洲v中文字幕| 日韩一区欧美一区| 久久久久久毛片| 精品福利一二区| 日韩欧美一级二级三级| 欧美调教femdomvk| 91极品视觉盛宴| 成人免费电影视频| 免费人成精品欧美精品| 亚洲综合色区另类av| 国产蜜臀97一区二区三区| 日韩午夜激情视频| 欧美美女喷水视频| 欧美丰满嫩嫩电影| 正在播放一区二区| 日韩欧美一级在线播放| 日韩一区二区在线播放| 欧美三级中文字| 9191精品国产综合久久久久久 | 日本特黄久久久高潮| 亚洲福利电影网| 亚洲成av人片| 久久99国产精品免费| 日韩美女啊v在线免费观看| 精品国产污网站| 国产精品青草综合久久久久99| 中文字幕欧美激情| 亚洲色图19p| 老司机午夜精品99久久| 久久99精品一区二区三区| 国产大片一区二区| 色乱码一区二区三区88| 欧美电影在哪看比较好| 久久视频一区二区| 亚洲黄色免费电影| 韩日欧美一区二区三区| 色系网站成人免费| 亚洲精品一区二区在线观看| 国产精品无码永久免费888| 日韩理论在线观看| 日本在线观看不卡视频| 懂色av一区二区夜夜嗨| 日韩欧美色综合| 亚洲青青青在线视频| 精品一区在线看| 91免费视频观看| 久久婷婷成人综合色| 午夜在线电影亚洲一区| 91麻豆视频网站| 欧美欧美欧美欧美| 国产视频一区在线观看| 亚洲一二三四在线观看| 波波电影院一区二区三区| 欧美一区二区三级| 亚洲成在人线在线播放| 91福利精品第一导航| 国产精品全国免费观看高清| 国产精品一二三在| 欧美成人精品福利| 天天影视网天天综合色在线播放| 色一区在线观看| 亚洲欧美日本韩国| 色94色欧美sute亚洲线路二| 久久五月婷婷丁香社区| 国产成人在线网站| 国产精品区一区二区三区| 成人网男人的天堂| 中文字幕在线观看不卡| 色狠狠色狠狠综合| 亚洲大片精品永久免费| 日韩欧美一区二区免费| 久久精品99国产精品| 精品盗摄一区二区三区| 日韩专区在线视频| 欧美综合视频在线观看| 亚洲综合在线五月| 精品国产99国产精品| 国产一区二区成人久久免费影院| 国产精品视频一二三区| 欧美最猛性xxxxx直播| 精品一区二区在线播放| 中文字幕制服丝袜一区二区三区 | 日本伊人色综合网| 精品电影一区二区三区| www.欧美精品一二区| 亚洲综合一区二区三区| 精品精品国产高清a毛片牛牛| 成人美女在线观看| 亚洲狠狠爱一区二区三区| 日韩午夜在线观看视频| 色婷婷综合久久久中文一区二区| 青青草国产成人99久久| 中文字幕亚洲一区二区av在线| 欧美日韩精品免费观看视频| 国产老妇另类xxxxx| 日日夜夜一区二区| 国产精品国产馆在线真实露脸| 99久久久无码国产精品| 美国十次综合导航| 亚洲欧美日韩国产成人精品影院| 久久久精品人体av艺术| 日韩精品一区二区三区蜜臀| 欧美这里有精品| 91亚洲精华国产精华精华液| 国产河南妇女毛片精品久久久| 亚洲五月六月丁香激情| 国产精品卡一卡二| 久久久噜噜噜久久中文字幕色伊伊| 欧美日本一区二区在线观看| 日本精品一区二区三区四区的功能| 99久久免费精品高清特色大片| 国产成人亚洲精品狼色在线| 国产激情91久久精品导航| 美日韩黄色大片| 石原莉奈一区二区三区在线观看| 亚洲美腿欧美偷拍| 一区二区三区.www| 亚洲成人免费电影| 午夜电影一区二区| 蜜桃精品视频在线| 九九久久精品视频| 国产精选一区二区三区| 成人午夜视频免费看| 色综合视频一区二区三区高清| 亚洲免费观看高清完整| 国产精品私人影院| 日韩一区日韩二区| 夜夜嗨av一区二区三区四季av| 亚洲美女视频在线| 亚洲午夜精品17c| 久久99深爱久久99精品| 国产在线麻豆精品观看| 北条麻妃一区二区三区| 欧美日韩黄视频| 久久蜜桃av一区精品变态类天堂| 中文字幕日韩欧美一区二区三区| 午夜国产不卡在线观看视频| 国产美女久久久久| 91在线丨porny丨国产| 日韩视频免费直播| 伊人夜夜躁av伊人久久| 国产一区二区在线观看视频| 欧美日韩一级黄| 中文字幕一区二区三区在线不卡 | 九一久久久久久| 成人av综合在线| 日韩欧美中文字幕制服| 亚洲精品自拍动漫在线| 免费看日韩a级影片| av亚洲精华国产精华| 日韩天堂在线观看| 午夜电影久久久| 91麻豆swag| 一区二区三区日韩欧美| av一区二区三区| 久久久91精品国产一区二区精品| 久久国产三级精品| 精品久久一区二区| 丝袜亚洲精品中文字幕一区| 色噜噜偷拍精品综合在线| 日韩美女啊v在线免费观看| 国产精品一区免费视频| 久久久www免费人成精品| 国产精品538一区二区在线| 欧美一区二区美女| 国产一区欧美一区| 日本一区二区三区国色天香 | 日韩久久精品一区|