libobs,UI: Swap red/blue render/output channels

Don't need to unswizzle channels for DeckLink output in the future.
This commit is contained in:
jpark37
2022-09-24 16:06:34 -07:00
committed by Jim
parent 493270e022
commit a34fae0327
3 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -4346,7 +4346,7 @@ static inline enum video_format GetVideoFormatFromName(const char *name)
return VIDEO_FORMAT_UYVY;
#endif
else
return VIDEO_FORMAT_RGBA;
return VIDEO_FORMAT_BGRA;
}
static inline enum video_colorspace GetVideoColorSpaceFromName(const char *name)
+1 -1
View File
@@ -230,7 +230,7 @@ render_output_texture(struct obs_core_video_mix *mix)
gs_effect_t *effect = get_scale_effect(mix, width, height);
gs_technique_t *tech;
if (video_output_get_format(mix->video) == VIDEO_FORMAT_RGBA) {
if (video_output_get_format(mix->video) == VIDEO_FORMAT_BGRA) {
tech = gs_effect_get_technique(effect, "DrawAlphaDivide");
} else {
if ((width == video->base_width) &&
+11 -11
View File
@@ -337,6 +337,16 @@ static bool obs_init_textures(struct obs_core_video_mix *video)
bool success = true;
enum gs_color_format format = GS_BGRA;
switch (info->format) {
case VIDEO_FORMAT_I010:
case VIDEO_FORMAT_P010:
case VIDEO_FORMAT_I210:
case VIDEO_FORMAT_I412:
case VIDEO_FORMAT_YA2L:
format = GS_RGBA16F;
}
for (size_t i = 0; i < NUM_TEXTURES; i++) {
#ifdef _WIN32
if (video->using_nv12_tex) {
@@ -365,7 +375,7 @@ static bool obs_init_textures(struct obs_core_video_mix *video)
}
} else {
video->copy_surfaces[i][0] = gs_stagesurface_create(
info->width, info->height, GS_RGBA);
info->width, info->height, format);
if (!video->copy_surfaces[i][0]) {
success = false;
break;
@@ -373,16 +383,6 @@ static bool obs_init_textures(struct obs_core_video_mix *video)
}
}
enum gs_color_format format = GS_RGBA;
switch (info->format) {
case VIDEO_FORMAT_I010:
case VIDEO_FORMAT_P010:
case VIDEO_FORMAT_I210:
case VIDEO_FORMAT_I412:
case VIDEO_FORMAT_YA2L:
format = GS_RGBA16F;
}
enum gs_color_space space = GS_CS_SRGB;
switch (info->colorspace) {
case VIDEO_CS_2100_PQ: