h->param.rc.f_qblur = 0;
if( h->param.rc.f_complexity_blur < 0 )
h->param.rc.f_complexity_blur = 0;
+ if( h->param.sc.i_buffer_size < 0 || h->param.sc.f_speed <= 0 )
+ h->param.sc.i_buffer_size = 0;
h->param.i_sps_id &= 31;
mbcmp_init( h );
chroma_dsp_init( h );
+ if( h->param.sc.i_buffer_size )
+ x264_speedcontrol_new( h );
+
+
p = buf + sprintf( buf, "using cpu capabilities:" );
for( int i = 0; x264_cpu_names[i].flags; i++ )
{
overhead += h->out.nal[h->out.i_nal-1].i_payload + h->out.nal[h->out.i_nal-1].i_padding + SEI_OVERHEAD;
}
+ /* Init the speed control */
+ if( h->param.sc.i_buffer_size )
+ x264_speedcontrol_frame( h );
+
/* Init the rate control */
/* FIXME: Include slice header bit cost. */
x264_ratecontrol_start( h, h->fenc->i_qpplus1, overhead*8 );
x264_noise_reduction_update( h );
+ if( h->param.sc.i_buffer_size )
+ x264_speedcontrol_frame_end( h );
+
/* ---------------------- Compute/Print statistics --------------------- */
x264_thread_sync_stat( h, h->thread[0] );
/* rc */
x264_ratecontrol_delete( h );
+ x264_speedcontrol_delete( h );
/* param */
if( h->param.rc.psz_stat_out )