Skip to content

Commit 159c96e

Browse files
Merge branch 'master' into CDEF-paralelization
2 parents dba4037 + 87c0297 commit 159c96e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+21013
-7421
lines changed

.github/workflows/rav1e.yml

+32-32
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ jobs:
105105
- name: Install sccache
106106
env:
107107
LINK: https://github.com/mozilla/sccache/releases/download
108-
SCCACHE_VERSION: 0.2.13
108+
SCCACHE_VERSION: 0.2.15
109109
run: |
110-
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
110+
SCCACHE_FILE=sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl
111111
mkdir -p $HOME/.local/bin
112-
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
112+
curl -L "$LINK/v$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
113+
chmod +x $SCCACHE_FILE/sccache
113114
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
114115
echo "$HOME/.local/bin" >> $GITHUB_PATH
115116
- name: Add nasm
@@ -127,11 +128,11 @@ jobs:
127128
matrix.conf == 'grcov-coveralls'
128129
env:
129130
LINK: https://www.deb-multimedia.org/pool/main/a/aom-dmo
130-
AOM_VERSION: 2.0.1-dmo0~bpo10+1
131+
AOM_VERSION: 2.0.2-dmo0~bpo10+1
131132
AOM_DEV_SHA256: >-
132-
57adde89e7e82da7839298739fe7c481f38daa15b0ca709ecd0881ab60787410
133+
d31eee6524ea64c080312eeafc65355e378e043b1d738ff9b9bde3734a85779c
133134
AOM_LIB_SHA256: >-
134-
cc418d1be85ae01eac96a5501b284554405bf8d73c59395a988de6812c57a84a
135+
db8a04ca0984604f410c6bd8810ee31666a3bfd3964f3109cdb8f1ae33fec664
135136
run: |
136137
echo "$LINK/libaom-dev_${AOM_VERSION}_amd64.deb" >> DEBS
137138
echo "$LINK/libaom2_${AOM_VERSION}_amd64.deb" >> DEBS
@@ -143,11 +144,11 @@ jobs:
143144
matrix.conf == 'grcov-coveralls' || matrix.conf == 'fuzz' || matrix.conf == 'no-asm-tests'
144145
env:
145146
LINK: https://www.deb-multimedia.org/pool/main/d/dav1d-dmo
146-
DAV1D_VERSION: 0.8.1-dmo1
147+
DAV1D_VERSION: 0.8.2-dmo1
147148
DAV1D_DEV_SHA256: >-
148-
dcf911325699d93a90818e16736e2c93b29d8e7538c1545accd3b25c610876c0
149+
04d30fc34056467b91a627563c61b9a0046a2e084bb649791cd31887a6c76d8e
149150
DAV1D_LIB_SHA256: >-
150-
06f51b9660d413417827270b298e2ad541bd8ddaae7e027ebcb6bb7b6b1ad006
151+
0c3debb3a926e10009503e639dddcfd4082ed6e012340ca49682b738c243dedc
151152
run: |
152153
echo "$LINK/libdav1d-dev_${DAV1D_VERSION}_amd64.deb" >> DEBS
153154
echo "$LINK/libdav1d5_${DAV1D_VERSION}_amd64.deb" >> DEBS
@@ -392,20 +393,17 @@ jobs:
392393
sccache --stop-server
393394
394395
build-windows:
395-
396396
strategy:
397397
matrix:
398-
conf:
399-
- cargo-build
400-
- cargo-test
401-
- cargo-c
402398
include:
403399
- conf: cargo-build
404-
toolchain: stable
400+
target: x86_64-pc-windows-msvc
401+
- conf: cargo-build
402+
target: aarch64-pc-windows-msvc
405403
- conf: cargo-test
406-
toolchain: stable
404+
target: x86_64-pc-windows-msvc
407405
- conf: cargo-c
408-
toolchain: stable-x86_64-pc-windows-gnu
406+
target: x86_64-pc-windows-gnu
409407

