FFmpeg git repo
Go to file
Lynne b79b29ddb1 libavutil: add an FFT & MDCT implementation
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.
2019-05-15 17:39:59 +01:00
compat compat/avisynth: update headers 2019-05-04 11:56:53 +05:30
doc avfilter: add asr filter 2019-05-14 15:17:14 +02:00
ffbuild Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b' 2019-03-10 19:31:13 -03:00
fftools libavformat: improve logs with cur_dts 2019-04-19 17:14:44 +02:00
libavcodec aarch64/asm-offsets: remove old CELT offsets 2019-05-14 23:41:24 +01:00
libavdevice avdevice/decklink: fix checking video mode in SDK version 11 2019-05-05 20:07:35 +02:00
libavfilter avfilter: add asr filter 2019-05-14 15:17:14 +02:00
libavformat lavf/dashdec: refactoring error handle logic for open_input 2019-05-14 17:36:19 +08:00
libavresample avresample: remove deprecated attribute from the AVAudioResampleContext struct 2018-01-09 10:56:53 -03:00
libavutil libavutil: add an FFT & MDCT implementation 2019-05-15 17:39:59 +01:00
libpostproc postproc/postprocess_template: remove FF_REG_sp from clobber list 2018-12-22 17:41:44 +01:00
libswresample Bump minor version for master after 4.1 branchpoint 2018-11-02 00:53:07 +01:00
libswscale swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytes 2019-05-13 13:39:49 +02:00
presets
tests avutil: Add missing reference files for pixdesc fate test 2019-05-14 12:06:26 +02:00
tools tools/crypto_bench: update the comment about build command 2019-05-09 17:03:30 +08:00
.gitattributes
.gitignore
.travis.yml Merge commit '899ee03088d55152a48830df0899887f055da1de' 2019-03-14 15:53:16 -03:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avfilter: add asr filter 2019-05-14 15:17:14 +02:00
INSTALL.md INSTALL.md: Fix Markdown formatting 2019-01-31 10:29:16 -09:00
LICENSE.md LICENSE: Clarify --enable-nonfree. 2019-05-10 01:18:58 +02:00
MAINTAINERS MAINTAINERS: remove myself as mailing list maintainer 2019-03-21 11:34:13 -08:00
Makefile Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b' 2019-03-10 19:31:13 -03:00
README.md
RELEASE RELEASE: bump to 4.1.git 2018-11-02 00:55:49 +01:00
configure avfilter: add asr filter 2019-05-14 15:17:14 +02:00

README.md

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.