[MPlayer-G2-dev] slices

Arpi arpi at thot.banki.hu
Thu Feb 12 22:10:56 CET 2004


Hi,

Slices. The thing we like and hate most.
I think the real issue is that we don't even know what slices are!
It's trivial that we can't live in g2 without slices, but it's not
easy to live with them.

Let's see what kind of slices we had, have or will have.

1. libmpeg2 B-frame style (also supported by libjpeg & libpng):

decoder decodes a part of the image (a slice, or a macroblock) to a
small (smaller than image size) internal (allocated by decoder) buffer,
then calls next vf to process it (copy it out to image/screen) and
then re-uses teh same buffer memory area for the next chunk of data.

2. notification style (libavcodec, libmpeg2 I/P frames):

decoder decodes to an image-sized buffer (it may be allocated by decoder
or it may be direct rendering) and after decoding a small area (MB or slice)
it notifies (via callback) the next vf about finishing that part.
so the next vf can process that part immediatelly from cache.

actually 2. is 2.a and 2.b, each for internal and DR buffer.
so we end up with 3 different kind of slices.

for using 1. style slices, we need to know (before the decoding) if the
next vf supports this kind of slices.
type-2. slices are simpler, it's optional to call next vf's notification
callback. it can have such callbacks to do some optimizations, or don't
have for normal whole-buffer process.

to implement it in g2, we need 2 different things:
- a negotation system for type-1. slices support
  (also negotiate slice type, ie. line(s) of pixels, line(s) of macroblocks,
   single macroblock, other)
- an optional function to vf API for slice-finished notifications (type 2.)


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu




More information about the MPlayer-G2-dev mailing list