Compile x264 in Linux

Source: Internet
Author: User

In fact, Vc has been compiled in windows, but when someone says it has been compiled in Linux, I will try again. Besides, the makefile of x264 source code is ready, all I need to do is copy the file and make it.

First copy the x264-060805 to the directory, I in order to do later uClinux inside, directly put the uClinux directory user/x264-060805 and then make, one by one to find the error.

1. i64 and ui64 errors. If (delta> 32767i64 | Delta <-32768i64), this is added by LSP. Change the annotation part to remove i64.

2. NASM. I have not installed NASM on Ubuntu, so some compilation fails. Just install sudo apt-Get install NASM.

Then make in the x264-060805, compile the executable file x264, there are more than 600 K, bigger than the VC, it is estimated that the added module is different, or the compilation method is different. Temporarily

In a simple test,./x264-O test.264 file. YUV 176x144 obtains the. 264 file, which can be played by VLC. It turns out that the compilation is correct.

The next step is to add this module to uClinux.

--------------------------

Add the x264 module to uClinux, which is the same as adding common applications. For now, static loading is considered, that is, compiling to the kernel.

1. Put all the source files under user/x264-060805 here and make sure the makefile under x264-060805/is correct (the above work has been confirmed)

2. Modify uClinux-Dist/user/makefile and put the directory of the folder added to the upper-level directory.

Add: Dir _ $ (config_user_x264) + = x264-060805

3. Modify config/config. In and add the x264 module to the configuration directory.

Add

Mainmenu_option next_comment comment 'x264'

Bool 'x264' config_user_x264 comment "x264"

Endmenu

4. The modification has ended. The configuration and compilation processes are as follows.

Run make menuconfig to open a graphical interface. Select customize vender/user setting and save and exit. This will automatically recognize the new ones when config. In is called. It runs automatically after exiting, and a new graphic interface is displayed. Select the x264 module you just added.

5. The above configuration has been completed. Just make clean and make.

Note that the 2.6 kernel is used here, so the complex make DEP is not required.

After doing this, we can find that a new folder romf is generated under uClinux-Dist, which contains all the kernel modules, and then compiled images are generated under the images directory, this image and the romfs directory actually have the same content, but it is an image file for it.

The following has already been done before. You only need to download U-boot and uimage to the board, and the operating system on the board will run.

 

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.