diff options
author | sr55 <[email protected]> | 2014-03-28 22:26:26 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-03-28 22:26:26 +0000 |
commit | 47ff6e2232577b743d59ed23fc348002297058f1 (patch) | |
tree | 83edc6747265ff05141c82c3369c053dfc189465 /win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | |
parent | 86283bee130ad89990104b1cdb6a12e2377691fa (diff) |
WinGui: Fix QuickSync and x265 quality slider.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6136 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 0d3dc5ce0..8479874d0 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -398,24 +398,26 @@ namespace HandBrakeWPF.ViewModels {
this.rf = value;
- double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
this.SetQualitySliderBounds();
switch (this.SelectedVideoEncoder)
{
case VideoEncoder.FFMpeg:
case VideoEncoder.FFMpeg2:
this.Task.Quality = (32 - value);
- break;
- case VideoEncoder.QuickSync:
+ break;
case VideoEncoder.X264:
+ case VideoEncoder.X265:
+ double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
double rfValue = 51.0 - value * cqStep;
rfValue = Math.Round(rfValue, 2);
this.Task.Quality = rfValue;
+ break;
+ case VideoEncoder.QuickSync:
+ rfValue = 51.0 - value;
+ rfValue = Math.Round(rfValue, 0);
+ this.Task.Quality = rfValue;
break;
- case VideoEncoder.Theora:
- Task.Quality = value;
- break;
- case VideoEncoder.X265:
+ case VideoEncoder.Theora:
Task.Quality = value;
break;
}
@@ -1090,7 +1092,7 @@ namespace HandBrakeWPF.ViewModels this.RF = 32 - cq;
}
break;
- case VideoEncoder.QuickSync:
+ case VideoEncoder.X265:
case VideoEncoder.X264:
double multiplier = 1.0 / cqStep;
@@ -1103,14 +1105,8 @@ namespace HandBrakeWPF.ViewModels break;
- case VideoEncoder.Theora:
- if (preset.Task.Quality.HasValue)
- {
- this.RF = (int)preset.Task.Quality.Value;
- }
- break;
-
- case VideoEncoder.X265:
+ case VideoEncoder.Theora:
+ case VideoEncoder.QuickSync:
if (preset.Task.Quality.HasValue)
{
this.RF = (int)preset.Task.Quality.Value;
@@ -1295,19 +1291,19 @@ namespace HandBrakeWPF.ViewModels this.QualityMin = 1;
this.QualityMax = 31;
break;
- case VideoEncoder.X264:
case VideoEncoder.QuickSync:
this.QualityMin = 0;
+ this.QualityMax = 51;
+ break;
+ case VideoEncoder.X264:
+ case VideoEncoder.X265:
+ this.QualityMin = 0;
this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step));
break;
case VideoEncoder.Theora:
this.QualityMin = 0;
this.QualityMax = 63;
break;
- case VideoEncoder.X265:
- this.QualityMin = 0;
- this.QualityMax = 50;
- break;
}
}
|