OpenImageIO/oiio — pull request #579 by lgritz (2013-04-21 22:21:23+00:00)
Title: FFT

This started from a desire to be able to take an FFT of an image. Pulling on that thread required implementing a whole bunch of stuff to make it actually nice:

* IBA::fft and ifft, and oiiotool --fft, --ifft (incorporating a file from KissFFT, a BSD-licensed package)
* IBA::transpose (oiiotool --transpose) because transpose is needed to turn do a 2D FFT with a 1D FFT
* IBA::circular_shift (oiiotool --cshift) to center the FFT for nice presentation.
* IBA::channel_sum and IBA::mul (oiiotool --chsum/--mul) to make it easy to take a power spectrum.

Bugs and other minor fixes along the way:
* Bug in oiiotool --channels with channel renaming that could leave channel names blank for certain reorderings.
* OpenEXR, which orders channels alphabetically (!) in the file, needed its reader to always put "real" and "imag" channels in that order.
* An ImageRec ctr to take NULL for MIP levels.