Skip to content

Commit

Permalink
Merge branch 'master' into CDEF-paralelization
Browse files Browse the repository at this point in the history
  • Loading branch information
master-of-zen committed Sep 15, 2021
2 parents 54bddec + 2ec4e67 commit 52b35fa
Show file tree
Hide file tree
Showing 114 changed files with 43,467 additions and 5,021 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Install cargo-c
run: |
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.1"
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.8.0"
$CARGO_C_FILE = "cargo-c-windows-msvc"
curl -LO "$LINK/$CARGO_C_FILE.zip"
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin"
Expand Down Expand Up @@ -89,6 +89,12 @@ jobs:
7z a "$ZIP_PREFIX-${{ matrix.conf }}.zip" `
"C:\usr\rav1e-windows-${{ matrix.conf }}-sdk"
- name: Build rav1e-ch (unstable)
if: matrix.conf == 'msvc'
env:
RUSTFLAGS: "-C target-feature=+avx2,+fma"
run: cargo build --release --features=unstable,channel-api --bin=rav1e-ch

- name: Upload rav1e msvc binary
if: matrix.conf == 'msvc'
uses: actions/upload-artifact@v2
Expand All @@ -108,6 +114,12 @@ jobs:
with:
path: rav1e-${{ steps.tagName.outputs.version }}-windows-${{ matrix.conf }}.zip

- name: Upload rav1e-ch msvc binary (unstable)
if: matrix.conf == 'msvc'
uses: actions/upload-artifact@v2
with:
path: target/release/rav1e-ch.exe

linux-binaries:
strategy:
matrix:
Expand Down Expand Up @@ -310,6 +322,7 @@ jobs:
files: |
Cargo.lock
rav1e.exe
rav1e-ch.exe
rav1e-linux.tar.gz
rav1e-aarch64-linux.tar.gz
rav1e-macos.zip
Expand All @@ -327,6 +340,7 @@ jobs:
files: |
Cargo.lock
rav1e.exe
rav1e-ch.exe
rav1e-linux.tar.gz
rav1e-aarch64-linux.tar.gz
rav1e-macos.zip
Expand Down
43 changes: 33 additions & 10 deletions .github/workflows/rav1e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
- cargo-c
- check-no-default
- check-extra-feats
- check-unstable-feats
- fuzz
include:
- conf: beta-build
Expand All @@ -78,6 +79,8 @@ jobs:
toolchain: stable
- conf: check-extra-feats
toolchain: stable
- conf: check-unstable-feats
toolchain: stable
- conf: fuzz
toolchain: stable

Expand Down Expand Up @@ -120,33 +123,49 @@ jobs:
run: |
echo "$LINK/nasm_${NASM_VERSION}_amd64.deb" >> DEBS
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" >> CHECKSUMS
- name: Add libvmaf
if: >
matrix.conf == '1.51.0-tests' || matrix.conf == 'aom-tests' ||
matrix.conf == 'grcov-coveralls'
env:
LINK: https://www.deb-multimedia.org/pool/main/v/vmaf-dmo
LIBVMAF_VERSION: 2.2.0-dmo1
LIBVMAF_SHA256: >-
88dace39e1aa0c88973a397640c457b85fd86746b4e79399e4aefdf5167aae92
LIBVMAF_DEV_SHA256: >-
bfaecbeba9fc413e69e2301d88720b2c72d35986778b30381d11eee0274ba78f
run: |
echo "$LINK/libvmaf1_${LIBVMAF_VERSION}_amd64.deb" >> DEBS
echo "$LINK/libvmaf-dev_${LIBVMAF_VERSION}_amd64.deb" >> DEBS
echo "$LIBVMAF_SHA256 libvmaf1_${LIBVMAF_VERSION}_amd64.deb" >> CHECKSUMS
echo "$LIBVMAF_DEV_SHA256 libvmaf-dev_${LIBVMAF_VERSION}_amd64.deb" >> CHECKSUMS
- name: Add aom
if: >
matrix.conf == '1.51.0-tests' || matrix.conf == 'aom-tests' ||
matrix.conf == 'grcov-coveralls'
env:
LINK: https://www.deb-multimedia.org/pool/main/a/aom-dmo
AOM_VERSION: 2.0.2-dmo0~bpo10+1
AOM_VERSION: 3.1.2-dmo1
AOM_DEV_SHA256: >-
d31eee6524ea64c080312eeafc65355e378e043b1d738ff9b9bde3734a85779c
63cf8804e1a010431e06f6da02582c5b95fae546c0e47ba75b1921aa7cbd9d3a
AOM_LIB_SHA256: >-
db8a04ca0984604f410c6bd8810ee31666a3bfd3964f3109cdb8f1ae33fec664
5df58fa6f6b1f28e64dfec77959516ea714ba6fd753c2b7e85527ac892932777
run: |
echo "$LINK/libaom-dev_${AOM_VERSION}_amd64.deb" >> DEBS
echo "$LINK/libaom2_${AOM_VERSION}_amd64.deb" >> DEBS
echo "$LINK/libaom3_${AOM_VERSION}_amd64.deb" >> DEBS
echo "$AOM_DEV_SHA256 libaom-dev_${AOM_VERSION}_amd64.deb" >> CHECKSUMS
echo "$AOM_LIB_SHA256 libaom2_${AOM_VERSION}_amd64.deb" >> CHECKSUMS
echo "$AOM_LIB_SHA256 libaom3_${AOM_VERSION}_amd64.deb" >> CHECKSUMS
- name: Add dav1d
if: >
matrix.conf == '1.51.0-tests' || matrix.conf == 'dav1d-tests' ||
matrix.conf == 'grcov-coveralls' || matrix.conf == 'fuzz' || matrix.conf == 'no-asm-tests'
env:
LINK: https://www.deb-multimedia.org/pool/main/d/dav1d-dmo
DAV1D_VERSION: 0.8.2-dmo1
DAV1D_VERSION: 0.9.2-dmo1
DAV1D_DEV_SHA256: >-
04d30fc34056467b91a627563c61b9a0046a2e084bb649791cd31887a6c76d8e
2ed10b35fa2663d2e7ba04d8fe01f0518602008d066cadcb311a5b8105f70f14
DAV1D_LIB_SHA256: >-
0c3debb3a926e10009503e639dddcfd4082ed6e012340ca49682b738c243dedc
1c4336743115b8a512fb984d289cac65c49ad249ba1456940258e53d9c91bd0c
run: |
echo "$LINK/libdav1d-dev_${DAV1D_VERSION}_amd64.deb" >> DEBS
echo "$LINK/libdav1d5_${DAV1D_VERSION}_amd64.deb" >> DEBS
Expand Down Expand Up @@ -174,7 +193,7 @@ jobs:
if: matrix.conf == 'cargo-c'
env:
LINK: https://github.com/lu-zero/cargo-c/releases/download
CARGO_C_VERSION: 0.7.1
CARGO_C_VERSION: 0.8.0
run: |
curl -L "$LINK/v$CARGO_C_VERSION/cargo-c-linux.tar.gz" |
tar xz -C $HOME/.cargo/bin
Expand Down Expand Up @@ -252,6 +271,10 @@ jobs:
if: matrix.toolchain == 'stable' && matrix.conf == 'check-extra-feats'
run: |
cargo check --features=check_asm,capi,dump_lookahead_data,serialize
- name: Check extra features
if: matrix.toolchain == 'stable' && matrix.conf == 'check-unstable-feats'
run: |
cargo check --features=unstable,channel-api
- name: Run cargo-c
if: matrix.conf == 'cargo-c'
run: |
Expand Down Expand Up @@ -449,7 +472,7 @@ jobs:
- name: Install cargo-c
if: matrix.conf == 'cargo-c'
run: |
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.3"
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.8.0"
$CARGO_C_FILE = "cargo-c-windows-msvc"
curl -LO "$LINK/$CARGO_C_FILE.zip"
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin"
Expand Down
22 changes: 15 additions & 7 deletions .travis/install-aom.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
#!/bin/bash
set -ex

AOM_VERSION="2.0.2-dmo0~bpo10+1"
AOM_VERSION="3.1.1-dmo0~bpo10+1"
LIBVMAF_VERSION="2.1.1-dmo0~bpo10+3"
PKG_URL="https://www.deb-multimedia.org/pool/main/a/aom-dmo"
LIBVMAF_URL="https://www.deb-multimedia.org/pool/main/v/vmaf-dmo"
ARCH="arm64"

cd "$DEPS_DIR"

[ -f "libaom-dev_${AOM_VERSION}_${ARCH}.deb" ] &&
[ -f "libvmaf-dev_${LIBVMAF_VERSION}_${ARCH}.deb" ] && [ -f "libvmaf1_${LIBVMAF_VERSION}_${ARCH}.deb" ] && [ -f "libaom-dev_${AOM_VERSION}_${ARCH}.deb" ] &&
[ -f "libaom2_${AOM_VERSION}_${ARCH}.deb" ] ||
curl -O "${PKG_URL}/libaom-dev_${AOM_VERSION}_${ARCH}.deb" \
-O "${PKG_URL}/libaom2_${AOM_VERSION}_${ARCH}.deb"
curl -O "${LIBVMAF_URL}/libvmaf1_${LIBVMAF_VERSION}_${ARCH}.deb" \
-O "${LIBVMAF_URL}/libvmaf-dev_${LIBVMAF_VERSION}_${ARCH}.deb" \
-O "${PKG_URL}/libaom-dev_${AOM_VERSION}_${ARCH}.deb" \
-O "${PKG_URL}/libaom3_${AOM_VERSION}_${ARCH}.deb"

sha256sum --check --ignore-missing <<EOF
2352aa82e15f3936c2dd21d3aee6633b8338e96c09b38b2912aa2c1555a758a2 libaom2_${AOM_VERSION}_${ARCH}.deb
80e7c9ea59f4fc9ac6518e071ee8f86ba2ccec2d5500ea222982fa6dfa21356c libaom-dev_${AOM_VERSION}_${ARCH}.deb
fe9321dd8d5901ddf74e407c1b213243c357430a03fad17249ec4d07c3cf8e93 libaom3_${AOM_VERSION}_${ARCH}.deb
f926f0af6db4faac5f9bd67051115ce3dfa4324ddb41647e773d17ff11fa8f3 libaom-dev_${AOM_VERSION}_${ARCH}.deb
d9dd550ab3a296019333ced63b80d47743eacef072b17cad96a990f67f587a42 libvmaf1_${LIBVMAF_VERSION}_${ARCH}.deb
ea706661c22df60005200608f54e29fc7f1cf41b47c1fc2def9df56dea10eac1 libvmaf-dev_${LIBVMAF_VERSION}_${ARCH}.deb
EOF

sudo dpkg -i "libaom2_${AOM_VERSION}_${ARCH}.deb" \
sudo dpkg -i "libvmaf1_${LIBVMAF_VERSION}_${ARCH}.deb" \
"libvmaf-dev_${LIBVMAF_VERSION}_${ARCH}.deb" \
"libaom3_${AOM_VERSION}_${ARCH}.deb" \
"libaom-dev_${AOM_VERSION}_${ARCH}.deb"
10 changes: 5 additions & 5 deletions .travis/install-dav1d.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ex

DAV1D_VERSION="0.8.2-dmo1"
DAV1D_VERSION="0.9.0-dmo1"
PKG_URL="https://www.deb-multimedia.org/pool/main/d/dav1d-dmo"

case "$ARCH" in
Expand All @@ -17,10 +17,10 @@ curl -O "$PKG_URL/libdav1d-dev_${DAV1D_VERSION}_$ARCH.deb" \
-O "$PKG_URL/libdav1d5_${DAV1D_VERSION}_$ARCH.deb"

sha256sum --check --ignore-missing <<EOF
04d30fc34056467b91a627563c61b9a0046a2e084bb649791cd31887a6c76d8e libdav1d-dev_${DAV1D_VERSION}_amd64.deb
0ec130514ce8748a84f4db3d624bf6f20e28dfb0f8a64659a75a8087642269fc libdav1d-dev_${DAV1D_VERSION}_arm64.deb
0c3debb3a926e10009503e639dddcfd4082ed6e012340ca49682b738c243dedc libdav1d5_${DAV1D_VERSION}_amd64.deb
3c29f1782d89f85ac1cc158560828d7e604c7070985e92b7c03135825af478cc libdav1d5_${DAV1D_VERSION}_arm64.deb
ce6bd5c710d287306d3b6d45fa3843b35231da37f4d18d82ff24ba088916cfae libdav1d-dev_${DAV1D_VERSION}_amd64.deb
f415b4453a044d311426658b36b73efc0e13dcf9876923d1b1c661fb51e5d5b1 libdav1d-dev_${DAV1D_VERSION}_arm64.deb
54c8ff504523101b96fa994963fb24b7104221a5b011f8b525baac8260640994 libdav1d5_${DAV1D_VERSION}_amd64.deb
ee8af3bb6d2204477291f007b484394d9c100f6f55e11be22af3605b9f83282b libdav1d5_${DAV1D_VERSION}_arm64.deb
EOF

sudo dpkg -i "libdav1d5_${DAV1D_VERSION}_$ARCH.deb" \
Expand Down
19 changes: 11 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rav1e"
version = "0.5.0-alpha"
version = "0.5.0-beta.2"
authors = ["Thomas Daede <tdaede@xiph.org>"]
edition = "2018"
build = "build.rs"
Expand Down Expand Up @@ -69,12 +69,12 @@ num-derive = "0.3"
paste = "1.0"
noop_proc_macro = "0.3.0"
serde = { version = "1.0", features = ["derive"], optional = true }
dav1d-sys = { version = "0.3.2", optional = true }
aom-sys = { version = "0.2.1", optional = true }
dav1d-sys = { version = "0.3.4", optional = true }
aom-sys = { version = "0.3.0", optional = true }
scan_fmt = { version = "0.2.3", optional = true, default-features = false }
ivf = { version = "0.1", path = "ivf/", optional = true }
v_frame = { version = "0.2.1", path = "v_frame/" }
av-metrics = { version = "0.6.2", optional = true, default-features = false }
v_frame = { version = "0.2.4", path = "v_frame/" }
av-metrics = { version = "0.7.1", optional = true, default-features = false }
rayon = "1.0"
crossbeam = { version = "0.8", optional = true }
toml = { version = "0.5", optional = true }
Expand All @@ -100,7 +100,7 @@ cc = { version = "1.0", optional = true, features = ["parallel"] }
# Vendored to remove the dependency on `failure`,
# which takes a long time to build.
vergen = { version = "3", path = "crates/vergen" }
rustc_version = "0.3"
rustc_version = "0.4"
regex = { version = "1", optional = true }

[build-dependencies.nasm-rs]
Expand All @@ -112,13 +112,13 @@ features = ["parallel"]
signal-hook = { version = "0.3", optional = true }

[dev-dependencies]
assert_cmd = "1.0"
assert_cmd = "2.0"
criterion = "0.3"
pretty_assertions = "0.7"
interpolate_name = "0.2.2"
rand = "0.8"
rand_chacha = "0.3"
semver = "0.11"
semver = "1.0"

[target.'cfg(fuzzing)'.dependencies]
arbitrary = "0.4"
Expand All @@ -127,6 +127,9 @@ libfuzzer-sys = "0.3"
rand = "0.8"
rand_chacha = "0.3"

[target.'cfg(any(decode_test, decode_test_dav1d))'.dependencies]
system-deps = "~3.1.2"

[[bin]]
name = "rav1e"
required-features = ["binaries"]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2017-2020, the rav1e contributors
Copyright (c) 2017-2021, the rav1e contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ rav1e currently requires Rust 1.51.0 or later to build.

### Dependency: NASM
Some `x86_64`-specific optimizations require [NASM](https://nasm.us/) `2.14.02` or newer and are enabled by default.
`strip` will be used if available to remove the local symbols from the asm objects.

The CI is testing against `nasm 2.15.05`, so bugs for other versions might happen. If you find one please open an issue!

Expand Down Expand Up @@ -138,6 +139,8 @@ cargo install cargo-c
cargo cinstall --release
```

