如何在vc6下编译x264

如何在vc6下编译x264

Peter Lee(lspbeyond@sohu.com)

 

==============================================

NOTE: 目前我已提供x264vc6,vc7下成功编译的源代码,每周更新一次。

大家可以直接下载使用,省去一些麻烦。

http://lspbeyond.go1.icpcn.com/x264/index.htm

==============================================

1、下载x264

x264的主页:http://videolan.org/

x264是用版权控制工具CVS进行更新的,其主页上不提供源码压缩包,所以我们要用专用的工具下载。

工具名:TortoiseSVN

使用方法:如图1所示。其中下载地址为:svn://svn.videolan.org/x264/trunk/

1

 

2、准备编译环境所需文件

note:23部分参考了《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.asp
The service pack contains all the latest bug fixes for Visual C++ 6.0 as well as updates to essential libraries. You can download the service pack or order it on CD from the Microsoft Developers Network (MSDN) by clicking the link above.
vc6补丁,所选的语言和VC的语言一致就可以了

2) Visual C++ 6.0 Processor Pack - http://msdn.microsoft.com/vstudio/downloads/tools/ppack/default.aspx
The 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.asp
To build the DirectShow filter, you need the DirectX SDK (Software Development Kit). Unfortunately for dial-up users, the ~200MB DirectX SDK is no longer available on CD.
编译x264中的vfw工程时要用到

 

3、设置编译环境

1) Installing Service Pack 5

The Service Pack is easy to install since it comes with an installer. The installer's filename is "setupsp5.exe". Just find the file and double-click it.
自解压后,运行setupsp5.exe

2) Installing Visual C++ Processor Pack

Double-click "vcpp5.exe" to install.

3) Installing and Configuring NASM

Xvid expects the filename to be "nasm.exe" (probably because all other versions except the Win32 version has that name). For some reason, the Win32 version NASM has a filename of "nasmw.exe." I recommend making 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 1

 

3)、将x264.c中的含strncasecmp的代码部分进行注释或改写

strncasecmp函数的功能是不考虑大小写的情况,比较两个字符串,vc6下没有这个库函数。

strncasecmp部分的代码都是用来检验输入参数的文件扩展名的,注释后表示这一功能丧失,故建议改写。

 

<script type="text/javascript"> google_ad_client = "pub-7168982058404735"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel = ""; google_color_border = "C3D9FF"; google_color_bg = "FFFFFF"; google_color_link = "3D81EE"; google_color_text = "000000"; google_color_url = "008000"; google_ui_features = "rc:0"; google_language = 'zh-CN'; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 107
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 107
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值