Ver Fonte

UI: Add sRGB option to colorSpace output setting

Creates video streams/files with sRGB transfer specified.
jpark37 há 5 anos atrás
pai
commit
fe1ee749b3
2 ficheiros alterados com 10 adições e 2 exclusões
  1. 5 0
      UI/forms/OBSBasicSettings.ui
  2. 5 2
      UI/window-basic-main.cpp

+ 5 - 0
UI/forms/OBSBasicSettings.ui

@@ -4822,6 +4822,11 @@
                      </property>
                      <item>
                       <widget class="QComboBox" name="colorSpace">
+                       <item>
+                        <property name="text">
+                         <string notr="true">sRGB</string>
+                        </property>
+                       </item>
                        <item>
                         <property name="text">
                          <string notr="true">709</string>

+ 5 - 2
UI/window-basic-main.cpp

@@ -3760,8 +3760,11 @@ int OBSBasic::ResetVideo()
 	ovi.output_height =
 		(uint32_t)config_get_uint(basicConfig, "Video", "OutputCY");
 	ovi.output_format = GetVideoFormatFromName(colorFormat);
-	ovi.colorspace = astrcmpi(colorSpace, "601") == 0 ? VIDEO_CS_601
-							  : VIDEO_CS_709;
+	ovi.colorspace = astrcmpi(colorSpace, "601") == 0
+				 ? VIDEO_CS_601
+				 : (astrcmpi(colorSpace, "709") == 0
+					    ? VIDEO_CS_709
+					    : VIDEO_CS_SRGB);
 	ovi.range = astrcmpi(colorRange, "Full") == 0 ? VIDEO_RANGE_FULL
 						      : VIDEO_RANGE_PARTIAL;
 	ovi.adapter =