| @@ -59,7 +59,7 @@ static void fcmul_add_c(float *sum, const float *t, const float *c, ptrdiff_t le · 58 unmodified lines |
| 59 | 59 | static int fir_quantum(AVFilterContext *ctx, AVFrame *out, int ch, int offset) |
| 60 | 60 | { |
| 61 | 61 | AudioFIRContext *s = ctx->priv; |
| 62 | | − const float *in = (const float *)s->in[0]->extended_data[ch] + offset; |
| 62 | + const float *in = (const float *)s->in->extended_data[ch] + offset; |
| 63 | 63 | float *block, *buf, *ptr = (float *)out->extended_data[ch] + offset; |
| 64 | 64 | const int nb_samples = FFMIN(s->min_part_size, out->nb_samples - offset); |
| 65 | 65 | int n, i, j; |
| @@ -175,7 +175,7 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink) · 109 unmodified lines |
| 175 | 175 | |
| 176 | 176 | if (s->pts == AV_NOPTS_VALUE) |
| 177 | 177 | s->pts = in->pts; |
| 178 | | − s->in[0] = in; |
| 178 | + s->in = in; |
| 179 | 179 | ctx->internal->execute(ctx, fir_channels, out, NULL, FFMIN(outlink->channels, |
| 180 | 180 | ff_filter_get_nb_threads(ctx))); |
| 181 | 181 | |
| @@ -184,7 +184,7 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink) · 2 unmodified lines |
| 184 | 184 | s->pts += av_rescale_q(out->nb_samples, (AVRational){1, outlink->sample_rate}, outlink->time_base); |
| 185 | 185 | |
| 186 | 186 | av_frame_free(&in); |
| 187 | | − s->in[0] = NULL; |
| 187 | + s->in = NULL; |
| 188 | 188 | |
| 189 | 189 | return ff_filter_frame(outlink, out); |
| 190 | 190 | } |
| @@ -255,9 +255,9 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out) · 64 unmodified lines |
| 255 | 255 | if (!mag || !phase || !delay) |
| 256 | 256 | goto end; |
| 257 | 257 | |
| 258 | | − channel = av_clip(s->ir_channel, 0, s->in[1]->channels - 1); |
| 258 | + channel = av_clip(s->ir_channel, 0, s->ir[0]->channels - 1); |
| 259 | 259 | for (i = 0; i < s->w; i++) { |
| 260 | | − const float *src = (const float *)s->in[1]->extended_data[channel]; |
| 260 | + const float *src = (const float *)s->ir[0]->extended_data[channel]; |
| 261 | 261 | double w = i * M_PI / (s->w - 1); |
| 262 | 262 | double div, real_num = 0., imag_num = 0., real = 0., imag = 0.; |
| 263 | 263 | |
| @@ -404,7 +404,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 140 unmodified lines |
| 404 | 404 | part_size = FFMIN(part_size, max_part_size); |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | | − ret = ff_inlink_consume_samples(ctx->inputs[1], s->nb_taps, s->nb_taps, &s->in[1]); |
| 407 | + ret = ff_inlink_consume_samples(ctx->inputs[1], s->nb_taps, s->nb_taps, &s->ir[0]); |
| 408 | 408 | if (ret < 0) |
| 409 | 409 | return ret; |
| 410 | 410 | if (ret == 0) |
| @@ -421,7 +421,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 10 unmodified lines |
| 421 | 421 | break; |
| 422 | 422 | case 0: |
| 423 | 423 | for (ch = 0; ch < ctx->inputs[1]->channels; ch++) { |
| 424 | | − float *time = (float *)s->in[1]->extended_data[!s->one2many * ch]; |
| 424 | + float *time = (float *)s->ir[0]->extended_data[!s->one2many * ch]; |
| 425 | 425 | |
| 426 | 426 | for (i = 0; i < s->nb_taps; i++) |
| 427 | 427 | power += FFABS(time[i]); |
| @@ -430,7 +430,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 2 unmodified lines |
| 430 | 430 | break; |
| 431 | 431 | case 1: |
| 432 | 432 | for (ch = 0; ch < ctx->inputs[1]->channels; ch++) { |
| 433 | | − float *time = (float *)s->in[1]->extended_data[!s->one2many * ch]; |
| 433 | + float *time = (float *)s->ir[0]->extended_data[!s->one2many * ch]; |
| 434 | 434 | |
| 435 | 435 | for (i = 0; i < s->nb_taps; i++) |
| 436 | 436 | power += time[i]; |
| @@ -439,7 +439,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 2 unmodified lines |
| 439 | 439 | break; |
| 440 | 440 | case 2: |
| 441 | 441 | for (ch = 0; ch < ctx->inputs[1]->channels; ch++) { |
| 442 | | − float *time = (float *)s->in[1]->extended_data[!s->one2many * ch]; |
| 442 | + float *time = (float *)s->ir[0]->extended_data[!s->one2many * ch]; |
| 443 | 443 | |
| 444 | 444 | for (i = 0; i < s->nb_taps; i++) |
| 445 | 445 | power += time[i] * time[i]; |
| @@ -453,7 +453,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 7 unmodified lines |
| 453 | 453 | s->gain = FFMIN(s->gain * s->ir_gain, 1.f); |
| 454 | 454 | av_log(ctx, AV_LOG_DEBUG, "power %f, gain %f\n", power, s->gain); |
| 455 | 455 | for (ch = 0; ch < ctx->inputs[1]->channels; ch++) { |
| 456 | | − float *time = (float *)s->in[1]->extended_data[!s->one2many * ch]; |
| 456 | + float *time = (float *)s->ir[0]->extended_data[!s->one2many * ch]; |
| 457 | 457 | |
| 458 | 458 | s->fdsp->vector_fmul_scalar(time, time, s->gain, FFALIGN(s->nb_taps, 4)); |
| 459 | 459 | } |
| @@ -462,7 +462,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 2 unmodified lines |
| 462 | 462 | av_log(ctx, AV_LOG_DEBUG, "nb_segments: %d\n", s->nb_segments); |
| 463 | 463 | |
| 464 | 464 | for (ch = 0; ch < ctx->inputs[1]->channels; ch++) { |
| 465 | | − float *time = (float *)s->in[1]->extended_data[!s->one2many * ch]; |
| 465 | + float *time = (float *)s->ir[0]->extended_data[!s->one2many * ch]; |
| 466 | 466 | int toffset = 0; |
| 467 | 467 | |
| 468 | 468 | for (i = FFMAX(1, s->length * s->nb_taps); i < s->nb_taps; i++) |
| @@ -510,7 +510,7 @@ static int convert_coeffs(AVFilterContext *ctx) · 41 unmodified lines |
| 510 | 510 | } |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | | − av_frame_free(&s->in[1]); |
| 513 | + av_frame_free(&s->ir[0]); |
| 514 | 514 | s->have_coeffs = 1; |
| 515 | 515 | |
| 516 | 516 | return 0; |
| @@ -727,7 +727,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 210 unmodified lines |
| 727 | 727 | } |
| 728 | 728 | |
| 729 | 729 | av_freep(&s->fdsp); |
| 730 | | − av_frame_free(&s->in[1]); |
| 730 | + av_frame_free(&s->ir[0]); |
| 731 | 731 | |
| 732 | 732 | for (int i = 0; i < ctx->nb_outputs; i++) |
| 733 | 733 | av_freep(&ctx->output_pads[i].name); |