On Thu, Feb 06, 2014 at 12:40:56AM +0000, Christophe Gisquet wrote:
> --- a/libavcodec/x86/fft_init.c
> +++ b/libavcodec/x86/fft_init.c
> @@ -55,3 +55,35 @@ av_cold void ff_fft_init_x86(FFTContext *s)
> s->fft_permutation = FF_FFT_PERM_AVX;
> }
> }
> +
> +#if CONFIG_DCA_DECODER
> +# include "libavcodec/synth_filter.h"
> +
> +void ff_synth_filter_inner_sse2(float *synth_buf_ptr, float synth_buf2[32],
> + const float window[512],
> + float out[32], intptr_t offset, float scale);
> +
> +static void synth_filter_sse2(FFTContext *imdct,
> + float *synth_buf_ptr, int *synth_buf_offset,
> + float synth_buf2[32], const float window[512],
> + float out[32], const float in[32], float scale)
> +{
> + float *synth_buf= synth_buf_ptr + *synth_buf_offset;
> +
> + imdct->imdct_half(imdct, synth_buf, in);
> +
> + ff_synth_filter_inner_sse2(synth_buf, synth_buf2, window,
> + out, *synth_buf_offset, scale);
> +
> + *synth_buf_offset= (*synth_buf_offset - 32)&511;
> +}
> +
> +av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
> +{
> + int mm_flags = av_get_cpu_flags();
> +
> + if (EXTERNAL_SSE2(mm_flags)) {
> + s->synth_filter_float = synth_filter_sse2;
> + }
> +}
> +#endif
Why did you place this inside fft? A separate init file sounds more
logical to me.
> --- /dev/null
> +++ b/libavcodec/x86/synth_filter.asm
> @@ -0,0 +1,178 @@
> +%if ARCH_X86_32 || WIN64
> + movd scale, scalem
> +; Make sure offset is in a register and not on the stack
trailing whitespace
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel