Commit Graph

16 Commits

Author SHA1 Message Date
Steven Liu eb81fd792f avcodec/fft_template: improve performance of the ff_fft_init in fft_template
Before patch:
init nbits = 17, get 10000 samples, average cost: 16175 us
After patch:
init nbits = 17, get 10000 samples, average cost: 14989 us

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-04 11:21:02 +08:00
Carl Eugen Hoyos 9617178800 lavc/fft_template: Do not define unneded functions with --enable-small.
Fixes the following warnings:
In file included from libavcodec/fft_fixed.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~
CC      libavcodec/ffv1.o
In file included from libavcodec/fft_float.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~
2018-07-21 14:05:41 +02:00
Muhammad Faiz 1af615683e avcodec/fft_template: use ff_thread_once on costable initialization
Make it thread-safe and avoid redundant initialization.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-07 09:41:52 +07:00
Michael Niedermayer 1197c04896 avcodec/fft_template: Fix multiple runtime error: signed integer overflow: -1943918714 - 1935113003 cannot be represented in type 'int'
Fixes: 1735/clusterfuzz-testcase-minimized-5350472347025408

This uses unsigned instead of SUINT because the later was rejected by multiple developers
See: [FFmpeg-devel] [PATCH] avcodec/fft_template: Fix multiple runtime error: signed integer overflow: -1943918714 - 1935113003 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-11 00:56:33 +02:00
Michael Niedermayer 305344d89e avcodec/fft: Add revtab32 for FFTs with more than 65536 samples
x86 optimizations are used only for the cases they support (<=65536 samples)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04 16:05:47 +01:00
Michael Niedermayer ae76b84221 avcodec: Extend fft to size 2^17
Asked-for-by: durandal_1707

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04 13:51:42 +01:00
Reimar Döffinger 2bb66cc8be fft_template: Move variables to where they are used.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-31 10:25:36 +02:00
Reimar Döffinger 1654514ab0 fft: add ff_ prefix to some global arrays.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-31 10:25:36 +02:00
Reimar Döffinger e2cd28c926 fft: add missing const.
This table was the largest object in FFmpeg's .data,
and really should be in .rodata.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-30 16:33:00 +02:00
Michael Niedermayer 13f4428915 Merge commit '650c4300d94aa9398ff1dd4f454bf39eaa285f62'
* commit '650c4300d94aa9398ff1dd4f454bf39eaa285f62':
  aarch64: NEON float FFT

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 23:06:24 +02:00
Janne Grunau 650c4300d9 aarch64: NEON float FFT
Approximately as fast as the ARM NEON version on Apple's A7.
2014-04-22 19:35:40 +02:00
Michael Niedermayer 99b6357f37 rename CONFIG_FFT_FIXED_32 -> FFT_FIXED_32
This matches FFT_FLOAT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 13:11:06 +01:00
Michael Niedermayer 7778979f6f Merge commit '794fcf79a89eca2d4e889803b2c804a0b1defbb3'
* commit '794fcf79a89eca2d4e889803b2c804a0b1defbb3':
  Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT

Conflicts:
	libavcodec/fft-internal.h
	libavcodec/fft-test.c
	libavcodec/fft_fixed.c
	libavcodec/fft_float.c
	libavcodec/fft_template.c
	libavcodec/mdct_fixed.c
	libavcodec/mdct_float.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 13:10:56 +01:00
Diego Biurrun 794fcf79a8 Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT
The define does not originate from configure, so it should not
have a name that is CONFIG_-prefixed.
2014-01-06 19:12:48 +01:00
Michael Niedermayer 6a7980e2cd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dct/fft: Give consistent names to fixed/float template files

Conflicts:
	libavcodec/fft_fixed.c
	libavcodec/fft_float.c
	libavcodec/mdct_fixed.c
	libavcodec/mdct_float.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-21 19:26:01 +01:00
Diego Biurrun ac0e03bab0 dct/fft: Give consistent names to fixed/float template files 2013-11-21 15:59:46 +01:00