Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
14bd37e7
Commit
14bd37e7
authored
3 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add analytical formula in DCT/DST doc.
parent
0af95302
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
wrapper/matlab/+matfaust/dct.m
+3
-0
3 additions, 0 deletions
wrapper/matlab/+matfaust/dct.m
wrapper/matlab/+matfaust/dst.m
+4
-1
4 additions, 1 deletion
wrapper/matlab/+matfaust/dst.m
wrapper/python/pyfaust.py
+7
-0
7 additions, 0 deletions
wrapper/python/pyfaust.py
with
14 additions
and
1 deletion
wrapper/matlab/+matfaust/dct.m
+
3
−
0
View file @
14bd37e7
%=========================================
%> @brief Returns the Direct Cosine Transform (Type II) Faust of order n.
%>
%> The analytical formula of DCT II used here is:
%> \f$2 \sum_{n=0}^{N-1} x_n cos \left( {\pi k (2n + 1)} \over {2N} \right)\f$
%>
%> @param n: the order of the DCT (it must be a power of two).
%> @param 'dev', str: 'gpu' or 'cpu' to create the Faust on CPU or GPU ('cpu' is the default).
%>
...
...
This diff is collapsed.
Click to expand it.
wrapper/matlab/+matfaust/dst.m
+
4
−
1
View file @
14bd37e7
%=========================================
%> @brief Returns the Direct Sine Transform (Type II) Faust of order n.
%>
%> @param n: the order of the DCT (it must be a power of two).
%> The analytical formula of DST II used here is:
%> \f$2 \sum_{n=0}^{N-1} x_n sin \left( {\pi (k+1) (2n + 1)} \over {2N} \right)\f$
%>
%> @param n: the order of the DST (it must be a power of two).
%> @param 'dev', str: 'gpu' or 'cpu' to create the Faust on CPU or GPU ('cpu' is the default).
%>
%> @b Example
...
...
This diff is collapsed.
Click to expand it.
wrapper/python/pyfaust.py
+
7
−
0
View file @
14bd37e7
...
...
@@ -3302,6 +3302,10 @@ def dft(n, normed=True, dev='cpu'):
def dct(n, dev=
'
cpu
'
):
"""
Returns
the
Direct
Cosine
Transform
(
Type
II
)
Faust
of
order
n
.
The
analytical
formula
of
DCT
II
used
here
is
:
\
f
$
2
\
sum_
{
n
=
0
}
^
{
N
-
1
}
x_n
cos
\
left
(
{
\
pi
k
(
2
n
+
1
)}
\
over
{
2
N
}
\
right
)
\
f
$
Args
:
n
:
the
order
of
the
DCT
(
must
be
a
power
of
two
).
dev
:
the
device
on
which
the
Faust
is
created
.
...
...
@@ -3398,6 +3402,9 @@ def dst(n, dev='cpu'):
"""
Returns
the
Direct
Sine
Transform
(
Type
II
)
Faust
of
order
n
.
The
analytical
formula
of
DST
II
used
here
is
:
\
f
$
2
\
sum_
{
n
=
0
}
^
{
N
-
1
}
x_n
sin
\
left
(
{
\
pi
(
k
+
1
)
(
2
n
+
1
)}
\
over
{
2
N
}
\
right
)
\
f
$
Args
:
n
:
the
order
of
the
DST
(
must
be
a
power
of
two
).
dev
:
the
device
on
which
the
Faust
is
created
.
...
...
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