diff options
author | Rodeo <tdskywalker@gmail.com> | 2013-11-08 23:00:19 +0000 |
---|---|---|
committer | Rodeo <tdskywalker@gmail.com> | 2013-11-08 23:00:19 +0000 |
commit | 6b27b0d868d030992cf50d2c0f9369ecfd8916d2 (patch) | |
tree | 8911ae562b1be91e6eb369eeca03b6a5f847565b /win/CS | |
parent | 4521a52e7fa432426dd3886e14e9de0b99a17615 (diff) |
WinGui: don't ignore the H.264 profile and level when the encoder is QSV.
The QSV encoder can also honor those settings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5888 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 66 |
1 files changed, 47 insertions, 19 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 681a73ed6..a40e76a46 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -983,25 +983,53 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.Task);
- if (preset.Task != null)
- {
- this.SetEncoder(preset.Task.VideoEncoder);
- this.X264PresetValue = preset.Task.VideoEncoder == VideoEncoder.X264
- ? (int)preset.Task.X264Preset
- : (int)x264Preset.Medium;
- this.H264Profile = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Profile : x264Profile.None;
- this.X264Tune = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.X264Tune : x264Tune.None;
- this.H264Level = preset.Task.VideoEncoder == VideoEncoder.X264 ? preset.Task.H264Level : "Auto";
- this.FastDecode = preset.Task.VideoEncoder == VideoEncoder.X264 && preset.Task.FastDecode;
- this.ExtraArguments = preset.Task.ExtraAdvancedArguments;
-
- this.QsvPresetValue = preset.Task.VideoEncoder == VideoEncoder.QuickSync
- ? (int)preset.Task.QsvPreset
- : SystemInfo.IsHswOrNewer ? (int)QsvPreset.Quality : (int)QsvPreset.Balanced;
-
- this.UseAdvancedTab = !string.IsNullOrEmpty(preset.Task.AdvancedEncoderOptions) && this.ShowAdvancedTab;
- }
- }
+ if (preset.Task != null) + { + this.SetEncoder(preset.Task.VideoEncoder); + + // applies to both x264 and QSV + if (preset.Task.VideoEncoder == VideoEncoder.X264 || + preset.Task.VideoEncoder == VideoEncoder.QuickSync) + { + this.H264Profile = preset.Task.H264Profile; + this.H264Level = preset.Task.H264Level; + } + else + { + this.H264Profile = x264Profile.None; + this.H264Level = "Auto"; + } + + // x264 Only + if (preset.Task.VideoEncoder == VideoEncoder.X264) + { + this.X264PresetValue = (int)preset.Task.X264Preset; + this.X264Tune = preset.Task.X264Tune; + this.FastDecode = preset.Task.FastDecode; + } + else + { + this.X264PresetValue = (int)x264Preset.Medium; + this.X264Tune = x264Tune.None; + this.FastDecode = false; + } + + // QSV Only + if (preset.Task.VideoEncoder == VideoEncoder.QuickSync) + { + this.QsvPresetValue = (int)preset.Task.QsvPreset; + } + else + { + this.QsvPresetValue = SystemInfo.IsHswOrNewer + ? (int)QsvPreset.Quality + : (int)QsvPreset.Balanced; + } + + this.ExtraArguments = preset.Task.ExtraAdvancedArguments; + this.UseAdvancedTab = !string.IsNullOrEmpty(preset.Task.AdvancedEncoderOptions) && this.ShowAdvancedTab; + } + } /// <summary>
/// Update all the UI controls based on the encode task passed in.
|