[FFmpeg-devel] [PATCH] libavcodec/mips: fix for mips optimized fp fft with hard coded tables disabled

Nedeljko Babic Nedeljko.Babic at imgtec.com
Tue Mar 19 16:22:14 CET 2013


If this is moved to ff_fft_init_mips(), for loop will be executed and it is not needed for MIPS.
However, since this is done only one time in initialization, maybe it is overkill...

I will move this to ff_fft_init_mips() and send new patch.


-Nedeljko
________________________________________
Od: Michael Niedermayer [michaelni at gmx.at]
Poslato: 19. mart 2013 3:33
Za: FFmpeg development discussions and patches
Cc: Nedeljko Babic; Zeljko Lukac
Tema: Re: [FFmpeg-devel] [PATCH] libavcodec/mips: fix for mips optimized fp fft with hard coded tables disabled

On Thu, Feb 28, 2013 at 03:55:33PM +0100, Nedeljko Babic wrote:
> Floating point FFT (nips optimized) breaks when hard coded tables are
> not enabled because MIPS optimization of floating point FFT uses only
> ff_init_ff_cos_tabs(16) which is not enabled by default in that case.
>
> This patch is fixing it.
>
> Signed-off-by: Nedeljko Babic <nbabic at mips.com>
> ---
>  libavcodec/fft.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/fft.c b/libavcodec/fft.c
> index 00c434a..00de2bf 100644
> --- a/libavcodec/fft.c
> +++ b/libavcodec/fft.c
> @@ -168,9 +168,13 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
>      if (ARCH_ARM)     ff_fft_fixed_init_arm(s);
>  #endif
>
> +#if (HAVE_MIPSFPU) && (CONFIG_FFT_FLOAT)
> +    ff_init_ff_cos_tabs(16);
> +#else
>      for(j=4; j<=nbits; j++) {
>          ff_init_ff_cos_tabs(j);
>      }
> +#endif

maybe iam missing something but why is this not done in
ff_fft_init_mips() ?

[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.



More information about the ffmpeg-devel mailing list