[FFmpeg-devel] Moving if(constant expression) to preprocessor?
Sun Sep 19 11:50:03 CEST 2010
Luca Barbato <lu_zero at gentoo.org> writes:
> On 09/18/2010 06:00 PM, Axel Holzinger wrote:
>> Hi Vlado and all,
>> Vladimir Pantelic wrote:
>>> On 09/18/2010 01:02 PM, Axel Holzinger wrote:
>>>> Hi all,
>>>> if compiling FFmpeg code with zero optimisations (even without
>>>> dead code elimination) there are linker errors (undefined
>>>> references to
>>>> functions or structs) that come from constructs like i.e. the
>>>> following in libavcodec/allcodecs.c:
>>>> if(CONFIG_##X##_HWACCEL) av_register_hwaccel(&x##_hwaccel); )
>>>> The runtime (lower case) "if" leads to an undefined reference,
>>>> because it is evaluated at runtime and not at compile time.
>>>> If dead code eliminitation optimisation is on, this isn't an
>>>> issue, but with optimisations completely off it is.
>>> as far as ffmpeg is concerned, "dead code eliminitation" is a
>>> prerequisite to build it, you cannot do without.
>> Now that's exactly the prerequisite I would like to overcome.
>> "You cannot" is quite absurd here, isn't it? If at all I think it's a
>> matter of We or I don't want.
> We don't care, mostly. The only way I see something like that happen is
> provide a C-99 buildable custom preprocessor for ffmpeg that let you do
> that in a clear and fast way (and has also other nice features that we
> might like)
We will not start using custom preprocessors without _much_ stronger
reasons than this.
mans at mansr.com
More information about the ffmpeg-devel