diff options
author | John Stebbins <[email protected]> | 2015-10-17 15:57:03 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-11-12 09:49:56 -0800 |
commit | 890a551270ef8110e47d9c503e1588d3d2bc710f (patch) | |
tree | 1e31de5f379c54157c9ec095b55a8eeadca5ef8a /macosx | |
parent | 88ce808b3083415950be070fa7bdc90d49a67eea (diff) |
x264: add multilib support (a.k.a. 10-bit)
This adds the structure to load an libx264 10-bit shared library.
The user must install this library themselves to an appropriate place.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBJob+HBJobConversion.m | 2 | ||||
-rw-r--r-- | macosx/HBVideo+UIAdditions.m | 17 | ||||
-rw-r--r-- | macosx/HBVideo.m | 2 | ||||
-rw-r--r-- | macosx/HBVideoController.m | 6 |
4 files changed, 14 insertions, 13 deletions
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m index a07ca98ff..f19e3c125 100644 --- a/macosx/HBJob+HBJobConversion.m +++ b/macosx/HBJob+HBJobConversion.m @@ -109,7 +109,7 @@ job->ipod_atom = self.mp4iPodCompatible; } - if (self.video.twoPass && (self.video.encoder == HB_VCODEC_X264 || + if (self.video.twoPass && ((self.video.encoder & HB_VCODEC_X264_MASK) || self.video.encoder == HB_VCODEC_X265)) { job->fastfirstpass = self.video.turboTwoPass; diff --git a/macosx/HBVideo+UIAdditions.m b/macosx/HBVideo+UIAdditions.m index f0e6b2678..0d6aaf1c1 100644 --- a/macosx/HBVideo+UIAdditions.m +++ b/macosx/HBVideo+UIAdditions.m @@ -83,7 +83,8 @@ - (BOOL)turboTwoPassSupported { - return (self.encoder == HB_VCODEC_X264 || self.encoder == HB_VCODEC_X265); + return ((self.encoder & HB_VCODEC_X264_MASK) || + self.encoder == HB_VCODEC_X265); } /** @@ -92,7 +93,7 @@ */ - (NSString *)unparseOptions { - if (self.encoder != HB_VCODEC_X264) + if (!(self.encoder & HB_VCODEC_X264_MASK)) { return @""; } @@ -132,12 +133,12 @@ } // now, unparse - char *fX264PresetsUnparsedUTF8String = hb_x264_param_unparse(x264_preset, - x264_tune, - advanced_opts, - h264_profile, - h264_level, - self.job.picture.width, self.job.picture.height); + char *fX264PresetsUnparsedUTF8String = hb_x264_param_unparse( + hb_video_encoder_get_depth(self.encoder), + x264_preset, x264_tune, advanced_opts, + h264_profile, h264_level, + self.job.picture.width, + self.job.picture.height); // update the text field if (fX264PresetsUnparsedUTF8String != NULL) { diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index 604e4aecc..70b7c09a1 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -576,7 +576,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; if (hb_video_encoder_get_presets(self.encoder) != NULL) { - if (self.encoder == HB_VCODEC_X264 && [preset[@"x264UseAdvancedOptions"] boolValue]) + if ((self.encoder & HB_VCODEC_X264_MASK) && [preset[@"x264UseAdvancedOptions"] boolValue]) { // preset does not use the x264 preset system, reset the widgets. self.preset = @"medium"; diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m index 8ade4da8b..9a0ecb14a 100644 --- a/macosx/HBVideoController.m +++ b/macosx/HBVideoController.m @@ -128,7 +128,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; } else if ([keyPath isEqualToString:@"video.unparseOptions"]) { - if (self.video.encoder == HB_VCODEC_X264) + if (self.video.encoder & HB_VCODEC_X264_MASK) { fDisplayX264PresetsUnparseTextField.stringValue = [NSString stringWithFormat:@"x264 Unparse: %@", self.video.unparseOptions]; } @@ -214,7 +214,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; fPresetsBox.contentView = fPresetView; [self setupPresetsSlider]; - if (self.video.encoder == HB_VCODEC_X264) + if (self.video.encoder & HB_VCODEC_X264_MASK) { self.advancedController.hidden = NO; } @@ -250,7 +250,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; */ - (void)toggleAdvancedOptionsCheckBoxForEncoder:(int)encoder { - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBShowAdvancedTab"] && (encoder == HB_VCODEC_X264)) + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBShowAdvancedTab"] && (encoder & HB_VCODEC_X264_MASK)) { fX264UseAdvancedOptionsCheck.hidden = NO; fDividerLine.hidden = YES; |