ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com  
<https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog>> | Thu Jul  6 16:47:02 2023 
+0200| [889c2529cc6ef65bb4c4f10aa79ca7ca0070a1aa] | committer: Paul B Mahol

avfilter/af_adynamicequalizer: simplify calculations

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

  libavfilter/adynamicequalizer_template.c | 16 ++++++++++------
  libavfilter/af_adynamicequalizer.c       |  2 +-
  2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/libavfilter/adynamicequalizer_template.c 
b/libavfilter/adynamicequalizer_template.c
index 4f7d58c939..ee9f4a1d5f 100644
--- a/libavfilter/adynamicequalizer_template.c
+++ b/libavfilter/adynamicequalizer_template.c
@@ -26,6 +26,7 @@
  #undef FMIN
  #undef CLIP
  #undef SAMPLE_FORMAT
+#undef EPSILON
  #undef FABS
  #if DEPTH == 32
  #define SAMPLE_FORMAT float
@@ -39,6 +40,7 @@
  #define CLIP av_clipf
  #define FABS fabsf
  #define ftype float
+#define EPSILON (1.f / (1 << 22))
  #else
  #define SAMPLE_FORMAT double
  #define SQRT sqrt
@@ -51,6 +53,7 @@
  #define CLIP av_clipd
  #define FABS fabs
  #define ftype double
+#define EPSILON (1.0 / (1LL << 51))
  #endif

You have FLT_EPSILON and DBL_EPSILON for this.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to