]> granicus.if.org Git - handbrake/commitdiff
Make deinterlace/decomb behave similar to nlmeans/hqdn3d
authorJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 5 Oct 2015 15:53:19 +0000 (08:53 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 9 Oct 2015 20:36:59 +0000 (13:36 -0700)
I.e. use a dropdown to select between the filters instead of a radio
button.

15 files changed:
gtk/src/callbacks.c
gtk/src/ghb-3.12.ui
gtk/src/ghb-3.14.ui
gtk/src/ghb.ui
gtk/src/hb-backend.c
gtk/src/makedeps.py
gtk/src/presets.c
gtk/src/queuehandler.c
libhb/builtin_presets.h
libhb/libhb_presets.list
libhb/param.c
libhb/preset.c
libhb/preset_builtin.json
libhb/preset_template.json
test/test.c

index 6acee07ab46482e817ef374721437ecbe47f4212..215900275ac94e6bed40ce505aed8a259950aa97 100644 (file)
@@ -2116,6 +2116,18 @@ setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
     ghb_live_reset(ud);
 }
 
+G_MODULE_EXPORT void
+deint_filter_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);
+    ghb_update_ui_combo_box(ud, "PictureDeinterlacePreset", NULL, FALSE);
+    ghb_ui_update(ud, "PictureDeinterlacePreset",
+                  ghb_dict_get(ud->settings, "PictureDeinterlacePreset"));
+}
+
 G_MODULE_EXPORT void
 title_angle_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
 {
index cf65d0346e723d107d44583f531840c36d14bd38..db3acea2f1259d13222464b141c478bafb752820 100644 (file)
@@ -3065,92 +3065,31 @@ SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkGrid" id="table10">
+                                  <object class="GtkGrid" id="table14">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="label86">
+                                      <object class="GtkLabel" id="PictureDeinterlaceFilterLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Detelecine:</property>
+                                        <property name="label" translatable="yes">Deinterlace Filter:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">0</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDetelecine">
+                                      <object class="GtkComboBox" id="PictureDeinterlaceFilter">
                                         <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 removes 'combing' artifacts that are the result of telecining.
-
-Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
-                                        <signal name="changed" handler="setting_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="PictureDetelecineCustom">
-                                        <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
-
-JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDecombDeinterlace">
-                                        <property name="label" translatable="yes">Decomb</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
-
-The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.
-
-The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="left_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDeinterlaceDecomb">
-                                        <property name="label" translatable="yes">Deinterlace</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
                                         <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
 
 The decomb filter selectively deinterlaces frames that appear to be interlaced.
@@ -3158,115 +3097,127 @@ This will preserve quality in frames that are not interlaced.
 
 The classic deinterlace filter is applied to all frames.
 Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">PictureDecombDeinterlace</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
+                                        <signal name="changed" handler="deint_filter_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">2</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDecombLabel">
+                                      <object class="GtkLabel" id="PictureDeinterlacePresetLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Decomb:</property>
+                                        <property name="label" translatable="yes">Deinterlace Preset:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDecomb">
+                                      <object class="GtkComboBox" id="PictureDeinterlacePreset">
                                         <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">The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.</property>
+                                        <property name="tooltip_text" translatable="yes"> The decomb filter selectively deinterlaces frames that appear to be interlaced.
+This will preserve quality in frames that are not interlaced.
+
+The classic deinterlace filter is applied to all frames.
+Frames that are not interlaced will suffer some quality degradation.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkEntry" id="PictureDecombCustom">
+                                      <object class="GtkEntry" id="PictureDeinterlaceCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom decomb filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom denoise filter string format
 
-Mode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:
-BlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:
-ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity</property>
+SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</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">4</property>
+                                        <property name="top_attach">3</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="padding">2</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkGrid" id="table10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDeinterlaceLabel">
+                                      <object class="GtkLabel" id="label86">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Deinterlace:</property>
+                                        <property name="label" translatable="yes">Detelecine:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlace">
+                                      <object class="GtkComboBox" id="PictureDetelecine">
                                         <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">The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
+                                        <property name="tooltip_text" translatable="yes">This filter removes 'combing' artifacts that are the result of telecining.
+
+Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlaceCustom">
+                                      <object class="GtkEntry" id="PictureDetelecineCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom deinterlace filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
 
-YadifMode:YadifParity:McdintMode:McdeintQp</property>
+JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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">6</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
@@ -3277,7 +3228,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
                                     <property name="padding">2</property>
-                                    <property name="position">2</property>
+                                    <property name="position">3</property>
                                   </packing>
                                 </child>
                               </object>
index 7164d39b76348cd56cf8b9f87178870b079d70f4..3dd55d58d0f1b5bce7cc003ec42320bbade062b3 100644 (file)
@@ -3066,92 +3066,31 @@ SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkGrid" id="table10">
+                                  <object class="GtkGrid" id="table14">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="label86">
+                                      <object class="GtkLabel" id="PictureDeinterlaceFilterLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Detelecine:</property>
+                                        <property name="label" translatable="yes">Deinterlace Filter:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">0</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDetelecine">
+                                      <object class="GtkComboBox" id="PictureDeinterlaceFilter">
                                         <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 removes 'combing' artifacts that are the result of telecining.
-
-Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
-                                        <signal name="changed" handler="setting_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="PictureDetelecineCustom">
-                                        <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
-
-JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDecombDeinterlace">
-                                        <property name="label" translatable="yes">Decomb</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
-
-The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.
-
-The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="left_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDeinterlaceDecomb">
-                                        <property name="label" translatable="yes">Deinterlace</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
                                         <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
 
 The decomb filter selectively deinterlaces frames that appear to be interlaced.
@@ -3159,115 +3098,127 @@ This will preserve quality in frames that are not interlaced.
 
 The classic deinterlace filter is applied to all frames.
 Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">PictureDecombDeinterlace</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
+                                        <signal name="changed" handler="deint_filter_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">2</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDecombLabel">
+                                      <object class="GtkLabel" id="PictureDeinterlacePresetLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Decomb:</property>
+                                        <property name="label" translatable="yes">Deinterlace Preset:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDecomb">
+                                      <object class="GtkComboBox" id="PictureDeinterlacePreset">
                                         <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">The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.</property>
+                                        <property name="tooltip_text" translatable="yes"> The decomb filter selectively deinterlaces frames that appear to be interlaced.
+This will preserve quality in frames that are not interlaced.
+
+The classic deinterlace filter is applied to all frames.
+Frames that are not interlaced will suffer some quality degradation.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkEntry" id="PictureDecombCustom">
+                                      <object class="GtkEntry" id="PictureDeinterlaceCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom decomb filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom denoise filter string format
 
-Mode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:
-BlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:
-ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity</property>
+SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</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">4</property>
+                                        <property name="top_attach">3</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="padding">2</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkGrid" id="table10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDeinterlaceLabel">
+                                      <object class="GtkLabel" id="label86">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Deinterlace:</property>
+                                        <property name="label" translatable="yes">Detelecine:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlace">
+                                      <object class="GtkComboBox" id="PictureDetelecine">
                                         <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">The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
+                                        <property name="tooltip_text" translatable="yes">This filter removes 'combing' artifacts that are the result of telecining.
+
+Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlaceCustom">
+                                      <object class="GtkEntry" id="PictureDetelecineCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom deinterlace filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
 
-YadifMode:YadifParity:McdintMode:McdeintQp</property>
+JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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">6</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
@@ -3278,7 +3229,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
                                     <property name="padding">2</property>
-                                    <property name="position">2</property>
+                                    <property name="position">3</property>
                                   </packing>
                                 </child>
                               </object>
index 6c3303eb22f895a8d5acc5de5d14f5860b64838e..cf29e4493edc0f3ea324f998c40f729090bc9b1f 100644 (file)
@@ -3065,92 +3065,31 @@ SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkGrid" id="table10">
+                                  <object class="GtkGrid" id="table14">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="label86">
+                                      <object class="GtkLabel" id="PictureDeinterlaceFilterLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Detelecine:</property>
+                                        <property name="label" translatable="yes">Deinterlace Filter:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">0</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDetelecine">
+                                      <object class="GtkComboBox" id="PictureDeinterlaceFilter">
                                         <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 removes 'combing' artifacts that are the result of telecining.
-
-Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
-                                        <signal name="changed" handler="setting_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="PictureDetelecineCustom">
-                                        <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
-
-JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDecombDeinterlace">
-                                        <property name="label" translatable="yes">Decomb</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
-
-The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.
-
-The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="active">True</property>
-                                        <property name="draw_indicator">True</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="left_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkRadioButton" id="PictureDeinterlaceDecomb">
-                                        <property name="label" translatable="yes">Deinterlace</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
                                         <property name="tooltip_text" translatable="yes">Choose decomb or deinterlace filter options.
 
 The decomb filter selectively deinterlaces frames that appear to be interlaced.
@@ -3158,115 +3097,127 @@ This will preserve quality in frames that are not interlaced.
 
 The classic deinterlace filter is applied to all frames.
 Frames that are not interlaced will suffer some quality degradation.</property>
-                                        <property name="halign">start</property>
-                                        <property name="draw_indicator">True</property>
-                                        <property name="group">PictureDecombDeinterlace</property>
-                                        <signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
+                                        <signal name="changed" handler="deint_filter_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">2</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDecombLabel">
+                                      <object class="GtkLabel" id="PictureDeinterlacePresetLabel">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Decomb:</property>
+                                        <property name="label" translatable="yes">Deinterlace Preset:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">0</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkComboBox" id="PictureDecomb">
+                                      <object class="GtkComboBox" id="PictureDeinterlacePreset">
                                         <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">The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.</property>
+                                        <property name="tooltip_text" translatable="yes"> The decomb filter selectively deinterlaces frames that appear to be interlaced.
+This will preserve quality in frames that are not interlaced.
+
+The classic deinterlace filter is applied to all frames.
+Frames that are not interlaced will suffer some quality degradation.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">3</property>
+                                        <property name="top_attach">2</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkEntry" id="PictureDecombCustom">
+                                      <object class="GtkEntry" id="PictureDeinterlaceCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom decomb filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom denoise filter string format
 
-Mode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:
-BlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:
-ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity</property>
+SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma</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">4</property>
+                                        <property name="top_attach">3</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
                                       </packing>
                                     </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="padding">2</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkGrid" id="table10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="column_spacing">5</property>
                                     <child>
-                                      <object class="GtkLabel" id="PictureDeinterlaceLabel">
+                                      <object class="GtkLabel" id="label86">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="halign">start</property>
-                                        <property name="label" translatable="yes">Deinterlace:</property>
+                                        <property name="label" translatable="yes">Detelecine:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlace">
+                                      <object class="GtkComboBox" id="PictureDetelecine">
                                         <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">The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</property>
+                                        <property name="tooltip_text" translatable="yes">This filter removes 'combing' artifacts that are the result of telecining.
+
+Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps.</property>
                                         <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">5</property>
+                                        <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="PictureDeinterlaceCustom">
+                                      <object class="GtkEntry" id="PictureDetelecineCustom">
                                         <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">Custom deinterlace filter string format
+                                        <property name="tooltip_text" translatable="yes">Custom detelecine filter string format
 
-YadifMode:YadifParity:McdintMode:McdeintQp</property>
+JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</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">6</property>
+                                        <property name="top_attach">1</property>
                                         <property name="left_attach">1</property>
                                         <property name="width">1</property>
                                         <property name="height">1</property>
@@ -3277,7 +3228,7 @@ YadifMode:YadifParity:McdintMode:McdeintQp</property>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
                                     <property name="padding">2</property>
-                                    <property name="position">2</property>
+                                    <property name="position">3</property>
                                   </packing>
                                 </child>
                               </object>
index 57135578bb6fec9ed8a9dd90bca6448c87fa7bbc..beb9797e54c29bf7b8d02045499442a1cabc11f7 100644 (file)
@@ -196,6 +196,18 @@ combo_opts_t vqual_granularity_opts =
     d_vqual_granularity_opts
 };
 
