Go to file
Ganesh Ajjanagadde c8780822ba swresample/resample: speed up build_filter for Blackman-Nuttall filter
This uses the trigonometric double and triple angle formulae to avoid
repeated (expensive) evaluation of libc's cos().

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-44100-2626
old:
1104466600 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1096765286 decicycles in build_filter(loop 1000),     512 runs,      0 skips
1070479590 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

new:
588861423 decicycles in build_filter(loop 1000),     256 runs,      0 skips
591262754 decicycles in build_filter(loop 1000),     512 runs,      0 skips
577355145 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

This results in small differences with the old expression:
difference (worst case on [0, 2*M_PI]), argmax 0.008:
max diff (relative): 0.000000000000157289807188
blackman_old(0.008): 0.000363951585488813192382
blackman_new(0.008): 0.000363951585488755946507

These are judged to be insignificant for the performance gain. PSNR to
reference file is unchanged up to second decimal point for instance.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-05 21:52:40 -05:00
compat Merge commit '407ac22322e5ce67996ec54ef619cafa4c9ceb78' 2015-11-02 11:58:27 +01:00
doc avformat: add acm demuxer 2015-11-03 12:26:09 +01:00
libavcodec avcodec/mpeg12dec: Do not call show_bits() with invalid bits 2015-11-06 00:56:52 +01:00
libavdevice gdigrab: grab right desktop size if DPI in use, based on patch from Alexander Brotzge 2015-10-31 23:08:02 +11:00
libavfilter avfilter/showcqt: remove yuv offset 2015-11-03 23:47:09 +01:00
libavformat mpegtsenc: Implement writing of Opus trim_start/trim_end control values 2015-11-06 03:33:17 +01:00
libavresample avresample/resample: remove unused variable 2015-09-19 23:40:34 +02:00
libavutil libavutil/channel_layout: Check strtol*() for failure 2015-11-05 19:28:19 +01:00
libpostproc Merge commit 'e88103a7f92cf27a2868b50acc8a9912f6088249' 2015-09-05 21:35:46 +02:00
libswresample swresample/resample: speed up build_filter for Blackman-Nuttall filter 2015-11-05 21:52:40 -05:00
libswscale swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init 2015-10-29 23:49:46 +01:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests fate: update fate-source ref file 2015-11-03 15:05:32 -03:00
tools Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
.gitattributes Treat all '*.pnm' files as non-text file 2014-11-28 17:52:43 -05:00
.gitignore gitignore: ignore object file temporaries 2015-10-10 20:30:41 +02:00
.travis.yml Merge commit '1e0b8bf0b3b3b4247fb21e9839af342ae879607c' 2015-09-12 13:31:22 +02:00
arch.mak use mmi instead of loongson3 as simd-optimization flag 2015-07-07 03:46:57 +02:00
Changelog avformat: add acm demuxer 2015-11-03 12:26:09 +01:00
cmdutils_common_opts.h opts: add list device sources/sinks options 2014-10-25 20:20:31 +02:00
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 cmdutils: remove sws_opts usage, simplify code 2015-08-08 16:51:25 +02:00
common.mak Merge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b' 2015-10-14 13:54:50 +02:00
configure Merge commit 'a0562e531723923b632684c7b51a9dd584bf534f' 2015-11-02 11:58:16 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_dxva2.c ffmpeg_dxva2: call GetDesktopWindow() in place of GetShellWindow() 2015-06-03 16:25:08 +02:00
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_vdpau: Ignore decoder's max supported level 2015-08-16 15:02:33 -07:00
ffmpeg_videotoolbox.c ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT 2015-10-15 10:22:31 +02:00
ffmpeg.c all: use FFDIFFSIGN to resolve possible undefined behavior in comparators 2015-11-03 16:28:30 -05: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: Use singlejpeg muxer for jpeg 2015-06-08 03:36:22 +02:00
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 build: add LDLIBFLAGS 2015-07-08 14:35:02 +02:00
LICENSE.md avfilter: add rubberband wrapper 2015-09-20 19:54:57 +02:00
MAINTAINERS MAINTAINERS: add key fingerprint 2015-10-25 19:15:04 -04:00
Makefile Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8' 2015-10-22 16:18:02 +02:00
README.md README: replace http with https 2015-10-06 13:27:29 +02:00
RELEASE RELEASE: update to 2.8.git 2015-09-09 23:53:15 -03:00
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.