static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)

{

    AudioFIRContext *s = ctx->priv;

    const float *src = (const float *)s->in[0]->extended_data[ch];

    int index1 = (s->index + 1) % 3;

    int index2 = (s->index + 2) % 3;

    float *sum = s->sum[ch];

    AVFrame *out = arg;

    float *block;

    float *dst;

    int n, i, j;



    memset(sum, 0, sizeof(*sum) * s->fft_length);

    block = s->block[ch] + s->part_index * s->block_size;

    memset(block, 0, sizeof(*block) * s->fft_length);



    s->fdsp->vector_fmul_scalar(block + s->part_size, src, s->dry_gain, s->nb_samples);

    emms_c();



    av_rdft_calc(s->rdft[ch], block);

    block[2 * s->part_size] = block[1];

    block[1] = 0;



    j = s->part_index;



    for (i = 0; i < s->nb_partitions; i++) {

        const int coffset = i * s->coeff_size;

        const FFTComplex *coeff = s->coeff[ch * !s->one2many] + coffset;



        block = s->block[ch] + j * s->block_size;

        s->fcmul_add(sum, block, (const float *)coeff, s->part_size);



        if (j == 0)

            j = s->nb_partitions;

        j--;

    }



    sum[1] = sum[2 * s->part_size];

    av_rdft_calc(s->irdft[ch], sum);



    dst = (float *)s->buffer->extended_data[ch] + index1 * s->part_size;

    for (n = 0; n < s->part_size; n++) {

        dst[n] += sum[n];

    }



    dst = (float *)s->buffer->extended_data[ch] + index2 * s->part_size;



    memcpy(dst, sum + s->part_size, s->part_size * sizeof(*dst));



    dst = (float *)s->buffer->extended_data[ch] + s->index * s->part_size;



    if (out) {

        float *ptr = (float *)out->extended_data[ch];

        s->fdsp->vector_fmul_scalar(ptr, dst, s->gain * s->wet_gain, out->nb_samples);

        emms_c();

    }



    return 0;

}

static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)

{

    AudioFIRContext *s = ctx->priv;

    const float *src = (const float *)s->in[0]->extended_data[ch];

    int index1 = (s->index + 1) % 3;

    int index2 = (s->index + 2) % 3;

    float *sum = s->sum[ch];

    AVFrame *out = arg;

    float *block;

    float *dst;

    int n, i, j;



    memset(sum, 0, sizeof(*sum) * s->fft_length);

    block = s->block[ch] + s->part_index * s->block_size;

    memset(block, 0, sizeof(*block) * s->fft_length);



    s->fdsp->vector_fmul_scalar(block + s->part_size, src, s->dry_gain, s->nb_samples);

    emms_c();



    av_rdft_calc(s->rdft[ch], block);

    block[2 * s->part_size] = block[1];

    block[1] = 0;



    j = s->part_index;



    for (i = 0; i < s->nb_partitions; i++) {

        const int coffset = i * s->coeff_size;

        const FFTComplex *coeff = s->coeff[ch * !s->one2many] + coffset;



        block = s->block[ch] + j * s->block_size;

        s->fcmul_add(sum, block, (const float *)coeff, s->part_size);



        if (j == 0)

            j = s->nb_partitions;

        j--;

    }



    sum[1] = sum[2 * s->part_size];

    av_rdft_calc(s->irdft[ch], sum);



    dst = (float *)s->buffer->extended_data[ch] + index1 * s->part_size;

    for (n = 0; n < s->part_size; n++) {

        dst[n] += sum[n];

    }



    dst = (float *)s->buffer->extended_data[ch] + index2 * s->part_size;



    memcpy(dst, sum + s->part_size, s->part_size * sizeof(*dst));



    dst = (float *)s->buffer->extended_data[ch] + s->index * s->part_size;



    if (out) {

        float *ptr = (float *)out->extended_data[ch];

        s->fdsp->vector_fmul_scalar(ptr, dst, s->gain * s->wet_gain, out->nb_samples);

        emms_c();

    }



    return 0;

}

static int FUNC_0(AVFilterContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)

