diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-11-19 00:04:06 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-11-19 00:25:47 +0100 |
commit | 3bcec58535d395945a390bdc7af4048a7abc60eb (patch) | |
tree | 546bd261df502f7cc20de858a2e624974f9adaee | |
parent | fced45fd9528e93fd71e792f3ddd9eb4667c2d31 (diff) | |
download | ffmpeg-3bcec58535d395945a390bdc7af4048a7abc60eb.tar.gz |
avfilter: fix av_tx_fn stride usage for complex inputs
-rw-r--r-- | libavfilter/af_afftfilt.c | 4 | ||||
-rw-r--r-- | libavfilter/af_apsyclip.c | 8 | ||||
-rw-r--r-- | libavfilter/af_aspectralstats.c | 4 | ||||
-rw-r--r-- | libavfilter/af_atempo.c | 2 | ||||
-rw-r--r-- | libavfilter/af_dialoguenhance.c | 2 | ||||
-rw-r--r-- | libavfilter/af_headphone.c | 12 | ||||
-rw-r--r-- | libavfilter/af_sofalizer.c | 10 | ||||
-rw-r--r-- | libavfilter/af_superequalizer.c | 2 | ||||
-rw-r--r-- | libavfilter/af_surround.c | 2 | ||||
-rw-r--r-- | libavfilter/afir_template.c | 2 | ||||
-rw-r--r-- | libavfilter/asrc_afirsrc.c | 2 | ||||
-rw-r--r-- | libavfilter/asrc_sinc.c | 4 | ||||
-rw-r--r-- | libavfilter/avf_showcqt.c | 4 | ||||
-rw-r--r-- | libavfilter/avf_showfreqs.c | 4 | ||||
-rw-r--r-- | libavfilter/avf_showspatial.c | 2 | ||||
-rw-r--r-- | libavfilter/avf_showspectrum.c | 6 | ||||
-rw-r--r-- | libavfilter/vaf_spectrumsynth.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_convolve.c | 10 | ||||
-rw-r--r-- | libavfilter/vf_fftdnoiz.c | 16 | ||||
-rw-r--r-- | libavfilter/vf_fftfilt.c | 6 |
20 files changed, 52 insertions, 52 deletions
diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index b10fa24b09..a65ccc8594 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -240,7 +240,7 @@ static int tx_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) AVComplexFloat *fft_in = s->fft_in[ch]; AVComplexFloat *fft_out = s->fft_out[ch]; - s->tx_fn(s->fft[ch], fft_out, fft_in, sizeof(float)); + s->tx_fn(s->fft[ch], fft_out, fft_in, sizeof(*fft_in)); } return 0; @@ -292,7 +292,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job } } - s->itx_fn(s->ifft[ch], fft_out, fft_temp, sizeof(float)); + s->itx_fn(s->ifft[ch], fft_out, fft_temp, sizeof(*fft_temp)); memmove(buf, buf + s->hop_size, window_size * sizeof(float)); for (int i = 0; i < window_size; i++) diff --git a/libavfilter/af_apsyclip.c b/libavfilter/af_apsyclip.c index b739422e8b..78c0ca30ca 100644 --- a/libavfilter/af_apsyclip.c +++ b/libavfilter/af_apsyclip.c @@ -188,7 +188,7 @@ static int config_input(AVFilterLink *inlink) AudioPsyClipContext *s = ctx->priv; static const int points[][2] = { {0,14}, {125,14}, {250,16}, {500,18}, {1000,20}, {2000,20}, {4000,20}, {8000,17}, {16000,14}, {20000,-10} }; static const int num_points = 10; - float scale; + float scale = 1.f; int ret; s->fft_size = inlink->sample_rate > 100000 ? 1024 : inlink->sample_rate > 50000 ? 512 : 256; @@ -417,7 +417,7 @@ static void feed(AVFilterContext *ctx, int ch, apply_window(s, in_frame, windowed_frame, 0); r2c(windowed_frame, s->fft_size); - s->tx_fn(s->tx_ctx[ch], spectrum_buf, windowed_frame, sizeof(float)); + s->tx_fn(s->tx_ctx[ch], spectrum_buf, windowed_frame, sizeof(AVComplexFloat)); c2r(windowed_frame, s->fft_size); calculate_mask_curve(s, spectrum_buf, mask_curve); @@ -447,11 +447,11 @@ static void feed(AVFilterContext *ctx, int ch, clip_to_window(s, windowed_frame, clipping_delta, delta_boost); r2c(clipping_delta, s->fft_size); - s->tx_fn(s->tx_ctx[ch], spectrum_buf, clipping_delta, sizeof(float)); + s->tx_fn(s->tx_ctx[ch], spectrum_buf, clipping_delta, sizeof(AVComplexFloat)); limit_clip_spectrum(s, spectrum_buf, mask_curve); - s->itx_fn(s->itx_ctx[ch], clipping_delta, spectrum_buf, sizeof(float)); + s->itx_fn(s->itx_ctx[ch], clipping_delta, spectrum_buf, sizeof(AVComplexFloat)); c2r(clipping_delta, s->fft_size); for (int i = 0; i < s->fft_size; i++) diff --git a/libavfilter/af_aspectralstats.c b/libavfilter/af_aspectralstats.c index 1839e3cf26..b9db6bcfa5 100644 --- a/libavfilter/af_aspectralstats.c +++ b/libavfilter/af_aspectralstats.c @@ -111,7 +111,7 @@ AVFILTER_DEFINE_CLASS(aspectralstats); static int config_output(AVFilterLink *outlink) { AudioSpectralStatsContext *s = outlink->src->priv; - float overlap, scale; + float overlap, scale = 1.f; int ret; s->nb_channels = outlink->ch_layout.nb_channels; @@ -460,7 +460,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job fft_in[n].im = 0; } - s->tx_fn(s->fft[ch], fft_out, fft_in, sizeof(float)); + s->tx_fn(s->fft[ch], fft_out, fft_in, sizeof(*fft_in)); for (int n = 0; n < s->win_size / 2; n++) { fft_out[n].re *= scale; diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index adbc69b50c..27f13638b0 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -619,7 +619,7 @@ static void yae_xcorr_via_rdft(float *xcorr_in, } // apply inverse rDFT: - c2r_fn(complex_to_real, xcorr, xcorr_in, sizeof(float)); + c2r_fn(complex_to_real, xcorr, xcorr_in, sizeof(*xc)); } /** diff --git a/libavfilter/af_dialoguenhance.c b/libavfilter/af_dialoguenhance.c index 6ae3162f3e..ae95f95d68 100644 --- a/libavfilter/af_dialoguenhance.c +++ b/libavfilter/af_dialoguenhance.c @@ -286,7 +286,7 @@ static int de_stereo(AVFilterContext *ctx, AVFrame *out) get_final(center, windowed_oleft, windowed_oright, vad, s->fft_size / 2 + 1, s->original, s->enhance); - s->itx_fn(s->itx_ctx, windowed_oleft, center, sizeof(float)); + s->itx_fn(s->itx_ctx, windowed_oleft, center, sizeof(AVComplexFloat)); apply_window(s, windowed_oleft, left_out, 1); diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index edaae62172..3d3adca8c8 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -273,7 +273,7 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, fft_in[j].re = src[j * in_channels + i]; } - tx_fn(fft, fft_out, fft_in, sizeof(float)); + tx_fn(fft, fft_out, fft_in, sizeof(*fft_in)); for (j = 0; j < n_fft; j++) { const AVComplexFloat *hcomplex = hrtf_offset + j; @@ -285,7 +285,7 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, } } - itx_fn(ifft, fft_out, fft_acc, sizeof(float)); + itx_fn(ifft, fft_out, fft_acc, sizeof(*fft_acc)); for (j = 0; j < in->nb_samples; j++) { dst[2 * j] += fft_out[j].re * fft_scale; @@ -480,8 +480,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) fft_in_r[j].re = ptr[j * 2 + 1] * gain_lin; } - s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(float)); - s->tx_fn[0](s->fft[0], fft_out_r, fft_in_r, sizeof(float)); + s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(*fft_in_l)); + s->tx_fn[0](s->fft[0], fft_out_r, fft_in_r, sizeof(*fft_in_r)); } } else { int I, N = ctx->inputs[1]->ch_layout.nb_channels; @@ -513,8 +513,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) fft_in_r[j].re = ptr[j * N + I + 1] * gain_lin; } - s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(float)); - s->tx_fn[0](s->fft[0], fft_out_r, fft_in_r, sizeof(float)); + s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(*fft_in_l)); + s->tx_fn[0](s->fft[0], fft_out_r, fft_in_r, sizeof(*fft_in_r)); } } } diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index f9c5fa2f2d..be947314f3 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -525,7 +525,7 @@ static int sofalizer_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, } /* transform input signal of current channel to frequency domain */ - tx_fn(fft, fft_out, fft_in, sizeof(float)); + tx_fn(fft, fft_out, fft_in, sizeof(*fft_in)); for (j = 0; j < n_fft; j++) { const AVComplexFloat *hcomplex = hrtf_offset + j; @@ -541,7 +541,7 @@ static int sofalizer_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, } /* transform output signal of current channel back to time domain */ - itx_fn(ifft, fft_out, fft_acc, sizeof(float)); + itx_fn(ifft, fft_out, fft_acc, sizeof(*fft_acc)); for (j = 0; j < in->nb_samples; j++) { /* write output signal of current channel to output buffer */ @@ -832,7 +832,7 @@ static int load_data(AVFilterContext *ctx, int azim, int elev, float radius, int s->n_fft = n_fft = 1 << (32 - ff_clz(n_max + s->framesize)); if (s->type == FREQUENCY_DOMAIN) { - float scale; + float scale = 1.f; av_tx_uninit(&s->fft[0]); av_tx_uninit(&s->fft[1]); @@ -927,9 +927,9 @@ static int load_data(AVFilterContext *ctx, int azim, int elev, float radius, int } /* actually transform to frequency domain (IRs -> HRTFs) */ - s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(float)); + s->tx_fn[0](s->fft[0], fft_out_l, fft_in_l, sizeof(*fft_in_l)); memcpy(data_hrtf_l + offset, fft_out_l, n_fft * sizeof(*fft_out_l)); - s->tx_fn[1](s->fft[1], fft_out_r, fft_in_r, sizeof(float)); + s->tx_fn[1](s->fft[1], fft_out_r, fft_in_r, sizeof(*fft_in_r)); memcpy(data_hrtf_r + offset, fft_out_r, n_fft * sizeof(*fft_out_r)); } } diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c index 99c08f34de..fbe707cb2f 100644 --- a/libavfilter/af_superequalizer.c +++ b/libavfilter/af_superequalizer.c @@ -225,7 +225,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) fsamples_out[i*2+1] = im; } - s->itx_fn(s->irdft, fsamples, fsamples_out, sizeof(float)); + s->itx_fn(s->irdft, fsamples, fsamples_out, sizeof(AVComplexFloat)); for (i = 0; i < s->winlen; i++) dst[i] += fsamples[i] / s->tabsize; diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c index 97a0706bda..1ef9c28120 100644 --- a/libavfilter/af_surround.c +++ b/libavfilter/af_surround.c @@ -1264,7 +1264,7 @@ static int ifft_channel(AVFilterContext *ctx, AVFrame *out, int ch) dst = (float *)s->output_out->extended_data[ch]; ptr = (float *)s->overlap_buffer->extended_data[ch]; - s->itx_fn(s->irdft[ch], dst, (float *)s->output->extended_data[ch], sizeof(float)); + s->itx_fn(s->irdft[ch], dst, (float *)s->output->extended_data[ch], sizeof(AVComplexFloat)); memmove(s->overlap_buffer->extended_data[ch], s->overlap_buffer->extended_data[ch] + s->hop_size * sizeof(float), diff --git a/libavfilter/afir_template.c b/libavfilter/afir_template.c index 6cb3eb2203..92795bb4f4 100644 --- a/libavfilter/afir_template.c +++ b/libavfilter/afir_template.c @@ -357,7 +357,7 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse j--; } - seg->itx_fn(seg->itx[ch], sumout, sumin, sizeof(ftype)); + seg->itx_fn(seg->itx[ch], sumout, sumin, sizeof(ctype)); buf = (ftype *)seg->buffer->extended_data[ch]; fn(fir_fadd)(s, buf, sumout, seg->part_size); diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c index 615242e0f5..d2ea92c41c 100644 --- a/libavfilter/asrc_afirsrc.c +++ b/libavfilter/asrc_afirsrc.c @@ -239,7 +239,7 @@ static av_cold int config_output(AVFilterLink *outlink) lininterp(s->complexf, s->freq, s->magnitude, s->phase, s->nb_freq, fft_size / 2); - s->tx_fn(s->tx_ctx, s->complexf + fft_size, s->complexf, sizeof(float)); + s->tx_fn(s->tx_ctx, s->complexf + fft_size, s->complexf, sizeof(*s->complexf)); compensation = 2.f / fft_size; middle = s->nb_taps / 2; diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index db6f70eb27..258f7a139e 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -261,7 +261,7 @@ static int fir_to_phase(SincContext *s, float **h, int *len, int *post_len, floa work[i + 1] = 0; } - s->itx_fn(s->itx, work, work, sizeof(float)); + s->itx_fn(s->itx, work, work, sizeof(AVComplexFloat)); for (i = 0; i < work_len; i++) work[i] *= 2.f / work_len; @@ -284,7 +284,7 @@ static int fir_to_phase(SincContext *s, float **h, int *len, int *post_len, floa work[i + 1] = x * sinf(work[i + 1]); } - s->itx_fn(s->itx, work, work, sizeof(float)); + s->itx_fn(s->itx, work, work, sizeof(AVComplexFloat)); for (i = 0; i < work_len; i++) work[i] *= 2.f / work_len; diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c index c019dc2564..fe3dc286b3 100644 --- a/libavfilter/avf_showcqt.c +++ b/libavfilter/avf_showcqt.c @@ -1148,7 +1148,7 @@ static int plot_cqt(AVFilterContext *ctx, AVFrame **frameout) } } - s->tx_fn(s->fft_ctx, s->fft_result, s->fft_input, sizeof(float)); + s->tx_fn(s->fft_ctx, s->fft_result, s->fft_input, sizeof(AVComplexFloat)); s->fft_result[s->fft_len] = s->fft_result[0]; UPDATE_TIME(s->fft_time); @@ -1356,7 +1356,7 @@ static int config_output(AVFilterLink *outlink) AVFilterContext *ctx = outlink->src; AVFilterLink *inlink = ctx->inputs[0]; ShowCQTContext *s = ctx->priv; - float scale; + float scale = 1.f; int ret; common_uninit(s); diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index cc7d6204b4..cf99b4331e 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -151,7 +151,7 @@ static int config_output(AVFilterLink *outlink) AVFilterContext *ctx = outlink->src; AVFilterLink *inlink = ctx->inputs[0]; ShowFreqsContext *s = ctx->priv; - float overlap, scale; + float overlap, scale = 1.f; int i, ret; s->old_pts = AV_NOPTS_VALUE; @@ -403,7 +403,7 @@ static int plot_freqs(AVFilterLink *inlink, int64_t pts) if (s->bypass[ch]) continue; - s->tx_fn(s->fft, s->fft_data[ch], s->fft_input[ch], sizeof(float)); + s->tx_fn(s->fft, s->fft_data[ch], s->fft_input[ch], sizeof(AVComplexFloat)); } s->pts = av_rescale_q(pts, inlink->time_base, outlink->time_base); diff --git a/libavfilter/avf_showspatial.c b/libavfilter/avf_showspatial.c index d47719d722..54d7962ec4 100644 --- a/libavfilter/avf_showspatial.c +++ b/libavfilter/avf_showspatial.c @@ -121,7 +121,7 @@ static int run_channel_fft(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo s->fft_tdata[ch][n].im = 0.f; } - s->tx_fn[ch](s->fft[ch], s->fft_data[ch], s->fft_tdata[ch], sizeof(float)); + s->tx_fn[ch](s->fft[ch], s->fft_data[ch], s->fft_tdata[ch], sizeof(AVComplexFloat)); return 0; } diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index da7c186326..01969287cd 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -454,10 +454,10 @@ static int run_channel_fft(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo } memcpy(f, h, s->buf_size * sizeof(*f)); - s->tx_fn(s->fft[ch], h, f, sizeof(float)); + s->tx_fn(s->fft[ch], h, f, sizeof(AVComplexFloat)); memcpy(f, g, s->buf_size * sizeof(*f)); - s->tx_fn(s->fft[ch], g, f, sizeof(float)); + s->tx_fn(s->fft[ch], g, f, sizeof(AVComplexFloat)); for (int n = 0; n < L; n++) { c = g[n].re; @@ -488,7 +488,7 @@ static int run_channel_fft(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo } /* run FFT on each samples set */ - s->tx_fn(s->fft[ch], s->fft_data[ch], s->fft_in[ch], sizeof(float)); + s->tx_fn(s->fft[ch], s->fft_data[ch], s->fft_in[ch], sizeof(AVComplexFloat)); } return 0; diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c index e0baf855a8..896eba558e 100644 --- a/libavfilter/vaf_spectrumsynth.c +++ b/libavfilter/vaf_spectrumsynth.c @@ -342,7 +342,7 @@ static void synth_window(AVFilterContext *ctx, int x) s->fft_in[ch][y].im = -s->fft_in[ch][f].im; } - s->tx_fn(s->fft, s->fft_out[ch], s->fft_in[ch], sizeof(float)); + s->tx_fn(s->fft, s->fft_out[ch], s->fft_in[ch], sizeof(AVComplexFloat)); } } diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c index a61a32f007..d9f4c4bd77 100644 --- a/libavfilter/vf_convolve.c +++ b/libavfilter/vf_convolve.c @@ -196,7 +196,7 @@ static int fft_horizontal(AVFilterContext *ctx, void *arg, int jobnr, int nb_job int y; for (y = start; y < end; y++) { - s->tx_fn[plane](s->fft[plane][jobnr], hdata_out + y * n, hdata_in + y * n, sizeof(float)); + s->tx_fn[plane](s->fft[plane][jobnr], hdata_out + y * n, hdata_in + y * n, sizeof(AVComplexFloat)); } return 0; @@ -388,7 +388,7 @@ static int fft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) vdata_in[y * n + x].im = hdata[x * n + y].im; } - s->tx_fn[plane](s->fft[plane][jobnr], vdata_out + y * n, vdata_in + y * n, sizeof(float)); + s->tx_fn[plane](s->fft[plane][jobnr], vdata_out + y * n, vdata_in + y * n, sizeof(AVComplexFloat)); } return 0; @@ -408,7 +408,7 @@ static int ifft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs int y, x; for (y = start; y < end; y++) { - s->itx_fn[plane](s->ifft[plane][jobnr], vdata_out + y * n, vdata_in + y * n, sizeof(float)); + s->itx_fn[plane](s->ifft[plane][jobnr], vdata_out + y * n, vdata_in + y * n, sizeof(AVComplexFloat)); for (x = 0; x < n; x++) { hdata[x * n + y].re = vdata_out[y * n + x].re; @@ -432,7 +432,7 @@ static int ifft_horizontal(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo int y; for (y = start; y < end; y++) { - s->itx_fn[plane](s->ifft[plane][jobnr], hdata_out + y * n, hdata_in + y * n, sizeof(float)); + s->itx_fn[plane](s->ifft[plane][jobnr], hdata_out + y * n, hdata_in + y * n, sizeof(AVComplexFloat)); } return 0; @@ -778,7 +778,7 @@ static int config_output(AVFilterLink *outlink) for (i = 0; i < s->nb_planes; i++) { for (j = 0; j < MAX_THREADS; j++) { - float scale; + float scale = 1.f; ret = av_tx_init(&s->fft[i][j], &s->tx_fn[i], AV_TX_FLOAT_FFT, 0, s->fft_len[i], &scale, 0); if (ret < 0) diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c index 7b20ad367d..17dd4f1e77 100644 --- a/libavfilter/vf_fftdnoiz.c +++ b/libavfilter/vf_fftdnoiz.c @@ -305,7 +305,7 @@ static void import_block(FFTdnoizContext *s, dst[j].re = dst[rw - 1].re; dst[j].im = 0.f; } - s->tx_fn(s->fft[jobnr], dst_out, dst, sizeof(float)); + s->tx_fn(s->fft[jobnr], dst_out, dst, sizeof(AVComplexFloat)); ddst = dst_out; dst += data_linesize; @@ -327,7 +327,7 @@ static void import_block(FFTdnoizContext *s, for (int i = 0; i < block; i++) { for (int j = 0; j < block; j++) dst[j] = ssrc[j * data_linesize + i]; - s->tx_fn(s->fft[jobnr], bdst, dst, sizeof(float)); + s->tx_fn(s->fft[jobnr], bdst, dst, sizeof(AVComplexFloat)); dst += data_linesize; bdst += buffer_linesize; @@ -361,7 +361,7 @@ static void export_block(FFTdnoizContext *s, buffer_linesize /= sizeof(float); for (int i = 0; i < block; i++) { - s->itx_fn(s->ifft[jobnr], vdst, bsrc, sizeof(float)); + s->itx_fn(s->ifft[jobnr], vdst, bsrc, sizeof(AVComplexFloat)); for (int j = 0; j < block; j++) hdst[j * data_linesize + i] = vdst[j]; @@ -373,7 +373,7 @@ static void export_block(FFTdnoizContext *s, for (int i = 0; i < rh && (y * size + i) < height; i++) { uint8_t *dst = dstp + dst_linesize * (y * size + i) + x * size * bpp; - s->itx_fn(s->ifft[jobnr], hdst_out, hdst, sizeof(float)); + s->itx_fn(s->ifft[jobnr], hdst_out, hdst, sizeof(AVComplexFloat)); s->export_row(hdst_out + hoverlap, dst, rw, depth, s->win[i + hoverlap] + hoverlap); hdst += data_linesize; @@ -410,7 +410,7 @@ static void filter_block3d2(FFTdnoizContext *s, int plane, float *pbuffer, float buffer[2].re = nbuff[2 * j ]; buffer[2].im = nbuff[2 * j + 1]; - s->tx_r_fn(s->fft_r[jobnr], outbuffer, buffer, sizeof(float)); + s->tx_r_fn(s->fft_r[jobnr], outbuffer, buffer, sizeof(AVComplexFloat)); for (int z = 0; z < 3; z++) { const float re = outbuffer[z].re; @@ -431,7 +431,7 @@ static void filter_block3d2(FFTdnoizContext *s, int plane, float *pbuffer, float outbuffer[z].im *= factor; } - s->itx_r_fn(s->ifft_r[jobnr], buffer, outbuffer, sizeof(float)); + s->itx_r_fn(s->ifft_r[jobnr], buffer, outbuffer, sizeof(AVComplexFloat)); cbuff[2 * j + 0] = buffer[1].re; cbuff[2 * j + 1] = buffer[1].im; @@ -468,7 +468,7 @@ static void filter_block3d1(FFTdnoizContext *s, int plane, float *pbuffer, buffer[1].re = cbuff[2 * j ]; buffer[1].im = cbuff[2 * j + 1]; - s->tx_r_fn(s->fft_r[jobnr], outbuffer, buffer, sizeof(float)); + s->tx_r_fn(s->fft_r[jobnr], outbuffer, buffer, sizeof(AVComplexFloat)); for (int z = 0; z < 2; z++) { const float re = outbuffer[z].re; @@ -489,7 +489,7 @@ static void filter_block3d1(FFTdnoizContext *s, int plane, float *pbuffer, outbuffer[z].im *= factor; } - s->itx_r_fn(s->ifft_r[jobnr], buffer, outbuffer, sizeof(float)); + s->itx_r_fn(s->ifft_r[jobnr], buffer, outbuffer, sizeof(AVComplexFloat)); cbuff[2 * j + 0] = buffer[1].re; cbuff[2 * j + 1] = buffer[1].im; diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c index 1953e969a0..d2a6db24c8 100644 --- a/libavfilter/vf_fftfilt.c +++ b/libavfilter/vf_fftfilt.c @@ -201,7 +201,7 @@ static int irdft_horizontal8(AVFilterContext *ctx, void *arg, int jobnr, int nb_ s->ihtx_fn(s->ihrdft[jobnr][plane], s->rdft_hdata_out[plane] + i * s->rdft_hstride[plane], s->rdft_hdata_in[plane] + i * s->rdft_hstride[plane], - sizeof(float)); + sizeof(AVComplexFloat)); for (int i = slice_start; i < slice_end; i++) { const float scale = 1.f / (s->rdft_hlen[plane] * s->rdft_vlen[plane]); @@ -232,7 +232,7 @@ static int irdft_horizontal16(AVFilterContext *ctx, void *arg, int jobnr, int nb s->ihtx_fn(s->ihrdft[jobnr][plane], s->rdft_hdata_out[plane] + i * s->rdft_hstride[plane], s->rdft_hdata_in[plane] + i * s->rdft_hstride[plane], - sizeof(float)); + sizeof(AVComplexFloat)); for (int i = slice_start; i < slice_end; i++) { const float scale = 1.f / (s->rdft_hlen[plane] * s->rdft_vlen[plane]); @@ -468,7 +468,7 @@ static int irdft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_job s->ivtx_fn(s->ivrdft[jobnr][plane], s->rdft_vdata_in[plane] + i * s->rdft_vstride[plane], s->rdft_vdata_out[plane] + i * s->rdft_vstride[plane], - sizeof(float)); + sizeof(AVComplexFloat)); } return 0; |