summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-09-23 17:33:40 +0000
committerdynaflash <[email protected]>2008-09-23 17:33:40 +0000
commitd94f2d4248d1a69ef3219cbb6e14b74507558cf8 (patch)
tree7d15b96a3f8c2b76bd0468af775a06bc6210cabc /macosx/Controller.mm
parentc971f5957209b6be5816b73c9fa65b322440d3d1 (diff)
MacGui: implement a slider for deblock.
- Slider goes from "Off" and then ranges from 5-15. - Update preset code to handle the old bool for deblock where we convert "yes" to a value of 5. - Note: though the deblock filter actually has a setting of 0, for the macgui we use an integer of 0, which shows up in the interface as "Off" to indicate not to load the filter at all. Made presets etc, easier to modify. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1750 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm29
1 files changed, 20 insertions, 9 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index ab72ea287..268cf9b78 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1851,7 +1851,7 @@ fWorkingCount = 0;
[queueFileJob setObject:[NSNumber numberWithInt:[fPictureController detelecine]] forKey:@"PictureDetelecine"];
[queueFileJob setObject:[NSNumber numberWithInt:[fPictureController vfr]] forKey:@"VFR"];
[queueFileJob setObject:[NSNumber numberWithInt:[fPictureController denoise]] forKey:@"PictureDenoise"];
- [queueFileJob setObject:[NSNumber numberWithInt:[fPictureController deblock]] forKey:@"PictureDeblock"];
+ [queueFileJob setObject:[NSString stringWithFormat:@"%d",[fPictureController deblock]] forKey:@"PictureDeblock"];
[queueFileJob setObject:[NSNumber numberWithInt:[fPictureController decomb]] forKey:@"PictureDecomb"];
/*Audio*/
@@ -2871,8 +2871,13 @@ fWorkingCount = 0;
}
/* Deblock (uses pp7 default) */
- if ([[queueToApply objectForKey:@"PictureDeblock"] intValue] == 1)
+ /* NOTE: even though there is a valid deblock setting of 0 for the filter, for
+ * the macgui's purposes a value of 0 actually means to not even use the filter
+ * current hb_filter_deblock.settings valid ranges are from 5 - 15
+ */
+ if ([[queueToApply objectForKey:@"PictureDeblock"] intValue] != 0)
{
+ hb_filter_deblock.settings = (char *) [[queueToApply objectForKey:@"PictureDeblock"] UTF8String];
hb_list_add( job->filters, &hb_filter_deblock );
}
[self writeToActivityLog: "prepareJob exiting"];
@@ -3783,11 +3788,13 @@ the user is using "Custom" settings by determining the sender*/
}
/* Deblock */
- if ([fPictureController deblock]) {
- [fPicSettingDeblock setStringValue: @"Yes"];
+ if ([fPictureController deblock] == 0)
+ {
+ [fPicSettingDeblock setStringValue: @"Off"];
}
- else {
- [fPicSettingDeblock setStringValue: @"No"];
+ else
+ {
+ [fPicSettingDeblock setStringValue: [NSString stringWithFormat:@"%d",[fPictureController deblock]]];
}
if (fTitle->job->pixel_ratio > 0)
@@ -5504,11 +5511,13 @@ if (item == nil)
/* Deblock */
if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1)
{
- [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]];
+ /* since we used to use 1 to turn on deblock, we now use a 5 in our sliding scale */
+ [fPictureController setDeblock:5];
}
else
{
[fPictureController setDeblock:0];
+
}
[self calculatePictureSizing:nil];
@@ -5572,11 +5581,13 @@ if (item == nil)
/* Deblock */
if ([[chosenPreset objectForKey:@"PictureDeblock"] intValue] == 1)
{
- [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]];
+ /* if its a one, then its the old on/off deblock, set on to 5*/
+ [fPictureController setDeblock:5];
}
else
{
- [fPictureController setDeblock:0];
+ /* use the settings intValue */
+ [fPictureController setDeblock:[[chosenPreset objectForKey:@"PictureDeblock"] intValue]];
}
/* Decomb */
/* Even though we currently allow for a custom setting for decomb, ultimately it will only have Off and