diff options
author | jbrjake <[email protected]> | 2009-02-11 22:56:00 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2009-02-11 22:56:00 +0000 |
commit | abfd603adac74e6bc916dee2079625d235f22b8d (patch) | |
tree | d67e5f74ae59d884ed51ffae0a7c8ff03d1c6246 /macosx | |
parent | 167a208d331e3c376ad8c672de4f308ea2d58394 (diff) |
MacGui: Adds a widget for adaptive b-frames to the x264 advanced tab.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2144 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/AdvancedView.xib | 236 | ||||
-rw-r--r-- | macosx/HBAdvancedController.h | 2 | ||||
-rw-r--r-- | macosx/HBAdvancedController.m | 57 |
3 files changed, 281 insertions, 14 deletions
diff --git a/macosx/English.lproj/AdvancedView.xib b/macosx/English.lproj/AdvancedView.xib index e3149a04c..3b01a8907 100644 --- a/macosx/English.lproj/AdvancedView.xib +++ b/macosx/English.lproj/AdvancedView.xib @@ -149,7 +149,7 @@ <object class="NSTextField" id="444018704"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{20, 214}, {128, 13}}</string> + <string key="NSFrame">{{94, 210}, {54, 17}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="660394934"> @@ -162,6 +162,22 @@ <reference key="NSTextColor" ref="555417541"/> </object> </object> + <object class="NSTextField" id="64195956"> + <reference key="NSNextResponder" ref="738514360"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{48, 179}, {100, 26}}</string> + <reference key="NSSuperview" ref="738514360"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="1033712504"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">Adaptive B-Frames:</string> + <reference key="NSSupport" ref="826935898"/> + <reference key="NSControlView" ref="64195956"/> + <reference key="NSBackgroundColor" ref="1006136775"/> + <reference key="NSTextColor" ref="555417541"/> + </object> + </object> <object class="NSPopUpButton" id="463613064"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> @@ -232,6 +248,76 @@ <int key="NSArrowPosition">1</int> </object> </object> + <object class="NSPopUpButton" id="868055016"> + <reference key="NSNextResponder" ref="738514360"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{150, 191}, {84, 15}}</string> + <reference key="NSSuperview" ref="738514360"/> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="587955425"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">264704</int> + <reference key="NSSupport" ref="22"/> + <reference key="NSControlView" ref="868055016"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="22"/> + <string key="NSAlternateContents"/> + <object class="NSMutableString" key="NSKeyEquivalent"> + <characters key="NS.bytes"/> + </object> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="44515545"> + <reference key="NSMenu" ref="646499245"/> + <string key="NSTitle">Item1</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="98535564"/> + <reference key="NSMixedImage" ref="993852628"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="587955425"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="646499245"> + <object class="NSMutableString" key="NSTitle"> + <characters key="NS.bytes">OtherViews</characters> + </object> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="44515545"/> + <object class="NSMenuItem" id="700256741"> + <reference key="NSMenu" ref="646499245"/> + <string key="NSTitle">Item2</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="98535564"/> + <reference key="NSMixedImage" ref="993852628"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="587955425"/> + </object> + <object class="NSMenuItem" id="403870641"> + <reference key="NSMenu" ref="646499245"/> + <string key="NSTitle">Item3</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="98535564"/> + <reference key="NSMixedImage" ref="993852628"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="587955425"/> + </object> + </object> + </object> + <int key="NSPreferredEdge">3</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">1</int> + </object> + </object> <object class="NSPopUpButton" id="1012635724"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> @@ -639,7 +725,7 @@ <object class="NSTextField" id="677007332"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{20, 172}, {128, 13}}</string> + <string key="NSFrame">{{46, 144}, {102, 17}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="288316749"> @@ -655,7 +741,7 @@ <object class="NSTextField" id="34260806"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{20, 151}, {128, 13}}</string> + <string key="NSFrame">{{43, 126}, {105, 14}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="124098371"> @@ -687,7 +773,7 @@ <object class="NSTextField" id="751714853"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{20, 193}, {128, 13}}</string> + <string key="NSFrame">{{60, 165}, {88, 17}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="651032081"> @@ -703,7 +789,7 @@ <object class="NSPopUpButton" id="1028233887"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{150, 192}, {84, 15}}</string> + <string key="NSFrame">{{150, 168}, {84, 15}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="96368274"> @@ -968,7 +1054,7 @@ <object class="NSButton" id="749948454"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{148, 171}, {22, 16}}</string> + <string key="NSFrame">{{148, 147}, {22, 16}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="98290860"> @@ -989,7 +1075,7 @@ <object class="NSButton" id="1035779890"> <reference key="NSNextResponder" ref="738514360"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{148, 150}, {22, 16}}</string> + <string key="NSFrame">{{148, 126}, {22, 16}}</string> <reference key="NSSuperview" ref="738514360"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="773053098"> @@ -1895,6 +1981,30 @@ </object> <int key="connectionID">395</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264optBAdaptLabel</string> + <reference key="source" ref="674763238"/> + <reference key="destination" ref="64195956"/> + </object> + <int key="connectionID">404</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264optBAdaptPopUp</string> + <reference key="source" ref="674763238"/> + <reference key="destination" ref="868055016"/> + </object> + <int key="connectionID">405</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">X264AdvancedOptionsChanged:</string> + <reference key="source" ref="674763238"/> + <reference key="destination" ref="868055016"/> + </object> + <int key="connectionID">406</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -1972,6 +2082,8 @@ <reference ref="734910001"/> <reference ref="149148764"/> <reference ref="747005200"/> + <reference ref="64195956"/> + <reference ref="868055016"/> </object> <reference key="parent" ref="181588572"/> <string key="objectName">x264</string> @@ -2900,6 +3012,64 @@ <reference key="object" ref="950560055"/> <reference key="parent" ref="149148764"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">396</int> + <reference key="object" ref="64195956"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1033712504"/> + </object> + <reference key="parent" ref="738514360"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">397</int> + <reference key="object" ref="1033712504"/> + <reference key="parent" ref="64195956"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">398</int> + <reference key="object" ref="868055016"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="587955425"/> + </object> + <reference key="parent" ref="738514360"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">399</int> + <reference key="object" ref="587955425"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="646499245"/> + </object> + <reference key="parent" ref="868055016"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">400</int> + <reference key="object" ref="646499245"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="700256741"/> + <reference ref="403870641"/> + <reference ref="44515545"/> + </object> + <reference key="parent" ref="587955425"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">401</int> + <reference key="object" ref="700256741"/> + <reference key="parent" ref="646499245"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">402</int> + <reference key="object" ref="403870641"/> + <reference key="parent" ref="646499245"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">403</int> + <reference key="object" ref="44515545"/> + <reference key="parent" ref="646499245"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -2997,8 +3167,22 @@ <string>39.IBPluginDependency</string> <string>39.ImportedFromIB2</string> <string>390.IBPluginDependency</string> + <string>396.IBAttributePlaceholdersKey</string> + <string>396.IBPluginDependency</string> + <string>396.ImportedFromIB2</string> + <string>398.IBAttributePlaceholdersKey</string> + <string>398.IBPluginDependency</string> + <string>398.ImportedFromIB2</string> <string>40.IBPluginDependency</string> <string>40.ImportedFromIB2</string> + <string>400.IBPluginDependency</string> + <string>400.ImportedFromIB2</string> + <string>401.IBPluginDependency</string> + <string>401.ImportedFromIB2</string> + <string>402.IBPluginDependency</string> + <string>402.ImportedFromIB2</string> + <string>403.IBPluginDependency</string> + <string>403.ImportedFromIB2</string> <string>41.IBPluginDependency</string> <string>41.ImportedFromIB2</string> <string>42.IBPluginDependency</string> @@ -3328,6 +3512,36 @@ cnQgb2YgdGhlIGltYWdlLg</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <object class="NSMutableDictionary"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <object class="NSMutableDictionary"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -3402,7 +3616,7 @@ Lg</string> </object> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{319, 354}, {700, 290}}</string> + <string>{{388, 201}, {700, 290}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{692, 501}, {700, 290}}</string> @@ -3781,7 +3995,7 @@ Yml0cmF0ZSB0byBhY2hpZXZlIHRoZSBzYW1lIHF1YWxpdHkgYXMgQ0FCQUMuA</string> </object> </object> <nil key="sourceID"/> - <int key="maxID">395</int> + <int key="maxID">406</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -3828,6 +4042,8 @@ Yml0cmF0ZSB0byBhY2hpZXZlIHRoZSBzYW1lIHF1YWxpdHkgYXMgQ0FCQUMuA</string> <string>fX264optAlphaDeblockPopUp</string> <string>fX264optAnalyseLabel</string> <string>fX264optAnalysePopUp</string> + <string>fX264optBAdaptLabel</string> + <string>fX264optBAdaptPopUp</string> <string>fX264optBPyramidLabel</string> <string>fX264optBPyramidSwitch</string> <string>fX264optBetaDeblockPopUp</string> @@ -3874,6 +4090,8 @@ Yml0cmF0ZSB0byBhY2hpZXZlIHRoZSBzYW1lIHF1YWxpdHkgYXMgQ0FCQUMuA</string> <string>NSTextField</string> <string>NSPopUpButton</string> <string>NSTextField</string> + <string>NSPopUpButton</string> + <string>NSTextField</string> <string>NSButton</string> <string>NSPopUpButton</string> <string>NSTextField</string> diff --git a/macosx/HBAdvancedController.h b/macosx/HBAdvancedController.h index 8b3638284..d7b6a20ee 100644 --- a/macosx/HBAdvancedController.h +++ b/macosx/HBAdvancedController.h @@ -53,6 +53,8 @@ IBOutlet NSTextField * fX264optPsyRDLabel; IBOutlet NSSlider * fX264optPsyTrellisSlider; IBOutlet NSTextField * fX264optPsyTrellisLabel; + IBOutlet NSPopUpButton * fX264optBAdaptPopUp; + IBOutlet NSTextField * fX264optBAdaptLabel; } // x264 Advanced Panel Methods diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m index b1c269f6e..ac0e0a5df 100644 --- a/macosx/HBAdvancedController.m +++ b/macosx/HBAdvancedController.m @@ -71,7 +71,7 @@ fX264optWeightBLabel,fX264optWeightBSwitch, fX264optBPyramidLabel,fX264optBPyramidSwitch, fX264optDirectPredLabel,fX264optDirectPredPopUp,fX264optDeblockLabel,fX264optAnalyseLabel, fX264optAnalysePopUp,fX264opt8x8dctLabel,fX264opt8x8dctSwitch,fX264optCabacLabel,fX264optCabacSwitch, - fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp, fX264optPsyRDSlider, fX264optPsyRDLabel, fX264optPsyTrellisSlider, fX264optPsyTrellisLabel }; + fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp, fX264optPsyRDSlider, fX264optPsyRDLabel, fX264optPsyTrellisSlider, fX264optPsyTrellisLabel, fX264optBAdaptPopUp, fX264optBAdaptLabel }; for( i = 0; i < sizeof( controls ) / sizeof( NSControl * ); i++ ) { @@ -182,6 +182,14 @@ [fX264optDirectPredPopUp addItemWithTitle:@"Automatic"]; [fX264optDirectPredPopUp setWantsLayer:YES]; + /* Adaptive B-Frames Mode fX264optBAdaptPopUp */ + [fX264optBAdaptPopUp removeAllItems]; + [fX264optBAdaptPopUp addItemWithTitle:@"Default (1)"]; + [fX264optBAdaptPopUp addItemWithTitle:@"0"]; + [fX264optBAdaptPopUp addItemWithTitle:@"1"]; + [fX264optBAdaptPopUp addItemWithTitle:@"2"]; + [fX264optBAdaptPopUp setWantsLayer:YES]; + /*Alpha Deblock*/ [fX264optAlphaDeblockPopUp removeAllItems]; [fX264optAlphaDeblockPopUp addItemWithTitle:@"Default (0)"]; @@ -400,22 +408,30 @@ that can only be used when b-frames are enabled. */ [[fX264optWeightBSwitch animator] setHidden:YES]; [[fX264optWeightBLabel animator] setHidden:YES]; - if ( [fX264optWeightBSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp) + if ( [fX264optWeightBSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp && sender != fX264optBAdaptPopUp ) [fX264optWeightBSwitch performClick:self]; [[fX264optBPyramidSwitch animator] setHidden:YES]; [[fX264optBPyramidLabel animator] setHidden:YES]; - if ( [fX264optBPyramidSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp) + if ( [fX264optBPyramidSwitch state] == 1 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp && sender != fX264optBAdaptPopUp ) [fX264optBPyramidSwitch performClick:self]; [[fX264optDirectPredPopUp animator] setHidden:YES]; [[fX264optDirectPredLabel animator] setHidden:YES]; - if ( [fX264optDirectPredPopUp indexOfSelectedItem] > 0 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp) + if ( [fX264optDirectPredPopUp indexOfSelectedItem] > 0 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp && sender != fX264optBAdaptPopUp ) { [fX264optDirectPredPopUp selectItemAtIndex: 0]; [[fX264optDirectPredPopUp cell] performClick:self]; } + + [[fX264optBAdaptPopUp animator] setHidden:YES]; + [[fX264optBAdaptLabel animator] setHidden:YES]; + if ( [fX264optDirectPredPopUp indexOfSelectedItem] > 0 && sender != fX264optWeightBSwitch && sender != fX264optBPyramidSwitch && sender != fX264optDirectPredPopUp && sender != fX264optBAdaptPopUp ) + { + [fX264optBAdaptPopUp selectItemAtIndex: 0]; + [[fX264optBAdaptPopUp cell] performClick:self]; + } } else if ( [fX264optBframesPopUp indexOfSelectedItem ] == 2) { @@ -430,6 +446,9 @@ [[fX264optDirectPredPopUp animator] setHidden:NO]; [[fX264optDirectPredLabel animator] setHidden:NO]; + + [[fX264optBAdaptPopUp animator] setHidden:NO]; + [[fX264optBAdaptLabel animator] setHidden:NO]; } else { @@ -441,6 +460,9 @@ [[fX264optDirectPredPopUp animator] setHidden:NO]; [[fX264optDirectPredLabel animator] setHidden:NO]; + + [[fX264optBAdaptPopUp animator] setHidden:NO]; + [[fX264optBAdaptLabel animator] setHidden:NO]; } if ( [fX264optCabacSwitch state] == false) @@ -667,6 +689,11 @@ { [fX264optMERangePopUp selectItemAtIndex:[optValue intValue]-3]; } + /* Adaptive B-Frames NSPopUpButton*/ + if ([optName isEqualToString:@"b-adapt"]) + { + [fX264optBAdaptPopUp selectItemAtIndex:[optValue intValue]+1]; + } /*Weighted B-Frames NSButton*/ if ([optName isEqualToString:@"weightb"]) { @@ -821,6 +848,10 @@ { optNameToChange = @"merange"; } + if (sender == fX264optBAdaptPopUp) + { + optNameToChange = @"b-adapt"; + } if (sender == fX264optWeightBSwitch) { optNameToChange = @"weightb"; @@ -1079,6 +1110,11 @@ because merange can't go below 4. So it has to be handled separately. */ thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]+3]; } + else if ([optNameToChange isEqualToString:@"b-adapt"]) + { + /* B-adapt starts at index 0 with default then goes 0, 1, 2)*/ + thisOpt = [NSString stringWithFormat:@"%@=%d", optName, [sender indexOfSelectedItem]-1]; + } else // we have a valid value to change, so change it { if ( [sender indexOfSelectedItem] != 0 ) @@ -1208,7 +1244,6 @@ break; } } - else if ([optNameToChange isEqualToString:@"merange"]) { /* Special case for motion estimation range, which uses @@ -1217,6 +1252,12 @@ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]]; } + else if ([optNameToChange isEqualToString:@"b-adapt"]) + { + /* 0 is default, index 1 is 0*/ + [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@", + [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]]; + } else if ([optNameToChange isEqualToString:@"deblock"]) { /* Very special case for deblock. Uses a weird widget index offset @@ -1384,6 +1425,12 @@ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]]; } + else if ([optNameToChange isEqualToString:@"b-adapt"]) + { + /* 0 is default, index 1 is 0*/ + [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]], + [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]-1]]]; + } else if ([optNameToChange isEqualToString:@"deblock"]) { /* Deblock is really weird because it has two values, and if only one is default, both |