int buffer_size;
int rcbufrate;
int init_qp;
+ int qp_constant[5];
/* 1st pass stuff */
int gop_qp;
rc->qpa = rc->qp;
rc->qpm = rc->qp;
+ rc->qp_constant[SLICE_TYPE_P] = h->param.rc.i_qp_constant;
+ rc->qp_constant[SLICE_TYPE_I] = x264_clip3( (int)( qscale2qp( qp2qscale( h->param.rc.i_qp_constant ) / fabs( h->param.rc.f_ip_factor )) + 0.5 ), 0, 51 );
+ rc->qp_constant[SLICE_TYPE_B] = x264_clip3( (int)( qscale2qp( qp2qscale( h->param.rc.i_qp_constant ) * fabs( h->param.rc.f_pb_factor )) + 0.5 ), 0, 51 );
+
/* Init 1pass CBR algo */
if( h->param.rc.b_cbr ){
rc->buffer_size = h->param.rc.i_rc_buffer_size * 1000;
}
else if( !h->param.rc.b_cbr )
{
+ rc->qpm = rc->qpa = rc->qp =
+ rc->qp_constant[ i_slice_type ];
return;
}