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

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

?? avi2mpg1.c

?? mp3解碼程序vc++環境下運行
?? C
?? 第 1 頁 / 共 2 頁
字號:
	        if(thisPfi.dwHeight>4095)
	        {
		        fprintf(stderr, "\nVerical height must be < 4096!");
		        err = 1;
	        }
        }
        else
        {
            if (thisPfi.dwWidth != masterPfi.dwWidth)
            {
                fprintf(stderr, "\nWidth of all AVI files must match!");
                err=1;
            }
            if (thisPfi.dwHeight != masterPfi.dwHeight)
            {
                fprintf(stderr, "\nHeight of all AVI files must match!");
                err=1;
            }
            if (fabs(fps - (float)masterPfi.dwRate/(float)masterPfi.dwScale) > 0.1)
            {
                fprintf(stderr, "\nFrame rate must be the same for all AVI files!");
                err=1;
            }
        }

	    if(err)
		    exit(11);

	    fprintf(stderr, "\nTotal Video Frames = %u, ", thisPfi.dwLength);
	    fprintf(stderr, "Length = %u sec.", 
			    			(unsigned int)thisPfi.dwLength/(int)(fps+.5));

        if (j==0)
            nextFileFrames[j]=thisPfi.dwLength;
        else
            nextFileFrames[j]=thisPfi.dwLength+nextFileFrames[j-1];


	    if (lpbi->biCompression != BI_RGB)
	    {
		    fprintf(stderr, "\ncan not handle compressed DIBs from codec!\n");
		    err = 1;
	    }

	    if(!video_only)
	    {

		    if (AVIFileGetStream(pfile, &pAudioStreams[j], streamtypeAUDIO, 0))
		    {
		    	fprintf(stderr, "\nCould not open avi audio stream!");
		    	fprintf(stderr, "\nIf this avi has no audio, or you want to generate an");
		    	fprintf(stderr, "\nmpeg video only stream, use the -n option.");
		    	exit(12);
	    	}

		    if (AVIStreamInfo(pAudioStreams[j], &pAudioStreamInfo[j], sizeof(pAudioStreamInfo[j])))
		    {
			    fprintf(stderr, "\nCould not retrieve avi audio stream info!");
			    exit(13);
		    }

		    AVIStreamReadFormat(pAudioStreams[j], 0, 0, &length); // get length of format data
		    if(AVIStreamReadFormat(pAudioStreams[j], 0, &pWavFormat, &length))
		    {
			    fprintf(stderr, "\nCould not retrieve avi audio format info!");
			    exit(14);
		    }

		    fprintf(stderr, "\nAudio Channels = %i, ", pWavFormat.nChannels);
		    fprintf(stderr, "Sample rate = %6.3f KHz, bits per sample = %u\n",
							    (float)pWavFormat.nSamplesPerSec/1000.0, pWavFormat.wBitsPerSample);

            if (j==0)
                nextFileSamples[j]=pAudioStreamInfo[j].dwLength;
            else
                nextFileSamples[j]=pAudioStreamInfo[j].dwLength+nextFileSamples[j-1];

		    if(vcd_parm&&(pWavFormat.nChannels!=2))
		    {
			    fprintf(stderr, "\n for Video CD audio must be stereo!\n"); 
			    err = 1;
		    }

		    if (pWavFormat.wFormatTag != WAVE_FORMAT_PCM)
		    {
			    fprintf(stderr, "\ninput avi audio must be uncompressed PCM!\n");
			    err = 1;
		    }

		    if ((pWavFormat.nSamplesPerSec != 11025) && (pWavFormat.nSamplesPerSec != 22050) && (pWavFormat.nSamplesPerSec != 44100))
		    {
			    fprintf(stderr, "\ninput avi audio sample rate must = 11.025, 22.05, or 44.1 kHz!\n");
			    err = 1;
		    }
		    if ((pWavFormat.wBitsPerSample != 16) && (pWavFormat.wBitsPerSample != 8))
		    {
			    fprintf(stderr, "\ninput avi audio must be 8 or 16 bit!, this file is %i bits\n", pWavFormat.wBitsPerSample);
			    err = 1;
		    }
	    }
	    else
		    fprintf(stderr, "\n");

    }

	if (err == 1)
		exit(15);

    totalFrames=nextFileFrames[numAviFiles-1];

	StripPath(basefilename, basepathname);

	if(mpegfilename[0] != '\0') 
	{
		StripExtension(testfilename, mpegfilename);
		StripPath(intfilename, testfilename); 
	}
	else 
	{
		StripPath(intfilename, basepathname);
	}

	if(use_v_param_file)
	{
		// if parameter file used, add .par extension if none supplied
		StripExtension(testfilename, video_param_filename);
		if(strlen(video_param_filename) == strlen(testfilename))
			strcat(video_param_filename, ".par");
	}

	// call avi2m1v to encode video stream
	strcpy(VideoTempFile, intfilename);
	strcat(VideoTempFile, ".m1v");
	fprintf(stderr, "encoding video stream to %s", VideoTempFile);
	avi2m1v(VideoTempFile);
    for(j=0;j<numAviFiles;j++)
	    AVIStreamGetFrameClose(pget[j]);
	fprintf(stderr, "                                                                              \r");

	// if there were errors during encoding of video, print them
	if(vbv_ovflow!=0)
		fprintf(stderr, "*** WARNING: VBV_BUFFER OVERFLOWED %u TIMES.\n", vbv_ovflow);
	if(vbv_unflow!=0)
		fprintf(stderr, "*** WARNING: VBV_BUFFER UNDERFLOWED %u TIMES.\n", vbv_unflow);
	if(bad_frame_count)
		fprintf(stderr, "*** WARNING: %u CORRUPT VIDEO FRAMES REPLACED BY PREVIOUS GOOD FRAME!\n", bad_frame_count);
	fprintf(stderr, "video encoding complete,");
	time(&current_time);
	el_time = current_time - start_time;
	if(el_time <= 60)
		fprintf(stderr, " elapsed time = %i seconds\n", el_time);
	else if(el_time < 3600)
		fprintf(stderr, " elapsed time = %i minutes\n", (el_time/60)+1);
	else
		fprintf(stderr, " elapsed time = %i hour(s) %i minute(s)\n", el_time/3600, (el_time%3600)/60);
	fprintf(stderr, "average seconds per frame = %5.3f\n", (float)el_time/(float)(totalFrames*frame_repl));

	if(!video_only)
	{
		// call avi2mp2 to encode audio stream

		strcpy(AudioTempFile, intfilename);
		strcat(AudioTempFile, ".mp2");
		fprintf(stderr, "encoding audio stream to %s", AudioTempFile);
		fprintf(stderr, " using bitrate of %u:\n", audio_bitrate_parm*1024);
		avi2mp2(AudioTempFile);
		fprintf(stderr, "\raudio stream encoding complete.\n");
		if(bad_audio_count)
			fprintf(stderr, "***WARNING: %u CORRUPT AUDIO SAMPLES REPLACED BY 0 DATA!\n", bad_audio_count);
	}

	AVIFileRelease(pfile);
	AVIFileExit();

	if(!video_only)
	{
		// check if user supplied outputfile (if any) has an extension,
		// if not, add .mpg
		if(mpegfilename[0] != '\0')
		{
			StripExtension(testfilename, mpegfilename);
			if(strlen(mpegfilename) == strlen(testfilename))
				strcat(mpegfilename, ".mpg");
		}

		// call mplex to create .mpg file
		if(mpegfilename[0] == '\0')
		{
			strcpy(mpegfilename, basefilename); // no output file name supplied,
			strcat(mpegfilename, ".mpg");       // use input filename with .mpg
		}
		fprintf(stderr, "multiplexing video and audio streams to %s:\n", mpegfilename);
		mplex(VideoTempFile, AudioTempFile, mpegfilename);
		fprintf(stderr, "\rmultiplexing complete.\n");
		if(video_end_early)
			fprintf(stderr, "***WARNING: video stream ended early!\n");
		if(audio_end_early)
			fprintf(stderr, "***WARNING: audio stream ended early!\n");
		if(video_time_out)
			fprintf(stderr, "***WARNING: video stream timed out %u times.\n", video_time_out);
		if(audio_time_out)
			fprintf(stderr, "***WARNING: audio strean timed out %u times.\n", audio_time_out);

		// delete temporary files.
		fprintf(stderr, "deleting temporary video and audio files.\n");
		DeleteFile(VideoTempFile);
		DeleteFile(AudioTempFile);
	}

	return(0);
}


