* Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_adynamicequalizer: simplify calculations [not found] <20230709095209.D8A5D410705@natalya.videolan.org> @ 2023-07-09 15:24 ` James Almer 2023-07-09 15:36 ` Paul B Mahol 0 siblings, 1 reply; 2+ messages in thread From: James Almer @ 2023-07-09 15:24 UTC (permalink / raw) To: ffmpeg-devel > 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-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_adynamicequalizer: simplify calculations 2023-07-09 15:24 ` [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_adynamicequalizer: simplify calculations James Almer @ 2023-07-09 15:36 ` Paul B Mahol 0 siblings, 0 replies; 2+ messages in thread From: Paul B Mahol @ 2023-07-09 15:36 UTC (permalink / raw) To: FFmpeg development discussions and patches On Sun, Jul 9, 2023 at 5:24 PM James Almer <jamrial@gmail.com> wrote: > > 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. > > Those are of different values. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-09 15:29 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230709095209.D8A5D410705@natalya.videolan.org> 2023-07-09 15:24 ` [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_adynamicequalizer: simplify calculations James Almer 2023-07-09 15:36 ` Paul B Mahol
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git