+static options_map_t d_deint_opts[] =
+{
+    {N_("Off"),         "off",         HB_FILTER_INVALID,     ""},
+    {N_("Decomb"),      "decomb",      HB_FILTER_DECOMB,      ""},
+    {N_("Deinterlace"), "deinterlace", HB_FILTER_DEINTERLACE, ""},
+};
+combo_opts_t deint_opts =
+{
+    sizeof(d_deint_opts)/sizeof(options_map_t),
+    d_deint_opts
+};
+
 static options_map_t d_denoise_opts[] =
 {
     {N_("Off"),     "off",     HB_FILTER_INVALID, ""},
@@ -324,6 +336,12 @@ typedef struct
     gboolean preset;
 } filter_opts_t;
 
+static filter_opts_t deint_preset_opts =
+{
+    .filter_id = HB_FILTER_DECOMB,
+    .preset    = TRUE
+};
+
 static filter_opts_t nlmeans_preset_opts =
 {
     .filter_id = HB_FILTER_NLMEANS,
@@ -350,18 +368,6 @@ static filter_opts_t detel_opts =
     .preset    = TRUE
 };
 
-static filter_opts_t decomb_opts =
-{
-    .filter_id = HB_FILTER_DECOMB,
-    .preset    = TRUE
-};
-
-static filter_opts_t deint_opts =
-{
-    .filter_id = HB_FILTER_DEINTERLACE,
-    .preset    = TRUE
-};
-
 typedef void (*opts_set_f)(signal_user_data_t *ud, const gchar *name,
                            void *opts, const void* data);
 typedef GhbValue* (*opt_get_f)(const gchar *name, const void *opts,
@@ -410,11 +416,14 @@ static void container_opts_set(signal_user_data_t *ud, const gchar *name,
                                void *opts, const void* data);
 static void filter_opts_set(signal_user_data_t *ud, const gchar *name,
                            void *opts, const void* data);
+static void deint_opts_set(signal_user_data_t *ud, const gchar *name,
+                           void *vopts, const void* data);
 
 static GhbValue * generic_opt_get(const char *name, const void *opts,
                                   const GhbValue *gval, GhbType type);
 static GhbValue * filter_opt_get(const char *name, const void *opts,
                                 const GhbValue *gval, GhbType type);
+
 combo_name_map_t combo_name_map[] =
 {
     {
@@ -484,15 +493,15 @@ combo_name_map_t combo_name_map[] =
         generic_opt_get
     },
     {
-        "PictureDeinterlace",
+        "PictureDeinterlaceFilter",
         &deint_opts,
-        filter_opts_set,
-        filter_opt_get
+        small_opts_set,
+        generic_opt_get
     },
     {
-        "PictureDecomb",
-        &decomb_opts,
-        filter_opts_set,
+        "PictureDeinterlacePreset",
+        &deint_preset_opts,
+        deint_opts_set,
         filter_opt_get
     },
     {
@@ -2740,6 +2749,18 @@ filter_opts_set(signal_user_data_t *ud, const gchar *name,
     filter_opts_set2(ud, name, opts->filter_id, opts->preset);
 }
 
+static void
+deint_opts_set(signal_user_data_t *ud, const gchar *name,
+               void *vopts, const void* data)
+{
+    (void)data;  // Silence "unused variable" warning
+
+    filter_opts_t *opts = (filter_opts_t*)vopts;
+    opts->filter_id = ghb_settings_combo_int(ud->settings,
+                                             "PictureDeinterlaceFilter");
+    filter_opts_set2(ud, name, opts->filter_id, opts->preset);
+}
+
 combo_name_map_t*
 find_combo_map(const gchar *name)
 {
@@ -2936,7 +2957,6 @@ ghb_update_ui_combo_box(
 
     if (name != NULL)
     {
-        g_debug("ghb_update_ui_combo_box() %s\n", name);
         // Clearing a combo box causes a rash of "changed" events, even when
         // the active item is -1 (inactive).  To control things, I'm disabling
         // the event till things are settled down.
@@ -3931,16 +3951,16 @@ ghb_validate_filters(GhbValue *settings, GtkWindow *parent)
     gchar *message;
 
     // Deinterlace
-    gboolean decomb_deint;
-    const char *deint_preset;
-    decomb_deint = ghb_dict_get_bool(settings, "PictureDecombDeinterlace");
-    deint_preset = ghb_dict_get_string(settings, "PictureDeinterlace");
-    if (!decomb_deint && strcasecmp(deint_preset, "off"))
+    int filter_id;
+    filter_id = ghb_settings_combo_int(settings, "PictureDeinterlaceFilter");
+    if (filter_id != HB_FILTER_INVALID)
     {
-        const char *deint_custom = NULL;
-        int filter_id;
+        const char *deint_filter, *deint_preset, *deint_custom = NULL;
 
-        filter_id = HB_FILTER_DEINTERLACE;
+        deint_filter = ghb_dict_get_string(settings,
+                                           "PictureDeinterlaceFilter");
+        deint_preset = ghb_dict_get_string(settings,
+                                           "PictureDeinterlacePreset");
         if (!strcasecmp(deint_preset, "custom"))
         {
             deint_custom = ghb_dict_get_string(settings,
@@ -3952,48 +3972,17 @@ ghb_validate_filters(GhbValue *settings, GtkWindow *parent)
             {
                 message = g_strdup_printf(
                             _("Invalid Deinterlace Settings:\n\n"
+                              "Filter: %s\n"
                               "Preset: %s\n"
-                              "Custom: %s\n"), deint_preset, deint_custom);
+                              "Custom: %s\n"), deint_filter, deint_preset,
+                                               deint_custom);
             }
             else
             {
                 message = g_strdup_printf(
                             _("Invalid Deinterlace Settings:\n\n"
-                              "Preset: %s\n"), deint_preset);
-            }
-            ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
-                               message, _("Cancel"), NULL);
-            g_free(message);
-            return FALSE;
-        }
-    }
-
-    // Decomb
-    deint_preset = ghb_dict_get_string(settings, "PictureDecomb");
-    if (decomb_deint && strcasecmp(deint_preset, "off"))
-    {
-        const char *deint_custom = NULL;
-        int filter_id;
-
-        filter_id = HB_FILTER_DECOMB;
-        if (!strcasecmp(deint_preset, "custom"))
-        {
-            deint_custom = ghb_dict_get_string(settings, "PictureDecombCustom");
-        }
-        if (hb_validate_filter_preset(filter_id, deint_preset, deint_custom))
-        {
-            if (deint_custom != NULL)
-            {
-                message = g_strdup_printf(
-                            _("Invalid Decomb Settings:\n\n"
-                              "Preset: %s\n"
-                              "Custom: %s\n"), deint_preset, deint_custom);
-            }
-            else
-            {
-                message = g_strdup_printf(
-                            _("Invalid Decomb Settings:\n\n"
-                              "Preset: %s\n"), deint_preset);
+                              "Filter: %s\n"
+                              "Preset: %s\n"), deint_filter, deint_preset);
             }
             ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
                                message, _("Cancel"), NULL);
@@ -4039,31 +4028,13 @@ ghb_validate_filters(GhbValue *settings, GtkWindow *parent)
     }
 
     // Denoise
-    const char *denoise_filter;
-    denoise_filter = ghb_dict_get_string(settings, "PictureDenoiseFilter");
-    if (strcasecmp(denoise_filter, "off"))
+    filter_id = ghb_settings_combo_int(settings, "PictureDenoiseFilter");
+    if (filter_id != HB_FILTER_INVALID)
     {
-        const char *denoise_preset;
+        const char *denoise_filter, *denoise_preset;
         const char *denoise_tune = NULL, *denoise_custom = NULL;
-        int filter_id;
 
-        if (!strcasecmp(denoise_filter, "nlmeans"))
-        {
-            filter_id = HB_FILTER_NLMEANS;
-        }
-        else if (!strcasecmp(denoise_filter, "hqdn3d"))
-        {
-            filter_id = HB_FILTER_HQDN3D;
-        }
-        else
-        {
-            message = g_strdup_printf(
-                        _("Invalid Denoise Filter: %s\n"), denoise_filter);
-            ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
-                               message, _("Cancel"), NULL);
-            g_free(message);
-            return FALSE;
-        }
+        denoise_filter = ghb_dict_get_string(settings, "PictureDenoiseFilter");
         denoise_preset = ghb_dict_get_string(settings, "PictureDenoisePreset");
         if (filter_id == HB_FILTER_NLMEANS)
         {
@@ -4101,6 +4072,7 @@ ghb_validate_filters(GhbValue *settings, GtkWindow *parent)
             return FALSE;
         }
     }
+
     return TRUE;
 }
 
