[x264-devel] Revert r2203
Jason Garrett-Glaser
git at videolan.org
Wed Jul 18 17:37:59 CEST 2012
x264 | branch: master | Jason Garrett-Glaser <jason at x264.com> | Wed Jul 18 08:33:41 2012 -0700| [7bbbe5fd6947ca0c671029c249c7a2f6d2f2f39a] | committer: Jason Garrett-Glaser
Revert r2203
People don't seem to like this so I'm just going to get rid of it.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=7bbbe5fd6947ca0c671029c249c7a2f6d2f2f39a
---
x264.c | 29 +++++++----------------------
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/x264.c b/x264.c
index 0744133..8dcc655 100644
--- a/x264.c
+++ b/x264.c
@@ -1694,7 +1694,6 @@ static int64_t print_status( int64_t i_start, int64_t i_previous, int i_frame, i
if( i_previous && i_time - i_previous < UPDATE_INTERVAL )
return i_previous;
int64_t i_elapsed = i_time - i_start;
- int secs = i_elapsed / 1000000;
double fps = i_elapsed > 0 ? i_frame * 1000000. / i_elapsed : 0;
double bitrate;
if( last_ts )
@@ -1704,14 +1703,13 @@ static int64_t print_status( int64_t i_start, int64_t i_previous, int i_frame, i
if( i_frame_total )
{
int eta = i_elapsed * (i_frame_total - i_frame) / ((int64_t)i_frame * 1000000);
- sprintf( buf, "x264 [%5.1f%%] %6d/%-6d %6.2f %9.2f %3d:%02d:%02d %3d:%02d:%02d",
+ sprintf( buf, "x264 [%.1f%%] %d/%d frames, %.2f fps, %.2f kb/s, eta %d:%02d:%02d",
100. * i_frame / i_frame_total, i_frame, i_frame_total, fps, bitrate,
- secs/3600, (secs/60)%60, secs%60, eta/3600, (eta/60)%60, eta%60 );
+ eta/3600, (eta/60)%60, eta%60 );
}
else
{
- sprintf( buf, "x264 %6d %6.2f %9.2f %3d:%02d:%02d",
- i_frame, fps, bitrate, secs/3600, (secs/60)%60, secs%60 );
+ sprintf( buf, "x264 %d frames: %.2f fps, %.2f kb/s", i_frame, fps, bitrate );
}
fprintf( stderr, "%s \r", buf+5 );
SetConsoleTitle( buf );
@@ -1801,14 +1799,6 @@ static int encode( x264_param_t *param, cli_opt_t *opt )
if( opt->tcfile_out )
fprintf( opt->tcfile_out, "# timecode format v2\n" );
- if( opt->b_progress )
- {
- if( param->i_frame_total )
- fprintf( stderr, " %6s %13s %6s %9s %9s %9s\n", "", "frames ", "fps ", "kb/s ", "elapsed", "remain " );
- else
- fprintf( stderr, "%6s %6s %9s %9s\n", "frames", "fps ", "kb/s ", "elapsed" );
- }
-
/* Encode frames */
for( ; !b_ctrl_c && (i_frame < param->i_frame_total || !param->i_frame_total); i_frame++ )
{
@@ -1904,11 +1894,8 @@ fail:
i_end = x264_mdate();
/* Erase progress indicator before printing encoding stats. */
- if( opt->b_progress && i_frame_output )
- {
- print_status( i_start, 0, i_frame_output, param->i_frame_total, i_file, param, 2 * last_dts - prev_dts - first_dts );
- fprintf( stderr, "\n" );
- }
+ if( opt->b_progress )
+ fprintf( stderr, " \r" );
if( h )
x264_encoder_close( h );
fprintf( stderr, "\n" );
@@ -1923,11 +1910,9 @@ fail:
{
double fps = (double)i_frame_output * (double)1000000 /
(double)( i_end - i_start );
- int secs = (i_end - i_start) / 1000000;
- fprintf( stderr, "encoded %d frames, %.2f fps, %.2f kb/s, duration %d:%02d:%02d.%02d\n", i_frame_output, fps,
- (double) i_file * 8 / ( 1000 * duration ),
- secs/3600, (secs/60)%60, secs%60, (int)((i_end - i_start)%1000000/10000) );
+ fprintf( stderr, "encoded %d frames, %.2f fps, %.2f kb/s\n", i_frame_output, fps,
+ (double) i_file * 8 / ( 1000 * duration ) );
}
return retval;
More information about the x264-devel
mailing list