[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

Michael Niedermayer michaelni
Wed Nov 30 14:29:19 CET 2005


Hi

On Wed, Nov 30, 2005 at 09:49:39AM -0000, M?ns Rullg?rd wrote:
> 
> Michael Niedermayer said:
> > Hi
> >
> > On Wed, Nov 30, 2005 at 02:40:52AM +0100, M?ns Rullg?rd CVS wrote:
> > [...]
> >>     switch(depth){
> >>     case 16:
> >>         for(i = 0; i < avctx->height; i++){
> >>             uint16_t *src = (uint16_t *) buf;
> >>             uint16_t *dst = (uint16_t *) ptr;
> >>
> >>             for(j = 0; j < avctx->width; j++)
> >>                 *dst++ = le2me_16(*src++);
> >>
> >>             buf += n;
> >>             ptr += linesize;
> >>         }
> >>         break;
> >>     case 32:
> >>         for(i = 0; i < avctx->height; i++){
> >>             uint8_t *src = buf;
> >>             uint8_t *dst = ptr;
> >>
> >>             for(j = 0; j < avctx->width; j++){
> >>                 dst[0] = src[rgb[2]];
> >>                 dst[1] = src[rgb[1]];
> >>                 dst[2] = src[rgb[0]];
> >
> > 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.  

no, only the ones used in some codec, and for these we need some code anyway


> 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.  Even though it's not compressed, it can still be considered
> an encoded format that needs to be decoded into a normal format.

well if theres any encoder or video output which can directly use a given
format then conversation in the codec is a waste of time in that case
and it shouldnt be a nuisance to the app, it can always use the lavc pix_fmt
converter if it doesnt like a specific format, but if its done inside the
codec then the app has no choice ...

[...]
-- 
Michael





More information about the ffmpeg-cvslog mailing list