[FFmpeg-cvslog] avfilter/avf_showcwt: remove excessive operations

Paul B Mahol git at videolan.org
Fri Jul 28 15:00:25 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 28 13:15:00 2023 +0200| [a7a46aff463ca88ea719dc51a99a334b1aaae145] | committer: Paul B Mahol

avfilter/avf_showcwt: remove excessive operations

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7a46aff463ca88ea719dc51a99a334b1aaae145
---

 libavfilter/avf_showcwt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c
index 49c0203539..1451bfb1e0 100644
--- a/libavfilter/avf_showcwt.c
+++ b/libavfilter/avf_showcwt.c
@@ -280,9 +280,7 @@ static void frequency_band(float *frequency_band,
 
 static float remap_log(float value, float log_factor)
 {
-    float sign = (0 < value) - (value < 0);
-
-    value = logf(value * sign) * log_factor;
+    value = logf(value) * log_factor;
 
     return 1.f - av_clipf(value, 0.f, 1.f);
 }



More information about the ffmpeg-cvslog mailing list