view wavelet.h @ 12:4b35f8ac5113

Fix: do not synthesize sinusoids above Nyqvist freq.
author wenx <xue.wen@eecs.qmul.ac.uk>
date Fri, 12 Aug 2011 18:10:46 +0100
parents 977f541d6683
children
line wrap: on
line source
/*
    Harmonic sinusoidal modelling and tools

    C++ code package for harmonic sinusoidal modelling and relevant signal processing.
    Centre for Digital Music, Queen Mary, University of London.
    This file copyright 2011 Wen Xue.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.
*/
#ifndef waveletH
#define waveletH

/**
  \file wavelet.h - wavelet routines
*/

//--wavelet filter routines--------------------------------------------------
void Daubechies(int p, double* h); //computes Daubechies filter
void splinewl(int p1, int p2, double* h1, double* h2); //compute spline biorthogonal wavelet filter
int splinewl(int p1, int p2, double* h, double* hm, double* g, double* gm, int normmode=0, int* points=0);//compute spline biorthogonal wavelet filter

//--periodic DWT and IDWT----------------------------------------------------
int dwtpqmf(double* in, int Count, int N, double* h, double* g, int M, double* out);
int dwtp(double* in, int Count, int N, double* h, double* g, int M, double* out);
int dwtp(double* in, int Count, int N, double* h, int Mh, double* g, int Mg, double* out);
int dwtp(double* in, int Count, int N, double* h, int sh, int eh, double* g, int sg, int eg, double* out);
void idwtp(double* in, int Count, int N, double* h, double* g, int M, double* out);
void idwtp(double* in, int Count, int N, double* h, int Mh, double* g, int Mg, double* out);
void idwtp(double* in, int Count, int N, double* h, int sh, int eh, double* g, int sg, int eg, double* out);

//--pseudo local cosine with wavelet packet----------------------------------
void wavpacqmf(double*** spec, double* data, int Count, int WID, int wid, int M, double* h, double* g);
void wavpac(double*** spec, double* data, int Count, int WID, int wid, double* h, int hs, int he, double* g, int gs, int ge);
void iwavpacqmf(double* data, double** spec, int Fr, int Wid, int M, double* h, double* g);
void iwavpac(double* data, double** spec, int Fr, int Wid, double* h, int hs, int he, double* g, int gs, int ge);

#endif