Commit 9659ad754a for ffmpeg

commit 9659ad754a6b8f60ace84716a1a54c021f43569b
Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date:   Thu Nov 5 20:25:55 2026 +0100

    avutil/x86/x86util: Make STORE_DIFFx2 more flexible

    Reviewed-by: Lynne <dev@lynne.ee>
    Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm
index 65b7d5a82c..41dea20c36 100644
--- a/libavcodec/x86/vp8dsp.asm
+++ b/libavcodec/x86/vp8dsp.asm
@@ -1045,8 +1045,8 @@ cglobal vp8_idct_add, 3, 3, 0, dst, block, stride
     pxor         m4, m4
     DEFINE_ARGS dst1, dst2, stride
     lea       dst2q, [dst1q+2*strideq]
-    STORE_DIFFx2 m0, m1, m6, m7, m4, 3, dst1q, strideq
-    STORE_DIFFx2 m2, m3, m6, m7, m4, 3, dst2q, strideq
+    STORE_DIFFx2 m0, m1, m6, m7, m4, 3, dst1q, strideq, movd
+    STORE_DIFFx2 m2, m3, m6, m7, m4, 3, dst2q, strideq, movd

     RET

diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 2365a1e65c..e346f246b2 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -648,9 +648,9 @@
     movh       %4, %1
 %endmacro

-%macro STORE_DIFFx2 8 ; add1, add2, reg1, reg2, zero, shift, source, stride
-    movh       %3, [%7]
-    movh       %4, [%7+%8]
+%macro STORE_DIFFx2 8-9 movh ; add1, add2, reg1, reg2, zero, shift, source, stride [, mov instr]
+    %9         %3, [%7]
+    %9         %4, [%7+%8]
     psraw      %1, %6
     psraw      %2, %6
     punpcklbw  %3, %5
@@ -659,8 +659,8 @@
     paddw      %4, %2
     packuswb   %3, %5
     packuswb   %4, %5
-    movh     [%7], %3
-    movh  [%7+%8], %4
+    %9       [%7], %3
+    %9    [%7+%8], %4
 %endmacro

 %macro SPLATW 2-3 0