From b699feefeeef7bf8f761a48b7e553ed8350df673 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Tue, 1 Mar 2022 00:12:56 +0200 Subject: [PATCH] yadif.asm: Fix improper usage of LOAD macro LOAD macro relies in m7 being zero for interleaving purposes. Using LOAD on the m7 register makes it interleave with its new content instead of with 0. The effect of this bug was bobbing on some static lines that appeared over fast-moving content. Part-of: --- .../gst-plugins-good/gst/deinterlace/x86/yadif.asm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/deinterlace/x86/yadif.asm b/subprojects/gst-plugins-good/gst/deinterlace/x86/yadif.asm index f957d0a6d5..df2bb899ad 100644 --- a/subprojects/gst-plugins-good/gst/deinterlace/x86/yadif.asm +++ b/subprojects/gst-plugins-good/gst/deinterlace/x86/yadif.asm @@ -160,6 +160,8 @@ SECTION .text psraw m3, 1 ; rsp + 0 = d mova [rsp+ 0], m3 + ; rsp + 16 = bzeroq + mova [rsp+16], m1 ; m2 = m1 - mp psubw m2, m4 ; m2 = temporal_diff0 (m4 is temporary) @@ -195,8 +197,8 @@ SECTION .text psrlw m3, 1 ; m2 = diff (for real) pmaxsw m2, m3 - ; rsp + 16 = diff - mova [rsp+16], m2 + ; rsp + 32 = diff + mova [rsp+32], m2 ; m1 = e + c paddw m1, m0 @@ -251,7 +253,7 @@ SECTION .text ; now m0 = spatial_score, m1 = spatial_pred ; m6 = diff - mova m6, [rsp+16] + mova m6, [rsp+32] %endmacro %macro FILTER_TAIL 0 @@ -311,7 +313,7 @@ SECTION .text ; m5 = d mova m5, [rsp] ; m7 = e - LOAD m7, [bzeroq] + mova m7, [rsp+16] ; m2 = b - c psubw m2, m4 ; m3 = f - e