Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v2 0/1] fate/png: add mDCv read and write test
@ 2024-07-09 16:45 Leo Izen
  2024-07-09 16:45 ` [FFmpeg-devel] [PATCH v2 1/1] " Leo Izen
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Izen @ 2024-07-09 16:45 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

Changes since v1:
- changed transcode command

Leo Izen (1):
  fate/png: add mDCv read and write test

 tests/fate/image.mak    |  6 ++++++
 tests/ref/fate/png-mdcv | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 tests/ref/fate/png-mdcv

-- 
2.45.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [FFmpeg-devel] [PATCH v2 1/1] fate/png: add mDCv read and write test
  2024-07-09 16:45 [FFmpeg-devel] [PATCH v2 0/1] fate/png: add mDCv read and write test Leo Izen
@ 2024-07-09 16:45 ` Leo Izen
  2024-07-14 11:23   ` Leo Izen
  2024-07-14 19:45   ` Jan Ekström
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Izen @ 2024-07-09 16:45 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Jan Ekström, Andreas Rheinhardt, Leo Izen

This test confirms that we can write mDCv chunks and read them back via
the png decoder. It uses an HEVC conformance sample with this metadata
as the base source for the side data in the frames.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/fate/image.mak    |  6 ++++++
 tests/ref/fate/png-mdcv | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 tests/ref/fate/png-mdcv

diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 753936ec20..358ab4b765 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -416,6 +416,12 @@ FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
 fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
     -flags2 icc_profiles $(TARGET_SAMPLES)/png1/lena-int_rgb24.png
 
+FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2 HEVC, \
+    IMAGE_PNG_PIPE_DEMUXER HEVC_PARSER PNG_DECODER SCALE_FILTER) += fate-png-mdcv
+fate-png-mdcv: CMD = transcode hevc $(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2 \
+    "-pix_fmt rgb24 -vf scale -c png" "" \
+    "-show_frames -show_entries frame=side_data_list -of flat"
+
 FATE_PNG-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG)
 FATE_PNG_PROBE-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG_PROBE)
 FATE_IMAGE_FRAMECRC += $(FATE_PNG-yes)
diff --git a/tests/ref/fate/png-mdcv b/tests/ref/fate/png-mdcv
new file mode 100644
index 0000000000..b719152557
--- /dev/null
+++ b/tests/ref/fate/png-mdcv
@@ -0,0 +1,22 @@
+fc68fe6c8c72343b96d2695f6913995b *tests/data/fate/png-mdcv.image2
+439248 tests/data/fate/png-mdcv.image2
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1280x720
+#sar 0: 0/1
+0,          0,          0,        1,  2764800, 0x2bfc7b42
+frames.frame.0.side_data_list.side_data.0.side_data_type="Content light level metadata"
+frames.frame.0.side_data_list.side_data.0.max_content=1000
+frames.frame.0.side_data_list.side_data.0.max_average=200
+frames.frame.0.side_data_list.side_data.1.side_data_type="Mastering display metadata"
+frames.frame.0.side_data_list.side_data.1.red_x="13250/50000"
+frames.frame.0.side_data_list.side_data.1.red_y="7500/50000"
+frames.frame.0.side_data_list.side_data.1.green_x="34000/50000"
+frames.frame.0.side_data_list.side_data.1.green_y="16000/50000"
+frames.frame.0.side_data_list.side_data.1.blue_x="2/50000"
+frames.frame.0.side_data_list.side_data.1.blue_y="0/50000"
+frames.frame.0.side_data_list.side_data.1.white_point_x="15635/50000"
+frames.frame.0.side_data_list.side_data.1.white_point_y="16450/50000"
+frames.frame.0.side_data_list.side_data.1.min_luminance="50/10000"
+frames.frame.0.side_data_list.side_data.1.max_luminance="10000000/10000"
-- 
2.45.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH v2 1/1] fate/png: add mDCv read and write test
  2024-07-09 16:45 ` [FFmpeg-devel] [PATCH v2 1/1] " Leo Izen
@ 2024-07-14 11:23   ` Leo Izen
  2024-07-14 19:45   ` Jan Ekström
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Izen @ 2024-07-14 11:23 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt, Jan Ekström

On 7/9/24 12:45 PM, Leo Izen wrote:
> This test confirms that we can write mDCv chunks and read them back via
> the png decoder. It uses an HEVC conformance sample with this metadata
> as the base source for the side data in the frames.
> 
> Signed-off-by: Leo Izen <leo.izen@gmail.com>
> Reported-by: Jan Ekström <jeebjp@gmail.com>
> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>   tests/fate/image.mak    |  6 ++++++
>   tests/ref/fate/png-mdcv | 22 ++++++++++++++++++++++
>   2 files changed, 28 insertions(+)
>   create mode 100644 tests/ref/fate/png-mdcv
> 

Will merge tomorrow.

- Leo Izen (Traneptora)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH v2 1/1] fate/png: add mDCv read and write test
  2024-07-09 16:45 ` [FFmpeg-devel] [PATCH v2 1/1] " Leo Izen
  2024-07-14 11:23   ` Leo Izen
@ 2024-07-14 19:45   ` Jan Ekström
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Ekström @ 2024-07-14 19:45 UTC (permalink / raw)
  To: ffmpeg-devel

