[MPlayer-dev-eng] Better double frame rate output and framedrop
Vicente Sendra
visenri at yahoo.es
Sun Sep 23 22:07:46 CEST 2012
Any problems adding this new syste to current code?
I add some notes to better understand the changes:
Changes in filters (vf_tfields, vf_yadiff) just avoid calls to vf_extra_flip function (this is no longer used, so, it can be removed from vf.c) and put new frame in queue with vf_queue_frame .
---
In filters that allow passthru mode (vf_yadif, vf_kerndeint) I've added:
mpi->usage_count++;
before calling vf_next_put_image.
as it's done in vf_get_image
if(vf->put_image==vf_next_put_image){
// passthru mode, if the filter uses the fallback/default put_image() code
mpi = vf_get_image(vf->next,outfmt,mp_imgtype,mp_imgflag,w,h);
mpi->usage_count++;
return mpi;
}
This solves "Bad mp_image usage count, please report" message.
---
A new function, reset_stats_and_framedrop, is added to reset some variables, as these same initializations were used in multiple places.
---
Some time measurements and calculations are done around call to
mpctx->video_out->flip_page()
to check if video page flip is taking too much time.
---
check_framedrop function has been changed to take into account new information from mpctx->video_out->flip_page().
---
added execute_framedrop function, it's called every time check_framedrop decides to drop a frame, it updates some variables for the new framedrop system and original stats variables.
---
In function update_video, a new frame is generated from vf_output_queued_frame, or if no frames are queued, old code takes care of new frame.
In pts mode, function update_video calls generate_video_frame to generate video data, and it was already using vf_output_queued_frame, so the changes only add framedropping capability by calling check_framedrop.
---
Changes in mplayer.c have a minimal effect (and normally nothing at all) on old framedrop when not using these filters (strictly speaking, when output frame rate is much lower than actual video card refresh rate).
The framedrop system adapts itself on the fly if video filters are disabled while playing (vf_yadif, vf_kerndeint), drop_frame_trigger variable controls it.
--- El lun, 17/9/12, Vicente Sendra <visenri at yahoo.es> escribió:
> De: Vicente Sendra <visenri at yahoo.es>
> Asunto: Re: [MPlayer-dev-eng] Better double frame rate output and framedrop
> Para: mplayer-dev-eng at mplayerhq.hu
> Fecha: lunes, 17 de septiembre, 2012 01:19
> Sorry, new files attached, these
> should be more readable.
>
> --- El lun, 17/9/12, Carl Eugen Hoyos <cehoyos at ag.or.at>
> escribió:
>
> > De: Carl Eugen Hoyos <cehoyos at ag.or.at>
> > Asunto: Re: [MPlayer-dev-eng] Better double frame rate
> output and framedrop
> > Para: mplayer-dev-eng at mplayerhq.hu
> > Fecha: lunes, 17 de septiembre, 2012 00:57
> > Vicente Sendra <visenri <at>
> > yahoo.es> writes:
> >
> > > Attachment (vf_kerndeint.diff):
> > application/octet-stream, 555 bytes
> > > Attachment (vf_tfields.diff):
> application/octet-stream,
> > 5992 bytes
> > > Attachment (vf_yadif.diff):
> application/octet-stream,
> > 1875 bytes
> > > Attachment (mplayer.diff):
> application/octet-stream, 23
> > KiB
> >
> > Your patches contain re-indentation of large blocks,
> this
> > makes reviewing more difficult.
> > Please remove it, one possibility is svn di -x -w
> >
> > Carl Eugen
> >
> > _______________________________________________
> > MPlayer-dev-eng mailing list
> > MPlayer-dev-eng at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> >
> -----Adjunto en línea a continuación-----
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list