Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: ffmpeg-devel@ffmpeg.org
Cc: Marton Balint <cus@passwd.hu>
Subject: [FFmpeg-devel] [PATCH 8/8] fate: add fate tests for VBN encoder and decoder
Date: Wed, 30 Mar 2022 22:32:05 +0200
Message-ID: <20220330203205.25937-8-cus@passwd.hu> (raw)
In-Reply-To: <20220330203205.25937-1-cus@passwd.hu>

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 tests/Makefile               |  1 +
 tests/fate-run.sh            | 11 +++++++++++
 tests/fate/vbn.mak           | 36 ++++++++++++++++++++++++++++++++++++
 tests/ref/fate/vbn-dxt1      | 11 +++++++++++
 tests/ref/fate/vbn-dxt5      | 11 +++++++++++
 tests/ref/fate/vbn-raw-rgb24 |  9 +++++++++
 tests/ref/fate/vbn-raw-rgba  | 11 +++++++++++
 7 files changed, 90 insertions(+)
 create mode 100644 tests/fate/vbn.mak
 create mode 100644 tests/ref/fate/vbn-dxt1
 create mode 100644 tests/ref/fate/vbn-dxt5
 create mode 100644 tests/ref/fate/vbn-raw-rgb24
 create mode 100644 tests/ref/fate/vbn-raw-rgba

diff --git a/tests/Makefile b/tests/Makefile
index 9f33394856..e3b41a4f7b 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -191,6 +191,7 @@ include $(SRC_PATH)/tests/fate/speedhq.mak
 include $(SRC_PATH)/tests/fate/subtitles.mak
 include $(SRC_PATH)/tests/fate/truehd.mak
 include $(SRC_PATH)/tests/fate/utvideo.mak
+include $(SRC_PATH)/tests/fate/vbn.mak
 include $(SRC_PATH)/tests/fate/video.mak
 include $(SRC_PATH)/tests/fate/voice.mak
 include $(SRC_PATH)/tests/fate/vorbis.mak
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 5e8d607d88..3022aa44a6 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -382,6 +382,17 @@ refcmp_metadata(){
         -f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
 }
 
