[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

Michael Niedermayer michaelni
Fri Nov 30 12:26:08 CET 2007


On Thu, Nov 29, 2007 at 03:53:47PM -0700, Loren Merritt wrote:
> On Fri, 30 Nov 2007, Pavlov Konstantin wrote:
> > On Tue, Nov 27, 2007 at 11:23:35PM +0100, aurel wrote:
> >> Author: aurel
> >> Date: Tue Nov 27 23:23:34 2007
> >> New Revision: 11100
> >>
> >> Log:
> >> make ff_p* vars extern so that they can be used in various *_mmx.c files
> >>
> >> Added:
> >>    trunk/libavcodec/i386/dsputil_mmx.h
> >> Modified:
> >>    trunk/libavcodec/i386/cavsdsp_mmx.c
> >>    trunk/libavcodec/i386/dsputil_mmx.c
> >>    trunk/libavcodec/i386/h264dsp_mmx.c
> >>    trunk/libavcodec/i386/mpegvideo_mmx.c
> >>    trunk/libavcodec/i386/vc1dsp_mmx.c
> >
> > This seems to break shared library builds here on x86_64:
> > /usr/bin/ld: i386/dsputil_mmx.o: relocation R_X86_64_PC32 against
> > `ff_pw_20' can not be used when making a shared object; recompile with
> > -fPIC
> > /usr/bin/ld: final link failed: Bad value
> >
> > and of course i386/dsputil_mmx.o is built using -fPIC -DPIC:
> >
> > gcc -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libswscale
> > -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libavcodec
> > -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> > -D_ISOC9X_SOURCE -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"
> > -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"
> > -I"/home/thresh/RPM/BUILD/ffmpeg-11113-alt1"/libavutil -pipe -Wall -O2
> > -frename-registers -fPIC -DPIC -fomit-frame-pointer -pthread
> > -I/usr/include/dirac -Wdeclaration-after-statement -Wall -Wno-switch
> > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
> > -Wno-pointer-sign -O3 -O3  -fPIC -DPIC -c -o i386/dsputil_mmx.o
> > i386/dsputil_mmx.c
> >
> > Suggestions on how to fix it?
> 
> (1) static (like it was before)
> (2) #pragma GCC visibility ...
> (3) ld -Bsymbolic
> (4) ld --version-script ...
> (5) implement full PIC access (double deference, not just rip-relative).
> 
> (2) obvisouly requires gcc. (3) and (4) require GNU ld. (5) makes the 
> shared library slower (I have no idea how much).

id accept a patch with (3) as well as (1) and reject (5) dunno about the
others

also i suspect (3) could lead to some speedups for shared libs ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071130/1ff650c8/attachment.pgp>



More information about the ffmpeg-devel mailing list