Crates.io | yuvutils-rs |
lib.rs | yuvutils-rs |
version | |
source | src |
created_at | 2024-05-15 12:06:20.277309 |
updated_at | 2024-11-10 10:55:03.173934 |
description | High performance utilities for YUV format handling and conversion. |
homepage | https://github.com/awxkee/yuvutils-rs |
repository | https://github.com/awxkee/yuvutils-rs |
max_upload_size | |
id | 1240964 |
Cargo.toml error: | TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Fast and simple YUV approximation conversion in pure Rust. At most the same as libyuv does. Performance will be equal to libyuv or slightly higher on platforms where SIMD is implemented. Otherwise equal or slower.
Mostly implemented AVX-512, AVX2, SSE, NEON, WASM
X86 targets with SSE and AVX uses runtime dispatch to detect available cpu features.
Supports:
All the methods support RGB, BGR, BGRA and RGBA
rustc avx2
, avx512f
, avx512bw
, neon
, sse4.1
features should be set when you expect than code will run on supported device.
For AVX-512 target feature avx512bw
is required along with feature nightly_avx512
and nightly
rust channel compiler.
Wasm simd128
should be enabled for implemented SIMD wasm paths support
Some paths have multi-threading support, consider this feature if you're working on platform with multi-threading.
cargo add yuvutils-rs
rgb_to_yuv422(&mut y_plane, y_stride,
&mut u_plane, u_width,
&mut v_plane, v_width,
&rgb, rgb_stride,
width, height,
YuvRange::Full, YuvStandardMatrix::Bt709);
rgb_to_sharp_yuv420(&mut y_plane, y_stride,
&mut u_plane, u_width,
&mut v_plane, v_width,
&rgb, rgb_stride,
width, height,
YuvRange::Full, YuvStandardMatrix::Bt709,
SharpYuvGammaTransfer::Srgb);
yuv422_to_rgb(&y_plane, y_stride,
&u_plane, u_stride,
&v_plane, v_stride,
&mut rgb, rgb_stride,
width, height,
YuvRange::Full, YuvStandardMatrix::Bt709);
rgb_to_ycgco420(&mut y_plane, y_stride,
&mut cg_plane, cg_width,
&mut cg_plane, cg_width,
&rgb, rgb_stride,
width, height,
YuvRange::TV);
ycgco420_to_rgb(&y_plane, y_stride,
&cg_plane, cg_stride,
&co_plane, co_stride,
&mut rgb, rgb_stride,
width, height,
YuvRange::TV);
This project is licensed under either of
at your option.