@@ -4526,16 +4498,9 @@ ghb_get_preview_image(
     if( title == NULL ) return NULL;
 
     gboolean deinterlace;
-    if (ghb_dict_get_bool(ud->settings, "PictureDecombDeinterlace"))
-    {
-        deinterlace = ghb_settings_combo_int(ud->settings, "PictureDecomb")
-                      == 0 ? 0 : 1;
-    }
-    else
-    {
-        deinterlace = ghb_settings_combo_int(ud->settings, "PictureDeinterlace")
-                      == 0 ? 0 : 1;
-    }
+    deinterlace = ghb_settings_combo_int(ud->settings,
+                            "PictureDeinterlaceFilter") != HB_FILTER_INVALID;
+
     // Get the geometry settings for the preview.  This will disable
     // cropping if the setting to show the cropped region is enabled.
     get_preview_geometry(ud, title, &srcGeo, &uiGeo);
index 1a04a9f06ce26965458df14a8b0cdc3af0bad213..7159a87c09cc858422aac2b711e6bbdc0d40083f 100644 (file)
@@ -28,13 +28,10 @@ dep_map = (
     DepEntry("VideoFramerate", "VideoFrameratePFR", "auto", True, True),
     DepEntry("VideoFramerate", "VideoFramerateVFR", "auto", False, True),
     DepEntry("VideoTwoPass", "VideoTurboTwoPass", "1", False, False),
-    DepEntry("PictureDecombDeinterlace", "PictureDeinterlace", "1", True, True),
-    DepEntry("PictureDecombDeinterlace", "PictureDeinterlaceCustom", "1", True, True),
-    DepEntry("PictureDecombDeinterlace", "PictureDeinterlaceLabel", "1", True, True),
-    DepEntry("PictureDecombDeinterlace", "PictureDecomb", "0", True, True),
-    DepEntry("PictureDecombDeinterlace", "PictureDecombCustom", "0", True, True),
-    DepEntry("PictureDecombDeinterlace", "PictureDecombLabel", "0", True, True),
-    DepEntry("PictureDeinterlace", "PictureDeinterlaceCustom", "custom", False, True),
+    DepEntry("PictureDeinterlaceFilter", "PictureDeinterlacePreset", "off", True, True),
+    DepEntry("PictureDeinterlaceFilter", "PictureDeinterlacePresetLabel", "off", True, True),
+    DepEntry("PictureDeinterlaceFilter", "PictureDeinterlaceCustom", "off", True, True),
+    DepEntry("PictureDeinterlacePreset", "PictureDeinterlaceCustom", "custom", False, True),
     DepEntry("PictureDenoiseFilter", "PictureDenoisePreset", "off", True, True),
     DepEntry("PictureDenoiseFilter", "PictureDenoisePresetLabel", "off", True, True),
     DepEntry("PictureDenoiseFilter", "PictureDenoiseTune", "nlmeans", False, True),
@@ -43,7 +40,6 @@ dep_map = (
     DepEntry("PictureDenoisePreset", "PictureDenoiseCustom", "custom", False, True),
     DepEntry("PictureDenoisePreset", "PictureDenoiseTune", "custom", True, True),
     DepEntry("PictureDenoisePreset", "PictureDenoiseTuneLabel", "custom", True, True),
-    DepEntry("PictureDecomb", "PictureDecombCustom", "custom", False, True),
     DepEntry("PictureDetelecine", "PictureDetelecineCustom", "custom", False, True),
     DepEntry("PictureWidthEnable", "PictureWidth", "1", False, False),
     DepEntry("PictureHeightEnable", "PictureHeight", "1", False, False),
index b105c7221b35295b48ae30043e490dfa71ed47e6..33757b992840106b492d7e6521e7517124cd42bc 100644 (file)
@@ -273,8 +273,6 @@ ghb_preset_to_settings(GhbValue *settings, GhbValue *preset)
     ghb_dict_copy(settings, preset);
 
     // Fix up all the internal settings that are derived from preset values.
-    ghb_dict_set_bool(settings, "PictureDeinterlaceDecomb",
-        !ghb_dict_get_bool(settings, "PictureDecombDeinterlace"));
 
     int width, height;
     width = ghb_dict_get_int(settings, "PictureWidth");
@@ -495,6 +493,8 @@ static const char *widget_priority_list[] =
     "VideoEncoder",
     "VideoQualityGranularity",
     "AudioEncoder",
+    "PictureDeinterlaceFilter",
+    "PictureDeinterlacePreset",
     NULL
 };
 
index 61ed78a16f728d41b2cc4ae9b05ea302c3a2ddb6..d99784070999b89de45a194039a5755213246fce 100644 (file)
@@ -293,31 +293,21 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
 
     // Next line in the display (Filter settings)
     // Filters: - Deinterlace
-    gint deblock, denoise;
-    gboolean decomb, deint, detel;
-    const gchar *decomb_opt, *deint_opt;
-    const gchar *decomb_preset, *deint_preset, *detel_preset;
-    const gchar *denoise_preset, *denoise_tune;
-    const gchar *detel_cust, *deint_cust, *decomb_cust, *denoise_cust;
-    gchar *denoise_opt;
-    gboolean decomb_deint;
-    gboolean grayscale;
-    gboolean filters;
-
-    decomb_deint = ghb_dict_get_bool(settings, "PictureDecombDeinterlace");
-    decomb_preset = ghb_dict_get_string(settings, "PictureDecomb");
-    decomb = decomb_preset != NULL && !!strcasecmp(decomb_preset, "off") &&
-             decomb_deint;
-    decomb_opt = ghb_lookup_filter_name(HB_FILTER_DECOMB,
-                    ghb_dict_get_string(settings, "PictureDecomb"), 1);
-    decomb_cust = ghb_dict_get_string(settings, "PictureDecombCustom");
-
-    deint_preset = ghb_dict_get_string(settings, "PictureDeinterlace");
-    deint = deint_preset != NULL && !!strcasecmp(deint_preset, "off") &&
-             !decomb_deint;
-    deint_opt = ghb_lookup_filter_name(HB_FILTER_DEINTERLACE,
-                    ghb_dict_get_string(settings, "PictureDeinterlace"), 1);
-    deint_cust = ghb_dict_get_string(settings, "PictureDeinterlaceCustom");
+    gint deblock, denoise, deint;
+    const gchar *deint_preset, *detel_preset, *denoise_preset;
+    const gchar *denoise_tune;
+    const gchar *deint_cust, *detel_cust, *denoise_cust;
+    gchar *deint_opt, *denoise_opt;
+    gboolean grayscale, detel, filters;
+
+    deint = ghb_settings_combo_int(settings, "PictureDeinterlaceFilter");
+    deint_opt = ghb_settings_combo_option(settings, "PictureDeinterlaceFilter");
+    if (deint != HB_FILTER_INVALID)
+    {
+        deint_preset = ghb_lookup_filter_name(deint,
+                ghb_dict_get_string(settings, "PictureDeinterlacePreset"), 1);
+        deint_cust = ghb_dict_get_string(settings, "PictureDeinterlaceCustom");
+    }
 
     detel_preset = ghb_dict_get_string(settings, "PictureDetelecine");
     detel = detel_preset != NULL && !!strcasecmp(detel_preset, "off");
@@ -333,14 +323,15 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
                     ghb_dict_get_string(settings, "PictureDenoisePreset"), 1);
         denoise_tune = ghb_lookup_filter_name(denoise,
                     ghb_dict_get_string(settings, "PictureDenoiseTune"), 0);
-
         denoise_cust = ghb_dict_get_string(settings, "PictureDenoiseCustom");
     }
 
     grayscale = ghb_dict_get_bool(settings, "VideoGrayScale");
 
