Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re_rav1d tracking branch #2

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# re_rav1d changelog
Tracks differences since [rav1d 1.0.0](https://crates.io/crates/rav1d/1.0.0)

## re_rav1d 0.1.3
* Remove *.c files from the release again & move build.rs parts that are only relevant for the cli to the cli project [#4](https://github.com/rerun-io/re_rav1d/pull/4)
* Fix assembly on Windows [#5](https://github.com/rerun-io/re_rav1d/pull/5)

## re_rav1d 0.1.2
* Linux/x64: re-enable assembly routines and prevent illegal relocations [#3](https://github.com/rerun-io/re_rav1d/pull/3)

## re_rav1d 0.1.1
* Include `tools/compat/getopt.c` in the release

## re_rav1d 0.1.0
* Add `dav1d-rs` as a Rust API ([upstream PR](https://github.com/memorysafety/rav1d/pull/1364))
* Fix crash on erroneous videos ([upstream PR](https://github.com/memorysafety/rav1d/pull/1362))
* Disable `asm` feature on Linux
144 changes: 124 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ members = [".", "tools"]
default-members = [".", "tools"]

[package]
name = "rav1d"
name = "re_rav1d"
authors = ["Rav1d Developers", "Prossimo"]
version = "1.0.0"
version = "0.1.3"
edition = "2021"
rust-version = "1.79"
description = "Rust port of the dav1d AV1 decoder"
license = "BSD-2-Clause"
repository = "https://github.com/memorysafety/rav1d"
exclude = ["*.c", "*.h", "*.in", "meson*", "tests/", "doc/", "package/"]
exclude = ["*.c", "*.in", "meson*", "tests/", "doc/", "package/"]

[lib]
path = "lib.rs"
Expand All @@ -20,12 +20,14 @@ crate-type = ["staticlib", "rlib"]
[dependencies]
assert_matches = "1.5.0"
atomig = { version = "0.4.0", features = ["derive"] }
av-data = "0.4.2"
bitflags = "2.4.0"
cfg-if = "1.0.0"
libc = "0.2"
parking_lot = "0.12.2"
paste = "1.0.14"
raw-cpuid = "11.0.1"
static_assertions = "1"
strum = { version = "0.26", features = ["derive"] }
to_method = "1.1.0"
zerocopy = { version = "0.7.32", features = ["derive"] }
Expand All @@ -35,7 +37,13 @@ cc = "1.0.79"
nasm-rs = { version = "0.3", features = ["parallel"] }

[features]
default = ["asm", "asm_arm64_dotprod", "asm_arm64_i8mm", "bitdepth_8", "bitdepth_16"]
default = [
"asm",
"asm_arm64_dotprod",
"asm_arm64_i8mm",
"bitdepth_8",
"bitdepth_16",
]
asm = []
asm_arm64_dotprod = ["asm"]
asm_arm64_i8mm = ["asm"]
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `re_rav1d` Release Checklist

* [ ] Update `CHANGELOG.md`
* [ ] Bump version numbers
* [ ] `git commit -m 'Release 0.x.0 - summary'`
* [ ] `cargo publish --quiet -p re_rav1d`
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - summary'`
* [ ] `git pull --tags && git tag -d latest ; git tag -a latest -m 'Latest release' && git push --tags origin latest --force && git push origin main ; git push --tags ; git push`
* [ ] Do a GitHub release: https://github.com/rerun-io/re_rav1d/releases/new
* [ ] Wait for documentation to build: https://docs.rs/releases/queue
* [ ] Post on Twitter
37 changes: 0 additions & 37 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,41 +331,4 @@ fn main() {
{
asm::main();
}

// NOTE: we rely on libraries that are only distributed for Windows so
// targeting Windows/MSVC is not supported when cross compiling.
#[cfg(all(target_os = "windows", target_env = "msvc"))]
{
use cc::windows_registry;
use std::env;

let os = env::var("CARGO_CFG_TARGET_OS").expect("missing CARGO_CFG_TARGET_OS");
let target = env::var("TARGET").expect("missing TARGET");
if os == "windows" {
// for sprintf, snprintf, etc.
println!("cargo:rustc-link-lib=static=oldnames");
let tool = windows_registry::find_tool(&target, "cl.exe")
.expect("couldn't find cl.exe; are the Visual Studio C++ tools installed?");
let lib_paths = &tool
.env()
.iter()
.find(|(key, _val)| key == "LIB")
.expect("LIB path not found")
.1;
for path in lib_paths.to_str().unwrap().split(';') {
if path != "" {
println!("cargo:rustc-link-search={path}");
}
}

let getopt = "getopt";
cc::Build::new()
.files([&"tools/compat/getopt.c"])
.include("include/compat")
.debug(cfg!(debug_assertions))
.compile(&getopt);
// cc automatically outputs the following line
// println!("cargo:rustc-link-lib=static={getopt}");
}
}
}
2 changes: 1 addition & 1 deletion include/dav1d/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ pub const DAV1D_MC_SMPTE240: Dav1dMatrixCoefficients = Rav1dMatrixCoefficients::
pub const DAV1D_MC_SMPTE_YCGCO: Dav1dMatrixCoefficients =
Rav1dMatrixCoefficients::SMPTE_YCGCO.to_dav1d();
pub const DAV1D_MC_BT2020_NCL: Dav1dMatrixCoefficients =
Rav1dMatrixCoefficients::BT2020_CL.to_dav1d();
Rav1dMatrixCoefficients::BT2020_NCL.to_dav1d();
pub const DAV1D_MC_BT2020_CL: Dav1dMatrixCoefficients =
Rav1dMatrixCoefficients::BT2020_CL.to_dav1d();
pub const DAV1D_MC_SMPTE2085: Dav1dMatrixCoefficients =
Expand Down
Loading