Giter Site home page Giter Site logo

rav1e's Introduction

The fastest and safest AV1 encoder.

Build Status

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
  • 4x4 to 32x32 RDO-selected square blocks
  • DC, H, V, Paeth, and smooth prediction modes
  • 4x4 DCT and ADST transforms
  • ~5 fps encoding @ 480p

Building

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.

In order to build the codec, you need yasm. To install this on Ubuntu or Linux Mint, run:

sudo apt install yasm

Compressing video

Input videos must be 8-bit 4:2:0, in y4m format.

cargo run --bin rav1e -- input.y4m -o output.ivf

Decompressing video

mkdir aom_test
cd aom_test
cmake ../aom_build/aom -DAOM_TARGET_CPU=generic -DCONFIG_AV1_ENCODER=0 -DCONFIG_UNIT_TESTS=0 -DENABLE_DOCS=0 -DCONFIG_EXT_PARTITION=0 -DCONFIG_EXT_PARTITION_TYPES=0 -DCONFIG_INTRA_EDGE2=0 -DCONFIG_KF_CTX=0 -DCONFIG_OBU=0 -DCONFIG_FILTER_INTRA=0 -DCONFIG_EXT_SKIP=0 -DCONFIG_INTRABC=0 -DCONFIG_MONO_VIDEO=0 -DCONFIG_Q_ADAPT_PROBS=0 -DCONFIG_SCALABILITY=0
make -j8
./aomdec ../output.ivf -o output.y4m

Design

  • src/context.rs - High-level functions that write symbols to the bitstream, and maintain context.
  • src/ec.rs - Low-level implementation of the entropy coder, which directly writes the bitstream.
  • src/lib.rs - The top level library, contains code to write headers, manage buffers, and iterate throught each superblock.
  • 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/rdo.rs - RDO-related structures and distortion computation functions.
  • 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.

Contributing

Check code formatting with rustfmt before submitting a PR.

cargo +nightly fmt -- --check

You should also try clippy.

cargo +nightly clippy

rav1e's People

Contributors

tdaede avatar ycho avatar lu-zero avatar smarter avatar rzumer avatar luctrudeau avatar negge avatar mbebenita avatar tmatth avatar xiphmont avatar barrbrain avatar naufraghi avatar est31 avatar fbossen avatar tszymczak avatar

Watchers

 avatar

Forkers

spymodem2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.