⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dither_test.c

📁 杜比AC-3编码解码器(参考程序)
💻 C
字号:
/* 
 *  dither_test.c
 *
 *	Aaron Holtzman - May 1999
 *
 */

#include <stdlib.h>
#include <stdio.h>
#include "ac3.h"
#include "ac3_internal.h"
#include "dither.h"

#include <sys/time.h>
#include <unistd.h>

int main(void)
{
	int i,j,foo;
	struct timeval start,end;

	/*
	for(i=0;i < 65538 ;i++)
		//printf("%04x\n",dither_gen());
		printf("%f\n",((sint_16)dither_gen())/ 32768.0);
	printf("\n");
	*/



	for(j=0;j < 10 ;j++)
	{
		gettimeofday(&start,0);
		for(i=0;i < 10000 ;i++)
		{
			foo = dither_gen();
		}
		gettimeofday(&end,0);
		printf("%f us\n",((end.tv_sec - start.tv_sec) * 1000000 + 
				(end.tv_usec - start.tv_usec))/10000.0);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -