1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00
5 ConvertToSinglePlane
Chuck Walbourn edited this page 2022-04-26 18:37:24 -07:00
DirectXTex

Converts a planar image (such as 4:2:0 or 4:1:1 video format) to a non-planar format (typically 4:2:2 for video formats). Planar formats are not supported by other texture functions, so this routine can be used to convert planar data to a form that other functions will operate on.

HRESULT ConvertToSinglePlane(
    const Image& srcImage,
    ScratchImage& image );

HRESULT ConvertToSinglePlane(
    const Image* srcImages, size_t nimages,
    const TexMetadata& metadata,
    ScratchImage& image );

Remarks

The pixel format of the resulting image is determined by the format of the input. For example NV11 and NV12 are always converted to YUY2.

Recommended 8-Bit YUV Formats for Video Rendering
10-bit and 16-bit YUV Video Formats