summaryrefslogtreecommitdiff
path: root/libavutil/mathematics.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-05-22 23:34:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-05-29 00:45:28 +0200
commit75918016ab16cd69973e818759f027e78022dee4 (patch)
tree96ae70cca0034af82757ab433f01e368a7d33d69 /libavutil/mathematics.h
parent0c78b0dd3b59384a1bebc6bcb89cbca48667cb55 (diff)
Move bessel_i0() from swresample/resample to avutil/mathematics
0th order modified bessel function of the first kind are used in multiple places, lets avoid having 3+ different implementations I picked this one as its accurate and quite fast, it can be replaced if a better one is found Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/mathematics.h')
-rw-r--r--libavutil/mathematics.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h
index 3e7b52eed6..e213bab68c 100644
--- a/libavutil/mathematics.h
+++ b/libavutil/mathematics.h
@@ -288,6 +288,10 @@ int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int
*/
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
+/**
+ * 0th order modified bessel function of the first kind.
+ */
+double av_bessel_i0(double x);
/**
* @}