[FFmpeg-cvslog] avfilter/af_surround: avoid implicit conversion to float
Paul B Mahol
git at videolan.org
Sat Feb 12 13:49:49 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb 12 12:30:51 2022 +0100| [619519ee0a899057b1e8615587df3a0d9973034d] | committer: Paul B Mahol
avfilter/af_surround: avoid implicit conversion to float
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=619519ee0a899057b1e8615587df3a0d9973034d
---
libavfilter/af_surround.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index dec9d9fc91..83edc8dd37 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -339,16 +339,16 @@ static void stereo_transform(float *x, float *y, float angle)
else
a = M_PI + 2 * (-2 * M_PI + reference) * (M_PI - fabsf(a)) * FFDIFFSIGN(a, 0) / (3 * M_PI);
- *x = av_clipf(sinf(a) * r, -1, 1);
- *y = av_clipf(cosf(a) * r, -1, 1);
+ *x = av_clipf(sinf(a) * r, -1.f, 1.f);
+ *y = av_clipf(cosf(a) * r, -1.f, 1.f);
}
static void stereo_position(float a, float p, float *x, float *y)
{
av_assert2(a >= -1.f && a <= 1.f);
av_assert2(p >= 0.f && p <= M_PI);
- *x = av_clipf(a+a*FFMAX(0, p*p-M_PI_2), -1, 1);
- *y = av_clipf(cosf(a*M_PI_2+M_PI)*cosf(M_PI_2-p/M_PI)*M_LN10+1, -1, 1);
+ *x = av_clipf(a+a*FFMAX(0, p*p-M_PI_2), -1.f, 1.f);
+ *y = av_clipf(cosf(a*M_PI_2+M_PI)*cosf(M_PI_2-p/M_PI)*M_LN10+1, -1.f, 1.f);
}
static inline void get_lfe(int output_lfe, int n, float lowcut, float highcut,
More information about the ffmpeg-cvslog
mailing list