On 2012-10-07 19:15:44 +0200, Diego Biurrun wrote:
> On Sun, Oct 07, 2012 at 06:50:43PM +0200, Janne Grunau wrote:
> >
> > --- a/libavcodec/x86/cavsdsp.c
> > +++ b/libavcodec/x86/cavsdsp.c
> >
> > -void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx)
> > +av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
> > {
> > int mm_flags = av_get_cpu_flags();
> >
> > -#if HAVE_INLINE_ASM
> > - if (mm_flags & AV_CPU_FLAG_MMXEXT) ff_cavsdsp_init_mmx2(c, avctx);
> > - if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
> > -#endif /* HAVE_INLINE_ASM */
> > + if (INLINE_MMXEXT(mm_flags))
> > + ff_cavsdsp_init_mmx2(c, avctx);
> > + if (INLINE_AMD3DNOW(mm_flags))
> > + ff_cavsdsp_init_3dnow(c, avctx);
> > }
>
> I'm suspicious - does this compile with --disable-mmx?
It did, it relies on deod code elimination like other dsp init functions
too.
> Also, if you keep the #ifdefs you can avoid the forward declarations.
not keep, I would have to add one #if for each. HAVE_INLINE_ASM is 1
even with --disable-mmx.
Not really a fan of the other #if and forward declarationbut it keeps
the function itself cleaner.
Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel