Ubuntu10.04 compile and modify xvid1.3.1

Source: Internet
Author: User
Download the xvid source code from the xvid official website at http://www.xvid.org /. Extract the source code to the home Directory: tarzxvfxvidcore-1.3.1.tar.gz into the directory after decompression, you can see a build directory $ cd/build/generic directly make can be, xvid automatically configure $ makemake after generation: www.linuxidc.com @ li

Compile
Download the xvid source code http://www.xvid.org/from the xvid official website /.

Decompress the source code to the home directory:

Tar zxvf xvidcore-1.3.1.tar.gz

Go to the decompressed directory and you will see a build directory.

$ Cd/build/generic

Make directly, and automatically configure after xvid

$ Make

Generate after make:

Www.linuxidc.com @ linuxidc :~ /Xvidcore/build/generic $ make
L: libxvidcore.
L: libxvidcore. so.4.3

---------------------------------------------------------------
Xvid has been successfully built.

* Binaries are currently located in the '= built' directory
* To install them on your system, you can run '# make install'
As root.
---------------------------------------------------------------

The system will prompt that the generated library file is stored in the = build directory.

Enter the = build directory:

Www.linuxidc.com @ linuxidc :~ /Xvidcore/build/generic $ cd \ = build/
Www.linuxidc.com @ linuxidc :~ /Xvidcore/build/generic/= build $ ls
Bitstream libxvidcore. a motion quant xvid. h
Dct libxvidcore. def my_sh.sh utils xvid. o
Decoder. o libxvidcore. ld my_sh.sh ~ Xvid_de
Encoder. o libxvidcore. so.4.3 plugins xvid_decraw.c
Image mobile_cif.mp4 prediction xvid_decraw.c ~

The generated library file is displayed.

Note: If you want to install the generated library, you can use either of the following methods:

(1) Use make directly, and manually copy the generated lib file and header file to/usr/lib and/usr/include respectively.

(2) First./configure -- prefix =/usr, and then make and make install to automatically install the library file.

Export and modify
Because I want to obtain mv information from the decoding process during decoding, I need to manually modify the source code, but there is a small problem after the modification to export the global array.

The global array can be exported normally in the static library, but not in the dynamic library. An error will be reported during compilation, which takes a moment.

Solution:

Modify libxvidcore. ld in the build/generic Directory and add the global array or function to be exported. Make it again!

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.