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
Container Registry
Model registry
Operate
Environments
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
Xiph.Org
Opus
Commits
2e78b276
Commit
2e78b276
authored
13 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
kiss fft cleanup
parent
dbe9a439
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/_kiss_fft_guts.h
+0
-16
0 additions, 16 deletions
libcelt/_kiss_fft_guts.h
libcelt/kiss_fft.h
+2
-24
2 additions, 24 deletions
libcelt/kiss_fft.h
libcelt/tests/dft-test.c
+0
-2
0 additions, 2 deletions
libcelt/tests/dft-test.c
libcelt/tests/mdct-test.c
+0
-2
0 additions, 2 deletions
libcelt/tests/mdct-test.c
with
2 additions
and
44 deletions
libcelt/_kiss_fft_guts.h
+
0
−
16
View file @
2e78b276
...
...
@@ -35,30 +35,14 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#ifdef FIXED_POINT
#include
"arch.h"
#define DOUBLE_PRECISION
#ifdef DOUBLE_PRECISION
# define SAMPPROD long long
#define SAMP_MAX 2147483647
#define TWID_MAX 32767
#define TRIG_UPSCALE 1
#else
/* DOUBLE_PRECISION */
# define SAMPPROD opus_int32
#define SAMP_MAX 32767
#define TRIG_UPSCALE 1
#endif
/* !DOUBLE_PRECISION */
#define SAMP_MIN -SAMP_MAX
#if defined(CHECK_OVERFLOW)
# define CHECK_OVERFLOW_OP(a,op,b) \
if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); }
#endif
# define S_MUL(a,b) MULT16_32_Q15(b, a)
...
...
This diff is collapsed.
Click to expand it.
libcelt/kiss_fft.h
+
2
−
24
View file @
2e78b276
...
...
@@ -48,17 +48,11 @@ extern "C" {
#ifdef FIXED_POINT
#include
"arch.h"
#define DOUBLE_PRECISION
#ifdef DOUBLE_PRECISION
# define kiss_fft_scalar opus_int32
# define kiss_twiddle_scalar opus_int16
# define KF_SUFFIX _celt_double
#else
# define kiss_fft_scalar opus_int16
# define kiss_twiddle_scalar opus_int16
# define KF_SUFFIX _celt_single
#endif
#else
# ifndef kiss_fft_scalar
/* default is float */
...
...
@@ -68,22 +62,6 @@ extern "C" {
# endif
#endif
#if 0
/* This adds a suffix to all the opus_fft functions so we
can easily link with more than one copy of the fft */
#define CAT_SUFFIX(a,b) a ## b
#define SUF(a,b) CAT_SUFFIX(a, b)
#define kiss_fft_alloc_twiddles SUF(opus_fft_alloc_twiddles,KF_SUFFIX)
#define kiss_fft_alloc SUF(opus_fft_alloc,KF_SUFFIX)
#define kiss_fft SUF(opus_fft,KF_SUFFIX)
#define kiss_ifft SUF(opus_ifft,KF_SUFFIX)
#define kiss_fft_stride SUF(kiss_fft_stride,KF_SUFFIX)
#define kiss_ifft_stride SUF(kiss_ifft_stride,KF_SUFFIX)
#define kiss_fft_free SUF(opus_fft_free,KF_SUFFIX)
#endif
typedef
struct
{
kiss_fft_scalar
r
;
kiss_fft_scalar
i
;
...
...
This diff is collapsed.
Click to expand it.
libcelt/tests/dft-test.c
+
0
−
2
View file @
2e78b276
...
...
@@ -82,12 +82,10 @@ void test1d(int nfft,int isinverse)
in
[
k
].
i
=
(
rand
()
%
32767
)
-
16384
;
}
#ifdef DOUBLE_PRECISION
for
(
k
=
0
;
k
<
nfft
;
++
k
)
{
in
[
k
].
r
*=
32768
;
in
[
k
].
i
*=
32768
;
}
#endif
if
(
isinverse
)
{
...
...
This diff is collapsed.
Click to expand it.
libcelt/tests/mdct-test.c
+
0
−
2
View file @
2e78b276
...
...
@@ -105,11 +105,9 @@ void test1d(int nfft,int isinverse)
for
(
k
=
0
;
k
<
nfft
/
2
;
++
k
)
{
window
[
k
]
=
Q15ONE
;
}
#ifdef DOUBLE_PRECISION
for
(
k
=
0
;
k
<
nfft
;
++
k
)
{
in
[
k
]
*=
32768
;
}
#endif
if
(
isinverse
)
{
...
...
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