diff options
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/common.h | 2 | ||||
-rw-r--r-- | libhb/encx264.c | 44 | ||||
-rw-r--r-- | libhb/work.c | 2 |
3 files changed, 9 insertions, 39 deletions
diff --git a/libhb/common.h b/libhb/common.h index fb1f21198..15ab737bd 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -209,7 +209,6 @@ struct hb_job_s cfr: 0 (vfr), 1 (cfr), 2 (pfr) [see render.c] pass: 0, 1 or 2 (or -1 for scan) h264_level: vestigial boolean to decide if we're encoding for iPod - crf: boolean for whether to use constant rate factor with x264 x264opts: string of extra x264 options areBframes: boolean to note if b-frames are included in x264opts */ #define HB_VCODEC_MASK 0x0000FF @@ -227,7 +226,6 @@ struct hb_job_s int pass; int h264_13; int h264_level; - int crf; char *x264opts; int areBframes; int color_matrix; diff --git a/libhb/encx264.c b/libhb/encx264.c index 99dc35193..efccf7c05 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -312,47 +312,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 { diff --git a/libhb/work.c b/libhb/work.c index 752839bce..2209b15f2 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -273,7 +273,7 @@ void hb_display_job_info( hb_job_t * job ) } else if( job->vquality > 1 ) { - hb_log( " + quality: %.2f %s", job->vquality, job->crf && job->vcodec == HB_VCODEC_X264 ? "(RF)" : "(QP)" ); + hb_log( " + quality: %.2f %s", job->vquality, job->vcodec == HB_VCODEC_X264 ? "(RF)" : "(QP)" ); } else { |