summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-05-15 22:05:55 +0000
committerjbrjake <[email protected]>2007-05-15 22:05:55 +0000
commitf04070569ae6e7c81eb02c2dc6551c9c406c8635 (patch)
tree2a6cb069edcc2b4803e0f514a05ba084c4b7c182 /macosx/Controller.mm
parente783459abbad188cb8575beb55a92986d6594b4f (diff)
MacGui: adds x264 option widget for merange
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@586 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm41
1 files changed, 39 insertions, 2 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index cbe2ea4ed..4eef48573 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -649,7 +649,7 @@ return registrationDictionary;
fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipPopUp,
fX264optNodctdcmtLabel,fX264optNodctdcmtPopUp,fX264optSubmeLabel,fX264optSubmePopUp,
fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsPopUp,
- fX264optMotionEstLabel,fX264optMotionEstPopUp};
+ fX264optMotionEstLabel,fX264optMotionEstPopUp,fX264optMERangeLabel,fX264optMERangePopUp};
for( unsigned i = 0;
i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -1973,6 +1973,15 @@ the user is using "Custom" settings by determining the sender*/
[fX264optMotionEstPopUp addItemWithTitle:@"Uneven Multi-Hexagon"];
[fX264optMotionEstPopUp addItemWithTitle:@"Exhaustive"];
+ /*Motion Estimation range fX264optMERangePopUp*/
+ [fX264optMERangePopUp removeAllItems];
+ [fX264optMERangePopUp addItemWithTitle:@"Default (16)"];
+ for (i=4; i<65;i++)
+ {
+ [fX264optMERangePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]];
+ }
+
+
/* Standardize the option string */
[self X264AdvancedOptionsStandardizeOptString: NULL];
/* Set Current GUI Settings based on newly standardized string */
@@ -2072,6 +2081,10 @@ the user is using "Custom" settings by determining the sender*/
cleanOptNameString = @"subq";
}
+ /*ME Range*/
+ if ([cleanOptNameString isEqualToString:@"me-range"] || [cleanOptNameString isEqualToString:@"me_range"])
+ cleanOptNameString = @"merange";
+
return cleanOptNameString;
}
@@ -2160,7 +2173,13 @@ the user is using "Custom" settings by determining the sender*/
[fX264optMotionEstPopUp selectItemAtIndex:3];
else if ([optValue isEqualToString:@"esa"])
[fX264optMotionEstPopUp selectItemAtIndex:4];
- }
+ }
+ /*ME Range NSPopUpButton*/
+ if ([optName isEqualToString:@"merange"])
+ {
+ [fX264optMERangePopUp selectItemAtIndex:[optValue intValue]-3];
+ }
+
}
}
}
@@ -2203,6 +2222,10 @@ the user is using "Custom" settings by determining the sender*/
{
optNameToChange = @"me";
}
+ if (sender == fX264optMERangePopUp)
+ {
+ optNameToChange = @"merange";
+ }
/* Set widgets depending on the opt string in field */
NSString * thisOpt; // The separated option such as "bframes=3"
@@ -2282,6 +2305,10 @@ the user is using "Custom" settings by determining the sender*/
break;
}
}
+ else if ([optNameToChange isEqualToString:@"merange"])
+ {
+ thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]+3];
+ }
else // we have a valid value to change, so change it
{
thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1];
@@ -2342,6 +2369,11 @@ the user is using "Custom" settings by determining the sender*/
break;
}
}
+ else if ([optNameToChange isEqualToString:@"merange"])
+ {
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]];
+ }
else
{
[fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@=%@",
@@ -2382,6 +2414,11 @@ the user is using "Custom" settings by determining the sender*/
break;
}
}
+ else if ([optNameToChange isEqualToString:@"merange"])
+ {
+ [fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],
+ [NSString stringWithFormat:optNameToChange],[NSString stringWithFormat:@"%d",[sender indexOfSelectedItem]+3]]];
+ }
else
{
[fDisplayX264Options setStringValue:[NSString stringWithFormat:@"%@:%@=%@",[NSString stringWithFormat:[fDisplayX264Options stringValue]],