param->rc.i_vbv_buffer_size = 0;
param->rc.f_vbv_buffer_init = 0.9;
param->rc.i_qp_constant = 26;
- param->rc.i_rf_constant = 0;
+ param->rc.f_rf_constant = 0;
param->rc.i_qp_min = 10;
param->rc.i_qp_max = 51;
param->rc.i_qp_step = 4;
}
OPT("crf")
{
- p->rc.i_rf_constant = atoi(value);
+ p->rc.f_rf_constant = atof(value);
p->rc.i_rc_method = X264_RC_CRF;
}
OPT2("qpmin", "qp-min")
if( p->rc.i_rc_method == X264_RC_ABR || p->rc.i_rc_method == X264_RC_CRF )
{
if( p->rc.i_rc_method == X264_RC_CRF )
- s += sprintf( s, " crf=%d", p->rc.i_rf_constant );
+ s += sprintf( s, " crf=%.1f", p->rc.f_rf_constant );
else
s += sprintf( s, " bitrate=%d ratetol=%.1f",
p->rc.i_bitrate, p->rc.f_rate_tolerance );
x264_log( h, X264_LOG_ERROR, "invalid RC method\n" );
return -1;
}
- h->param.rc.i_rf_constant = x264_clip3( h->param.rc.i_rf_constant, 0, 51 );
+ h->param.rc.f_rf_constant = x264_clip3f( h->param.rc.f_rf_constant, 0, 51 );
h->param.rc.i_qp_constant = x264_clip3( h->param.rc.i_qp_constant, 0, 51 );
if( h->param.rc.i_rc_method == X264_RC_CRF )
- h->param.rc.i_qp_constant = h->param.rc.i_rf_constant;
+ h->param.rc.i_qp_constant = h->param.rc.f_rf_constant;
if( (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF)
&& h->param.rc.i_qp_constant == 0 )
{
if( rc->b_abr )
{
/* FIXME ABR_INIT_QP is actually used only in CRF */
-#define ABR_INIT_QP ( h->param.rc.i_rc_method == X264_RC_CRF ? h->param.rc.i_rf_constant : 24 )
+#define ABR_INIT_QP ( h->param.rc.i_rc_method == X264_RC_CRF ? h->param.rc.f_rf_constant : 24 )
rc->accum_p_norm = .01;
rc->accum_p_qp = ABR_INIT_QP * rc->accum_p_norm;
/* estimated ratio that produces a reasonable QP for the first I-frame */
/* arbitrary rescaling to make CRF somewhat similar to QP */
double base_cplx = h->mb.i_mb_count * (h->param.i_bframe ? 120 : 80);
rc->rate_factor_constant = pow( base_cplx, 1 - h->param.rc.f_qcompress )
- / qp2qscale( h->param.rc.i_rf_constant );
+ / qp2qscale( h->param.rc.f_rf_constant );
}
rc->ip_offset = 6.0 * log(h->param.rc.f_ip_factor) / log(2.0);
{ "keyint", required_argument, NULL, 'I' },
{ "scenecut",required_argument, NULL, 0 },
{ "nf", no_argument, NULL, 0 },
- { "nodeblock", no_argument, NULL, 0 },
+ { "no-deblock", no_argument, NULL, 0 },
{ "filter", required_argument, NULL, 0 },
{ "deblock", required_argument, NULL, 'f' },
{ "interlaced", no_argument, NULL, 0 },
#include <stdarg.h>
-#define X264_BUILD 53
+#define X264_BUILD 54
/* x264_t:
* opaque handler for encoder */
int i_qp_step; /* max QP step between frames */
int i_bitrate;
- int i_rf_constant; /* 1pass VBR, nominal QP */
+ float f_rf_constant; /* 1pass VBR, nominal QP */
float f_rate_tolerance;
int i_vbv_max_bitrate;
int i_vbv_buffer_size;