summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-05-01 19:54:18 +0000
committerdynaflash <[email protected]>2009-05-01 19:54:18 +0000
commit198c0b4601453d4debf96a0b6809d0ffb497ecdc (patch)
tree484d19575ddc742ec355dffcd8eaf23346d43e8c /macosx/Controller.mm
parent8cab795c817920ff023b6f0b8992a588e62c08c5 (diff)
MacGui: Custom Anamorphic initial implementation (experimental) and pic settings and preview changes.
- Custom Anamorphic mode allows more customization of pixel and display dimensions. -- NOTE: The layout and even functionality are considered very experimental and not ready for prime time yet. -- Change to hb_get_preview allowing a preview size > title->width and height courtesy of jbjake. -- Allows setting the modulus to 16 (default), 8, 4, 2, or 1. -- Adds display height, pixel width and pixel height fields. - Picture Inspector: -- Changes shape and size according to the size/filter tab and anamorphic and filter settings. - Picture Preview: -- Now crops the gray borders from around the image returned from hb_get_preview and recreates cropping and resizing itself. -- Add size and scale information to the preview window title bar so you can see it without activating the hud controls. -- Attempt to fix the intermittent aliasing problem with the hud control overlay by making sure the hud origin is a whole int (fix courtesy of KonaB1end). - Known Issues: -- Scale to Screen mode is currently borked. The actual image does not scale yet. -- Depending on how far you upscale the display dimensions in custom anamorphic, the preview image can get a bit wonky. Returning to one of the standard modes clears it up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2362 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm34
1 files changed, 28 insertions, 6 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index b83636849..6d929a010 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -651,8 +651,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
NSLocalizedString( @"Scanning title %d of %d...", @"" ),
p.title_cur, p.title_count]];
[fScanIndicator setHidden: NO];
- double scanProgress = ( p.title_cur - 1 ) / p.title_count;
- //[fScanIndicator setDoubleValue: 100.0 * scanProgress];
[fScanIndicator setDoubleValue: 100.0 * ((double)( p.title_cur - 1 ) / p.title_count)];
break;
}
@@ -1974,6 +1972,19 @@ fWorkingCount = 0;
[queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PictureHeight"];
[queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->keep_ratio] forKey:@"PictureKeepRatio"];
[queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->anamorphic.mode] forKey:@"PicturePAR"];
+ /* if we are custom anamorphic, store the exact storage, par and display dims */
+ if (fTitle->job->anamorphic.mode == 3)
+ {
+ [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->width] forKey:@"PicturePARStorageWidth"];
+ [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->height] forKey:@"PicturePARStorageHeight"];
+
+ [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->anamorphic.par_width] forKey:@"PicturePARPixelWidth"];
+ [queueFileJob setObject:[NSNumber numberWithInt:fTitle->job->anamorphic.par_height] forKey:@"PicturePARPixelHeight"];
+
+ [queueFileJob setObject:[NSNumber numberWithFloat:fTitle->job->anamorphic.dar_width] forKey:@"PicturePARDisplayWidth"];
+ [queueFileJob setObject:[NSNumber numberWithFloat:fTitle->job->anamorphic.dar_height] forKey:@"PicturePARDisplayHeight"];
+
+ }
NSString * pictureSummary;
pictureSummary = [fPictureSizeField stringValue];
[queueFileJob setObject:pictureSummary forKey:@"PictureSizingSummary"];
@@ -3090,7 +3101,18 @@ fWorkingCount = 0;
job->keep_ratio = [[queueToApply objectForKey:@"PictureKeepRatio"] intValue];
job->anamorphic.mode = [[queueToApply objectForKey:@"PicturePAR"] intValue];
-
+ if ([[queueToApply objectForKey:@"PicturePAR"] intValue] == 3)
+ {
+ /* insert our custom values here for capuj */
+ job->width = [[queueToApply objectForKey:@"PicturePARStorageWidth"] intValue];
+ job->height = [[queueToApply objectForKey:@"PicturePARStorageHeight"] intValue];
+
+ job->anamorphic.par_width = [[queueToApply objectForKey:@"PicturePARPixelWidth"] intValue];
+ job->anamorphic.par_height = [[queueToApply objectForKey:@"PicturePARPixelHeight"] intValue];
+
+ job->anamorphic.dar_width = [[queueToApply objectForKey:@"PicturePARDisplayWidth"] floatValue];
+ job->anamorphic.dar_height = [[queueToApply objectForKey:@"PicturePARDisplayHeight"] floatValue];
+ }
/* Here we use the crop values saved at the time the preset was saved */
job->crop[0] = [[queueToApply objectForKey:@"PictureTopCrop"] intValue];
@@ -3740,7 +3762,7 @@ fWorkingCount = 0;
/* Reset the new title in fPictureController && fPreviewController*/
[fPictureController SetTitle:title];
- //[fPictureController SetTitle:title];
+
/* Update subtitle popups */
hb_subtitle_t * subtitle;
[fSubPopUp removeAllItems];
@@ -3796,7 +3818,7 @@ fWorkingCount = 0;
[self calculatePictureSizing:nil];
/* lets call tableViewSelected to make sure that any preset we have selected is enforced after a title change */
- [self selectPreset:nil];
+ [self selectPreset:nil];
}
- (IBAction) chapterPopUpChanged: (id) sender
@@ -4429,7 +4451,7 @@ the user is using "Custom" settings by determining the sender*/
}
[fVideoFiltersField setStringValue: [NSString stringWithFormat:@"Video Filters: %@", videoFilters]];
- [fPictureController reloadStillPreview];
+ //[fPictureController reloadStillPreview];
}