X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fpresets.c;h=5cbab837da32558a27e71fd8d27918ff7224bb75;hb=93ca000f2507a31f8374979d7f08609a166d7286;hp=50fd61801d8610c097110021eb1888701d22b22a;hpb=f9341345b37e0738a140423297c222a7e40eddab;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 50fd6180..5cbab837 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -861,21 +861,6 @@ preset_to_ui(signal_user_data_t *ud, GValue *dict) init_settings_from_dict(ud->settings, hidden, dict); init_ui_from_dict(ud, internal, dict); init_ui_from_dict(ud, hidden, dict); - - if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) - { - const GValue *gval; - gval = preset_dict_get_value(dict, "PictureDeinterlace"); - if (gval) - { - ghb_ui_update(ud, "tweak_PictureDeinterlace", gval); - } - gval = preset_dict_get_value(dict, "PictureDenoise"); - if (gval) - { - ghb_ui_update(ud, "tweak_PictureDenoise", gval); - } - } } void @@ -1721,18 +1706,36 @@ value_map_t mix_xlat[] = value_map_t deint_xlat[] = { {"0", "none"}, - {"1", "fast"}, - {"2", "slow"}, - {"3", "slower"}, + {"1", "custom"}, + {"2", "fast"}, + {"3", "slow"}, + {"4", "slower"}, {NULL, NULL} }; value_map_t denoise_xlat[] = { {"0", "none"}, - {"1", "weak"}, - {"2", "medium"}, - {"3", "strong"}, + {"1", "custom"}, + {"2", "weak"}, + {"3", "medium"}, + {"4", "strong"}, + {NULL, NULL} +}; + +value_map_t detel_xlat[] = +{ + {"0", "none"}, + {"1", "custom"}, + {"2", "default"}, + {NULL, NULL} +}; + +value_map_t decomb_xlat[] = +{ + {"0", "none"}, + {"1", "custom"}, + {"2", "default"}, {NULL, NULL} }; @@ -1933,6 +1936,20 @@ export_value_xlat(GValue *dict) gval = export_value_xlat2(framerate_xlat, lin_val, G_TYPE_STRING); if (gval) ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDetelecine"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(detel_xlat, lin_val, G_TYPE_INT); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + else + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val)); + key = "PictureDecomb"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(decomb_xlat, lin_val, G_TYPE_INT); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + else + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val)); key = "PictureDeinterlace"; lin_val = ghb_dict_lookup(dict, key); gval = export_value_xlat2(deint_xlat, lin_val, G_TYPE_INT); @@ -2055,6 +2072,16 @@ import_value_xlat(GValue *dict) gval = import_value_xlat2(defaults, framerate_xlat, key, mac_val); if (gval) ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDetelecine"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, detel_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDecomb"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, decomb_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); key = "PictureDeinterlace"; mac_val = ghb_dict_lookup(dict, key); gval = import_value_xlat2(defaults, deint_xlat, key, mac_val); @@ -2464,22 +2491,6 @@ settings_save(signal_user_data_t *ud, const GValue *path) } } current_preset = dict; - if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) - { - gchar *str; - str = ghb_settings_get_string(ud->settings, "tweak_PictureDeinterlace"); - if (str) - { - ghb_settings_set_string(ud->settings, "PictureDeinterlace", str); - g_free(str); - } - str = ghb_settings_get_string(ud->settings, "tweak_PictureDenoise"); - if (str) - { - ghb_settings_set_string(ud->settings, "PictureDenoise", str); - g_free(str); - } - } autoscale = ghb_settings_get_boolean(ud->settings, "autoscale"); ghb_settings_set_int64(ud->settings, "Type", PRESETS_CUSTOM);