[FFmpeg-devel] [PATCH] split-radix FFT

Uoti Urpala uoti.urpala
Tue Jul 29 21:28:25 CEST 2008

On Tue, 2008-07-29 at 21:09 +0200, matthieu castet wrote:
> For visibility stuff, I start something on 
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/69742/focus=69792.
> The idea was to put in ffmpeg public header
> #pragma GCC visibility push(default)
> #endif
> [...]
> #pragma GCC visibility pop
> #endif
> in configure add some stuff to detect if the compiler support 
> visibility, and if yes add to CFLAGS "-DIN_FFMPEG_BUILD 
> -fvisibility=hidden".

Using "-fvisibility=hidden" is NOT enough to get the performance
benefit. It cannot make the compiler access any symbols as hidden at
compile time because it does not distinguish declarations for symbols
from other translation units in the same library (which could be
addressed directly) and declarations from external headers for symbols
that are in other libraries and can not be addressed directly.

You must mark the hidden symbols as such in the headers declaring them,
so that the code including them can distinguish them from symbols
declared in headers coming from external libs. Once you do that the
partial effect from -fvisibility adds nothing, so there is no reason to
add it to the compiler flags. Public headers shouldn't need any
modification then.

There could be a per-symbol #define (using __attribute__ syntax) and
#defines to start/end hidden section (using _Pragma to work inside a

More information about the ffmpeg-devel mailing list