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

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

?? timer.c

?? 用MPEG-4對YUV視頻文件編碼壓縮成divx視頻文件
?? C
字號:
 /******************************************************************************
  *                                                                            *
  *  This file is part of XviD, a free MPEG-4 video encoder/decoder            *
  *                                                                            *
  *  XviD is an implementation of a part of one or more MPEG-4 Video tools     *
  *  as specified in ISO/IEC 14496-2 standard.  Those intending to use this    *
  *  software module in hardware or software products are advised that its     *
  *  use may infringe existing patents or copyrights, and any such use         *
  *  would be at such party's own risk.  The original developer of this        *
  *  software module and his/her company, and subsequent editors and their     *
  *  companies, will have no liability for use of this software or             *
  *  modifications or derivatives thereof.                                     *
  *                                                                            *
  *  XviD 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.                                       *
  *                                                                            *
  *  XviD 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  *
  *                                                                            *
  ******************************************************************************/

 /******************************************************************************
  *                                                                            *
  *  timer.c, some timing functions                                            *
  *                                                                            *
  *  Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org>                  *
  *                                                                            *
  *  For more information visit the XviD homepage: http://www.xvid.org         *
  *                                                                            *
  ******************************************************************************/

 /******************************************************************************
  *                                                                            *
  *  Revision history:                                                         *
  *       
  *  26.03.2002 interlacing timer added
  *  21.12.2001 edges error fixed
  *  17.11.2001 small clean up (Isibaar)                                       *
  *  13.11.2001	inlined rdtsc call and moved to portab.h (Isibaar)             *
  *  02.11.2001 initial version (Isibaar)                                      *
  *                                                                            *
  ******************************************************************************/

#include <stdio.h>
#include <time.h>
#include "timer.h"

#if defined(_PROFILING_)

#ifndef _TRIMEDIA
struct ts
{
	int64_t current;
	int64_t global;
	int64_t overall;
	int64_t dct;
	int64_t idct;
	int64_t quant;
	int64_t iquant;
	int64_t motion;
	int64_t comp;
	int64_t edges;
	int64_t inter;
	int64_t conv;
	int64_t trans;
	int64_t prediction;
	int64_t coding;
	int64_t interlacing;
	int64_t cost;
};

struct ts tim;


double frequency = 0.0;

/* 
    determine cpu frequency
	not very precise but sufficient
*/
double
get_freq()
{
	int64_t x, y;
	int32_t i;

	i = time(NULL);/* second */

	while (i == time(NULL));

	x = read_counter();
	i++;

	while (i == time(NULL));

	y = read_counter();

	return (double) (y - x) / 1000.;
}

/* set everything to zero */
void
start_timer()
{
	tim.current = read_counter();
}

void
stop_cost_timer()
{
	tim.cost = (read_counter() - tim.current);
}

void
init_timer()
{
	frequency = get_freq();
    printf("cpu frequency is %f KHz \n",frequency);
    
	count_frames = 0;
	start_timer();
	stop_cost_timer();
    
	tim.dct = tim.quant = tim.idct = tim.iquant = tim.motion =tim.comp = tim.conv =
		tim.edges = tim.inter = tim.interlacing = tim.trans = tim.prediction =
		tim.coding = tim.overall = 0;
}

void
start_global_timer()
{
	tim.global = read_counter();
}

void
stop_dct_timer()
{
	tim.dct += (read_counter() - tim.current-tim.cost);
}

void
stop_idct_timer()
{
	tim.idct += (read_counter() - tim.current-tim.cost);
}

void
stop_quant_timer()
{
	tim.quant += (read_counter() - tim.current-tim.cost);
}

void
stop_iquant_timer()
{
	tim.iquant += (read_counter() - tim.current-tim.cost);
}

void
stop_motion_timer()
{
	tim.motion += (read_counter() - tim.current-tim.cost);
}

void
stop_comp_timer()
{
	tim.comp += (read_counter() - tim.current-tim.cost);
}

