- Posts: 4
- Joined: Wed Jul 24, 2019 3:05 am
- Real Name: Zheng Li
Hi Zheng Li,
The IDeckLinkInput interface does not automatically perform colorspace conversion. If your incoming signal is RGB 444, then you can capture in BGRA/ARGB/r210 natively. If you want your video frame captured as YUV 422, then you need to perform conversion with the IDeckLinkVideoConversion interface [1][2].
Optionally, you may want to implement IDeckLinkInputCallback::VideoInputFormatChanged callback to determine whether your incoming signal is 422 or 444 via the detectedSignalFlags parameter [3][4].
In the Desktop Video SDK package, please refer to the CaptureStills SDK sample for an example how to create a class that implements IDeckLinkVideoFrame interface [5], then calls IDeckLinkVideoConversion::ConvertFrame to convert to the required format. The sample demonstrates conversion to bmdFormat8BitBGRA pixel format, but the same concept can be used to convert to bmdFormat8bitYUV.
Regards
Cameron
References (DeckLink SDK Manual):
[1] 2.4.14 Video Frame Conversion (high-level overview)
[2] 2.5.44 IDeckLinkVideoConversion Interface
[3] 2.4.6 Automatic Mode Detection (high-level overview)
[4] 2.5.10.2 IDeckLinkInputCallback::VideoInputFormatChanged method
[5] 2.5.5 IDeckLinkVideoFrame Interface