On Sat, Jan 07, 2012 at 12:53:00PM +0100, Vitor Sessak wrote:
> 
> New patch attached.
> 
> --- a/libavcodec/x86/mpegaudiodec_mmx.c
> +++ b/libavcodec/x86/mpegaudiodec_mmx.c
> @@ -147,11 +159,79 @@ static void apply_window_mp3(float *in, float *win, int 
> *unused, float *out,
>      if (mm_flags & AV_CPU_FLAG_SSE2) {
>          s->apply_window_float = apply_window_mp3;
>      }
> +    if (HAVE_YASM && mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
> +        s->imdct36_blocks_float = imdct36_blocks_avx;
> +    }
> +    else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSE) {
> +        s->imdct36_blocks_float = imdct36_blocks_ssse3;
> +    }
> +    else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE3 && HAVE_SSE) {
> +        s->imdct36_blocks_float = imdct36_blocks_sse3;
> +    }
> +    else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE) {
> +        s->imdct36_blocks_float = imdct36_blocks_sse2;
> +    }
> +    else if (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) {
> +        s->imdct36_blocks_float = imdct36_blocks_sse;
> +    }

You could factor out some of those HAVE_ checks.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to