summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-02-11 17:51:04 +0000
committerjstebbins <[email protected]>2009-02-11 17:51:04 +0000
commitdbf5a2d2c71a91246786bce892dec2328e3bc448 (patch)
tree95ae6e8194e5710cdad4751300a59fda4ab820fb /gtk
parente77d2db4f0e31f0885b32e13320fc0917e180ed7 (diff)
LinGui: add sliders for psy-rd and psy-trellis
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2141 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/ghb.ui90
-rw-r--r--gtk/src/hb-backend.c4
-rw-r--r--gtk/src/makedeps.c4
-rw-r--r--gtk/src/resource_data.h186
-rw-r--r--gtk/src/resources.plist130
-rw-r--r--gtk/src/widget_deps10
-rw-r--r--gtk/src/widget_reverse_deps30
-rw-r--r--gtk/src/x264handler.c57
8 files changed, 500 insertions, 11 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 3046ccb71..fe91aaf04 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -169,6 +169,22 @@
<property name="page_increment">10</property>
<property name="page_size">0</property>
</object>
+ <object class="GtkAdjustment" id="adjustment22">
+ <property name="upper">1</property>
+ <property name="lower">0</property>
+ <property name="page_increment">0.5</property>
+ <property name="step_increment">0.1</property>
+ <property name="page_size">0</property>
+ <property name="value">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment23">
+ <property name="upper">1</property>
+ <property name="lower">0</property>
+ <property name="page_increment">0.5</property>
+ <property name="step_increment">0.1</property>
+ <property name="page_size">0</property>
+ <property name="value">0</property>
+ </object>
<object class="GtkAdjustment" id="preview_progress_adj">
<property name="upper">100</property>
<property name="lower">0</property>
@@ -2410,9 +2426,9 @@ You can edit these and add additional options.
Default values will not be shown. The defaults are:
ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:
-weightb=0:me=hex:merange=16:subme=5:
-analyse=some:8x8dct=0:deblock=0,0:trellis=0:
-no-fast-pskip=0:no-dct-decimate=0:cabac=1</property>
+weightb=0:me=hex:merange=16:subme=6:analyse=some:8x8dct=0:
+deblock=0,0:trellis=0:psy-rd=1,0:no-fast-pskip=0:
+no-dct-decimate=0:cabac=1</property>
<property name="wrap_mode">GTK_WRAP_CHAR</property>
<property name="accepts_tab">False</property>
<signal handler="x264_focus_out_cb" name="focus_out_event"/>
@@ -2816,6 +2832,74 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1</property>
<property name="position">4</property>
</packing>
</child>
+ <child>
+ <object class="GtkTable" id="table9">
+ <property name="visible">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="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label82">
+ <property name="visible">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="xalign">1</property>
+ <property name="label" translatable="yes">Psychovisual Rate Distortion: </property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="x264_psy_rd">
+ <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="adjustment">adjustment22</property>
+ <property name="restrict_to_fill_level">False</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal handler="x264_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label83">
+ <property name="visible">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="xalign">1</property>
+ <property name="label" translatable="yes">Psychovisual Trellis: </property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="x264_psy_trell">
+ <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="adjustment">adjustment23</property>
+ <property name="restrict_to_fill_level">False</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal handler="x264_widget_changed_cb" name="value_changed"/>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index fe6b7c41c..523a495d0 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -229,8 +229,8 @@ combo_opts_t analyse_opts =
static options_map_t d_trellis_opts[] =
{
- {"Disabled", "0", 0, "0"},
- {"Final Macro Block", "1", 1, "1"},
+ {"Disabled", "0", 0, "0"},
+ {"Final Macro Block", "1", 1, "1"},
{"Always", "2", 2, "2"},
};
combo_opts_t trellis_opts =
diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c
index 0c28c5abc..c39e3d577 100644
--- a/gtk/src/makedeps.c
+++ b/gtk/src/makedeps.c
@@ -67,6 +67,10 @@ static dependency_t dep_map[] =
{"x264_bframes", "x264_direct", "0", TRUE, FALSE},
{"x264_refs", "x264_mixed_refs", "<2", TRUE, FALSE},
{"x264_cabac", "x264_trellis", "TRUE", FALSE, FALSE},
+ {"x264_subme", "x264_psy_rd", "<6", TRUE, FALSE},
+ {"x264_subme", "x264_psy_trell", "<6", TRUE, FALSE},
+ {"x264_cabac", "x264_psy_trell", "TRUE", FALSE, FALSE},
+ {"x264_trellis", "x264_psy_trell", "0", TRUE, 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/resource_data.h b/gtk/src/resource_data.h
index 689c141eb..3de99671b 100644
--- a/gtk/src/resource_data.h
+++ b/gtk/src/resource_data.h
@@ -216,6 +216,28 @@
"\n"
" &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
" &lt;/object&gt;\n"
+" &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment22&quot"
+";&gt;\n"
+" &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;page_increment&quot;&gt;0.5&lt;/property&gt"
+";\n"
+" &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt"
+";\n"
+" &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment23&quot"
+";&gt;\n"
+" &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;page_increment&quot;&gt;0.5&lt;/property&gt"
+";\n"
+" &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt"
+";\n"
+" &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;\n"
+" &lt;/object&gt;\n"
" &lt;object class=&quot;GtkAdjustment&quot; id=&quot;preview_progress_"
"adj&quot;&gt;\n"
" &lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;\n"
@@ -3903,9 +3925,9 @@
"\n"
"Default values will not be shown. The defaults are:\n"
"ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:\n"
-"weightb=0:me=hex:merange=16:subme=5:\n"
-"analyse=some:8x8dct=0:deblock=0,0:trellis=0:\n"
-"no-fast-pskip=0:no-dct-decimate=0:cabac=1&lt;/property&gt;\n"
+"weightb=0:me=hex:merange=16:subme=6:analyse=some:8x8dct=0:\n"
+"deblock=0,0:trellis=0:psy-rd=1,0:no-fast-pskip=0:\n"
+"no-dct-decimate=0:cabac=1&lt;/property&gt;\n"
" &lt;property name=&quot;wrap_mode&q"
"uot;&gt;GTK_WRAP_CHAR&lt;/property&gt;\n"
" &lt;property name=&quot;accepts_tab"
@@ -4613,6 +4635,124 @@
"n&quot;&gt;4&lt;/property&gt;\n"
" &lt;/packing&gt;\n"
" &lt;/child&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkTable&q"
+"uot; id=&quot;table9&quot;&gt;\n"
+" &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;events&"
+"quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B"
+"UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+" &lt;property name=&quot;n_rows&"
+"quot;&gt;2&lt;/property&gt;\n"
+" &lt;property name=&quot;n_colum"
+"ns&quot;&gt;2&lt;/property&gt;\n"
+" &lt;property name=&quot;visible"
+"&quot;&gt;True&lt;/property&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label82&quot;&gt;\n"
+" &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+" &lt;property name=&quot;xal"
+"ign&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Psychovisual Rate Distortion: "
+"&lt;/property&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;x_o"
+"ptions&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkHSc"
+"ale&quot; id=&quot;x264_psy_rd&quot;&gt;\n"
+" &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+" &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment22&lt;/property&gt;\n"
+" &lt;property name=&quot;res"
+"trict_to_fill_level&quot;&gt;False&lt;/property&gt;\n"
+" &lt;property name=&quot;val"
+"ue_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
+" &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;lef"
+"t_attach&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;rig"
+"ht_attach&quot;&gt;2&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label83&quot;&gt;\n"
+" &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+" &lt;property name=&quot;xal"
+"ign&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Psychovisual Trellis: &lt;/pro"
+"perty&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;top"
+"_attach&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;bot"
+"tom_attach&quot;&gt;2&lt;/property&gt;\n"
+" &lt;property name=&quot;x_o"
+"ptions&quot;&gt;GTK_FILL&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkHSc"
+"ale&quot; id=&quot;x264_psy_trell&quot;&gt;\n"
+" &lt;property name=&quot;vis"
+"ible&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;can"
+"_focus&quot;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;eve"
+"nts&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | G"
+"DK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+" &lt;property name=&quot;adj"
+"ustment&quot;&gt;adjustment23&lt;/property&gt;\n"
+" &lt;property name=&quot;res"
+"trict_to_fill_level&quot;&gt;False&lt;/property&gt;\n"
+" &lt;property name=&quot;val"
+"ue_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
+" &lt;signal handler=&quot;x2"
+"64_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;top"
+"_attach&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;bot"
+"tom_attach&quot;&gt;2&lt;/property&gt;\n"
+" &lt;property name=&quot;lef"
+"t_attach&quot;&gt;1&lt;/property&gt;\n"
+" &lt;property name=&quot;rig"
+"ht_attach&quot;&gt;2&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;positio"
+"n&quot;&gt;5&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
" &lt;/object&gt;\n"
" &lt;/child&gt;\n"
" &lt;/object&gt;\n"
@@ -12839,11 +12979,21 @@
" <key>x264_cabac</key>\n"
" <array>\n"
" <string>x264_trellis</string>\n"
+" <string>x264_psy_trell</string>\n"
" </array>\n"
" <key>x264_refs</key>\n"
" <array>\n"
" <string>x264_mixed_refs</string>\n"
" </array>\n"
+" <key>x264_subme</key>\n"
+" <array>\n"
+" <string>x264_psy_rd</string>\n"
+" <string>x264_psy_trell</string>\n"
+" </array>\n"
+" <key>x264_trellis</key>\n"
+" <array>\n"
+" <string>x264_psy_trell</string>\n"
+" </array>\n"
" </dict>\n"
" <key>widget-reverse-deps</key>\n"
" <dict>\n"
@@ -13264,6 +13414,36 @@
" <false />\n"
" </array>\n"
" </array>\n"
+" <key>x264_psy_rd</key>\n"
+" <array>\n"
+" <array>\n"
+" <string>x264_subme</string>\n"
+" <string>&lt;6</string>\n"
+" <true />\n"
+" <false />\n"
+" </array>\n"
+" </array>\n"
+" <key>x264_psy_trell</key>\n"
+" <array>\n"
+" <array>\n"
+" <string>x264_subme</string>\n"
+" <string>&lt;6</string>\n"
+" <true />\n"
+" <false />\n"
+" </array>\n"
+" <array>\n"
+" <string>x264_cabac</string>\n"
+" <string>TRUE</string>\n"
+" <false />\n"
+" <false />\n"
+" </array>\n"
+" <array>\n"
+" <string>x264_trellis</string>\n"
+" <string>0</string>\n"
+" <true />\n"
+" <false />\n"
+" </array>\n"
+" </array>\n"
" <key>x264_tab</key>\n"
" <array>\n"
" <array>\n"
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
index ad2f33944..08b1f3dda 100644
--- a/gtk/src/resources.plist
+++ b/gtk/src/resources.plist
@@ -174,6 +174,22 @@
&lt;property name=&quot;page_increment&quot;&gt;10&lt;/property&gt;
&lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
&lt;/object&gt;
+ &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment22&quot;&gt;
+ &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;page_increment&quot;&gt;0.5&lt;/property&gt;
+ &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt;
+ &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;value&quot;&gt;1&lt;/property&gt;
+ &lt;/object&gt;
+ &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment23&quot;&gt;
+ &lt;property name=&quot;upper&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;page_increment&quot;&gt;0.5&lt;/property&gt;
+ &lt;property name=&quot;step_increment&quot;&gt;0.1&lt;/property&gt;
+ &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;value&quot;&gt;0&lt;/property&gt;
+ &lt;/object&gt;
&lt;object class=&quot;GtkAdjustment&quot; id=&quot;preview_progress_adj&quot;&gt;
&lt;property name=&quot;upper&quot;&gt;100&lt;/property&gt;
&lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
@@ -2415,9 +2431,9 @@ You can edit these and add additional options.
Default values will not be shown. The defaults are:
ref=1:mixed-refs=0:bframes=0:direct=spatial:b-pyramid=0:
-weightb=0:me=hex:merange=16:subme=5:
-analyse=some:8x8dct=0:deblock=0,0:trellis=0:
-no-fast-pskip=0:no-dct-decimate=0:cabac=1&lt;/property&gt;
+weightb=0:me=hex:merange=16:subme=6:analyse=some:8x8dct=0:
+deblock=0,0:trellis=0:psy-rd=1,0:no-fast-pskip=0:
+no-dct-decimate=0:cabac=1&lt;/property&gt;
&lt;property name=&quot;wrap_mode&quot;&gt;GTK_WRAP_CHAR&lt;/property&gt;
&lt;property name=&quot;accepts_tab&quot;&gt;False&lt;/property&gt;
&lt;signal handler=&quot;x264_focus_out_cb&quot; name=&quot;focus_out_event&quot;/&gt;
@@ -2821,6 +2837,74 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1&lt;/property&gt;
&lt;property name=&quot;position&quot;&gt;4&lt;/property&gt;
&lt;/packing&gt;
&lt;/child&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkTable&quot; id=&quot;table9&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+ &lt;property name=&quot;n_rows&quot;&gt;2&lt;/property&gt;
+ &lt;property name=&quot;n_columns&quot;&gt;2&lt;/property&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkLabel&quot; id=&quot;label82&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+ &lt;property name=&quot;xalign&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Psychovisual Rate Distortion: &lt;/property&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkHScale&quot; id=&quot;x264_psy_rd&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+ &lt;property name=&quot;adjustment&quot;&gt;adjustment22&lt;/property&gt;
+ &lt;property name=&quot;restrict_to_fill_level&quot;&gt;False&lt;/property&gt;
+ &lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
+ &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkLabel&quot; id=&quot;label83&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+ &lt;property name=&quot;xalign&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Psychovisual Trellis: &lt;/property&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+ &lt;property name=&quot;x_options&quot;&gt;GTK_FILL&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkHScale&quot; id=&quot;x264_psy_trell&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;events&quot;&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;
+ &lt;property name=&quot;adjustment&quot;&gt;adjustment23&lt;/property&gt;
+ &lt;property name=&quot;restrict_to_fill_level&quot;&gt;False&lt;/property&gt;
+ &lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
+ &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;top_attach&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;bottom_attach&quot;&gt;2&lt;/property&gt;
+ &lt;property name=&quot;left_attach&quot;&gt;1&lt;/property&gt;
+ &lt;property name=&quot;right_attach&quot;&gt;2&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;position&quot;&gt;5&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
@@ -7287,11 +7371,21 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
<key>x264_cabac</key>
<array>
<string>x264_trellis</string>
+ <string>x264_psy_trell</string>
</array>
<key>x264_refs</key>
<array>
<string>x264_mixed_refs</string>
</array>
+ <key>x264_subme</key>
+ <array>
+ <string>x264_psy_rd</string>
+ <string>x264_psy_trell</string>
+ </array>
+ <key>x264_trellis</key>
+ <array>
+ <string>x264_psy_trell</string>
+ </array>
</dict>
<key>widget-reverse-deps</key>
<dict>
@@ -7712,6 +7806,36 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
<false />
</array>
</array>
+ <key>x264_psy_rd</key>
+ <array>
+ <array>
+ <string>x264_subme</string>
+ <string>&lt;6</string>
+ <true />
+ <false />
+ </array>
+ </array>
+ <key>x264_psy_trell</key>
+ <array>
+ <array>
+ <string>x264_subme</string>
+ <string>&lt;6</string>
+ <true />
+ <false />
+ </array>
+ <array>
+ <string>x264_cabac</string>
+ <string>TRUE</string>
+ <false />
+ <false />
+ </array>
+ <array>
+ <string>x264_trellis</string>
+ <string>0</string>
+ <true />
+ <false />
+ </array>
+ </array>
<key>x264_tab</key>
<array>
<array>
diff --git a/gtk/src/widget_deps b/gtk/src/widget_deps
index 31d3e5917..1a1cbb178 100644
--- a/gtk/src/widget_deps
+++ b/gtk/src/widget_deps
@@ -112,10 +112,20 @@
<key>x264_cabac</key>
<array>
<string>x264_trellis</string>
+ <string>x264_psy_trell</string>
</array>
<key>x264_refs</key>
<array>
<string>x264_mixed_refs</string>
</array>
+ <key>x264_subme</key>
+ <array>
+ <string>x264_psy_rd</string>
+ <string>x264_psy_trell</string>
+ </array>
+ <key>x264_trellis</key>
+ <array>
+ <string>x264_psy_trell</string>
+ </array>
</dict>
</plist>
diff --git a/gtk/src/widget_reverse_deps b/gtk/src/widget_reverse_deps
index c573d6069..586d40043 100644
--- a/gtk/src/widget_reverse_deps
+++ b/gtk/src/widget_reverse_deps
@@ -419,6 +419,36 @@
<false />
</array>
</array>
+ <key>x264_psy_rd</key>
+ <array>
+ <array>
+ <string>x264_subme</string>
+ <string>&lt;6</string>
+ <true />
+ <false />
+ </array>
+ </array>
+ <key>x264_psy_trell</key>
+ <array>
+ <array>
+ <string>x264_subme</string>
+ <string>&lt;6</string>
+ <true />
+ <false />
+ </array>
+ <array>
+ <string>x264_cabac</string>
+ <string>TRUE</string>
+ <false />
+ <false />
+ </array>
+ <array>
+ <string>x264_trellis</string>
+ <string>0</string>
+ <true />
+ <false />
+ </array>
+ </array>
<key>x264_tab</key>
<array>
<array>
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index 36bed7721..26c5c359b 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -122,6 +122,7 @@ x264_focus_out_cb(GtkWidget *widget, GdkEventFocus *event,
enum
{
X264_OPT_DEBLOCK,
+ X264_OPT_PSY,
X264_OPT_INT,
X264_OPT_COMBO,
X264_OPT_BOOL,
@@ -151,6 +152,7 @@ static gchar *x264_8x8dct_syns[] = {"8x8dct", NULL};
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", NULL};
static gchar *x264_decimate_syns[] =
{"no-dct-decimate", "no_dct_decimate", NULL};
static gchar *x264_cabac_syns[] = {"cabac", NULL};
@@ -186,6 +188,8 @@ struct x264_opt_map_s x264_opt_map[] =
{x264_pskip_syns, "x264_no_fast_pskip", "0", X264_OPT_BOOL},
{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_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))
@@ -329,6 +333,36 @@ x264_update_deblock(signal_user_data_t *ud, const gchar *xval)
ghb_ui_update(ud, "x264_deblock_beta", ghb_int64_value(bvalue));
}
+static void
+x264_update_psy(signal_user_data_t *ud, const gchar *xval)
+{
+ gdouble rd_value, trell_value;
+ gchar *end;
+ gchar *val;
+ gchar *trell_val = NULL;
+
+ if (xval == NULL) return;
+ val = g_strdup(xval);
+ rd_value = trell_value = 0;
+ if (val != NULL)
+ {
+ gchar *pos = strchr(val, ',');
+ if (pos != NULL)
+ {
+ trell_val = pos + 1;
+ *pos = 0;
+ }
+ rd_value = g_strtod (val, &end);
+ if (trell_val != NULL)
+ {
+ trell_value = g_strtod (trell_val, &end);
+ }
+ }
+ g_free(val);
+ ghb_ui_update(ud, "x264_psy_rd", ghb_double_value(rd_value));
+ ghb_ui_update(ud, "x264_psy_trell", ghb_double_value(trell_value));
+}
+
void
ghb_x264_parse_options(signal_user_data_t *ud, const gchar *options)
{
@@ -371,6 +405,11 @@ ghb_x264_parse_options(signal_user_data_t *ud, const gchar *options)
x264_opt_map[jj+1].found = TRUE;
x264_update_deblock(ud, val);
break;
+ case X264_OPT_PSY:
+ // dirty little hack. mark psy_trell found as well
+ x264_opt_map[jj+1].found = TRUE;
+ x264_update_psy(ud, val);
+ break;
}
break;
}
@@ -397,6 +436,9 @@ ghb_x264_parse_options(signal_user_data_t *ud, const gchar *options)
case X264_OPT_DEBLOCK:
x264_update_deblock(ud, val);
break;
+ case X264_OPT_PSY:
+ x264_update_psy(ud, val);
+ break;
}
x264_opt_map[jj].found = TRUE;
g_free(val);
@@ -418,6 +460,17 @@ get_deblock_val(signal_user_data_t *ud)
return result;
}
+gchar*
+get_psy_val(signal_user_data_t *ud)
+{
+ gdouble rd, trell;
+ gchar *result;
+ rd = ghb_settings_get_double(ud->settings, "x264_psy_rd");
+ trell = ghb_settings_get_double(ud->settings, "x264_psy_trell");
+ result = g_strdup_printf("%g,%g", rd, trell);
+ return result;
+}
+
static void
x264_opt_update(signal_user_data_t *ud, GtkWidget *widget)
{
@@ -469,6 +522,8 @@ x264_opt_update(signal_user_data_t *ud, GtkWidget *widget)
foundit = TRUE;
if (type == X264_OPT_DEBLOCK)
val = get_deblock_val(ud);
+ else if (type == X264_OPT_PSY)
+ val = get_psy_val(ud);
else
{
GValue *gval;
@@ -504,6 +559,8 @@ x264_opt_update(signal_user_data_t *ud, GtkWidget *widget)
gchar *val;
if (type == X264_OPT_DEBLOCK)
val = get_deblock_val(ud);
+ else if (type == X264_OPT_PSY)
+ val = get_psy_val(ud);
else
{
GValue *gval;