summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Controller.m2
-rw-r--r--macosx/PictureController.h2
-rw-r--r--macosx/PictureController.m54
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