Go to file
Andreas Rheinhardt bc109a53c7 avcodec/mpegpicture: Move mb_var, mc_mb_var and mb_mean to MpegEncCtx
These tables are only used by encoders and only for the current picture;
ergo they need not be put into the picture at all, but rather into
the encoder's context. They also don't need to be refcounted,
because there is only one owner.

In contrast to this, the earlier code refcounts them which
incurs unnecessary overhead. These references are not unreferenced
in ff_mpeg_unref_picture() (they are kept in order to have something
like a buffer pool), so that several buffers are kept at the same
time, although only one is needed, thereby wasting memory.

The code also propagates references to other pictures not part of
the pictures array (namely the copy of the current/next/last picture
in the MpegEncContext which get references of their own). These
references are not unreferenced in ff_mpeg_unref_picture() (the
buffers are probably kept in order to have something like a pool),
yet if the current picture is a B-frame, it gets unreferenced
at the end of ff_mpv_encode_picture() and its slot in the picture
array will therefore be reused the next time; but the copy of the
current picture also still has its references and therefore
these buffers will be made duplicated in order to make them writable
in the next call to ff_mpv_encode_picture(). This is of course
unnecessary.

Finally, ff_find_unused_picture() is supposed to just return
any unused picture and the code is supposed to work with it;
yet for the vsynth*-mpeg4-adap tests the result depends upon
the content of these buffers; given that this patchset
changes the content of these buffers (the initial content is now
the state of these buffers after encoding the last frame;
before this patch the buffers used came from the last picture
that occupied the same slot in the picture array) their ref-files
needed to be changed. This points to a bug somewhere (if one removes
the initialization, one gets uninitialized reads in
adaptive_quantization in ratecontrol.c).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-09 19:17:22 +02:00
compat avfilter: add chromakey_cuda filter 2022-07-10 17:20:15 +02:00
doc doc/filters: clarify behaviour of weights in amix 2022-08-09 13:59:29 +05:30
ffbuild ffbuild/common: Fix CPPFLAGS applied for compiling C++ files 2022-05-24 21:30:52 +02:00
fftools fftools/ffmpeg: move handling corrupt packets to the input thread 2022-08-08 16:20:58 +02:00
libavcodec avcodec/mpegpicture: Move mb_var, mc_mb_var and mb_mean to MpegEncCtx 2022-08-09 19:17:22 +02:00
libavdevice avdevice/v4l2: fix leak of timefilter 2022-08-03 17:52:25 +08:00
libavfilter lavfi/overlay_vaapi: set defalut alpha value as 1.0 2022-08-09 14:02:25 +08:00
libavformat avformat/movenc: Remove experimental status of flac-in-MP4 muxing 2022-08-08 16:19:38 +02:00
libavutil x86/tx_float: save a branch during coefficient deinterleaving 2022-08-09 03:35:12 +02:00
libpostproc Bump versions after 5.1 branch 2022-07-13 00:29:05 +02:00
libswresample Bump versions after 5.1 branch 2022-07-13 00:29:05 +02:00
libswscale swscale/output: fix reading chroma values when generating vuya output 2022-08-08 09:39:33 -03:00
presets
tests avcodec/mpegpicture: Move mb_var, mc_mb_var and mb_mean to MpegEncCtx 2022-08-09 19:17:22 +02:00
tools tools/target_dec_fuzzer: set avctx->workaround_bugs flags 2022-07-26 09:15:16 -03:00
.gitattributes
.gitignore gitignore: add config_components.h 2022-03-17 18:35:41 -03: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
Changelog lavc/vaapi_encode: enable 8bit 4:4:4 encoding for HEVC and VP9 2022-08-09 09:22:49 -07:00
configure avcodec/flacdsp: Split encoder-only parts into a ctx of its own 2022-08-05 03:28:45 +02:00
CONTRIBUTING.md
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: Split project server admin list 2022-08-07 22:01:21 +02:00
Makefile Makefile: Prompt for reconfigure on lavc/hwaccels.h modification 2022-07-01 00:34:38 +02:00
README.md README: fix typo and description of libavfilter 2021-10-08 09:44:34 +05:30
RELEASE RELEASE: update after 5.1 branch 2022-07-13 00:31:42 +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 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.