Please refer to the cargo-c [installation](https://github.com/lu-zero/cargo-c#installation) instructions.

## Usage
### Compressing video
Input videos must be in [y4m format](https://wiki.multimedia.cx/index.php/YUV4MPEG2). The monochrome color format is not supported.
Expand Down Expand Up @@ -176,5 +179,4 @@ Find a full list in feature-table in [`Cargo.toml`](Cargo.toml)
Please read our guide to [contributing to rav1e](CONTRIBUTING.md).

## Getting in Touch
Come chat with us on the IRC channel #daala on Freenode! If you don't have IRC set
up you can easily connect from your [web browser](http://webchat.freenode.net/?channels=%23daala).
Come chat with us on the IRC channel #daala on [Libera.Chat](https://libera.chat/)! You can also use a [web client](https://web.libera.chat/?channel=#daala) to join with a web browser.
6 changes: 3 additions & 3 deletions benches/mc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,9 @@ fn new_plane<T: Pixel>(
p
}

fn get_params<'a, T: Pixel>(
rec_plane: &'a Plane<T>, po: PlaneOffset, mv: MotionVector,
) -> (i32, i32, PlaneSlice<'a, T>) {
fn get_params<T: Pixel>(
rec_plane: &Plane<T>, po: PlaneOffset, mv: MotionVector,
) -> (i32, i32, PlaneSlice<T>) {
let rec_cfg = &rec_plane.cfg;
let shift_row = 3 + rec_cfg.ydec;
let shift_col = 3 + rec_cfg.xdec;
Expand Down

0 comments on commit 52b35fa

Please sign in to comment.