diff options
author | sr55 <[email protected]> | 2014-04-19 20:16:12 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-04-19 20:16:12 +0000 |
commit | 06243dc065919ec1b547d547e97a43d50c4e3595 (patch) | |
tree | e3bfe52501b8c48238570e2a52465e880a0df01a /win/CS | |
parent | d68d469f8e1b42675f6f55c5c04458be0da14c41 (diff) |
WinGui: Adding support for the VP8 encoder. Changing "CQ" to "RF" for x265
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6168 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
5 files changed, 31 insertions, 26 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs index b27678b6e..4799fc2e9 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs @@ -299,6 +299,8 @@ namespace HandBrake.ApplicationServices.Utilities return VideoEncoder.Theora;
case "x265":
return VideoEncoder.X265;
+ case "VP8":
+ return VideoEncoder.VP8;
default:
return VideoEncoder.X264;
}
@@ -329,6 +331,8 @@ namespace HandBrake.ApplicationServices.Utilities return "theora";
case VideoEncoder.X265:
return "x265";
+ case VideoEncoder.VP8:
+ return "VP8";
default:
return "x264";
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index a4197fdf9..8fe7cd3ac 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -15,11 +15,8 @@ namespace HandBrake.ApplicationServices.Utilities using System.Globalization;
using System.IO;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
using HandBrake.Interop.Model.Encoding.x265;
@@ -433,6 +430,9 @@ namespace HandBrake.ApplicationServices.Utilities case VideoEncoder.Theora:
query += " -e theora";
break;
+ case VideoEncoder.VP8:
+ query += " -e VP8";
+ break;
default:
query += " -e x264";
break;
@@ -448,23 +448,7 @@ namespace HandBrake.ApplicationServices.Utilities query += string.Format(" -b {0}", task.VideoBitrate.Value);
break;
case VideoEncodeRateType.ConstantQuality:
- switch (task.VideoEncoder)
- {
- case VideoEncoder.FFMpeg:
- case VideoEncoder.FFMpeg2:
- query += string.Format(" -q {0}", task.Quality.Value.ToString(CultureInfo.InvariantCulture));
- break;
- case VideoEncoder.X264:
- case VideoEncoder.QuickSync:
- query += string.Format(" -q {0}", task.Quality.Value.ToString(CultureInfo.InvariantCulture));
- break;
- case VideoEncoder.Theora:
- query += string.Format(" -q {0}", task.Quality.Value.ToString(CultureInfo.InvariantCulture));
- break;
- case VideoEncoder.X265:
- query += string.Format(" -q {0}", task.Quality.Value.ToString(CultureInfo.InvariantCulture));
- break;
- }
+ query += string.Format(" -q {0}", task.Quality.Value.ToString(CultureInfo.InvariantCulture));
break;
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs index d9faaa6a4..36c228d77 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs @@ -25,20 +25,24 @@ namespace HandBrake.Interop.Model.Encoding [Display(Name = "H.264 (Intel QSV)")]
QuickSync,
- [Display(Name = "MPEG-4 (FFmpeg)")]
+ [Display(Name = "MPEG-4")]
[ShortName("mpeg4")]
FFMpeg,
- [Display(Name = "MPEG-2 (FFmpeg)")]
+ [Display(Name = "MPEG-2")]
[ShortName("mpeg2")]
FFMpeg2,
- [Display(Name = "VP3 (Theora)")]
+ [Display(Name = "Theora")]
[ShortName("theora")]
Theora,
[Display(Name = "H.265 (x265)")]
[ShortName("x265")]
- X265
+ X265,
+
+ [Display(Name = "VP8")]
+ [ShortName("vp8")]
+ VP8
}
}
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index 8e2f1d379..12699236d 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -53,6 +53,7 @@ namespace HandBrakeWPF.Converters.Video if (task != null && task.OutputFormat != OutputFormat.Mkv)
{
encoders.Remove(VideoEncoder.Theora);
+ encoders.Remove(VideoEncoder.VP8);
}
if (!SystemInfo.IsQsvAvailable)
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 8479874d0..0f5a0e167 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -404,7 +404,10 @@ namespace HandBrakeWPF.ViewModels case VideoEncoder.FFMpeg:
case VideoEncoder.FFMpeg2:
this.Task.Quality = (32 - value);
- break;
+ break;
+ case VideoEncoder.VP8:
+ this.Task.Quality = (63 - value);
+ break;
case VideoEncoder.X264:
case VideoEncoder.X265:
double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
@@ -480,7 +483,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return this.SelectedVideoEncoder == VideoEncoder.X264 ? "RF" : "QP";
+ return this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 ? "RF" : "QP";
}
}
@@ -1092,6 +1095,14 @@ namespace HandBrakeWPF.ViewModels this.RF = 32 - cq;
}
break;
+ case VideoEncoder.VP8:
+ if (preset.Task.Quality.HasValue)
+ {
+ int cq;
+ int.TryParse(preset.Task.Quality.Value.ToString(CultureInfo.InvariantCulture), out cq);
+ this.RF = 63 - cq;
+ }
+ break;
case VideoEncoder.X265:
case VideoEncoder.X264:
@@ -1301,6 +1312,7 @@ namespace HandBrakeWPF.ViewModels this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step));
break;
case VideoEncoder.Theora:
+ case VideoEncoder.VP8:
this.QualityMin = 0;
this.QualityMax = 63;
break;
|