[FFmpeg-devel] [PATCH v2] libswscale/x86/yuv2rgb: Add missing EMMS

Mario Hros k3x-devel at outlook.com
Wed Jun 26 20:54:45 EEST 2024


Previous rewrite from inline assembly into nasm (commit e934194) missed the required EMMS instruction to bring the x87 FPU back into usable state.
This needs to be done for 8-byte MMX or Extended MMX only.

Signed-off-by: Mario Hros <k3x-devel at outlook.com>
---
 libswscale/x86/yuv_2_rgb.asm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
index e3470fd9ad..5926133af8 100644
--- a/libswscale/x86/yuv_2_rgb.asm
+++ b/libswscale/x86/yuv_2_rgb.asm
@@ -354,6 +354,10 @@ add imageq, 8 * depth * time_num
 add indexq, 4 * time_num
 js .loop0
 
+%if mmsize == 8
+emms
+%endif
+
 RET
 
 %endmacro
-- 
2.39.3 (Apple Git-146)



More information about the ffmpeg-devel mailing list