Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Speex
Commits
e77b6ea4
Commit
e77b6ea4
authored
Jul 08, 2009
by
Jeff Wallace
Committed by
Jean-Marc Valin
Jul 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for Intel IPP FFT
parent
c254c663
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
libspeex/fftwrap.c
libspeex/fftwrap.c
+51
-0
No files found.
libspeex/fftwrap.c
View file @
e77b6ea4
...
...
@@ -165,6 +165,57 @@ void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
DftiComputeBackward
(
t
->
desc
,
in
,
out
);
}
#elif defined(USE_INTEL_IPP)
#include <ipps.h>
struct
ipp_fft_config
{
IppsDFTSpec_R_32f
*
dftSpec
;
Ipp8u
*
buffer
;
};
void
*
spx_fft_init
(
int
size
)
{
int
bufferSize
=
0
;
int
hint
;
struct
ipp_fft_config
*
table
;
table
=
(
struct
ipp_fft_config
*
)
speex_alloc
(
sizeof
(
struct
ipp_fft_config
));
/* there appears to be no performance difference between ippAlgHintFast and
ippAlgHintAccurate when using the with the floating point version
of the fft. */
hint
=
ippAlgHintAccurate
;
ippsDFTInitAlloc_R_32f
(
&
table
->
dftSpec
,
size
,
IPP_FFT_DIV_FWD_BY_N
,
hint
);
ippsDFTGetBufSize_R_32f
(
table
->
dftSpec
,
&
bufferSize
);
table
->
buffer
=
ippsMalloc_8u
(
bufferSize
);
return
table
;
}
void
spx_fft_destroy
(
void
*
table
)
{
struct
ipp_fft_config
*
t
=
(
struct
ipp_fft_config
*
)
table
;
ippsFree
(
t
->
buffer
);
ippsDFTFree_R_32f
(
t
->
dftSpec
);
speex_free
(
t
);
}
void
spx_fft
(
void
*
table
,
spx_word16_t
*
in
,
spx_word16_t
*
out
)
{
struct
ipp_fft_config
*
t
=
(
struct
ipp_fft_config
*
)
table
;
ippsDFTFwd_RToPack_32f
(
in
,
out
,
t
->
dftSpec
,
t
->
buffer
);
}
void
spx_ifft
(
void
*
table
,
spx_word16_t
*
in
,
spx_word16_t
*
out
)
{
struct
ipp_fft_config
*
t
=
(
struct
ipp_fft_config
*
)
table
;
ippsDFTInv_PackToR_32f
(
in
,
out
,
t
->
dftSpec
,
t
->
buffer
);
}
#elif defined(USE_GPL_FFTW3)
#include <fftw3.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment