]> granicus.if.org Git - handbrake/commitdiff
macui: add grayscale filter
authorJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 15 Oct 2015 14:46:58 +0000 (07:46 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 15 Oct 2015 14:46:58 +0000 (07:46 -0700)
macosx/HBJob+HBJobConversion.m

index 802eb2bda9e274d65321ee627110a36159f22454..b194e86d85e1e29b7fed063d3809c1912ff8d0c6 100644 (file)
             break;
     }
 
-    job->grayscale = self.filters.grayscale;
-
     // Map the settings in the dictionaries for the SubtitleList array to match title->list_subtitle
     BOOL one_burned = NO;
     for (NSDictionary *subtitleDict in self.subtitles.tracks)
                                  self.picture.cropTop, self.picture.cropBottom,
                                  self.picture.cropLeft, self.picture.cropRight].UTF8String);
     
+    // Add grayscale filter
+    if (self.filters.grayscale)
+    {
+        filter = hb_filter_init(HB_FILTER_GRAYSCALE);
+        hb_add_filter(job, filter, NULL);
+    }
+
     // Add framerate shaping filter
     filter = hb_filter_init(HB_FILTER_VFR);
     hb_add_filter(job, filter, [[NSString stringWithFormat:@"%d:%d:%d",