[FFmpeg-devel] [PATCH 1/2] avcodec/x86/aacencdsp: fix inverting sign in output values

James Almer jamrial at gmail.com
Fri Nov 15 22:41:19 EET 2024


using OR will unconditionally set output values to negative if the input is
negative, when what needs to be done is inverting the sign of the output value
if the input value is negative.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 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
-- 
2.47.0



More information about the ffmpeg-devel mailing list