xiph/rav1e

Desync with test case (moved from LRU fixes)

xiphmont opened this issue · 3 comments

This was originally reported in #1633, but occurs on master without the LRU tiling fixes patch. It also appears to have popped up well after the last LRU patch on master, but YaLTeR has presented some evidence it's not entirely deterministic which commit hash causes it. I only get it at/after cc170c2, YaLTeR is pretty sure he saw it happen on the commit before.

#[cfg_attr(feature = "decode_test", interpolate_test(aom, "aom"))]
#[cfg_attr(feature = "decode_test_dav1d", interpolate_test(dav1d, "dav1d"))]
fn fuzz_desync_1(decoder: &str) {
  let w = 11;
  let h = 256;
  let speed = 10;
  let q = 200;
  let limit = 2;
  let min_keyint = 2;
  let max_keyint = 4;
  let low_latency = true;
  let bitrate = 16384;

  let mut dec = get_decoder::<u8>(decoder, w, h);
  dec.encode_decode(
    w,
    h,
    speed,
    q,
    limit,
    8,
    Default::default(),
    min_keyint,
    max_keyint,
    low_latency,
    bitrate,
    1,
    1,
  );
}
---- test_encode_decode::fuzz_desync_1_dav1d stdout ----
Encoding 11x256 speed 10 quantizer 200 bit-depth 8 bitrate 16384
Encoded packet 0
Decoding frame 0
Decoded. -> 0
Retrieving frame
Retrieved.
thread 'test_encode_decode::fuzz_desync_1_dav1d' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
 [
<    129,
>    121,
     255,
     101,
     0,
     6,
 ]

', src/test_encode_decode/mod.rs:145:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

---- test_encode_decode::fuzz_desync_1_aom stdout ----
Encoding 11x256 speed 10 quantizer 200 bit-depth 8 bitrate 16384
Encoded packet 0
Decoding frame 0
Decoded. -> 0
Retrieving frame
Retrieved.
thread 'test_encode_decode::fuzz_desync_1_aom' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
 [
<    129,
>    121,
     255,
     101,
     0,
     6,
 ]

', src/test_encode_decode/mod.rs:145:5

On master this causes the debug assert from #1611.

Originally posted by @YaLTeR in #1633 (comment)

ycho commented

Can anyone tell me how to run this test? "test_encode_decode::fuzz_desync_1_dav1d"
Should I add fn fuzz_desync_1() above to the rav1e?

In particular this affects all odd luma widths below 16, for 4:2:0 and 4:2:2.

As of #1583 (checked with bisect) this test case no longer causes a desync.