Expand description
GPU scaling kernels (CPU simulation via Rayon).
Provides parallel image scaling operations that simulate GPU compute shader dispatch. Supports packed RGBA and planar YUV formats.
§Supported filters
| Filter | Quality | Speed |
|---|---|---|
ScaleFilter::Nearest | Low | Fastest |
ScaleFilter::Bilinear | Medium | Fast |
ScaleFilter::Bicubic | High | Medium |
ScaleFilter::Area | High (downscale) | Medium |
§Example
use oximedia_gpu::scale_kernel::{ScaleKernel, ScaleFilter};
let src = vec![0u8; 8 * 8 * 4]; // 8×8 RGBA
let mut dst = vec![0u8; 4 * 4 * 4]; // scale to 4×4
ScaleKernel::scale_rgba(&src, 8, 8, &mut dst, 4, 4, ScaleFilter::Bilinear)
.expect("scale failed");Structs§
- Scale
Kernel - GPU-style image scaling kernel (CPU simulation via Rayon).
- Scale
Stats - Statistics produced after a scaling operation.
Enums§
- Scale
Error - Errors returned by scale kernel operations.
- Scale
Filter - Interpolation filter used when scaling.