ipqmf

Functions

int main(int argc, char *argv[])

ipqmf [ option ] [ infile ]

  • -k int

    • number of subbands \((1 \le K)\)

  • -m int

    • order of filter \((2 \le M)\)

  • -a double

    • stopband attenuation \((0 < \alpha)\)

  • -i int

    • number of iterations \((1 \le N)\)

  • -d double

    • convergence threshold \((0 \le \epsilon)\)

  • -s double

    • initial step size \((0 < \Delta)\)

  • infile str

    • double-type filter-bank input

  • stdout

    • double-type filter-bank output

In the below example, a signal is reconstructed from 4-channel signal in data.sub:

interpolate -l 4 -p 4 -o 2 < data.sub | ipqmf -k 4 | x2x +ds > data.raw

Parameters
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns

0 on success, 1 on failure.

See also

pqmf

class sptk::InversePseudoQuadratureMirrorFilterBanks

Reconstruct signal from subband signals.

The input is the \(K\) subband signals:

\[ \begin{array}{cccc} x_0(t), & x_1(t), & \ldots, & x_{K-1}(t), \end{array} \]
and the output is the signal \(x(t)\). The impulse responses of the analysis filters are cosine-modulated versions of the prototype filter \(h(n)\):
\[ f_k(n) = 2h(n) \cos \left( (2k+1) \frac{\pi}{2K} \left( n-\frac{M}{2} \right) - (-1)^k \frac{\pi}{4} \right). \]
where \(M\) is the filter order. In the implemented algorithm, the prototype filter \(h(n)\) is represented as
\[ h(n) = g(n) w(n), \]
where \(w(n)\) is the Kaiser window and
\[ g(n) = \frac{\sin \left( n-\frac{M}{2} \right) \omega} {\pi \left( n-\frac{M}{2} \right)} \]
is the shifted impulse response of an ideal lowpass filter. The optimal angular frequency \(\omega\) is calculated based on a simple algorithm.

Public Functions

InversePseudoQuadratureMirrorFilterBanks(int num_subband, int num_filter_order, double attenuation, int num_iteration, double convergence_threshold, double initial_step_size)
Parameters
  • num_subband[in] Number of subbands, \(K\).

  • num_filter_order[in] Order of filter, \(M\).

  • attenuation[in] Stopband attenuation in dB.

  • num_iteration[in] Number of iterations.

  • convergence_threshold[in] Convergence threshold.

  • initial_step_size[in] Initial step size.

inline int GetNumSubband() const
Returns

Number of subbands.

inline int GetNumFilterOrder() const
Returns

Order of filter.

inline bool IsValid() const
Returns

True if this object is valid.

inline bool IsConverged() const
Returns

True if built filter is in convergence point.

bool Run(const std::vector<double> &input, double *output, InversePseudoQuadratureMirrorFilterBanks::Buffer *buffer) const
Parameters
  • input[in] Input subband signals.

  • output[out] Output signal.

  • buffer[out] Buffer.

Returns

True on success, false on failure.

class Buffer

Buffer for InversePseudoQuadratureMirrorFilterBanks class.