Index: encoder/encoder.c =================================================================== --- encoder/encoder.c (révision 8) +++ encoder/encoder.c (révision 9) @@ -54,6 +54,7 @@ #define TIMER_STOP( d ) \ d += x264_mdate() - d##start;\ } + #else #define TIMER_START( d ) #define TIMER_STOP( d ) @@ -64,7 +65,7 @@ static void x264_encoder_frame_end( x264_t *h, x264_t *thread_current, x264_nal_t **pp_nal, int *pi_nal, x264_picture_t *pic_out ); - +static void x264_encoder_frame_stat(x264_t *h, x264_t *thread_current); /**************************************************************************** * ******************************* x264 libs ********************************** @@ -1316,6 +1317,7 @@ if( h->frames.next[0] == NULL ) { x264_encoder_frame_end( thread_oldest, thread_current, pp_nal, pi_nal, pic_out ); + x264_encoder_frame_stat(thread_oldest, thread_current); return 0; } @@ -1581,6 +1583,9 @@ } x264_encoder_frame_end( thread_oldest, thread_current, pp_nal, pi_nal, pic_out ); + TIMER_STOP( i_mtime_encode_frame ); + x264_encoder_frame_stat(thread_oldest, thread_current); + return 0; } @@ -1589,7 +1594,6 @@ x264_picture_t *pic_out ) { int i; - char psz_message[80]; if( h->b_thread_active ) { @@ -1634,9 +1638,13 @@ x264_cpu_restore( h->param.cpu ); x264_noise_reduction_update( h ); +} +static void x264_encoder_frame_stat( x264_t *h, x264_t *thread_current) +{ +// TIMER_STOP( i_mtime_encode_frame ); + int i; + char psz_message[80]; - TIMER_STOP( i_mtime_encode_frame ); - /* ---------------------- Compute/Print statistics --------------------- */ x264_thread_sync_stat( h, h->thread[0] );