summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-03-28 23:09:08 +0000
committerRodeo <[email protected]>2012-03-28 23:09:08 +0000
commitcca9c898d2f57047ab2cdabee8c794ddf2775aa7 (patch)
tree00092d02ab4c0d905296f875c5f1f3865aa23ad9 /gtk/src
parenta9d238763d17fafb04f96deed93b798310303f7d (diff)
encx264: use x264_param_apply_fastfirstpass.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/hb-backend.c58
1 files changed, 6 insertions, 52 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index e48f8eaba..2b2b66348 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3083,12 +3083,6 @@ init_ui_combo_boxes(GtkBuilder *builder)
init_combo_box(builder, combo_name_map[ii].name);
}
}
-
-static const char * turbo_lavc_opts = "";
-
-static const char * turbo_x264_opts =
- "ref=1:subme=2:me=dia:analyse=none:trellis=0:"
- "no-fast-pskip=0:8x8dct=0";
// Construct the advanced options string
// The result is allocated, so someone must free it at some point.
@@ -5176,58 +5170,19 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
*/
job->pass = 1;
job->indepth_scan = 0;
+ job->advanced_opts = advanced_opts;
/*
- * If turbo options have been selected then append them
- * to the advanced_opts now (size includes one ':' and the '\0')
+ * If turbo options have been selected then set job->fastfirstpass
*/
- if( ghb_settings_get_boolean(js, "VideoTurboTwoPass") )
+ if( ghb_settings_get_boolean(js, "VideoTurboTwoPass") &&
+ job->vcodec == HB_VCODEC_X264 )
{
- gchar *tmp_advanced_opts;
- gchar *extra_opts;
-
- if (job->vcodec == HB_VCODEC_X264)
- {
- gint badapt;
-
- badapt = ghb_lookup_badapt(advanced_opts);
- if (badapt == 2)
- {
- extra_opts = g_strdup_printf("%s", turbo_x264_opts);
- }
- else
- {
- extra_opts = g_strdup_printf("%s:weightb=0", turbo_x264_opts);
- }
- }
- else if (job->vcodec == HB_VCODEC_FFMPEG_MPEG4)
- {
- extra_opts = g_strdup_printf("%s", turbo_lavc_opts);
- }
- else
- {
- extra_opts = g_strdup("");
- }
-
- if ( advanced_opts )
- {
- tmp_advanced_opts = g_strdup_printf("%s:%s", advanced_opts, extra_opts);
- }
- else
- {
- /*
- * No advanced_opts to modify, but apply the turbo options
- * anyway as they may be modifying defaults
- */
- tmp_advanced_opts = g_strdup_printf("%s", extra_opts);
- }
- g_free(extra_opts);
-
- job->advanced_opts = tmp_advanced_opts;
+ job->fastfirstpass = 1;
}
else
{
- job->advanced_opts = advanced_opts;
+ job->fastfirstpass = 0;
}
job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
hb_add( h, job );
@@ -5242,7 +5197,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
* attribute of the job).
*/
job->indepth_scan = 0;
- job->advanced_opts = advanced_opts;
job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24);
hb_add( h, job );
//if (job->advanced_opts != NULL)