summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-09-15 15:24:53 +0000
committerjstebbins <[email protected]>2009-09-15 15:24:53 +0000
commit12436c6dd2b5a4356f925fd586bccab21c21dcf7 (patch)
tree5fd1401e3260ade5b9de743b393603e16a2fda09
parentf633abf9870301c5dacbcb7487de1d2942fbcc1c (diff)
LinGui: add mbtree checkbox to x264 settings tab
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2824 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/ghb.ui23
-rw-r--r--gtk/src/internal_defaults.xml2
-rw-r--r--gtk/src/widgetdeps.c1
-rw-r--r--gtk/src/x264handler.c7
4 files changed, 29 insertions, 4 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 00d004ceb..6899521ff 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -3176,6 +3176,21 @@ no-dct-decimate=0:cabac=1</property>
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="x264_mbtree">
+ <property name="visible">True</property>
+ <property name="can_focus">True</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">Using macroblock tree ratecontrol overall improves compression.</property>
+ <property name="label" translatable="yes">Macroblock Tree Rate Control</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal handler="x264_widget_changed_cb" name="toggled"/>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkCheckButton" id="x264_no_fast_pskip">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3187,7 +3202,7 @@ no-dct-decimate=0:cabac=1</property>
<signal handler="x264_widget_changed_cb" name="toggled"/>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -3202,7 +3217,7 @@ no-dct-decimate=0:cabac=1</property>
<signal handler="x264_widget_changed_cb" name="toggled"/>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -3217,7 +3232,7 @@ no-dct-decimate=0:cabac=1</property>
<signal handler="x264_widget_changed_cb" name="toggled"/>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -3285,7 +3300,7 @@ no-dct-decimate=0:cabac=1</property>
</child>
</object>
<packing>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
</object>
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
index 399474d07..1e3d6f3e1 100644
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -52,6 +52,8 @@
<string>some</string>
<key>x264_bframes</key>
<integer>0</integer>
+ <key>x264_mbtree</key>
+ <true />
<key>x264_bpyramid</key>
<false />
<key>x264_cabac</key>
diff --git a/gtk/src/widgetdeps.c b/gtk/src/widgetdeps.c
index 4747f69de..ef58b769c 100644
--- a/gtk/src/widgetdeps.c
+++ b/gtk/src/widgetdeps.c
@@ -72,6 +72,7 @@ static dependency_t dep_map[] =
{"x264_subme", "x264_psy_trell", "<6", TRUE, FALSE},
{"x264_cabac", "x264_psy_trell", "TRUE", FALSE, FALSE},
{"x264_trellis", "x264_psy_trell", "0", TRUE, FALSE},
+ {"x264_mbtree", "x264_bpyramid", "FALSE", FALSE, FALSE},
{"ChapterMarkers", "chapters_list", "TRUE", FALSE, FALSE},
{"use_source_name", "chapters_in_destination", "TRUE", FALSE, FALSE},
{"use_source_name", "title_no_in_destination", "TRUE", FALSE, FALSE},
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index 96a834a2d..f1c4bfa5c 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -154,6 +154,7 @@ static gchar *x264_deblock_syns[] = {"deblock", "filter", NULL};
static gchar *x264_trellis_syns[] = {"trellis", NULL};
static gchar *x264_pskip_syns[] = {"no-fast-pskip", "no_fast_pskip", NULL};
static gchar *x264_psy_syns[] = {"psy-rd", "psy_rd", NULL};
+static gchar *x264_mbtree_syns[] = {"mbtree", NULL};
static gchar *x264_decimate_syns[] =
{"no-dct-decimate", "no_dct_decimate", NULL};
static gchar *x264_cabac_syns[] = {"cabac", NULL};
@@ -192,6 +193,7 @@ struct x264_opt_map_s x264_opt_map[] =
{x264_decimate_syns, "x264_no_dct_decimate", "0", X264_OPT_BOOL},
{x264_cabac_syns, "x264_cabac", "1", X264_OPT_BOOL},
{x264_psy_syns, "x264_psy_rd", "1,0", X264_OPT_PSY},
+ {x264_mbtree_syns, "x264_mbtree", "1", X264_OPT_BOOL},
{x264_psy_syns, "x264_psy_trell", "1,0", X264_OPT_PSY},
};
#define X264_OPT_MAP_SIZE (sizeof(x264_opt_map)/sizeof(struct x264_opt_map_s))
@@ -736,6 +738,11 @@ sanitize_x264opts(signal_user_data_t *ud, const gchar *options)
gint ii;
// Fix up option dependencies
+ gboolean mbtree = ghb_settings_get_boolean(ud->settings, "x264_mbtree");
+ if (mbtree)
+ {
+ x264_remove_opt(split, x264_bpyramid_syns);
+ }
gint subme = ghb_settings_combo_int(ud->settings, "x264_subme");
if (subme < 6)
{