OSDN Git Service

LinGui: add b-adapt combo box to x264 tab
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 11 Feb 2009 23:53:48 +0000 (23:53 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 11 Feb 2009 23:53:48 +0000 (23:53 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@2147 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/ghb.ui
gtk/src/hb-backend.c
gtk/src/internal_defaults.xml
gtk/src/makedeps.c
gtk/src/resource_data.h
gtk/src/resources.plist
gtk/src/widget_deps
gtk/src/widget_reverse_deps
gtk/src/x264handler.c

index fe91aaf..01a5590 100644 (file)
                                       <object class="GtkHBox" id="hbox31">
                                         <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="spacing">4</property>
                                         <child>
                                           <object class="GtkLabel" id="label49">
                                             <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="label" translatable="yes">Number:  </property>
+                                            <property name="label" translatable="yes">Number:</property>
                                           </object>
                                           <packing>
                                             <property name="expand">False</property>
                                   <object class="GtkVBox" id="vbox24">
                                     <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="spacing">2</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox32">
+                                      <object class="GtkTable" id="table4">
                                         <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">3</property>
+                                        <property name="n_columns">2</property>
+                                        <property name="column-spacing">4</property>
                                         <child>
                                           <object class="GtkLabel" id="label51">
                                             <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">0</property>
-                                            <property name="label" translatable="yes">Number:  </property>
-                                            <property name="width_chars">14</property>
+                                            <property name="label" translatable="yes">Number:</property>
                                           </object>
                                           <packing>
-                                            <property name="expand">False</property>
+                                            <property name="x_options">GTK_FILL</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkAlignment" id="alignment27">
+                                          <object class="GtkAlignment" id="alignment38">
                                             <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">0</property>
                                             </child>
                                           </object>
                                           <packing>
-                                            <property name="position">1</property>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
                                           </packing>
                                         </child>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHBox" id="hbox33">
-                                        <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>
                                         <child>
                                           <object class="GtkLabel" id="label52">
                                             <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">0</property>
-                                            <property name="label" translatable="yes">Direct Prediction:  </property>
-                                            <property name="width_chars">14</property>
+                                            <property name="label" translatable="yes">Direct Prediction:</property>
                                           </object>
                                           <packing>
-                                            <property name="expand">False</property>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkAlignment" id="alignment28">
+                                          <object class="GtkAlignment" id="alignment39">
                                             <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">0</property>
                                             </child>
                                           </object>
                                           <packing>
-                                            <property name="position">1</property>
+                                            <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>
+                                        <child>
+                                          <object class="GtkLabel" id="label84">
+                                            <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">0</property>
+                                            <property name="label" translatable="yes">Adaptive B-Frames:</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkAlignment" id="alignment40">
+                                            <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">0</property>
+                                            <property name="xscale">0</property>
+                                            <child>
+                                              <object class="GtkComboBox" id="x264_b_adapt">
+                                                <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="tooltip-text" translatable="yes">This option can improve compression efficiency. </property>
+                                                <signal handler="x264_widget_changed_cb" name="changed"/>
+                                              </object>
+                                            </child>
+                                          </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>
                                       </object>
                                       <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">1</property>
+                                        <property name="position">0</property>
                                       </packing>
                                     </child>
 
 
                                       </object>
                                       <packing>
-                                        <property name="position">2</property>
+                                        <property name="position">1</property>
                                       </packing>
                                     </child>
 
index 523a495..4f807f8 100644 (file)
@@ -182,6 +182,18 @@ combo_opts_t direct_opts =
        d_direct_opts
 };
 
+static options_map_t d_badapt_opts[] =
+{
+       {"Off",             "0", 0, "0"},
+       {"Faster",          "1", 1, "1"},
+       {"More Effecient",  "2", 2, "2"},
+};
+combo_opts_t badapt_opts =
+{
+       sizeof(d_badapt_opts)/sizeof(options_map_t),
+       d_badapt_opts
+};
+
 static options_map_t d_me_opts[] =
 {
        {"Diamond",              "dia",  0, "dia"},
@@ -274,6 +286,7 @@ combo_name_map_t combo_name_map[] =
        {"VideoEncoder", &vcodec_opts},
        {"AudioEncoder", &acodec_opts},
        {"x264_direct", &direct_opts},
+       {"x264_b_adapt", &badapt_opts},
        {"x264_me", &me_opts},
        {"x264_subme", &subme_opts},
        {"x264_analyse", &analyse_opts},
@@ -1919,6 +1932,7 @@ ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data,
                generic_opts_set(builder, "VideoEncoder", &vcodec_opts);
                generic_opts_set(builder, "AudioEncoder", &acodec_opts);
                generic_opts_set(builder, "x264_direct", &direct_opts);
+               generic_opts_set(builder, "x264_b_adapt", &badapt_opts);
                generic_opts_set(builder, "x264_me", &me_opts);
                generic_opts_set(builder, "x264_subme", &subme_opts);
                generic_opts_set(builder, "x264_analyse", &analyse_opts);
index 6cd672e..b1e9a3f 100644 (file)
@@ -56,6 +56,8 @@
                <integer>0</integer>
                <key>x264_direct</key>
                <string>spatial</string>
+               <key>x264_b_adapt</key>
+               <string>1</string>
                <key>x264_me</key>
                <string>hex</string>
                <key>x264_merange</key>
index c39e3d5..6989883 100644 (file)
@@ -65,6 +65,7 @@ static dependency_t dep_map[] =
        {"x264_bframes", "x264_weighted_bframes", "0", TRUE, FALSE},
        {"x264_bframes", "x264_bpyramid", "<2", TRUE, FALSE},
        {"x264_bframes", "x264_direct", "0", TRUE, FALSE},
+       {"x264_bframes", "x264_b_adapt", "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},
index 3de9967..60dc6c4 100644 (file)
 "                                        &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;spacing"
+"&quot;&gt;4&lt;/property&gt;\n"
 "                                        &lt;child&gt;\n"
 "                                          &lt;object class=&quot;GtkLab"
 "el&quot; id=&quot;label49&quot;&gt;\n"
 "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;lab"
-"el&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;\n"
+"el&quot; translatable=&quot;yes&quot;&gt;Number:&lt;/property&gt;\n"
 "                                          &lt;/object&gt;\n"
 "                                          &lt;packing&gt;\n"
 "                                            &lt;property name=&quot;exp"
 "                                    &lt;property name=&quot;events&quot"
 ";&gt;GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTO"
 "N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
-"                                    &lt;property name=&quot;spacing&quo"
-"t;&gt;2&lt;/property&gt;\n"
 "                                    &lt;child&gt;\n"
-"                                      &lt;object class=&quot;GtkHBox&qu"
-"ot; id=&quot;hbox32&quot;&gt;\n"
+"                                      &lt;object class=&quot;GtkTable&q"
+"uot; id=&quot;table4&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;3&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;n_colum"
+"ns&quot;&gt;2&lt;/property&gt;\n"
+"                                        &lt;property name=&quot;column-"
+"spacing&quot;&gt;4&lt;/property&gt;\n"
 "                                        &lt;child&gt;\n"
 "                                          &lt;object class=&quot;GtkLab"
 "el&quot; id=&quot;label51&quot;&gt;\n"
 "                                            &lt;property name=&quot;xal"
 "ign&quot;&gt;0&lt;/property&gt;\n"
 "                                            &lt;property name=&quot;lab"
-"el&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;\n"
-"                                            &lt;property name=&quot;wid"
-"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"el&quot; translatable=&quot;yes&quot;&gt;Number:&lt;/property&gt;\n"
 "                                          &lt;/object&gt;\n"
 "                                          &lt;packing&gt;\n"
-"                                            &lt;property name=&quot;exp"
-"and&quot;&gt;False&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;GtkAli"
-"gnment&quot; id=&quot;alignment27&quot;&gt;\n"
+"gnment&quot; id=&quot;alignment38&quot;&gt;\n"
 "                                            &lt;property name=&quot;vis"
 "ible&quot;&gt;True&lt;/property&gt;\n"
 "                                            &lt;property name=&quot;eve"
 "                                            &lt;/child&gt;\n"
 "                                          &lt;/object&gt;\n"
 "                                          &lt;packing&gt;\n"
-"                                            &lt;property name=&quot;pos"
-"ition&quot;&gt;1&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;expand&"
-"quot;&gt;False&lt;/property&gt;\n"
-"                                      &lt;/packing&gt;\n"
-"                                    &lt;/child&gt;\n"
-"                                    &lt;child&gt;\n"
-"                                      &lt;object class=&quot;GtkHBox&qu"
-"ot; id=&quot;hbox33&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;child&gt;\n"
 "                                          &lt;object class=&quot;GtkLab"
 "el&quot; id=&quot;label52&quot;&gt;\n"
 "                                            &lt;property name=&quot;xal"
 "ign&quot;&gt;0&lt;/property&gt;\n"
 "                                            &lt;property name=&quot;lab"
-"el&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:  &lt;/prope"
-"rty&gt;\n"
-"                                            &lt;property name=&quot;wid"
-"th_chars&quot;&gt;14&lt;/property&gt;\n"
+"el&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:&lt;/propert"
+"y&gt;\n"
 "                                          &lt;/object&gt;\n"
 "                                          &lt;packing&gt;\n"
-"                                            &lt;property name=&quot;exp"
-"and&quot;&gt;False&lt;/property&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;GtkAli"
-"gnment&quot; id=&quot;alignment28&quot;&gt;\n"
+"gnment&quot; id=&quot;alignment39&quot;&gt;\n"
 "                                            &lt;property name=&quot;vis"
 "ible&quot;&gt;True&lt;/property&gt;\n"
 "                                            &lt;property name=&quot;eve"
 "                                            &lt;/child&gt;\n"
 "                                          &lt;/object&gt;\n"
 "                                          &lt;packing&gt;\n"
-"                                            &lt;property name=&quot;pos"
-"ition&quot;&gt;1&lt;/property&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;child&gt;\n"
+"                                          &lt;object class=&quot;GtkLab"
+"el&quot; id=&quot;label84&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;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;lab"
+"el&quot; translatable=&quot;yes&quot;&gt;Adaptive B-Frames:&lt;/propert"
+"y&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;top"
+"_attach&quot;&gt;2&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;bot"
+"tom_attach&quot;&gt;3&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;GtkAli"
+"gnment&quot; id=&quot;alignment40&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;0&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;xsc"
+"ale&quot;&gt;0&lt;/property&gt;\n"
+"                                            &lt;child&gt;\n"
+"                                              &lt;object class=&quot;Gt"
+"kComboBox&quot; id=&quot;x264_b_adapt&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_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK&lt;/property&gt;\n"
+"                                                &lt;property name=&quot"
+";tooltip-text&quot; translatable=&quot;yes&quot;&gt;This option can imp"
+"rove compression efficiency. &lt;/property&gt;\n"
+"                                                &lt;signal handler=&quo"
+"t;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;\n"
+"                                              &lt;/object&gt;\n"
+"                                            &lt;/child&gt;\n"
+"                                          &lt;/object&gt;\n"
+"                                          &lt;packing&gt;\n"
+"                                            &lt;property name=&quot;top"
+"_attach&quot;&gt;2&lt;/property&gt;\n"
+"                                            &lt;property name=&quot;bot"
+"tom_attach&quot;&gt;3&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;expand&"
-"quot;&gt;False&lt;/property&gt;\n"
 "                                        &lt;property name=&quot;positio"
-"n&quot;&gt;1&lt;/property&gt;\n"
+"n&quot;&gt;0&lt;/property&gt;\n"
 "                                      &lt;/packing&gt;\n"
 "                                    &lt;/child&gt;\n"
 "\n"
 "                                      &lt;/object&gt;\n"
 "                                      &lt;packing&gt;\n"
 "                                        &lt;property name=&quot;positio"
-"n&quot;&gt;2&lt;/property&gt;\n"
+"n&quot;&gt;1&lt;/property&gt;\n"
 "                                      &lt;/packing&gt;\n"
 "                                    &lt;/child&gt;\n"
 "\n"
 "                      <false />\n"
 "                      <key>x264_analyse</key>\n"
 "                      <string>some</string>\n"
+"                      <key>x264_b_adapt</key>\n"
+"                      <string>1</string>\n"
 "                      <key>x264_bframes</key>\n"
 "                      <integer>0</integer>\n"
 "                      <key>x264_bpyramid</key>\n"
 "                      <string>x264_weighted_bframes</string>\n"
 "                      <string>x264_bpyramid</string>\n"
 "                      <string>x264_direct</string>\n"
+"                      <string>x264_b_adapt</string>\n"
 "              </array>\n"
 "              <key>x264_cabac</key>\n"
 "              <array>\n"
 "                              <false />\n"
 "                      </array>\n"
 "              </array>\n"
+"              <key>x264_b_adapt</key>\n"
+"              <array>\n"
+"                      <array>\n"
+"                              <string>x264_bframes</string>\n"
+"                              <string>0</string>\n"
+"                              <true />\n"
+"                              <false />\n"
+"                      </array>\n"
+"              </array>\n"
 "              <key>x264_bpyramid</key>\n"
 "              <array>\n"
 "                      <array>\n"
index 08b1f3d..126d000 100644 (file)
                                       &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox31&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;spacing&quot;&gt;4&lt;/property&gt;
                                         &lt;child&gt;
                                           &lt;object class=&quot;GtkLabel&quot; id=&quot;label49&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;label&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Number:&lt;/property&gt;
                                           &lt;/object&gt;
                                           &lt;packing&gt;
                                             &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
                                   &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox24&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;spacing&quot;&gt;2&lt;/property&gt;
                                     &lt;child&gt;
-                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox32&quot;&gt;
+                                      &lt;object class=&quot;GtkTable&quot; id=&quot;table4&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;3&lt;/property&gt;
+                                        &lt;property name=&quot;n_columns&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;column-spacing&quot;&gt;4&lt;/property&gt;
                                         &lt;child&gt;
                                           &lt;object class=&quot;GtkLabel&quot; id=&quot;label51&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;0&lt;/property&gt;
-                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Number:  &lt;/property&gt;
-                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Number:&lt;/property&gt;
                                           &lt;/object&gt;
                                           &lt;packing&gt;
-                                            &lt;property name=&quot;expand&quot;&gt;False&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;GtkAlignment&quot; id=&quot;alignment27&quot;&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment38&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;0&lt;/property&gt;
                                             &lt;/child&gt;
                                           &lt;/object&gt;
                                           &lt;packing&gt;
-                                            &lt;property name=&quot;position&quot;&gt;1&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;expand&quot;&gt;False&lt;/property&gt;
-                                      &lt;/packing&gt;
-                                    &lt;/child&gt;
-                                    &lt;child&gt;
-                                      &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox33&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;child&gt;
                                           &lt;object class=&quot;GtkLabel&quot; id=&quot;label52&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;0&lt;/property&gt;
-                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:  &lt;/property&gt;
-                                            &lt;property name=&quot;width_chars&quot;&gt;14&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Direct Prediction:&lt;/property&gt;
                                           &lt;/object&gt;
                                           &lt;packing&gt;
-                                            &lt;property name=&quot;expand&quot;&gt;False&lt;/property&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;GtkAlignment&quot; id=&quot;alignment28&quot;&gt;
+                                          &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment39&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;0&lt;/property&gt;
                                             &lt;/child&gt;
                                           &lt;/object&gt;
                                           &lt;packing&gt;
-                                            &lt;property name=&quot;position&quot;&gt;1&lt;/property&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;child&gt;
+                                          &lt;object class=&quot;GtkLabel&quot; id=&quot;label84&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;0&lt;/property&gt;
+                                            &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Adaptive B-Frames:&lt;/property&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                            &lt;property name=&quot;bottom_attach&quot;&gt;3&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;GtkAlignment&quot; id=&quot;alignment40&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;0&lt;/property&gt;
+                                            &lt;property name=&quot;xscale&quot;&gt;0&lt;/property&gt;
+                                            &lt;child&gt;
+                                              &lt;object class=&quot;GtkComboBox&quot; id=&quot;x264_b_adapt&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;tooltip-text&quot; translatable=&quot;yes&quot;&gt;This option can improve compression efficiency. &lt;/property&gt;
+                                                &lt;signal handler=&quot;x264_widget_changed_cb&quot; name=&quot;changed&quot;/&gt;
+                                              &lt;/object&gt;
+                                            &lt;/child&gt;
+                                          &lt;/object&gt;
+                                          &lt;packing&gt;
+                                            &lt;property name=&quot;top_attach&quot;&gt;2&lt;/property&gt;
+                                            &lt;property name=&quot;bottom_attach&quot;&gt;3&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;expand&quot;&gt;False&lt;/property&gt;
-                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
                                       &lt;/packing&gt;
                                     &lt;/child&gt;
 
 
                                       &lt;/object&gt;
                                       &lt;packing&gt;
-                                        &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
+                                        &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
                                       &lt;/packing&gt;
                                     &lt;/child&gt;
 
@@ -5484,6 +5516,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
                        <false />
                        <key>x264_analyse</key>
                        <string>some</string>
+                       <key>x264_b_adapt</key>
+                       <string>1</string>
                        <key>x264_bframes</key>
                        <integer>0</integer>
                        <key>x264_bpyramid</key>
@@ -7367,6 +7401,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
                        <string>x264_weighted_bframes</string>
                        <string>x264_bpyramid</string>
                        <string>x264_direct</string>
+                       <string>x264_b_adapt</string>
                </array>
                <key>x264_cabac</key>
                <array>
@@ -7779,6 +7814,15 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
                                <false />
                        </array>
                </array>
+               <key>x264_b_adapt</key>
+               <array>
+                       <array>
+                               <string>x264_bframes</string>
+                               <string>0</string>
+                               <true />
+                               <false />
+                       </array>
+               </array>
                <key>x264_bpyramid</key>
                <array>
                        <array>
index 1a1cbb1..0eeb9e3 100644 (file)
                <string>x264_weighted_bframes</string>
                <string>x264_bpyramid</string>
                <string>x264_direct</string>
+               <string>x264_b_adapt</string>
        </array>
        <key>x264_cabac</key>
        <array>
index 586d400..30a4fa7 100644 (file)
                        <false />
                </array>
        </array>
+       <key>x264_b_adapt</key>
+       <array>
+               <array>
+                       <string>x264_bframes</string>
+                       <string>0</string>
+                       <true />
+                       <false />
+               </array>
+       </array>
        <key>x264_bpyramid</key>
        <array>
                <array>
index 26c5c35..cad6049 100644 (file)
@@ -140,6 +140,7 @@ struct x264_opt_map_s
 static gchar *x264_ref_syns[] = {"ref", "frameref", NULL};
 static gchar *x264_mixed_syns[] = {"mixed-refs", "mixed_refs", NULL};
 static gchar *x264_bframes_syns[] = {"bframes", NULL};
+static gchar *x264_badapt_syns[] = {"b-adapt", "b_adapt", NULL};
 static gchar *x264_direct_syns[] = 
        {"direct", "direct-pred", "direct_pred", NULL};
 static gchar *x264_weightb_syns[] = {"weightb", "weight-b", "weight_b", NULL};
@@ -152,7 +153,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_psy_syns[] = {"psy-rd", "psy_rd", NULL};
 static gchar *x264_decimate_syns[] = 
        {"no-dct-decimate", "no_dct_decimate", NULL};
 static gchar *x264_cabac_syns[] = {"cabac", NULL};
@@ -175,6 +176,7 @@ struct x264_opt_map_s x264_opt_map[] =
        {x264_mixed_syns, "x264_mixed_refs", "0", X264_OPT_BOOL},
        {x264_bframes_syns, "x264_bframes", "0", X264_OPT_INT},
        {x264_direct_syns, "x264_direct", "spatial", X264_OPT_COMBO},
+       {x264_badapt_syns, "x264_b_adapt", "1", X264_OPT_COMBO},
        {x264_weightb_syns, "x264_weighted_bframes", "0", X264_OPT_BOOL},
        {x264_bpyramid_syns, "x264_bpyramid", "0", X264_OPT_BOOL},
        {x264_me_syns, "x264_me", "hex", X264_OPT_COMBO},
@@ -664,6 +666,7 @@ sanitize_x264opts(signal_user_data_t *ud, const gchar *options)
        {
                x264_remove_opt(split, x264_weightb_syns);
                x264_remove_opt(split, x264_direct_syns);
+               x264_remove_opt(split, x264_badapt_syns);
        }
        if (bframes <= 1)
        {