summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-21 02:20:48 +0000
committerjstebbins <[email protected]>2011-03-21 02:20:48 +0000
commit01372381e86f1f89ab40cdf8c2a08b9a71bbca23 (patch)
tree47baa6104b656865606323a82f514ef8b39ba79d /macosx
parentfdef4b5164b56403a2a6710ffb5a605d0e434924 (diff)
Remove legacy % to RF mapping.
Although the % option has been gone for a while in the cli and gui's, there were some mappings happening in libhb and for preset imports. This removes the last vestages of % quality mapping. Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3857 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.m55
-rw-r--r--macosx/HBPresets.m5
2 files changed, 13 insertions, 47 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index 4bdc32895..359f86558 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -2753,30 +2753,16 @@ fWorkingCount = 0;
[fVidQualityMatrix selectCellAtRow:[[queueToApply objectForKey:@"VideoQualityType"] intValue] column:0];
[fVidBitrateField setStringValue:[queueToApply objectForKey:@"VideoAvgBitrate"]];
- /* Since we are now using RF Values for the slider, we detect if the preset uses an old quality float.
- * So, check to see if the quality value is less than 1.0 which should indicate the old ".062" type
- * quality preset. Caveat: in the case of x264, where the RF scale starts at 0, it would misinterpret
- * a preset that uses 0.0 - 0.99 for RF as an old style preset. Not sure how to get around that one yet,
- * though it should be a corner case since it would pretty much be a preset for lossless encoding. */
- if ([[queueToApply objectForKey:@"VideoQualitySlider"] floatValue] < 1.0)
- {
- /* For the quality slider we need to convert the old percent's to the new rf scales */
- float rf = (([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) * [[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]);
- [fVidQualitySlider setFloatValue:rf];
-
+
+ if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
+ {
+ /* Since theora's qp value goes up from left to right, we can just set the slider float value */
+ [fVidQualitySlider setFloatValue:[[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]];
}
else
{
- /* Since theora's qp value goes up from left to right, we can just set the slider float value */
- if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
- {
- [fVidQualitySlider setFloatValue:[[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]];
- }
- else
- {
- /* since ffmpeg and x264 use an "inverted" slider (lower qp/rf values indicate a higher quality) we invert the value on the slider */
- [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] + [fVidQualitySlider minValue]) - [[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]];
- }
+ /* Since ffmpeg and x264 use an "inverted" slider (lower qp/rf values indicate a higher quality) we invert the value on the slider */
+ [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] + [fVidQualitySlider minValue]) - [[queueToApply objectForKey:@"VideoQualitySlider"] floatValue]];
}
[self videoMatrixChanged:nil];
@@ -5522,30 +5508,15 @@ return YES;
[fVidBitrateField setStringValue:[chosenPreset objectForKey:@"VideoAvgBitrate"]];
- /* Since we are now using RF Values for the slider, we detect if the preset uses an old quality float.
- * So, check to see if the quality value is less than 1.0 which should indicate the old ".062" type
- * quality preset. Caveat: in the case of x264, where the RF scale starts at 0, it would misinterpret
- * a preset that uses 0.0 - 0.99 for RF as an old style preset. Not sure how to get around that one yet,
- * though it should be a corner case since it would pretty much be a preset for lossless encoding. */
- if ([[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue] < 1.0)
- {
- /* For the quality slider we need to convert the old percent's to the new rf scales */
- float rf = (([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) * [[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]);
- [fVidQualitySlider setFloatValue:rf];
-
+ if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
+ {
+ /* Since theora's qp value goes up from left to right, we can just set the slider float value */
+ [fVidQualitySlider setFloatValue:[[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
}
else
{
- /* Since theora's qp value goes up from left to right, we can just set the slider float value */
- if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
- {
- [fVidQualitySlider setFloatValue:[[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
- }
- else
- {
- /* since ffmpeg and x264 use an "inverted" slider (lower qp/rf values indicate a higher quality) we invert the value on the slider */
- [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] + [fVidQualitySlider minValue]) - [[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
- }
+ /* Since ffmpeg and x264 use an "inverted" slider (lower qp/rf values indicate a higher quality) we invert the value on the slider */
+ [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] + [fVidQualitySlider minValue]) - [[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
}
[self videoMatrixChanged:nil];
diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m
index a574979d3..170e455bc 100644
--- a/macosx/HBPresets.m
+++ b/macosx/HBPresets.m
@@ -302,7 +302,6 @@
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" forKey:@"VideoTargetSize"];
[preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
- [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
/* Video framerate */
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
@@ -833,7 +832,6 @@
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" forKey:@"VideoTargetSize"];
[preset setObject:@"1000" forKey:@"VideoAvgBitrate"];
- [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
/* Video framerate */
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
@@ -1128,7 +1126,6 @@
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" forKey:@"VideoTargetSize"];
[preset setObject:@"960" forKey:@"VideoAvgBitrate"];
- [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
/* Video framerate */
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
@@ -1221,7 +1218,6 @@
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" forKey:@"VideoTargetSize"];
[preset setObject:@"1500" forKey:@"VideoAvgBitrate"];
- [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
/* Video framerate */
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
@@ -1314,7 +1310,6 @@
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" forKey:@"VideoTargetSize"];
[preset setObject:@"700" forKey:@"VideoAvgBitrate"];
- [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
/* Video framerate */
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];