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

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

?? decoder.c

?? TMS320C6713Xvid視頻壓縮算法源代碼.rar
?? C
?? 第 1 頁 / 共 4 頁
字號:
/***************************************************************************** * *  XVID MPEG-4 VIDEO CODEC *  - Decoder Module - * *  Copyright(C) 2002      MinChen <chenm001@163.com> *               2002-2003 Peter Ross <pross@xvid.org> * *  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$ * ****************************************************************************/#include <stdio.h>#include <stdlib.h>#include <string.h>#ifdef BFRAMES_DEC_DEBUG	#define BFRAMES_DEC#endif#include "xvid.h"#include "portab.h"#include "global.h"#include "decoder.h"#include "bitstream/bitstream.h"#include "bitstream/mbcoding.h"#include "quant/quant.h"#include "quant/quant_matrix.h"#include "dct/idct.h"#include "dct/fdct.h"#include "utils/mem_transfer.h"#include "image/interpolate8x8.h"#include "image/reduced.h"#include "image/font.h"#include "bitstream/mbcoding.h"#include "prediction/mbprediction.h"#include "utils/timer.h"#include "utils/emms.h"#include "motion/motion.h"#include "motion/gmc.h"#include "image/image.h"#include "image/colorspace.h"#include "image/postprocessing.h"#include "utils/mem_align.h"static intdecoder_resize(DECODER * dec){	/* free existing */	image_destroy(&dec->cur, dec->edged_width, dec->edged_height);	image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);	image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);	image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);	image_destroy(&dec->qtmp, dec->edged_width, dec->edged_height);	image_destroy(&dec->gmc, dec->edged_width, dec->edged_height);	if (dec->last_mbs)		xvid_free(dec->last_mbs);	if (dec->mbs)		xvid_free(dec->mbs);	if (dec->qscale)		xvid_free(dec->qscale);	/* realloc */	dec->mb_width = (dec->width + 15) / 16;	dec->mb_height = (dec->height + 15) / 16;	dec->edged_width = 16 * dec->mb_width + 2 * EDGE_SIZE;	dec->edged_height = 16 * dec->mb_height + 2 * EDGE_SIZE;	if (image_create(&dec->cur, dec->edged_width, dec->edged_height)) {		xvid_free(dec);		return XVID_ERR_MEMORY;	}	if (image_create(&dec->refn[0], dec->edged_width, dec->edged_height)) {		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	/* Support B-frame to reference last 2 frame */	if (image_create(&dec->refn[1], dec->edged_width, dec->edged_height)) {		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	if (image_create(&dec->tmp, dec->edged_width, dec->edged_height)) {		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	if (image_create(&dec->qtmp, dec->edged_width, dec->edged_height)) {		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);		image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	if (image_create(&dec->gmc, dec->edged_width, dec->edged_height)) {		image_destroy(&dec->qtmp, dec->edged_width, dec->edged_height);		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);		image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	dec->mbs =		xvid_malloc(sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height,					CACHE_LINE);	if (dec->mbs == NULL) {		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);		image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);		image_destroy(&dec->qtmp, dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	memset(dec->mbs, 0, sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height);	/* For skip MB flag */	dec->last_mbs =		xvid_malloc(sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height,					CACHE_LINE);	if (dec->last_mbs == NULL) {		xvid_free(dec->mbs);		image_destroy(&dec->cur, dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);		image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);		image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);		image_destroy(&dec->qtmp, dec->edged_width, dec->edged_height);		xvid_free(dec);		return XVID_ERR_MEMORY;	}	memset(dec->last_mbs, 0, sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height);	/* nothing happens if that fails */	dec->qscale =		xvid_malloc(sizeof(int) * dec->mb_width * dec->mb_height, CACHE_LINE);		if (dec->qscale)		memset(dec->qscale, 0, sizeof(int) * dec->mb_width * dec->mb_height);	return 0;}intdecoder_create(xvid_dec_create_t * create){	DECODER *dec;	if (XVID_VERSION_MAJOR(create->version) != 1)	/* v1.x.x */		return XVID_ERR_VERSION;	dec = xvid_malloc(sizeof(DECODER), CACHE_LINE);	if (dec == NULL) {		return XVID_ERR_MEMORY;	}	memset(dec, 0, sizeof(DECODER));	dec->mpeg_quant_matrices = xvid_malloc(sizeof(uint16_t) * 64 * 8, CACHE_LINE);	if (dec->mpeg_quant_matrices == NULL) {		xvid_free(dec);		return XVID_ERR_MEMORY;	}	create->handle = dec;	dec->width = create->width;	dec->height = create->height;	image_null(&dec->cur);	image_null(&dec->refn[0]);	image_null(&dec->refn[1]);	image_null(&dec->tmp);	image_null(&dec->qtmp);	/* image based GMC */	image_null(&dec->gmc);	dec->mbs = NULL;	dec->last_mbs = NULL;	dec->qscale = NULL;	init_timer();	init_postproc(&dec->postproc);	init_mpeg_matrix(dec->mpeg_quant_matrices);	/* For B-frame support (used to save reference frame's time */	dec->frames = 0;	dec->time = dec->time_base = dec->last_time_base = 0;	dec->low_delay = 0;	dec->packed_mode = 0;	dec->time_inc_resolution = 1; /* until VOL header says otherwise */	dec->fixed_dimensions = (dec->width > 0 && dec->height > 0);	if (dec->fixed_dimensions)		return decoder_resize(dec);	else		return 0;}intdecoder_destroy(DECODER * dec){	xvid_free(dec->last_mbs);	xvid_free(dec->mbs);	xvid_free(dec->qscale);	/* image based GMC */	image_destroy(&dec->gmc, dec->edged_width, dec->edged_height);	image_destroy(&dec->refn[0], dec->edged_width, dec->edged_height);	image_destroy(&dec->refn[1], dec->edged_width, dec->edged_height);	image_destroy(&dec->tmp, dec->edged_width, dec->edged_height);	image_destroy(&dec->qtmp, dec->edged_width, dec->edged_height);	image_destroy(&dec->cur, dec->edged_width, dec->edged_height);	xvid_free(dec->mpeg_quant_matrices);	xvid_free(dec);	write_timer();	return 0;}static const int32_t dquant_table[4] = {	-1, -2, 1, 2};/* decode an intra macroblock */static voiddecoder_mbintra(DECODER * dec,				MACROBLOCK * pMB,				const uint32_t x_pos,				const uint32_t y_pos,				const uint32_t acpred_flag,				const uint32_t cbp,				Bitstream * bs,				const uint32_t quant,				const uint32_t intra_dc_threshold,				const unsigned int bound,				const int reduced_resolution){	DECLARE_ALIGNED_MATRIX(block, 6, 64, int16_t, CACHE_LINE);	DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE);	uint32_t stride = dec->edged_width;	uint32_t stride2 = stride / 2;	uint32_t next_block = stride * 8;	uint32_t i;	uint32_t iQuant = pMB->quant;	uint8_t *pY_Cur, *pU_Cur, *pV_Cur;	if (reduced_resolution) {		pY_Cur = dec->cur.y + (y_pos << 5) * stride + (x_pos << 5);		pU_Cur = dec->cur.u + (y_pos << 4) * stride2 + (x_pos << 4);		pV_Cur = dec->cur.v + (y_pos << 4) * stride2 + (x_pos << 4);	}else{		pY_Cur = dec->cur.y + (y_pos << 4) * stride + (x_pos << 4);		pU_Cur = dec->cur.u + (y_pos << 3) * stride2 + (x_pos << 3);		pV_Cur = dec->cur.v + (y_pos << 3) * stride2 + (x_pos << 3);	}	memset(block, 0, 6 * 64 * sizeof(int16_t));	/* clear */	for (i = 0; i < 6; i++) {		uint32_t iDcScaler = get_dc_scaler(iQuant, i < 4);		int16_t predictors[8];		int start_coeff;		start_timer();		predict_acdc(dec->mbs, x_pos, y_pos, dec->mb_width, i, &block[i * 64],					 iQuant, iDcScaler, predictors, bound);		if (!acpred_flag) {			pMB->acpred_directions[i] = 0;		}		stop_prediction_timer();		if (quant < intra_dc_threshold) {			int dc_size;			int dc_dif;			dc_size = i < 4 ? get_dc_size_lum(bs) : get_dc_size_chrom(bs);			dc_dif = dc_size ? get_dc_dif(bs, dc_size) : 0;			if (dc_size > 8) {				BitstreamSkip(bs, 1);	/* marker */			}			block[i * 64 + 0] = dc_dif;			start_coeff = 1;			DPRINTF(XVID_DEBUG_COEFF,"block[0] %i\n", dc_dif);		} else {			start_coeff = 0;		}		start_timer();		if (cbp & (1 << (5 - i)))	/* coded */		{			int direction = dec->alternate_vertical_scan ?				2 : pMB->acpred_directions[i];			get_intra_block(bs, &block[i * 64], direction, start_coeff);		}		stop_coding_timer();		start_timer();		add_acdc(pMB, i, &block[i * 64], iDcScaler, predictors, dec->bs_version);		stop_prediction_timer();		start_timer();		if (dec->quant_type == 0) {			dequant_h263_intra(&data[i * 64], &block[i * 64], iQuant, iDcScaler, dec->mpeg_quant_matrices);		} else {			dequant_mpeg_intra(&data[i * 64], &block[i * 64], iQuant, iDcScaler, dec->mpeg_quant_matrices);		}		stop_iquant_timer();		start_timer();		idct(&data[i * 64]);		stop_idct_timer();	}	if (dec->interlacing && pMB->field_dct) {		next_block = stride;		stride *= 2;	}	start_timer();	if (reduced_resolution)	{		next_block*=2;		copy_upsampled_8x8_16to8(pY_Cur, &data[0 * 64], stride);		copy_upsampled_8x8_16to8(pY_Cur + 16, &data[1 * 64], stride);		copy_upsampled_8x8_16to8(pY_Cur + next_block, &data[2 * 64], stride);		copy_upsampled_8x8_16to8(pY_Cur + 16 + next_block, &data[3 * 64], stride);		copy_upsampled_8x8_16to8(pU_Cur, &data[4 * 64], stride2);		copy_upsampled_8x8_16to8(pV_Cur, &data[5 * 64], stride2);	}else{		transfer_16to8copy(pY_Cur, &data[0 * 64], stride);		transfer_16to8copy(pY_Cur + 8, &data[1 * 64], stride);		transfer_16to8copy(pY_Cur + next_block, &data[2 * 64], stride);		transfer_16to8copy(pY_Cur + 8 + next_block, &data[3 * 64], stride);		transfer_16to8copy(pU_Cur, &data[4 * 64], stride2);		transfer_16to8copy(pV_Cur, &data[5 * 64], stride2);	}	stop_transfer_timer();}static voiddecoder_mb_decode(DECODER * dec,				const uint32_t cbp,				Bitstream * bs,				uint8_t * pY_Cur,				uint8_t * pU_Cur,				uint8_t * pV_Cur,				const int reduced_resolution,				const MACROBLOCK * pMB){	DECLARE_ALIGNED_MATRIX(block, 1, 64, int16_t, CACHE_LINE);	DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE);	int stride = dec->edged_width;	int next_block = stride * (reduced_resolution ? 16 : 8);	const int stride2 = stride/2;	int i;	const uint32_t iQuant = pMB->quant;	const int direction = dec->alternate_vertical_scan ? 2 : 0;	const quant_interFuncPtr dequant = dec->quant_type == 0 ? dequant_h263_inter : dequant_mpeg_inter;	for (i = 0; i < 6; i++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区在线观看视频| 国产成人精品在线看| 色婷婷久久久久swag精品| 久久精品人人做人人爽人人| 久久精品国产亚洲a| 欧美一区二区三区免费| 免费成人美女在线观看| 日韩美一区二区三区| 六月丁香婷婷久久| 久久嫩草精品久久久精品一| 国产激情一区二区三区| 中文字幕在线一区二区三区| 91在线看国产| 亚洲123区在线观看| 精品视频免费在线| 经典三级视频一区| 国产精品人成在线观看免费 | 国产欧美一区二区精品婷婷| 国产馆精品极品| 亚洲美女在线一区| 日韩欧美一区在线| 成人久久18免费网站麻豆| 专区另类欧美日韩| 欧美日韩精品系列| 国产美女精品在线| 亚洲日本va午夜在线电影| 欧美一区二区三区不卡| 国产精品88888| 亚洲国产成人av网| 久久亚洲影视婷婷| 一本久久综合亚洲鲁鲁五月天| 爽好久久久欧美精品| 日韩欧美久久久| 91视频精品在这里| 另类中文字幕网| 一区二区三区小说| 久久久久久久久免费| 日本高清免费不卡视频| 麻豆精品视频在线| 一区二区三区日韩精品| 精品国产一区二区三区不卡| 成人精品国产免费网站| 裸体在线国模精品偷拍| 亚洲女性喷水在线观看一区| 日韩美女主播在线视频一区二区三区| 91尤物视频在线观看| 美女视频免费一区| 亚洲高清三级视频| 欧美激情综合网| 日韩一区二区在线观看视频 | 麻豆91在线播放免费| 综合久久国产九一剧情麻豆| 日韩欧美一区电影| 欧美午夜精品一区| 粉嫩绯色av一区二区在线观看| 婷婷综合五月天| 一区二区激情小说| 中文字幕日韩一区二区| 久久蜜桃一区二区| 日韩精品一区二| 日韩一区二区电影在线| 欧美日韩精品免费观看视频 | 国产麻豆91精品| 久久精品国产77777蜜臀| 亚洲午夜av在线| 亚洲资源在线观看| 亚洲人成电影网站色mp4| 欧美激情在线一区二区三区| 26uuu国产日韩综合| 精品国产免费视频| 精品福利一二区| 欧美xxxx老人做受| 欧美成人a∨高清免费观看| 91精品国产综合久久香蕉麻豆| 欧洲精品一区二区三区在线观看| 91网站视频在线观看| 成人精品一区二区三区四区| 国产精品99久久久久久有的能看| 久久精品久久99精品久久| 美女网站在线免费欧美精品| 日日摸夜夜添夜夜添精品视频| 亚洲午夜精品网| 亚洲777理论| 日本欧美肥老太交大片| 日韩国产精品久久久| 三级不卡在线观看| 久久精品99国产精品日本| 麻豆精品视频在线观看视频| 韩国理伦片一区二区三区在线播放| 麻豆成人91精品二区三区| 精品一区二区综合| 成人一级片网址| 95精品视频在线| 欧美视频一区二区三区四区| 欧美色偷偷大香| 欧美一区二区三区视频在线观看| 日韩一区二区三区观看| 欧美sm美女调教| 国产精品成人网| 夜夜嗨av一区二区三区| 日韩高清国产一区在线| 久久精品国产在热久久| 不卡区在线中文字幕| 欧美在线免费观看亚洲| 欧美一级黄色大片| 亚洲国产精品ⅴa在线观看| 中文字幕亚洲一区二区av在线 | 在线观看成人小视频| 欧美性生交片4| 精品国产髙清在线看国产毛片| 久久精品这里都是精品| 亚洲人精品午夜| 日本成人在线看| 波多野结衣视频一区| 欧美性xxxxx极品少妇| 51久久夜色精品国产麻豆| 国产亚洲精品免费| 亚洲一区二区三区影院| 麻豆国产精品一区二区三区 | 91久久免费观看| 日韩一区二区三区免费看| 国产精品久久久久久户外露出| 亚洲国产成人高清精品| 国产福利一区在线观看| 欧美日韩精品福利| 国产精品久久影院| 蜜桃视频一区二区| 99久久久国产精品| 欧美精品一区二区三区蜜桃 | 欧美国产成人在线| 日韩高清一区在线| 91在线视频观看| 久久精品亚洲麻豆av一区二区| 亚洲美女淫视频| 国产精品18久久久久久vr| 欧美日韩精品综合在线| 国产精品视频免费看| 日韩成人av影视| 在线一区二区三区| 中文字幕精品一区| 久久99国产精品尤物| 91久久国产综合久久| 国产精品私人影院| 国产一区二区三区四| 欧美一卡二卡三卡| 亚洲自拍偷拍图区| 色8久久人人97超碰香蕉987| 久久久91精品国产一区二区精品| 青青草成人在线观看| 在线观看欧美日本| 樱桃视频在线观看一区| 大陆成人av片| 国产精品三级久久久久三级| 国产精品资源在线观看| 欧美成人在线直播| 美国毛片一区二区| 日韩欧美一级片| 美女视频网站黄色亚洲| 91精品国产免费久久综合| 亚洲成av人片| 欧美日韩不卡一区二区| 一区二区三区在线看| 色偷偷88欧美精品久久久| 中文字幕日韩一区| 91丨porny丨最新| 国产精品女主播av| 91在线视频观看| 亚洲黄色尤物视频| 欧美视频一区在线观看| 一二三四社区欧美黄| 欧美亚洲国产一区二区三区va| 亚洲素人一区二区| 色综合网色综合| 一区二区三区四区亚洲| 色综合一个色综合| 亚洲午夜在线电影| 欧美精品三级日韩久久| 香蕉久久夜色精品国产使用方法 | 国产一区二区导航在线播放| 精品动漫一区二区三区在线观看| 蜜臀av国产精品久久久久| 91精品国产一区二区三区香蕉| 热久久久久久久| 精品久久久久久久久久久久久久久久久| 欧美a一区二区| 久久久久久久久久久久电影| 国产毛片精品视频| 日本一区二区三区四区| 成人aaaa免费全部观看| 亚洲人精品一区| 5月丁香婷婷综合| 国产精品中文字幕一区二区三区| 国产偷国产偷精品高清尤物| 粉嫩av一区二区三区在线播放| 亚洲三级电影网站| 精品一二线国产| 久久综合九色综合欧美98| 国产乱人伦偷精品视频不卡| 亚洲丝袜自拍清纯另类| 欧美一区二区精品久久911|