[Ffmpeg-devel] Using ffmpeg libs in an OSS project is a nightmare

Rich Felker dalias
Sun Aug 7 15:26:52 CEST 2005


On Sun, Aug 07, 2005 at 10:05:37AM +0200, Balatoni Denes wrote:
> Hi!
> 
> vas?rnap 07 augusztus 2005 01.37-kor Dave Airlie ezeket a bolcs gondolatokat 
> fogalmazta meg:
> > The rest of the world doesn't statically link anything ever, dynamic
> > linking works for every single library based project in existence
> > today, and I'm asking the question what make ffmpeg different? 
> 
> See http://www.iecc.com/linker/linker08.html, the part
> "PIC costs and benefits". When developers have spent a considerable time
> to gain even one percent speedup, they probably don't want to see this gain 
> disappear by the inclusion of the compiler option -fPIC (this is only on 
> legacy hardware, namely x86). But I am not an official certified ffmpeg 
> developer.

Not just legacy hardware. Applying an offset to each global symbol
dereference is a huge waste of cycles on pure RISC archs too, and it
adds dependency issues that need to be resolved to prevent stalls. PIC
is just a very very stupid idea, unless the cpu has a special
mechanism for supporting it in hardware without extra instructions. Of
course it does not matter for 99% of the libraries that do
performance-irrelevant tasks, but it DOES MATTER for anything media
related.

Rich





More information about the ffmpeg-devel mailing list