Files
Immich/native/crates/codecs/Cargo.toml
T
Santo Shakilandmertalev b3414d7595 feat(mobile): avif decoder (#32809)
* feat(mobile): avif decoder

* decode avif in the core first on android, tone-map hdr like jxl and support premultiplied alpha

* decode avif with rav1d's safe api

* use rav1d's assembly

* thread avif decodes by their tile count

* convert colour-managed avif in bands

* use the codec dependencies' simd kernels

* free avif pictures before resizing

* map avif alpha through a table

* premultiply avif while writing alpha

* drop the avif container after decoding

* use core avif decoder on ios

* fall back to imageio on ios when the core can't decode an avif

---------

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
2026-11-06 21:35:53 +03:00

34 lines
1.1 KiB
TOML

[package]
name = "codecs"
version.workspace = true
edition.workspace = true
license.workspace = true
[features]
default = ["avif", "jxl"]
# AVIF tone-maps HDR with the profiles jxl-rs makes.
avif = ["jxl", "dep:mp4parse", "dep:rav1d", "dep:yuv"]
jxl = ["dep:jxl", "dep:rayon"]
[dependencies]
jxl = { workspace = true, optional = true }
libc = { workspace = true }
moxcms = { workspace = true }
mp4parse = { workspace = true, optional = true }
pic-scale = { workspace = true }
quick_cache = { workspace = true }
rav1d = { workspace = true, optional = true }
rayon = { workspace = true, optional = true }
yuv = { workspace = true, optional = true }
# The C compiler assembles rav1d's arm64 kernels, which MSVC can't.
[target.'cfg(all(target_arch = "aarch64", not(target_env = "msvc")))'.dependencies]
rav1d = { workspace = true, optional = true, features = ["asm_arm64_dotprod", "asm_arm64_i8mm", "asm_arm64_sve2"] }
# NASM (native/mise.toml) assembles the x86 ones.
[target.'cfg(target_arch = "x86_64")'.dependencies]
rav1d = { workspace = true, optional = true, features = ["asm"] }
[lints]
workspace = true