oops abs(double) was broken

This commit is contained in:
John Cupitt 2012-01-28 14:09:18 +00:00
parent 4ca2f3ed55
commit 710b69e273
2 changed files with 4 additions and 9 deletions

7
TODO
View File

@ -1,9 +1,4 @@
- add a fft test to the suite
can we get fft memuse down? nip2 cache fills mem very quickly when painting
on an fft since it tries to keep the last 10,000 images :( the new vips
cache should be much better, of course
- fft with odd width or height is broken

View File

@ -149,12 +149,12 @@ vips_abs_build( VipsObject *object )
if( abs_rp > abs_ip ) { \
double temp = ip / rp; \
\
q[x]= abs_rp * sqrt( 1.0 + temp * temp ); \
q[x] = abs_rp * sqrt( 1.0 + temp * temp ); \
} \
else { \
double temp = rp / ip; \
\
q[x]= abs_ip * sqrt( 1.0 + temp * temp ); \
q[x] = abs_ip * sqrt( 1.0 + temp * temp ); \
} \
\
p += 2; \
@ -176,7 +176,7 @@ vips_abs_buffer( VipsArithmetic *arithmetic,
case VIPS_FORMAT_SHORT: ABS_INT( signed short ); break;
case VIPS_FORMAT_INT: ABS_INT( signed int ); break;
case VIPS_FORMAT_FLOAT: ABS_FLOAT( float ); break;
case VIPS_FORMAT_DOUBLE: ABS_FLOAT( float ); break;
case VIPS_FORMAT_DOUBLE: ABS_FLOAT( double ); break;
case VIPS_FORMAT_COMPLEX: ABS_COMPLEX( float ); break;
case VIPS_FORMAT_DPCOMPLEX: ABS_COMPLEX( double ); break;