[x264-devel] Compiling x264 with Visual Studio 2010 and Intel compiler

Kovacs Peter p.kovacs at holografika.com
Tue Dec 9 13:09:06 CET 2014


>
>
> On Tue, Sep 16, 2014 at 6:26 AM, Steve Borho <steve at borho.org 
> <mailto:steve at borho.org>> wrote:
>
>     On 09/16, Kovacs Peter wrote:
>     > Hi All,
>     >
>     > maybe somebody else will also find this useful, so let me share my
>     > experience with compiling x264 with Visual Studio 2010 SP1 and
>     Intel(R) C++
>     > Compiler XE 15.0.
>     > I have used the latest stable tarball
>     (x264-snapshot-20140915-2245-stable).
>     > -create a new Win32 console application, create an empty project
>     > -create appropriate filters under Source files and Header files
>     to retain
>     > structure: common, encoder, extras, filters, filters/video,
>     input, output
>     > -add .c and .h files from these directories to the project
>     (including those
>     > not located in subdirs), except:
>     >     common/opencl.c, common/opencl.h, encoder/rdo.c,
>     encoder/slicetype.c,
>     > input/ffms.c, input/lavf.c, output/mp4.c, output/mp4_lsmash.c
>     > -right click the project file, and choose to use Intel C++ compiler
>     > -in project properties, under C/C+ / Language [Intel C++] /
>     Enable C99
>     > support, choose Yes for All Configurations
>     > -in project properties, under C/C+ / Output Files, change Object
>     File Name
>     > to "$(IntDir)/%(RelativeDir)/", for All Configurations (to get
>     rid of these
>     > link errors
>     http://stackoverflow.com/questions/3695174/visual-studio-2010s-strange-warning-lnk4042)
>     > -in project properties, under C/C+ / General, add "extras" and
>     "." into
>     > Additional Include Directories, for All Configurations
>     > -in project properties, under C/C+ / Preprocessor, add
>     "HAVE_CONFIG_H" into
>     > Preprocessor definitions, for All Configurations
>     > -create x264_config.h and config.h with the attached contents,
>     and add them
>     > to the project
>     > -compile!
>     >
>     > This will result in an x264 binary that does not use asm
>     functions, OpenCL,
>     > or any other acceleration, nor will support many input/output
>     formats, but
>     > can be used for experimentation, studying the code via single
>     stepping, and
>     > implement experiments (for the impatient).
>     > The patches from Steve Borho for VC12 were much appreciated -
>     this small
>     > guide is for those who are still using VS2010.
>     >
>     > Project files are attached for reference. Hope somebody will
>     find this
>     > useful.
>
>     For what it's worth, it wasn't my patches that eventually landed in
>     x264. It was Kemuri-9's much superior patches
>
>     However you might also find this attached cmake file useful.  I don't
>     have a system with Intel C installed to verify, but this should build
>     x264 with Intel C or MSVC 2013. If yasm is detected, it will use
>     that to
>     build the assembly code, making the binary somewhat useful.
>
>     To use with Intel C, copy CMakeLists.txt into the x264 root folder,
>     then:
>
>     mkdir build
>     cd build
>     call "%ICPP_COMPILER14%\bin\compilervars.bat" intel64
>     set CC=icl
>     set CXX=icl
>     cmake -G "NMake Makefiles" ..
>     make
>
>     --
>     Steve Borho
>
>
> Peter,
>
> x264 does already support using Intel's Compiler for Windows, when 
> it's combined with Visual Studio 2005 or later.
> However, we do not utilize visual studio's proprietary build system in 
> our support (we're not particularly looking to maintain multiple build 
> systems)
>
> Instead we utilize MSYS, like we do for utilizing MinGW to build x264.
>
> Looks like the documentation i wrote when we first added support is 
> still available [1], though it's for Intel Compiler 11.1 with Visual 
> Studio 2008.
> But I don't expect there's been that many changes to where you can't 
> follow the flow with VS2010 + IC15
>
> [1] http://kemuri9.net/dev/x264/other/intel_howto.html
>
Dear Steven,

thanks for pointing this out. Indeed, the steps in the referenced guide 
still work with this combination of tools (using this workaround 
https://software.intel.com/en-us/forums/topic/531996).
However please note that the original purpose of making a VS project for 
it was to facilitate single stepping in the code for students who are 
more familiar with VS. If I'm not mistaken, compiling with the Intel 
compiler using above methods does not allow that.

Best regards,
Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20141209/8579bcd8/attachment.html>


More information about the x264-devel mailing list