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 /gtk/src | |
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 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 7 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 6 | ||||
-rw-r--r-- | gtk/src/makedeps.py | 10 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 6 | ||||
-rw-r--r-- | gtk/src/videohandler.c | 6 |
5 files changed, 19 insertions, 16 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 003bb23a9..357dd4ba7 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1008,7 +1008,7 @@ void ghb_show_container_options(signal_user_data_t *ud) gtk_widget_set_visible(w2, (mux->format & HB_MUX_MASK_MP4)); gtk_widget_set_visible(w3, (mux->format & HB_MUX_MASK_MP4) && - (enc == HB_VCODEC_X264)); + (enc == HB_VCODEC_X264_8BIT)); } static void @@ -2285,7 +2285,7 @@ vquality_changed_cb(GtkWidget *widget, signal_user_data_t *ud) vcodec = ghb_settings_video_encoder_codec(ud->settings, "VideoEncoder"); vquality = ghb_dict_get_double(ud->settings, "VideoQualitySlider"); - if (vcodec == HB_VCODEC_X264 && vquality < 1.0) + if ((vcodec & HB_VCODEC_X264_MASK) && vquality < 1.0) { // Set Profile to auto for lossless x264 ghb_ui_update(ud, "VideoProfile", ghb_string_value("auto")); @@ -5130,7 +5130,8 @@ format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) return g_strdup_printf("%s: %d", vqname, (int)val); } break; - case HB_VCODEC_X264: + case HB_VCODEC_X264_8BIT: + case HB_VCODEC_X264_10BIT: { if (val == 0.0) { diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index d6e16d537..9b26552d0 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1000,7 +1000,8 @@ ghb_vquality_default(signal_user_data_t *ud) switch (vcodec) { case HB_VCODEC_X265: - case HB_VCODEC_X264: + case HB_VCODEC_X264_8BIT: + case HB_VCODEC_X264_10BIT: return 20; case HB_VCODEC_THEORA: return 45; @@ -3017,7 +3018,8 @@ ghb_build_advanced_opts_string(GhbValue *settings) vcodec = ghb_settings_video_encoder_codec(settings, "VideoEncoder"); switch (vcodec) { - case HB_VCODEC_X264: + case HB_VCODEC_X264_8BIT: + case HB_VCODEC_X264_10BIT: return ghb_dict_get_string(settings, "x264Option"); default: diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py index 7159a87c0..8abc4cc9d 100644 --- a/gtk/src/makedeps.py +++ b/gtk/src/makedeps.py @@ -53,13 +53,13 @@ dep_map = ( DepEntry("x264_subme", "x264_psy_rd", "<6", True, False), DepEntry("x264_subme", "x264_psy_trell", "<6", True, False), DepEntry("x264_trellis", "x264_psy_trell", "0", True, False), - DepEntry("VideoEncoder", "x264FastDecode", "x264", False, True), - DepEntry("VideoEncoder", "x264UseAdvancedOptions", "x264", False, True), + DepEntry("VideoEncoder", "x264FastDecode", "x264|x264_10bit", False, True), + DepEntry("VideoEncoder", "x264UseAdvancedOptions", "x264|x264_10bit", False, True), DepEntry("HideAdvancedVideoSettings", "x264UseAdvancedOptions", "1", True, True), - DepEntry("VideoEncoder", "VideoOptionExtraWindow", "x264|x265|mpeg4|mpeg2|VP8", False, True), - DepEntry("VideoEncoder", "VideoOptionExtraLabel", "x264|x265|mpeg4|mpeg2|VP8", False, True), + DepEntry("VideoEncoder", "VideoOptionExtraWindow", "x264|x264_10bit|x265|mpeg4|mpeg2|VP8", False, True), + DepEntry("VideoEncoder", "VideoOptionExtraLabel", "x264|x264_10bit|x265|mpeg4|mpeg2|VP8", False, True), DepEntry("x264UseAdvancedOptions", "VideoSettingsTable", "1", True, False), - DepEntry("VideoEncoder", "x264_box", "x264", False, True), + DepEntry("VideoEncoder", "x264_box", "x264|x264_10bit", False, True), DepEntry("x264UseAdvancedOptions", "x264_box", "0", True, False), DepEntry("auto_name", "autoname_box", "1", False, False), ) diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index d99784070..ed2e16071 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -459,7 +459,7 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter // Next line in the display (Video Encoder Options) // Video Options: Preset - Tune - Profile - Level - if (video_encoder->codec == HB_VCODEC_X264 && + if ((video_encoder->codec & HB_VCODEC_X264_MASK) && !ghb_dict_get_bool(settings, "x264UseAdvancedOptions")) { const gchar *extra_opt = NULL; @@ -489,7 +489,7 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter XPRINT("%s%s", prefix, tune_opt); prefix = ","; } - if (video_encoder->codec == HB_VCODEC_X264) + if (video_encoder->codec & HB_VCODEC_X264_MASK) { if (fastdecode) { @@ -522,7 +522,7 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter XPRINT(_("<b>Advanced Options:</b> <small>%s</small>\n"), extra_opt); } } - else if (video_encoder->codec == HB_VCODEC_X264) + else if (video_encoder->codec & HB_VCODEC_X264_MASK) { // Next line in the display (Video Encoder Options) // Video Advanced Options: detailed settings diff --git a/gtk/src/videohandler.c b/gtk/src/videohandler.c index b4c0437b8..e463810cb 100644 --- a/gtk/src/videohandler.c +++ b/gtk/src/videohandler.c @@ -70,7 +70,7 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) } // Advanced options are only for x264 - if (encoder != HB_VCODEC_X264) + if (!(encoder & HB_VCODEC_X264_MASK)) { ghb_ui_update(ud, "x264UseAdvancedOptions", ghb_boolean_value(FALSE)); } @@ -101,7 +101,7 @@ ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud) } if (!ghb_dict_get_bool(ud->settings, "x264UseAdvancedOptions") && - encoder == HB_VCODEC_X264) + (encoder & HB_VCODEC_X264_MASK)) { GString *str = g_string_new(""); const char *preset; @@ -167,7 +167,7 @@ ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud) { level = ""; } - new_opts = hb_x264_param_unparse( + new_opts = hb_x264_param_unparse(hb_video_encoder_get_depth(encoder), preset, tunes, opts, profile, level, w, h); if (new_opts) ghb_update_x264Option(ud, new_opts); |