1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Go to file
Ganesh Ajjanagadde 9bc3d3355f avcodec/huffman: replace qsort with AV_QSORT
ff_huff_build_tree uses qsort underneath. AV_QSORT is substantially
faster due to the inlining of the comparison callback. Furthermore, this
code is reasonably performance critical, since in e.g the fraps codec,
ff_huff_build_tree is called on every frame. This routine is also called
in vp6 on every frame in some circumstances.

Sample benchmark (x86-64, Haswell, GNU/Linux), vp6 from FATE:
vp6 (old):
  78930 decicycles in qsort,       1 runs,      0 skips
  45330 decicycles in qsort,       2 runs,      0 skips
  27825 decicycles in qsort,       4 runs,      0 skips
  17471 decicycles in qsort,       8 runs,      0 skips
  12296 decicycles in qsort,      16 runs,      0 skips
   9554 decicycles in qsort,      32 runs,      0 skips
   8404 decicycles in qsort,      64 runs,      0 skips
   7405 decicycles in qsort,     128 runs,      0 skips
   6740 decicycles in qsort,     256 runs,      0 skips
   7540 decicycles in qsort,     512 runs,      0 skips
   9498 decicycles in qsort,    1024 runs,      0 skips
   9938 decicycles in qsort,    2048 runs,      0 skips
   8043 decicycles in qsort,    4095 runs,      1 skips

vp6 (new):
  15880 decicycles in qsort,       1 runs,      0 skips
  10730 decicycles in qsort,       2 runs,      0 skips
  10155 decicycles in qsort,       4 runs,      0 skips
   7805 decicycles in qsort,       8 runs,      0 skips
   6883 decicycles in qsort,      16 runs,      0 skips
   6305 decicycles in qsort,      32 runs,      0 skips
   5854 decicycles in qsort,      64 runs,      0 skips
   5152 decicycles in qsort,     128 runs,      0 skips
   4452 decicycles in qsort,     256 runs,      0 skips
   4161 decicycles in qsort,     511 runs,      1 skips
   4081 decicycles in qsort,    1023 runs,      1 skips
   4072 decicycles in qsort,    2047 runs,      1 skips
   4004 decicycles in qsort,    4095 runs,      1 skips

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-25 10:18: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: update after recent additions 2015-10-25 11:54:17 +01:00
libavcodec avcodec/huffman: replace qsort with AV_QSORT 2015-10-25 10:18:00 -04:00
libavdevice all: fix -Wextra-semi reported on clang 2015-10-24 17:58:17 -04:00
libavfilter avutil/tree: add additional const qualifier to the comparator 2015-10-24 20:38:07 -04:00
libavformat avformat/aiffdec: give friendly message if compressed codec tag is unsupported 2015-10-25 14:07:03 +01:00
libavresample avresample/resample: remove unused variable 2015-09-19 23:40:34 +02:00
libavutil avutil/tree: add additional const qualifier to the comparator 2015-10-24 20:38:07 -04:00
libpostproc Merge commit 'e88103a7f92cf27a2868b50acc8a9912f6088249' 2015-09-05 21:35:46 +02:00
libswresample all: add const-correctness to qsort comparators 2015-10-25 10:07:20 -04:00
libswscale swscale/swscale: add av_warn_unused_result to sws_init_context 2015-10-16 17:18:21 -04:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests aacenc_ltp: adjust and speed up autocorrelation calculations 2015-10-17 22:53:11 +01:00
tools Merge commit '87e5d8d78cf08b54b4a9e7cbaeff89f8c1d91b78' 2015-09-07 12:27:21 +02: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 xvag demuxer 2015-10-25 11:05:56 +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: add const-correctness to qsort comparators 2015-10-25 10:07:20 -04:00
cmdutils.c Merge commit '9ef748173a4e0e58d40afaf38397783cd2537eaa' 2015-10-16 22:57:21 +02: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 Revert "configure: add -Wstrict-prototypes when available" 2015-10-23 09:10:45 -04:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
ffmpeg_dxva2.c ffmpeg_dxva2: call GetDesktopWindow() in place of GetShellWindow() 2015-06-03 16:25:08 +02:00
ffmpeg_filter.c Revert "Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'" (avconv: Do not try to configure filter outputs without streams) 2015-10-11 12:24:43 +02: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 ffmpeg: add abort_on option to allow aborting on empty output 2015-10-22 19:03:01 +02:00
ffmpeg.h ffmpeg: add abort_on option to allow aborting on empty output 2015-10-22 19:03:01 +02:00
ffplay.c ffplay: use a separate struct for the rescaled YUVA AVSubtitle rectangles 2015-10-24 16:12:25 +02:00
ffprobe.c all: fix -Wextra-semi reported on clang 2015-10-24 17:58:17 -04: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 ffserver: avoid leaking pathname at exit 2015-10-04 22:31:22 -07:00
INSTALL.md INSTALL: add markdown syntax 2014-05-28 22:38:38 +02:00
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 Add myself as maintainer for Hap 2015-10-23 18:55:52 +02: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.