On Tue, Jul 9, 2024 at 7:45 PM Leo Izen <leo.izen@gmail.com> wrote:
>
> This test confirms that we can write mDCv chunks and read them back via
> the png decoder. It uses an HEVC conformance sample with this metadata
> as the base source for the side data in the frames.
>
> Signed-off-by: Leo Izen <leo.izen@gmail.com>
> Reported-by: Jan Ekström <jeebjp@gmail.com>
> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  tests/fate/image.mak    |  6 ++++++
>  tests/ref/fate/png-mdcv | 22 ++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
>  create mode 100644 tests/ref/fate/png-mdcv
>
> diff --git a/tests/fate/image.mak b/tests/fate/image.mak
> index 753936ec20..358ab4b765 100644
> --- a/tests/fate/image.mak
> +++ b/tests/fate/image.mak
> @@ -416,6 +416,12 @@ FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
>  fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
>      -flags2 icc_profiles $(TARGET_SAMPLES)/png1/lena-int_rgb24.png
>
> +FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2 HEVC, \
> +    IMAGE_PNG_PIPE_DEMUXER HEVC_PARSER PNG_DECODER SCALE_FILTER) += fate-png-mdcv
> +fate-png-mdcv: CMD = transcode hevc $(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2 \

You are currently getting warnings from image2 since you are not
utilizing a pattern as it expects. For a single image output, using
image2pipe would probably be more correct.

[image2 @ 0x32c5580] The specified filename
'/home/jeeb/projects/ffmpeg/lu
nix_build/tests/data/fate/png-mdcv.image2'
does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0x32c5580] Use a pattern such as %03d for an image sequence
or use the -update option (with -frames:v 1 if needed) to write a
single image.

The following switch would have the test not output those messages:
diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 358ab4b765..042cf6438f 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -416,9 +416,9 @@ FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
 fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
     -flags2 icc_profiles $(TARGET_SAMPLES)/png1/lena-int_rgb24.png

-FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2 HEVC, \
+FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2PIPE HEVC, \
     IMAGE_PNG_PIPE_DEMUXER HEVC_PARSER PNG_DECODER SCALE_FILTER) +=
