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

Baptiste Coudurier baptiste.coudurier
Tue Mar 31 19:57:21 CEST 2009


On 3/31/2009 8:40 AM, Michael Niedermayer wrote:
> On Tue, Mar 31, 2009 at 10:10:28AM +0530, Jai Menon wrote:
>> On Mon, Mar 30, 2009 at 11:01 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> [...]
>> revised patch attached.
>> -- 
>> Regards,
>>
>> Jai
> 
>> Index: libavcodec/rawenc.c
>> ===================================================================
>> --- libavcodec/rawenc.c	(revision 17944)
>> +++ libavcodec/rawenc.c	(working copy)
>> @@ -40,8 +40,20 @@
>>  static int raw_encode(AVCodecContext *avctx,
>>                              unsigned char *frame, int buf_size, void *data)
>>  {
>> -    return avpicture_layout((AVPicture *)data, avctx->pix_fmt, avctx->width,
>> +    int ret = avpicture_layout((AVPicture *)data, avctx->pix_fmt, avctx->width,
>>                                                 avctx->height, frame, buf_size);
>> +
> 
>> +    if(avctx->codec_tag == MKTAG('y', 'u', 'v', '2') && (ret > 0) &&
>> +       (avctx->pix_fmt == PIX_FMT_YUYV422)) {
> 
> superflous ()
> AV_RL32("yuv2")

Interesting, should we use this now ?
It would greatly improve readability IMHO.

-- 
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