diff options
7 files changed, 57 insertions, 15 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs index 4f30b5df3..ac02cb843 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs @@ -22,6 +22,10 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [ShortName("x264")]
X264 = 0,
+ [Display(Name = "H.264 10-bit (x264)")]
+ [ShortName("x264_10bit")]
+ X264_10,
+
[Display(Name = "H.264 (Intel QSV)")]
[ShortName("qsv_h264")]
QuickSync,
@@ -46,6 +50,14 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [ShortName("x265")]
X265,
+ [Display(Name = "H.265 12-bit (x265)")]
+ [ShortName("x265_12bit")]
+ X265_12,
+
+ [Display(Name = "H.265 10-bit (x265)")]
+ [ShortName("x265_10bit")]
+ X265_10,
+
[Display(Name = "VP8")]
[ShortName("vp8")]
VP8
diff --git a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs index 29e668917..dce48a4cf 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs @@ -48,7 +48,7 @@ namespace HandBrakeWPF.Converters.Video public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
EncodeTask task = value as EncodeTask;
- if (task != null && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X265))
+ if (task != null && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10 || task.VideoEncoder == VideoEncoder.X265 || task.VideoEncoder == VideoEncoder.X265_10 || task.VideoEncoder == VideoEncoder.X265_12))
{
if (task.ShowAdvancedTab)
{
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index e387bf064..489b787b1 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -15,6 +15,7 @@ namespace HandBrakeWPF.Converters.Video using System.Linq;
using System.Windows.Data;
+ using HandBrake.ApplicationServices.Interop;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
@@ -53,6 +54,21 @@ namespace HandBrakeWPF.Converters.Video List<VideoEncoder> encoders = EnumHelper<VideoEncoder>.GetEnumList().ToList();
EncodeTask task = values[1] as EncodeTask;
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X264_10)))
+ {
+ encoders.Remove(VideoEncoder.X264_10);
+ }
+
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X265_10)))
+ {
+ encoders.Remove(VideoEncoder.X265_10);
+ }
+
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X265_12)))
+ {
+ encoders.Remove(VideoEncoder.X265_12);
+ }
+
if (task != null && task.OutputFormat != OutputFormat.Mkv)
{
encoders.Remove(VideoEncoder.Theora);
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs index 3937cc373..f175ec2ad 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs @@ -48,7 +48,8 @@ namespace HandBrakeWPF.Converters.Video EncodeTask task = value as EncodeTask;
if (task != null)
{
- string rfqp = task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X265 ? "RF" : "QP";
+ string rfqp = task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10 || task.VideoEncoder == VideoEncoder.X265
+ || task.VideoEncoder == VideoEncoder.X265_10 || task.VideoEncoder == VideoEncoder.X265_12 ? "RF" : "QP";
string quality = task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality ? task.Quality + rfqp : task.VideoBitrate + " kbps";
string twoPass = task.TwoPass ? task.TurboFirstPass ? " (2-Pass with Turbo)" : " (2-Pass)" : string.Empty;
return string.Format("{0} - {1}{2}", EnumHelper<VideoEncoder>.GetDisplay(task.VideoEncoder), quality, twoPass);
diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index 069f097e7..746d457ef 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -78,7 +78,7 @@ namespace HandBrakeWPF.ViewModels public void SetEncoder(VideoEncoder encoder)
{
this.X264ViewModel.SetEncoder(encoder);
- this.ShowX264Panel = encoder == VideoEncoder.X264;
+ this.ShowX264Panel = encoder == VideoEncoder.X264 || encoder == VideoEncoder.X264_10;
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 981413a9a..bcccab989 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -121,7 +121,7 @@ namespace HandBrakeWPF.ViewModels this.UseAdvancedTab = false;
}
- if (this.SelectedVideoEncoder != VideoEncoder.X264)
+ if (this.SelectedVideoEncoder != VideoEncoder.X264 && this.SelectedVideoEncoder != VideoEncoder.X264_10)
{
return false;
}
@@ -275,7 +275,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return 0.0.Equals(this.DisplayRF) && this.SelectedVideoEncoder == VideoEncoder.X264;
+ return 0.0.Equals(this.DisplayRF) && this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10;
}
}
@@ -341,7 +341,10 @@ namespace HandBrakeWPF.ViewModels this.Task.Quality = (63 - value);
break;
case VideoEncoder.X264:
+ case VideoEncoder.X264_10:
case VideoEncoder.X265:
+ case VideoEncoder.X265_10:
+ case VideoEncoder.X265_12:
double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
double rfValue = 51.0 - value * cqStep;
rfValue = Math.Round(rfValue, 2);
@@ -436,7 +439,8 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 ? "RF" : "QP";
+ return this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 || this.SelectedVideoEncoder == VideoEncoder.X265
+ || this.SelectedVideoEncoder == VideoEncoder.X265_10 || this.SelectedVideoEncoder == VideoEncoder.X265_12 ? "RF" : "QP";
}
}
@@ -447,7 +451,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return this.SelectedVideoEncoder == VideoEncoder.X264 ? Resources.Video_PlaceboQuality : Resources.Video_HigherQuality;
+ return this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 ? Resources.Video_PlaceboQuality : Resources.Video_HigherQuality;
}
}
@@ -822,7 +826,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return this.SelectedVideoEncoder != VideoEncoder.X264 ? Resources.Video_EncoderExtraArgsTooltip : string.Format(Resources.Video_EncoderExtraArgs, this.GetActualx264Query());
+ return this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder != VideoEncoder.X264_10 ? string.Format(Resources.Video_EncoderExtraArgs, this.GetActualx264Query()) : Resources.Video_EncoderExtraArgsTooltip ;
}
}
@@ -924,7 +928,9 @@ namespace HandBrakeWPF.ViewModels HBVideoEncoder encoder = HandBrakeEncoderHelpers.VideoEncoders.FirstOrDefault(s => s.ShortName == EnumHelper<VideoEncoder>.GetShortName(preset.Task.VideoEncoder));
if (encoder != null)
{
- if (preset.Task.VideoEncoder == VideoEncoder.X264 || preset.Task.VideoEncoder == VideoEncoder.X265 || preset.Task.VideoEncoder == VideoEncoder.QuickSync || preset.Task.VideoEncoder == VideoEncoder.QuickSyncH265)
+ if (preset.Task.VideoEncoder == VideoEncoder.X264 || preset.Task.VideoEncoder == VideoEncoder.X264_10
+ || preset.Task.VideoEncoder == VideoEncoder.X265 || preset.Task.VideoEncoder == VideoEncoder.X265_10 || preset.Task.VideoEncoder == VideoEncoder.X265_12
+ || preset.Task.VideoEncoder == VideoEncoder.QuickSync || preset.Task.VideoEncoder == VideoEncoder.QuickSyncH265)
{
this.VideoLevel = preset.Task.VideoLevel != null ? preset.Task.VideoLevel.Clone() : this.VideoLevels.FirstOrDefault();
this.VideoProfile = preset.Task.VideoProfile != null ? preset.Task.VideoProfile.Clone() : this.VideoProfiles.FirstOrDefault();
@@ -1021,7 +1027,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void CopyQuery()
{
- Clipboard.SetDataObject(this.SelectedVideoEncoder == VideoEncoder.X264 ? this.GetActualx264Query() : this.ExtraArguments);
+ Clipboard.SetDataObject(this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 ? this.GetActualx264Query() : this.ExtraArguments);
}
#endregion
@@ -1046,7 +1052,10 @@ namespace HandBrakeWPF.ViewModels this.QualityMax = 51;
break;
case VideoEncoder.X264:
+ case VideoEncoder.X264_10:
case VideoEncoder.X265:
+ case VideoEncoder.X265_10:
+ case VideoEncoder.X265_12:
this.QualityMin = 0;
this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step));
break;
@@ -1169,7 +1178,10 @@ namespace HandBrakeWPF.ViewModels }
break;
case VideoEncoder.X265:
+ case VideoEncoder.X265_10:
+ case VideoEncoder.X265_12:
case VideoEncoder.X264:
+ case VideoEncoder.X264_10:
case VideoEncoder.QuickSync:
case VideoEncoder.QuickSyncH265:
if (this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265)
@@ -1292,11 +1304,12 @@ namespace HandBrakeWPF.ViewModels // Update control display
this.UseAdvancedTab = selectedEncoder != VideoEncoder.QuickSync && selectedEncoder != VideoEncoder.QuickSyncH265 && this.UseAdvancedTab;
- this.DisplayOptimiseOptions = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
+ this.DisplayOptimiseOptions = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.X265_10 || this.SelectedVideoEncoder == VideoEncoder.X265_12
+ || this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
this.DisplayNonQSVControls = this.SelectedVideoEncoder != VideoEncoder.QuickSync && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH265;
- this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264;
- this.DisplayTuneControls = SelectedVideoEncoder == VideoEncoder.X264 || SelectedVideoEncoder == VideoEncoder.X265;
- this.DisplayLevelControl = SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
+ this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264 || selectedEncoder == VideoEncoder.X264_10;
+ this.DisplayTuneControls = SelectedVideoEncoder == VideoEncoder.X264 || SelectedVideoEncoder == VideoEncoder.X264_10 || SelectedVideoEncoder == VideoEncoder.X265 || SelectedVideoEncoder == VideoEncoder.X265_10 || SelectedVideoEncoder == VideoEncoder.X265_12;
+ this.DisplayLevelControl = SelectedVideoEncoder == VideoEncoder.X264 || SelectedVideoEncoder == VideoEncoder.X264_10 || this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
// Refresh Display
this.NotifyOfPropertyChange(() => this.Rfqp);
diff --git a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs index 2789dcc19..5b2694cd9 100644 --- a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs @@ -945,7 +945,7 @@ namespace HandBrakeWPF.ViewModels this.Task.PropertyChanged += this.Task_PropertyChanged;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
- if (task.ShowAdvancedTab && task.VideoEncoder == VideoEncoder.X264)
+ if (task.ShowAdvancedTab && task.VideoEncoder == VideoEncoder.X264 && task.VideoEncoder == VideoEncoder.X264_10)
{
this.ShowX264AdvancedOptions = true;
this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);
|