[FFmpeg-devel] [PATCH 1/4] vf_fspp: fix compilation with llvm

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 14 23:29:13 CET 2012


On Wed, Mar 14, 2012 at 10:43:16PM +0100, Michael Niedermayer wrote:
> On Sat, Mar 10, 2012 at 06:01:38PM +0100, Michael Niedermayer wrote:
> > On Sat, Mar 10, 2012 at 10:25:34AM +0100, Reimar Döffinger wrote:
> > > On Sat, Mar 10, 2012 at 08:22:33AM +0100, Michael Niedermayer wrote:
> > > > From: Baptiste Coudurier <baptiste.coudurier at gmail.com>
> > > > 
> > > > ---
> > > >  libavfilter/libmpcodecs/vf_fspp.c |    4 ++--
> > > >  1 files changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/libavfilter/libmpcodecs/vf_fspp.c b/libavfilter/libmpcodecs/vf_fspp.c
> > > > index a98c70b..af50c6b 100644
> > > > --- a/libavfilter/libmpcodecs/vf_fspp.c
> > > > +++ b/libavfilter/libmpcodecs/vf_fspp.c
> > > > @@ -710,8 +710,8 @@ const vf_info_t vf_info_fspp = {
> > > >  #if HAVE_MMX
> > > >  
> > > >  DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14);
> > > > -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14);
> > > > -DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
> > > > +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14);
> > > > +DECLARE_ALIGNED(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14);
> > > 
> > > Why is this necessary and why does it work?
> > > If the __attribute__((used)) doesn't work for LLVM I still consider
> > > it the "correct" solution to remove the static as done for ICC.
> > > (might mean it is necessary to rename some of these to avoid symbol
> > > collisions, but then again it might make sense to just make them
> > > global with an ff_ prefix).
> > > Since this change makes them global a ff_ prefix should be added anyway.
> > 
> > Feel free to make such a change, i cant, i have no means to test it.
> > My llvm here doesnt fail, it seems x86_32 specific and llvm for 64bit
> > doesnt compile 32bit apparently
> 
> Ill add a ff_ prefix to the affected variables and see if that with
> baptistes patch will fix the fate failures. It seems i possibly
> misunderstood what you suggested in my earlier reply
> either way iam not going to remove the static from the #define as
> that could cause symbol conflicts and as far as i can guess this
> is a bug in llvm and not a lack of support of the used attribute but
> i could misguess

Sorry for the delay. If you just add a ff_ here I'm fine with the
change.
Though as to symbol conflicts, I think we would already have them
with some ICC versions, so I think it would be good to rather push the
code towards having identical asm constants as globals and in only
one .c file.


More information about the ffmpeg-devel mailing list