PR #25616 opened by Kilian (lusoris)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25616
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25616.patch

`check_dmvr()` in `tests/checkasm/vvc_mc.c` only compares every second output 
row, so a DMVR implementation that gets the odd rows wrong passes checkasm. 
This one-line fix makes it compare every row.

**The defect**

The DMVR functions advance `dst` by `MAX_PB_SIZE` samples per row. 
`check_dmvr()` indexes a `uint16_t` pointer with a stride computed in bytes, so 
it moves two rows per iteration. The fix states the stride in samples.

**Testing**

I planted a mismatch in the C DMVR output and ran `tests/checkasm/checkasm 
--test=vvc_mc` before and after the fix:

| Tree | Comparison before the fix | Comparison after the fix |
| :--- | :--- | :--- |
| No planted mismatch | passes, 3251 tests | passes, 3251 tests |
| Mismatch in row 1 | passes, the defect | fails |
| Mismatch in row 2 | fails | fails |

The planted changes are not part of this PR.

A code review on PR 25480 pointed this out as a pre-existing issue. That PR 
does not touch this comparison.



>From 542806323eaa4c968703f267130bbf525bb7c8ab Mon Sep 17 00:00:00 2001
From: lusoris <[email protected]>
Date: Fri, 30 Oct 2026 14:48:39 +0100
Subject: [PATCH] tests/checkasm/vvc_mc: compare every DMVR output row

The DMVR functions advance dst by MAX_PB_SIZE samples per row and
check_dmvr() indexes a uint16_t pointer, but its stride is computed in
bytes. The comparison therefore reads every second row and leaves the
odd rows unchecked. Use the stride in samples.

With a mismatch planted in row 1, the test passes before this change
and fails after it. With a mismatch planted in row 2, it fails both
before and after.

Signed-off-by: lusoris <[email protected]>
---
 tests/checkasm/vvc_mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c
index d712cb81100..a59a11d9ce7 100644
--- a/tests/checkasm/vvc_mc.c
+++ b/tests/checkasm/vvc_mc.c
@@ -339,7 +339,7 @@ static av_noinline void check_dmvr(void)
     LOCAL_ALIGNED_32(uint16_t, dst1, [DST_BUF_SIZE]);
     LOCAL_ALIGNED_32(uint8_t,  src0, [SRC_BUF_SIZE]);
     LOCAL_ALIGNED_32(uint8_t,  src1, [SRC_BUF_SIZE]);
-    const int dst_stride = MAX_PB_SIZE * sizeof(int16_t);
+    const int dst_stride = MAX_PB_SIZE;
 
     VVCDSPContext c;
     declare_func(void, int16_t *dst, const uint8_t *src, ptrdiff_t src_stride, 
int height,
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to