Expand description
GPU color space conversion kernels (CPU simulation).
Provides batch color space conversion operations simulated with Rayon parallelism, matching GPU compute-shader semantics.
Supported conversions:
- RGB ↔ YUV with BT.601, BT.709, BT.2020 coefficients
- Limited range ↔ full range (studio swing ↔ JPEG)
- Packed RGBA ↔ planar YUV (4:4:4)
§Example
use oximedia_gpu::color_convert_kernel::{ColorConvertKernel, ColorStandard, RangeMode};
let input = vec![235u8, 128, 44, 255]; // 1×1 RGBA pixel
let mut output = vec![0u8; 4]; // 1×1 YUVA output
ColorConvertKernel::rgb_to_yuv(&input, &mut output, 1, 1, ColorStandard::Bt709, RangeMode::Full)
.expect("conversion failed");Structs§
- Batch
Convert Stats - Statistics produced after a batch color conversion.
- Color
Convert Kernel - GPU-style color space conversion kernel (CPU simulation via Rayon).
- Conversion
Matrix - 3×3 forward (RGB→YCbCr) and inverse (YCbCr→RGB) matrices derived from
ColorStandardandRangeMode.
Enums§
- Color
Kernel Error - Errors returned by color conversion kernel operations.
- Color
Standard - Color standard / primaries used for the YCbCr matrix coefficients.
- Range
Mode - Quantization range for Y/Cb/Cr values.