diff options
author | John Stebbins <[email protected]> | 2016-03-12 08:19:13 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-03-12 08:19:13 -0800 |
commit | 1a972f68a412ae06b000930a189bb06bcb5ba6e6 (patch) | |
tree | f09b5195fb706d589d9e89643a43e12b6adba24f /gtk/src | |
parent | 2615c363516a5b29d7d02b73e6b5cf2842584e13 (diff) | |
parent | 44171658dac08810acd38f5691dede164dff508f (diff) |
Merge pull request #124 from jstebbins/decomb-split
Decomb split
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 30 | ||||
-rw-r--r-- | gtk/src/ghb-3.12.ui | 63 | ||||
-rw-r--r-- | gtk/src/ghb-3.14.ui | 63 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 74 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 12 | ||||
-rw-r--r-- | gtk/src/makedeps.py | 1 |
6 files changed, 240 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 13d2d8531..b79225df3 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2128,6 +2128,28 @@ setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud) } G_MODULE_EXPORT void +comb_detect_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud) +{ + ghb_widget_to_setting(ud->settings, widget); + ghb_check_dependency(ud, widget, NULL); + ghb_clear_presets_selection(ud); + ghb_live_reset(ud); + + const char * comb_detect; + comb_detect = ghb_dict_get_string(ud->settings, "PictureCombDetectPreset"); + if (strcasecmp(comb_detect, "off")) + { + const char * deint; + deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter"); + if (!strcasecmp(deint, "off")) + { + ghb_ui_update(ud, "PictureDeinterlaceFilter", + ghb_string_value("decomb")); + } + } +} + +G_MODULE_EXPORT void deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { ghb_widget_to_setting(ud->settings, widget); @@ -2137,6 +2159,14 @@ deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_update_ui_combo_box(ud, "PictureDeinterlacePreset", NULL, FALSE); ghb_ui_update(ud, "PictureDeinterlacePreset", ghb_dict_get(ud->settings, "PictureDeinterlacePreset")); + + const char * deint; + deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter"); + if (!strcasecmp(deint, "off")) + { + ghb_ui_update(ud, "PictureCombDetectPreset", + ghb_string_value("off")); + } } G_MODULE_EXPORT void diff --git a/gtk/src/ghb-3.12.ui b/gtk/src/ghb-3.12.ui index ce4d34aae..023f79c73 100644 --- a/gtk/src/ghb-3.12.ui +++ b/gtk/src/ghb-3.12.ui @@ -2867,6 +2867,7 @@ Players will scale the image in order to achieve the specified aspect.</property <property name="orientation">horizontal</property> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="selection-mode">none</property> <property name="column-spacing">4</property> <property name="row-spacing">32</property> <property name="margin-top">16</property> @@ -2934,6 +2935,68 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property> </object> </child> <child> + <object class="GtkGrid" id="comb_detect_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">5</property> + <property name="halign">start</property> + <property name="valign">start</property> + <child> + <object class="GtkLabel" id="comb_detect_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Interlace Detection:</property> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="PictureCombDetectPreset"> + <property name="valign">GTK_ALIGN_CENTER</property> + <property name="width_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="tooltip_text" translatable="yes">This filter detects interlaced frames. + +If a deinterlace filter is enabled, only frames that this filter finds +to be interlaced will be deinterlaced.</property> + <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="PictureCombDetectCustom"> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Custom interlace detection filter string format + +Mode:Spatial Metric:Motion Thresh:Spatial Thresh:Mask Filter Mode: +Block Thresh: Block Width: Block Height</property> + <property name="width_chars">8</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">1</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + <child> <object class="GtkGrid" id="table14"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/gtk/src/ghb-3.14.ui b/gtk/src/ghb-3.14.ui index b210861e4..e9c0421a9 100644 --- a/gtk/src/ghb-3.14.ui +++ b/gtk/src/ghb-3.14.ui @@ -2868,6 +2868,7 @@ Players will scale the image in order to achieve the specified aspect.</property <property name="orientation">horizontal</property> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="selection-mode">none</property> <property name="column-spacing">4</property> <property name="row-spacing">32</property> <property name="margin-top">16</property> @@ -2935,6 +2936,68 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property> </object> </child> <child> + <object class="GtkGrid" id="comb_detect_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">5</property> + <property name="halign">start</property> + <property name="valign">start</property> + <child> + <object class="GtkLabel" id="comb_detect_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Interlace Detection:</property> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="PictureCombDetectPreset"> + <property name="valign">GTK_ALIGN_CENTER</property> + <property name="width_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="tooltip_text" translatable="yes">This filter detects interlaced frames. + +If a deinterlace filter is enabled, only frames that this filter finds +to be interlaced will be deinterlaced.</property> + <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="PictureCombDetectCustom"> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Custom interlace detection filter string format + +Mode:Spatial Metric:Motion Thresh:Spatial Thresh:Mask Filter Mode: +Block Thresh: Block Width: Block Height</property> + <property name="width_chars">8</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">1</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + <child> <object class="GtkGrid" id="table14"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 653cca354..9e327ed53 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -2939,6 +2939,74 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property> </packing> </child> <child> + <object class="GtkGrid" id="comb_detect_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">5</property> + <property name="halign">start</property> + <property name="valign">start</property> + <child> + <object class="GtkLabel" id="comb_detect_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Interlace Detection:</property> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="PictureCombDetectPreset"> + <property name="valign">GTK_ALIGN_CENTER</property> + <property name="width_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="tooltip_text" translatable="yes">This filter detects interlaced frames. + +If a deinterlace filter is enabled, only frames that this filter finds +to be interlaced will be deinterlaced.</property> + <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="PictureCombDetectCustom"> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Custom interlace detection filter string format + +Mode:Spatial Metric:Motion Thresh:Spatial Thresh:Mask Filter Mode: +Block Thresh: Block Width: Block Height</property> + <property name="width_chars">8</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/> + </object> + <packing> + <property name="top_attach">1</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> <object class="GtkGrid" id="table14"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -3038,7 +3106,7 @@ SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</property> </object> <packing> <property name="top_attach">0</property> - <property name="left_attach">1</property> + <property name="left_attach">2</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -3086,8 +3154,8 @@ If your source exhibits 'blockiness', this filter may help clean it up.</propert </child> </object> <packing> - <property name="top_attach">0</property> - <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="left_attach">0</property> <property name="width">1</property> <property name="height">1</property> </packing> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 2a8d79bb9..4ea4d4d4b 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -362,6 +362,12 @@ static filter_opts_t hqdn3d_preset_opts = }; #endif +static filter_opts_t comb_detect_opts = +{ + .filter_id = HB_FILTER_COMB_DETECT, + .preset = TRUE +}; + static filter_opts_t detel_opts = { .filter_id = HB_FILTER_DETELECINE, @@ -493,6 +499,12 @@ combo_name_map_t combo_name_map[] = generic_opt_get }, { + "PictureCombDetectPreset", + &comb_detect_opts, + filter_opts_set, + filter_opt_get + }, + { "PictureDeinterlaceFilter", &deint_opts, small_opts_set, diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py index a0277e840..fa6463e1d 100644 --- a/gtk/src/makedeps.py +++ b/gtk/src/makedeps.py @@ -28,6 +28,7 @@ dep_map = ( DepEntry("VideoFramerate", "VideoFrameratePFR", "auto", True, True), DepEntry("VideoFramerate", "VideoFramerateVFR", "auto", False, True), DepEntry("VideoTwoPass", "VideoTurboTwoPass", "1", False, False), + DepEntry("PictureCombDetectPreset", "PictureCombDetectCustom", "custom", False, True), DepEntry("PictureDeinterlaceFilter", "PictureDeinterlacePreset", "off", True, True), DepEntry("PictureDeinterlaceFilter", "PictureDeinterlacePresetLabel", "off", True, True), DepEntry("PictureDeinterlaceFilter", "PictureDeinterlaceCustom", "off", True, True), |