[FFmpeg-devel] patch for libdc1394.c

Alessandro Sappia a.sappia
Sun Jan 6 19:05:24 CET 2008


Roman Shaposhnik ha scritto:
>> +#else
>> +    { 320, 240, PIX_FMT_UYVY422, DC1394_VIDEO_MODE_320x240_YUV422 },
>> +    { 640, 480, PIX_FMT_UYYVYY411,  
>> DC1394_VIDEO_MODE_640x480_YUV411 },
>> +    { 640, 480, PIX_FMT_UYVY422, DC1394_VIDEO_MODE_640x480_YUV422 },
>> +    { 320, 240, PIX_FMT_UYVY422,  
>> DC1394_VIDEO_MODE_320x240_YUV422 } /* default -- gotta be the last  
>> one */
>> +#endif
>>  };
>>     
>
>    The DC1394_VIDEO_MODE_320x240_YUV422 vs MODE_320x240_YUV422 should be
> handled through the macro substitution.
>
>   
>> +#else
>> +    {  1875, DC1394_FRAMERATE_1_875 },
>> +    {  3750, DC1394_FRAMERATE_3_75  },
>> +    {  7500, DC1394_FRAMERATE_7_5   },
>> +    { 15000, DC1394_FRAMERATE_15    },
>> +    { 30000, DC1394_FRAMERATE_30    },
>> +    { 60000, DC1394_FRAMERATE_60    },
>> +    {120000, DC1394_FRAMERATE_120,  },
>> +    {240000, DC1394_FRAMERATE_240   },
>> +    { 30000, DC1394_FRAMERATE_30    } /* default -- gotta be the  
>> last one */
>> +#endif
>>  };
>>     
>
>    See above. I don't like #ifdef's.
>   
Simple question:
given that
DC1394_VIDEO_MODE_320x240_YUV422 is the define used in libdc1394-2
MODE_320x240_YUV422 is the define used in libdc1394-1

and given that all definitions now start with the 'DC1394_' prefix to
avoid conflicts,

do you really want me to

#ifdef LIBDC1394_2
#include <dc1394/dc1394.h>
#define MODE_320x240_YUV422 DC1394_VIDEO_MODE_320x240_YUV422
#define MODE_640x480_YUV411 DC1394_VIDEO_MODE_640x480_YUV411
#define MODE_640x480_YUV422 DC1394_VIDEO_MODE_640x480_YUV422
#endif

IMHO, I would use the #define already in libdc1394, because one could simply
find where that define come from: if start with DC1394, then it's
libdc1394 related.

My two cents

Alessandro

I'll submit the new patch as soon as I get a good su




More information about the ffmpeg-devel mailing list