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

Vitor Sessak vitor1001
Thu Mar 26 19:54:21 CET 2009


Jai Menon wrote:
> On 3/26/09, Michael Niedermayer <michaelni at gmx.at> wrote:
>> On Wed, Mar 25, 2009 at 08:47:33AM -0700, Baptiste Coudurier wrote:
>>  > On 3/25/2009 8:35 AM, Reimar D?ffinger wrote:
>>  > > 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.
>>  >
>>  > I agree with Reimar, however I don't mind if this hack is put in mov.c
>>
>>
>> hmm, it stays ugly no matter where it is ...
>>  if people prefer rawdec then iam ok but we also need it in rawenc then
> 
> I don't quite understand why someone would want to store color data
> like this (chroma plane signed). And as Reimar will confirm, the yuv2
> fourcc doesn't seem to conflict with anything else seen in the wild.
> Are you suggesting adding a similar if case in raw_encode which sets
> the sign bit? such a patch will be quite intrusive, especially for a
> pixel fmt which most people won't use :)
> 
>>  [...]
>>
>> --
>>  Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>>  GMX, the mailprovider that uses RBL lists to reject mails from your friends
>>  running their own mailserver at home. The mailprovider that obscures the
>>  origin of mails (mis)identified as viruses. The mailprovider that improves
>>  security my disallowing more secure forms of authentication.
> 
> And hence I shifted to gmail :)

Why not set up a mail redirection at ffmpeg.org? Then you can change 
mail provider as soon as you are fed up with it...

-Vitor



More information about the ffmpeg-devel mailing list