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

Michael Niedermayer michaelni
Wed Mar 25 15:01:50 CET 2009


On Wed, Mar 25, 2009 at 09:48:51AM +0530, Jai Menon wrote:
> On 3/24/09, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Mar 24, 2009 at 03:26:33PM +0530, Jai Menon wrote:
> >  > Hi,
> >  >
> >  > Last one for the day, attached patch adds the YUV2 fourcc to MOV video
> >  > tags. Samples at  http://samples.mplayerhq.hu/V-codecs/YUV2/
> >  >
> >  > --
> >  > Regards,
> >  >
> >  > Jai
> >
> >
> > > Index: libavcodec/raw.c
> >  > ===================================================================
> >  > --- libavcodec/raw.c  (revision 17944)
> >  > +++ libavcodec/raw.c  (working copy)
> >  > @@ -50,6 +50,7 @@
> >  >
> >  >      /* quicktime */
> >  >      { PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
> >  > +    { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') },
> >  >      { PIX_FMT_UYVY422, MKTAG('A', 'V', 'U', 'I') }, /* FIXME merge both fields */
> >  >      { PIX_FMT_PAL8,    MKTAG('W', 'R', 'A', 'W') },
> >
> >  please keep the table somewhat sorted
> 
> Ok, changed.
> And I just looked at the patch I posted. rawdec.c hunk seems to be
> missing. Maybe I accidentally removed it when manually cleaning the
> patch. So heres the complete thing one more time. This should decode
> all yuv2 in mov mphq samples properly.
> 
> >  [...]
> >
> > --
> >  Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> >  Asymptotically faster algorithms should always be preferred if you have
> >  asymptotical amounts of data
> >
> > -----BEGIN PGP SIGNATURE-----
> >  Version: GnuPG v1.4.9 (GNU/Linux)
> >
> >  iD8DBQFJyQI1YR7HhwQLD6sRAgMDAKCEmNkbhpEK1bS140p6fpAoV4RiuwCgmq6v
> >  PNtHIub82/+veU8HcGZRCX4=
> >  =S1/L
> >  -----END PGP SIGNATURE-----
> 
> -- 
> Regards,
> 
> Jai

> 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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090325/4a4dbe8e/attachment.pgp>



More information about the ffmpeg-devel mailing list