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/PictureController.m | |
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/PictureController.m')
-rw-r--r-- | macosx/PictureController.m | 54 |
1 files changed, 37 insertions, 17 deletions
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 |