From b53f9c5e6891b1f04ca08fc3f8a76ca11a3594b9 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 11 Sep 2021 21:45:08 +0200 Subject: [PATCH] avfilter/af_apsyclip: fix mixed declarations and code --- libavfilter/af_apsyclip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/af_apsyclip.c b/libavfilter/af_apsyclip.c index 6fec4f52c2..ef151bcb55 100644 --- a/libavfilter/af_apsyclip.c +++ b/libavfilter/af_apsyclip.c @@ -304,8 +304,8 @@ static void calculate_mask_curve(AudioPsyClipContext *s, mask_curve[i] = 0; for (int i = 0; i < s->num_psy_bins; i++) { + int base_idx, start_bin, end_bin, table_idx; float magnitude; - int table_idx; int range[2]; if (i == 0) { @@ -322,9 +322,9 @@ static void calculate_mask_curve(AudioPsyClipContext *s, table_idx = s->spread_table_index[i]; range[0] = s->spread_table_range[table_idx][0]; range[1] = s->spread_table_range[table_idx][1]; - int base_idx = table_idx * s->num_psy_bins; - int start_bin = FFMAX(0, i + range[0]); - int end_bin = FFMIN(s->num_psy_bins, i + range[1]); + base_idx = table_idx * s->num_psy_bins; + start_bin = FFMAX(0, i + range[0]); + end_bin = FFMIN(s->num_psy_bins, i + range[1]); for (int j = start_bin; j < end_bin; j++) mask_curve[j] += s->spread_table[base_idx + s->num_psy_bins / 2 + j - i] * magnitude;