📄 x264_gtk_more.c
字号:
#include <gtk/gtk.h>#include "x264_gtk_i18n.h"#include "x264_gtk_private.h"/* Callbacks */static void _more_deblocking_filter (GtkToggleButton *button, gpointer user_data);static void _more_cabac (GtkToggleButton *button, gpointer user_data);static void _more_mixed_ref (GtkToggleButton *button, gpointer user_data);GtkWidget *_more_page (X264_Gui_Config *config){ GtkWidget *vbox; GtkWidget *frame; GtkWidget *hbox; GtkWidget *table; GtkWidget *eb; GtkWidget *label; GtkObject *adj; GtkRequisition size; GtkRequisition size2; GtkRequisition size3; GtkRequisition size4; GtkRequisition size5; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); label = gtk_entry_new_with_max_length (3); gtk_widget_size_request (label, &size); gtk_widget_destroy (GTK_WIDGET (label)); label = gtk_check_button_new_with_label (_("Deblocking Filter")); gtk_widget_size_request (label, &size2); gtk_widget_destroy (GTK_WIDGET (label)); label = gtk_label_new (_("Partition decision")); gtk_widget_size_request (label, &size3); gtk_widget_destroy (GTK_WIDGET (label)); label = gtk_label_new (_("Threshold")); gtk_widget_size_request (label, &size5); gtk_widget_destroy (GTK_WIDGET (label)); vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); /* Motion Estimation */ frame = gtk_frame_new (_("Motion Estimation")); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 6); gtk_widget_show (frame); table = gtk_table_new (5, 3, TRUE); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Partition decision - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), eb, 0, 1, 0, 1); gtk_widget_show (eb); label = gtk_label_new (_("Partition decision")); gtk_widget_set_size_request (label, size2.width, size3.height); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eb), label); gtk_widget_show (label); config->more.motion_estimation.partition_decision = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), _("1 (Fastest)")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), "2"); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), "3"); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), "4"); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), _("5 (High quality)")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), _("6 (RDO)")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), _("6b (RDO on B frames)")); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.partition_decision, 1, 3, 0, 1); gtk_widget_show (config->more.motion_estimation.partition_decision); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Method - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), eb, 0, 1, 1, 2); gtk_widget_show (eb); label = gtk_label_new (_("Method")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eb), label); gtk_widget_show (label); config->more.motion_estimation.method = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.method), _("Diamond Search")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.method), _("Hexagonal Search")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.method), _("Uneven Multi-Hexagon")); gtk_combo_box_append_text (GTK_COMBO_BOX (config->more.motion_estimation.method), _("Exhaustive search")); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.method, 1, 3, 1, 2); gtk_widget_show (config->more.motion_estimation.method); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Range - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), eb, 0, 1, 2, 3); gtk_widget_show (eb); label = gtk_label_new (_("Range")); gtk_widget_size_request (label, &size4); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eb), label); gtk_widget_show (label); config->more.motion_estimation.range = gtk_entry_new_with_max_length (3); gtk_widget_set_size_request (config->more.motion_estimation.range, 20, size.height); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.range, 1, 2, 2, 3); gtk_widget_show (config->more.motion_estimation.range); config->more.motion_estimation.chroma_me = gtk_check_button_new_with_label (_("Chroma ME")); gtk_tooltips_set_tip (tooltips, config->more.motion_estimation.chroma_me, _("Chroma ME - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.chroma_me, 2, 3, 2, 3); gtk_widget_show (config->more.motion_estimation.chroma_me); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Max Ref. frames - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), eb, 0, 1, 3, 4); gtk_widget_show (eb); label = gtk_label_new (_("Max Ref. frames")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eb), label); gtk_widget_show (label); config->more.motion_estimation.max_ref_frames = gtk_entry_new_with_max_length (3); gtk_widget_set_size_request (config->more.motion_estimation.max_ref_frames, 20, size.height); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.max_ref_frames, 1, 2, 3, 4); gtk_widget_show (config->more.motion_estimation.max_ref_frames); config->more.motion_estimation.mixed_refs = gtk_check_button_new_with_label (_("Mixed Refs")); gtk_tooltips_set_tip (tooltips, config->more.motion_estimation.mixed_refs, _("Mixed Refs - description"), ""); g_signal_connect (G_OBJECT (config->more.motion_estimation.mixed_refs), "toggled", G_CALLBACK (_more_mixed_ref), config); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.mixed_refs, 2, 3, 3, 4); gtk_widget_show (config->more.motion_estimation.mixed_refs); config->more.motion_estimation.fast_pskip = gtk_check_button_new_with_label (_("Fast P skip")); gtk_tooltips_set_tip (tooltips, config->more.motion_estimation.fast_pskip, _("Fast P skip - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.fast_pskip, 0, 1, 4, 5); gtk_widget_show (config->more.motion_estimation.fast_pskip); config->more.motion_estimation.dct_decimate = gtk_check_button_new_with_label (_("DCT decimate")); gtk_tooltips_set_tip (tooltips, config->more.motion_estimation.dct_decimate, _("DCT decimate - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.dct_decimate, 1, 2, 4, 5); gtk_widget_show (config->more.motion_estimation.dct_decimate); /* Misc. Options */ frame = gtk_frame_new (_("Misc. Options")); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 6); gtk_widget_show (frame); table = gtk_table_new (5, 4, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 6); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Sample Aspect Ratio - description"), ""); gtk_table_attach_defaults (GTK_TABLE (table), eb, 0, 1, 0, 1); gtk_widget_show (eb); label = gtk_label_new (_("Sample Aspect Ratio")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eb), label); gtk_widget_show (label); hbox = gtk_hbox_new (TRUE, 6); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 0, 1); gtk_widget_show (hbox); config->more.misc.sample_ar_x = gtk_entry_new_with_max_length (3); gtk_widget_set_size_request (config->more.misc.sample_ar_x, 25, size.height); gtk_box_pack_start (GTK_BOX (hbox), config->more.misc.sample_ar_x, FALSE, TRUE, 0); gtk_widget_show (config->more.misc.sample_ar_x); config->more.misc.sample_ar_y = gtk_entry_new_with_max_length (3); gtk_widget_set_size_request (config->more.misc.sample_ar_y, 25, size.height); gtk_box_pack_start (GTK_BOX (hbox), config->more.misc.sample_ar_y, FALSE, TRUE, 0); gtk_widget_show (config->more.misc.sample_ar_y); eb = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE); gtk_tooltips_set_tip (tooltips, eb, _("Threads - description"), "");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -