[MPlayer-G2-dev] MID proposal

D Richard Felker III dalias at aerifal.cx
Sat Nov 1 19:07:24 CET 2003


On Sat, Nov 01, 2003 at 04:38:14PM +0100, Alex Beregszaszi wrote:
> Hi,
> 
> Here's my idea of a IMGFMT replacement: MID stands for MPlayer Image
> Description.

Some more questions...

> MID {
> imgfmt (?)

Rename to fourcc.

> type (rgb or yuv)

Rename to colorspace or something.

> bpp
> depth

What is the point of depth? How is it defined?

> chroma_x_shift
> chroma_y_shift

I always found these names excessively verbose to type when writing
filters. Any better ideas?

> num_planes (>1 -> planar)

See my other mail.

> fields (interlacing)

Hm? Does this just tell if the image is interlaced, or does it contain
other flags about the interlacing format?

> }
> 
> MPI {
> mid
> flags
> type
> width, height
> x,y,w,h

The whole width, height, x, y, w, h system is nonsense. x,y are never
used and not even supported. They're much better handled by just
adjusting the actual pointers. Also lots of filters don't understand
the difference between w and width, which is very silly to begin with.
In the new vp code I'm working on, width/height/x/y are entirely
eliminated, and the stride restrictions are cleaned up a lot. There's
now:

#define VP_STRIDE_MB_ALIGNED 0x1    // stride%(16*bpp) == 0
#define VP_STRIDE_PIXEL_ALIGNED 0x2 // stride%bpp == 0
#define VP_STRIDE_EXACT_WIDTH 0x4   // stride==bpp*w
#define VP_STRIDE_COMMON 0x8        // stride[1,2]==stride[0]>>shift

Codecs which wanted MP_IMGFLAG_ACCEPT_WIDTH before can now just use
VP_STRIDE_PIXEL_ALIGNED and stride/bpp will be the old width field.
(Note for simplicity here I use bpp=bytes/pixel, even though it really
means bits... :)

Rich




More information about the MPlayer-G2-dev mailing list