-    filters = detel || decomb || deint || grayscale ||
-              denoise != HB_FILTER_INVALID || (deblock >= 5);
+    filters = detel || grayscale ||
+              deint   != HB_FILTER_INVALID ||
+              denoise != HB_FILTER_INVALID ||
+              (deblock >= 5);
     if (filters)
     {
         const char *prefix = " ";
@@ -354,35 +345,24 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
             }
             prefix = " - ";
         }
-        if (decomb)
+        if (deint != HB_FILTER_INVALID)
         {
-            XPRINT(_("%sDecomb"), prefix);
-            if (!strcasecmp(decomb_preset, "custom"))
-            {
-                XPRINT(": %s", decomb_cust);
-            }
-            else
-            {
-                XPRINT(": %s", decomb_opt);
-            }
-            prefix = " - ";
-        }
-        if (deint)
-        {
-            XPRINT(_("%sDeinterlace"), prefix);
-            if (!strcasecmp(deint_preset, "custom"))
+            XPRINT(_("%s%s:"), prefix, deint_opt);
+            const char *preset;
+            preset = ghb_dict_get_string(settings, "PictureDeinterlacePreset");
+            if (!strcasecmp(preset, "custom"))
             {
                 XPRINT(": %s", deint_cust);
             }
             else
             {
-                XPRINT(": %s", deint_opt);
+                XPRINT(" %s", deint_preset);
             }
             prefix = " - ";
         }
         if (denoise != HB_FILTER_INVALID)
         {
-            XPRINT(_("%sDenoise Filter %s:"), prefix, denoise_opt);
+            XPRINT(_("%sDenoise %s:"), prefix, denoise_opt);
             const char *preset;
             preset = ghb_dict_get_string(settings, "PictureDenoisePreset");
             if (preset && !strcasecmp(preset, "custom"))
@@ -414,6 +394,7 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter
         }
         XPRINT("</small>\n");
     }
