Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -281,6 +281,8 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, · 280 unmodified lines | |||
| 281 | 281 | ||
| 282 | for (j = 0; j < in->nb_samples; j++) { | 282 | for (j = 0; j < in->nb_samples; j++) { |
| 283 | dst[2 * j] += fft_acc[j].re * fft_scale; | 283 | dst[2 * j] += fft_acc[j].re * fft_scale; |
| 284 | if (fabsf(dst[2 * j]) > 1) | ||
| 285 | n_clippings[0]++; | ||
| 284 | } | 286 | } |
| 285 | 287 | ||
| 286 | for (j = 0; j < ir_len - 1; j++) { | 288 | for (j = 0; j < ir_len - 1; j++) { |
| @@ -289,14 +291,6 @@ static int headphone_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr, · 2 unmodified lines | |||
| 289 | *(ringbuffer + write_pos) += fft_acc[in->nb_samples + j].re * fft_scale; | 291 | *(ringbuffer + write_pos) += fft_acc[in->nb_samples + j].re * fft_scale; |
| 290 | } | 292 | } |
| 291 | 293 | ||
| 292 | for (i = 0; i < out->nb_samples; i++) { | ||
| 293 | if (fabsf(dst[0]) > 1) { | ||
| 294 | n_clippings[0]++; | ||
| 295 | } | ||
| 296 | |||
| 297 | dst += 2; | ||
| 298 | } | ||
| 299 | |||
| 300 | *write = wr; | 294 | *write = wr; |
| 301 | 295 | ||
| 302 | return 0; | 296 | return 0; |