]> git.videolan.org Git - x264.git/commitdiff
Resolve floating point exception with frame_init_lowres mmx
authorJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 6 Jul 2008 17:15:19 +0000 (11:15 -0600)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 6 Jul 2008 17:17:33 +0000 (11:17 -0600)
In some cases, the mmx version of frame_init_lowres could leave the FPU uninitialized for use in ratecontrol, resulting in floating point exceptions.
Since frame_init_lowres is such a time-consuming function, an emms was just put at the end, since it costs almost nothing compared to the total time of frame_init_lowres.

common/x86/mc-a2.asm

index eb3520411427035806e9d70b652db05d39b3333a..514b3d8d4c5991b6b49bdef0c0668f39d6724106 100644 (file)
@@ -643,6 +643,7 @@ cglobal x264_frame_init_lowres_core_%1, 6,7
     dec    dword r8m
     jg .vloop
     ADD      rsp, 2*push_size
+    emms
     RET
 %endmacro ; FRAME_INIT_LOWRES