Skip to content

Commit 1001bdc

Browse files
committed
fate/png: add test for ICC profile parsing
This tests the new "-flags2 icc_profiles" option by making sure the embedded ICC profile gets correctly detected as sRGB. Signed-off-by: Niklas Haas <[email protected]>
1 parent 8377ef4 commit 1001bdc

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

tests/fate/image.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ fate-png-side-data: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
392392
FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG, IMAGE2 IMAGE_PNG_PIPE) += fate-png-icc
393393
fate-png-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png image2 "-c png" "" "-show_frames"
394394

395+
FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
396+
fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
397+
-flags2 icc_profiles $(TARGET_SAMPLES)/png1/lena-int_rgb24.png
398+
395399
FATE_PNG-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG)
396400
FATE_PNG_PROBE-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG_PROBE)
397401
FATE_IMAGE_FRAMECRC += $(FATE_PNG-yes)

tests/ref/fate/png-icc-parse

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[FRAME]
2+
media_type=video
3+
stream_index=0
4+
key_frame=1
5+
pts=0
6+
pts_time=0.000000
7+
pkt_dts=0
8+
pkt_dts_time=0.000000
9+
best_effort_timestamp=0
10+
best_effort_timestamp_time=0.000000
11+
pkt_duration=1
12+
pkt_duration_time=0.040000
13+
duration=1
14+
duration_time=0.040000
15+
pkt_pos=0
16+
pkt_size=40194
17+
width=128
18+
height=128
19+
pix_fmt=rgb24
20+
sample_aspect_ratio=1:1
21+
pict_type=I
22+
coded_picture_number=0
23+
display_picture_number=0
24+
interlaced_frame=1
25+
top_field_first=0
26+
repeat_pict=0
27+
color_range=pc
28+
color_space=unknown
29+
color_primaries=bt709
30+
color_transfer=iec61966-2-1
31+
chroma_location=unspecified
32+
[SIDE_DATA]
33+
side_data_type=ICC profile
34+
name=Photoshop ICC profile
35+
size=3144
36+
[/SIDE_DATA]
37+
[SIDE_DATA]
38+
side_data_type=Mastering display metadata
39+
red_x=63999/100000
40+
red_y=33001/100000
41+
green_x=30000/100000
42+
green_y=60000/100000
43+
blue_x=15000/100000
44+
blue_y=5999/100000
45+
white_point_x=31269/100000
46+
white_point_y=32899/100000
47+
[/SIDE_DATA]
48+
[/FRAME]

0 commit comments

Comments
 (0)