Browse Source

UI: Increase minimum output resolution to 32x32

Some hardware encoders fail in indecipherable ways if you try to at
certain low resolutions such as 17x17 or 19x19, but works at 20x20.
However, there is no good way to determine what the minimum working
resolution is for every possible encoder. There isn't that much
difference between 8x8 and 32x32, except that the latter will reduce or
eliminate such odd failure cases, so let's increase the minimum required
output resolution by just a little bit.
Ryan Foster 2 years ago
parent
commit
ece8df2ace
2 changed files with 4 additions and 4 deletions
  1. 3 3
      UI/window-basic-main.cpp
  2. 1 1
      UI/window-basic-settings.cpp

+ 3 - 3
UI/window-basic-main.cpp

@@ -4742,14 +4742,14 @@ int OBSBasic::ResetVideo()
 	ovi.gpu_conversion = true;
 	ovi.scale_type = GetScaleType(basicConfig);
 
-	if (ovi.base_width < 8 || ovi.base_height < 8) {
+	if (ovi.base_width < 32 || ovi.base_height < 32) {
 		ovi.base_width = 1920;
 		ovi.base_height = 1080;
 		config_set_uint(basicConfig, "Video", "BaseCX", 1920);
 		config_set_uint(basicConfig, "Video", "BaseCY", 1080);
 	}
 
-	if (ovi.output_width < 8 || ovi.output_height < 8) {
+	if (ovi.output_width < 32 || ovi.output_height < 32) {
 		ovi.output_width = ovi.base_width;
 		ovi.output_height = ovi.base_height;
 		config_set_uint(basicConfig, "Video", "OutputCX",
@@ -6038,7 +6038,7 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview)
 
 			resizeOutput->setEnabled(!obs_video_active());
 
-			if (width < 8 || height < 8)
+			if (width < 32 || height < 32)
 				resizeOutput->setEnabled(false);
 
 			scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering"));

+ 1 - 1
UI/window-basic-settings.cpp

@@ -94,7 +94,7 @@ static inline bool ResTooHigh(uint32_t cx, uint32_t cy)
 
 static inline bool ResTooLow(uint32_t cx, uint32_t cy)
 {
-	return cx < 8 || cy < 8;
+	return cx < 32 || cy < 32;
 }
 
 /* parses "[width]x[height]", string, i.e. 1024x768 */