Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Traud
Opus
Commits
8a6ce059
Commit
8a6ce059
authored
14 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
More FFT cleanup
parent
4b713036
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libcelt/Makefile.am
+1
-1
1 addition, 1 deletion
libcelt/Makefile.am
libcelt/kfft_double.h
+0
-80
0 additions, 80 deletions
libcelt/kfft_double.h
libcelt/kiss_fft.h
+2
-1
2 additions, 1 deletion
libcelt/kiss_fft.h
libcelt/mdct.c
+7
-6
7 additions, 6 deletions
libcelt/mdct.c
with
10 additions
and
88 deletions
libcelt/Makefile.am
+
1
−
1
View file @
8a6ce059
...
...
@@ -23,7 +23,7 @@ libcelt@LIBCELT_SUFFIX@_la_LDFLAGS = -version-info @CELT_LT_CURRENT@:@CELT_LT_RE
noinst_HEADERS
=
_kiss_fft_guts.h arch.h bands.h fixed_c5x.h fixed_c6x.h
\
cwrs.h ecintrin.h entcode.h entdec.h entenc.h fixed_generic.h float_cast.h
\
kfft_double.h
kiss_fft.h laplace.h mdct.h mfrngcod.h
\
kiss_fft.h laplace.h mdct.h mfrngcod.h
\
mathops.h modes.h os_support.h pitch.h
\
quant_bands.h rate.h stack_alloc.h vq.h plc.h
...
...
This diff is collapsed.
Click to expand it.
libcelt/kfft_double.h
deleted
100644 → 0
+
0
−
80
View file @
4b713036
/* Copyright (c) 2008 Xiph.Org Foundation, CSIRO
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef KFFT_DOUBLE_H
#define KFFT_DOUBLE_H
#ifdef ENABLE_TI_DSPLIB55
#include
"dsplib.h"
#include
"_kiss_fft_guts.h"
#define cpx32_fft_alloc(length) NULL
#define cpx32_fft_free(state)
#define cpx32_fft(state, X, Y, nx)\
(\
cfft32_SCALE(X,nx),\
cbrev32(X,Y,nx)\
)
#define cpx32_ifft(state, X, Y, nx) \
(\
cifft32_NOSCALE(X,nx),\
cbrev32(X,Y,nx)\
)
#elif defined(ENABLE_TI_DSPLIB64)
#include
"kiss_fft.h"
#include
"_kiss_fft_guts.h"
#include
"c64_fft.h"
#define cpx32_fft_alloc(length) (kiss_fft_cfg)(c64_fft32_alloc(length, 0, 0))
#define cpx32_fft_free(state) c64_fft32_free((c64_fft_t *)state)
#define cpx32_fft(state, X, Y, nx) c64_fft32 ((c64_fft_t *)state, (const celt_int32 *)(X), (celt_int32 *)(Y))
#define cpx32_ifft(state, X, Y, nx) c64_ifft32((c64_fft_t *)state, (const celt_int32 *)(X), (celt_int32 *)(Y))
#else
/* ENABLE_TI_DSPLIB55/64 */
#include
"kiss_fft.h"
#include
"_kiss_fft_guts.h"
#define cpx32_fft_alloc_twiddles(length,from) kiss_fft_alloc_twiddles(length, 0, 0, from)
#define cpx32_fft_alloc(length) kiss_fft_alloc(length, 0, 0)
#define cpx32_fft_free(state) kiss_fft_free(state)
#define cpx32_fft(state, X, Y, nx) kiss_fft(state,(const kiss_fft_cpx *)(X), (kiss_fft_cpx *)(Y))
#define cpx32_ifft(state, X, Y, nx) kiss_ifft(state,(const kiss_fft_cpx *)(X), (kiss_fft_cpx *)(Y))
#endif
/* !ENABLE_TI_DSPLIB */
#endif
/* KFFT_DOUBLE_H */
This diff is collapsed.
Click to expand it.
libcelt/kiss_fft.h
+
2
−
1
View file @
8a6ce059
...
...
@@ -71,7 +71,7 @@ extern "C" {
# endif
#endif
#if 0
/* This adds a suffix to all the kiss_fft functions so we
can easily link with more than one copy of the fft */
#define CAT_SUFFIX(a,b) a ## b
...
...
@@ -85,6 +85,7 @@ extern "C" {
#define kiss_ifft_stride SUF(kiss_ifft_stride,KF_SUFFIX)
#define kiss_fft_free SUF(kiss_fft_free,KF_SUFFIX)
#endif
typedef
struct
{
kiss_fft_scalar
r
;
...
...
This diff is collapsed.
Click to expand it.
libcelt/mdct.c
+
7
−
6
View file @
8a6ce059
...
...
@@ -48,7 +48,8 @@
#endif
#include
"mdct.h"
#include
"kfft_double.h"
#include
"kiss_fft.h"
#include
"_kiss_fft_guts.h"
#include
<math.h>
#include
"os_support.h"
#include
"mathops.h"
...
...
@@ -70,9 +71,9 @@ void clt_mdct_init(mdct_lookup *l,int N, int maxshift)
for
(
i
=
0
;
i
<=
maxshift
;
i
++
)
{
if
(
i
==
0
)
l
->
kfft
[
i
]
=
cpx32
_fft_alloc
(
N
>>
2
>>
i
);
l
->
kfft
[
i
]
=
kiss
_fft_alloc
(
N
>>
2
>>
i
,
0
,
0
);
else
l
->
kfft
[
i
]
=
cpx32
_fft_alloc_twiddles
(
N
>>
2
>>
i
,
l
->
kfft
[
0
]);
l
->
kfft
[
i
]
=
kiss
_fft_alloc_twiddles
(
N
>>
2
>>
i
,
0
,
0
,
l
->
kfft
[
0
]);
#ifndef ENABLE_TI_DSPLIB55
if
(
l
->
kfft
[
i
]
==
NULL
)
return
;
...
...
@@ -95,7 +96,7 @@ void clt_mdct_clear(mdct_lookup *l)
{
int
i
;
for
(
i
=
0
;
i
<=
l
->
maxshift
;
i
++
)
cpx32
_fft_free
(
l
->
kfft
[
i
]);
kiss
_fft_free
(
l
->
kfft
[
i
]);
celt_free
(
l
->
kfft
);
celt_free
(
l
->
trig
);
}
...
...
@@ -177,7 +178,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar
}
/* N/4 complex FFT, down-scales by 4/N */
cpx32
_fft
(
l
->
kfft
[
shift
],
out
,
f
,
N4
);
kiss
_fft
(
l
->
kfft
[
shift
],
(
kiss_fft_cpx
*
)
out
,
(
kiss_fft_cpx
*
)
f
);
/* Post-rotate */
{
...
...
@@ -246,7 +247,7 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
}
/* Inverse N/4 complex FFT. This one should *not* downscale even in fixed-point */
cpx32
_ifft
(
l
->
kfft
[
shift
],
f2
,
f
,
N4
);
kiss
_ifft
(
l
->
kfft
[
shift
],
(
kiss_fft_cpx
*
)
f2
,
(
kiss_fft_cpx
*
)
f
);
/* Post-rotate */
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment