1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Go to file
Niklas Haas fe04033739 lavc: Implement Dolby Vision RPU parsing
Based on a mixture of guesswork, partial documentation in patents, and
reverse engineering of real-world samples. Confirmed working for all the
samples I've thrown at it.

Contains some annoying machinery to persist these values in between
frames, which is needed in theory even though I've never actually seen a
sample that relies on it in practice. May or may not work.

Since the distinction matters greatly for parsing the color matrix
values, this includes a small helper function to guess the right profile
from the RPU itself in case the user has forgotten to forward the dovi
configuration record to the decoder. (Which in practice, only ffmpeg.c
and ffplay do..)

Notable omissions / deviations:
- CRC32 verification. This is based on the MPEG2 CRC32 type, which is
  similar to IEEE CRC32 but apparently different in subtle enough ways
  that I could not get it to pass verification no matter what parameters
  I fed to av_crc. It's possible the code needs some changes.
- Linear interpolation support. Nothing documents this (beyond its
  existence) and no samples use it, so impossible to implement.
- All of the extension metadata blocks, but these contain values that
  seem largely congruent with ST2094, HDR10, or other existing forms of
  side data, so I will defer parsing/attaching them to a future commit.
- The patent describes a mechanism for predicting coefficients from
  previous RPUs, but the bit for the flag whether to use the
  prediction deltas or signal entirely new coefficients does not seem to
  be present in actual RPUs, so we ignore this subsystem entirely.
- In the patent's spec, the NLQ subsystem also loops over
  num_nlq_pivots, but even in the patent the number is hard-coded to one
  iteration rather than signalled. So we only store one set of coefs.

Heavily influenced by https://github.com/quietvoid/dovi_tool
Documentation drawn from US Patent 10,701,399 B2 and ETSI GS CCM 001

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 11:59:41 +01:00
compat Replace all occurences of av_mallocz_array() by av_calloc() 2021-09-20 01:03:52 +02:00
doc lavu/frame: Add Dolby Vision metadata side data type 2022-01-04 11:59:02 +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 lavc: Implement Dolby Vision RPU parsing 2022-01-04 11:59:41 +01:00
libavdevice Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
libavfilter lavfi/showinfo: Support AV_FRAME_DATA_DOVI_METADATA 2022-01-04 11:59:41 +01:00
libavformat avformat/tests/imf: Don't use uninitialized value 2022-01-04 10:35:19 +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 fate/libswcale: add missing samples dependency to sws-slice tests 2022-01-03 09:42:38 -03:00
tools tools/target_dec_fuzzer: Adjust threshold for prores 2021-12-16 21:06:47 +01:00
.gitattributes
.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
Changelog avfilter: add anlmf filter 2021-12-25 11:32:41 +01:00
configure lavc: Implement Dolby Vision RPU parsing 2022-01-04 11:59:41 +01:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
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

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.