OSDN Git Service

MacGui: adds x264 option widgets for b-rdo, weight, and b-pyramid. And a little layou...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 16 May 2007 18:34:29 +0000 (18:34 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 16 May 2007 18:34:29 +0000 (18:34 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@588 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.h
macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/classes.nib
macosx/English.lproj/MainMenu.nib/info.nib
macosx/English.lproj/MainMenu.nib/keyedobjects.nib

index ab2b931..9d70825 100644 (file)
     IBOutlet NSPopUpButton       * fX264optMotionEstPopUp;
     IBOutlet NSTextField         * fX264optMERangeLabel;
     IBOutlet NSPopUpButton       * fX264optMERangePopUp;
+    IBOutlet NSTextField         * fX264optWeightBLabel;
+    IBOutlet NSPopUpButton       * fX264optWeightBPopUp;
+    IBOutlet NSTextField         * fX264optBRDOLabel;
+    IBOutlet NSPopUpButton       * fX264optBRDOPopUp;
+    IBOutlet NSTextField         * fX264optBPyramidLabel;
+    IBOutlet NSPopUpButton       * fX264optBPyramidPopUp;
     
        /* User Preset variables here fPresetNewPicSettingsApply*/
        
index 4ab18ad..6978420 100644 (file)
@@ -649,7 +649,9 @@ return registrationDictionary;
                fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipPopUp,
                fX264optNodctdcmtLabel,fX264optNodctdcmtPopUp,fX264optSubmeLabel,fX264optSubmePopUp,
                fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsPopUp,
-               fX264optMotionEstLabel,fX264optMotionEstPopUp,fX264optMERangeLabel,fX264optMERangePopUp};
+               fX264optMotionEstLabel,fX264optMotionEstPopUp,fX264optMERangeLabel,fX264optMERangePopUp,
+               fX264optWeightBLabel,fX264optWeightBPopUp,fX264optBRDOLabel,fX264optBRDOPopUp,
+               fX264optBPyramidLabel,fX264optBPyramidPopUp};
 
     for( unsigned i = 0;
          i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -1981,6 +1983,50 @@ the user is using "Custom" settings by determining the sender*/
         [fX264optMERangePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
     }
     
+    /*Weighted B-Frame Prediction fX264optWeightBPopUp BOOLEAN*/
+    [fX264optWeightBPopUp removeAllItems];
+    [fX264optWeightBPopUp addItemWithTitle:@"Default (No)"];
+    for (i=0; i<2;i++)
+    {
+        if (i==0)
+        {
+            [fX264optWeightBPopUp addItemWithTitle:[NSString stringWithFormat:@"No"]];
+        }
+        else
+        {
+            [fX264optWeightBPopUp addItemWithTitle:[NSString stringWithFormat:@"Yes"]];
+        }
+    }
+    
+    /*B-Frame Rate Distortion Optimization fX264optBRDOPopUp BOOLEAN*/
+    [fX264optBRDOPopUp removeAllItems];
+    [fX264optBRDOPopUp addItemWithTitle:@"Default (No)"];
+    for (i=0; i<2;i++)
+    {
+        if (i==0)
+        {
+            [fX264optBRDOPopUp addItemWithTitle:[NSString stringWithFormat:@"No"]];
+        }
+        else
+        {
+            [fX264optBRDOPopUp addItemWithTitle:[NSString stringWithFormat:@"Yes"]];
+        }
+    }
+    
+    /*B-frame Pyramids fX264optBPyramidPopUp BOOLEAN*/
+    [fX264optBPyramidPopUp removeAllItems];
+    [fX264optBPyramidPopUp addItemWithTitle:@"Default (No)"];
+    for (i=0; i<2;i++)
+    {
+        if (i==0)
+        {
+            [fX264optBPyramidPopUp addItemWithTitle:[NSString stringWithFormat:@"No"]];
+        }
+        else
+        {
+            [fX264optBPyramidPopUp addItemWithTitle:[NSString stringWithFormat:@"Yes"]];
+        }
+    }
     
     /* Standardize the option string */
     [self X264AdvancedOptionsStandardizeOptString: NULL];
@@ -2085,6 +2131,24 @@ the user is using "Custom" settings by determining the sender*/
     if ([cleanOptNameString isEqualToString:@"me-range"] || [cleanOptNameString isEqualToString:@"me_range"])
         cleanOptNameString = @"merange";
     
+    /*WeightB*/
+    if ([cleanOptNameString isEqualToString:@"weight-b"] || [cleanOptNameString isEqualToString:@"weight_b"])
+    {
+        cleanOptNameString = @"weightb";
+    }
+    
+    /*BRDO*/
+    if ([cleanOptNameString isEqualToString:@"b-rdo"] || [cleanOptNameString isEqualToString:@"b_rdo"])
+    {
+        cleanOptNameString = @"brdo";
+    }
+    
+    /*B Pyramid*/
+    if ([cleanOptNameString isEqualToString:@"b_pyramid"])
+    {
+        cleanOptNameString = @"b-pyramid";
+    }
+    
     return cleanOptNameString; 
 }
 