410408
env:
411409
RUST_BACKTRACE: full
@@ -416,42 +414,44 @@ jobs:
416414
if: >-
417415
(github.event_name == 'push' && !endsWith(github.event.head_commit.message, 'CI: skip')) ||
418416
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.names, 'skip-ci'))
419-
420417
runs-on: windows-latest
421418

422419
steps:
423420
- uses: actions/checkout@v2
421+
- uses: ilammy/setup-nasm@v1
424422
- name: Install sccache
425423
run: |
426424
$LINK = "https://github.com/mozilla/sccache/releases/download/0.2.12"
427425
$SCCACHE_FILE = "sccache-0.2.12-x86_64-pc-windows-msvc"
428426
curl -LO "$LINK/$SCCACHE_FILE.tar.gz"
429427
tar xzf "$SCCACHE_FILE.tar.gz"
430428
echo "$Env:GITHUB_WORKSPACE/$SCCACHE_FILE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
431-
- name: Install nasm
432-
run: |
433-
$NASM_VERSION="2.15.05"
434-
$LINK = "https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
435-
$NASM_FILE = "nasm-$NASM_VERSION-win64"
436-
curl --ssl-no-revoke -LO "$LINK/$NASM_FILE.zip"
437-
7z e -y "$NASM_FILE.zip" -o"C:\nasm"
438-
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
439429
- name: Set MSVC x86_64 linker path
430+
if: matrix.target != 'aarch64-pc-windows-msvc'
440431
run: |
441432
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
442433
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
443434
$LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
444435
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
436+
- name: Set MSVC Arm64 linker path
437+
if: matrix.target == 'aarch64-pc-windows-msvc'
438+
run: |
439+
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\Arm64"
440+
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
441+
$LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
442+
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
445443
- name: Install ${{ matrix.toolchain }}
446444
uses: actions-rs/toolchain@v1
447445
with:
448446
profile: minimal
449-
toolchain: ${{ matrix.toolchain }}
447+
toolchain: stable
448+
target: ${{ matrix.target }}
450449
override: true
450+
default: true
451451
- name: Install cargo-c
452452
if: matrix.conf == 'cargo-c'
453453
run: |
454-
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.1"
454+
$LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.3"
455455
$CARGO_C_FILE = "cargo-c-windows-msvc"
456456
curl -LO "$LINK/$CARGO_C_FILE.zip"
457457
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin"
@@ -464,17 +464,17 @@ jobs:
464464
continue-on-error: true
465465
with:
466466
path: ~/.cargo/registry/cache
467-
key: ${{ runner.os }}-${{ matrix.conf }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
467+
key: ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
468468
restore-keys: |
469-
${{ runner.os }}-${{ matrix.conf }}-cargo-registry-
469+
${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-cargo-registry-
470470
- name: Cache sccache output
471471
uses: actions/cache@v2
472472
continue-on-error: true
473473
with:
474474
path: C:\sccache
475-
key: ${{ runner.os }}-${{ matrix.conf }}-sccache-${{ hashFiles('**/Cargo.*') }}
475+
key: ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-sccache-${{ hashFiles('**/Cargo.*') }}
476476
restore-keys: |
477-
${{ runner.os }}-${{ matrix.conf }}-sccache-
477+
${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-sccache-
478478
- name: Start sccache server
479479
run: |
480480
sccache --start-server

.travis/install-aom.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4-
AOM_VERSION="2.0.1-dmo0~bpo10+1"
4+
AOM_VERSION="2.0.2-dmo0~bpo10+1"
55
PKG_URL="https://www.deb-multimedia.org/pool/main/a/aom-dmo"
66
ARCH="arm64"
77

@@ -13,8 +13,8 @@ curl -O "${PKG_URL}/libaom-dev_${AOM_VERSION}_${ARCH}.deb" \
1313
-O "${PKG_URL}/libaom2_${AOM_VERSION}_${ARCH}.deb"
1414

1515
sha256sum --check --ignore-missing <<EOF
16-
26fcaf306ab6ca528fb26352460a00aa60b4f0d2cd1ba6c1de4af41352414c71 libaom2_${AOM_VERSION}_${ARCH}.deb
17-
612b6f86a8dff9b6a4cd33216cdaf298605b6818159f8a9a056e7a73ce935481 libaom-dev_${AOM_VERSION}_${ARCH}.deb
16+
2352aa82e15f3936c2dd21d3aee6633b8338e96c09b38b2912aa2c1555a758a2 libaom2_${AOM_VERSION}_${ARCH}.deb
17+
80e7c9ea59f4fc9ac6518e071ee8f86ba2ccec2d5500ea222982fa6dfa21356c libaom-dev_${AOM_VERSION}_${ARCH}.deb
1818
EOF
1919

2020
sudo dpkg -i "libaom2_${AOM_VERSION}_${ARCH}.deb" \

.travis/install-dav1d.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4-
DAV1D_VERSION="0.8.1-dmo1"
4+
DAV1D_VERSION="0.8.2-dmo1"
55
PKG_URL="https://www.deb-multimedia.org/pool/main/d/dav1d-dmo"
66

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

1919
sha256sum --check --ignore-missing <<EOF
20-
dcf911325699d93a90818e16736e2c93b29d8e7538c1545accd3b25c610876c0 libdav1d-dev_${DAV1D_VERSION}_amd64.deb
21-
37094752ae6f8a4c1d6a8267b9632144a235a995f02c5f8bfc69cd8ffc0bb831 libdav1d-dev_${DAV1D_VERSION}_arm64.deb
22-
06f51b9660d413417827270b298e2ad541bd8ddaae7e027ebcb6bb7b6b1ad006 libdav1d5_${DAV1D_VERSION}_amd64.deb
23-
3f35ba159cb76108ba483aedae7acd6eb797bc7cf7a8b0023eeaede2f4b2fbb0 libdav1d5_${DAV1D_VERSION}_arm64.deb
20+
04d30fc34056467b91a627563c61b9a0046a2e084bb649791cd31887a6c76d8e libdav1d-dev_${DAV1D_VERSION}_amd64.deb
21+
0ec130514ce8748a84f4db3d624bf6f20e28dfb0f8a64659a75a8087642269fc libdav1d-dev_${DAV1D_VERSION}_arm64.deb
22+
0c3debb3a926e10009503e639dddcfd4082ed6e012340ca49682b738c243dedc libdav1d5_${DAV1D_VERSION}_amd64.deb
23+
3c29f1782d89f85ac1cc158560828d7e604c7070985e92b7c03135825af478cc libdav1d5_${DAV1D_VERSION}_arm64.deb
2424
EOF
2525

2626
sudo dpkg -i "libdav1d5_${DAV1D_VERSION}_$ARCH.deb" \

.travis/install-sccache.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/bash
22
set -ex
33

4-
SCCACHE_VERSION="0.2.13"
4+
SCCACHE_VERSION="0.2.15"
55

66
export RUSTC_WRAPPER=sccache
77

88
if [ "$(sccache --version)" = "sccache $SCCACHE_VERSION" ]; then
99
echo "Using cached directory."
1010
elif [ "$ARCH" = "x86_64" ]; then
11-
curl -L "https://github.com/mozilla/sccache/releases/download/$SCCACHE_VERSION/sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz" | tar xz
12-
mv -f "sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl/sccache" "$DEPS_DIR/bin/sccache"
11+
curl -L "https://github.com/mozilla/sccache/releases/download/v$SCCACHE_VERSION/sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz" | tar xz
12+
mv -f "sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl/sccache" "$DEPS_DIR/bin/sccache"
13+
chmod +x "$DEPS_DIR/bin/sccache"
1314
else
1415
RUSTC_WRAPPER='' cargo install --version "$SCCACHE_VERSION" --root "$DEPS_DIR" --no-default-features sccache
1516
fi

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ cargo bench --features=bench
8585
Install `cargo-fuzz` with `cargo install cargo-fuzz`. Running fuzz targets with stable Rust requires `--sanitizer=none` or the shorter `-s none`.
8686

8787
* List the fuzz targets with `cargo fuzz list`.
88-
* Run a fuzz target with `cargo fuzz run --santizer=none <target>`.
88+
* Run a fuzz target with `cargo fuzz run --sanitizer=none <target>`.
8989
* Parallel fuzzing: `cargo fuzz run -s none --jobs <n> <target> -- -workers=<n>`.
9090
* Bump the "slow unit" time limit: `cargo fuzz run -s none <target> -- -report_slow_units=600`.
9191
* Make the fuzzer generate long inputs right away: `cargo fuzz run -s none <target> -- -max_len=256 -len_control=0`.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rav1e"
3-
version = "0.4.0"
3+
version = "0.5.0-alpha"
44
authors = ["Thomas Daede <[email protected]>"]
55
edition = "2018"
66
build = "build.rs"
@@ -60,7 +60,7 @@ dump_lookahead_data = ["byteorder", "image"]
6060
arg_enum_proc_macro = "0.3"
6161
bitstream-io = "1"
6262
cfg-if = "1.0"
63-
clap = { version = "2", optional = true, default-features = false }
63+
clap = { version = "2", optional = true, default-features = false, features = ["color"] }
6464
libc = "0.2"
6565
y4m = { version = "0.7", optional = true }
6666
backtrace = { version = "0.3", optional = true }
@@ -114,7 +114,7 @@ signal-hook = { version = "0.3", optional = true }
114114
[dev-dependencies]
115115
assert_cmd = "1.0"
116116
criterion = "0.3"
117-
pretty_assertions = "0.6"
117+
pretty_assertions = "0.7"
118118
interpolate_name = "0.2.2"
119119
rand = "0.8"
120120
rand_chacha = "0.3"

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ For the foreseeable future, a weekly pre-release of rav1e will be [published](ht
4747

4848
## Building
4949

50+
### Toolchain: Rust
51+
rav1e currently requires Rust 1.44.1 or later to build.
52+
5053
### Dependency: NASM
5154
Some `x86_64`-specific optimizations require [NASM](https://nasm.us/) `2.14.02` or newer and are enabled by default.
5255

build.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ fn build_nasm_files() {
8989
"src/x86/ipred_ssse3.asm",
9090
"src/x86/itx.asm",
9191
"src/x86/itx_ssse3.asm",
92+
"src/x86/looprestoration16_avx2.asm",
9293
"src/x86/mc_avx2.asm",
9394
"src/x86/mc16_avx2.asm",
9495
"src/x86/mc_avx512.asm",
@@ -98,7 +99,10 @@ fn build_nasm_files() {
9899
"src/x86/sad_avx.asm",
99100
"src/x86/satd.asm",
100101
"src/x86/sse.asm",
101-
"src/x86/cdef.asm",
102+
"src/x86/cdef_rav1e.asm",
103+
"src/x86/cdef_sse.asm",
104+
"src/x86/cdef16_avx2.asm",
105+
"src/x86/cdef16_sse.asm",
102106
"src/x86/tables.asm",
103107
];
104108

@@ -175,6 +179,7 @@ fn build_asm_files() {
175179

176180
fn rustc_version_check() {
177181
// This should match the version in the CI
182+
// Make sure to updated README.md when this changes.
178183
const REQUIRED_VERSION: &str = "1.44.1";
179184
if version().unwrap() < Version::parse(REQUIRED_VERSION).unwrap() {
180185
eprintln!("rav1e requires rustc >= {}.", REQUIRED_VERSION);

0 commit comments

Comments
 (0)