Skip to main content

Module simd

Module simd 

Source
Expand description

SIMD-accelerated pixel conversions.

Each public function has a platform-specific implementation (e.g. SSE2 on x86_64) and a portable scalar fallback so the code compiles without SIMD.

Callers select the accelerated path with the simd Cargo feature.

§Feature gate

[features]
simd = []

When disabled every function in this module reduces to the same scalar code used without the module — zero behaviour change.

Functions§

cl_quad_to_bgra
Convert 4 CL planar pixels to 16 BGRA bytes.
fill_gray_row
Convert every byte in a gray buffer to BGRA: gray[n] -> [gray[n], gray[n], gray[n], 255].
fill_yuv_row
Convert luma bytes to BGRA using a single shared Cb/Cr pair.
rgb555_row_to_bgra
Convert one row of RGB555 pixels to BGRA8.
rgb565_row_to_bgra
Convert one row of RGB565 pixels to BGRA8.
uyvy_double_quad_to_bgra
Convert two UYVY quads (8 bytes) to four BGRA pixels (16 bytes).
uyvy_quad_to_bgra
Convert one UYVY quad (4 bytes) to two BGRA pixels (8 bytes).
yuv420_quad_to_bgra
Convert 4 YCbCr 4:2:0 pixels sharing Cb/Cr to 4 BGRA pixels (16 bytes).