Skip to content

Commit 26e91cf

Browse files
jpark37jp9000
authored andcommitted
libobs: Force SRGB conversion for tonemapped video
Fixes case where video capture is darkened when both luma wipe and scale filtering are set.
1 parent c57da83 commit 26e91cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libobs/obs-source.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ static inline void obs_source_render_async_video(obs_source_t *source)
24572457
const char *tech_name = "Draw";
24582458
float multiplier = 1.0;
24592459
const enum gs_color_space current_space = gs_get_color_space();
2460-
const bool linear_srgb = gs_get_linear_srgb();
2460+
bool linear_srgb = gs_get_linear_srgb();
24612461
bool nonlinear_alpha = false;
24622462
switch (source_space) {
24632463
case GS_CS_SRGB:
@@ -2492,6 +2492,7 @@ static inline void obs_source_render_async_video(obs_source_t *source)
24922492
case GS_CS_SRGB:
24932493
case GS_CS_SRGB_16F:
24942494
tech_name = "DrawTonemap";
2495+
linear_srgb = true;
24952496
break;
24962497
case GS_CS_709_SCRGB:
24972498
tech_name = "DrawMultiply";
@@ -2506,6 +2507,7 @@ static inline void obs_source_render_async_video(obs_source_t *source)
25062507
tech_name = "DrawMultiplyTonemap";
25072508
multiplier =
25082509
80.0f / obs_get_video_sdr_white_level();
2510+
linear_srgb = true;
25092511
break;
25102512
case GS_CS_709_EXTENDED:
25112513
tech_name = "DrawMultiply";

0 commit comments

Comments
 (0)