On Fri, Sep 09, 2016 at 03:06:46PM +0200, Luca Barbato wrote: > --- a/libavcodec/ppc/audiodsp.c > +++ b/libavcodec/ppc/audiodsp.c > @@ -61,12 +61,37 @@ static int32_t scalarproduct_int16_altivec(const int16_t > *v1, const int16_t *v2, > > +#if HAVE_VSX > +static int32_t scalarproduct_int16_vsx(const int16_t *v1, const int16_t *v2, > int order) > +{ > +} > + > +#endif /* HAVE_VSX */ > + > av_cold void ff_audiodsp_init_ppc(AudioDSPContext *c) > { > #if HAVE_ALTIVEC && HAVE_BIGENDIAN > - if (!PPC_ALTIVEC(av_get_cpu_flags())) > - return; > - > - c->scalarproduct_int16 = scalarproduct_int16_altivec; > + if (PPC_ALTIVEC(av_get_cpu_flags())) > + c->scalarproduct_int16 = scalarproduct_int16_altivec; > #endif /* HAVE_ALTIVEC */ > + > + if (PPC_VSX(av_get_cpu_flags())) > + c->scalarproduct_int16 = scalarproduct_int16_vsx; > }
Does this even compile with --disable-altivec and/or --disable-vsx? You duplicate the av_get_cpu_flags() call; store it in a variable. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel