mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
b79b29ddb1
This commit adds a new API to libavutil to allow for arbitrary transformations on various types of data. This is a partly new implementation, with the power of two transforms taken from libavcodec/fft_template, the 5 and 15-point FFT taken from mdct15, while the 3-point FFT was written from scratch. The (i)mdct folding code is taken from mdct15 as well, as the mdct_template code was somewhat old, messy and not easy to separate. A notable feature of this implementation is that it allows for 3xM and 5xM based transforms, where M is a power of two, e.g. 384, 640, 768, 1280, etc. AC-4 uses 3xM transforms while Siren uses 5xM transforms, so the code will allow for decoding of such streams. A non-exaustive list of supported sizes: 4, 8, 12, 16, 20, 24, 32, 40, 48, 60, 64, 80, 96, 120, 128, 160, 192, 240, 256, 320, 384, 480, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560... The API was designed such that it allows for not only 1D transforms but also 2D transforms of certain block sizes. This was partly on accident as the stride argument is required for Opus MDCTs, but can be used in the context of a 2D transform as well. Also, various data types would be implemented eventually as well, such as "double" and "int32_t". Some performance comparisons with libfftw3f (SIMD disabled for both): 120: 22353 decicycles in fftwf_execute, 1024 runs, 0 skips 21836 decicycles in compound_fft_15x8, 1024 runs, 0 skips 128: 22003 decicycles in fftwf_execute, 1024 runs, 0 skips 23132 decicycles in monolithic_fft_ptwo, 1024 runs, 0 skips 384: 75939 decicycles in fftwf_execute, 1024 runs, 0 skips 73973 decicycles in compound_fft_3x128, 1024 runs, 0 skips 640: 104354 decicycles in fftwf_execute, 1024 runs, 0 skips 149518 decicycles in compound_fft_5x128, 1024 runs, 0 skips 768: 109323 decicycles in fftwf_execute, 1024 runs, 0 skips 164096 decicycles in compound_fft_3x256, 1024 runs, 0 skips 960: 186210 decicycles in fftwf_execute, 1024 runs, 0 skips 215256 decicycles in compound_fft_15x64, 1024 runs, 0 skips 1024: 163464 decicycles in fftwf_execute, 1024 runs, 0 skips 199686 decicycles in monolithic_fft_ptwo, 1024 runs, 0 skips With SIMD we should be faster than fftw for 15xM transforms as our fft15 SIMD is around 2x faster than theirs, even if our ptwo SIMD is slightly slower. The goal is to remove the libavcodec/mdct15 code and deprecate the libavcodec/avfft interface once aarch64 and x86 SIMD code has been ported. New code throughout the project should use this API. The implementation passes fate when used in Opus, AAC and Vorbis, and the output is identical with ATRAC9 as well. |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
avr32 | ||
bfin | ||
mips | ||
ppc | ||
sh4 | ||
tests | ||
tomi | ||
x86 | ||
.gitignore | ||
adler32.c | ||
adler32.h | ||
aes_ctr.c | ||
aes_ctr.h | ||
aes_internal.h | ||
aes.c | ||
aes.h | ||
attributes.h | ||
audio_fifo.c | ||
audio_fifo.h | ||
avassert.h | ||
avsscanf.c | ||
avstring.c | ||
avstring.h | ||
avutil.h | ||
avutilres.rc | ||
base64.c | ||
base64.h | ||
blowfish.c | ||
blowfish.h | ||
bprint.c | ||
bprint.h | ||
bswap.h | ||
buffer_internal.h | ||
buffer.c | ||
buffer.h | ||
camellia.c | ||
camellia.h | ||
cast5.c | ||
cast5.h | ||
channel_layout.c | ||
channel_layout.h | ||
color_utils.c | ||
color_utils.h | ||
colorspace.h | ||
common.h | ||
cpu_internal.h | ||
cpu.c | ||
cpu.h | ||
crc.c | ||
crc.h | ||
cuda_check.h | ||
des.c | ||
des.h | ||
dict.c | ||
dict.h | ||
display.c | ||
display.h | ||
downmix_info.c | ||
downmix_info.h | ||
dynarray.h | ||
encryption_info.c | ||
encryption_info.h | ||
error.c | ||
error.h | ||
eval.c | ||
eval.h | ||
ffmath.h | ||
fifo.c | ||
fifo.h | ||
file_open.c | ||
file.c | ||
file.h | ||
fixed_dsp.c | ||
fixed_dsp.h | ||
float_dsp.c | ||
float_dsp.h | ||
frame.c | ||
frame.h | ||
hash.c | ||
hash.h | ||
hdr_dynamic_metadata.c | ||
hdr_dynamic_metadata.h | ||
hmac.c | ||
hmac.h | ||
hwcontext_cuda_internal.h | ||
hwcontext_cuda.c | ||
hwcontext_cuda.h | ||
hwcontext_d3d11va.c | ||
hwcontext_d3d11va.h | ||
hwcontext_drm.c | ||
hwcontext_drm.h | ||
hwcontext_dxva2.c | ||
hwcontext_dxva2.h | ||
hwcontext_internal.h | ||
hwcontext_mediacodec.c | ||
hwcontext_mediacodec.h | ||
hwcontext_opencl.c | ||
hwcontext_opencl.h | ||
hwcontext_qsv.c | ||
hwcontext_qsv.h | ||
hwcontext_vaapi.c | ||
hwcontext_vaapi.h | ||
hwcontext_vdpau.c | ||
hwcontext_vdpau.h | ||
hwcontext_videotoolbox.c | ||
hwcontext_videotoolbox.h | ||
hwcontext.c | ||
hwcontext.h | ||
imgutils_internal.h | ||
imgutils.c | ||
imgutils.h | ||
integer.c | ||
integer.h | ||
internal.h | ||
intfloat.h | ||
intmath.c | ||
intmath.h | ||
intreadwrite.h | ||
lfg.c | ||
lfg.h | ||
libavutil.v | ||
libm.h | ||
lls.c | ||
lls.h | ||
log2_tab.c | ||
log.c | ||
log.h | ||
lzo.c | ||
lzo.h | ||
macros.h | ||
Makefile | ||
mastering_display_metadata.c | ||
mastering_display_metadata.h | ||
mathematics.c | ||
mathematics.h | ||
md5.c | ||
md5.h | ||
mem_internal.h | ||
mem.c | ||
mem.h | ||
motion_vector.h | ||
murmur3.c | ||
murmur3.h | ||
opt.c | ||
opt.h | ||
parseutils.c | ||
parseutils.h | ||
pca.c | ||
pca.h | ||
pixdesc.c | ||
pixdesc.h | ||
pixelutils.c | ||
pixelutils.h | ||
pixfmt.h | ||
qsort.h | ||
random_seed.c | ||
random_seed.h | ||
rational.c | ||
rational.h | ||
rc4.c | ||
rc4.h | ||
replaygain.h | ||
reverse.c | ||
reverse.h | ||
ripemd.c | ||
ripemd.h | ||
samplefmt.c | ||
samplefmt.h | ||
sha512.c | ||
sha512.h | ||
sha.c | ||
sha.h | ||
slicethread.c | ||
slicethread.h | ||
softfloat_ieee754.h | ||
softfloat_tables.h | ||
softfloat.h | ||
spherical.c | ||
spherical.h | ||
stereo3d.c | ||
stereo3d.h | ||
tablegen.h | ||
tea.c | ||
tea.h | ||
thread.h | ||
threadmessage.c | ||
threadmessage.h | ||
time_internal.h | ||
time.c | ||
time.h | ||
timecode.c | ||
timecode.h | ||
timer.h | ||
timestamp.h | ||
tree.c | ||
tree.h | ||
twofish.c | ||
twofish.h | ||
tx.c | ||
tx.h | ||
utils.c | ||
version.h | ||
wchar_filename.h | ||
xga_font_data.c | ||
xga_font_data.h | ||
xtea.c | ||
xtea.h |