Go to file
Leo Izen 2548c32cc1
avcodec/png: use libavutil/csp.h for cHRM chunks
The cHRM chunk is descriptive. That is, it describes the primaries that should
be used to interpret the pixel data in the PNG file. This is notably different
from Mastering Display Metadata, which describes which subset of the presented
gamut is relevant. MDM describes a gamut and says colors outside the gamut are
not required to be preserved, but it does not actually describe the gamut that
the pixel data from the frame resides in. Thus, to decode a cHRM chunk present
in a PNG file to Mastering Display Metadata is incorrect.

This commit changes this behavior so the cHRM chunk, if present, is decoded to
color metadata. For example, if the cHRM chunk describes BT.709 primaries, the
resulting AVFrame will be tagged with AVCOL_PRI_BT709, as a description of its
pixel data. To do this, it utilizes libavutil/csp.h, which exposes a funcction
av_csp_primaries_id_from_desc, to detect which enum value accurately describes
the white point and primaries represented by the cHRM chunk.

This commit also changes pngenc.c to utilize the libavuitl/csp.h API, since it
previously duplicated code contained in that API. Instead, taking advantage of
the API that exists makes more sense. pngenc.c does properly utilize the color
tags rather than incorrectly using MDM, so that required no change.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-01-25 08:09:16 -05:00
compat compat/cuda: switch from powf to __powf intrinsic 2022-09-03 20:27:34 +02:00
doc avfilter/vf_cropdetect: add ability to change limit at runtime 2023-01-24 21:53:53 +01:00
ffbuild configure: probe RISC-V Vector extension 2022-09-27 13:19:52 +02:00
fftools ffprobe: fix data hash rendering 2023-01-24 23:58:00 +01:00
libavcodec avcodec/png: use libavutil/csp.h for cHRM chunks 2023-01-25 08:09:16 -05:00
libavdevice avdevice/avfoundation: convert to new channel layout-API 2022-11-08 14:08:05 -03:00
libavfilter avfilter/vf_scdet: fix introduced discrepancy with latest change 2023-01-24 22:02:45 +01:00
libavformat avformat: add WADY demuxer 2023-01-24 16:58:01 +01:00
libavutil avutil: introduce AVAmbientViewingEnvironment side data 2023-01-13 21:26:13 +02:00
libpostproc postproc/postprocess_template: Fix alignment 2022-11-09 17:39:00 +01:00
libswresample swresample/swresample_frame: fix regression in detecting changes 2023-01-04 18:19:07 +01:00
libswscale swscale/utils: Fix indentation 2022-11-24 21:02:57 +01:00
presets
tests avcodec/png: use libavutil/csp.h for cHRM chunks 2023-01-25 08:09:16 -05:00
tools tools/target_dec_fuzzer: Adjust threshold for RSCC 2022-12-01 21:43:57 +01:00
.gitattributes
.gitignore
.mailmap mailmap: stop git lying about who I commit things as 2022-11-04 19:37:46 +01:00
.travis.yml
Changelog avformat: add WADY demuxer 2023-01-24 16:58:01 +01:00
configure avcodec/vaapi_encode_h26x: passthrough A53 CC data as H264/HEVC SEI 2023-01-17 10:10:52 +08:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: add myself as amfenc* maintainer 2022-11-10 16:28:07 +01:00
Makefile configure: probe RISC-V Vector extension 2022-09-27 13:19:52 +02:00
README.md
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.