Skip to content
Closed
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
111 changes: 111 additions & 0 deletions Cargo.lock

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

23 changes: 19 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,40 @@ 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"] }

[build-dependencies]
cc = "1.0.79"
cfg_aliases = "0.2.1"
nasm-rs = { version = "0.3", features = ["parallel"] }

[features]
default = ["asm", "asm_arm64_dotprod", "asm_arm64_i8mm", "bitdepth_8", "bitdepth_16"]
asm = []
asm_arm64_dotprod = ["asm"]
asm_arm64_i8mm = ["asm"]
default = [
# TODO(#7671): Rerun is getting linker errors on Linux currently.
"asm_nonlinux",
"asm_arm64_dotprod",
"asm_arm64_i8mm",
"bitdepth_8",
"bitdepth_16",
]
asm_nonlinux = []
asm_linux = []
asm_arm64_dotprod = [
"asm_nonlinux",
] # TODO(#7671): Rerun is getting linker errors on Linux currently.
asm_arm64_i8mm = [
"asm_nonlinux",
] # TODO(#7671): Rerun is getting linker errors on Linux currently.
bitdepth_8 = []
bitdepth_16 = []

Expand Down
15 changes: 11 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![deny(clippy::all)]

#[cfg(feature = "asm")]
mod asm {
use std::collections::HashSet;
use std::env;
Expand Down Expand Up @@ -327,12 +326,20 @@ mod asm {
}

fn main() {
#[cfg(feature = "asm")]
{
// TODO(#7671): Rerun is getting linker errors on Linux right now with enabled asm features.
cfg_aliases::cfg_aliases! { asm: { any(
all(feature = "asm_nonlinux", not(target_os = "linux")),
all(feature = "asm_linux", target_os = "linux")
) } };

if cfg!(any(
all(feature = "asm_nonlinux", not(target_os = "linux")),
all(feature = "asm_linux", target_os = "linux"),
)) {
asm::main();
}

// NOTE: we rely on libraries that are only distributed for Windows so
// NOTE: we rely on libraries that are only distri buted for Windows so
// targeting Windows/MSVC is not supported when cross compiling.
#[cfg(all(target_os = "windows", target_env = "msvc"))]
{
Expand Down
8 changes: 4 additions & 4 deletions include/common/bitdepth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ pub type LeftPixelRow2px<Pixel> = [Pixel; 2];
/// [`avx512icl`]: crate::src::cpu::CpuFlags::AVX512ICL
/// [`neon`]: crate::src::cpu::CpuFlags::NEON
#[cfg(all(
feature = "asm",
asm,
not(any(target_arch = "riscv64", target_arch = "riscv32"))
))]
macro_rules! bd_fn {
Expand Down Expand Up @@ -458,7 +458,7 @@ macro_rules! bd_fn {
/// Similar to [`bd_fn!`] except that it selects which [`BitDepth`] `fn`
/// based on `$bpc:literal bpc` instead of `$BD:ty`.
#[cfg(all(
feature = "asm",
asm,
any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")
))]
macro_rules! bpc_fn {
Expand All @@ -485,13 +485,13 @@ macro_rules! fn_identity {
}

#[cfg(all(
feature = "asm",
asm,
not(any(target_arch = "riscv64", target_arch = "riscv32"))
))]
pub(crate) use bd_fn;

#[cfg(all(
feature = "asm",
asm,
any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")
))]
pub(crate) use bpc_fn;
Expand Down
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