2 Copyright (C) 2017 Paul Brossier <piem@aubio.org>
4 This file is part of aubio.
6 aubio is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 aubio is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with aubio. If not, see <http://www.gnu.org/licenses/>.
23 Discrete Cosine Transform
25 Functions aubio_dct_do() and aubio_dct_rdo() are equivalent to MATLAB/Octave
26 dct() and idct() functions, as well as scipy.fftpack.dct(x, norm='ortho') and
27 scipy.fftpack.idct(x, norm='ortho')
29 \example spectral/test-dct.c
42 This object computes forward and backward DCT type 2 with orthonormal
46 typedef struct _aubio_dct_t aubio_dct_t;
48 /** create new DCT computation object
50 \param size length of the DCT
53 aubio_dct_t * new_aubio_dct(uint_t size);
55 /** compute forward DCT
57 \param s dct object as returned by new_aubio_dct
58 \param input input signal
59 \param dct_output transformed input array
62 void aubio_dct_do (aubio_dct_t *s, const fvec_t * input, fvec_t * dct_output);
64 /** compute backward DCT
66 \param s dct object as returned by new_aubio_dct
67 \param input input signal
68 \param idct_output transformed input array
71 void aubio_dct_rdo (aubio_dct_t *s, const fvec_t * input, fvec_t * idct_output);
76 \param s dct object as returned by new_aubio_dct
79 void del_aubio_dct (aubio_dct_t *s);
85 #endif /* AUBIO_DCT_H */