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

Baptiste Coudurier baptiste.coudurier
Wed Mar 25 16:47:33 CET 2009


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

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list