Go to file
Andreas Rheinhardt f440c422b7 swscale/swscale: Fix races when using unaligned strides/data
In this case the current code tries to warn once; to do so, it uses
ordinary static ints to store whether the warning has already been
emitted. This is both a data race (and therefore undefined behaviour)
as well as a race condition, because it is really possible for multiple
threads to be the one thread to emit the warning. This is actually
common since the introduction of the new multithreaded scaling API.

This commit fixes this by using atomic integers for the state;
furthermore, these are not static anymore, but rather contained
in the user-facing SwsContext (i.e. the parent SwsContext in case
of slice-threading).

Given that these atomic variables are not intended for synchronization
at all (but only for atomicity, i.e. only to output the warning once),
the atomic operations use memory_order_relaxed.

This affected the nv12, nv21, yuv420, yuv420p10, yuv422, yuv422p10 and
yuv444 filter-overlay FATE-tests.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 23:52:37 +02:00
compat compat/cuda: add __expf() implementation 2021-08-14 15:06:47 +02:00
doc avfilter/avf_avectorscope: add support for commands 2021-09-19 13:49:55 +02:00
ffbuild avfilter: compress CUDA PTX code if possible 2021-06-22 14:05:44 +02:00
fftools ffmpeg: take into account image flipping in the display matrix 2021-09-16 12:57:06 -03:00
libavcodec avcodec/snowdec: Maintain avmv buffer 2021-09-19 22:36:23 +02:00
libavdevice libavdevice/avfoundation.m: fix potential unreleased lock issue 2021-09-17 15:31:40 +02:00
libavfilter avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale 2021-09-19 13:49:55 +02:00
libavformat avformat/dhav: do not use zero fps 2021-09-19 20:12:32 +02:00
libavutil avutil/buffer: Avoid allocation of AVBuffer when using buffer pool 2021-09-18 23:16:49 +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 swscale/swscale: Fix races when using unaligned strides/data 2021-09-19 23:52:37 +02:00
presets
tests fate/demux, gapless, image: Add missing ffprobe dependencies 2021-09-19 23:52:20 +02:00
tools tools/target_dec_fuzzer: Adjust VC1 threshold 2021-09-19 20:12:32 +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 avfilter: add audio psychoacoustic clipper 2021-09-11 16:19:40 +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/frei0r: use win32dlfcn wrapper 2021-09-15 12:37:02 +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.