Vitor Sessak <[email protected]> writes:
> ---
> libavcodec/x86/fft.c | 9 +++-
> libavcodec/x86/fft.h | 2 +
> libavcodec/x86/fft_mmx.asm | 108
> +++++++++++++++++++++++++-------------------
> libavcodec/x86/fft_sse.c | 7 +++
> libavutil/x86/x86inc.asm | 4 +-
> 5 files changed, 81 insertions(+), 49 deletions(-)
>
> diff --git a/libavcodec/x86/fft.c b/libavcodec/x86/fft.c
> index 90315e6..a03b386 100644
> --- a/libavcodec/x86/fft.c
> +++ b/libavcodec/x86/fft.c
> @@ -25,7 +25,14 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
> {
> #if HAVE_YASM
> int has_vectors = av_get_cpu_flags();
> - if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
> + if (has_vectors & AV_CPU_FLAG_XOP && HAVE_XOP && s->nbits >= 5) {
> + /* AVX for SB */
> + s->imdct_calc = ff_imdct_calc_sse;
> + s->imdct_half = ff_imdct_half_xop;
> + s->fft_permute = ff_fft_permute_sse;
> + s->fft_calc = ff_fft_calc_xop;
> + s->fft_permutation = FF_FFT_PERM_AVX;
> + } else if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
> /* AVX for SB */
> s->imdct_calc = ff_imdct_calc_sse;
> s->imdct_half = ff_imdct_half_avx;
Is it possible to do this more in line with the usual way of setting asm
functions? Like this:
if (have_fancy_extension) {
/* set some functions */
}
if (have_even_better_extension) {
/* set better functions */
}
if (have_most_awesome_extension) {
/* set the very best functions */
}
--
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel