summaryrefslogtreecommitdiffstats
path: root/libhb/encx264.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-10-19 20:32:20 +0000
committerjstebbins <[email protected]>2009-10-19 20:32:20 +0000
commit23fb2706d3b4e2594829d70275df8c4c21f07688 (patch)
treeb800967dbbbf21c062b35762a2ce70fdf6219a77 /libhb/encx264.c
parent41dc72b96a5b99eb0d80439b95c0b02efc9f84af (diff)
remove crf flag and all uses of it
x264 encodes will only use crf now. qp mode is gone. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2891 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encx264.c')
-rw-r--r--libhb/encx264.c44
1 files changed, 8 insertions, 36 deletions
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
{