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

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

Signal upsampling

This function is inverse to the previous one. It inserts zeros between input_signal samples. Depending on phase, PHASE_EVEN or PHASE_ODD, zeros are insered into the odd-numbered (1, 3, 5, ...) or even-numbered (0, 2, 4, ...) positions respectively.

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

Definition at line 92 of file filter.c.

Referenced by synthesis_1D().

{
    int i, j, k;

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

    for (k = phase ^ 1; k < output_length; k += 2) {
        output_signal[k] = 0;
    }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index