Fix SIMD unsafe use of floating point.
commit81c6041922266cc20cf2507365cfee3335eb83d4
authorPaul Wilkins <paulwilkins@google.com>
Fri, 5 Oct 2012 10:16:46 +0000 (5 11:16 +0100)
committerPaul Wilkins <paulwilkins@google.com>
Fri, 5 Oct 2012 10:16:46 +0000 (5 11:16 +0100)
tree5ad69316769b342659d02dc4c2e0e1ee5bd8e71b
parentd6290c3b07301936a768f6e0a8455c20076eec17
Fix SIMD unsafe use of floating point.

This commit fixes unsafe simd / floating point interactions arising
from the current hybrid and 16x16 transform implementation.
These led to a raft of bugs and issues when the project was
built using VS2008 for Win32 though they did not show up with
the unix builds.

Gerrit makes a meal out of presenting the fix but all I have actually
done is indent the body of each function that uses floating point by
one level and bracket with emms instructions using  the function
vp8_clear_system_state(). See below.

function () {
  vp8_clear_system_state();
  {
  ... function body
  }
  vp8_clear_system_state();
}

This is almost certainly over the top in terms of number of emms
instructions but is a temporary measure pending implementation of
integer variants of each function to replace the floating point.

Limited testing suggests that this fixes the problems that arose for
Win32 VS2008 when the hybrid or 16x16 transforms were enabled.

Change-Id: I7c9a72bd79315246ed880578dec51e2b7c178442
vp8/common/idctllm.c
vp8/encoder/dct.c