+    free(deint_opt);
     free(denoise_opt);
 
     // Next line in the display (Video Encoder)
index 2ad9f34ec5a5f1b24350b21292ea949911fd0491..99ab89662ddf36945de1e888b1a4a9c8fcd12633 100644 (file)
@@ -32,11 +32,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -92,11 +90,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -152,11 +148,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -212,11 +206,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -280,11 +272,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -348,11 +338,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -416,11 +404,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"fast\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"decomb\", \n"
+"                    \"PictureDeinterlacePreset\": \"fast\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -476,11 +462,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -536,11 +520,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -596,11 +578,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -663,11 +643,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"off\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"off\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -731,11 +709,9 @@ const char hb_builtin_presets_json[] =
 "                    \"PictureAutoCrop\": true, \n"
 "                    \"PictureBottomCrop\": 0, \n"
 "                    \"PictureDeblock\": 0, \n"
-"                    \"PictureDecomb\": \"default\", \n"
-"                    \"PictureDecombCustom\": \"\", \n"
-"                    \"PictureDecombDeinterlace\": true, \n"
-"                    \"PictureDeinterlace\": \"off\", \n"
 "                    \"PictureDeinterlaceCustom\": \"\", \n"
+"                    \"PictureDeinterlaceFilter\": \"decomb\", \n"
+"                    \"PictureDeinterlacePreset\": \"default\", \n"
 "                    \"PictureDenoiseCustom\": \"\", \n"
 "                    \"PictureDenoiseFilter\": \"off\", \n"
 "                    \"PictureDetelecine\": \"off\", \n"