void usage()
{
		fprintf(stderr, "\navi2mpg1 - avi to mpeg-1 encoder version %s", VERSION);
		fprintf(stderr, "\nCopyright (C) 1997, 1998, 1999 by John Schlichther");
		fprintf(stderr, "\navi2mpg1 comes with ABSOLUTELY NO WARRANTY");
		fprintf(stderr, "\nThis is free software, and you are welcome to redistribute it");
		fprintf(stderr, "\nunder certain conditions; see file COPYING for details.");
		fprintf(stderr, "\n\n usage: avi2mpg1 [-options] inputfile.avi [inputfile2.avi ...] [outputfile.mpg]");
		fprintf(stderr, "\n  where:  -b byterate (total stream - default 150 KBytes/s)");
		fprintf(stderr, "\n          -s bitrate (total stream - default 1200 Kbits/s)");
		fprintf(stderr, "\n          -a bitrate (audio - default 128Kbits/s)");
		fprintf(stderr, "\n          -l layer (audio - default 2)");
		fprintf(stderr, "\n          -j  (joint stereo)");
		//fprintf(stderr, "\n          -v  (use Video-cd parameters - overides -b, -s, -a, -l, -n, -c)");
		fprintf(stderr, "\n          -p filename.par  video encoding parameter file (optional)");
		fprintf(stderr, "\n          -e ignore avi file errors");
		fprintf(stderr, "\n          -n generate video (.m1v) stream only");
		fprintf(stderr, "\n          -y vbv_buffer_size");
        fprintf(stderr, "\n          -m motion search magnitude, range 0 - 4, default 0");
		fprintf(stderr, "\n          -c horz_size vert_size cropping");
		fprintf(stderr, "\n          -f frame_rate_code 1->5, force frame rate");
		fprintf(stderr, "\n          -h n write sequence header every n-th GOP");
		fprintf(stderr, "\n          -x suppress usage of MMX extensions");
		fprintf(stderr, "\n          -d use double precision math (slower)");
		fprintf(stderr, "\n          -r remove noise from the input video (slow!)");
		fprintf(stderr, "\n          -q fast quantization (less accurate)");
		fprintf(stderr, "\n          -t fast motion compensation level, range 0 - 3, default 0 (normal)");
		fprintf(stderr, "\n          inputfile.avi  any valid avi file to encode");
		fprintf(stderr, "\n          outputfile.mpg  must be specified if there is more than 1 input file\n");
		exit(16);
}

