[FFmpeg-devel] Visibility implementation

Uoti Urpala uoti.urpala
Wed Jul 30 18:20:00 CEST 2008


On Wed, 2008-07-30 at 16:54 +0100, M?ns Rullg?rd wrote:
> M?ns Rullg?rd wrote:
> > Uoti Urpala wrote:
> >> On Wed, 2008-07-30 at 15:40 +0100, M?ns Rullg?rd wrote:
> >>> Uoti Urpala wrote:
> >>> > On Wed, 2008-07-30 at 08:16 +0200, matthieu castet wrote:
> >>> >> Did you see any code change with your attribute patch ?
> >>> >
> >>> > Yes, if compiling with -fPIC.
> >>>
> >>> On which architecture?  How did it compare to vanilla code without -fPIC?
> >>
> >> I think it should change the resulting code on any architecture, but
> >> exactly how differs.
> >
> > Any benchmarks?

No.

> >                  If it is faster than the fastest alternative on each
>                            ^not
> > architecture, I see no point in pursuing this.

It makes the code faster when compiling with -fPIC, the question is only
whether or in which cases the speedup is significant. I'm not sure what
"alternatives" you're talking about.

Code improvements are not the only benefit. Currently libavcodec.so
exports 1100 symbols for use by external programs, most of which it
shouldn't. The patch I posted cuts this to about one third, and
completing the visibility markup would make it fall further. That
difference exists whether the library is compiled with -fPIC or not.

> > I know there are people
> > who find some kind of twisted pleasure in obfuscating perfectly good
> > code with non-standard hacks and directives, but I'm not one of them.

Visibility is fairly standard library functionality nowadays.





More information about the ffmpeg-devel mailing list