Go to file
Ganesh Ajjanagadde b87ca4bf25 swresample/resample: speed up upsampling by precomputing sines
When upsampling, factor is set to 1 and sines need to be evaluated only
once for each phase, and the complexity should not depend on the number
of filter taps. This does the desired precomputation, yielding
significant speedups. Hard guarantees on the gain are not possible, but gains
themselves are obvious and are illustrated below.

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-2626-44100
old:
29161085 decicycles in build_filter (loop 1000),     256 runs,      0 skips
28821467 decicycles in build_filter (loop 1000),     512 runs,      0 skips
28668201 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

new:
14351936 decicycles in build_filter (loop 1000),     256 runs,      0 skips
14306652 decicycles in build_filter (loop 1000),     512 runs,      0 skips
14299923 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

Note that this does not statically allocate the sin lookup table. This
may be done for the default 1024 phases, yielding a 512*8 = 4kB array
which should be small enough.
This should yield a small improvement. Nevertheless, this is separate from
this patch, is more ambiguous due to the binary increase, and requires a
lut to be generated offline.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-09 18:41:03 -05:00
compat Merge commit '407ac22322e5ce67996ec54ef619cafa4c9ceb78' 2015-11-02 11:58:27 +01:00
doc doc/ffmpeg: Clarify that the sdp_file option requires an rtp output. 2015-11-09 23:43:11 +01:00
libavcodec avcodec/nvenc: update nvenc default parameters 2015-11-09 13:05:02 +01:00
libavdevice avdevice/dshow_enummediatypes: check return of av_malloc 2015-11-06 09:36:57 -05:00
libavfilter avfilter: add anoisesrc 2015-11-08 18:50:26 +01:00
libavformat avformat/cache: Avoid int-overflow in cache compare function 2015-11-09 19:25:05 +01:00
libavresample
libavutil avutil/x86/intmath: Correct intrinsic headers for older compilers. 2015-11-09 21:40:33 +11:00
libpostproc
libswresample swresample/resample: speed up upsampling by precomputing sines 2015-11-09 18:41:03 -05:00
libswscale swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init 2015-10-29 23:49:46 +01:00
presets
tests Add pixblockdsp checkasm tests 2015-11-07 18:46:55 -08:00
tools Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
.gitattributes
.gitignore gitignore: ignore object file temporaries 2015-10-10 20:30:41 +02:00
.travis.yml
arch.mak
Changelog avfilter: add anoisesrc 2015-11-08 18:50:26 +01:00
cmdutils_common_opts.h
cmdutils_opencl.c all: use FFDIFFSIGN to resolve possible undefined behavior in comparators 2015-11-03 16:28:30 -05:00
cmdutils.c all: use FFDIFFSIGN to resolve possible undefined behavior in comparators 2015-11-03 16:28:30 -05:00
cmdutils.h
common.mak Merge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b' 2015-10-14 13:54:50 +02:00
configure mmaldec: add vc1 decoding support 2015-11-07 19:24:49 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_dxva2.c
ffmpeg_filter.c ffmpeg_filter: check encoder before using it to set frame size. 2015-10-30 10:55:10 +01:00
ffmpeg_opt.c all: remove some casts of function pointer to void * 2015-10-24 15:14:59 -04:00
ffmpeg_qsv.c Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8' 2015-10-22 16:18:02 +02:00
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT 2015-10-15 10:22:31 +02:00
ffmpeg.c ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format. 2015-11-09 23:43:11 +01:00
ffmpeg.h ffmpeg: add abort_on option to allow aborting on empty output 2015-10-22 19:03:01 +02:00
ffplay.c Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
ffprobe.c ffprobe: add support for printing packet strings metadata as packet tags 2015-10-30 20:47:43 +01:00
ffserver_config.c ffserver_config: check for INT_MIN before doing FFABS 2015-10-13 19:40:09 -04:00
ffserver_config.h
ffserver.c Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
INSTALL.md
library.mak
LICENSE.md
MAINTAINERS lavfi: remove astreamsync. 2015-11-07 16:43:36 +01:00
Makefile Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8' 2015-10-22 16:18:02 +02:00
README.md
RELEASE
version.sh version.sh: add note that ffversion.h is auto-generated 2015-10-25 10:14:44 -04:00

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.
  • ffserver is a multimedia streaming server for live broadcasts.
  • 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. Few developers follow pull requests so they will likely be ignored.