mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-18 21:38:29 -04:00
libobs: Support limited color range for RGB/Y800 sources
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".
This commit is contained in:
@@ -220,9 +220,6 @@ static bool decklink_device_changed(obs_properties_t *props,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool color_format_changed(obs_properties_t *props,
|
||||
obs_property_t *list, obs_data_t *settings);
|
||||
|
||||
static bool mode_id_changed(obs_properties_t *props,
|
||||
obs_property_t *list, obs_data_t *settings)
|
||||
{
|
||||
@@ -231,24 +228,6 @@ static bool mode_id_changed(obs_properties_t *props,
|
||||
list = obs_properties_get(props, PIXEL_FORMAT);
|
||||
obs_property_set_visible(list, id != MODE_ID_AUTO);
|
||||
|
||||
return color_format_changed(props, nullptr, settings);
|
||||
}
|
||||
|
||||
static bool color_format_changed(obs_properties_t *props,
|
||||
obs_property_t *list, obs_data_t *settings)
|
||||
{
|
||||
long long id = obs_data_get_int(settings, MODE_ID);
|
||||
BMDPixelFormat pixelFormat = (BMDPixelFormat)obs_data_get_int(settings,
|
||||
PIXEL_FORMAT);
|
||||
|
||||
list = obs_properties_get(props, COLOR_SPACE);
|
||||
obs_property_set_visible(list,
|
||||
id != MODE_ID_AUTO && pixelFormat == bmdFormat8BitYUV);
|
||||
|
||||
list = obs_properties_get(props, COLOR_RANGE);
|
||||
obs_property_set_visible(list,
|
||||
id == MODE_ID_AUTO || pixelFormat == bmdFormat8BitYUV);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -274,7 +253,6 @@ static obs_properties_t *decklink_get_properties(void *data)
|
||||
list = obs_properties_add_list(props, PIXEL_FORMAT,
|
||||
TEXT_PIXEL_FORMAT, OBS_COMBO_TYPE_LIST,
|
||||
OBS_COMBO_FORMAT_INT);
|
||||
obs_property_set_modified_callback(list, color_format_changed);
|
||||
|
||||
obs_property_list_add_int(list, "8-bit YUV", bmdFormat8BitYUV);
|
||||
obs_property_list_add_int(list, "8-bit BGRA", bmdFormat8BitBGRA);
|
||||
|
||||
Reference in New Issue
Block a user