[MPlayer-dev-eng] Better double frame rate output and framedrop
Vicente Sendra
visenri at yahoo.es
Mon Sep 17 00:46:31 CEST 2012
I've been developing a new system for double frame rate output (for filters like yadif and tfields) that solves 3 problems with mplayer:
1-You get exact double framerate timing, old system did 2 continuous page flips, resulting in two frames very close in time, depending on your video card refresh rate.
2-New system always pushes filter frames to queue and gets them in mplayer.c main loop with vf_output_queued_frame, so they can be framedropped if needed.
3-New framedrop system for framerates > video card refresh rate, that resulted in 100% cpu usage with vsync activated, because page flip gets blocked with full buffer until next video card refresh. New system checks page flip time and if it gets too big, it starts dropping interpolated frames, if no interpolated frames or if dropping them is not enougth, only then full frames are dropped, this problem is very old but now it's very annoying because most lcd monitors can't go > 60hz (my old CRT was set to 75Hz, so no problem here).
Others: Solved a message (Bad mp_image usage count, please report) triggered by http://list-archives.org/2012/08/31/mplayer-cvslog-mplayerhq-hu/r35134-trunk-libmpcodecs-vd_ffmpeg-c/f/7358755939
(shows when deinterlace filter is loaded and is deactivated while running, affecting filters kerndeint and yadif)
TODO:
In correct-pts mode, pts time for interpolated frames is not calculated, it's a fixed value (16.67ms), this problem is very old and needs a fix, but it's not critical as correct-pts mode itself is very buggy with some demuxers/codecs.
Some new variables related to framedropping are global for easier debugging, may be changed if needed.
All testing has been done over r35196.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_kerndeint.diff
Type: application/octet-stream
Size: 555 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120916/0d4cc1cd/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_tfields.diff
Type: application/octet-stream
Size: 5992 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120916/0d4cc1cd/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_yadif.diff
Type: application/octet-stream
Size: 1875 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120916/0d4cc1cd/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer.diff
Type: application/octet-stream
Size: 23765 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120916/0d4cc1cd/attachment-0007.obj>
More information about the MPlayer-dev-eng
mailing list