diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-11-10 22:26:25 -0500 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-11-20 08:29:56 -0500 |
commit | 7769e6602d2d32144a3e1ca3fa7b06cca5d1c988 (patch) | |
tree | bc25193edfcfe2d2eef008edc53c802ba2ab8e76 | |
parent | 2db114ec3f79cbc8e7be3841b70bf83eecd4174a (diff) | |
download | ffmpeg-7769e6602d2d32144a3e1ca3fa7b06cca5d1c988.tar.gz |
avfilter/af_dynaudnorm: use M_PI
The ad-hoc pi constant has a ludicrous number of digits that offer no
value whatsoever. M_PI is more consistent and readable across the
codebase.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-rw-r--r-- | libavfilter/af_dynaudnorm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index 8f0c2d0858..62a2653ec5 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -227,8 +227,6 @@ static int cqueue_pop(cqueue *q) return 0; } -static const double s_pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679; - static void init_gaussian_filter(DynamicAudioNormalizerContext *s) { double total_weight = 0.0; @@ -238,7 +236,7 @@ static void init_gaussian_filter(DynamicAudioNormalizerContext *s) // Pre-compute constants const int offset = s->filter_size / 2; - const double c1 = 1.0 / (sigma * sqrt(2.0 * s_pi)); + const double c1 = 1.0 / (sigma * sqrt(2.0 * M_PI)); const double c2 = 2.0 * pow(sigma, 2.0); // Compute weights |