Table of Contents

NAME

QccFilterVector - perform FIR filtering of a one-dimensional signal

SYNOPSIS

#include "libQccPack.h"

int QccFilterVector(const QccVector input_signal, QccVector output_signal, int length, const QccFilter *filter, int boundary_extension);

DESCRIPTION

QccFilterVector() implements the one-dimensional FIR filtering of a signal. filter gives the FIR filter, input_signal is the one-dimensional input signal (of QccVector data type) to be filtered, and output_signal is the resulting filtered signal. Sufficient storage space for output_signal must be allocated (by a call to QccVectorAlloc(3) ) prior to calling QccFilterVector(). length gives the length of the input and signals.

The FIR filtering operation is implemented by a time-domain convolution of finite-length signals. boundary_extension informs QccFilterVector() of the method to employ to handle the left and right signal boundaries in this convolution. Possible values of boundary_extension are QCCFILTER_SYMMETRIC_EXTENSION, or QCCFILTER_PERIODIC_EXTENSION. In the case of QCCFILTER_SYMMETRIC_EXTENSION, when the filter overlaps a signal boundary during convolution, the data points beyond the boundary are "mirrored" back into the signal. That is, the input signal is assumed to be symmetric at the signal boundary. In the case of QCCFILTER_PERIODIC_EXTENSION, when the filter overlaps a signal boundary during convolution, the data points beyond the boundary are "wrapped around" to the other end of the signal. That is, the input signal is assumed to be one period of an infinite length periodic signal.

When boundary_extension is equal to QCCFILTER_SYMMETRIC_EXTENSION, whole-sample symmtery is used, unless filter is a half-sample symmetric filter (i.e., filter->causality is equal to QCCFILTER_SYMMETRICHALF), in which case half-sample symmetry is used.

RETURN VALUE

QccFilterVector() returns 0 on success, 1 on failure.

SEE ALSO

QccFilterMultiRateFilterVector(3) , QccFilter(3) , QccVector(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads