Commit 14fc6d3112 for ffmpeg
commit 14fc6d311252afe0f6fd94cbb08b821e024034c8
Author: marcos ashton <marcosashiglesias@gmail.com>
Date: Tue Dec 1 16:36:56 2026 +0000
tests/fate/filter-video: add convolution, kirsch, prewitt, roberts and scharr tests
The 16-bit roberts, prewitt and scharr cases are left out because their output differs on i686.
Coverage for libavfilter/vf_convolution.c: 0.0% -> 87.2%
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 68bdd2c4c2..89dbe8751c 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -522,6 +522,22 @@ fate-filter-pixscope-%: CMD = framecrc -lavfi "$(call FATE_TSRC2,$(call FATE_TAR
FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT OSCILLOSCOPE) += fate-filter-oscilloscope-gbrp
fate-filter-oscilloscope-gbrp: CMD = framecrc -lavfi "$(call FATE_TSRC2,gbrp,1152x240),oscilloscope=x=0.5:y=0.5:s=1:t=0.3:c=15:tw=1:g=1:st=1:sc=1"
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT CONVOLUTION) += $(addprefix fate-filter-convolution-, 3x3-yuv420p 3x3-yuv444p16le 5x5-yuv420p 5x5-yuv444p16le 7x7-yuv420p 7x7-yuv444p16le row-yuv420p row-yuv444p16le)
+fate-filter-convolution-%: FMT = $(call FATE_TARGET_WORD,5)
+fate-filter-convolution-%: SRC = $(call FATE_TSRC2,$(call FATE_NE,$(FMT)))
+fate-filter-convolution-3x3-%: CMD = framecrc -lavfi "$(SRC),convolution=0m=1|2|1|2|4|2|1|2|1:0rdiv=1/16:1m=0|-1|0|-1|5|-1|0|-1|0:2m=1|1|1|1|1|1|1|1|1:2rdiv=1/9,scale" -pix_fmt $(FMT)
+fate-filter-convolution-5x5-%: CMD = framecrc -lavfi "$(SRC),convolution=0m=1|4|6|4|1|4|16|24|16|4|6|24|36|24|6|4|16|24|16|4|1|4|6|4|1:0rdiv=1/256:0bias=8,scale" -pix_fmt $(FMT)
+fate-filter-convolution-7x7-%: CMD = framecrc -lavfi "$(SRC),convolution=0m=1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1:0rdiv=1/49,scale" -pix_fmt $(FMT)
+fate-filter-convolution-row-%: CMD = framecrc -lavfi "$(SRC),convolution=0m=1|2|3|2|1:0rdiv=1/9:0mode=row:1m=1|2|1:1mode=column:1rdiv=1/4,scale" -pix_fmt $(FMT)
+
+FATE_EDGE_FILTERS-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT KIRSCH) += $(addprefix fate-filter-kirsch-, yuv420p yuv444p16le)
+FATE_EDGE_FILTERS-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT PREWITT) += fate-filter-prewitt-yuv420p
+FATE_EDGE_FILTERS-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT ROBERTS) += fate-filter-roberts-yuv420p
+FATE_EDGE_FILTERS-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT SCHARR) += fate-filter-scharr-yuv420p
+FATE_FILTER-yes += $(FATE_EDGE_FILTERS-yes)
+$(FATE_EDGE_FILTERS-yes): FMT = $(call FATE_TARGET_WORD,4)
+$(FATE_EDGE_FILTERS-yes): CMD = framecrc -lavfi "$(call FATE_TSRC2,$(call FATE_NE,$(FMT))),$(call FATE_TARGET_WORD,3)=planes=15:scale=2:delta=10,scale" -pix_fmt $(FMT)
+
FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FPS DECIMATE) += fate-filter-decimate
fate-filter-decimate: CMD = framecrc -lavfi testsrc2=r=24:d=10,fps=60,decimate=5,decimate=4,decimate=3 -pix_fmt yuv420p
diff --git a/tests/ref/fate/filter-convolution-3x3-yuv420p b/tests/ref/fate/filter-convolution-3x3-yuv420p
new file mode 100644
index 0000000000..f8e9ac08f7
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-3x3-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0x059170f5
+0, 1, 1, 1, 4608, 0x2fae6f41
diff --git a/tests/ref/fate/filter-convolution-3x3-yuv444p16le b/tests/ref/fate/filter-convolution-3x3-yuv444p16le
new file mode 100644
index 0000000000..6df21c5f5d
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-3x3-yuv444p16le
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 18432, 0x745e246f
+0, 1, 1, 1, 18432, 0xe6ae2046
diff --git a/tests/ref/fate/filter-convolution-5x5-yuv420p b/tests/ref/fate/filter-convolution-5x5-yuv420p
new file mode 100644
index 0000000000..83ae1f450e
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-5x5-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0xb6ebc663
+0, 1, 1, 1, 4608, 0x41edc5aa
diff --git a/tests/ref/fate/filter-convolution-5x5-yuv444p16le b/tests/ref/fate/filter-convolution-5x5-yuv444p16le
new file mode 100644
index 0000000000..3ab881d4b6
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-5x5-yuv444p16le
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 18432, 0x8a0a03a4
+0, 1, 1, 1, 18432, 0x459af92f
diff --git a/tests/ref/fate/filter-convolution-7x7-yuv420p b/tests/ref/fate/filter-convolution-7x7-yuv420p
new file mode 100644
index 0000000000..75dd028927
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-7x7-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0x910d60cb
+0, 1, 1, 1, 4608, 0x79955ffc
diff --git a/tests/ref/fate/filter-convolution-7x7-yuv444p16le b/tests/ref/fate/filter-convolution-7x7-yuv444p16le
new file mode 100644
index 0000000000..f386edde05
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-7x7-yuv444p16le
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 18432, 0xca4abb8e
+0, 1, 1, 1, 18432, 0x3019b400
diff --git a/tests/ref/fate/filter-convolution-row-yuv420p b/tests/ref/fate/filter-convolution-row-yuv420p
new file mode 100644
index 0000000000..f7c688218e
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-row-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0xe4e46716
+0, 1, 1, 1, 4608, 0x9bc766d1
diff --git a/tests/ref/fate/filter-convolution-row-yuv444p16le b/tests/ref/fate/filter-convolution-row-yuv444p16le
new file mode 100644
index 0000000000..7bc32f1550
--- /dev/null
+++ b/tests/ref/fate/filter-convolution-row-yuv444p16le
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 18432, 0x64bc5b63
+0, 1, 1, 1, 18432, 0x134d5290
diff --git a/tests/ref/fate/filter-kirsch-yuv420p b/tests/ref/fate/filter-kirsch-yuv420p
new file mode 100644
index 0000000000..aae2807446
--- /dev/null
+++ b/tests/ref/fate/filter-kirsch-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0xf9c20c5b
+0, 1, 1, 1, 4608, 0xf82f0b28
diff --git a/tests/ref/fate/filter-kirsch-yuv444p16le b/tests/ref/fate/filter-kirsch-yuv444p16le
new file mode 100644
index 0000000000..5d8e81a053
--- /dev/null
+++ b/tests/ref/fate/filter-kirsch-yuv444p16le
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 18432, 0xebf23ea4
+0, 1, 1, 1, 18432, 0xbd244572
diff --git a/tests/ref/fate/filter-prewitt-yuv420p b/tests/ref/fate/filter-prewitt-yuv420p
new file mode 100644
index 0000000000..1791da6aa8
--- /dev/null
+++ b/tests/ref/fate/filter-prewitt-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0x8c7c72cb
+0, 1, 1, 1, 4608, 0x9ca571f4
diff --git a/tests/ref/fate/filter-roberts-yuv420p b/tests/ref/fate/filter-roberts-yuv420p
new file mode 100644
index 0000000000..aa50efca06
--- /dev/null
+++ b/tests/ref/fate/filter-roberts-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0xae6c0cbe
+0, 1, 1, 1, 4608, 0x43f911dc
diff --git a/tests/ref/fate/filter-scharr-yuv420p b/tests/ref/fate/filter-scharr-yuv420p
new file mode 100644
index 0000000000..d476255c29
--- /dev/null
+++ b/tests/ref/fate/filter-scharr-yuv420p
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 4608, 0x87948c97
+0, 1, 1, 1, 4608, 0xfcd98ccc