Go to file
Andreas Rheinhardt 3d53cefb49 avcodec/raw: Reduce number of avpriv symbols
libavcodec currently exports four avpriv symbols that deal with
PixelFormatTags: avpriv_get_raw_pix_fmt_tags, avpriv_find_pix_fmt,
avpriv_pix_fmt_bps_avi and avpriv_pix_fmt_bps_mov. The latter two are
lists of PixelFormatTags, the former returns such a list and the second
searches a list for a pixel format that matches a given fourcc; only
one of the aforementioned three lists is ever searched.

Yet for avpriv_pix_fmt_bps_avi, avpriv_pix_fmt_bps_mov and
avpriv_find_pix_fmt the overhead of exporting these functions actually
exceeds the size of said objects (at least for ELF; the following numbers
are for x64 Ubuntu 20.10):
The code size of avpriv_find_pix_fmt is small (GCC 10.2 37B, Clang 11 41B),
yet exporting it adds a 20B string for the name alone to the exporting
as well as to each importing library; there is more: Four bytes in the
exporting libraries .gnu.hash; two bytes each for the exporting as well
as each importing libraries .gnu.version; 24B in the exporting as well
as each importing libraries .dynsym; 16B+24B for an entry in .plt as
well as the accompanying relocation entry in .rela.plt for each
importing library.

The overhead for the lists is similar: The strings are 23B and the
.plt+.rela.plt pair is replaced by 8B+24B for an entry in .got and
a relocation entry in .rela.dyn. These lists have a size of 80 resp.
72 bytes.

Yet for ff_raw_pix_fmt_tags, exporting it is advantageous compared to
duplicating it into libavformat and potentially libavdevice. Therefore
this commit replaces all library uses of the four symbols with a single
function that is exported for shared builds. It has an enum parameter
to choose the desired list besides the parameter for the fourcc. New
lists can be supported with new enum values.

Unfortunately, avpriv_get_raw_pix_fmt_tags could not be removed, as the
fourcc2pixfmt tool uses the table of raw pix fmts. No other user of this
function remains.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:49 +01:00
compat Replace all occurences of av_mallocz_array() by av_calloc() 2021-09-20 01:03:52 +02:00
doc doc/APIchanges: Fill in the commit hash for DOVI metadata addition 2022-01-04 12:40:07 +01:00
ffbuild Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
fftools ffprobe: Support AV_FRAME_DATA_DOVI_METADATA 2022-01-04 11:59:41 +01:00
libavcodec avcodec/raw: Reduce number of avpriv symbols 2022-01-04 13:16:49 +01:00
libavdevice avcodec/raw: Reduce number of avpriv symbols 2022-01-04 13:16:49 +01:00
libavfilter lavfi/showinfo: Support AV_FRAME_DATA_DOVI_METADATA 2022-01-04 11:59:41 +01:00
libavformat avcodec/raw: Reduce number of avpriv symbols 2022-01-04 13:16:49 +01:00
libavutil lavu/frame: Add Dolby Vision metadata side data type 2022-01-04 11:59:02 +01:00
libpostproc lib*/version.h: Bump Versions after release/5.0 branch 2022-01-03 22:10:46 +01:00
libswresample Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
libswscale Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
presets
tests lavc/hevcdec: Parse DOVI RPU NALs 2022-01-04 12:08:18 +01:00
tools tools/target_dec_fuzzer: Adjust threshold for prores 2021-12-16 21:06:47 +01:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore build: detect Metal.framework and build .metal files 2021-12-18 11:55:47 -08: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
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avfilter: add anlmf filter 2021-12-25 11:32:41 +01: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 MAINTAINERS: add my gpg fingerprint 2021-12-23 09:25:16 +08:00
Makefile Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
README.md README: fix typo and description of libavfilter 2021-10-08 09:44:34 +05:30
RELEASE Bump Versions before release/4.4 branch 2021-03-20 01:01:12 +01:00
configure lavc/hevcdec: Parse DOVI RPU NALs 2022-01-04 12:08:18 +01: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 means to alter decoded audio and video through a directed graph of connected 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.