summaryrefslogtreecommitdiffstats
path: root/libhb
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
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')
-rw-r--r--libhb/common.h2
-rw-r--r--libhb/encx264.c44
-rw-r--r--libhb/work.c2
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
{