On Tue, Aug 28, 2012 at 04:17:46PM +0100, Måns Rullgård wrote:
> Diego Biurrun <[email protected]> writes:
> > On Tue, Aug 28, 2012 at 01:54:57PM +0100, Måns Rullgård wrote:
> >> Diego Biurrun <[email protected]> writes:
> >> > --- a/libavfilter/x86/gradfun.c
> >> > +++ b/libavfilter/x86/gradfun.c
> >> > @@ -24,12 +24,10 @@
> >> >  #include "libavutil/x86/asm.h"
> >> >  #include "libavfilter/gradfun.h"
> >> >  
> >> > -#if HAVE_INLINE_ASM
> >> 
> >> Why do you remove that line?
> >
> > I'm replacing HAVE_FOO below with HAVE_INLINE_FOO, which already
> > ensures that HAVE_INLINE_ASM is set.
> 
> But now you're defining those constants even if it's not enabled.

So?  It does not even generate warnings...

> >> > --- a/libavutil/x86/float_dsp_init.c
> >> > +++ b/libavutil/x86/float_dsp_init.c
> >> > @@ -33,16 +33,14 @@ extern void ff_vector_fmac_scalar_avx(float *dst, 
> >> > const float *src, float mul,
> >> >  
> >> >  void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
> >> >  {
> >> > -#if HAVE_YASM
> >> >      int mm_flags = av_get_cpu_flags();
> >> >  
> >> > -    if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) {
> >> > +    if (mm_flags & AV_CPU_FLAG_SSE && HAVE_YASM_SSE) {
> >> >          fdsp->vector_fmul = ff_vector_fmul_sse;
> >> >          fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;
> >> >      }
> >> > -    if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
> >> > +    if (mm_flags & AV_CPU_FLAG_AVX && HAVE_YASM_AVX) {
> >> >          fdsp->vector_fmul = ff_vector_fmul_avx;
> >> >          fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
> >> >      }
> >> > -#endif
> >> >  }
> >> 
> >> Why do you remove the #if HAVE_YASM?  I imagine it's there for a reason.
> >
> > Same reasoning here, I'm replacing it with something more specific.
> > Note that the code still compiles with --disable-yasm.
> 
> And no warnings either?

Yes, no warnings.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to