[MPlayer-dev-eng] [PATCH] Slices in expand ?
Alban Bedel
albeu at free.fr
Tue Nov 19 04:07:46 CET 2002
Hi D Richard Felker III,
on Mon, 18 Nov 2002 11:55:09 -0500 you wrote:
> On Mon, Nov 18, 2002 at 04:32:18PM +0100, Alban Bedel wrote:
> > Hi Colin Leroy,
> >
> > on Mon, 18 Nov 2002 14:52:41 +0100 you wrote:
> >
> > > Hi again,
> > >
> > > another patch. Using -menu badly drops performance, even when the
> > > menu isn't showed:
> > I know. It's mainly due to a limitation of the dr. DR could be used
> > most of the time(ie at least when the menu aren't shown) but as soon
> > as get_image fallback on an allocated image you won't get dr back
> > :(((( I still don't know how to overcome this. Any idea any1 ?
>
> I'm not sure what you're saying, but if you want any hope of it being
> fast you need to implement slice-based drawing. Unfortunately no
> filters presently do that, so I have no idea how it should be done...
Ok i try to be a bit clearer ;)
Filters and codecs get their destination image (dmpi) by calling vf_get_image on
the next filter of the chain. The first time vf_get_image is called for filter the
get_image function of the filter is always called. If the filter can't do any DR the
buffer will be allocated and then on the next vf_get_image call the get_image of the
filter isn't called. It's seems logical bcs if a filter can't do DR now why may it be able
later ? But in the case of the osd menu that's really not true. When the menu aren't
showen we could simply use DR and do nothing. Arpi proposed to use an export
image. That's save a memcpy if the vo isn't using DR but if it is that's just moving the
memcpy. So it only slove half of the problem.
Wich lead us to the slices rendering. When doing slices we can't call vf_get_image
for each slice. So we need to get the destination image before the first draw_slice
call. As get_image don't get called fo each frame we need to put some hacks in the
draw_slice functions to get the right dmpi.
Imho having get_image called for each frame is needed for easier implementation of
draw_slice and strange filters.
UPDATE : Ok, i gave it a try. Attached is a patch wich make get_image
called for each frame and implement slice rendering in expand (don't
flame too much about this one it's getting late ;)
Albeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slices.diff
Type: application/octet-stream
Size: 7815 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021119/ed976d8e/attachment.obj>
More information about the MPlayer-dev-eng
mailing list