The latest x264 is compiled under Windows

Source: Internet
Author: User

Second: "Windows compiles the latest x264"

X264 update faster, every day there are updates, but the algorithm module, the basic structure is not how much change. x264 are written in C, including C99, but C99 syntax is not available in the VC (of course, there is energy can be changed all to C89), generated. A library is also impossible to invoke, how to convert into usable. Lib Library is more important.

1 Download the latest x264
Http://videolan.mirror.aussiehq.net.au/x264/snapshots/Extract to D-plate

2 download Mingw+msys To configure, here are configured, direct download to use it.
Http://code.google.com/p/msys-cn/wiki/ChapterInstallation

However, this well-configured compilation tool does not contain yasm, so the word found no assembler will appear during compilation.

Workaround:

Download http://yasm.tortall.net/Download.html source code, the current source version is 1.2.0, download source. tar.gz, then unzip to D:\yasm-1.2.0

Enter Mingw+msys, execute msys.bat, execute command sequentially

cd/d/yasm-1.2.0 (Enter directory)

./configure carriage return (Execution configuration file)
Make enter (start compiling)
Make install enter (install)
After installation, will be in the MSYS directory of a local directory, all files under this directory copy to the MSYS directory of MinGW, my local directory is: G:\VC\x264 BILUD\MSYS\MINGW
3 Compiling x264
Go to the directory where the current x264 is located, execute the./configure--enable-shared, and make to generate the x264 DLL


4 using VC-provided tools to export Lib
Download Poxports
http://download.csdn.net/source/3036251 unzip to the installation directory where the VC is located, for example
C:/Program Files (x86)/microsoft Visual Studio 10/vc/bin, unzip the pexports.exe copy to the bin directory
Export Lib library, Win7 this DLL must not put the above bin directory, otherwise it will appear could not load PE image
Pexports D:\\libx264-120.dll > D:\\libx264-120.def
Lib/machine:x86/def:d:\\libx264-120.def/out:d:\\libx264-120.lib

5 Testing the exported library is correct
Copy the newly generated libraries Libx264-120.lib and Libx264-120.dll to the new Win32 project
Copy the X264.h and X264_config.h under the original x264 directory to the Win32 project under construction
Download PthreadGC2.dll and Stdint.h
Test with the following program
#include <iostream>
#include <string>
#include "stdint.h"
extern "C"
{
#include "x264.h"
#include "X264_config.h"
};
using namespace Std;
int main ()
{
x264_param_t param;
X264_param_default (&param);
return 0;
}

from:http://niulei20012001.blog.163.com/blog/static/7514721120122605835954/

//

The above two articles are well written;

If you want to apply, or to use the latest version, VC version can be used to learn;

In the second article, the startup name is not very good, because the version number changes over time, the compilation method may also change, so it is recommended to add a version number in the title or content ;

Here's to focus on the second article,

1, I configure in accordance with the above method when there is a problem, about the OpenCL problem, version is: x264-snapshot-20140520-2245;

Modify the Configure command above for:./configure--enable-share--disable-opencl

Compile and pass;

2, about LIB, do not need conversion tools, directly compiled files, LIBX264.DLL.A modified to Libx264.lib can be;

Originating From: http://blog.csdn.net/chinabinlang/article/details/26452011

(go) To compile the latest x264 under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.