void
stop_edges_timer()
{
	tim.edges += (read_counter() - tim.current-tim.cost);
}

void
stop_inter_timer()
{
	tim.inter += (read_counter() - tim.current-tim.cost);
}

void
stop_conv_timer()
{
	tim.conv += (read_counter() - tim.current-tim.cost);
}

void
stop_transfer_timer()
{
	tim.trans += (read_counter() - tim.current-tim.cost);
}

void
stop_prediction_timer()
{
	tim.prediction += (read_counter() - tim.current-tim.cost);
}

void
stop_coding_timer()
{
	tim.coding += (read_counter() - tim.current-tim.cost);
}

void
stop_interlacing_timer()
{
	tim.interlacing += (read_counter() - tim.current - tim.cost);
}

void
stop_global_timer()
{
	tim.overall += (read_counter() - tim.global - tim.cost );
}
#endif

/*
    write log file with some timer information
*/
#ifndef _TRIMEDIA
int64_t pre_time=0;
#endif

void
write_timer()
{
	float dct_per, quant_per, idct_per, iquant_per, mot_per, comp_per,
		interlacing_per;
	float edges_per, inter_per, conv_per, trans_per, pred_per, cod_per,
		measured;
	float sum_ticks = 0;

#ifdef _TRIMEDIA        
    float frequency = 200000;/* 200 MHz*/
#else
/*	printf("time_motion= %d ms \n",(int)((tim.motion-pre_time)/frequency));
	pre_time=tim.motion;*/
#endif

	count_frames++;
	/* only write log file every 50 processed frames */
	if (!(count_frames % 50)) {
		FILE *fp;

		fp = fopen("encoder.log", "a");

		dct_per =
			(float) (((float) ((float) tim.dct / (float) tim.overall)) *
					 100.0);
		quant_per =
			(float) (((float) ((float) tim.quant / (float) tim.overall)) *
					 100.0);
		idct_per =
			(float) (((float) ((float) tim.idct / (float) tim.overall)) *
					 100.0);
		iquant_per =
			(float) (((float) ((float) tim.iquant / (float) tim.overall)) *
					 100.0);
		mot_per =
			(float) (((float) ((float) tim.motion / (float) tim.overall)) *
					 100.0);
		comp_per =
			(float) (((float) ((float) tim.comp / (float) tim.overall)) *
					 100.0);
		edges_per =
			(float) (((float) ((float) tim.edges / (float) tim.overall)) *
					 100.0);
		inter_per =
			(float) (((float) ((float) tim.inter / (float) tim.overall)) *
					 100.0);
		conv_per =
			(float) (((float) ((float) tim.conv / (float) tim.overall)) *
					 100.0);
		trans_per =
			(float) (((float) ((float) tim.trans / (float) tim.overall)) *
					 100.0);
		pred_per =
			(float) (((float) ((float) tim.prediction / (float) tim.overall)) *
					 100.0);
		cod_per =
			(float) (((float) ((float) tim.coding / (float) tim.overall)) *
					 100.0);
		interlacing_per =
			(float) (((float) ((float) tim.interlacing / (float) tim.overall))
					 * 100.0);

		sum_ticks =
			(float)(tim.coding + tim.conv + tim.dct + tim.idct + tim.interlacing +
			tim.edges + tim.inter + tim.iquant + tim.motion + tim.prediction +
			tim.quant + tim.trans + tim.comp);

		measured =
			(float) (((float) ((float) sum_ticks / (float) tim.overall)) *
					 100.0);

                fprintf(fp,"cpu frequency is %f KHz \n",frequency);
                fprintf(fp,"once 50frame output once infroamtion:\n");
				fprintf(fp,"call time function cost is %ld cycles \n",tim.cost);
		fprintf(fp,
				"DCT:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Quant:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"IDCT:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"IQuant:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Mot estimation:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Mot compensation:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Edges:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Interpolation:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"RGB2YUV:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Transfer:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Prediction:\nTotal time: %f ms (%3f percent of total encoding time)\n\n"
				"Coding:\nTotal time: %f ms (%3f percent of total encoding time)\n\n\n"
				"Interlacing:\nTotal time: %f ms (%3f percent of total encoding time)\n\n\n"
				"Overall encoding time: %f ms, we measured %f ms (%3f percent)\n",
				(float) (tim.dct / frequency), dct_per,
				(float) (tim.quant / frequency), quant_per,
				(float) (tim.idct / frequency), idct_per,
				(float) (tim.iquant / frequency), iquant_per,
				(float) (tim.motion / frequency), mot_per,
				(float) (tim.comp / frequency), comp_per,
				(float) (tim.edges / frequency), edges_per,
				(float) (tim.inter / frequency), inter_per,
				(float) (tim.conv / frequency), conv_per,
				(float) (tim.trans / frequency), trans_per,
				(float) (tim.prediction / frequency), pred_per,
				(float) (tim.coding / frequency), cod_per,
				(float) (tim.interlacing / frequency), interlacing_per,
				(float) (tim.overall / frequency),
				(float) (sum_ticks / frequency), measured);

		fclose(fp);
	}
}       
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品人| 在线免费观看不卡av| 国产精品国产三级国产a| 在线中文字幕一区| 欧美a一区二区| 国产亚洲精品aa| 欧美自拍偷拍午夜视频| 亚洲大片精品永久免费| 久久综合色婷婷| 91原创在线视频| 日产国产高清一区二区三区| 国产视频一区在线播放| 欧美色偷偷大香| 国产传媒日韩欧美成人| 久久久久久9999| 欧美日韩国产成人在线免费| 懂色一区二区三区免费观看| 午夜影院在线观看欧美| 日本一区二区三区四区 | 激情六月婷婷久久| 亚洲欧美日韩一区二区三区在线观看 | 国产欧美视频一区二区| 欧美亚洲禁片免费| 国产成a人亚洲精品| 视频一区欧美日韩| 日韩一区在线看| 欧美精品18+| 波多野结衣中文字幕一区二区三区| 亚洲成人激情综合网| 国产亲近乱来精品视频| 91色九色蝌蚪| 国产成人午夜电影网| 日本不卡视频在线观看| 亚洲精品成人少妇| 国产欧美日韩精品一区| 欧美一区二区三区在线观看| eeuss鲁片一区二区三区在线看| 久久99精品久久久久久动态图 | 国产乱码一区二区三区| 日韩不卡手机在线v区| 一区二区免费在线| 国产精品国产自产拍在线| 久久婷婷综合激情| 欧美一区二区三区在线看| av电影天堂一区二区在线观看| 卡一卡二国产精品| 日本三级亚洲精品| 1024国产精品| 国产精品网友自拍| 久久久国产一区二区三区四区小说| 欧美一区二区在线播放| 欧美另类久久久品| 欧美三级日韩在线| 欧美日韩国产综合视频在线观看| 国产精品77777| 韩日av一区二区| 狠狠色狠狠色综合| 国产在线不卡一卡二卡三卡四卡| 亚洲一区二区精品视频| 亚洲一区二区三区自拍| 亚洲免费观看高清在线观看| 亚洲欧美aⅴ...| 亚洲乱码精品一二三四区日韩在线| 中文字幕一区二区三区不卡在线| 久久综合99re88久久爱| 欧美精品一区二区三区视频| 欧美成人国产一区二区| 91精品国产欧美日韩| 日韩一级完整毛片| 精品久久一区二区| 精品久久久久久久一区二区蜜臀| 欧美电影免费观看高清完整版在 | 五月婷婷欧美视频| 九色综合国产一区二区三区| 国产伦精品一区二区三区视频青涩 | 亚洲成av人片一区二区三区| 老司机精品视频在线| 丰满岳乱妇一区二区三区| 日本久久电影网| 日韩女优制服丝袜电影| 国产精品污网站| 亚洲成人黄色影院| 国产成人av一区二区三区在线观看| 99这里只有精品| 666欧美在线视频| 日本一区二区成人| 亚洲一区二区三区四区不卡| 韩国视频一区二区| 在线观看免费一区| 国产视频在线观看一区二区三区| 亚洲精品ww久久久久久p站| 蜜臀av一级做a爰片久久| 91丝袜美腿高跟国产极品老师| 91精品国产色综合久久| 亚洲人成7777| 国产伦精品一区二区三区视频青涩 | 亚洲欧洲日韩在线| 久久精品国产亚洲5555| 色妞www精品视频| 亚洲精品一区二区三区福利| 亚洲欧洲中文日韩久久av乱码| 久久精品国产精品亚洲精品| 91免费版在线| 久久久久久97三级| 日韩精品成人一区二区三区| 成人ar影院免费观看视频| 欧美最猛黑人xxxxx猛交| 美女在线视频一区| 《视频一区视频二区| 欧美韩日一区二区三区四区| 午夜国产精品一区| 99re热视频精品| 精品国产乱子伦一区| 亚洲成人av在线电影| eeuss鲁片一区二区三区| 2017欧美狠狠色| 午夜视黄欧洲亚洲| 91丨九色丨蝌蚪富婆spa| 久久精品水蜜桃av综合天堂| 日韩av电影免费观看高清完整版 | 国产欧美一区二区精品婷婷| 美国三级日本三级久久99| 欧美性色黄大片手机版| 亚洲视频电影在线| 成人性生交大合| 国产清纯美女被跳蛋高潮一区二区久久w | 经典三级在线一区| 欧美一区二区在线观看| 视频精品一区二区| 欧美日韩国产综合一区二区| 亚洲一区免费在线观看| 在线国产亚洲欧美| 亚洲精品成人在线| 在线免费观看一区| 亚洲精品国产a| 在线精品视频小说1| 一区二区欧美在线观看| 欧美在线观看你懂的| 一区二区三区高清不卡| 欧美中文字幕久久| 亚洲一区二区三区在线| 欧美日韩一区二区在线视频| 亚洲午夜在线观看视频在线| 欧美日韩一区精品| 日韩不卡一区二区| 日韩欧美一二三区| 国模套图日韩精品一区二区| 久久久久久久久久久电影| 国产精品69毛片高清亚洲| 久久精品一区蜜桃臀影院| 国产91露脸合集magnet| 国产精品久久久久影院色老大| 成人国产精品免费观看动漫| 综合婷婷亚洲小说| 欧美性受xxxx| 免费成人在线播放| 久久久精品tv| 91香蕉视频在线| 亚洲国产精品麻豆| 日韩一级片网站| 国产成人免费高清| 亚洲欧美日韩小说| 欧美高清性hdvideosex| 轻轻草成人在线| 国产片一区二区| 在线观看日韩电影| 美日韩一区二区三区| 国产女人18毛片水真多成人如厕| 99精品国产99久久久久久白柏 | 国产精品夜夜爽| 亚洲精品亚洲人成人网| 制服丝袜亚洲播放| 国产另类ts人妖一区二区| 国产精品国产三级国产普通话蜜臀 | 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩国产高清一区二区 | 欧美日韩情趣电影| 国产一区二区美女诱惑| 亚洲图片激情小说| 日韩一区二区三区电影在线观看 | 欧美丰满美乳xxx高潮www| 国产综合色视频| 自拍偷拍亚洲欧美日韩| 欧美一区二区三区免费大片| 国产宾馆实践打屁股91| 午夜在线成人av| 国产精品免费网站在线观看| 欧美体内she精高潮| 国产精品一二三区| 婷婷久久综合九色综合绿巨人| 国产日韩视频一区二区三区| 欧美日韩精品三区| 高清不卡一二三区| 日本aⅴ免费视频一区二区三区 | 亚洲第一综合色| 欧美国产欧美亚州国产日韩mv天天看完整 | 中文字幕免费不卡在线| 欧美一区二区三区爱爱| 欧洲激情一区二区| 成人免费高清在线观看|