dest_str = ghb_settings_get_string(js, "destination");
job->file = dest_str;
- job->crf = 1;
const GValue *subtitle_list;
gint subtitle;
vqvalue = ghb_settings_get_double(settings, "VideoQualitySlider");
vq_desc = "Constant Quality:";
vqstr = g_strdup_printf("%d", (gint)vqvalue);
- vq_units = "(crf)";
+ vq_units = "(RF)";
}
fps = ghb_settings_get_string(settings, "VideoFramerate");
if (strcmp("source", fps) == 0)
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
int pass;
int h264_13;
int h264_level;
- int crf;
char *x264opts;
int areBframes;
int color_matrix;
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
{
}
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
{
static int chapter_end = 0;
static int chapter_markers = 0;
static char * marker_file = NULL;
-static int crf = 1;
static char *x264opts = NULL;
static char *x264opts2 = NULL;
static int maxHeight = 0;
}
vcodec = HB_VCODEC_X264;
job->vquality = 20.0;
- job->crf = 1;
if( !atracks )
{
atracks = strdup("1,1");
}
vcodec = HB_VCODEC_X264;
job->vquality = 20.0;
- job->crf = 1;
if( !atracks )
{
atracks = strdup("1");
job->largeFileSize = 1;
vcodec = HB_VCODEC_X264;
job->vquality = 20.0;
- job->crf = 1;
if( !atracks )
{
atracks = strdup("1,1");
}
vcodec = HB_VCODEC_X264;
job->vquality = 20.0;
- job->crf = 1;
if( !atracks )
{
atracks = strdup("1");
}
vcodec = HB_VCODEC_X264;
job->vquality = 20.0;
- job->crf = 1;
if( !atracks )
{
atracks = strdup("1,1");
job->file = strdup( output );
- if( crf )
- {
- job->crf = 1;
- }
-
if( color_matrix )
{
job->color_matrix = color_matrix;
" same style as mencoder:\n"
" option1=value1:option2=value2\n"
" -q, --quality <float> Set video quality (0.0..1.0)\n"
- " -Q, --cqp Use with -q for CQP instead of CRF\n"
" -S, --size <MB> Set target size\n"
" -b, --vb <kb/s> Set video bitrate (default: 1000)\n"
" -2, --two-pass Use two-pass mode\n"
{ "ab", required_argument, NULL, 'B' },
{ "rate", required_argument, NULL, 'r' },
{ "arate", required_argument, NULL, 'R' },
- { "cqp", no_argument, NULL, 'Q' },
{ "x264opts", required_argument, NULL, 'x' },
{ "turbo", no_argument, NULL, 'T' },
{ "maxHeight", required_argument, NULL, 'Y' },
int c;
c = getopt_long( argc, argv,
- "hv::uC:f:4i:Io:t:Lc:m::M:a:A:6:s:UF::N:e:E:2dD:7895gOw:l:n:b:q:S:B:r:R:Qx:TY:X:Z:z",
+ "hv::uC:f:4i:Io:t:Lc:m::M:a:A:6:s:UF::N:e:E:2dD:7895gOw:l:n:b:q:S:B:r:R:x:TY:X:Z:z",
long_options, &option_index );
if( c < 0 )
{
abitrates = strdup( optarg );
}
break;
- case 'Q':
- crf = 0;
- break;
case 'x':
x264opts = strdup( optarg );
break;