Support limited color range for RGB/Y800 sources#1846
Support limited color range for RGB/Y800 sources#1846jp9000 merged 3 commits intoobsproject:masterfrom
Conversation
|
Devices can output both limited and full RGB signals (Nintendo Switch was tested), but OBS cannot currently remap limited RGB signals to full range. This changelist attempts to address that. This seemed like a good time to move Y800 processing to the GPU since it also lacks handling for limited color range. |
|
NES Classic, Intensity Pro 4K, Source=Blackmagic Device NES Classic, Micomsoft SC-512N1-L/DVI, Source=Video Capture Device |
Fixes handling of the `obs_source_frame::full_range` member variable, which is often set to false by default by many plugins even when using RGB, which would cause RGB to be marked as "partial range". This change is crucial for when partial range RBG support is implemented. Adds `obs_source_frame2` structure that replaces the `full_range` member variable with a `range` variable, which uses the `video_range_type` enum to allow handling default range values. This member variable treats VIDEO_RANGE_DEFAULT as full range if the format is RGB, and partial range if the format is YUV. Also adds `obs_source_output_video2` and `obs_source_preload_video2` functions which use the `obs_source_frame2` structure instead of the `obs_source_frame` structure. When using the original `obs_source_frame`, `obs_source_output_video`, and `obs_source_preload_video` functions, RGB will always be full range by default for backward compatibility purposes.
Allows the ability to override and use partial range RGB with the DirectShow and Decklink device sources when partial range RGB is implemented. Fixes certain cases where devices could capture RGB in limited range via HDMI (per the HDMI specs).
libobs: Add support for limited to full color range conversions when using RGB or Y800 formats, and move RGB converison for Y800 formats to the GPU. decklink: Stop hiding color space/range properties for RGB formats, and remove "YUV" from "YUV Color Space" and "YUV Color Range". win-dshow: Remove "YUV" from "YUV Color Space" and "YUV Color Range". UI: Remove "YUV" from "YUV Color Space" and "YUV Color Range".


libobs: Add support for limited to full color range conversions when
using RGB or Y800 formats, and move RGB converison for Y800 formats to
the GPU.
decklink: Stop hiding color space/range properties for RGB formats, and
remove "YUV" from "YUV Color Space" and "YUV Color Range".
obs-ffmpeg: Remove "YUV" from "YUV Color Range".
win-dshow: Remove "YUV" from "YUV Color Space" and "YUV Color Range".
UI: Remove "YUV" from "YUV Color Space" and "YUV Color Range".