libobs: Add Rec. 2020 video_colorspace enum values

One for PQ, and one for HLG. Including transfer function as part of the
color space simplifies logic by avoid invalid combinations.
This commit is contained in:
jpark37
2022-03-24 20:56:19 -07:00
committed by Jim
parent ba68eda590
commit 692ca7efce
5 changed files with 87 additions and 23 deletions
+6
View File
@@ -270,6 +270,12 @@ static bool obs_init_textures(struct obs_video_info *ovi)
enum gs_color_format format = GS_RGBA;
enum gs_color_space space = GS_CS_SRGB;
switch (ovi->colorspace) {
case VIDEO_CS_2020_PQ:
case VIDEO_CS_2020_HLG:
format = GS_RGBA16F;
space = GS_CS_709_EXTENDED;
}
video->render_texture = gs_texture_create(ovi->base_width,
ovi->base_height, format, 1,