From 8b3e0061e10bf6d4224813774c537866c6b23b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 5 Feb 2025 22:51:56 +0200 Subject: [PATCH] x86: aacencdsp: Fix negating signed values in aac_quantize_bands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, we would do OR with the sign bit, forcing the output to a negative value, while we want to negate it, by inverting the sign bit. Signed-off-by: Martin Storsjö --- libavcodec/x86/aacencdsp.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/aacencdsp.asm b/libavcodec/x86/aacencdsp.asm index 86eaebcbe5..8e435b7d2a 100644 --- a/libavcodec/x86/aacencdsp.asm +++ b/libavcodec/x86/aacencdsp.asm @@ -96,7 +96,7 @@ cglobal aac_quantize_bands, 5, 5, 6, out, in, scaled, size, is_signed, maxval, Q addps m2, m1 minps m2, m3 andps m5, m4, [inq+sizeq] - orps m2, m5 + xorps m2, m5 cvttps2dq m2, m2 mova [outq+sizeq], m2 add sizeq, mmsize