[FFmpeg-devel] [PATCH] Remove useless preprocessor directives.

Loren Merritt lorenm
Fri Jun 18 15:06:55 CEST 2010

On Fri, 18 Jun 2010, Michael Niedermayer wrote:

> On Fri, Jun 18, 2010 at 08:51:29AM +0200, Benoit Fouet wrote:
>> On Thu, 17 Jun 2010 21:57:09 +0200 Reimar D?ffinger wrote:
>>> On Thu, Jun 17, 2010 at 03:32:02PM +0200, Benoit Fouet wrote:
> [...]
>>> If you don't need/want the whole function, then put the whole function under
>>> the #if.
>> that wouldn't work either... as the code using it is in the form of:
>> if (HAVE_7REGS)
>>     foo = yuva420_rgb32_MMX;
>> You'll get an undeclared function error.
> what if you add a weak attibute at the function declaration?
> (should in theory work though probably its not portable enough
> if it does work)

Can't you just declare the function, no special attributes?
I thought ffmpeg policy was to require dead code elimination, so that 
functions used under if(0) need not exist.

--Loren Merritt

More information about the ffmpeg-devel mailing list