GHashTable *track_indicies;
gint *iptr;
- GValue *pref_audio;
- GValue *audio, *acodec, *bitrate, *rate, *mix, *drc;
+ const GValue *pref_audio;
+ const GValue *audio, *acodec, *bitrate, *rate, *mix, *drc;
gint count, ii, list_count;
g_debug("set_pref_audio");
{
static gint unique_id = 1;
gchar *type, *modified, *preset;
- GValue *path;
+ const GValue *path;
gboolean preset_modified;
g_debug("submit_job");
-1);
gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &index, -1);
- GValue *chapters;
+ const GValue *chapters;
GValue *chapter;
chapters = ghb_settings_get_value(ud->settings, "chapter_list");
<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 sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property>
- <signal handler="x264_widget_changed_cb" name="changed"/>
+ <signal handler="x264_me_changed_cb" name="changed"/>
</object>
</child>
</object>
static options_map_t d_me_opts[] =
{
- {"Diamond", "dia", 0, "dia"},
- {"Hexagon", "hex", 1, "hex"},
- {"Uneven Multi-Hexagon", "umh", 2, "umh"},
- {"Exhaustive", "esa", 3, "esa"},
+ {"Diamond", "dia", 0, "dia"},
+ {"Hexagon", "hex", 1, "hex"},
+ {"Uneven Multi-Hexagon", "umh", 2, "umh"},
+ {"Exhaustive", "esa", 3, "esa"},
+ {"Hadamard Exhaustive", "tesa", 4, "tesa"},
};
combo_opts_t me_opts =
{
{"x264_bframes", "x264_direct", "0", TRUE},
{"x264_refs", "x264_mixed_refs", "<2", TRUE},
{"x264_cabac", "x264_trellis", "TRUE", FALSE},
- {"x264_me", "x264_merange", "umh|esa", FALSE},
{"ChapterMarkers", "chapters_list", "TRUE", FALSE},
{"use_source_name", "chapters_in_destination", "TRUE", FALSE},
};
GtkListStore *store;
gboolean done;
gint row = 0;
- GValue *audio_list;
+ const GValue *audio_list;
g_debug("ghb_audio_list_refresh ()");
treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list"));
"ire frame. You are best off using Uneven Multi-Hexagonal searching.<"
"/property>\n"
" <signal handler=&quo"
-"t;x264_widget_changed_cb" name="changed"/>\n"
+"t;x264_me_changed_cb" name="changed"/>\n"
" </object>\n"
" </child>\n"
" </object>\n"
" <array>\n"
" <string>x264_trellis</string>\n"
" </array>\n"
-" <key>x264_me</key>\n"
-" <array>\n"
-" <string>x264_merange</string>\n"
-" </array>\n"
" <key>x264_refs</key>\n"
" <array>\n"
" <string>x264_mixed_refs</string>\n"
" <true />\n"
" </array>\n"
" </array>\n"
-" <key>x264_merange</key>\n"
-" <array>\n"
-" <array>\n"
-" <string>x264_me</string>\n"
-" <string>umh|esa</string>\n"
-" <false />\n"
-" </array>\n"
-" </array>\n"
" <key>x264_mixed_refs</key>\n"
" <array>\n"
" <array>\n"
<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 sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property>
- <signal handler="x264_widget_changed_cb" name="changed"/>
+ <signal handler="x264_me_changed_cb" name="changed"/>
</object>
</child>
</object>
<array>
<string>x264_trellis</string>
</array>
- <key>x264_me</key>
- <array>
- <string>x264_merange</string>
- </array>
<key>x264_refs</key>
<array>
<string>x264_mixed_refs</string>
<true />
</array>
</array>
- <key>x264_merange</key>
- <array>
- <array>
- <string>x264_me</string>
- <string>umh|esa</string>
- <false />
- </array>
- </array>
<key>x264_mixed_refs</key>
<array>
<array>
}
GValue*
-ghb_settings_get_value(GValue *settings, const gchar *key)
+ghb_settings_get_value(const GValue *settings, const gchar *key)
{
GValue *value;
value = ghb_dict_lookup(settings, key);
}
gboolean
-ghb_settings_get_boolean(GValue *settings, const gchar *key)
+ghb_settings_get_boolean(const GValue *settings, const gchar *key)
{
const GValue* value;
value = ghb_settings_get_value(settings, key);
}
gint64
-ghb_settings_get_int64(GValue *settings, const gchar *key)
+ghb_settings_get_int64(const GValue *settings, const gchar *key)
{
const GValue* value;
value = ghb_settings_get_value(settings, key);
}
gint
-ghb_settings_get_int(GValue *settings, const gchar *key)
+ghb_settings_get_int(const GValue *settings, const gchar *key)
{
const GValue* value;
value = ghb_settings_get_value(settings, key);
}
gdouble
-ghb_settings_get_double(GValue *settings, const gchar *key)
+ghb_settings_get_double(const GValue *settings, const gchar *key)
{
const GValue* value;
value = ghb_settings_get_value(settings, key);
}
gchar*
-ghb_settings_get_string(GValue *settings, const gchar *key)
+ghb_settings_get_string(const GValue *settings, const gchar *key)
{
const GValue* value;
value = ghb_settings_get_value(settings, key);
}
gint
-ghb_settings_combo_int(GValue *settings, const gchar *key)
+ghb_settings_combo_int(const GValue *settings, const gchar *key)
{
return ghb_lookup_combo_int(key, ghb_settings_get_value(settings, key));
}
const gchar*
-ghb_settings_combo_option(GValue *settings, const gchar *key)
+ghb_settings_combo_option(const GValue *settings, const gchar *key)
{
return ghb_lookup_combo_option(key, ghb_settings_get_value(settings, key));
}
GValue *settings, const gchar *key, gboolean bval);
void ghb_settings_copy(
GValue *settings, const gchar *key, const GValue *value);
-GValue* ghb_settings_get_value(GValue *settings, const gchar *key);
-gboolean ghb_settings_get_boolean(GValue *settings, const gchar *key);
-gint64 ghb_settings_get_int64(GValue *settings, const gchar *key);
-gint ghb_settings_get_int(GValue *settings, const gchar *key);
-gdouble ghb_settings_get_double(GValue *settings, const gchar *key);
-gchar* ghb_settings_get_string(GValue *settings, const gchar *key);
-gint ghb_settings_combo_int(GValue *settings, const gchar *key);
-const gchar* ghb_settings_combo_option(GValue *settings, const gchar *key);
+GValue* ghb_settings_get_value(const GValue *settings, const gchar *key);
+gboolean ghb_settings_get_boolean(const GValue *settings, const gchar *key);
+gint64 ghb_settings_get_int64(const GValue *settings, const gchar *key);
+gint ghb_settings_get_int(const GValue *settings, const gchar *key);
+gdouble ghb_settings_get_double(const GValue *settings, const gchar *key);
+gchar* ghb_settings_get_string(const GValue *settings, const gchar *key);
+gint ghb_settings_combo_int(const GValue *settings, const gchar *key);
+const gchar* ghb_settings_combo_option(const GValue *settings, const gchar *key);
GValue* ghb_widget_value(GtkWidget *widget);
gchar* ghb_widget_string(GtkWidget *widget);
}
GValue*
-ghb_dict_lookup(GValue *gval, const gchar *key)
+ghb_dict_lookup(const GValue *gval, const gchar *key)
{
GHashTable *dict = g_value_get_boxed(gval);
return g_hash_table_lookup(dict, key);
void ghb_dict_insert(GValue *gval, gchar *key, GValue *val);
void ghb_dict_iter_init(GHashTableIter *iter, GValue *gval);
-GValue* ghb_dict_lookup(GValue *gval, const gchar *key);
+GValue* ghb_dict_lookup(const GValue *gval, const gchar *key);
gboolean ghb_dict_remove(GValue *gval, const gchar *key);
void ghb_register_transforms(void);
<array>
<string>x264_trellis</string>
</array>
- <key>x264_me</key>
- <array>
- <string>x264_merange</string>
- </array>
<key>x264_refs</key>
<array>
<string>x264_mixed_refs</string>
<true />
</array>
</array>
- <key>x264_merange</key>
- <array>
- <array>
- <string>x264_me</string>
- <string>umh|esa</string>
- <false />
- </array>
- </array>
<key>x264_mixed_refs</key>
<array>
<array>
#include "values.h"
#include "callbacks.h"
#include "presets.h"
+#include "hb-backend.h"
#include "x264handler.h"
static void x264_opt_update(signal_user_data_t *ud, GtkWidget *widget);
ghb_clear_presets_selection(ud);
}
+void
+x264_me_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const GValue *gval;
+ gint me;
+
+ ghb_widget_to_setting(ud->settings, widget);
+ if (!ignore_options_update)
+ {
+ ignore_options_update = TRUE;
+ x264_opt_update(ud, widget);
+ ignore_options_update = FALSE;
+ }
+ ghb_check_dependency(ud, widget);
+ ghb_clear_presets_selection(ud);
+ widget = GHB_WIDGET(ud->builder, "x264_merange");
+ gval = ghb_settings_get_value(ud->settings, "x264_me");
+ me = ghb_lookup_combo_int("x264_me", gval);
+ if (me < 2)
+ { // me < umh
+ // me_range 4 - 16
+ gtk_spin_button_set_range(GTK_SPIN_BUTTON(widget), 4, 16);
+ }
+ else
+ {
+ // me_range 4 - 64
+ gtk_spin_button_set_range(GTK_SPIN_BUTTON(widget), 4, 64);
+ }
+}
+
void
x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
{
x264_remove_opt(split, x264_bpyramid_syns);
}
- gchar *me = ghb_settings_get_string(ud->settings, "x264_me");
- if (!(strcmp(me, "umh") == 0 || strcmp(me, "esa") == 0))
- {
- x264_remove_opt(split, x264_merange_syns);
- }
- g_free(me);
if (!ghb_settings_get_boolean(ud->settings, "x264_cabac"))
{
x264_remove_opt(split, x264_trellis_syns);