[MPlayer-dev-eng] [PATCH] mplayer.c fix (growing fps numbers with -benchmark -framedrop in mf mode)
Balazs Tibor
tibcu at sch.bme.hu
Mon Jun 24 18:01:05 CEST 2002
Hi!
Like I said on #MPlayerDEV, mplayer.c needs this one line modification
(see attachment) in order to display fps values correctly in multifile
mode if -benchmark and -framedrop are given.
(Note:
BENCHMARKn: disp: 387 (23.63 fps) drop: 0 (0%) total: 387 (23.63 fps)
^^^ this number is the decoded frame number before
audio stream ends
A: 16.5 V: 16.6 A-V: -0.095 ct: -0.743 387/387 38% 5% 4.8% 0 0 0%
^^^^^^^
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: audio)
...
but after video stream ends too, the numbers are higher
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
A: 16.7 V: 16.9 A-V: -0.203 ct: -0.780 397/397 38% 5% 4.7% 0 0 0%
^^^^^^^
So my patch extends the current behaviour to all the files played in
multifile mode - the first file gives the same results with and without
this patch.
But I have a version too, which uses the bigger (and maybe more correct)
numbers (then in above case, the fps is >24 (24.23) while the original
fps (is 24) as can be seen:
VIDEO: MPEG1 352x288 (aspect 8) 24.00 fps 1372.5 kbps (171.6 kbyte/s)
So which one do you prefer, the one that sais a bit lower than the original
fps or the one that sais a bit higher? (the latter one uses
(int)sh_video->num_frames instead of total_frame_cnt))
Logs of the bad, good1 and good2 cases can be found on
mphq/~tibcu/mf{1,2,3}.txt
Patch is against fresh CVS of course.
--
-=+=- Tibcu -=+=-
-------------- next part --------------
--- old/mplayer.c Mon Jun 24 13:29:09 2002
+++ new/mplayer.c Mon Jun 24 17:11:36 2002
@@ -1488,6 +1488,7 @@
total_time_usage_start=GetTimer();
audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
+total_frame_cnt=0; drop_frame_cnt=0; // fix for multifile fps benchmark
while(!eof){
float aq_sleep_time=0;
More information about the MPlayer-dev-eng
mailing list