Index: src/spectral/fft.c
===================================================================
--- src/spectral/fft.c	(revision 3f90b7ae734d82cfa3fa77779af3607dba98ce7b)
+++ src/spectral/fft.c	(revision 14e300e8c9313387f48b159370dc126176309fd2)
@@ -118,5 +118,4 @@
 #define aubio_IppComplex               Ipp32fc
 #define aubio_FFTSpec                  FFTSpec_R_32f
-#define aubio_ippsPhas                 ippsPhase_32fc
 #define aubio_ippsMalloc_complex       ippsMalloc_32fc
 #define aubio_ippsFFTInit_R            ippsFFTInit_R_32f
@@ -124,9 +123,9 @@
 #define aubio_ippsFFTInv_CCSToR        ippsFFTInv_CCSToR_32f
 #define aubio_ippsFFTFwd_RToCCS        ippsFFTFwd_RToCCS_32f
+#define aubio_ippsAtan2                ippsAtan2_32f_A21
 #else /* HAVE_AUBIO_DOUBLE */
 #define aubio_IppFloat                 Ipp64f
 #define aubio_IppComplex               Ipp64fc
 #define aubio_FFTSpec                  FFTSpec_R_64f
-#define aubio_ippsPhas                 ippsPhase_64fc
 #define aubio_ippsMalloc_complex       ippsMalloc_64fc
 #define aubio_ippsFFTInit_R            ippsFFTInit_R_64f
@@ -134,4 +133,5 @@
 #define aubio_ippsFFTInv_CCSToR        ippsFFTInv_CCSToR_64f
 #define aubio_ippsFFTFwd_RToCCS        ippsFFTFwd_RToCCS_64f
+#define aubio_ippsAtan2                ippsAtan2_64f_A50
 #endif
 
@@ -159,6 +159,4 @@
   
 #elif defined HAVE_INTEL_IPP  // using Intel IPP
-  // mark FFT impl as Intel IPP
-  #define INTEL_IPP_FFT 1
   smpl_t *in, *out;
   Ipp8u* memSpec;
@@ -316,9 +314,9 @@
 void aubio_fft_do(aubio_fft_t * s, const fvec_t * input, cvec_t * spectrum) {
   aubio_fft_do_complex(s, input, s->compspec);
-  aubio_fft_get_spectrum(s, s->compspec, spectrum);
+  aubio_fft_get_spectrum(s->compspec, spectrum);
 }
 
 void aubio_fft_rdo(aubio_fft_t * s, const cvec_t * spectrum, fvec_t * output) {
-  aubio_fft_get_realimag(s, spectrum, s->compspec);
+  aubio_fft_get_realimag(spectrum, s->compspec);
   aubio_fft_rdo_complex(s, s->compspec, output);
 }
@@ -459,35 +457,15 @@
 }
 
-void aubio_fft_get_spectrum(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
-  aubio_fft_get_phas(s, compspec, spectrum);
-  aubio_fft_get_norm(s, compspec, spectrum);
-}
-
-void aubio_fft_get_realimag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
-  aubio_fft_get_imag(s, spectrum, compspec);
-  aubio_fft_get_real(s, spectrum, compspec);
-}
-
-void aubio_fft_get_phas(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
-
-#ifdef INTEL_IPP_FFT // using Intel IPP FFT
-  uint_t i;
-
-  // convert from real imag  [ r0, 0, ..., rN, iN-1, .., i2, i1, iN-1] to complex format
-  s->complexOut[0].re = compspec->data[0];
-  s->complexOut[0].im = 0;
-  s->complexOut[s->fft_size / 2].re = compspec->data[s->fft_size / 2];
-  s->complexOut[s->fft_size / 2].im = 0.0;
-  for (i = 1; i < spectrum->length - 1; i++) {
-    s->complexOut[i].re = compspec->data[i];
-    s->complexOut[i].im = compspec->data[compspec->length - i];
-  }
-
-  IppStatus status = aubio_ippsPhas(s->complexOut, spectrum->phas, spectrum->length);
-  if (status != ippStsNoErr) {
-    AUBIO_ERR("fft: failed to extract phase from fft. IPP error: %d\n", status);
-  }
-
-#else                 // NOT using Intel IPP
+void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum) {
+  aubio_fft_get_phas(compspec, spectrum);
+  aubio_fft_get_norm(compspec, spectrum);
+}
+
+void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec) {
+  aubio_fft_get_imag(spectrum, compspec);
+  aubio_fft_get_real(spectrum, compspec);
+}
+
+void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum) {
   uint_t i;
   if (compspec->data[0] < 0) {
@@ -496,8 +474,24 @@
     spectrum->phas[0] = 0.;
   }
+#if defined(HAVE_INTEL_IPP)
+  // convert from real imag  [ r0, r1, ..., rN, iN-1, ..., i2, i1, i0]
+  //                     to  [ r0, r1, ..., rN, i0, i1, i2, ..., iN-1]
+  for (i = 1; i < spectrum->length / 2; i++) {
+    ELEM_SWAP(compspec->data[compspec->length - i],
+        compspec->data[spectrum->length + i - 1]);
+  }
+  aubio_ippsAtan2(compspec->data + spectrum->length,
+      compspec->data + 1, spectrum->phas + 1, spectrum->length - 1);
+  // revert the imaginary part back again
+  for (i = 1; i < spectrum->length / 2; i++) {
+    ELEM_SWAP(compspec->data[spectrum->length + i - 1],
+        compspec->data[compspec->length - i]);
+  }
+#else
   for (i=1; i < spectrum->length - 1; i++) {
     spectrum->phas[i] = ATAN2(compspec->data[compspec->length-i],
         compspec->data[i]);
   }
+#endif
   if (compspec->data[compspec->length/2] < 0) {
     spectrum->phas[spectrum->length - 1] = PI;
@@ -505,8 +499,7 @@
     spectrum->phas[spectrum->length - 1] = 0.;
   }
-#endif
-}
-
-void aubio_fft_get_norm(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum) {
+}
+
+void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum) {
   uint_t i = 0;
   spectrum->norm[0] = ABS(compspec->data[0]);
@@ -519,5 +512,5 @@
 }
 
-void aubio_fft_get_imag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 1; i < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; i++) {
@@ -527,5 +520,5 @@
 }
 
-void aubio_fft_get_real(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 0; i < compspec->length / 2 + 1; i++) {
Index: src/spectral/fft.h
===================================================================
--- src/spectral/fft.h	(revision 3f90b7ae734d82cfa3fa77779af3607dba98ce7b)
+++ src/spectral/fft.h	(revision 14e300e8c9313387f48b159370dc126176309fd2)
@@ -99,5 +99,5 @@
 
 */
-void aubio_fft_get_spectrum(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum);
 /** convert real/imag spectrum to norm/phas spectrum
 
@@ -106,5 +106,5 @@
 
 */
-void aubio_fft_get_realimag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute phas spectrum from real/imag parts
@@ -114,5 +114,5 @@
 
 */
-void aubio_fft_get_phas(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum);
 /** compute imaginary part from the norm/phas cvec
 
@@ -121,5 +121,5 @@
 
 */
-void aubio_fft_get_imag(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute norm component from real/imag parts
@@ -129,5 +129,5 @@
 
 */
-void aubio_fft_get_norm(aubio_fft_t *s, const fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum);
 /** compute real part from norm/phas components
 
@@ -136,5 +136,5 @@
 
 */
-void aubio_fft_get_real(aubio_fft_t *s, const cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec);
 
 #ifdef __cplusplus
