summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-02-11 23:03:21 +0000
committerdynaflash <[email protected]>2009-02-11 23:03:21 +0000
commitbfd2a847978e4594236ff012ec69f5867c0e74d0 (patch)
tree26c6b6181b0252e60b12dd56b1ed4a25387a6af0
parentabfd603adac74e6bc916dee2079625d235f22b8d (diff)
MacGui: Constant Quality slider, fix percentage readouts for ffmpeg, xvid and theora. Thanks J45.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2145 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 0e1359a07..287b4944b 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -4092,16 +4092,17 @@ the user is using "Custom" settings by determining the sender*/
float sliderRfInverse = ([fVidQualitySlider maxValue] - [fVidQualitySlider floatValue]) + [fVidQualitySlider minValue];
/* If the encoder is theora, use the float, otherwise use the inverse float*/
+ float sliderRfToPercent;
if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
{
- [fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", [fVidQualitySlider floatValue]]];
+ [fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", [fVidQualitySlider floatValue]]];
+ sliderRfToPercent = [fVidQualityRFField floatValue] / ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]);
}
else
{
[fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", sliderRfInverse]];
+ sliderRfToPercent = ( ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) - ([fVidQualityRFField floatValue] - [fVidQualitySlider minValue])) / ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]);
}
-
- float sliderRfToPercent = ( [fVidQualitySlider maxValue] - sliderRfInverse ) / [fVidQualitySlider maxValue];
[fVidConstantCell setTitle: [NSString stringWithFormat:
NSLocalizedString( @"Constant quality: %.2f %%", @"" ), 100 * sliderRfToPercent]];