mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avfilter/af_headphone: Don't check for clipping in separate loop
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
7b841cf6b7
commit
3e950f5349
@ -281,6 +281,8 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr,
|
||||
|
||||
for (j = 0; j < in->nb_samples; j++) {
|
||||
dst[2 * j] += fft_acc[j].re * fft_scale;
|
||||
if (fabsf(dst[2 * j]) > 1)
|
||||
n_clippings[0]++;
|
||||
}
|
||||
|
||||
for (j = 0; j < ir_len - 1; j++) {
|
||||
@ -289,14 +291,6 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr,
|
||||
*(ringbuffer + write_pos) += fft_acc[in->nb_samples + j].re * fft_scale;
|
||||
}
|
||||
|
||||
for (i = 0; i < out->nb_samples; i++) {
|
||||
if (fabsf(dst[0]) > 1) {
|
||||
n_clippings[0]++;
|
||||
}
|
||||
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
*write = wr;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user