Read this only if you are interested in Fast Fourier
Transform of Radiance images.
I got the latest version 3.0.1 of FFTW (www.fftw.org)
to compile under Visual C++ 7.1, both with and without
SIMD (SSE in my case) optimizations.
Then I linked the resulting libray with the new
program ra_fftw which behaves pretty much like
standard image decoder programs. FFT of Radiance PIC
file is another file with Radiance image header. It
contains binary dump of float values for both real and
imaginary parts of FFT laid aout like this:
Real part RED scanline #1
Real part GREEN scanline #1
Real part BLUE scanline #1
Real part RED scanline #height
Real part GREEN scanline #height
Real part BLUE scanline #height
Imaginary part RED scanline #1
Imaginary part GREEN scanline #1
Imaginary part BLUE scanline #1
Imaginary part RED scanline #height
Imaginary part GREEN scanline #height
Imaginary part BLUE scanline #height
Invoking ra_fftw with -r option produces Radiance PIC
after applying inverse FFT to the file in the format
given above. That is how I verified that code actually
I will probably add options for different output
layouts and plus options for producing PIC from FFT
file (like PIC only of real or imaginary part or PIC
After few more tests I will put the code with examples
on the Web site that I am currently working on. You
are welcome to suggest changes and additions to nay of
above at this stage.
Now for the bad news. While FFTW library compiles with
SIMD enabled, it does not produce correct results.
Attempting to trace the cause I am now almost certain
that problem is caused by x86 stack alignment (which
defaults to 4 bytes when using MS VC++) which should
be forced to 8 bytes with SSE support enabled.
Unfortunately, even if www.fftw.org invites comments
about these problems and new ports, they never
responded to my emails. In fact, they still offer old
(and IMO pretty useless) MSVC project files for
download on their site (big thanks to Francois, Joe
Blow and who knows who geek kids for doing nothing >-(
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around