Go to file
Martin Storsjö cb8151c969 aarch64: Avoid unaligned jump tables
Manually add a padding 0 entry to make the odd number of .hword
entries align with the instruction size.

This fixes assembling with GAS, with the --gdwarf2 option, where
it previously produced the error message "unaligned opcodes detected
in executable segment".

The message is slightly misleading, as the error is printed even
if there actually are no opcodes that are misaligned, as the jump
table is the last thing within the .text section. The issue can
be reproduced with an input as small as this, assembled with
"as --gdwarf2 -c test.s".

        .text
        nop
        .hword 0

See a6228f47f0 for earlier cases of
the same error - although in those cases, we actually did have more
code and labels following the unaligned jump tables.

This error is present with binutils 2.39 and earlier; in
binutils 2.40, this input no longer is considered an error, fixed
in https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=6f6f5b0adc9efd103c434fd316e8c880a259775d.
2024-04-22 09:11:37 +00:00
doc meson/doc: Fix doxygen config 2022-05-06 01:52:36 +02:00
examples dav1dplay: Update to new libplacebo API 2022-12-13 13:06:45 +00:00
include Alphabetize architecture defines and usage 2024-01-31 06:04:21 -05:00
package CI: Move llvm crossfiles from image to project 2024-04-16 11:53:16 +02:00
src aarch64: Avoid unaligned jump tables 2024-04-22 09:11:37 +00:00
tests ARM64: Port msac improvements to more functions 2024-04-15 12:38:20 +00:00
tools cli: Add missing ARM cpumasks help text 2024-04-11 23:15:07 +02:00
.gitignore .gitignore: Add tests/argon 2023-03-01 19:59:10 +01:00
.gitlab-ci.yml CI: Move llvm crossfiles from image to project 2024-04-16 11:53:16 +02:00
CONTRIBUTING.md contributing: document the allowed internal use of anonymous structs/unions 2020-08-23 00:32:39 +02:00
COPYING Update copyright years 2019-03-01 18:38:35 +01:00
NEWS NEWS: Forgotten intro sentence 2024-03-09 11:00:33 +01:00
README.md CI: Unambiguously call `meson setup` 2023-02-13 21:10:44 +01:00
THANKS.md Update THANKS.md 2024-03-08 23:24:30 +01:00
gcovr.cfg gcovr: Fix config file 2024-02-22 19:13:23 +01:00
meson.build checkasm: Add support for the private macOS kperf API for benchmarking 2024-04-02 10:35:29 +00:00
meson_options.txt checkasm: Add support for the private macOS kperf API for benchmarking 2024-04-02 10:35:29 +00:00

README.md

dav1d logo

dav1d

dav1d is an AV1 cross-platform decoder, open-source, and focused on speed and correctness.

It is now battle-tested and production-ready and can be used everywhere.

The canonical repository URL for this repo is https://code.videolan.org/videolan/dav1d

This project was partially funded by the Alliance for Open Media/AOM.

Goal and Features

The goal of this project is to provide a decoder for most platforms, and achieve the highest speed possible to overcome the temporary lack of AV1 hardware decoder.

It supports all features from AV1, including all subsampling and bit-depth parameters.

In the future, this project will host simple tools or simple wrappings (like, for example, an MFT transform).

License

dav1d is released under a very liberal license, a contrario from the other VideoLAN projects, so that it can be embedded anywhere, including non-open-source software; or even drivers, to allow the creation of hybrid decoders.

The reasoning behind this decision is the same as for libvorbis, see RMS on vorbis.

Roadmap

The plan is the following:

Reached

  1. Complete C implementation of the decoder,
  2. Provide a usable API,
  3. Port to most platforms,
  4. Make it fast on desktop, by writing asm for AVX2 chips.
  5. Make it fast on mobile, by writing asm for ARMv8 chips,
  6. Make it fast on older desktop, by writing asm for SSSE3+ chips,
  7. Make high bit-depth fast on mobile, by writing asm for ARMv8 chips.
  8. Make it fast on older mobile, by writing asm for ARMv7 chips,
  9. Make high bit-depth fast on older mobile, by writing asm for ARMv7 chips,
  10. Make high bit-depth fast on desktop, by writing asm for AVX2 chips,
  11. Make high bit-depth fast on older desktop, by writing asm for SSSE3+ chips,
  12. Improve threading.

On-going

  1. Improve C code base with various tweaks,
  2. Accelerate for less common architectures, like PPC, SSE2, RISC-V or AVX-512.

After

  1. Use more GPU decoding, when possible.

Contribute

Currently, we are looking for help from:

  • C developers,
  • asm developers,
  • platform-specific developers,
  • GPGPU developers,
  • testers.

Our contributions guidelines are quite strict. We want to build a coherent codebase to simplify maintenance and achieve the highest possible speed.

Notably, the codebase is in pure C and asm.

We are on IRC, on the #dav1d channel on Libera.chat. If you do not have an IRC Client at hand, use IRC Web Interface.

See the contributions document.

CLA

There is no CLA.

People will keep their copyright and their authorship rights, while adhering to the BSD 2-clause license.

VideoLAN will only have the collective work rights.

CoC

The VideoLAN Code of Conduct applies to this project.

Compile

  1. Install Meson (0.49 or higher), Ninja, and, for x86* targets, nasm (2.14 or higher)
  2. Run mkdir build && cd build to create a build directory and enter it
  3. Run meson setup .. to configure meson, add --default-library=static if static linking is desired
  4. Run ninja to compile

Cross-Compilation for 32- or 64-bit Windows, 32-bit Linux

If you're on a linux build machine trying to compile .exe for a Windows target/host machine, run

meson setup build --cross-file=package/crossfiles/x86_64-w64-mingw32.meson

or, for 32-bit:

meson setup build --cross-file=package/crossfiles/i686-w64-mingw32.meson

mingw-w64 is a pre-requisite and should be installed on your linux machine via your preferred method or package manager. Note the binary name formats may differ between distributions. Verify the names, and use alias if certain binaries cannot be found.

For 32-bit linux, run

meson setup build --cross-file=package/crossfiles/i686-linux32.meson

Build documentation

  1. Install doxygen and graphviz
  2. Run meson setup build -Denable_docs=true to create the build directory
  3. Run ninja -C build doc/html to build the docs

The result can be found in build/doc/html/. An online version built from master can be found here.

Run tests

  1. In the root directory, run git clone https://code.videolan.org/videolan/dav1d-test-data.git tests/dav1d-test-data to fetch the test data repository
  2. During meson configuration, specify -Dtestdata_tests=true
  3. Run meson test -v after compiling

Support

This project is partially funded by the Alliance for Open Media/AOM and is supported by TwoOrioles and VideoLabs.

These companies can provide support and integration help, should you need it.

FAQ

Why do you not improve libaom rather than starting a new project?

  • We believe that libaom is a very good library. It was however developed for research purposes during AV1 design. We think that an implementation written from scratch can achieve faster decoding, in the same way that ffvp9 was faster than libvpx.

Is dav1d a recursive acronym?

  • Yes.

Can I help?

I am not a developer. Can I help?

  • Yes. We need testers, bug reporters and documentation writers.

What about the AV1 patent license?

  • This project is an implementation of a decoder. It gives you no special rights on the AV1 patents.

Please read the AV1 patent license that applies to the AV1 specification and codec.

Will you care about <my_arch>? <my_os>?

  • We do, but we don't have either the time or the knowledge. Therefore, patches and contributions welcome.