如何在vc6下编译x264

来源:百度文库 编辑:神马文学网 时间:2024/04/27 19:34:16

如何在vc6下编译x264收藏

 | 旧一篇: 用udp实现HTTP Streaming协议从指定的url拉流

Peter Lee(lspbeyond@sohu.com) 1、下载x264 x264的主页:http://videolan.org/x264是用版权控制工具CVS进行更新的,其主页上不提供源码压缩包,所以我们要用专用的工具下载。工具名:TortoiseSVN使用方法:如图1所示。其中下载地址为:svn://svn.videolan.org/x264/trunk/图1   2、准备编译环境所需文件note:2和3部分参考了《How to Compile XviD with Microsoft Visual C++ 6.0》一文的内容1) Service Pack 5 for Visual Studio 6 - http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspThe service pack contains all the latest bug fixes for Visual C++ 6.0 as well as updates to essential libraries. You candownload the service pack or order it on CD from the Microsoft Developers Network (MSDN) by clicking the linkabove.vc6补丁,所选的语言和VC的语言一致就可以了2) Visual C++ 6.0 Processor Pack - http://msdn.microsoft.com/vstudio/downloads/tools/ppack/default.aspxThe processors pack adds support for Intel's SSE, SEE2 and AMD's 3DNow! instructions.支持处理器多媒体汇编指令的补丁3) NASM - the famous Netwide Assembler - http://sourceforge.net/projects/nasm/Xvid uses NASM to "compile" the code written in assembly language (the *.asm files). Download the Win32 binary.x264同样会用到这个编译器4) DirectX 9.0 SDK - http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.aspTo build the DirectShow filter, you need the DirectX SDK (Software Development Kit). Unfortunately for dial-upusers, the ~200MB DirectX SDK is no longer available on CD.编译x264中的vfw工程时要用到3、设置编译环境 1) Installing Service Pack 5file and double-click it.自解压后,运行setupsp5.exe2) Installing Visual C++ Processor PackDouble-click "vcpp5.exe" to install.3) Installing and Configuring NASMXvid expects the filename to be "nasm.exe" (probably because all other versions except the Win32 version hasthat name). For some reason, the Win32 version NASM has a filename of "nasmw.exe." I recommendmaking a copy of "nasmw.exe" and renaming it "nasm.exe."文件名一定要改成nasm.exe ,拷贝到Microsoft Visual Studio6\vc98\bin下即可4) Installing and Configuring the DirectX SDK略4x264程序改动1)、文件格式转换unix->dos: build\win32下的三个工程文件。网上下个名为unix2dos的小工具,或用写字板另存为的方法。2)、在common.h头部加入#define HAVE_STDINT_H 13)、将x264.c中的含strncasecmp的代码部分进行注释或改写strncasecmp函数的功能是不考虑大小写的情况,比较两个字符串,vc6下没有这个库函数。strncasecmp部分的代码都是用来检验输入参数的文件扩展名的,注释后表示这一功能丧失,故建议改写。