Commit ae76b842 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec: Extend fft to size 2^17

Asked-for-by: durandal_1707
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 362e05f1
......@@ -134,7 +134,8 @@ extern COSTABLE(8192);
extern COSTABLE(16384);
extern COSTABLE(32768);
extern COSTABLE(65536);
extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[17];
extern COSTABLE(131072);
extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[18];
#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs)
......
This diff is collapsed.
......@@ -56,7 +56,7 @@
#include "libavcodec/fft.h"
#define MAX_LOG2_NFFT 16 //!< Specifies maximum allowed fft size
#define MAX_LOG2_NFFT 17 //!< Specifies maximum allowed fft size
#define MAX_FFT_SIZE (1 << MAX_LOG2_NFFT)
extern const int32_t ff_w_tab_sr[];
......
......@@ -51,6 +51,7 @@ COSTABLE(8192);
COSTABLE(16384);
COSTABLE(32768);
COSTABLE(65536);
COSTABLE(131072);
#endif
COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = {
NULL, NULL, NULL, NULL,
......@@ -67,6 +68,7 @@ COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = {
FFT_NAME(ff_cos_16384),
FFT_NAME(ff_cos_32768),
FFT_NAME(ff_cos_65536),
FFT_NAME(ff_cos_131072),
};
#endif /* FFT_FIXED_32 */
......@@ -141,7 +143,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
{
int i, j, n;
if (nbits < 2 || nbits > 16)
if (nbits < 2 || nbits > 17)
goto fail;
s->nbits = nbits;
n = 1 << nbits;
......@@ -166,7 +168,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
#if FFT_FIXED_32
{
int n=0;
ff_fft_lut_init(ff_fft_offsets_lut, 0, 1 << 16, &n);
ff_fft_lut_init(ff_fft_offsets_lut, 0, 1 << 17, &n);
}
#else /* FFT_FIXED_32 */
#if FFT_FLOAT
......@@ -515,10 +517,11 @@ DECL_FFT(8192,4096,2048)
DECL_FFT(16384,8192,4096)
DECL_FFT(32768,16384,8192)
DECL_FFT(65536,32768,16384)
DECL_FFT(131072,65536,32768)
static void (* const fft_dispatch[])(FFTComplex*) = {
fft4, fft8, fft16, fft32, fft64, fft128, fft256, fft512, fft1024,
fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
fft2048, fft4096, fft8192, fft16384, fft32768, fft65536, fft131072
};
static void fft_calc_c(FFTContext *s, FFTComplex *z)
......
......@@ -500,7 +500,10 @@ av_cold void ff_fft_init_mips(FFTContext *s)
{
int n=0;
ff_fft_lut_init(ff_fft_offsets_lut, 0, 1 << 16, &n);
if (s->nbits > 16)
return;
ff_fft_lut_init(ff_fft_offsets_lut, 0, 1 << 17, &n);
ff_init_ff_cos_tabs(16);
#if HAVE_INLINE_ASM
......
......@@ -73,7 +73,7 @@ ps_m1p1: dd 1<<31, 0
cextern ps_neg
%assign i 16
%rep 13
%rep 14
cextern cos_ %+ i
%assign i i<<1
%endrep
......@@ -756,7 +756,7 @@ DECL_PASS pass_interleave_3dnow, PASS_BIG 0
%endif
%assign n 1<<%1
%rep 17-%1
%rep 18-%1
%assign n2 n/2
%assign n4 n/4
%xdefine list_of_fft list_of_fft, fft %+ n %+ fullsuffix SECTION_REL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment