summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Controller.mm83
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib3
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib7
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin126982 -> 128058 bytes
-rw-r--r--macosx/PictureController.h3
-rw-r--r--macosx/PictureController.mm29
6 files changed, 92 insertions, 33 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 29656e82c..8e3c1fc3b 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1384,27 +1384,35 @@ list = hb_get_titles( fHandle );
hb_list_close( &job->filters );
}
job->filters = hb_list_init();
-#if 1
- /* Run old deinterlacer if deinterlacing specified */
- if( job->deinterlace )
+
+ if( job->deinterlace == 1)
{
- hb_filter_deinterlace.settings = "-1";
- hb_list_add( job->filters, &hb_filter_deinterlace );
+ if ([fPicSettingDeinterlace intValue] == 1)
+ {
+ /* Run old deinterlacer by default */
+ hb_filter_deinterlace.settings = "-1";
+ hb_list_add( job->filters, &hb_filter_deinterlace );
+ }
+ if ([fPicSettingDeinterlace intValue] == 2)
+ {
+ /* Yadif mode 1 */
+ hb_filter_deinterlace.settings = "1";
+ hb_list_add( job->filters, &hb_filter_deinterlace );
+ }
+ if ([fPicSettingDeinterlace intValue] == 3)
+ {
+ /* Yadif and Mcdeint */
+ hb_filter_deinterlace.settings = "1:-1:1";
+ hb_list_add( job->filters, &hb_filter_deinterlace );
+ }
+ if ([fPicSettingDeinterlace intValue] == 4)
+ {
+ /* Yadif and Mcdeint Slow Modes*/
+ hb_filter_deinterlace.settings = "3:-1:2";
+ hb_list_add( job->filters, &hb_filter_deinterlace );
+ }
}
-#else
- /* Choose your own filters! Here's some examples... */
- hb_filter_detelecine.settings = "1:1:4:4:0:0";
- hb_list_add( job->filters, &hb_filter_detelecine );
-
- hb_filter_deinterlace.settings = "3:-1:2:10";
- hb_list_add( job->filters, &hb_filter_deinterlace );
- hb_filter_deblock.settings = "4:2";
- hb_list_add( job->filters, &hb_filter_deblock );
-
- hb_filter_denoise.settings = "3:2:3:3";
- hb_list_add( job->filters, &hb_filter_denoise );
-#endif
}
@@ -2346,8 +2354,8 @@ list = hb_get_titles( fHandle );
@"%d", fTitle->job->height]];
[fPicSettingARkeep setStringValue: [NSString stringWithFormat:
@"%d", fTitle->job->keep_ratio]];
- [fPicSettingDeinterlace setStringValue: [NSString stringWithFormat:
- @"%d", fTitle->job->deinterlace]];
+ //[fPicSettingDeinterlace setStringValue: [NSString stringWithFormat:
+ // @"%d", fTitle->job->deinterlace]];
[fPicSettingPAR setStringValue: [NSString stringWithFormat:
@"%d", fTitle->job->pixel_ratio]];
@@ -2378,7 +2386,16 @@ list = hb_get_titles( fHandle );
[fPicSettingPARWidth setStringValue: @""];
[fPicSettingPARHeight setStringValue: @""];
}
+ if ([fPicSettingDeinterlace intValue] == 0)
+ {
+ fTitle->job->deinterlace = 0;
+ }
+ else
+ {
+ fTitle->job->deinterlace = 1;
+ }
+
/* Set ON/Off values for the deinterlace/keep aspect ratio according to boolean */
if (fTitle->job->keep_ratio > 0)
{
@@ -2388,14 +2405,28 @@ list = hb_get_titles( fHandle );
{
[fPicSettingARkeepDsply setStringValue: @"Off"];
}
- if (fTitle->job->deinterlace > 0)
+
+ if ([fPicSettingDeinterlace intValue] == 0)
{
- [fPicSettingDeinterlaceDsply setStringValue: @"On"];
+ [fPicSettingDeinterlaceDsply setStringValue: @"Off"];
}
- else
+ else if ([fPicSettingDeinterlace intValue] == 1)
{
- [fPicSettingDeinterlaceDsply setStringValue: @"Off"];
+ [fPicSettingDeinterlaceDsply setStringValue: @"Fast"];
}
+ else if ([fPicSettingDeinterlace intValue] == 2)
+ {
+ [fPicSettingDeinterlaceDsply setStringValue: @"Slow"];
+ }
+ else if ([fPicSettingDeinterlace intValue] == 3)
+ {
+ [fPicSettingDeinterlaceDsply setStringValue: @"Slower"];
+ }
+ else if ([fPicSettingDeinterlace intValue] == 4)
+ {
+ [fPicSettingDeinterlaceDsply setStringValue: @"Slowest"];
+ }
+
if (fTitle->job->pixel_ratio > 0)
{
[fPicSettingPARDsply setStringValue: @"On"];
@@ -3590,7 +3621,7 @@ the user is using "Custom" settings by determining the sender*/
[preset setObject:[NSNumber numberWithInt:fTitle->job->width] forKey:@"PictureWidth"];
[preset setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PictureHeight"];
[preset setObject:[NSNumber numberWithInt:fTitle->job->keep_ratio] forKey:@"PictureKeepRatio"];
- [preset setObject:[NSNumber numberWithInt:fTitle->job->deinterlace] forKey:@"PictureDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:[fPicSettingDeinterlace intValue]] forKey:@"PictureDeinterlace"];
[preset setObject:[NSNumber numberWithInt:fTitle->job->pixel_ratio] forKey:@"PicturePAR"];
/* Set crop settings here */
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
@@ -4705,7 +4736,7 @@ the user is using "Custom" settings by determining the sender*/
hb_fix_aspect( job, HB_KEEP_WIDTH );
}
job->pixel_ratio = [[chosenPreset objectForKey:@"PicturePAR"] intValue];
- job->deinterlace = [[chosenPreset objectForKey:@"PictureDeinterlace"] intValue];
+ [fPicSettingDeinterlace setStringValue: [NSString stringWithFormat: @"%d",[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]];
/* If Cropping is set to custom, then recall all four crop values from
when the preset was created and apply them */
if ([[chosenPreset objectForKey:@"PictureAutoCrop"] intValue] == 0)
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index de7c2c62e..5a850c960 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -225,7 +225,8 @@
fCropRightStepper = NSStepper;
fCropTopField = NSTextField;
fCropTopStepper = NSStepper;
- fDeinterlaceCheck = NSButton;
+ fDeinterlaceLevelMainWindow = NSTextField;
+ fDeinterlacePopUp = NSPopUpButton;
fEffectsCheck = NSButton;
fHeightField = NSTextField;
fHeightStepper = NSStepper;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index 263de205c..d56e7e5b9 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>44 271 630 601 0 0 1440 878 </string>
+ <string>45 274 630 601 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>1843</key>
- <string>370 113 200 530 0 0 1440 878 </string>
+ <string>620 338 200 530 0 0 1440 878 </string>
<key>29</key>
<string>155 478 365 44 0 0 1440 878 </string>
</dict>
@@ -25,8 +25,9 @@
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
- <integer>1843</integer>
<integer>29</integer>
+ <integer>365</integer>
+ <integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8R2218</string>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index 4f0833084..a031a0eb3 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index 973a0e2ff..b7c93c79d 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -36,7 +36,7 @@
IBOutlet NSStepper * fCropLeftStepper;
IBOutlet NSTextField * fCropRightField;
IBOutlet NSStepper * fCropRightStepper;
- IBOutlet NSButton * fDeinterlaceCheck;
+ IBOutlet NSPopUpButton * fDeinterlacePopUp;
IBOutlet NSButton * fPARCheck;
IBOutlet NSButton * fEffectsCheck;
IBOutlet NSButton * fPrevButton;
@@ -50,6 +50,7 @@
/* widgets in main window */
IBOutlet NSTextField * fAutoCropMainWindow;
+ IBOutlet NSTextField * fDeinterlaceLevelMainWindow;
}
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index fb664a575..7a2a03161 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -85,7 +85,20 @@ static int GetAlignedSize( int size )
[fCropBottomStepper setMaxValue: title->height/2-2];
[fCropLeftStepper setMaxValue: title->width/2-2];
[fCropRightStepper setMaxValue: title->width/2-2];
- [fDeinterlaceCheck setState: job->deinterlace ? NSOnState : NSOffState];
+
+
+ /* we use a popup to show the deinterlace settings */
+ [fDeinterlacePopUp removeAllItems];
+ [fDeinterlacePopUp addItemWithTitle: @"None"];
+ [fDeinterlacePopUp addItemWithTitle: @"Fast"];
+ [fDeinterlacePopUp addItemWithTitle: @"Slow"];
+ [fDeinterlacePopUp addItemWithTitle: @"Slower"];
+ [fDeinterlacePopUp addItemWithTitle: @"Slowest"];
+ /* we need a conditional to figure out how to set deinterlace */
+
+ [fDeinterlacePopUp selectItemAtIndex: [fDeinterlaceLevelMainWindow intValue]];
+
+
[fPARCheck setState: job->pixel_ratio ? NSOnState : NSOffState];
if ([fAutoCropMainWindow intValue] == 0)
{
@@ -220,7 +233,19 @@ static int GetAlignedSize( int size )
job->width = [fWidthStepper intValue];
job->height = [fHeightStepper intValue];
job->keep_ratio = ( [fRatioCheck state] == NSOnState );
- job->deinterlace = ( [fDeinterlaceCheck state] == NSOnState );
+
+ /* new multilevel deinterlacing popup */
+ [fDeinterlaceLevelMainWindow setStringValue: [NSString stringWithFormat: @"%d",[fDeinterlacePopUp indexOfSelectedItem]]];
+ if ([fDeinterlaceLevelMainWindow stringValue] == 0)
+ {
+ job->deinterlace = 0;
+ }
+ else
+ {
+ job->deinterlace = 1;
+ }
+
+
job->pixel_ratio = ( [fPARCheck state] == NSOnState );