From cca9c898d2f57047ab2cdabee8c794ddf2775aa7 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Wed, 28 Mar 2012 23:09:08 +0000 Subject: encx264: use x264_param_apply_fastfirstpass. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/common.h | 1 + libhb/encx264.c | 6 ++++++ libhb/work.c | 8 ++++++++ 3 files changed, 15 insertions(+) (limited to 'libhb') diff --git a/libhb/common.h b/libhb/common.h index 1f9dfa97a..e8ca7e1fd 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -291,6 +291,7 @@ struct hb_job_s int vrate_base; int cfr; int pass; + int fastfirstpass; char *advanced_opts; char *x264_profile; char *x264_preset; diff --git a/libhb/encx264.c b/libhb/encx264.c index 7836b9add..f48aa499a 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -263,6 +263,12 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) hb_apply_h264_level( ¶m, job->h264_level, job->x264_profile ); } + /* Turbo first pass */ + if( job->pass == 1 && job->fastfirstpass == 1 ) + { + x264_param_apply_fastfirstpass( ¶m ); + } + /* B-frames are on by default.*/ job->areBframes = 1; diff --git a/libhb/work.c b/libhb/work.c index 7b84cd30b..96c3b9263 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -369,6 +369,14 @@ void hb_display_job_info( hb_job_t * job ) else { hb_log( " + bitrate: %d kbps, pass: %d", job->vbitrate, job->pass ); + if( job->pass == 1 && job->fastfirstpass == 1 && + job->vcodec == HB_VCODEC_X264 ) + { + hb_log( " + fast first pass" ); + hb_log( " + options: ref=1:8x8dct=0:me=dia:trellis=0" ); + hb_log( " analyse=i4x4 (if originally enabled, else analyse=none)" ); + hb_log( " subq=2 (if originally greater than 2, else subq unchanged)" ); + } } } -- cgit v1.2.3