diff options
author | jstebbins <[email protected]> | 2011-03-21 02:20:48 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-03-21 02:20:48 +0000 |
commit | 01372381e86f1f89ab40cdf8c2a08b9a71bbca23 (patch) | |
tree | 47baa6104b656865606323a82f514ef8b39ba79d /macosx/Controller.m | |
parent | fdef4b5164b56403a2a6710ffb5a605d0e434924 (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/Controller.m')
-rw-r--r-- | macosx/Controller.m | 55 |
1 files changed, 13 insertions, 42 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]; |