[FFmpeg-devel] [PATCH 2/2] Remove ff_inverse from libavcodec.

Måns Rullgård mans
Fri Oct 3 11:34:43 CEST 2008


Uoti Urpala wrote:
> On Fri, 2008-10-03 at 00:04 +0100, M?ns Rullg?rd wrote:
>> Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:
>>
>> > On Thu, 2008-10-02 at 18:57 +0200, Diego 'Flameeyes' Petten? wrote:
>> >> The previous patch added a copy of ff_inverse in libavutil, this patch
>> >> removes the copy present in libavcodec, making it rely on the one
>> >> present in libavutil.
>> >
>> > Using a symbol from another library is slower (a symbol from the same
>> > library is at a constant offset, a symbol from another library requires
>> > lookup through offset table). Since the whole point of FASTDIV is speed
>> > this could matter.
>>
>> Is this true also for read-only data?  Doesn't that generate a copy
>> relocation rather than a GOT indirection?  If in doubt, check the
>> disassembly.
>
> I think (haven't verified though) that copy relocations are only used
> when the main program binary contains code compiled without -fPIC that
> references a data symbol in a shared library.

Sounds plausible.  Perhaps someone would care to check the code generated
for FASTDIV() with and without the patch.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list