2021-03-21 10:10:34 +00:00
|
|
|
[FRAME]
|
|
|
|
media_type=video
|
|
|
|
stream_index=0
|
|
|
|
key_frame=1
|
2021-07-14 15:48:10 +00:00
|
|
|
pts=0
|
|
|
|
pts_time=0.000000
|
2021-03-21 10:10:34 +00:00
|
|
|
pkt_dts=0
|
|
|
|
pkt_dts_time=0.000000
|
|
|
|
best_effort_timestamp=0
|
|
|
|
best_effort_timestamp_time=0.000000
|
2022-07-11 08:31:47 +00:00
|
|
|
duration=1
|
|
|
|
duration_time=0.040000
|
2021-03-21 10:10:34 +00:00
|
|
|
pkt_pos=0
|
|
|
|
pkt_size=40194
|
|
|
|
width=128
|
|
|
|
height=128
|
2023-03-26 19:28:38 +00:00
|
|
|
crop_top=0
|
|
|
|
crop_bottom=0
|
|
|
|
crop_left=0
|
|
|
|
crop_right=0
|
2021-03-21 10:10:34 +00:00
|
|
|
pix_fmt=rgb24
|
|
|
|
sample_aspect_ratio=1:1
|
|
|
|
pict_type=I
|
|
|
|
interlaced_frame=1
|
|
|
|
top_field_first=0
|
|
|
|
repeat_pict=0
|
|
|
|
color_range=pc
|
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-17 16:09:29 +00:00
|
|
|
color_space=gbr
|
2023-02-02 15:01:42 +00:00
|
|
|
color_primaries=bt709
|
2021-03-21 10:10:34 +00:00
|
|
|
color_transfer=unknown
|
|
|
|
chroma_location=unspecified
|
|
|
|
[SIDE_DATA]
|
|
|
|
side_data_type=ICC profile
|
|
|
|
name=Photoshop ICC profile
|
|
|
|
size=3144
|
|
|
|
[/SIDE_DATA]
|
|
|
|
[/FRAME]
|