blob: 3ab7c7240a9c4ac8e960018851f692090690c0c0 [file] [log] [blame]
Contributing Source Code to libvpx
_Revised 2011-01-05_
This document will help guide you through contributing code to the WebM
Project and libvpx.
* * *
* TOC placeholder
* * *
In general, most of the on-going work on libvpx concerns speed and
quality improvement. A developer typically follows this workflow:
1. Work on the source code.
2. Recompile the `vpxenc` encoder binary.
3. Perform a video encode job with the new binary.
4. Evaluate the results, comparing to an identical encode done with a
prior version of `vpxenc`.
Once meaningful improvement is achieved, the developer submits his code
revisions to `libvpx`.
Below we describe in more detail how the core libvpx developers
evaluate their own work, so that new contributors can replicate the
process and have their code contributions approved and merged more
Required Packages
* A Bash shell
* Python 2.4
* A modern web browser (like Google Chrome)
Become a Contributor
All contributors are welcome. The WebM Project website has details on
configuring your machine and creating an account in our code review
system, so review the information at
**<>** to get started.
Subscribe to codec-devel
**_codec-devel_** is the mailing list (and Google Group) for developers
working on the libvpx library or researching next generation codecs.
While anyone may post to codec-devel, subscribing gives you unmoderated
* Archive: <>
* Subscribe: <>
* Post: <>
Though _codec-devel_ offers a web interface, many subscribers treat it
as a simple mailing list and interact solely through their mail clients.
Download Test Clips
1. Create a directory to hold the clips (e.g., `~/derf_cif` on Linux
or `c:/derf_cif` on Windows).
2. Visit <> with your web browser.
3. Download each of the the CIF clips found there, in YUV4MPEG (y4m)
format, to the directory you created.
<div class="admon tip" markdown="1">
Encoding Only a Few Test Clips
Normally, you won't want to encode the entire set of test clips, which
can be very time-consuming. Instead, consider symlinking only the clips
you want to use from their storage directory (e.g. `~/derf_cif`) to a
working directory (e.g. `~/derf_working`), and running your tests there.
Download Test Scripts
Test scripts (and this document) are available in the
`contributor-guide` Git project:
$ git clone git://
$ cd contributor-guide
Symlink or physically copy the following scripts to somewhere in your
* `be`
* `run_tests`
* ``
Download, Build and Test libvpx
1. To get started, ensure that your system satisfies the **[build
2. Next, **clone the libvpx repository**. After cloning, you'll be
working in the master branch by default.
$ git clone git://
$ cd libvpx
<div class="admon important" markdown="1">
**Important:** If your idea necessitates a change to the VP8
format itself, you'll want to work in the libvpx experimental
branch instead:
$ git clone git://
$ cd libvpx
$ git checkout experimental
3. **Configure and build libvpx.** Be sure to run the configure
script with `--enable-internal-stats`, which causes the encoder
(`vpxenc`) to output statistical data as well as a video file. For
$ ./configure --disable-codecs --enable-vp8 --enable-internal-stats --enable-debug --disable-install-docs --log=yes
$ make
To learn more about configuration options, do:
$ ./configure --help
There are several ways to "install" (`make install`, etc.), so
we'll leave that up to you. Just ensure that the VP8 encoder
(`vpxenc`) is executable and in your $PATH.
4. **Run some encodes** using the provided scripts. Example:
$ cd <test clip directory>
$ run_tests 200 500 50 baseline
In this example, `run_tests` will encode each `y4m` file in the
current directory at bitrates of 200, 250, 300, 350, 400, 450 and
500 kbps (start at 200, end at 500, 50 kbps increments). It will
create a directory `baseline` and write its output there.
Output consists of `webm` video files and `stt` files containing
statistics for each encode. If the test encodes are 2-pass
(default), an `fpf` file (first-pass data file) is also written
for each input file, and will be reused on subsequent 2-pass
encodes if not deleted.
5. **Make your changes to libvpx**, rebuild, and re-run the tests
using a different output directory name. Example:
$ run_tests 200 500 50 mytweak
Alternatively, change the parameters in the batch encoder script
(`be`) that's called by `run_tests`. `be` in turn calls `vpxenc`.
6. When the tests are finished, run `` to generate
an **HTML-format report** that compares `mytweak` with `baseline`.
$ . baseline mytweak > mytweak.html
7. **View the report** by opening `mytweak.html` in a web browser.
Submit Your Patches
See the detailed information at **<>**.
Icon artwork courtesy of the Tango Desktop Project,