[FFmpeg-devel] [PATCH] MOV YUV2 fourcc -> PIX_FMT_YUYV422 mapping

Reimar Döffinger Reimar.Doeffinger
Wed Mar 25 16:35:02 CET 2009


On Wed, Mar 25, 2009 at 03:01:50PM +0100, Michael Niedermayer wrote:
> On Wed, Mar 25, 2009 at 09:48:51AM +0530, Jai Menon wrote:
> > Index: libavcodec/rawdec.c
> > ===================================================================
> > --- libavcodec/rawdec.c	(revision 17944)
> > +++ libavcodec/rawdec.c	(working copy)
> > @@ -144,6 +144,13 @@
> >          picture->data[2] = tmp;
> >      }
> >  
> > +    if(avctx->codec_tag == MKTAG('y', 'u', 'v', '2')) {
> > +        int i;
> > +        for(i=1; i<picture->linesize[0]*avctx->height; i+=2) {
> > +            picture->data[0][i] ^= 128;
> > +        }
> > +    }
> > +
> >      *data_size = sizeof(AVPicture);
> >      return buf_size;
> >  }
> 
> uhm, apple messed up again?
> anyway, if this is how its stored in mov this hack (assuminh baptiste agrees)
> should be in mov.c

yuv2 (not yv12 oder yuy2, I don't think the fourcc conflicts with any other format)
is a special format that uses signed chroma, seems to be used by some cameras.
Not sure if it's worth adding a pixfmt for it, but it would be a
possibility.
Personally I would consider rawdec an acceptable place for that code.



More information about the ffmpeg-devel mailing list