[FFmpeg-devel] PIC and YASM
Mon Nov 9 19:12:12 CET 2009
On Sat, Nov 7, 2009 at 5:12 PM, Loren Merritt <lorenm at u.washington.edu>wrote:
> On Sun, 8 Nov 2009, Reimar D?ffinger wrote:
> I have been trying to figure out some compilation issues with hardened
>> gentoo on AMD64 and they all come down to YASM.
> I would object to this in x264, since PIC is slower than non-PIC at
> indexing static arrays. None of the yasm code in ffmpeg does that, so no
> problem for now. But I may revert this if I ever do write/import such code.
Its not faster, but its not always slower. 64 bit can use RIP as the base.
In practice an extra register is needed for PIC. It x64 its not a big deal.
In 32 bit its almost fatal. For example, the transpose2d function will not
compile with PIC in debug mode.
An upside is that code can load faster, since there are no relocs, and take
less memory by sharing dll's.
Although PIC will have a small cost, its better than disabling YASM for
these platforms that require it.
More information about the ffmpeg-devel