void videocd()
{
		fprintf(stderr, "\nStarting with version 1.9 of avi2mpg1, the -v option");
		fprintf(stderr, "\nhas been disabled. Numerous issues with the -v option");
		fprintf(stderr, "\nprevented it from generating an accurate VideoCD file.");
		fprintf(stderr, "\n");
		fprintf(stderr, "\nA new program, avi2vcd has been written whose only");
		fprintf(stderr, "\npurpose is the generation of VideoCD 2.0 compliant files.");
		fprintf(stderr, "\nThe output of avi2vcd has been used to sucessfully create");
		fprintf(stderr, "\nVideoCD's which have been played back on a DVD player");
		fprintf(stderr, "\n");
		fprintf(stderr, "\nYou can download the latest version of avi2vcd from:");
		fprintf(stderr, "\n         www.mnsi.net/~jschlic1");
		fprintf(stderr, "\n");
		exit(16);
}

unsigned int abitrate[2][14] = {
          {32,64,96,128,160,192,224,256,288,320,352,384,416,448},
          {32,48,56,64,80,96,112,128,160,192,224,256,320,384},
        };

int ValidBitrate(layr, bRate)   /* return 1 if legal bit rate for layer, 0 otherwise */
unsigned int layr;           /* 1 or 2 */
unsigned int bRate;          /* legal rates from 32 to 448 */
{
int     index = 0;
int     found = 0;

    while(!found &&(index < 14))
	{
        if(abitrate[layr-1][index] == bRate)
            found = 1;
        else
            ++index;
    }
    if(found)
        return(1);
    else
        return(0);
}


void StripExtension(char *base, char *source)
{
	int i, period = 0, backslash = 0;

	strcpy(base, source);

	i = strlen(base);
	while((i > 0) && !period && !backslash)
	{
		i--;
		if(base[i] == '.')
			period = 1;
		else if (base[i] == '\\')
			backslash = 1;
	}

	if(i == 0)
		return; // scanned all the way to begining, there is no extension

	if(backslash)
		return; // backslash found before period, there can't be an extension

	// if we're not at i=0, and we didn't find a backslash,
	// then we have to have found a period!

	base[i] = '\0'; // strip off extension
}
//
// StripPath - copy source filename to base and strip
//                 path if any.
//
void StripPath(char *base, char *source)
{
	int i, backslash = 0;
	char *pSource;

	pSource = source;

	i = strlen(source);
	while((i > 0) && !backslash)
	{
		i--;
		if ((source[i] == '\\')||(source[i] == ':'))
			backslash = 1;
	}

	if(backslash)
	{
		pSource = pSource + i + 1;
		strcpy(base, pSource);
	}
	else
		strcpy(base, source);
	return;
}