+refcmp_metadata_files(){
+    refcmp=$1
+    pixfmt=$2
+    file1=$3
+    file2=$4
+    fuzz=${5:-0.001}
+    ffmpeg -auto_conversion_filters $FLAGS -i $file1 $FLAGS -i $file2 $ENC_OPTS \
+        -lavfi "[0:v]format=${pixfmt}[v0];[1:v]format=${pixfmt}[v1];[v0][v1]${refcmp},metadata=print:file=-" \
+        -f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
+}
+
 pixfmt_conversion(){
     conversion="${test#pixfmt-}"
     outdir="tests/data/pixfmt"
diff --git a/tests/fate/vbn.mak b/tests/fate/vbn.mak
new file mode 100644
index 0000000000..044b110ac1
--- /dev/null
+++ b/tests/fate/vbn.mak
@@ -0,0 +1,36 @@
+fate-vbn-%: VBN_FILE = tests/data/$(subst fate-vbn-,,$(@)).vbn
+fate-vbn-%: PIX_FMT = rgba
+fate-vbn-raw-rgb24: PIX_FMT = rgb24
+fate-vbn-%: SRC = $(TARGET_SAMPLES)/png1/lena-$(PIX_FMT).png
+fate-vbn-%: CMD = refcmp_metadata_files psnr $(PIX_FMT) $(VBN_FILE) $(SRC)
+
+fate-vbn-dxt1: tests/data/dxt1.vbn
+fate-vbn-dxt5: tests/data/dxt5.vbn
+fate-vbn-raw-rgba: tests/data/raw-rgba.vbn
+fate-vbn-raw-rgb24: tests/data/raw-rgb24.vbn
+
+FATE_VBN += fate-vbn-dxt1
+FATE_VBN += fate-vbn-dxt5
+FATE_VBN += fate-vbn-raw-rgba
+FATE_VBN += fate-vbn-raw-rgb24
+
+tests/data/dxt1.vbn: TAG = GEN
+tests/data/dxt1.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format dxt1 $(TARGET_PATH)/$@ -y 2>/dev/null
+
+tests/data/dxt5.vbn: TAG = GEN
+tests/data/dxt5.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format dxt5 $(TARGET_PATH)/$@ -y 2>/dev/null
+
+tests/data/raw-rgba.vbn: TAG = GEN
+tests/data/raw-rgba.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format raw $(TARGET_PATH)/$@ -y 2>/dev/null
+
+tests/data/raw-rgb24.vbn: TAG = GEN
+tests/data/raw-rgb24.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgb24.png -nostdin -c:v vbn -format raw $(TARGET_PATH)/$@ -y 2>/dev/null
+
+VBN_REFCMP_DEPS = PSNR_FILTER METADATA_FILTER VBN_ENCODER VBN_DECODER IMAGE2_MUXER IMAGE2_DEMUXER PNG_DECODER
+
+FATE_SAMPLES_FFMPEG-$(call ALLYES, $(VBN_REFCMP_DEPS)) += $(FATE_VBN)
+fate-vbn: $(FATE_VBN)
diff --git a/tests/ref/fate/vbn-dxt1 b/tests/ref/fate/vbn-dxt1
new file mode 100644
index 0000000000..0af4444d94
--- /dev/null
+++ b/tests/ref/fate/vbn-dxt1
@@ -0,0 +1,11 @@
+frame:0    pts:0       pts_time:0
+lavfi.psnr.mse.r=36.794250
+lavfi.psnr.psnr.r=32.473003
+lavfi.psnr.mse.g=33.350525
+lavfi.psnr.psnr.g=32.899776
+lavfi.psnr.mse.b=28.317383
+lavfi.psnr.psnr.b=33.610271
+lavfi.psnr.mse.a=21186.988281
+lavfi.psnr.psnr.a=4.870111
+lavfi.psnr.mse_avg=5321.362793
+lavfi.psnr.psnr_avg=10.870575
diff --git a/tests/ref/fate/vbn-dxt5 b/tests/ref/fate/vbn-dxt5
new file mode 100644
index 0000000000..dbec0bd13d
--- /dev/null
+++ b/tests/ref/fate/vbn-dxt5
@@ -0,0 +1,11 @@
+frame:0    pts:0       pts_time:0
+lavfi.psnr.mse.r=36.794250
+lavfi.psnr.psnr.r=32.473003
+lavfi.psnr.mse.g=33.350525
+lavfi.psnr.psnr.g=32.899776
+lavfi.psnr.mse.b=28.317383
+lavfi.psnr.psnr.b=33.610271
+lavfi.psnr.mse.a=0.000183
+lavfi.psnr.psnr.a=85.503792
+lavfi.psnr.mse_avg=24.615585
+lavfi.psnr.psnr_avg=34.218700
diff --git a/tests/ref/fate/vbn-raw-rgb24 b/tests/ref/fate/vbn-raw-rgb24
new file mode 100644
index 0000000000..06143c27b6
--- /dev/null
+++ b/tests/ref/fate/vbn-raw-rgb24
@@ -0,0 +1,9 @@
+frame:0    pts:0       pts_time:0
+lavfi.psnr.mse.r=0.000000
+lavfi.psnr.psnr.r=inf
+lavfi.psnr.mse.g=0.000000
+lavfi.psnr.psnr.g=inf
+lavfi.psnr.mse.b=0.000000
+lavfi.psnr.psnr.b=inf
+lavfi.psnr.mse_avg=0.000000
+lavfi.psnr.psnr_avg=inf
diff --git a/tests/ref/fate/vbn-raw-rgba b/tests/ref/fate/vbn-raw-rgba
new file mode 100644
index 0000000000..4614ab5c25
--- /dev/null
+++ b/tests/ref/fate/vbn-raw-rgba
@@ -0,0 +1,11 @@
+frame:0    pts:0       pts_time:0
+lavfi.psnr.mse.r=0.000000
+lavfi.psnr.psnr.r=inf
+lavfi.psnr.mse.g=0.000000
+lavfi.psnr.psnr.g=inf
+lavfi.psnr.mse.b=0.000000
+lavfi.psnr.psnr.b=inf
+lavfi.psnr.mse.a=0.000000
+lavfi.psnr.psnr.a=inf
+lavfi.psnr.mse_avg=0.000000
+lavfi.psnr.psnr_avg=inf
-- 
2.31.1

_______________________________________________
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".

  parent reply	other threads:[~2022-03-30 20:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 20:31 [FFmpeg-devel] [PATCH 1/8] fate/filter-refcmp-*: make refcmp_metadata fail on empty input Marton Balint
2022-03-30 20:31 ` [FFmpeg-devel] [PATCH 2/8] avcodec/texturedsp: add TextureDSPThreadContext for common decode/encode function Marton Balint
2022-03-30 20:32 ` [FFmpeg-devel] [PATCH 3/8] avcodec/dds: use the common texture dsp decode function Marton Balint
2022-03-30 20:32 ` [FFmpeg-devel] [PATCH 4/8] avcodec/hapdec: use the common texturedsp " Marton Balint
2022-03-30 20:32 ` [FFmpeg-devel] [PATCH 5/8] avcodec/hapenc: use the common texturedsp encode function Marton Balint
2022-03-30 20:32 ` [FFmpeg-devel] [PATCH 6/8] avcodec/vbndec: add VBN decoder Marton Balint
2022-03-30 20:32 ` [FFmpeg-devel] [PATCH 7/8] avcodec/vbnenc: add VBN encoder Marton Balint
2022-03-30 20:32 ` Marton Balint [this message]
2022-04-09 22:46   ` [FFmpeg-devel] [PATCH 8/8] fate: add fate tests for VBN encoder and decoder Marton Balint
2022-03-31  7:38 ` [FFmpeg-devel] [PATCH 1/8] fate/filter-refcmp-*: make refcmp_metadata fail on empty input Tobias Rapp
2022-03-31 21:30   ` [FFmpeg-devel] [PATCH v2 1/8] fate/filter-refcmp-*: make refcmp_metadata fail on empty or truncated input Marton Balint
2022-04-01  6:26     ` Tobias Rapp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220330203205.25937-8-cus@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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