diff --git a/libavfilter/x86/vf_fspp.asm b/libavfilter/x86/vf_fspp.asm
index 5ad4275ed85ceb882ab718f9ae61b20f9d707a1a..fbf531b22c9aa40c13e2a3e84f0206ee5dfae8aa 100644
--- a/libavfilter/x86/vf_fspp.asm
+++ b/libavfilter/x86/vf_fspp.asm
@@ -77,11 +77,11 @@ cglobal store_slice, 2, 7, 0, dst, src, width, dither_height, dither, tmp, tmp2
     mov       src_strideq, tmp2q
     shl       tmpq, 4
     lea       dither_heightq, [ditherq+dither_heightq*8]
+    pxor      m7, m7
 
 .loop_height:
     movq      m3, [ditherq]
     movq      m4, m3
-    pxor      m7, m7
     punpcklbw m3, m7
     punpckhbw m4, m7
     mov       tmp2q, widthq
@@ -143,11 +143,11 @@ cglobal store_slice2, 0, 7, 0, dst, src, width, dither_height, dither, tmp, tmp2
     mov       src_strideq, tmp2q
     shl       tmpq, 5
     lea       dither_heightq, [ditherq+dither_heightq*8]
+    pxor      m7, m7
 
 .loop_height:
     movq      m3, [ditherq]
     movq      m4, m3
-    pxor      m7, m7
     punpcklbw m3, m7
     punpckhbw m4, m7
     mov       tmp2q,widthq