Go to file
Andreas Rheinhardt d4bbc0db01 avformat/av1: Improve filtering AV1 OBUs
Both ISOBMFF as well as Matroska require certain OBUs to be stripped
before muxing them. There are two functions for this purpose; one writes
directly into an AVIOContext, the other returns a freshly allocated
buffer with the undesired units stripped away.

The latter one actually relies on the former by means of a dynamic
buffer. This has several drawbacks: The underlying buffer might have to
be reallocated multiple times; the buffer will eventually be
overallocated; the data will not be directly copied into the final
buffer, but rather first in the write buffer (in chunks of 1024 byte)
and then written in these chunks. Moreover, the API for dynamic buffers
is defective wrt error checking and as a consequence, the earlier code
would indicate a length of -AV_INPUT_BUFFER_PADDING_SIZE on allocation
failure, but it would not return an error; there would also be no error
in case the arbitrary limit of INT_MAX/2 that is currently imposed on
dynamic buffers is hit.

This commit changes this: The buffer is now parsed twice, once to get
the precise length which will then be allocated; and once to actually
write the data.

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
753662 decicycles to 313319 decicycles (based upon 50 runs a 2048 frames
each); for another 1.5mb/s file (with average framesize of 7.3 kB) it
improved from 79270 decicycles to 34539 decicycles (based upon 50 runs a
4096 frames).

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: Improve filtering AV1 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
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
Changelog avformat: add demuxer for argonaut games' ASF format 2020-01-26 10:24:00 +01:00
configure configure: Check for GetStdHandle in addition to SetConsoleTextAttribute 2020-01-23 18:30:09 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
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

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.