diff options
9 files changed, 71 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs b/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs index a27eae1be..6290004c8 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs @@ -25,6 +25,11 @@ namespace HandBrake.ApplicationServices.Model public bool DisableQuickSyncDecoding { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether use qsv decode for non qsv enc.
+ /// </summary>
+ public bool UseQSVDecodeForNonQSVEnc { get; set; }
+
+ /// <summary>
/// Gets or sets the scaling mode.
/// </summary>
public VideoScaler ScalingMode { get; set; }
diff --git a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs index 6c702e8b0..dc3fa1983 100644 --- a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs +++ b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs @@ -37,6 +37,7 @@ namespace HandBrakeWPF.Factories {
IsDvdNavDisabled = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav),
DisableQuickSyncDecoding = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableQuickSyncDecoding),
+ UseQSVDecodeForNonQSVEnc = UserSettingService.GetUserSetting<bool>(UserSettingConstants.UseQSVDecodeForNonQSVEnc),
ScalingMode = UserSettingService.GetUserSetting<VideoScaler>(UserSettingConstants.ScalingMode),
PreviewScanCount = UserSettingService.GetUserSetting<int>(UserSettingConstants.PreviewScanCount),
Verbosity = UserSettingService.GetUserSetting<int>(UserSettingConstants.Verbosity),
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index f5b473e78..28dd1e6b0 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -1303,6 +1303,15 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Use QSV Decoding for non QSV encoders..
+ /// </summary>
+ public static string Options_QsvDecodeForNonFullPath {
+ get {
+ return ResourceManager.GetString("Options_QsvDecodeForNonFullPath", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Remove common punctuation.
/// </summary>
public static string Options_RemovePunctuation {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index 6e0be7892..fa9231625 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -887,4 +887,7 @@ This will not affect your current settings in the Subtitle tab.</value> <data name="ManagePresetView_ManagePreset" xml:space="preserve">
<value>Manage Preset</value>
</data>
+ <data name="Options_QsvDecodeForNonFullPath" xml:space="preserve">
+ <value>Use QSV Decoding for non QSV encoders.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs index a390db6fb..31f315f7e 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs @@ -305,6 +305,12 @@ namespace HandBrakeWPF.Services.Encode.Factories video.QSV.Decode = SystemInfo.IsQsvAvailable && !configuration.DisableQuickSyncDecoding; + // The use of the QSV decoder is configurable for non QSV encoders. + if (video.QSV.Decode && job.VideoEncoder != VideoEncoder.QuickSync && job.VideoEncoder != VideoEncoder.QuickSyncH265) + { + video.QSV.Decode = configuration.UseQSVDecodeForNonQSVEnc; + } + return video; } diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index fabd5ee9d..80b740b90 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -167,6 +167,11 @@ namespace HandBrakeWPF public const string DisableQuickSyncDecoding = "DisableQuickSyncDecoding";
/// <summary>
+ /// Setting indicating whether to use qsv decode for non qsv encoders
+ /// </summary>
+ public const string UseQSVDecodeForNonQSVEnc = "UseQSVDecodeForNonQSVEnc";
+
+ /// <summary>
/// The scaling mode.
/// </summary>
public const string ScalingMode = "ScalingMode";
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 125939054..cdf480be6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -93,6 +93,8 @@ namespace HandBrakeWPF.ViewModels private bool showQueueInline;
private bool pauseOnLowDiskspace;
+ private bool useQsvDecodeForNonQsvEnc;
+
#endregion
#region Constructors and Destructors
@@ -881,6 +883,7 @@ namespace HandBrakeWPF.ViewModels }
this.disableQuickSyncDecoding = value;
this.NotifyOfPropertyChange(() => this.DisableQuickSyncDecoding);
+ this.NotifyOfPropertyChange(() => this.IsUseQsvDecAvailable);
}
}
@@ -912,6 +915,34 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Gets a value indicating whether is use qsv dec available.
+ /// </summary>
+ public bool IsUseQsvDecAvailable
+ {
+ get
+ {
+ return IsQuickSyncAvailable && !this.DisableQuickSyncDecoding;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to use qsv decode for non qsv encoders
+ /// </summary>
+ public bool UseQSVDecodeForNonQSVEnc
+ {
+ get
+ {
+ return this.useQsvDecodeForNonQsvEnc;
+ }
+ set
+ {
+ if (value == this.useQsvDecodeForNonQsvEnc) return;
+ this.useQsvDecodeForNonQsvEnc = value;
+ this.NotifyOfPropertyChange(() => this.UseQSVDecodeForNonQSVEnc);
+ }
+ }
+
+ /// <summary>
/// Gets the scaling options.
/// </summary>
public BindingList<VideoScaler> ScalingOptions
@@ -1216,6 +1247,7 @@ namespace HandBrakeWPF.ViewModels // #############################
this.DisableQuickSyncDecoding = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableQuickSyncDecoding);
this.SelectedScalingMode = this.userSettingService.GetUserSetting<VideoScaler>(UserSettingConstants.ScalingMode);
+ this.UseQSVDecodeForNonQSVEnc = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseQSVDecodeForNonQSVEnc);
// #############################
// CLI
@@ -1317,6 +1349,7 @@ namespace HandBrakeWPF.ViewModels /* Video */
this.userSettingService.SetUserSetting(UserSettingConstants.DisableQuickSyncDecoding, this.DisableQuickSyncDecoding);
this.userSettingService.SetUserSetting(UserSettingConstants.ScalingMode, this.SelectedScalingMode);
+ this.userSettingService.SetUserSetting(UserSettingConstants.UseQSVDecodeForNonQSVEnc, this.UseQSVDecodeForNonQSVEnc);
/* System and Logging */
userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 66ef36318..da8bd67c7 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -224,6 +224,7 @@ <StackPanel Orientation="Vertical" Margin="20,10,0,0">
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecode}" IsEnabled="{Binding IsQuickSyncAvailable}" IsChecked="{Binding DisableQuickSyncDecoding}" />
+ <CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecodeForNonFullPath}" IsEnabled="{Binding IsUseQsvDecAvailable}" IsChecked="{Binding UseQSVDecodeForNonQSVEnc}" />
<TextBlock Text="{x:Static Properties:Resources.Video_QuickSyncNotAvailable}" Margin="17,2,0,0" TextWrapping="Wrap"
Visibility="{Binding IsQuickSyncAvailable, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 42c662ac1..f28f8b9cb 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -472,4 +472,12 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">3</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>UseQSVDecodeForNonQSVEnc</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
</dictionary>
\ No newline at end of file |