[XviD-devel] PATCH: Per slices rendering

Alban Bedel xvid-devel@xvid.org
Sun, 7 Jul 2002 22:25:28 +0200


Hi Michael Militzer,

on Sun, 7 Jul 2002 21:35:58 +0200 you wrote:

> ----- Original Message -----
> From: "Christoph Lampert" <chl@math.uni-bonn.de>
> To: <xvid-devel@xvid.org>
> Sent: Sunday, July 07, 2002 9:01 PM
> Subject: Re: [XviD-devel] PATCH: Per slices rendering
> 
> 
> > > > > With XVID_CSP_USER you can access the internal buffer of xvid. Then
> you need to
> > > > > copy it to video memory. In this version xvid only copy the modified
> MB to a
> > > > > buffer provided by the host app (ussally in video memory) thus
> avoiding a few
> > > > > unneded copy. And as the copy append during the decoding the data
> might be
> > > > > copied from the L2 cache wich give more speedup. A few benchmaks :
> > > >
> > > > I see. That looks fine. Does Mplayer has to be modified to support
> this
> > > > version of XviD, too? Or is this in Mplayers CVS already?
> > >
> > > It's not in cvs as i don't want to add it while the requiered change are
> not in xvid cvs.
> > > So as soon as i'm allowed to commit this (or something similar) MPlayer
> will support
> > > it.
> > > Albeu
> >
> > To all:
> >
> > Albeu's patch doesn't seem to break anything. Are there any objections
> > against commiting it?
> 
> Hm. I like the idea, but I don't like that the patch breaks the seperation
> between image.c and decoder.c. copy_slice is a function that belongs to
> image_output, it's a function like yv12_to_yuv with the difference that it
> only copies parts of the image. So I don't like that an image_output
> function is merged with inner decoder functions (mb_intra/mb_inter), that's
> no good style.

Ok, that's why i sent a patch.

> But I've thought about how this problem could be solved and I think I had a
> very good idea. It should be possible to implement exactly the functionality
> Albeu wants, keep the seperation between image.c and decoder.c and
> additionally even further speed up our decoder. But as always with wonderful
> ideas, maybe I missed something and I have no time to try my idea before
> tomorrow...

Could you explain a little bit you'r idea ? There's sevral way to do direct rendring.
The best would be to support as much of them as possible. In the lines of what
i did we can use a callback to allow the host app to do colorspace conversion
for example.
The last method is to use only buffer provided by the host app but it doesn't look
possible bcs xvid need some edges.
Some docs about dr in mplayer can be found in mplayer distrib
(DOCS/tech/dr-methods.txt) or via webvs :
http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/DOCS/tech/dr-methods.txt?rev=1.1&content-type=text/x-cvsweb-markup

	Albeu