From 87cfbcb74a6e02cdab1f9b16390deeef62a14c81 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 2 Nov 2025 17:43:10 +0100 Subject: [PATCH] avcodec/x86/me_cmp: Avoid unnecessary instruction Reviewed-by: Lynne Signed-off-by: Andreas Rheinhardt --- libavcodec/x86/me_cmp.asm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/me_cmp.asm b/libavcodec/x86/me_cmp.asm index 7825c8ef71..cf4ee941f7 100644 --- a/libavcodec/x86/me_cmp.asm +++ b/libavcodec/x86/me_cmp.asm @@ -282,9 +282,6 @@ HADAMARD8_DIFF 9 %macro SUM_SQUARED_ERRORS 1 cglobal sse%1, 5,5,8, v, pix1, pix2, lsize, h -%if %1 == mmsize - shr hd, 1 -%endif pxor m0, m0 ; mm0 = 0 pxor m7, m7 ; mm7 holds the sum @@ -334,11 +331,12 @@ cglobal sse%1, 5,5,8, v, pix1, pix2, lsize, h %if %1 == mmsize lea pix1q, [pix1q + 2*lsizeq] lea pix2q, [pix2q + 2*lsizeq] + sub hd, 2 %else add pix1q, lsizeq add pix2q, lsizeq -%endif dec hd +%endif jnz .next2lines HADDD m7, m1