README.md 2.32 KB
Newer Older
Thomas Daede's avatar
Thomas Daede committed
1
The fastest and safest AV1 encoder.
Thomas Daede's avatar
Thomas Daede committed
2

Thomas Daede's avatar
Thomas Daede committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
[![Build Status](https://travis-ci.org/xiph/rav1e.svg?branch=master)](https://travis-ci.org/xiph/rav1e)

# Overview

rav1e is an experimental AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.

Because AV1 is not yet frozen, it relies on an exact decoder version and configuration that is periodically updated.

# Features

* Intra frames
* 64x64 superblocks
* H, V, and DC prediction modes
* 4x4 DCT and ADST transforms
Thomas Daede's avatar
Thomas Daede committed
17
* ~5 fps encoding @ 480p (see issue #124)
Thomas Daede's avatar
Thomas Daede committed
18 19

# Building
20

21 22 23 24 25 26 27 28
This repository uses a git submodule, to initialize it, do:

```
git submodule update --init
```

This is also required everytime you switch branch or pull code and the submodule changed.

Thomas Daede's avatar
Thomas Daede committed
29 30 31

# Compressing video

Thomas Daede's avatar
Thomas Daede committed
32
Input videos must be 8-bit 4:2:0, in y4m format.
33

Thomas Daede's avatar
Thomas Daede committed
34
```
35
cargo run --bin rav1e -- input.y4m -o output.ivf
Thomas Daede's avatar
Thomas Daede committed
36 37 38 39
```
# Decompressing video

```
40 41
mkdir aom_test
cd aom_test
Thomas Daede's avatar
Thomas Daede committed
42
../aom_build/aom/configure --disable-av1-encoder --enable-debug --enable-experimental --disable-unit-tests --disable-aom_qm --disable-ext-intra --disable-ext_partition --disable-ext_partition_types --disable-loopfilter_level --disable-intra_edge --disable-cfl --disable-kf-ctx --disable-striped_loop_restoration --disable-max_tile --disable-ext-intra-mod --disable-frame_size --disable-simplify_tx_mode --disable-obu --disable-filter-intra --disable-ext_skip
Thomas Daede's avatar
Thomas Daede committed
43 44 45
make -j8
./aomdec ../output.ivf -o output.y4m
```
Thomas Daede's avatar
Thomas Daede committed
46 47 48 49 50 51 52 53 54 55 56 57 58

# Design

* src/lib.rs - The top level library, contains code to write headers, manage buffers, and iterate throught each superblock.
* src/ec.rs - Low-level implementation of the entropy coder, which directly writes the bitstream.
* src/context.rs - High-level functions that write symbols to the bitstream, and maintain context.
* src/partition.rs - Functions and enums to manage partitions (subdivisions of a superblock).
* src/predict.rs - Intra prediction implementations.
* src/quantize.rs - Quantization and dequantization functions for coefficients.
* src/transform.rs - Implementations of DCT and ADST transforms.
* src/bin/rav1e.rs - rav1e command line tool.
* src/bin/rav1erepl.rs - Command line tool for debugging.
* aom_build/ - Local submodule of libaom. Some C functions and constants are used directly. Also used for benchmarking and testing.