Go to file
Andreas Rheinhardt 8be701d9f7 avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilter
Up until now, an AVFilter's lists of input and output AVFilterPads
were terminated by a sentinel and the only way to get the length
of these lists was by using avfilter_pad_count(). This has two
drawbacks: first, sizeof(AVFilterPad) is not negligible
(i.e. 64B on 64bit systems); second, getting the size involves
a function call instead of just reading the data.

This commit therefore changes this. The sentinels are removed and new
private fields nb_inputs and nb_outputs are added to AVFilter that
contain the number of elements of the respective AVFilterPad array.

Given that AVFilter.(in|out)puts are the only arrays of zero-terminated
AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads
are not zero-terminated and they already have a size field) the argument
to avfilter_pad_count() is always one of these lists, so it just has to
find the filter the list belongs to and read said number. This is slower
than before, but a replacement function that just reads the internal numbers
that users are expected to switch to will be added soon; and furthermore,
avfilter_pad_count() is probably never called in hot loops anyway.

This saves about 49KiB from the binary; notice that these sentinels are
not in .bss despite being zeroed: they are in .data.rel.ro due to the
non-sentinels.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:53:58 +02:00
compat compat/cuda: add __expf() implementation 2021-08-14 15:06:47 +02:00
doc avfilter/vf_colorcorrect: fix average analyze mode and add minmax mode 2021-08-20 10:55:33 +02:00
ffbuild avfilter: compress CUDA PTX code if possible 2021-06-22 14:05:44 +02:00
fftools fftools/cmdutils: Use avfilter_pad_count() for AVFilter's number of pads 2021-08-20 12:52:33 +02:00
libavcodec avcodec/h264_parser: Fix undefined left shift 2021-08-20 12:19:12 +02:00
libavdevice avdevice/decklink: support for more duplex mode for Decklink 8K Pro 2021-08-16 10:00:39 +08:00
libavfilter avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilter 2021-08-20 12:53:58 +02:00
libavformat avformat/hlsenc: minus subtitle streams count when subtitle stream between video and audio streams 2021-08-19 18:24:15 +08:00
libavutil avutil/opt: Document actual behaviour of av_opt_copy a bit more 2021-08-17 19:11:57 +02:00
libpostproc postproc/postprocess: Remove legacy cruft 2021-07-29 22:02:06 +02:00
libswresample (postproc|swresample)/version: Don't include libavutil/avutil.h 2021-07-29 22:02:05 +02:00
libswscale avutil/internal, swresample/audioconvert: Remove cpu.h inclusions 2021-07-22 14:33:45 +02:00
presets
tests avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
tools FATE: add a test for sliced scaling 2021-08-08 19:26:05 +02:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore avfilter: compress CUDA PTX code if possible 2021-06-22 14:05:44 +02:00
.mailmap mailmap: add entry for myself 2021-03-09 02:09:55 +00:00
.travis.yml Merge commit '899ee03088d55152a48830df0899887f055da1de' 2019-03-14 15:53:16 -03:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avcodec: add SMC encoder 2021-08-18 08:55:56 +02:00
INSTALL.md INSTALL.md: Fix Markdown formatting 2019-01-31 10:29:16 -09:00
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS avformat: add Argonaut Games CVG demuxer 2021-05-12 20:25:50 +10:00
Makefile FATE: add a test for sliced scaling 2021-08-08 19:26:05 +02:00
README.md Remove the ffserver program 2018-01-06 18:31:37 +00:00
RELEASE Bump Versions before release/4.4 branch 2021-03-20 01:01:12 +01:00
configure avfilter/vf_convolve: switch to TX FFT from avutil 2021-08-17 09:15:06 +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.