diff options
author | jstebbins <[email protected]> | 2009-08-26 16:29:05 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-08-26 16:29:05 +0000 |
commit | 60fae20f233b2c8c4a0576fe46f5527e9c66552a (patch) | |
tree | c653ce7cafb878cb1ad9086c0b5b7f489b2ef976 /gtk/src | |
parent | 31f7fbe8dd16aa524a8e3675060423127956a3e9 (diff) |
LinGui: picture filter changes
- change "None" to "Off" for detelecine, decomb, deinterlace, and denoise
- add decomb/deinterlace switch, hide controls that are not active
- update builtin presets to reflect change in order of "Custom" option
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2777 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/ghb.ui | 61 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 32 | ||||
-rw-r--r-- | gtk/src/internal_defaults.xml | 10 | ||||
-rw-r--r-- | gtk/src/presets.c | 8 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 6 | ||||
-rw-r--r-- | gtk/src/standard_presets.xml | 10 | ||||
-rw-r--r-- | gtk/src/widgetdeps.c | 8 |
7 files changed, 93 insertions, 42 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index f20fa4254..00d004ceb 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -5630,7 +5630,7 @@ the required multiple.</property> <child> <object class="GtkTable" id="table10"> <property name="visible">True</property> - <property name="n_rows">6</property> + <property name="n_rows">7</property> <property name="n_columns">2</property> <property name="column_spacing">5</property> @@ -5674,14 +5674,45 @@ the required multiple.</property> </child> <child> - <object class="GtkLabel" id="label56"> + <object class="GtkRadioButton" id="PictureDecombDeinterlace"> + <property name="label" translatable="yes">Decomb</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Decomb:</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="setting_widget_changed_cb"/> + </object> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</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="draw_indicator">True</property> + <property name="group">PictureDecombDeinterlace</property> </object> <packing> <property name="top_attach">2</property> <property name="bottom_attach">3</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="PictureDecombLabel"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Decomb:</property> + </object> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> </packing> </child> <child> @@ -5692,8 +5723,8 @@ the required multiple.</property> <signal name="changed" handler="setting_widget_changed_cb"/> </object> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="left_attach">1</property> <property name="right_attach">2</property> </packing> @@ -5709,22 +5740,22 @@ the required multiple.</property> <signal name="changed" handler="setting_widget_changed_cb"/> </object> <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="left_attach">1</property> <property name="right_attach">2</property> </packing> </child> <child> - <object class="GtkLabel" id="label31"> + <object class="GtkLabel" id="PictureDeinterlaceLabel"> <property name="visible">True</property> <property name="xalign">0</property> <property name="label" translatable="yes">Deinterlace:</property> </object> <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> </packing> </child> <child> @@ -5735,8 +5766,8 @@ the required multiple.</property> <signal name="changed" handler="setting_widget_changed_cb"/> </object> <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="left_attach">1</property> <property name="right_attach">2</property> </packing> @@ -5752,8 +5783,8 @@ the required multiple.</property> <signal name="changed" handler="setting_widget_changed_cb"/> </object> <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="left_attach">1</property> <property name="right_attach">2</property> </packing> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 65f553f47..231903d01 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -173,7 +173,7 @@ combo_opts_t container_opts = static options_map_t d_detel_opts[] = { - {"None", "none", 0, ""}, + {"Off", "off", 0, ""}, {"Custom", "custom", 1, ""}, {"Default","default",2, NULL}, }; @@ -185,7 +185,7 @@ combo_opts_t detel_opts = static options_map_t d_decomb_opts[] = { - {"None", "none", 0, ""}, + {"Off", "off", 0, ""}, {"Custom", "custom", 1, ""}, {"Default","default",2, NULL}, }; @@ -197,7 +197,7 @@ combo_opts_t decomb_opts = static options_map_t d_deint_opts[] = { - {"None", "none", 0, ""}, + {"Off", "off", 0, ""}, {"Custom", "custom", 1, ""}, {"Fast", "fast", 2, "-1:-1:-1:0:1"}, {"Slow", "slow", 3, "2:-1:-1:0:1"}, @@ -211,7 +211,7 @@ combo_opts_t deint_opts = static options_map_t d_denoise_opts[] = { - {"None", "none", 0, ""}, + {"Off", "off", 0, ""}, {"Custom", "custom", 1, ""}, {"Weak", "weak", 2, "2:1:2:3"}, {"Medium", "medium", 3, "3:2:2:3"}, @@ -3382,9 +3382,17 @@ set_preview_job_settings(hb_job_t *job, GValue *settings) job->anamorphic.modulus = 2; } - gint deint = ghb_settings_combo_int(settings, "PictureDeinterlace"); - gint decomb = ghb_settings_combo_int(settings, "PictureDecomb"); - job->deinterlace = (!decomb && deint == 0) ? 0 : 1; + gboolean decomb_deint = ghb_settings_get_boolean(settings, "PictureDecombDeinterlace"); + if (decomb_deint) + { + gint decomb = ghb_settings_combo_int(settings, "PictureDecomb"); + job->deinterlace = (decomb == 0) ? 0 : 1; + } + else + { + gint deint = ghb_settings_combo_int(settings, "PictureDeinterlace"); + job->deinterlace = (deint == 0) ? 0 : 1; + } gboolean keep_aspect; keep_aspect = ghb_settings_get_boolean(settings, "PictureKeepRatio"); @@ -3463,9 +3471,10 @@ ghb_validate_filters(signal_user_data_t *ud) gint index; gchar *message; + gboolean decomb_deint = ghb_settings_get_boolean(ud->settings, "PictureDecombDeinterlace"); // deinte index = ghb_settings_combo_int(ud->settings, "PictureDeinterlace"); - if (index == 1) + if (!decomb_deint && index == 1) { str = ghb_settings_get_string(ud->settings, "PictureDeinterlaceCustom"); if (!ghb_validate_filter_string(str, 4)) @@ -3499,7 +3508,7 @@ ghb_validate_filters(signal_user_data_t *ud) } // decomb index = ghb_settings_combo_int(ud->settings, "PictureDecomb"); - if (index == 1) + if (decomb_deint && index == 1) { str = ghb_settings_get_string(ud->settings, "PictureDecombCustom"); if (!ghb_validate_filter_string(str, 15)) @@ -4016,9 +4025,10 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) job->crop[3] = ghb_settings_get_int(js, "PictureRightCrop"); + gboolean decomb_deint = ghb_settings_get_boolean(js, "PictureDecombDeinterlace"); gint decomb = ghb_settings_combo_int(js, "PictureDecomb"); gint deint = ghb_settings_combo_int(js, "PictureDeinterlace"); - if (!decomb) + if (!decomb_deint) job->deinterlace = (deint != 0) ? 1 : 0; else job->deinterlace = 0; @@ -4064,7 +4074,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) hb_filter_detelecine.settings = detel_str; hb_list_add( job->filters, &hb_filter_detelecine ); } - if ( decomb ) + if ( decomb_deint && decomb ) { if (decomb != 1) { diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml index fe8d9e098..c103b99e3 100644 --- a/gtk/src/internal_defaults.xml +++ b/gtk/src/internal_defaults.xml @@ -219,8 +219,10 @@ <integer>16</integer> <key>PictureDeblock</key> <integer>0</integer> + <key>PictureDecombDeinterlace</key> + <true /> <key>PictureDecomb</key> - <string>none</string> + <string>off</string> <key>PictureDecombCustom</key> <string></string> <key>Default</key> @@ -234,15 +236,15 @@ <key>PictureTopCrop</key> <integer>0</integer> <key>PictureDeinterlace</key> - <string>none</string> + <string>off</string> <key>PictureDeinterlaceCustom</key> <string></string> <key>PictureDenoise</key> - <string>none</string> + <string>off</string> <key>PictureDenoiseCustom</key> <string></string> <key>PictureDetelecine</key> - <string>none</string> + <string>off</string> <key>PictureDetelecineCustom</key> <string></string> <key>PicturePAR</key> diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 43babd138..7d3151906 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1855,7 +1855,7 @@ value_map_t mix_xlat[] = value_map_t deint_xlat[] = { - {"0", "none"}, + {"0", "off"}, {"1", "custom"}, {"2", "fast"}, {"3", "slow"}, @@ -1865,7 +1865,7 @@ value_map_t deint_xlat[] = value_map_t denoise_xlat[] = { - {"0", "none"}, + {"0", "off"}, {"1", "custom"}, {"2", "weak"}, {"3", "medium"}, @@ -1875,7 +1875,7 @@ value_map_t denoise_xlat[] = value_map_t detel_xlat[] = { - {"0", "none"}, + {"0", "off"}, {"1", "custom"}, {"2", "default"}, {NULL, NULL} @@ -1883,7 +1883,7 @@ value_map_t detel_xlat[] = value_map_t decomb_xlat[] = { - {"0", "none"}, + {"0", "off"}, {"1", "custom"}, {"2", "default"}, {NULL, NULL} diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 8aca1f626..8456d2754 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -283,8 +283,10 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) source_width, source_height, width, height, aspect_desc); gint decomb, detel; + gboolean decomb_deint; gboolean filters = FALSE; + decomb_deint = ghb_settings_get_boolean(settings, "PictureDecombDeinterlace"); decomb = ghb_settings_combo_int(settings, "PictureDecomb"); g_string_append_printf(str, "<b>Filters:</b><small>"); detel = ghb_settings_combo_int(settings, "PictureDetelecine"); @@ -300,7 +302,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) } filters = TRUE; } - if (decomb) + if (decomb_deint && decomb) { g_string_append_printf(str, " - Decomb"); if (decomb == 1) @@ -312,7 +314,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) } filters = TRUE; } - else + else if (!decomb_deint) { gint deint = ghb_settings_combo_int(settings, "PictureDeinterlace"); if (deint) diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml index 1f8e8c980..76b5eda0b 100644 --- a/gtk/src/standard_presets.xml +++ b/gtk/src/standard_presets.xml @@ -387,7 +387,7 @@ <key>Folder</key> <true/> <key>PresetBuildNumber</key> - <integer>2009073001</integer> + <integer>2009082501</integer> <key>PresetName</key> <string>Apple</string> <key>Type</key> @@ -528,13 +528,15 @@ <key>PictureDeblock</key> <integer>0</integer> <key>PictureDecomb</key> + <integer>2</integer> + <key>PictureDecombDeinterlace</key> <integer>1</integer> <key>PictureDeinterlace</key> <integer>0</integer> <key>PictureDenoise</key> <integer>0</integer> <key>PictureDetelecine</key> - <integer>1</integer> + <integer>2</integer> <key>PictureHeight</key> <integer>0</integer> <key>PictureKeepRatio</key> @@ -590,7 +592,7 @@ <key>Folder</key> <true/> <key>PresetBuildNumber</key> - <integer>2009073001</integer> + <integer>2009082501</integer> <key>PresetName</key> <string>Regular</string> <key>Type</key> @@ -965,7 +967,7 @@ <key>Folder</key> <true/> <key>PresetBuildNumber</key> - <integer>2009073001</integer> + <integer>2009082501</integer> <key>PresetName</key> <string>Legacy</string> <key>Type</key> diff --git a/gtk/src/widgetdeps.c b/gtk/src/widgetdeps.c index 598b86b4e..4747f69de 100644 --- a/gtk/src/widgetdeps.c +++ b/gtk/src/widgetdeps.c @@ -40,8 +40,12 @@ static dependency_t dep_map[] = {"FileFormat", "Mp4LargeFile", "mp4", FALSE, TRUE}, {"FileFormat", "Mp4HttpOptimize", "mp4", FALSE, TRUE}, {"FileFormat", "Mp4iPodCompatible", "mp4", FALSE, TRUE}, - {"PictureDecomb", "PictureDeinterlace", "none", FALSE, FALSE}, - {"PictureDecomb", "PictureDeinterlaceCustom", "none", FALSE, TRUE}, + {"PictureDecombDeinterlace", "PictureDeinterlace", "TRUE", TRUE, TRUE}, + {"PictureDecombDeinterlace", "PictureDeinterlaceCustom", "TRUE", TRUE, TRUE}, + {"PictureDecombDeinterlace", "PictureDeinterlaceLabel", "TRUE", TRUE, TRUE}, + {"PictureDecombDeinterlace", "PictureDecomb", "FALSE", TRUE, TRUE}, + {"PictureDecombDeinterlace", "PictureDecombCustom", "FALSE", TRUE, TRUE}, + {"PictureDecombDeinterlace", "PictureDecombLabel", "FALSE", TRUE, TRUE}, {"PictureDeinterlace", "PictureDeinterlaceCustom", "custom", FALSE, TRUE}, {"PictureDenoise", "PictureDenoiseCustom", "custom", FALSE, TRUE}, {"PictureDecomb", "PictureDecombCustom", "custom", FALSE, TRUE}, |