@@ -821,11 +797,9 @@ const char hb_builtin_presets_json[] =
 "            \"PictureBottomCrop\": 0, \n"
 "            \"PictureDARWidth\": 0, \n"
 "            \"PictureDeblock\": 0, \n"
-"            \"PictureDecomb\": \"off\", \n"
-"            \"PictureDecombCustom\": \"\", \n"
-"            \"PictureDecombDeinterlace\": true, \n"
-"            \"PictureDeinterlace\": \"off\", \n"
 "            \"PictureDeinterlaceCustom\": \"\", \n"
+"            \"PictureDeinterlaceFilter\": \"off\", \n"
+"            \"PictureDeinterlacePreset\": \"default\", \n"
 "            \"PictureDenoiseCustom\": \"\", \n"
 "            \"PictureDenoiseFilter\": \"off\", \n"
 "            \"PictureDenoisePreset\": \"medium\", \n"
@@ -882,7 +856,7 @@ const char hb_builtin_presets_json[] =
 "            \"x264Option\": \"\", \n"
 "            \"x264UseAdvancedOptions\": false\n"
 "        }, \n"
-"        \"VersionMajor\": 10, \n"
+"        \"VersionMajor\": 11, \n"
 "        \"VersionMicro\": 0, \n"
 "        \"VersionMinor\": 0\n"
 "    }\n"
index 3742b1d4085a66b4d9a04cd9f34000546a33665c..cc972f0f2e177b62f4b89df0e9c30438e3fb401e 100644 (file)
@@ -1,6 +1,6 @@
 <resources>
     <section name="PresetTemplate">
-        <integer name="VersionMajor" value="10" />
+        <integer name="VersionMajor" value="11" />
         <integer name="VersionMinor" value="0" />
         <integer name="VersionMicro" value="0" />
         <json name="Preset" file="preset_template.json" />
