Logo Search packages:      
Sourcecode: librasterlite version File versions  Download package

local void downsample_signal ( coeff_t input_signal,
coeff_t output_signal,
int  input_length,
int  output_length,
int  phase 
) [inline]

Signal downsampling

This function downsamples signal by the factor of two. Depending on phase, PHASE_EVEN or PHASE_ODD, odd-numbered (1, 3, 5, ...) or even-numbered (0, 2, 4, ...) samples are rejected respectively.

Parameters:
input_signalInput signal
output_signalOutput signal
input_lengthInput signal length
output_lengthOutput signal length
phaseDownsampling phase
Returns:
VOID
Note:
Caller must allocate enough space for output_signal beforehand.

Definition at line 82 of file filter.c.

Referenced by analysis_1D().

{
    int i, j;

    for (i = phase, j = 0; i < input_length; i += 2, j++) {
        output_signal[j] = input_signal[i];
    }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index