libobs,plugins: Replace video matrix function

video_format_get_parameters_for_format provides a more accurate matrix
than video_format_get_parameters.
This commit is contained in:
jpark37
2022-04-02 23:57:30 -07:00
committed by Jim
parent 94fa6d064b
commit 848e128435
9 changed files with 53 additions and 40 deletions

View File

@@ -305,7 +305,8 @@ void DeckLinkDeviceInstance::SetupVideoFormat(DeckLinkDeviceMode *mode_)
if (mode_ == nullptr)
return;
currentFrame.format = ConvertPixelFormat(pixelFormat);
const enum video_format format = ConvertPixelFormat(pixelFormat);
currentFrame.format = format;
colorSpace = static_cast<DeckLinkInput *>(decklink)->GetColorSpace();
if (colorSpace == VIDEO_CS_DEFAULT) {
@@ -323,10 +324,9 @@ void DeckLinkDeviceInstance::SetupVideoFormat(DeckLinkDeviceMode *mode_)
colorRange = static_cast<DeckLinkInput *>(decklink)->GetColorRange();
currentFrame.range = colorRange;
video_format_get_parameters(activeColorSpace, colorRange,
currentFrame.color_matrix,
currentFrame.color_range_min,
currentFrame.color_range_max);
video_format_get_parameters_for_format(
activeColorSpace, colorRange, format, currentFrame.color_matrix,
currentFrame.color_range_min, currentFrame.color_range_max);
delete convertFrame;