diff options
author | dynaflash <[email protected]> | 2013-02-04 19:55:40 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2013-02-04 19:55:40 +0000 |
commit | 4017dfc2050336c4476f89fd4c4e358449b9376e (patch) | |
tree | bd8ffa1d018e50d05c5527cfbd2c134c70787df4 /macosx | |
parent | 4ea1e568a7ad2e8ae4068d76e00f30dd77e280bd (diff) |
MacGui: re enable deinterlaced still preview images when deinterlace is selected.
- Also add a deinterlaced preview still image when decomb is selected as libhb does not notice decomb for still previews. Do a quick shell game when decomb is selected only to grab a deinterlaced preview.
- As a side note, remove some extremely vestigial code from controller.m as far as a min preview size.
- fwiw, lingui already apparently does this.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5239 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 2 | ||||
-rw-r--r-- | macosx/PictureController.h | 2 | ||||
-rw-r--r-- | macosx/PictureController.m | 54 |
3 files changed, 40 insertions, 18 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 1a4b1fa8d..61a77076c 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -5769,7 +5769,7 @@ the user is using "Custom" settings by determining the sender*/ // width or height may have changed, unparse [self x264PresetsChangedDisplayExpandedOptions:nil]; - //[fPictureController reloadStillPreview]; + [fPictureController decombDeinterlacePreviewImage]; } diff --git a/macosx/PictureController.h b/macosx/PictureController.h index 56dbe5f21..f738ba24e 100644 --- a/macosx/PictureController.h +++ b/macosx/PictureController.h @@ -198,6 +198,8 @@ - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender; - (IBAction) deblockSliderChanged: (id) sender; +- (void) decombDeinterlacePreviewImage; + - (int) detelecine; - (NSString*) detelecineCustomString; - (void) setDetelecine: (int) setting; diff --git a/macosx/PictureController.m b/macosx/PictureController.m index 027523f01..b15cd9b8c 100644 --- a/macosx/PictureController.m +++ b/macosx/PictureController.m @@ -1077,22 +1077,6 @@ hb_job_t * job = fTitle->job; [fPreviewController SetTitle:fTitle]; - /* Sanity Check Here for < 16 px preview to avoid - crashing hb_get_preview. In fact, just for kicks - lets getting previews at a min limit of 32, since - no human can see any meaningful detail below that */ - if (job->width >= 64 && job->height >= 64) - { - - // Purge the existing picture previews so they get recreated the next time - // they are needed. - // [fPreviewController purgeImageCache]; - /* We actually call displayPreview now from pictureSliderChanged which keeps - * our picture preview slider in sync with the previews being shown - */ - - //[fPreviewController pictureSliderChanged:nil]; - } } @@ -1233,6 +1217,8 @@ are maintained across different sources */ fPictureFilterSettings.grayscale = [fGrayscaleCheck state]; + [self decombDeinterlacePreviewImage]; + if (sender != nil) { [fHBController pictureSettingsDidChange]; @@ -1241,7 +1227,41 @@ are maintained across different sources */ } - +- (void) decombDeinterlacePreviewImage +{ + if ([fDecombDeinterlaceSlider floatValue] < 0.50) + { + /* Since Libhb only shows a deinterlaced preview image via deinterlace .. for decomb we + do a quick switch to get libhb to show a deinterlaced image if needed even though deinterlace + has not been changed by the user. so we temporarily switch deinterace accoring to decomb then + call reloadStillPreview quickly and then switch deinterlace back to its proper state. + */ + + // decomb is chosen + if (fPictureFilterSettings.decomb > 0) + { + /* Temporarily turn on deinterlacing .... */ + fTitle->job->deinterlace = 1; + /* Grab a still preview ... */ + [self reloadStillPreview]; + /* ... then reset deinterlace back to where specified in the ui */ + fTitle->job->deinterlace = [fDeinterlacePopUp indexOfSelectedItem]; + + } + else + { + [self reloadStillPreview]; + } + + } + else + { + fTitle->job->deinterlace = [fDeinterlacePopUp indexOfSelectedItem]; + [self reloadStillPreview]; + } + + +} #pragma mark - - (IBAction) deblockSliderChanged: (id) sender |