Go to file
Andreas Rheinhardt a3e43e0cf3 avformat/av1: Avoid allocation + copying when filtering OBUs
Certain types of OBUs are stripped away before muxing into Matroska and
ISOBMFF; there are two functions to do this: One that outputs by
directly writing in an AVIOContext and one that returns a freshly
allocated buffer with the units not stripped away copied into it.

The latter option is bad for performance, especially when the input
does already not contain any of the units intended to be stripped away
(this covers typical remuxing scenarios). Therefore this commit changes
this by avoiding allocating and copying when possible; it is possible if
the OBUs to be retained are consecutively in the input buffer (without
an OBU to be discarded between them). In this case, the caller receives
the offset as well as the length of the part of the buffer that contains
the units to be kept. This also avoids copying when e.g. the only unit
to be discarded is a temporal delimiter at the front.

For a 22.7mb/s file with average framesize 113 kB this improved the time
for the calls to ff_av1_filter_obus_buf() when writing Matroska from
313319 decicycles to 2368 decicycles; for another file with 1.5mb/s
(average framesize 7.3 kB) it improved from 34539 decicycles to 1922
decicyles. For these files the only units that needed to be stripped
away were temporal unit delimiters at the front.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-26 12:41:32 -03:00
compat avutil/thread: Add pthread_cond_timedwait function 2020-01-21 22:34:15 +01:00
doc doc/outdevs: Mention "sdl2" alias for "sdl". 2020-01-26 13:15:07 +01:00
ffbuild build: add support for building CUDA files with clang 2019-08-04 19:08:08 +02:00
fftools cmdutils: Fix compilation on cygwin wrt SetDllDirectory and GetModuleHandle 2020-01-08 13:53:31 +02:00
libavcodec avcodec: add decoder for argonaut games' adpcm codec 2020-01-26 10:23:54 +01:00
libavdevice avdevice/xcbgrab: check if frame size fits in INT_MAX 2020-01-24 01:17:14 +01:00
libavfilter avfilter/scale: don't fail for circular expressions 2020-01-26 21:06:53 +05:30
libavformat avformat/av1: Avoid allocation + copying when filtering OBUs 2020-01-26 12:41:32 -03:00
libavresample avresample: remove deprecated attribute from the AVAudioResampleContext struct 2018-01-09 10:56:53 -03:00
libavutil avutil/thread: fix strict_pthread_cond_timedwait 2020-01-25 23:16:18 +01:00
libpostproc Silence "string-plus-int" warning shown by clang. 2020-01-06 22:38:56 +01:00
libswresample Silence "string-plus-int" warning shown by clang. 2020-01-06 22:38:56 +01:00
libswscale swscale/input: Fix several invalid shifts related to rgb2yuv constants 2020-01-22 21:50:49 +01:00
presets presets: remove moldering iPod presets 2014-06-17 16:15:04 -08:00
tests checkasm: Check HAVE_GETSTDHANDLE here as well 2020-01-24 22:17:18 +02:00
tools tools/target_dec_fuzzer: Use codec_tags list 2020-01-22 21:50:49 +01:00
.gitattributes fate: add SCC test 2017-01-27 17:06:42 +01:00
.gitignore tools/python: add script to convert TensorFlow model (.pb) to native model (.model) 2019-07-01 10:23:47 -03: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 CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
Changelog avformat: add demuxer for argonaut games' ASF format 2020-01-26 10:24:00 +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 myself as libxavs2 maintainer 2019-12-07 19:34:57 +01:00
Makefile tools: add a fuzzer tool for bitstream filters 2019-12-05 20:49:15 -03:00
README.md Remove the ffserver program 2018-01-06 18:31:37 +00:00
RELEASE RELEASE: Update value for post 4.2 branch 2019-07-21 18:37:32 +02:00
configure configure: Check for GetStdHandle in addition to SetConsoleTextAttribute 2020-01-23 18:30:09 +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.