Skip to content

Commit

Permalink
WinGui: Fix HyperEncode checkbox not being taken into account.
Browse files Browse the repository at this point in the history
  • Loading branch information
sr55 committed Mar 27, 2022
1 parent 967270c commit f3d6c7c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions win/CS/HandBrakeWPF/Services/Queue/QueueResourceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ public void Init()
this.maxAllowedInstances = Utilities.SystemInfo.MaximumSimultaneousInstancesSupported;
}

if (this.maxAllowedInstances == 1)
{
this.totalQsvInstances = 1;
this.totalNvidiaInstances = 1;
this.totalVceInstances = 1;
this.totalMfInstances = 1;
return;
}

// Allow QSV adapter scaling.
this.qsvGpus = HandBrakeEncoderHelpers.GetQsvAdaptorList();
this.totalQsvInstances = this.qsvGpus.Count * 2; // Allow two instances per GPU
Expand All @@ -98,6 +89,15 @@ public void Init()
this.totalQsvInstances = 1;
}

if (this.maxAllowedInstances == 1)
{
this.totalQsvInstances = 1;
this.totalNvidiaInstances = 1;
this.totalVceInstances = 1;
this.totalMfInstances = 1;
return;
}

// NVEnc Support - (Most cards support 3 but not all)
this.totalNvidiaInstances = 3;

Expand Down Expand Up @@ -267,11 +267,6 @@ private void AllocateIntelGPU(EncodeTask task)
return; // Not a multi-Intel-GPU system.
}

if (task.ExtraAdvancedArguments.Contains("gpu"))
{
return; // Users choice
}

// HyperEncode takes priority over load balancing when enabled.
if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableQuickSyncHyperEncode))
{
Expand All @@ -280,6 +275,11 @@ private void AllocateIntelGPU(EncodeTask task)
return;
}

if (task.ExtraAdvancedArguments.Contains("gpu"))
{
return; // Users choice
}

if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ProcessIsolationEnabled))
{
return; // Multi-Process encoding is disabled.
Expand Down

0 comments on commit f3d6c7c

Please sign in to comment.