diff options
Diffstat (limited to 'libhb/encx264.c')
-rw-r--r-- | libhb/encx264.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c index a72a9603e..1bc24866c 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -77,11 +77,23 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) if( job->vquality >= 0.0 && job->vquality <= 1.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", + 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; + } } else { |