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

static void qdm2_synthesis_filter ( QDM2Context q,
int  index 
) [static]

Parameters:
q context
index subpacket number

Definition at line 1654 of file qdm2.c.

References QDM2Context::channels, QDM2Context::frame_size, QDM2Context::nb_channels, QDM2Context::output_buffer, QDM2Context::sub_sampling, and QDM2Context::synth_buf_offset.

{
    OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
    int i, k, ch, sb_used, sub_sampling, dither_state = 0;

    /* copy sb_samples */
    sb_used = QDM2_SB_USED(q->sub_sampling);

    for (ch = 0; ch < q->channels; ch++)
        for (i = 0; i < 8; i++)
            for (k=sb_used; k < SBLIMIT; k++)
                q->sb_samples[ch][(8 * index) + i][k] = 0;

    for (ch = 0; ch < q->nb_channels; ch++) {
        OUT_INT *samples_ptr = samples + ch;

        for (i = 0; i < 8; i++) {
            ff_mpa_synth_filter(q->synth_buf[ch], &(q->synth_buf_offset[ch]),
                mpa_window, &dither_state,
                samples_ptr, q->nb_channels,
                q->sb_samples[ch][(8 * index) + i]);
            samples_ptr += 32 * q->nb_channels;
        }
    }

    /* add samples to output buffer */
    sub_sampling = (4 >> q->sub_sampling);

    for (ch = 0; ch < q->channels; ch++)
        for (i = 0; i < q->frame_size; i++)
            q->output_buffer[q->channels * i + ch] += (float)(samples[q->nb_channels * sub_sampling * i + ch] >> (sizeof(OUT_INT)*8-16));
}


Generated by  Doxygen 1.6.0   Back to index