diff options
author | wm4 <wm4@nowhere> | 2012-07-30 00:27:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-07-30 01:49:35 +0200 |
commit | 0f48820eccdce95047a3d5c025a660e79ad48239 (patch) | |
tree | f9edb2aafd848950027e4a5cc7c2defc2cfc9d22 /libmpcodecs | |
parent | 69c13af3812c0b5da289493ff2a348326cf97b30 (diff) | |
download | mpv-0f48820eccdce95047a3d5c025a660e79ad48239.tar.bz2 mpv-0f48820eccdce95047a3d5c025a660e79ad48239.tar.xz |
mplayer: remove benchmarking/CPU accounting code
The code used for benchmarking and showing CPU stats in the status line
was inaccurate, misleading and fragile. The final nail in the coffin is
the fact that many libav decoders are multithreaded now, and mplayer
couldn't possibly measure the CPU time consumed by them.
Add the --untimed option. This makes the video untimed, just like
--benchmark did (still requires disabling audio synchronization).
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/dec_video.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 1f4ce7497e..a221a089b4 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -46,9 +46,6 @@ // =================================================================== -extern double video_time_usage; -extern double vout_time_usage; - #include "cpudetect.h" int field_dominance = -1; @@ -406,9 +403,6 @@ void *decode_video(sh_video_t *sh_video, struct demux_packet *packet, int drop_frame, double pts) { mp_image_t *mpi = NULL; - unsigned int t = GetTimer(); - unsigned int t2; - double tt; struct MPOpts *opts = sh_video->opts; if (opts->correct_pts && pts != MP_NOPTS_VALUE) { @@ -460,11 +454,6 @@ void *decode_video(sh_video_t *sh_video, struct demux_packet *packet, } #endif - t2 = GetTimer(); - t = t2 - t; - tt = t * 0.000001f; - video_time_usage += tt; - if (!mpi || drop_frame) return NULL; // error / skipped frame @@ -501,13 +490,7 @@ void *decode_video(sh_video_t *sh_video, struct demux_packet *packet, int filter_video(sh_video_t *sh_video, void *frame, double pts) { mp_image_t *mpi = frame; - unsigned int t2 = GetTimer(); vf_instance_t *vf = sh_video->vfilter; // apply video filters and call the leaf vo/ve - int ret = vf->put_image(vf, mpi, pts); - - t2 = GetTimer() - t2; - vout_time_usage += t2 * 0.000001; - - return ret; + return vf->put_image(vf, mpi, pts); } |