@@ -2179,6 +2243,22 @@ the user is using "Custom" settings by determining the sender*/
                 {
                     [fX264optMERangePopUp selectItemAtIndex:[optValue intValue]-3];
                 }
+                /*Weighted B-Frames NSPopUpButton*/
+                if ([optName isEqualToString:@"weightb"])
+                {
+                    [fX264optWeightBPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*BRDO NSPopUpButton*/
+                if ([optName isEqualToString:@"brdo"])
+                {
+                    [fX264optBRDOPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                /*B Pyramid NSPopUpButton*/
+                if ([optName isEqualToString:@"b-pyramid"])
+                {
+                    [fX264optBPyramidPopUp selectItemAtIndex:[optValue intValue]+1];
+                }
+                
                                                 
             }
         }
@@ -2226,6 +2306,18 @@ the user is using "Custom" settings by determining the sender*/
     {
         optNameToChange = @"merange";
     }
+    if (sender == fX264optWeightBPopUp)
+    {
+        optNameToChange = @"weightb";
+    }
+    if (sender == fX264optBRDOPopUp)
+    {
+        optNameToChange = @"brdo";
+    }
+    if (sender == fX264optBPyramidPopUp)
+    {
+        optNameToChange = @"b-pyramid";
+    }
     
     /* Set widgets depending on the opt string in field */
     NSString * thisOpt; // The separated option such as "bframes=3"
index 5367a54..237330b 100644 (file)
                 fVidTargetSizeField = NSTextField; 
                 fVidTwoPassCheck = NSButton; 
                 fWindow = NSWindow; 
+                fX264optBPyramidLabel = NSTextField; 
+                fX264optBPyramidPopUp = NSPopUpButton; 
+                fX264optBRDOLabel = NSTextField; 
+                fX264optBRDOPopUp = NSPopUpButton; 
                 fX264optBframesLabel = NSTextField; 
                 fX264optBframesPopUp = NSPopUpButton; 
                 fX264optMERangeLabel = NSTextField; 
                 fX264optTrellisPopUp = NSPopUpButton; 
                 fX264optView = NSView; 
                 fX264optViewTitleLabel = NSTextField; 
+                fX264optWeightBLabel = NSTextField; 
+                fX264optWeightBPopUp = NSPopUpButton; 
                 tableView = NSTableView; 
             }; 
             SUPERCLASS = NSObject; 
index aa15a24..899a5ac 100644 (file)
@@ -22,7 +22,7 @@
                <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>8P2137</string>
+       <string>8L127</string>
        <key>IBUserGuides</key>
        <dict>
                <key>21</key>
@@ -30,7 +30,7 @@
                        <key>guideLocations</key>
                        <array>
                                <string>Horizontal:576.000000</string>
-                               <string>Horizontal:319.000000</string>
+                               <string>Horizontal:309.000000</string>
                        </array>
                        <key>guidesLocked</key>
                        <false/>
index 5208e21..d5dd46a 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