summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-07-21 15:01:13 +0000
committerjstebbins <[email protected]>2014-07-21 15:01:13 +0000
commit0b297972d7bdd4448f29db4e06a1d68af74bfab9 (patch)
tree332d13f3b4ff89da18d996dc03a26d17ca18b90a /gtk
parent8eba50b3ff98e419cad4cc1753877292c82b21dd (diff)
LinGui/CLI/libhb: add nlmeans denoise filter to lingui
Move nlmeans preset&tune parsing from cli to libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6239 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/ghb.ui275
-rw-r--r--gtk/src/hb-backend.c92
-rw-r--r--gtk/src/internal_defaults.xml6
-rw-r--r--gtk/src/makedeps.py9
-rw-r--r--gtk/src/presets.c9
-rw-r--r--gtk/src/queuehandler.c23
-rw-r--r--gtk/src/standard_presets.xml48
7 files changed, 288 insertions, 174 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index ca0284495..e4089c5b6 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -1619,9 +1619,9 @@ This allows a player to initiate playback before downloading the entire file.</p
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -2941,11 +2941,10 @@ This allows a player to initiate playback before downloading the entire file.</p
<property name="can_focus">False</property>
<property name="spacing">16</property>
<child>
- <object class="GtkBox" id="vbox8">
- <property name="orientation">vertical</property>
+ <object class="GtkGrid" id="table90">
<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="column_spacing">5</property>
<child>
<object class="GtkCheckButton" id="VideoGrayScale">
<property name="label" translatable="yes">Grayscale</property>
@@ -2959,108 +2958,43 @@ This allows a player to initiate playback before downloading the entire file.</p
<signal name="toggled" handler="setting_widget_changed_cb" swapped="no"/>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="top_attach">0</property>
+ <property name="left_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkGrid" id="table90">
+ <object class="GtkLabel" id="label41">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="column_spacing">5</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label41">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Deblock:</property>
- </object>
- <packing>
- <property name="top_attach">0</property>
- <property name="left_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScale" id="PictureDeblock">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">The deblocking filter removes a common type of compression artifact.
- If your source exhibits 'blockiness', this filter may help clean it up.</property>
- <property name="adjustment">adjustment20</property>
- <property name="digits">0</property>
- <property name="value_pos">right</property>
- <signal name="format-value" handler="format_deblock_cb" swapped="no"/>
- <signal name="value-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="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Denoise:</property>
- </object>
- <packing>
- <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="PictureDenoise">
- <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 denoise filter is a low pass filter that removes noise.
- Film grain and other types of high frequency noise are difficult to compress.
- Using this filter on such sources can result in smaller file sizes.</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="GtkEntry" id="PictureDenoiseCustom">
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Custom denoise filter string format
-
- 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">2</property>
- <property name="left_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Deblock:</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</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="GtkScale" id="PictureDeblock">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">The deblocking filter removes a common type of compression artifact.
+ If your source exhibits 'blockiness', this filter may help clean it up.</property>
+ <property name="adjustment">adjustment20</property>
+ <property name="digits">0</property>
+ <property name="value_pos">right</property>
+ <signal name="format-value" handler="format_deblock_cb" swapped="no"/>
+ <signal name="value-changed" handler="setting_widget_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
@@ -3072,6 +3006,136 @@ This allows a player to initiate playback before downloading the entire file.</p
</packing>
</child>
<child>
+ <object class="GtkGrid" id="table1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Denoise Filter:</property>
+ </object>
+ <packing>
+ <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="PictureDenoiseFilter">
+ <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 denoise filter is a low pass filter that removes noise.
+ Film grain and other types of high frequency noise are difficult to compress.
+ Using this filter on such sources can result in smaller file sizes.</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="GtkLabel" id="PictureDenoisePresetLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Denoise Preset:</property>
+ </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="GtkComboBox" id="PictureDenoisePreset">
+ <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 denoise filter is a low pass filter that removes noise.
+ Film grain and other types of high frequency noise are difficult to compress.
+ Using this filter on such sources can result in smaller file sizes.</property>
+ <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <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="GtkLabel" id="PictureDenoiseTuneLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Denoise Tune:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="left_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="PictureDenoiseTune">
+ <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 denoise filter is a low pass filter that removes noise.
+ Film grain and other types of high frequency noise are difficult to compress.
+ Using this filter on such sources can result in smaller file sizes.</property>
+ <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="PictureDenoiseCustom">
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Custom denoise filter string format
+
+ 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">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">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkGrid" id="table10">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -3284,7 +3348,7 @@ This allows a player to initiate playback before downloading the entire file.</p
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -6588,6 +6652,11 @@ This allows a player to initiate playback before downloading the entire file.</p
</packing>
</child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
</child>
<child>
<object class="GtkAlignment" id="alignment66">
@@ -6638,7 +6707,7 @@ This allows a player to initiate playback before downloading the entire file.</p
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -6660,7 +6729,7 @@ This allows a player to initiate playback before downloading the entire file.</p
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 781bba223..dc6359445 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -222,11 +222,9 @@ combo_opts_t deint_opts =
static options_map_t d_denoise_opts[] =
{
- {N_("Off"), "off", 0, ""},
- {N_("Custom"), "custom", 1, ""},
- {N_("Weak"), "weak", 2, "2:1:1:2:3:3"},
- {N_("Medium"), "medium", 3, "3:2:2:2:3:3"},
- {N_("Strong"), "strong", 4, "7:7:7:5:5:5"},
+ {N_("Off"), "off", 0, ""},
+ {N_("NLMeans"), "nlmeans", 1, ""},
+ {N_("HQDN3D"), "hqdn3d", 2, ""},
};
combo_opts_t denoise_opts =
{
@@ -234,6 +232,34 @@ combo_opts_t denoise_opts =
d_denoise_opts
};
+static options_map_t d_denoise_preset_opts[] =
+{
+ {N_("Custom"), "custom", 1, ""},
+ {N_("Ultralight"), "ultralight", 5, ""},
+ {N_("Light"), "light", 2, ""},
+ {N_("Medium"), "medium", 3, ""},
+ {N_("Strong"), "strong", 4, ""},
+};
+combo_opts_t denoise_preset_opts =
+{
+ sizeof(d_denoise_preset_opts)/sizeof(options_map_t),
+ d_denoise_preset_opts
+};
+
+static options_map_t d_nlmeans_tune_opts[] =
+{
+ {N_("None"), "none", 0, ""},
+ {N_("Film"), "film", 1, ""},
+ {N_("Grain"), "grain", 2, ""},
+ {N_("High Motion"), "highmotion", 3, ""},
+ {N_("Animation"), "animation", 4, ""},
+};
+combo_opts_t nlmeans_tune_opts =
+{
+ sizeof(d_nlmeans_tune_opts)/sizeof(options_map_t),
+ d_nlmeans_tune_opts
+};
+
static options_map_t d_direct_opts[] =
{
{N_("None"), "none", 0, "none"},
@@ -365,7 +391,9 @@ combo_name_map_t combo_name_map[] =
{"PictureDeinterlace", &deint_opts},
{"PictureDecomb", &decomb_opts},
{"PictureDetelecine", &detel_opts},
- {"PictureDenoise", &denoise_opts},
+ {"PictureDenoiseFilter", &denoise_opts},
+ {"PictureDenoisePreset", &denoise_preset_opts},
+ {"PictureDenoiseTune", &nlmeans_tune_opts},
{"x264_direct", &direct_opts},
{"x264_b_adapt", &badapt_opts},
{"x264_bpyramid", &bpyramid_opts},
@@ -2526,7 +2554,9 @@ ghb_update_ui_combo_box(
small_opts_set(ud->builder, "PictureDeinterlace", &deint_opts);
small_opts_set(ud->builder, "PictureDetelecine", &detel_opts);
small_opts_set(ud->builder, "PictureDecomb", &decomb_opts);
- small_opts_set(ud->builder, "PictureDenoise", &denoise_opts);
+ small_opts_set(ud->builder, "PictureDenoiseFilter", &denoise_opts);
+ small_opts_set(ud->builder, "PictureDenoisePreset", &denoise_preset_opts);
+ small_opts_set(ud->builder, "PictureDenoiseTune", &nlmeans_tune_opts);
small_opts_set(ud->builder, "x264_direct", &direct_opts);
small_opts_set(ud->builder, "x264_b_adapt", &badapt_opts);
small_opts_set(ud->builder, "x264_bpyramid", &bpyramid_opts);
@@ -3874,23 +3904,8 @@ ghb_validate_filters(GValue *settings)
}
g_free(str);
}
- // denois
- index = ghb_settings_combo_int(settings, "PictureDenoise");
- if (index == 1)
- {
- str = ghb_settings_get_string(settings, "PictureDenoiseCustom");
- if (!ghb_validate_filter_string(str, -1))
- {
- message = g_strdup_printf(
- _("Invalid Denoise Settings:\n\n%s\n"),
- str);
- ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
- g_free(str);
- g_free(message);
- return FALSE;
- }
- g_free(str);
- }
+ // denoise
+ // TODO
return TRUE;
}
@@ -4403,20 +4418,29 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, int titleindex)
hb_add_filter( job, filter, filter_str );
g_free(filter_str);
}
- gint denoise = ghb_settings_combo_int(js, "PictureDenoise");
- if( denoise )
+ if (strcmp(ghb_settings_get_const_string(js, "PictureDenoiseFilter"), "off"))
{
- filter_str = NULL;
- if (denoise != 1)
+ int filter_id = HB_FILTER_HQDN3D;
+ if (!strcmp(ghb_settings_get_const_string(js, "PictureDenoiseFilter"), "nlmeans"))
+ filter_id = HB_FILTER_NLMEANS;
+
+ if (!strcmp(ghb_settings_get_const_string(js, "PictureDenoisePreset"), "custom"))
{
- if (denoise_opts.map[denoise].svalue != NULL)
- filter_str = g_strdup(denoise_opts.map[denoise].svalue);
+ const char *filter_str;
+ filter_str = ghb_settings_get_const_string(js, "PictureDenoiseCustom");
+ filter = hb_filter_init(filter_id);
+ hb_add_filter( job, filter, filter_str );
}
else
- filter_str = ghb_settings_get_string(js, "PictureDenoiseCustom");
- filter = hb_filter_init(HB_FILTER_DENOISE);
- hb_add_filter( job, filter, filter_str );
- g_free(filter_str);
+ {
+ const char *preset, *tune;
+ preset = ghb_settings_get_const_string(js, "PictureDenoisePreset");
+ tune = ghb_settings_get_const_string(js, "PictureDenoiseTune");
+ filter_str = hb_generate_filter_settings(filter_id, preset, tune);
+ filter = hb_filter_init(filter_id);
+ hb_add_filter( job, filter, filter_str );
+ g_free(filter_str);
+ }
}
gint deblock = ghb_settings_get_int(js, "PictureDeblock");
if( deblock >= 5 )
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
index a7d0a05d5..6cf0feb83 100644
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -248,8 +248,12 @@
<string>off</string>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
+ <key>PictureDenoiseFilter</key>
<string>off</string>
+ <key>PictureDenoisePreset</key>
+ <string>medium</string>
+ <key>PictureDenoiseTune</key>
+ <string>none</string>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index d0b4ac2ce..c4944d786 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -35,7 +35,14 @@ dep_map = (
DepEntry("PictureDecombDeinterlace", "PictureDecombCustom", "FALSE", True, True),
DepEntry("PictureDecombDeinterlace", "PictureDecombLabel", "FALSE", True, True),
DepEntry("PictureDeinterlace", "PictureDeinterlaceCustom", "custom", False, True),
- DepEntry("PictureDenoise", "PictureDenoiseCustom", "custom", False, True),
+ DepEntry("PictureDenoiseFilter", "PictureDenoisePreset", "off", True, True),
+ DepEntry("PictureDenoiseFilter", "PictureDenoisePresetLabel", "off", True, True),
+ DepEntry("PictureDenoiseFilter", "PictureDenoiseTune", "nlmeans", False, True),
+ DepEntry("PictureDenoiseFilter", "PictureDenoiseTuneLabel", "nlmeans", False, True),
+ DepEntry("PictureDenoiseFilter", "PictureDenoiseCustom", "off", True, True),
+ 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", "TRUE", False, False),
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 3bf9ee970..f2749e8df 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -1927,9 +1927,10 @@ value_map_t denoise_xlat[] =
{
{"0", "off"},
{"1", "custom"},
- {"2", "weak"},
+ {"2", "light"},
{"3", "medium"},
{"4", "strong"},
+ {"5", "ultralight"},
{NULL, NULL}
};
@@ -2178,11 +2179,13 @@ export_value_xlat(GValue *dict)
gval = export_value_xlat2(deint_xlat, lin_val, G_TYPE_INT);
if (gval)
ghb_dict_insert(dict, g_strdup(key), gval);
- key = "PictureDenoise";
+#if 0
+ key = "PictureDenoisePreset";
lin_val = ghb_dict_lookup(dict, key);
gval = export_value_xlat2(denoise_xlat, lin_val, G_TYPE_INT);
if (gval)
ghb_dict_insert(dict, g_strdup(key), gval);
+#endif
gint count, ii;
GValue *alist;
@@ -2429,7 +2432,7 @@ import_value_xlat(GValue *dict)
gval = import_value_xlat2(defaults, deint_xlat, key, mac_val);
if (gval)
ghb_dict_insert(dict, g_strdup(key), gval);
- key = "PictureDenoise";
+ key = "PictureDenoisePreset";
mac_val = ghb_dict_lookup(dict, key);
gval = import_value_xlat2(defaults, denoise_xlat, key, mac_val);
if (gval)
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index 1e5243aa6..6ad412a08 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -308,8 +308,9 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
// Next line in the display (Filter settings)
// Filters: - Deinterlace
gint decomb, detel, deint, deblock, denoise;
- const gchar *detel_cust, *deint_cust, *decomb_cust, *denoise_cust;
- const gchar *deint_opt, *decomb_opt, *denoise_opt;
+ const gchar *detel_cust, *deint_cust, *decomb_cust;
+ const gchar *deint_opt, *decomb_opt;
+ const gchar *denoise_opt, *denoise_preset, *denoise_tune, *denoise_cust;
gboolean decomb_deint;
gboolean grayscale;
gboolean filters;
@@ -327,8 +328,10 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
detel_cust = ghb_settings_get_const_string(settings,
"PictureDetelecineCustom");
deblock = ghb_settings_get_int(settings, "PictureDeblock");
- denoise = ghb_settings_combo_int(settings, "PictureDenoise");
- denoise_opt = ghb_settings_combo_option(settings, "PictureDenoise");
+ denoise = ghb_settings_combo_int(settings, "PictureDenoiseFilter");
+ denoise_opt = ghb_settings_combo_option(settings, "PictureDenoiseFilter");
+ denoise_preset = ghb_settings_combo_option(settings, "PictureDenoisePreset");
+ denoise_tune = ghb_settings_combo_option(settings, "PictureDenoiseTune");
denoise_cust = ghb_settings_get_const_string(settings,
"PictureDenoiseCustom");
grayscale = ghb_settings_get_boolean(settings, "VideoGrayScale");
@@ -376,14 +379,18 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
}
if (denoise)
{
- XPRINT("%sDenoise", prefix);
- if (denoise == 1)
+ XPRINT("%sDenoise Filter %s:", prefix, denoise_opt);
+ if (ghb_settings_combo_int(settings, "PictureDenoisePreset") == 1)
{
- XPRINT(": %s", denoise_cust);
+ XPRINT(" %s", denoise_cust);
}
else
{
- XPRINT(": %s", denoise_opt);
+ XPRINT(" %s", denoise_preset);
+ if (denoise == 1 && strcmp(denoise_tune, "None"))
+ {
+ XPRINT(",%s", denoise_tune);
+ }
}
prefix = " - ";
}
diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml
index 0d15877e3..b438ff3ed 100644
--- a/gtk/src/standard_presets.xml
+++ b/gtk/src/standard_presets.xml
@@ -83,8 +83,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -216,8 +216,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -349,8 +349,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -482,8 +482,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -631,8 +631,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -780,8 +780,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -929,8 +929,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -1062,8 +1062,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -1195,8 +1195,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -1328,8 +1328,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -1476,8 +1476,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>
@@ -1625,8 +1625,8 @@
<integer>0</integer>
<key>PictureDeinterlaceCustom</key>
<string></string>
- <key>PictureDenoise</key>
- <integer>0</integer>
+ <key>PictureDenoiseFilter</key>
+ <integer>off</integer>
<key>PictureDenoiseCustom</key>
<string></string>
<key>PictureDetelecine</key>