[FFmpeg-devel] [FFmpeg-cvslog] r11100 - in trunk/libavcodec/i386: cavsdsp_mmx.c dsputil_mmx.c dsputil_mmx.h h264dsp_mmx.c mpegvideo_mmx.c vc1dsp_mmx.c

Loren Merritt lorenm
Sat Dec 1 19:57:17 CET 2007

On Sat, 1 Dec 2007, Uoti Urpala wrote:
> On Fri, 2007-11-30 at 17:56 -0700, Loren Merritt wrote:
>> Benchmarks (of x264 not ffmpeg, but they should still be relevant):
>> x86_64 (Core2)
>> speed  exe size  version
>> -2.0%   698928   shared
>> -1.3%   693584   shared -Bsymbolic
>> -1.3%   673136   shared -fvisibility=hidden
>> -0.9%   673104   shared -Bsymbolic -fvisibility=hidden
>> +0      650208   static
>> x86_32 (Core2)
>> speed  exe size  version
>> -3.2%   736807   shared pic
>> -2.8%   732071   shared pic -Bsymbolic
>> -2.7%   715687   shared pic -fvisibility=hidden
>> -2.7%   715687   shared pic -Bsymbolic -fvisibility=hidden
>> +0      694232   shared non-pic
>> +0      660008   static
> Why do the results with both switches differ from just -fvisibility on
> AMD64 but not on 32-bit?

I don't know where the speed difference comes from. A disassembly of 
those two x86_64 versions shows no differences in instructions, except 
for two functions and one data struct that are in the api and also used 
internally. But those functions aren't speed-critical.

> It would be interesting to see the results with full visibility
> information, but I guess you don't have that available. It should give
> for each access the advantage that adding -fvisibility gives over just
> -Bsymbolic for accesses to symbols defined in the same file, so the
> extra benefit would depend on how many uses there are of non-static
> symbols defined in the same file vs symbols defined in another file.

What is full visibility information?
Why does -fvisibility apply only to symbols uses in the same file, and 
what is the alternative that applies to all symbols?

AFAICT, x264's visibility situation is very simple: One pragma in x264.h 
to mark the api as public, and gcc -fvisibility to mark everything else as 

--Loren Merritt

More information about the ffmpeg-devel mailing list