//測試CPU是否支持MMX
void TestCPU(void)
{

	cpu_MMX = 0;
	cpu_3DNow = 0;


	#define cpuid __asm _emit 0x0F __asm _emit 0xA2
    __asm
    {
		pushfd                          ; 
		pop   eax                       ; 
		mov   ebx, eax                  ; 
		xor   eax, 0x00200000           ; 
		push  eax                       ; 
		popfd                           ; 
		pushfd                          ; 
		pop   eax                       ; 
		cmp   eax, ebx                  ; 
		jz    NO_CPUID                  ; 

	    mov   eax, 0x1
        cpuid
	    test  edx, 0x800000
	    je    NO_MMX
	    mov   cpu_MMX, 0x1


		mov   eax, 0x0
		cpuid
		mov eax, 0x68747541             ; reversed ASCII of "Auth"
		cmp eax, ebx
		jne NO_3DNOW
		mov eax, 0x69746E65             ; reversed ASCII of "enti"
		cmp eax, edx
		jne NO_3DNOW
		mov eax, 0x444D4163             ; reversed ASCII of "cAMD"
		cmp eax, ecx
		jne NO_3DNOW


		mov eax, 0x80000000           ; 
		cpuid
		cmp eax, 0x80000000
		jbe NO_3DNOW
		mov eax, 0x80000001
		cpuid
		test edx, 0x80000000          ; 
		jz NO_3DNOW                   ; 
		mov cpu_3DNow, 0x1            ; 

NO_MMX:
NO_3DNOW:
NO_CPUID:
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区公司| 欧美三级视频在线观看| 国产亚洲精品免费| 国精产品一区一区三区mba视频 | 欧洲av一区二区嗯嗯嗯啊| 亚洲欧洲中文日韩久久av乱码| av网站免费线看精品| 一区二区在线免费观看| 5858s免费视频成人| 麻豆一区二区三| 久久久精品一品道一区| 91老司机福利 在线| 丝袜亚洲另类丝袜在线| 久久天堂av综合合色蜜桃网| av日韩在线网站| 日韩电影在线一区| 国产欧美一区二区三区网站| eeuss鲁片一区二区三区在线看| 亚洲卡通欧美制服中文| 日韩欧美一区二区视频| 丁香五精品蜜臀久久久久99网站 | 精品系列免费在线观看| 国产欧美日韩在线| 欧美在线观看视频一区二区三区| 奇米四色…亚洲| 国产精品久久夜| 欧美日本高清视频在线观看| 国产一区视频在线看| 一区二区三区精品视频在线| 精品入口麻豆88视频| 91农村精品一区二区在线| 免费观看在线综合色| 伊人婷婷欧美激情| 久久综合九色综合欧美98| 色综合咪咪久久| 捆绑变态av一区二区三区| 亚洲精品国久久99热| 精品少妇一区二区三区视频免付费| av电影一区二区| 蜜桃在线一区二区三区| 亚洲自拍与偷拍| 国产日韩欧美不卡| 欧美岛国在线观看| 欧美日韩国产精品成人| 成人av高清在线| 韩国视频一区二区| 日韩中文字幕av电影| 亚洲人成精品久久久久久| 久久先锋影音av鲁色资源| 91精品国产品国语在线不卡| 在线观看不卡视频| av中文字幕亚洲| 国产成人免费高清| 韩日av一区二区| 久久精品国产99| 午夜婷婷国产麻豆精品| 亚洲男人天堂一区| 国产精品不卡一区二区三区| 久久久久久免费| 国产午夜亚洲精品不卡| 精品精品国产高清一毛片一天堂| 欧美久久一区二区| 精品视频一区三区九区| 在线一区二区三区四区五区| av一区二区三区在线| 成人精品免费视频| 国产福利精品一区二区| 国产米奇在线777精品观看| 久久国产福利国产秒拍| 美日韩一区二区| 免费观看日韩电影| 奇米888四色在线精品| 日韩和欧美的一区| 日日夜夜精品视频天天综合网| 1区2区3区国产精品| 亚洲欧洲三级电影| 亚洲视频小说图片| 亚洲色图视频网| 亚洲激情六月丁香| 一区二区久久久久久| 一区二区三区日韩在线观看| 一区二区三区四区在线播放| 一区二区三区美女| 亚洲国产美女搞黄色| 夜夜揉揉日日人人青青一国产精品| 樱花草国产18久久久久| 亚洲成人精品一区二区| 日韩国产高清在线| 久久精品国产网站| 国产suv一区二区三区88区| 成人av在线电影| 91黄色免费看| 欧美一区二区视频免费观看| 日韩午夜av电影| 国产日韩欧美综合在线| 亚洲男同性恋视频| 日韩中文字幕麻豆| 国内精品在线播放| 成人免费av网站| 欧美日韩另类国产亚洲欧美一级| 91精品国产免费久久综合| 久久看人人爽人人| 亚洲品质自拍视频网站| 亚洲成av人片一区二区梦乃| 黄色日韩三级电影| 91女人视频在线观看| 91精品国产一区二区人妖| 久久综合久色欧美综合狠狠| 亚洲人成人一区二区在线观看| 天堂精品中文字幕在线| 国产成人在线免费观看| 欧洲中文字幕精品| 久久综合成人精品亚洲另类欧美| 亚洲欧洲国产日韩| 欧美96一区二区免费视频| 丰满岳乱妇一区二区三区| 欧美日韩在线亚洲一区蜜芽| 国产亚洲欧洲一区高清在线观看| 亚洲婷婷国产精品电影人久久| 午夜精品久久久久久久久| 国产成人精品免费网站| 欧美日韩在线观看一区二区 | 国产精品久久久久aaaa樱花| 偷拍自拍另类欧美| 99国产一区二区三精品乱码| 欧美一级视频精品观看| 中文字幕综合网| 久久国产三级精品| 欧美日韩一区高清| 国产精品乱码一区二区三区软件| 首页欧美精品中文字幕| 97久久精品人人爽人人爽蜜臀| 欧美丰满高潮xxxx喷水动漫| 国产日产欧美一区| 久久精品国产澳门| 欧美老肥妇做.爰bbww视频| 国产精品国产馆在线真实露脸| 麻豆国产91在线播放| 欧美性欧美巨大黑白大战| 中文文精品字幕一区二区| 五月婷婷激情综合| 色综合久久久久网| 国产精品嫩草影院av蜜臀| 久久国产精品露脸对白| 在线成人午夜影院| 亚洲国产一二三| 99久久伊人精品| 国产午夜精品美女毛片视频| 久久精品国产亚洲高清剧情介绍 | 久久久蜜臀国产一区二区| 丝袜美腿亚洲一区| 在线观看日韩一区| 亚洲欧美乱综合| 波波电影院一区二区三区| 国产偷国产偷精品高清尤物| 麻豆免费看一区二区三区| 欧美一激情一区二区三区| 无吗不卡中文字幕| 欧美男人的天堂一二区| 亚洲国产成人91porn| 欧美在线观看一二区| 亚洲午夜av在线| 欧美午夜精品电影| 亚洲午夜久久久| 欧美色涩在线第一页| 亚洲一区二区三区在线播放| 91一区二区在线| 成人免费视频在线观看| 91色.com| 亚洲大片一区二区三区| 欧美日韩在线三区| 亚洲成av人片在线观看无码| 欧美精品乱码久久久久久| 丝袜诱惑制服诱惑色一区在线观看| 欧美日韩一区二区在线视频| 日韩精品一级二级| 91精品国产色综合久久| 极品美女销魂一区二区三区| 国产亚洲自拍一区| 成人免费的视频| 亚洲欧美一区二区三区极速播放| 日本久久一区二区| 日韩国产欧美在线视频| 欧美va日韩va| youjizz国产精品| 一区二区免费在线| 日韩一区二区精品| 岛国精品一区二区| 亚洲欧美一区二区不卡| 欧美电影在线免费观看| 国产一区二区三区黄视频| 国产精品久久久久7777按摩| 在线视频中文字幕一区二区| 免费久久99精品国产| 欧美激情中文字幕| 欧美午夜寂寞影院| 国产精品影视天天线| 亚洲最新在线观看| 日韩欧美成人午夜| 色综合天天综合色综合av|