[MPlayer-G2-dev] vp layer and config

D Richard Felker III dalias at aerifal.cx
Mon Dec 15 11:49:51 CET 2003

On Mon, Dec 15, 2003 at 10:13:02AM +0100, Arpi wrote:
> - split mp_image to colorspace descriptor (see thread on this list)
>   and buffer descriptor (stride, pointers), maybe a 3rd part containing
>   frame descriptor (frame/field flags, timestamp, etc so info related to
>   the visual content of the image, not the phisical buffer itself, so
>   linear converters (colorspace conf, scale, expand etc) could simply
>   passthru this info and change buffer desc only)

I've been working on implementing this, but there's one element of
mp_image_t I'm not sure where to put. Actually this has been bothering
me for a while now. The exported quant_store (qscale). In G1 the
pointer just gets copied when passing it on through filters, but this
is probably between mildly and seriously incorrect, especially with
out-of-order rendering.

IMO storing quant table in the framedesc isn't a good idea, since
quantizers are only valid for the original buffer arrangement.
Actually, I tend to think they belong in the buffer descriptor, almost
like a fourth plane. But who should be responsible for allocating and
freeing the quant plane? IMO the only way it can really work properly
is to have the same code that allocates the ordinary planes be
responsible for the quant plane too..

This would mean:

When exporting buffers, you just set quant to point at whatever you
like (as long as it won't be destroyed until the buffer is released).

When using automatic buffers, the vp layer would allocate quant plane
for you (but how does it know the right size?) and you have to fill it
(or else don't mark it as valid).

When using direct rendering, the target filter has to allocate the
quant plane (again, how does it determine the size?).

Somehow this sounds awkward. Any better ideas?


More information about the MPlayer-G2-dev mailing list