在编译VP8的过程中遇到点问题,Windows编译个东西累死个人。
* /cyddrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin
*./vcvars32.bat amd64
源码使用这里的:http://code.google.com/p/webm/downloads/list
msys比较简单,可以按http://www.webmproject.org/code/build-prerequisites/这里的来,也直接使用svn检出这个,或者访问下载:
http://src.chromium.org/svn/trunk/deps/third_party/mingw
下载这个文件:mingw-get-inst-20101030.exe
安装的时候
在Repository Catalogues时选择:Download lastest repository catalogues
在Select Components时选择:C++ Compiler/MSYS Basic System之类
C:\MinGW\msys\1.0\msys.bat可以创建一个桌面快捷方式
C:\MinGW\msys\1.0\etc中的fstab中可以加入用户可以访问的文件系统。比如你的源代码在D:
可以增加
D:\ /src
记得yasm要在Microsoft VC目录中,比如C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin,这个路径也要加到PATH环境变量里。
配置64位vs10环境,不过脚本最高支持到vs9
./configure –target= x86_64-win64-vs9
$ ./configure --target=x86_64-win64-vs9 Configuring selected codecs enabling vp8_encoder enabling vp8_decoder Configuring for target 'x86_64-win64-vs9' enabling x86_64 enabling runtime_cpu_detect enabling mmx enabling sse enabling sse2 enabling sse3 enabling ssse3 enabling sse4_1 using yasm disabling ccache enabling postproc Bypassing toolchain for environment detection. Creating makefiles for x86_64-win64-vs9 libs Creating makefiles for x86_64-win64-vs9 examples Creating makefiles for x86_64-win64-vs9 docs Creating makefiles for x86_64-win64-vs9 solution
在VS的vpx项目设置中yasm的包含路径我去掉了.才好用***。这个问题值得注意。
可以参考的信息:
./configure参数
Usage: configure [options] Options: Build options: --help print this message --log=yes|no|FILE file configure log is written to [config.err] --target=TARGET target platform tuple [generic-gnu] --cpu=CPU optimize for a specific cpu rather than a family --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [] --enable-extra-warnings emit harmless warnings (always non-fatal) --enable-werror treat warnings as errors, if possible (not available with all compilers) --disable-optimizations turn on/off compiler optimization flags --enable-pic turn on/off Position Independent Code --enable-ccache turn on/off compiler cache --enable-debug enable/disable debug mode --enable-gprof enable/disable gprof profiling instrumentation --enable-gcov enable/disable gcov coverage instrumentation Install options: --enable-install-docs control whether docs are installed --disable-install-bins control whether binaries are installed --disable-install-libs control whether libraries are installed --enable-install-srcs control whether sources are installed Advanced options: --disable-libs don't build libraries --disable-examples don't build examples --libc=PATH path to alternate libc --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred] --disable-fast-unaligned don't use unaligned accesses, even when supported by hardware [auto] --enable-codec-srcs in/exclude codec library source code --enable-debug-libs in/exclude debug version of libraries --disable-md5 support for output of checksum data --enable-static-msvcrt use static MSVCRT (VS builds only) --enable-vp8 VP8 codec support --enable-internal-stats output of encoder internal stats for debug, if supported (encoders) --enable-mem-tracker track memory usage --enable-postproc postprocessing --disable-multithread multithreaded encoding and decoding. --disable-spatial-resampling spatial sampling (scaling) support --enable-realtime-only enable this option while building for real-time encoding --enable-error-concealment enable this option to get a decoder which is able to conceal losses --enable-runtime-cpu-detect runtime cpu detection --enable-shared shared library support --disable-static static library support --enable-small favor smaller size over speed --enable-postproc-visualizer macro block / block level visualizers Codecs: Codecs can be selectively enabled or disabled individually, or by family: --disable-<codec> is equivalent to: --disable-<codec>-encoder --disable-<codec>-decoder Codecs available in this distribution: vp8: encoder decoder NOTES: Object files are built at the place where configure is launched. All boolean options can be negated. The default value is the opposite of that shown above. If the option --disable-foo is listed, then the default value for foo is enabled. Supported targets: armv5te-linux-rvct armv5te-linux-gcc armv5te-none-rvct armv5te-symbian-gcc armv6-darwin-gcc armv6-linux-rvct armv6-linux-gcc armv6-none-rvct armv6-symbian-gcc iwmmxt-linux-rvct iwmmxt-linux-gcc iwmmxt2-linux-rvct iwmmxt2-linux-gcc armv7-darwin-gcc armv7-linux-rvct armv7-linux-gcc armv7-none-rvct mips32-linux-gcc ppc32-darwin8-gcc ppc32-darwin9-gcc ppc32-linux-gcc ppc64-darwin8-gcc ppc64-darwin9-gcc ppc64-linux-gcc sparc-solaris-gcc x86-darwin8-gcc x86-darwin8-icc x86-darwin9-gcc x86-darwin9-icc x86-linux-gcc x86-linux-icc x86-solaris-gcc x86-win32-gcc x86-win32-vs7 x86-win32-vs8 x86-win32-vs9 x86_64-darwin9-gcc x86_64-darwin10-gcc x86_64-linux-gcc x86_64-linux-icc x86_64-solaris-gcc x86_64-win64-vs8 x86_64-win64-vs9 universal-darwin8-gcc universal-darwin9-gcc generic-gnu
终于搞定了。需要将vpx项目中yasm的include设置,从.;..\src直接修改成一个路径,可以是绝对路径或者直接使用..\src。.不需要特别指出。
参考:
1. vs2010编译vp8
2. VP8视频格式初探
5.YASM
6. Using MSYS
7. depot_tools
8. msys-cn
9. MSYS wiki
10. MSys的安装和使用
11. 直接下载MSYS
12. http://www.optimasc.com/products/dex/index.html
13. http://www.ioncannon.net/meta/1128/compiling-webm-ffmpeg-windows/
15. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Software_encoder_feature_comparison
16. http://alex.jurkiewi.cz/blog/2010/cross-compiling-x264-for-win32-on-ubuntu-linux
17. http://micksam7.com/blog/2010/webm-ffmpeg-win32-build/
20. http://doom10.org/index.php?topic=3.0
21. http://www.videolan.org/developers/x264.html
22.http://bbs.chinavideo.org/viewthread.php?tid=6945&highlight=VS2008
23. https://wiki.mozilla.org/WebM/Updating_libvpx
24.