diff options
author | Leo Izen <leo.izen@gmail.com> | 2023-01-17 13:38:42 -0500 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2023-01-25 08:09:24 -0500 |
commit | 6f79f0971e8ccf6c7a2b8eb1dbc5b64fdd77ca0f (patch) | |
tree | 5231acd520bf86dd6e142d4d4fd781d314a75d8c /libavcodec/dnxhd_parser.c | |
parent | f7bab37c8e66f3c77a5fbb5b5b72c10b0fb4ca5a (diff) | |
download | ffmpeg-6f79f0971e8ccf6c7a2b8eb1dbc5b64fdd77ca0f.tar.gz |
avcodec/png: support cICP chunks
This commit adds both decode and encode support for cICP chunks, which
allow a PNG image's pixel data to be tagged by any of the enum values in
H.273, without an ICC profile.
Upon decode, if a cICP chunk is present, the PNG decoder will tag output
AVFrames with the resulting enum color, and ignore iCCP, sRGB, gAMA, and
cHRM chunks, as per the spec.
Upon encode, if the color space is known and specified, and it is not sRGB,
the PNG encoder will output a cICP chunk containing the color space. If the
color space is sRGB, then it will output an sRGB chunk instead of a cICP
chunk. If the color space of the input is not unspecified, it will not output
a cICP chunk tagging the PNG as unspecified.
In either the sRGB case or the non-SRGB case, gAMA and cHRM are still written
as fallbacks provided the info is known.
Signed-off-by: Leo Izen <leo.izen@gmail.com>
Diffstat (limited to 'libavcodec/dnxhd_parser.c')
0 files changed, 0 insertions, 0 deletions