From eca2b49d529ac18528e7a55ae385587b4a1956d1 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sat, 14 Sep 2024 15:07:38 +0200 Subject: [PATCH 1/2] Drop `binary` integration test from coverage It causes problems and makes no sense to collect anyways because it just calls precompiled binaries from rust code. We now need two calls to `cargo test` because `--doc` can not be combined with any other testing target. --- .github/workflows/rav1e.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rav1e.yml b/.github/workflows/rav1e.yml index 677dcaa968..d533c69374 100644 --- a/.github/workflows/rav1e.yml +++ b/.github/workflows/rav1e.yml @@ -325,7 +325,11 @@ jobs: CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: > ${{ env.SDE_PATH }}/sde -icx -- run: | - cargo test --workspace --verbose --target x86_64-unknown-linux-gnu \ + cargo test --workspace --target x86_64-unknown-linux-gnu \ + --lib --test doctests \ + --features=decode_test,decode_test_dav1d,quick_test + cargo test --workspace --target x86_64-unknown-linux-gnu \ + --doc \ --features=decode_test,decode_test_dav1d,quick_test - name: Run unit tests if: matrix.conf == 'no-asm-tests' From a1bfdd046d7b3e7e6323995d42806a595bf2ffbd Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sat, 14 Sep 2024 14:52:15 +0200 Subject: [PATCH 2/2] Remove unnecessary `.max(255)` This is a `u8` which has a max value of 255 --- src/rate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rate.rs b/src/rate.rs index 09304e8379..1f142dac51 100644 --- a/src/rate.rs +++ b/src/rate.rs @@ -557,7 +557,7 @@ impl QuantizerParameters { // delta_q only gets 6 bits + a sign bit, so it can differ by 63 at most. let min_qi = base_q_idx.saturating_sub(63).max(1); - let max_qi = base_q_idx.saturating_add(63).min(255); + let max_qi = base_q_idx.saturating_add(63); let clamp_qi = |qi: u8| qi.clamp(min_qi, max_qi); QuantizerParameters {