Commit ec447c56e3 for ffmpeg

commit ec447c56e35463ce758c4c659c4c0bd9940f34ed
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Sun Oct 18 09:03:58 2026 +0000

    tests/swscale: cover monochrome error-diffusion tail stores

    Exercise partial output bytes in both monochrome polarities, using same-height conversion and bilinear upscaling to cover the one-tap and two-tap output paths. Generate the input with the existing color source and compare frame checksums through FATE.

    Assisted-by: Fairy

diff --git a/tests/fate/libswscale.mak b/tests/fate/libswscale.mak
index 673c28eae9..cba28068ed 100644
--- a/tests/fate/libswscale.mak
+++ b/tests/fate/libswscale.mak
@@ -36,6 +36,16 @@ fate-sws-yuv-range: CMD = framecrc \
   -frames 1 \
   -vf scale=in_color_matrix=bt601:in_range=limited:out_color_matrix=bt601:out_range=full:flags=+accurate_rnd+bitexact

+# Partial bytes in the one-tap and bilinear two-tap monochrome ED paths.
+FATE_LIBSWSCALE_FFMPEG-$(call FILTERFRAMECRC, COLOR SCALE FORMAT) += fate-sws-monob-ed-tail \
+                                                                 fate-sws-monow-ed-tail \
+                                                                 fate-sws-monob-ed-tail-bilinear \
+                                                                 fate-sws-monow-ed-tail-bilinear
+fate-sws-monob-ed-tail: CMD = framecrc -lavfi color=white:s=100x8:r=1,scale=flags=bilinear+bitexact:sws_dither=ed,format=monob -frames:v 1
+fate-sws-monow-ed-tail: CMD = framecrc -lavfi color=black:s=100x8:r=1,scale=flags=bilinear+bitexact:sws_dither=ed,format=monow -frames:v 1
+fate-sws-monob-ed-tail-bilinear: CMD = framecrc -lavfi color=white:s=102x8:r=1,scale=102:16:flags=bilinear+bitexact:sws_dither=ed,format=monob -frames:v 1
+fate-sws-monow-ed-tail-bilinear: CMD = framecrc -lavfi color=black:s=102x8:r=1,scale=102:16:flags=bilinear+bitexact:sws_dither=ed,format=monow -frames:v 1
+
 ifeq ($(CONFIG_UNSTABLE),yes)
 SWS_UNSTABLE_BACKENDS-yes                            += c memcpy
 ifeq ($(ARCH_X86_64),yes)
diff --git a/tests/ref/fate/sws-monob-ed-tail b/tests/ref/fate/sws-monob-ed-tail
new file mode 100644
index 0000000000..0dd8a8d659
--- /dev/null
+++ b/tests/ref/fate/sws-monob-ed-tail
@@ -0,0 +1,6 @@
+#tb 0: 1/1
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 100x8
+#sar 0: 1/1
+0,          0,          0,        1,      104, 0x2a1b6720
diff --git a/tests/ref/fate/sws-monob-ed-tail-bilinear b/tests/ref/fate/sws-monob-ed-tail-bilinear
new file mode 100644
index 0000000000..5f255c8458
--- /dev/null
+++ b/tests/ref/fate/sws-monob-ed-tail-bilinear
@@ -0,0 +1,6 @@
+#tb 0: 1/1
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 102x16
+#sar 0: 2/1
+0,          0,          0,        1,      208, 0x858ccf00
diff --git a/tests/ref/fate/sws-monow-ed-tail b/tests/ref/fate/sws-monow-ed-tail
new file mode 100644
index 0000000000..0dd8a8d659
--- /dev/null
+++ b/tests/ref/fate/sws-monow-ed-tail
@@ -0,0 +1,6 @@
+#tb 0: 1/1
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 100x8
+#sar 0: 1/1
+0,          0,          0,        1,      104, 0x2a1b6720
diff --git a/tests/ref/fate/sws-monow-ed-tail-bilinear b/tests/ref/fate/sws-monow-ed-tail-bilinear
new file mode 100644
index 0000000000..5f255c8458
--- /dev/null
+++ b/tests/ref/fate/sws-monow-ed-tail-bilinear
@@ -0,0 +1,6 @@
+#tb 0: 1/1
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 102x16
+#sar 0: 2/1
+0,          0,          0,        1,      208, 0x858ccf00