X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=libhb%2Fencx264.c;h=bd41839a127fa213ae86a64555bacd2a6cba5568;hb=033e32de9c380f54c7d1362a3979da205ebc3a29;hp=99dc351938d237c98456b9723f26ba36e15522e0;hpb=5a8c3011c696864010f1d819ac4513c90ff2a97c;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/encx264.c b/libhb/encx264.c index 99dc3519..bd41839a 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -86,7 +86,7 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) x264_param_default( ¶m ); - /* Temporarily default mbtree to off for baseline, + /* Default weightp to off for baseline, overridable through x264 option strings. */ if( job->x264opts != NULL && *job->x264opts != '\0' ) { @@ -124,7 +124,7 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) { if( atoi( value ) == 0 ) { - param.rc.b_mb_tree = 0; + param.analyse.i_weighted_pred = X264_WEIGHTP_NONE; } } } @@ -255,6 +255,14 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) { job->areBframes = 2; } + if( value == NULL || !strcmp( value, "1" ) ) + { + value = "normal"; + } + else if( !strcmp( value, "0" ) ) + { + value = "none"; + } } /* Here's where the strings are passed to libx264 for parsing. */ @@ -312,47 +320,19 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) if( job->vquality > 0.0 && job->vquality < 1.0 ) { - switch( job->crf ) - { - case 1: - /*Constant RF*/ - param.rc.i_rc_method = X264_RC_CRF; - param.rc.f_rf_constant = 51 - job->vquality * 51; - hb_log( "encx264: Encoding at constant RF %f", - param.rc.f_rf_constant ); - break; - - case 0: - /*Constant QP*/ - param.rc.i_rc_method = X264_RC_CQP; - param.rc.i_qp_constant = 51 - job->vquality * 51; - hb_log( "encx264: encoding at constant QP %d", - param.rc.i_qp_constant ); - break; - } + /*Constant RF*/ + param.rc.i_rc_method = X264_RC_CRF; + param.rc.f_rf_constant = 51 - job->vquality * 51; + hb_log( "encx264: Encoding at constant RF %f", param.rc.f_rf_constant ); } else if( job->vquality == 0 || job->vquality >= 1.0 ) { /* Use the vquality as a raw RF or QP instead of treating it like a percentage. */ - switch( job->crf ) - { - case 1: - /*Constant RF*/ - param.rc.i_rc_method = X264_RC_CRF; - param.rc.f_rf_constant = job->vquality; - hb_log( "encx264: Encoding at constant RF %f", - param.rc.f_rf_constant ); - break; - - case 0: - /*Constant QP*/ - param.rc.i_rc_method = X264_RC_CQP; - param.rc.i_qp_constant = job->vquality; - hb_log( "encx264: encoding at constant QP %d", - param.rc.i_qp_constant ); - break; - } + /*Constant RF*/ + param.rc.i_rc_method = X264_RC_CRF; + param.rc.f_rf_constant = job->vquality; + hb_log( "encx264: Encoding at constant RF %f", param.rc.f_rf_constant ); } else {