]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wmadec: Kill pointless start/end computations.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 20 May 2025 20:58:13 +0000 (22:58 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 20 May 2025 20:58:13 +0000 (22:58 +0200)
Neither start nor end are used. The loop simply adds up the entries of one
line of the exponent_bands matrix.

Found by the clang analyzer.

wmadec_filter.c

index ebb83e6f9f5db05fd64c6366b1978db07620b8f8..4eabf88e5da83759448f666ce7d55dd10d9e168b 100644 (file)
@@ -208,16 +208,8 @@ static void compute_scale_factor_band_sizes(struct private_wmadec_data *pwd,
                        / ahi->sample_rate + 0.5);
                n = exponent_size;
                pos = 0;
-               for (i = 0; i < n; i++) {
-                       int start, end;
-                       start = pos;
+               for (i = 0; i < n; i++)
                        pos += pwd->exponent_bands[k][i];
-                       end = pos;
-                       if (start < pwd->high_band_start[k])
-                               start = pwd->high_band_start[k];
-                       if (end > pwd->coefs_end[k])
-                               end = pwd->coefs_end[k];
-               }
        }
 }