[FFmpeg-devel] [PATCH] tests: add jpg-icc test
Niklas Haas
ffmpeg at haasn.xyz
Fri Mar 11 09:58:11 EET 2022
From: Niklas Haas <git at haasn.dev>
Transcoding from an existing PNG file that has an embedded ICC profile.
Note that this ICC profile is smaller than 64 kB, so this doesn't test
the APP2 chunk re-arranging code at all.
Signed-off-by: Niklas Haas <git at haasn.dev>
---
tests/fate/image.mak | 3 +++
tests/ref/fate/jpg-icc | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 tests/ref/fate/jpg-icc
diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 573d398915..8b72890fbe 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -337,6 +337,9 @@ fate-jpg-12bpp: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/12bpp.jpg -
FATE_JPG += fate-jpg-jfif
fate-jpg-jfif: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/jpg/20242.jpg
+FATE_JPG += fate-jpg-icc
+fate-jpg-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png mjpeg "-vf scale" "" "" "-show_frames"
+
FATE_JPG-$(call DEMDEC, IMAGE2, MJPEG) += $(FATE_JPG)
FATE_IMAGE += $(FATE_JPG-yes)
fate-jpg: $(FATE_JPG-yes)
diff --git a/tests/ref/fate/jpg-icc b/tests/ref/fate/jpg-icc
new file mode 100644
index 0000000000..220146555e
--- /dev/null
+++ b/tests/ref/fate/jpg-icc
@@ -0,0 +1,42 @@
+0a323df5cdfb9574e329b9831be054a6 *tests/data/fate/jpg-icc.mjpeg
+11010 tests/data/fate/jpg-icc.mjpeg
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 128x128
+#sar 0: 1/1
+0, 0, 0, 1, 49152, 0xaac06b42
+[FRAME]
+media_type=video
+stream_index=0
+key_frame=1
+pts=0
+pts_time=0.000000
+pkt_dts=0
+pkt_dts_time=0.000000
+best_effort_timestamp=0
+best_effort_timestamp_time=0.000000
+pkt_duration=1
+pkt_duration_time=0.040000
+pkt_pos=0
+pkt_size=11010
+width=128
+height=128
+pix_fmt=yuvj444p
+sample_aspect_ratio=1:1
+pict_type=I
+coded_picture_number=0
+display_picture_number=0
+interlaced_frame=0
+top_field_first=0
+repeat_pict=0
+color_range=pc
+color_space=bt470bg
+color_primaries=unknown
+color_transfer=unknown
+chroma_location=center
+[SIDE_DATA]
+side_data_type=ICC profile
+size=3144
+[/SIDE_DATA]
+[/FRAME]
--
2.35.1
More information about the ffmpeg-devel
mailing list