{

    AudioFIRContext *s = VAR_0->priv;

    const float *VAR_4 = (const float *)s->in[0]->extended_data[VAR_2];

    int VAR_5 = (s->index + 1) % 3;

    int VAR_6 = (s->index + 2) % 3;

    float *VAR_7 = s->VAR_7[VAR_2];

    AVFrame *out = VAR_1;

    float *VAR_8;

    float *VAR_9;

    int VAR_10, VAR_11, VAR_12;



    memset(VAR_7, 0, sizeof(*VAR_7) * s->fft_length);

    VAR_8 = s->VAR_8[VAR_2] + s->part_index * s->block_size;

    memset(VAR_8, 0, sizeof(*VAR_8) * s->fft_length);



    s->fdsp->vector_fmul_scalar(VAR_8 + s->part_size, VAR_4, s->dry_gain, s->nb_samples);

    emms_c();



    av_rdft_calc(s->rdft[VAR_2], VAR_8);

    VAR_8[2 * s->part_size] = VAR_8[1];

    VAR_8[1] = 0;



    VAR_12 = s->part_index;



    for (VAR_11 = 0; VAR_11 < s->nb_partitions; VAR_11++) {

        const int coffset = VAR_11 * s->coeff_size;

        const FFTComplex *coeff = s->coeff[VAR_2 * !s->one2many] + coffset;



        VAR_8 = s->VAR_8[VAR_2] + VAR_12 * s->block_size;

        s->fcmul_add(VAR_7, VAR_8, (const float *)coeff, s->part_size);



        if (VAR_12 == 0)

            VAR_12 = s->nb_partitions;

        VAR_12--;

    }



    VAR_7[1] = VAR_7[2 * s->part_size];

    av_rdft_calc(s->irdft[VAR_2], VAR_7);



    VAR_9 = (float *)s->buffer->extended_data[VAR_2] + VAR_5 * s->part_size;

    for (VAR_10 = 0; VAR_10 < s->part_size; VAR_10++) {

        VAR_9[VAR_10] += VAR_7[VAR_10];

    }



    VAR_9 = (float *)s->buffer->extended_data[VAR_2] + VAR_6 * s->part_size;



    memcpy(VAR_9, VAR_7 + s->part_size, s->part_size * sizeof(*VAR_9));



    VAR_9 = (float *)s->buffer->extended_data[VAR_2] + s->index * s->part_size;



    if (out) {

        float *VAR_13 = (float *)out->extended_data[VAR_2];

        s->fdsp->vector_fmul_scalar(VAR_13, VAR_9, s->gain * s->wet_gain, out->nb_samples);

        emms_c();

    }



    return 0;

}

static int FUNC_0(AVFilterContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)
{ AudioFIRContext *s = VAR_0->priv; const float *VAR_4 = (const float *)s->in[0]->extended_data[VAR_2]; int VAR_5 = (s->index + 1) % 3; int VAR_6 = (s->index + 2) % 3; float *VAR_7 = s->VAR_7[VAR_2]; AVFrame *out = VAR_1; float *VAR_8; float *VAR_9; int VAR_10, VAR_11, VAR_12; memset(VAR_7, 0, sizeof(*VAR_7) * s->fft_length); VAR_8 = s->VAR_8[VAR_2] + s->part_index * s->block_size; memset(VAR_8, 0, sizeof(*VAR_8) * s->fft_length); s->fdsp->vector_fmul_scalar(VAR_8 + s->part_size, VAR_4, s->dry_gain, s->nb_samples); emms_c(); av_rdft_calc(s->rdft[VAR_2], VAR_8); VAR_8[2 * s->part_size] = VAR_8[1]; VAR_8[1] = 0; VAR_12 = s->part_index; for (VAR_11 = 0; VAR_11 < s->nb_partitions; VAR_11++) { const int coffset = VAR_11 * s->coeff_size; const FFTComplex *coeff = s->coeff[VAR_2 * !s->one2many] + coffset; VAR_8 = s->VAR_8[VAR_2] + VAR_12 * s->block_size; s->fcmul_add(VAR_7, VAR_8, (const float *)coeff, s->part_size); if (VAR_12 == 0)
VAR_12 = s->nb_partitions; VAR_12--; } VAR_7[1] = VAR_7[2 * s->part_size]; av_rdft_calc(s->irdft[VAR_2], VAR_7); VAR_9 = (float *)s->buffer->extended_data[VAR_2] + VAR_5 * s->part_size; for (VAR_10 = 0; VAR_10 < s->part_size; VAR_10++) { VAR_9[VAR_10] += VAR_7[VAR_10]; } VAR_9 = (float *)s->buffer->extended_data[VAR_2] + VAR_6 * s->part_size; memcpy(VAR_9, VAR_7 + s->part_size, s->part_size * sizeof(*VAR_9)); VAR_9 = (float *)s->buffer->extended_data[VAR_2] + s->index * s->part_size; if (out) { float *VAR_13 = (float *)out->extended_data[VAR_2]; s->fdsp->vector_fmul_scalar(VAR_13, VAR_9, s->gain * s->wet_gain, out->nb_samples); emms_c(); } return 0; }