index 494badf397054b151fcd16a37f715edc552b06ec..723943ba8a9f70b68c07c574039a92ff5862d5f7 100644 (file)
@@ -57,7 +57,6 @@ static hb_filter_param_t detelecine_presets[] =
 
 static hb_filter_param_t decomb_presets[] =
 {
-    { 0, "Off",         "off",        hb_filter_off     },
     { 1, "Custom",      "custom",     NULL              },
     { 2, "Default",     "default",    ""                },
     { 3, "Fast",        "fast",       "7:2:6:9:1:80"    },
@@ -67,7 +66,6 @@ static hb_filter_param_t decomb_presets[] =
 
 static hb_filter_param_t deinterlace_presets[] =
 {
-    { 0, "Off",         "off",        hb_filter_off     },
     { 1, "Custom",      "custom",     NULL              },
     { 2, "Fast",        "fast",       "0:-1:-1:0:1"     },
     { 3, "Slow",        "slow",       "1:-1:-1:0:1"     },
index b7074feb03770ab3f4e8b1482e2b6f29abd6a7f7..e733a175a38d14df7bb00b5fcacd7185074ab87f 100644 (file)
@@ -1113,69 +1113,41 @@ int hb_preset_apply_filters(const hb_dict_t *preset, hb_dict_t *job_dict)
     }
 
     // Decomb or deinterlace filters
-    int decomb_or_deint;
-    decomb_or_deint = hb_value_get_bool(hb_dict_get(preset,
-                                                   "PictureDecombDeinterlace"));
-    hb_value_t *decomb_val = hb_dict_get(preset, "PictureDecomb");
-    if (decomb_or_deint && decomb_val != NULL)
+    const char *deint_filter, *deint_preset, *deint_custom;
+    deint_filter = hb_value_get_string(hb_dict_get(preset,
+                                                   "PictureDeinterlaceFilter"));
+    deint_preset = hb_value_get_string(hb_dict_get(preset,
+                                                   "PictureDeinterlacePreset"));
+    deint_custom = hb_value_get_string(hb_dict_get(preset,
+                                                   "PictureDeinterlaceCustom"));
+    if (deint_filter != NULL && deint_preset != NULL &&
+        strcasecmp(deint_filter, "off"))
     {
-        const char *custom;
-        custom = hb_value_get_string(hb_dict_get(preset,
-                                                "PictureDecombCustom"));
-        if (hb_value_type(decomb_val) == HB_VALUE_TYPE_STRING)
+        int filter_id;
+        if (!strcasecmp(deint_filter, "decomb"))
         {
-            filter_str = hb_generate_filter_settings(
-                HB_FILTER_DECOMB, hb_value_get_string(decomb_val), custom);
-        }
-        else
-        {
-            filter_str = hb_generate_filter_settings_by_index(
-                HB_FILTER_DECOMB, hb_value_get_int(decomb_val), custom);
+            filter_id = HB_FILTER_DECOMB;
         }
-        if (filter_str == NULL)
+        else if (!strcasecmp(deint_filter, "deinterlace"))
         {
-            char *s = hb_value_get_string_xform(decomb_val);
-            hb_error("Invalid decomb filter settings (%s)", s);
-            free(s);
-            return -1;
-        }
-        else if (filter_str != hb_filter_off)
-        {
-            filter_dict = hb_dict_init();
-            hb_dict_set(filter_dict, "ID", hb_value_int(HB_FILTER_DECOMB));
-            hb_dict_set(filter_dict, "Settings", hb_value_string(filter_str));
-            hb_value_array_append(filter_list, filter_dict);
-            free(filter_str);
-        }
-    }
-
-    hb_value_t *deint_val = hb_dict_get(preset, "PictureDeinterlace");
-    if (!decomb_or_deint && deint_val != NULL)
-    {
-        const char *custom;
-        custom = hb_value_get_string(hb_dict_get(preset,
-                                                "PictureDeinterlaceCustom"));
-        if (hb_value_type(deint_val) == HB_VALUE_TYPE_STRING)
-        {
-            filter_str = hb_generate_filter_settings(
-                HB_FILTER_DEINTERLACE, hb_value_get_string(deint_val), custom);
+            filter_id = HB_FILTER_DEINTERLACE;
         }
         else
         {
-            filter_str = hb_generate_filter_settings_by_index(
-                HB_FILTER_DEINTERLACE, hb_value_get_int(deint_val), custom);
+            hb_error("Invalid deinterlace filter (%s)", deint_filter);
+            return -1;
         }
+        filter_str = hb_generate_filter_settings(
+                        filter_id, deint_preset, deint_custom);
         if (filter_str == NULL)
         {
-            char *s = hb_value_get_string_xform(deint_val);
-            hb_error("Invalid deinterlace filter settings (%s)", s);
-            free(s);
+            hb_error("Invalid deinterlace filter preset (%s)", deint_preset);
             return -1;
         }
         else if (filter_str != hb_filter_off)
         {
             filter_dict = hb_dict_init();
-            hb_dict_set(filter_dict, "ID", hb_value_int(HB_FILTER_DEINTERLACE));
+            hb_dict_set(filter_dict, "ID", hb_value_int(filter_id));
             hb_dict_set(filter_dict, "Settings", hb_value_string(filter_str));
             hb_value_array_append(filter_list, filter_dict);
             free(filter_str);
@@ -1961,6 +1933,41 @@ void hb_presets_clean(hb_value_t *preset)
     presets_clean(preset, hb_preset_template);
 }
 
+static void import_deint_10_0_0(hb_value_t *preset)
+{
+    hb_value_t *val = hb_dict_get(preset, "PictureDecombDeinterlace");
+    if (val != NULL)
+    {
+        int decomb_or_deint = hb_value_get_bool(val);
+        const char * deint_preset;
+        if (decomb_or_deint)
+        {
+            deint_preset = hb_value_get_string(
+                                hb_dict_get(preset, "PictureDecomb"));
+        }
+        else
+        {
+            deint_preset = hb_value_get_string(
+                                hb_dict_get(preset, "PictureDeinterlace"));
+        }
+        if (deint_preset != NULL && strcasecmp(deint_preset, "off"))
+        {
+            hb_dict_set(preset, "PictureDeinterlaceFilter",
+                        decomb_or_deint ? hb_value_string("decomb")
+                                        : hb_value_string("deinterlace"));
+            hb_dict_set(preset, "PictureDeinterlacePreset",
+                        hb_value_string(deint_preset));
+        }
+        else
+        {
+            hb_dict_set(preset, "PictureDeinterlaceFilter",
+                        hb_value_string("off"));
+            hb_dict_set(preset, "PictureDeinterlacePreset",
+                        hb_value_string("default"));
+        }
+    }
+}
+
 static const char* import_indexed_filter(int filter_id, int index)
 {
     hb_filter_param_t *filter_presets;
@@ -1975,7 +1982,7 @@ static const char* import_indexed_filter(int filter_id, int index)
     return filter_presets[ii].short_name;
 }
 
-static void import_decomb(hb_value_t *preset)
+static void import_deint_0_0_0(hb_value_t *preset)
 {
     hb_value_t *val = hb_dict_get(preset, "PictureDecomb");
     if (hb_value_is_number(val))
@@ -1993,11 +2000,8 @@ static void import_decomb(hb_value_t *preset)
             hb_dict_set(preset, "PictureDecomb", hb_value_string("off"));
         }
     }
-}
 
-static void import_deint(hb_value_t *preset)
-{
-    hb_value_t *val = hb_dict_get(preset, "PictureDeinterlace");
+    val = hb_dict_get(preset, "PictureDeinterlace");
     if (hb_value_is_number(val))
     {
         const char *s;
@@ -2013,9 +2017,10 @@ static void import_deint(hb_value_t *preset)
             hb_dict_set(preset, "PictureDeinterlace", hb_value_string("off"));
         }
     }
+    import_deint_10_0_0(preset);
 }
 
-static void import_detel(hb_value_t *preset)
+static void import_detel_0_0_0(hb_value_t *preset)
 {
     hb_value_t *val = hb_dict_get(preset, "PictureDetelecine");
     if (hb_value_is_number(val))
@@ -2035,7 +2040,7 @@ static void import_detel(hb_value_t *preset)
     }
 }
 
-static void import_denoise(hb_value_t *preset)
+static void import_denoise_0_0_0(hb_value_t *preset)
 {
     hb_value_t *val = hb_dict_get(preset, "PictureDenoise");
     if (hb_value_is_number(val))
@@ -2058,7 +2063,7 @@ static void import_denoise(hb_value_t *preset)
     }
 }
 
-static void import_pic(hb_value_t *preset)
+static void import_pic_0_0_0(hb_value_t *preset)
 {
     if (hb_value_get_bool(hb_dict_get(preset, "UsesMaxPictureSettings")))
     {
@@ -2091,7 +2096,7 @@ static void import_pic(hb_value_t *preset)
     }
 }
 
