[Patch] MacGUI display QP for FFmpeg and Theora

Developer discussion and patch submissions only!
Forum rules
This forum is for developer discussion and patch submission only.

Forum Rules can be found here

[Patch] MacGUI display QP for FFmpeg and Theora

Postby Rodeo » Sat Oct 31, 2009 11:59 pm

Due to a mistake in a patch I submitted to dynaflash, since svn2892, in constant quality mode, the MacGUI will display "RF:" above the quality slider, regardless of which encoder (x264, FFmpeg, Theora) is selected.

Since only x264 features CRF, "QP:" should be displayed instead when the encoder is FFmpeg or Theora.

This patch:

Code: Select all
Index: macosx/Controller.m
===================================================================
--- macosx/Controller.m   (revision 2896)
+++ macosx/Controller.m   (working copy)
@@ -4567,7 +4567,7 @@
      * so that we can choose a new similar value on the new slider scale */
     float previousMaxValue = [fVidQualitySlider maxValue];
     float previousPercentOfSliderScale = [fVidQualitySlider floatValue] / ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue] + 1);
-    NSString * qpRFLabelString = @"RF:";
+    NSString * qpRFLabelString = @"QP:";
     /* x264 0-51 */
     if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_X264)
     {
@@ -4576,6 +4576,7 @@
         /* As x264 allows for qp/rf values that are fractional, we get the value from the preferences */
         int fractionalGranularity = 1 / [[NSUserDefaults standardUserDefaults] floatForKey:@"x264CqSliderFractional"];
         [fVidQualitySlider setNumberOfTickMarks:(([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) * fractionalGranularity) + 1];
+        qpRFLabelString = @"RF:";
     }
     /* ffmpeg  1-31 */
     if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_FFMPEG )



fixes this by reverting some of the changes introduced in svn2892.

The label above the quality slider defaults to "QP:" like it used to, and is set to "RF:" only when the encoder is x264, like it used to. However, the code no longer checks to see if the "DefaultCrf" preference is true, since it's been removed.
Rodeo
Moderator
 
Posts: 327
Joined: Tue Mar 03, 2009 9:55 pm

 

Re: [Patch] MacGUI display QP for FFmpeg and Theora

Postby dynaflash » Mon Nov 02, 2009 6:37 pm

Committed as : http://trac.handbrake.fr/changeset/2909 . Thanks Rodeo (sorry I did not get to it sooner).
dynaflash
Developer
 
Posts: 3398
Joined: Thu Nov 02, 2006 9:19 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest