[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec bmp.c, NONE, 1.1 allcodecs.c, 1.115, 1.116 Makefile, 1.212, 1.213 avcodec.h, 1.428, 1.429

Rich Felker dalias
Wed Nov 30 19:45:26 CET 2005


On Wed, Nov 30, 2005 at 09:49:39AM -0000, M?ns Rullg?rd wrote:
> > hmm, i love pixel format conversation code in codecs ...
> > please at least add a note to the source explaining that this is not the
> > way its supposed to be done but that instead a new PIX_FMT should be added
> > for each new pixel format,
> 
> That way we'll end up with a PIX_FMT for every permutation of component
> orders.  I agree that converting between "standard" formats in a codec
> shouldn't be done.  Dealing with arbitrary pixel layouts in every app is
> a nuisance.

This is a design problem in lavc. Ideally where would not be PIX_FMT
constants for different channel layouts, etc. but instead a format
descriptor structure that tells the bit offsets and sizes of each
channel, sample value ranges, etc.

> Even though it's not compressed, it can still be considered
> an encoded format that needs to be decoded into a normal format.

This is why a better architecture would not consider codecs and
filters as separate components, but both as a generic type of blackbox
that can convert one video/image format to another. In such an
architecture, factoring the 'decoding' components as much as possible
(as long as it doesn't hurt performance) is desirable.

Unfortunately we're not to that point yet..
But it's still best (like Michael said) to work with what we have and
not write slow code that does unnecessary conversions to 'standard'
formats.

Rich





More information about the ffmpeg-cvslog mailing list