Skip to main content

Module color

Module color 

Source
Expand description

WMV YUV colour conversion helpers.

WMV3 Simple/Main profile does not carry an explicit transfer-matrix selector in the bitstream parsed by this crate. The original Siglus desktop path used the Windows media stack, so for unspecified matrix metadata we follow the Windows/DXVA convention: SD (source height <= 576) uses BT.601 and HD (source height > 576) uses BT.709.

Enums§

VideoTransferMatrix

Functions§

yuv420p_to_rgb
Convert a WMV YUV420p frame to packed RGB24, selecting the same default transfer matrix Windows uses when the source does not specify one.
yuv420p_to_rgba
Convert a WMV YUV420p frame to packed RGBA8, selecting the Windows/DXVA default transfer matrix for unspecified metadata.
yuv420p_to_rgba_scaled
Convert to a bounded output size directly from YUV, without a full-size RGBA allocation. Sampling uses the nearest source pixel.
yuv_limited_to_rgb
Convert one studio-range Y’CbCr sample to 8-bit RGB using the selected transfer matrix. The integer form intentionally preserves the decoder’s existing BT.601 rounding convention while adding the corresponding BT.709 coefficients.