aboutsummaryrefslogtreecommitdiff
path: root/jpegtran.c
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-04-20 06:57:52 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-04-20 06:57:52 +0000
commit6d319800652594cb8289acbde2c8ef236e075cfb (patch)
tree30543132284a14d357752362fce8a0abad1f3821 /jpegtran.c
parent42117a8cf0742d3c411da0466164c40b8e5aaa52 (diff)
Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
delta = cur0 * 2; cur0 += delta; /* form error * 3 */ errorptr[0] = (FSERROR) (bpreverr0 + cur0); cur0 += delta; /* form error * 5 */ bpreverr0 = belowerr0 + cur0; cur0 += delta; /* form error * 7 */ Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!) Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be. At any rate, it was a lot simpler to just refactor the code so that it uses multiplication. git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1251 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jpegtran.c')
0 files changed, 0 insertions, 0 deletions