diff options
author | Rodeo <[email protected]> | 2014-03-03 22:36:35 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2014-03-03 22:36:35 +0000 |
commit | 5ade22957f09e273e1bae383b2967fb65c9419b1 (patch) | |
tree | 560d0df8a88400f3c426492b1a4b9ef4fdb4edb9 /macosx | |
parent | 1ea78b3a154253ebb292244e8da0ed0980705bec (diff) |
MacGui: generalize x264CqSliderFractional preference to all
encoders that allow fractional CQ values (such as x265).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6097 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index ca3d6aa69..bc63ae217 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -5359,11 +5359,11 @@ the user is using "Custom" settings by determining the sender*/ float minValue, maxValue, granularity; hb_video_quality_get_limits((int)[[fVidEncoderPopUp selectedItem] tag], &minValue, &maxValue, &granularity, &direction); - if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_X264) + if (granularity < 1.0f) { /* - * As x264 allows for qp/rf values that are fractional, - * we get the value from the preferences + * Encoders that allow fractional CQ values often have a low granularity + * which makes the slider hard to use, so use a value from preferences. */ granularity = [[NSUserDefaults standardUserDefaults] floatForKey:@"x264CqSliderFractional"]; @@ -5371,7 +5371,7 @@ the user is using "Custom" settings by determining the sender*/ [fVidQualitySlider setMinValue:minValue]; [fVidQualitySlider setMaxValue:maxValue]; [fVidQualitySlider setNumberOfTickMarks:((maxValue - minValue) * - (1. / granularity)) + 1]; + (1.0f / granularity)) + 1]; /* check to see if we have changed slider scales */ if (previousMaxValue != maxValue) |