2.4.14 Video Frame Conversion¶
The DeckLink API provides SIMD accelerated conversions operations for converting the pixel format of a video frame. An application performing pixel format conversion should perform the following steps.
Converting into an existing destination frame:
If the DeckLink device has an output interface, the destination video frame can be created with
IDeckLinkOutput::CreateVideoFrame()orIDeckLinkOutput::CreateVideoFrameWithBuffer().Get an instance of the IDeckLinkVideoConversion object interface by calling CoCreateInstance with CLSID_CDeckLinkVideoConversion (Windows) or CreateVideoConversionInstance (macOS and Linux).
Call
IDeckLinkVideoConversion::ConvertFrame()with the source and destination video frames.
Converting into a new destination frame:
Get an instance of the IDeckLinkVideoConversion object interface by calling CoCreateInstance with CLSID_CDeckLinkVideoConversion (Windows) or CreateVideoConversionInstance (macOS and Linux).
Call
IDeckLinkVideoConversion::ConvertNewFrame()with the destination pixel format (BMDPixelFormat) and colorspace (BMDColorspace). An application has the option to provide a custom buffer by providing an implementedIDeckLinkVideoBuffer.