-static void import_audio(hb_value_t *preset)
+static void import_audio_0_0_0(hb_value_t *preset)
 {
     hb_value_t *copy = hb_dict_get(preset, "AudioCopyMask");
     if (copy != NULL)
@@ -2117,7 +2122,7 @@ static void import_audio(hb_value_t *preset)
         hb_value_array_append(copy, hb_value_string("copy:truehd"));
 }
 
-static void import_video(hb_value_t *preset)
+static void import_video_0_0_0(hb_value_t *preset)
 {
     hb_value_t *val;
 
@@ -2184,6 +2189,21 @@ static void import_video(hb_value_t *preset)
     }
 }
 
+static void import_0_0_0(hb_value_t *preset)
+{
+    import_video_0_0_0(preset);
+    import_pic_0_0_0(preset);
+    import_audio_0_0_0(preset);
+    import_deint_0_0_0(preset);
+    import_detel_0_0_0(preset);
+    import_denoise_0_0_0(preset);
+}
+
+static void import_10_0_0(hb_value_t *preset)
+{
+    import_deint_10_0_0(preset);
+}
+
 static void preset_import(hb_value_t *preset, int major, int minor, int micro)
 {
     if (!hb_value_get_bool(hb_dict_get(preset, "Folder")))
@@ -2191,13 +2211,11 @@ static void preset_import(hb_value_t *preset, int major, int minor, int micro)
         if (major == 0 && minor == 0 && micro == 0)
         {
             // Convert legacy presets (before versioning introduced)
-            import_video(preset);
-            import_pic(preset);
-            import_audio(preset);
-            import_decomb(preset);
-            import_deint(preset);
-            import_detel(preset);
-            import_denoise(preset);
+            import_0_0_0(preset);
+        }
+        else if (major == 10 && minor == 0 && micro == 0)
+        {
+            import_10_0_0(preset);
         }
         preset_clean(preset, hb_preset_template);
     }
index cc16e0f89e61309103b4f2f9ef8ab4eba8778833..16cc2bdaac56b484a07176526725b6dc89b040f1 100644 (file)
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "fast",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "decomb",
+                    "PictureDeinterlacePreset": "fast",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "off",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "off",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
                     "PictureAutoCrop": true,
                     "PictureBottomCrop": 0,
                     "PictureDeblock": 0,
-                    "PictureDecomb": "default",
-                    "PictureDecombCustom": "",
-                    "PictureDecombDeinterlace": true,
-                    "PictureDeinterlace": "off",
                     "PictureDeinterlaceCustom": "",
+                    "PictureDeinterlaceFilter": "decomb",
+                    "PictureDeinterlacePreset": "default",
                     "PictureDenoiseCustom": "",
                     "PictureDenoiseFilter": "off",
                     "PictureDetelecine": "off",
index e371a8ebce9308bd85a083693582b78d0c68c04a..8787c19cad4fd570a54a830d4f15b4676a759160 100644 (file)
         "PictureTopCrop": 0,
         "PictureDARWidth": 0,
         "PictureDeblock": 0,
-        "PictureDecomb": "off",
-        "PictureDecombCustom": "",
-        "PictureDecombDeinterlace": true,
-        "PictureDeinterlace": "off",
         "PictureDeinterlaceCustom": "",
+        "PictureDeinterlaceFilter": "off",
+        "PictureDeinterlacePreset": "default",
         "PictureDenoiseCustom": "",
         "PictureDenoiseFilter": "off",
         "PictureDenoisePreset": "medium",
index 27690cfc1cc7b162b8d21223cee92547649899fb..789b5aae0c719fb5d46a3cc0f48a69357c43a07a 100644 (file)
@@ -3429,41 +3429,42 @@ static hb_dict_t * PreparePreset(const char *preset_name)
     {
         hb_dict_set(preset, "VideoGrayScale", hb_value_bool(grayscale));
     }
-    if (deinterlace_disable)
+    if (decomb_disable || deinterlace_disable)
     {
-        hb_dict_set(preset, "PictureDeinterlace", hb_value_string("off"));
+        hb_dict_set(preset, "PictureDeinterlaceFilter", hb_value_string("off"));
     }
     if (deinterlace != NULL)
     {
-        hb_dict_set(preset, "PictureDecombDeinterlace", hb_value_int(0));
+        hb_dict_set(preset, "PictureDeinterlaceFilter",
+                    hb_value_string("deinterlace"));
         if (!deinterlace_custom)
         {
-            hb_dict_set(preset, "PictureDeinterlace",
+            hb_dict_set(preset, "PictureDeinterlacePreset",
                         hb_value_string(deinterlace));
         }
         else
         {
-            hb_dict_set(preset, "PictureDeinterlace",
+            hb_dict_set(preset, "PictureDeinterlacePreset",
                         hb_value_string("custom"));
             hb_dict_set(preset, "PictureDeinterlaceCustom",
                         hb_value_string(deinterlace));
         }
     }
-    if (decomb_disable)
-    {
-        hb_dict_set(preset, "PictureDecomb", hb_value_string("off"));
-    }
     if (decomb != NULL)
     {
-        hb_dict_set(preset, "PictureDecombDeinterlace", hb_value_int(1));
+        hb_dict_set(preset, "PictureDeinterlaceFilter",
+                    hb_value_string("decomb"));
         if (!decomb_custom)
         {
-            hb_dict_set(preset, "PictureDecomb", hb_value_string(decomb));
+            hb_dict_set(preset, "PictureDeinterlacePreset",
+                        hb_value_string(decomb));
         }
         else
         {
-            hb_dict_set(preset, "PictureDecomb", hb_value_string("custom"));
-            hb_dict_set(preset, "PictureDecombCustom", hb_value_string(decomb));
+            hb_dict_set(preset, "PictureDeinterlacePreset",
+                        hb_value_string("custom"));
+            hb_dict_set(preset, "PictureDeinterlaceCustom",
+                        hb_value_string(decomb));
         }
     }
     if (detelecine_disable)