Go to file
Ganesh Ajjanagadde 7910a2c269 avfilter/vf_deshake: replace qsort with AV_QSORT
qsort is called indirectly in filter_frame, suggesting its performance
criticality. AV_QSORT is substantially faster due to the inlining of the
comparison callback. Thus, the increase in performance should be worth
the increase in binary size.

This optimization is just a low hanging fruit. The trac ticket 1430 is
a request for an improved deshake filter.

Sample benchmark (x86-64, Haswell, GNU/Linux):
File: original from https://trac.ffmpeg.org/ticket/1430
command: ffmpeg -stream_loop 8 -i file.webm -vf deshake=rx=64:ry=64 -f null -

Timer truncated at 1024 runs.
new:
28260 decicycles in qsort,       1 runs,      0 skips
35570 decicycles in qsort,       2 runs,      0 skips
39010 decicycles in qsort,       4 runs,      0 skips
46897 decicycles in qsort,       8 runs,      0 skips
40442 decicycles in qsort,      16 runs,      0 skips
41611 decicycles in qsort,      32 runs,      0 skips
40345 decicycles in qsort,      64 runs,      0 skips
38967 decicycles in qsort,     128 runs,      0 skips
38647 decicycles in qsort,     256 runs,      0 skips
40238 decicycles in qsort,     512 runs,      0 skips
39676 decicycles in qsort,    1024 runs,      0 skips

old:
1740280 decicycles in qsort,       1 runs,      0 skips
 923560 decicycles in qsort,       2 runs,      0 skips
 511330 decicycles in qsort,       4 runs,      0 skips
 309720 decicycles in qsort,       8 runs,      0 skips
 194900 decicycles in qsort,      16 runs,      0 skips
 142686 decicycles in qsort,      32 runs,      0 skips
 112516 decicycles in qsort,      64 runs,      0 skips
  98166 decicycles in qsort,     128 runs,      0 skips
  88147 decicycles in qsort,     256 runs,      0 skips
  88706 decicycles in qsort,     512 runs,      0 skips
  86783 decicycles in qsort,    1024 runs,      0 skips

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-31 10:25:00 -04:00
compat compat/solaris/make_sunver.pl: Use /usr/bin/env perl instead of /usr/bin/perl 2015-10-20 02:21:34 +02:00
doc doc/general.texi: fix SDX2 description 2015-10-29 21:29:47 +01:00
libavcodec avcodec/libopenh264enc: AV_OPT_TYPE_STRING should use .str default 2015-10-31 02:29:01 +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/vf_deshake: replace qsort with AV_QSORT 2015-10-31 10:25:00 -04:00
libavformat all: fix enum definition for large values 2015-10-30 15:06:19 -04:00
libavresample
libavutil avutil/x86/intmath: Use tzcnt in place of bsf. 2015-10-31 23:11:32 +11:00
libpostproc
libswresample swr: do not reject channel layouts that use channel 63 2015-10-28 19:25:49 +01:00
libswscale swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init 2015-10-29 23:49:46 +01:00
presets
tests vf_lut: Add support for RGB48 and RGBA64. 2015-10-30 03:55:12 +01: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 avformat: add DC STR demuxer 2015-10-29 21:26:43 +01:00
cmdutils_common_opts.h
cmdutils_opencl.c all: add const-correctness to qsort comparators 2015-10-25 10:07:20 -04:00
cmdutils.c Merge commit 'fe66671bd5f446f8d0a9c70968ba8fe891efe028' 2015-10-27 14:06:30 +01:00
cmdutils.h
common.mak Merge commit 'c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b' 2015-10-14 13:54:50 +02:00
configure avfilter/showcqt: fix dependency with avformat 2015-10-30 22:45:46 +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: use log10 instead of log()/log(10) 2015-10-29 19:05:29 -04: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 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
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.