On Tue, Jun 11, 2024 at 05:19:06PM +0000, Mario Hros wrote: > Ping? > > Not including EMMS causes the FPU to become unusable (as the IE and SF bits > are set in the status word). This breaks code which, for instance, calls > fmod() and is compiled by GCC with the -O3 flag enabled. In that scenario, > GCC implements fmod using the FPREM FPU instruction, but because FPU is in > the invalid state at that point, the result is NaN. > > This must to breaking other code using FPU also. The original code with > inline assembly used EMMS at the end. > ________________________________ > From: Mario Hros <k3x-de...@outlook.com> > Sent: Wednesday, June 5, 2024 7:35 PM > To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org> > Cc: Mario Hros <k3x-de...@outlook.com> > Subject: [PATCH] libswscale/x86/yuv2rgb: Add missing EMMS > > Previous rewrite from inline assembly into nasm (commit e934194) missed the > required EMMS instruction to bring the x87 FPU back into usable state. > > Signed-off-by: Mario Hros <k3x-de...@outlook.com> > --- > libswscale/x86/yuv_2_rgb.asm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm > index e3470fd9ad..7a247797e4 100644 > --- a/libswscale/x86/yuv_2_rgb.asm > +++ b/libswscale/x86/yuv_2_rgb.asm > @@ -353,6 +353,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters > add imageq, 8 * depth * time_num > add indexq, 4 * time_num > js .loop0 > +emms >
this feels like its missing a %if mmsize == 8 thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".