fate-png-mdcv
-fate-png-mdcv: CMD = transcode hevc
$(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2 \
+fate-png-mdcv: CMD = transcode hevc
$(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2pipe \
     "-pix_fmt rgb24 -vf scale -c png" "" \
     "-show_frames -show_entries frame=side_data_list -of flat"

Otherwise verified that the following minimal configuration does seem
to indeed work (both deps from TRANSCODE as well as the test itself):
../configure --disable-everything --disable-autodetect --enable-zlib
--enable-ffmpeg --enable-protocol="file,pipe"
--enable-demuxer="hevc,image_png_pipe" --enable-decoder="hevc,png"
--enable-encoder="rawvideo,pcm_s16le,png"
--enable-muxer="framecrc,image2pipe" --enable-parser="hevc"
--enable-filter="scale"

(with image2 in muxers originally, and then image2pipe with the diff applied)

Interesting that the PNG parser is not required for reading the
output, but it seems to work so the dependencies seem fine.

Finally, I think the commit message could mention both CLL and MDCV :) .

Otherwise LGTM, and I think with the slight adjustments
(image2->image2pipe and updated commit message), the patch can be
applied.

Jan

On Tue, Jul 9, 2024 at 7:45 PM Leo Izen <leo.izen@gmail.com> wrote:
>
> This test confirms that we can write mDCv chunks and read them back via
> the png decoder. It uses an HEVC conformance sample with this metadata
> as the base source for the side data in the frames.
>
> Signed-off-by: Leo Izen <leo.izen@gmail.com>
> Reported-by: Jan Ekström <jeebjp@gmail.com>
> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  tests/fate/image.mak    |  6 ++++++
>  tests/ref/fate/png-mdcv | 22 ++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
>  create mode 100644 tests/ref/fate/png-mdcv
>
> diff --git a/tests/fate/image.mak b/tests/fate/image.mak
> index 753936ec20..358ab4b765 100644
> --- a/tests/fate/image.mak
> +++ b/tests/fate/image.mak
> @@ -416,6 +416,12 @@ FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
>  fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
>      -flags2 icc_profiles $(TARGET_SAMPLES)/png1/lena-int_rgb24.png
>
> +FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2 HEVC, \
> +    IMAGE_PNG_PIPE_DEMUXER HEVC_PARSER PNG_DECODER SCALE_FILTER) += fate-png-mdcv
> +fate-png-mdcv: CMD = transcode hevc $(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2 \
> +    "-pix_fmt rgb24 -vf scale -c png" "" \
> +    "-show_frames -show_entries frame=side_data_list -of flat"
> +
>  FATE_PNG-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG)
>  FATE_PNG_PROBE-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG_PROBE)
>  FATE_IMAGE_FRAMECRC += $(FATE_PNG-yes)
> diff --git a/tests/ref/fate/png-mdcv b/tests/ref/fate/png-mdcv
> new file mode 100644
> index 0000000000..b719152557
> --- /dev/null
> +++ b/tests/ref/fate/png-mdcv
> @@ -0,0 +1,22 @@
> +fc68fe6c8c72343b96d2695f6913995b *tests/data/fate/png-mdcv.image2
> +439248 tests/data/fate/png-mdcv.image2
> +#tb 0: 1/25
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1280x720
> +#sar 0: 0/1
> +0,          0,          0,        1,  2764800, 0x2bfc7b42
> +frames.frame.0.side_data_list.side_data.0.side_data_type="Content light level metadata"
> +frames.frame.0.side_data_list.side_data.0.max_content=1000
> +frames.frame.0.side_data_list.side_data.0.max_average=200
> +frames.frame.0.side_data_list.side_data.1.side_data_type="Mastering display metadata"
> +frames.frame.0.side_data_list.side_data.1.red_x="13250/50000"
> +frames.frame.0.side_data_list.side_data.1.red_y="7500/50000"
> +frames.frame.0.side_data_list.side_data.1.green_x="34000/50000"
> +frames.frame.0.side_data_list.side_data.1.green_y="16000/50000"
> +frames.frame.0.side_data_list.side_data.1.blue_x="2/50000"
> +frames.frame.0.side_data_list.side_data.1.blue_y="0/50000"
> +frames.frame.0.side_data_list.side_data.1.white_point_x="15635/50000"
> +frames.frame.0.side_data_list.side_data.1.white_point_y="16450/50000"
> +frames.frame.0.side_data_list.side_data.1.min_luminance="50/10000"
> +frames.frame.0.side_data_list.side_data.1.max_luminance="10000000/10000"
> --
> 2.45.2
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-14 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-09 16:45 [FFmpeg-devel] [PATCH v2 0/1] fate/png: add mDCv read and write test Leo Izen
2024-07-09 16:45 ` [FFmpeg-devel] [PATCH v2 1/1] " Leo Izen
2024-07-14 11:23   ` Leo Izen
2024-07-14 19:45   ` Jan Ekström

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git