Commit af5109d99c for ffmpeg

commit af5109d99cc49a83466a6a0e291464672e2374bb
Author: marcos ashton <marcosashiglesias@gmail.com>
Date:   Tue Dec 1 20:17:10 2026 +0000

    avfilter/vf_fspp: align the chroma temp stride

    Since ff85a20b7db the SSE2 store_slice loads rows with mova, so chroma widths that are not a multiple of 8 (854x480 yuv420p, for example) crash; use temp_stride for chroma like for luma.

diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c
index cbf2e06d67..52ea0e2567 100644
--- a/libavfilter/vf_fspp.c
+++ b/libavfilter/vf_fspp.c
@@ -111,7 +111,7 @@ static void filter(FSPPContext *p, uint8_t *dst, uint8_t *src,
 {
     int x, x0, y, es, qy, t;

-    const int stride = is_luma ? p->temp_stride : (width + 16);
+    const int stride = p->temp_stride;
     const int step = 6 - p->log2_count;
     const int qpsh = 4 - p->hsub * !is_luma;
     const int qpsv = 4 - p->vsub * !is_luma;
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 8091ee8ab2..7973045c7d 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -703,6 +703,10 @@ fate-filter-median: CMD = video_filter "median=radius=5"
 FATE_FILTER-$(call FILTERFRAMECRC, MEDIAN TESTSRC2 FORMAT SCALE) += fate-filter-median16
 fate-filter-median16: CMD = framecrc -lavfi "testsrc2=size=64x64:rate=5:duration=1,format=gray16le,scale,format=gray16,median=radius=3,scale" -pix_fmt gray16le -frames:v 5

+# chroma width 49 checks that the SSE2 store_slice gets aligned rows
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT FSPP) += fate-filter-fspp-chroma-width
+fate-filter-fspp-chroma-width: CMD = framecrc -lavfi testsrc2=s=98x54:r=5:d=0.4,format=yuv420p,fspp=qp=1
+
 FATE_FILTER_VSYNTH_VIDEO_FILTER-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue1 fate-filter-hue2 fate-filter-hue3
 fate-filter-hue1: CMD = video_filter "perms=random,hue=s=sin(2*PI*t)+1" -frames:v 20
 fate-filter-hue2: CMD = video_filter "perms=random,hue=h=18*n" -frames:v 20
diff --git a/tests/ref/fate/filter-fspp-chroma-width b/tests/ref/fate/filter-fspp-chroma-width
new file mode 100644
index 0000000000..e260ccdda7
--- /dev/null
+++ b/tests/ref/fate/filter-fspp-chroma-width
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 98x54
+#sar 0: 1/1
+0,          0,          0,        1,     7938, 0x14369536
+0,          1,          1,        1,     7938, 0x5e9b8e9a