diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-09-11 21:45:08 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-09-11 21:47:49 +0200 |
commit | b53f9c5e6891b1f04ca08fc3f8a76ca11a3594b9 (patch) | |
tree | 1e69c32cfdaa956bfe2dc7279dfdd96266ce981d | |
parent | eeab62ad2d7a95a4739bb10db43d951e25ce398d (diff) | |
download | ffmpeg-b53f9c5e6891b1f04ca08fc3f8a76ca11a3594b9.tar.gz |
avfilter/af_apsyclip: fix mixed declarations and code
-rw-r--r-- | libavfilter/af_apsyclip.c | 8 |
1 files 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; |