Clean up our dav1d-rs/rav1d forks
History
In the beginning there was dav1d; a C-library for decoding AV1 video.
dav1d-rs are bindings for the C-library dav1d, so one can use dav1d from Rust.
rav1d is a Rust-port of dav1d. Despite being written in Rust, it does not have a Rust API (https://github.com/memorysafety/rav1d/issues/1252). It only provides a C API (so it can be a drop-in replacement for dav1d`).
We want to be pure Rust as far as possible, so we would prefer not to use dav1d, and instead use rav1d.
@jprochazk put together https://github.com/rerun-io/rav1d-rs to solve this. It is a fork of BOTH rav1d AND dav1d-rs.
In essence, rav1d-rs gets dav1d-rs to talk to rav1d instead of dav1d, making the whole things pure Rust (except for some asm in rav1d).
Now, this is all very confusing, so just to iterate:
dav1d: C library to decode AV1 (we don't want this)rav1d: Rust library to decode AV1dav1d-rs: Rust binding fordav1drav1d-rs: Our Rust bindings forrav1d
Options
- Option 1: keep working on
rav1d-rs - Option 2: add proper Rust bindings to
rav1dinstead (fork and upstream)
Option 1: keep working on rav1d-rs
https://github.com/rerun-io/rav1d-rs is a bit of a mess:
- It is a fork of
dav1d-rs - It also has a full copy of the
rav1ssource code (why? can we use the published crate instead?) - It's unclear what parts of
dav1d-rsandrav1dhas been modified inrav1d-rs - It has a bunch of big video test files that we should move to
git lfsand rewrite history
I'd like to:
- Have
rav1d-rsbe a clone ofdav1d-rsORrav1d, but not both, as that makes diffing very hard - Follow https://github.com/rerun-io/rerun_template/
- Remove binary files from its history
- Clean up and publish
Option 2: fork rav1d and add Rust bindings to it
We can fork rav1d and add Rust bindings to it, i.e. do:
- https://github.com/memorysafety/rav1d/issues/1252
I don't know how much work this would be, but this definitely would be the nicest route (though not necessarily the easiest). We could upstream the fix, or keep using our own fork if they are not welcomed (or merged/published quick enough).
Good news everyone! I took @jprochazk's code and just added it to rav1d, and it works:
https://github.com/memorysafety/rav1d/pull/1362
This means we don't need our hacky https://github.com/rerun-io/rav1d-rs
Instead we either get the above PR merged, or we publish our own rav1d fork.
Closed in favor of:
- https://github.com/rerun-io/rerun/issues/7588