Skip to content

Commit

Permalink
WinGui: Minor improvement to the defaulting behaviour of hardware dec…
Browse files Browse the repository at this point in the history
…oders. If the driver is OK, allow default on.
  • Loading branch information
sr55 committed Jul 16, 2024
1 parent 0cc92fb commit 273bacf
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions win/CS/HandBrakeWPF/Services/UserSettingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,18 @@ private Dictionary<string, object> GetDefaults()
defaults.Add(UserSettingConstants.WhenDoneAudioFile, string.Empty);

// Video
defaults.Add(UserSettingConstants.EnableQuickSyncEncoding, true);
defaults.Add(UserSettingConstants.EnableQuickSyncDecoding, false);
defaults.Add(UserSettingConstants.EnableQuickSyncHyperEncode, false);
GpuInfo info = SystemInfo.GetGPUInfo.FirstOrDefault(s => s.IsIntel);
bool intelDefaultSetting = !(info == null || info.IsIntelDriverSupported);
info = SystemInfo.GetGPUInfo.FirstOrDefault(s => s.IsIntel);
bool nvidiaDefaultSetting = !(info == null || info.IsNvidiaDriverSupported);

defaults.Add(UserSettingConstants.EnableQuickSyncEncoding, intelDefaultSetting);
defaults.Add(UserSettingConstants.EnableQuickSyncDecoding, intelDefaultSetting);
defaults.Add(UserSettingConstants.EnableQuickSyncHyperEncode, intelDefaultSetting);
defaults.Add(UserSettingConstants.UseQSVDecodeForNonQSVEnc, false);
defaults.Add(UserSettingConstants.EnableVceEncoder, true);
defaults.Add(UserSettingConstants.EnableNvencEncoder, true);
defaults.Add(UserSettingConstants.EnableNvDecSupport, false);
defaults.Add(UserSettingConstants.EnableNvencEncoder, nvidiaDefaultSetting);
defaults.Add(UserSettingConstants.EnableNvDecSupport, nvidiaDefaultSetting);
defaults.Add(UserSettingConstants.EnableQuickSyncLowPower, true);

// Advanced
Expand Down

0 comments on commit 273bacf

Please sign in to comment.