[MPlayer-dev-eng] zr: mistake in last patch

Rik Snel rsnel at cube.dyndns.org
Sat Feb 2 10:54:02 CET 2002


Hello,

On Sat, 2 Feb 2002, Felix Buenemann wrote:
> > > Pontscho sez: WTF is this stuff doing in libvo ??
> > It is a special purpose jpeg encoder for libvo, not a general codec.  
> > Other possible location: main/, but it seems to be very crowded. How about
> > main/libmisccodec/ (and put the others there als well) ?
> IMHO you should also put it into libavcodec, it uses that code anyway... 
> maybe you could even nicely fit it together with the rest of the codecs in 
> libavcodec.
I have no objection to put the code in libavcodec (this would
eliminate the need for the moreglobals patch that I sent to ffmpeg
devel), but it won't fit in with the rest of the codecs:

-jpeg_enc.c is more liberal about the colorspaces that it handles without
an expensive conversion (because the way i provide information about the Y
U and V buffers (buffer, pixelstride, rowstride). The blockfilling must be
optimized for the different packed colorspaces, this will eventualy happen
to jpeg_enc.c .

-the internal colorspace of libavcodec is YUV420, in each MCU (minimally
coded unit) consist of six blocks (Y, Y, Y, Y, U, V). There is trickery
all over the code to map the block number (1, 2, 3, 4, 5, 6) to the
component number (0, 1, 2) (see encode_block() in mjpeg.c). 

I could also move the stuff in jpeg_enc.c to vo_zr.c.

Greetings,

Rik.

--------
Nothing is ever a total loss; it can always serve as a bad example.




More information about the MPlayer-dev-eng mailing list