From 981bc0ed7f0ded72d812e97a7b0e0093a934c251 Mon Sep 17 00:00:00 2001
From: Alexander Strasser <eclipse7@gmx.net>
Date: Thu, 10 Oct 2024 22:05:37 +0200
Subject: [PATCH] Include lavu mathematics.h everywhere M_PI is used
M_PI is not mandated by the C standard.
---
gui/app/app.c | 1 +
gui/skin/skin.c | 1 +
gui/ui/main.c | 1 +
gui/ui/playbar.c | 1 +
gui/win32/gui.c | 1 +
gui/win32/skinload.c | 1 +
libaf/af_equalizer.c | 1 +
libaf/af_hrtf.c | 1 +
libaf/af_sinesuppress.c | 1 +
libaf/af_tools.c | 1 +
libaf/filter.c | 1 +
libaf/window.c | 1 +
libass/ass_parse.c | 2 ++
libass/ass_render.c | 2 ++
libmpcodecs/dec_teletext.c | 1 +
libmpcodecs/vf_geq.c | 1 +
libmpcodecs/vf_hue.c | 2 ++
libmpcodecs/vf_qp.c | 1 +
libvo/x11_common.c | 1 +
xvid_vbr.c | 1 +
20 files changed, 23 insertions(+)
diff --git a/gui/app/app.c b/gui/app/app.c
index f26058d2d..53399c3e6 100644
|
a
|
b
|
|
| 29 | 29 | #include "gui/util/misc.h" |
| 30 | 30 | |
| 31 | 31 | #include "libavutil/common.h" |
| | 32 | #include "libavutil/mathematics.h" |
| 32 | 33 | |
| 33 | 34 | /** |
| 34 | 35 | * @brief Initialize item counters. |
diff --git a/gui/skin/skin.c b/gui/skin/skin.c
index 621e13f01..1380fec0f 100644
|
a
|
b
|
|
| 40 | 40 | #include "libavutil/attributes.h" |
| 41 | 41 | #include "libavutil/avstring.h" |
| 42 | 42 | #include "libavutil/common.h" |
| | 43 | #include "libavutil/mathematics.h" |
| 43 | 44 | |
| 44 | 45 | typedef struct { |
| 45 | 46 | const char *name; |
diff --git a/gui/ui/main.c b/gui/ui/main.c
index 43f18be4d..dccbe6a82 100644
|
a
|
b
|
|
| 54 | 54 | #include "mp_core.h" |
| 55 | 55 | #include "libavutil/avstring.h" |
| 56 | 56 | #include "libavutil/common.h" |
| | 57 | #include "libavutil/mathematics.h" |
| 57 | 58 | |
| 58 | 59 | #include "actions.h" |
| 59 | 60 | |
diff --git a/gui/ui/playbar.c b/gui/ui/playbar.c
index 58931f1d6..647ca05ca 100644
|
a
|
b
|
|
| 48 | 48 | #include "libmpdemux/stheader.h" |
| 49 | 49 | #include "codec-cfg.h" |
| 50 | 50 | #include "libavutil/avstring.h" |
| | 51 | #include "libavutil/mathematics.h" |
| 51 | 52 | |
| 52 | 53 | #include "ui.h" |
| 53 | 54 | #include "actions.h" |
diff --git a/gui/win32/gui.c b/gui/win32/gui.c
index c10862e0b..e062816be 100644
|
a
|
b
|
|
| 42 | 42 | #include "stream/stream.h" |
| 43 | 43 | #include "libvo/video_out.h" |
| 44 | 44 | #include "libmpcodecs/vd.h" |
| | 45 | #include "libavutil/mathematics.h" |
| 45 | 46 | #include "gui/interface.h" |
| 46 | 47 | #include "gui/ui/actions.h" |
| 47 | 48 | #include "gui/ui/ui.h" |
diff --git a/gui/win32/skinload.c b/gui/win32/skinload.c
index 40fed386a..398b121ac 100644
|
a
|
b
|
|
| 35 | 35 | #include "libavutil/attributes.h" |
| 36 | 36 | #include "libavutil/common.h" |
| 37 | 37 | #include "libavutil/imgutils.h" |
| | 38 | #include "libavutil/mathematics.h" |
| 38 | 39 | #include "gui.h" |
| 39 | 40 | #include "gui/util/mem.h" |
| 40 | 41 | #include "gui/util/bitmap.h" |
diff --git a/libaf/af_equalizer.c b/libaf/af_equalizer.c
index 8a8f272e0..b2f687abc 100644
|
a
|
b
|
|
| 30 | 30 | #include <math.h> |
| 31 | 31 | |
| 32 | 32 | #include "libavutil/common.h" |
| | 33 | #include "libavutil/mathematics.h" |
| 33 | 34 | #include "mp_msg.h" |
| 34 | 35 | #include "af.h" |
| 35 | 36 | |
diff --git a/libaf/af_hrtf.c b/libaf/af_hrtf.c
index e47758342..90fcf50f6 100644
|
a
|
b
|
|
| 27 | 27 | |
| 28 | 28 | #include <math.h> |
| 29 | 29 | #include <libavutil/common.h> |
| | 30 | #include <libavutil/mathematics.h> |
| 30 | 31 | |
| 31 | 32 | #include "mp_msg.h" |
| 32 | 33 | #include "af.h" |
diff --git a/libaf/af_sinesuppress.c b/libaf/af_sinesuppress.c
index 6c5b2fccc..dedf6049a 100644
|
a
|
b
|
|
| 28 | 28 | #include <math.h> |
| 29 | 29 | #include <limits.h> |
| 30 | 30 | |
| | 31 | #include "libavutil/mathematics.h" |
| 31 | 32 | #include "mp_msg.h" |
| 32 | 33 | #include "af.h" |
| 33 | 34 | |
diff --git a/libaf/af_tools.c b/libaf/af_tools.c
index 8306a5003..9e1028d53 100644
|
a
|
b
|
|
| 19 | 19 | #include <math.h> |
| 20 | 20 | #include <string.h> |
| 21 | 21 | #include "libavutil/common.h" |
| | 22 | #include "libavutil/mathematics.h" |
| 22 | 23 | #include "af.h" |
| 23 | 24 | |
| 24 | 25 | /* Convert to gain value from dB. Returns AF_OK if of and AF_ERROR if |
diff --git a/libaf/filter.c b/libaf/filter.c
index c5ab03913..463e4c2f9 100644
|
a
|
b
|
|
| 22 | 22 | |
| 23 | 23 | #include <string.h> |
| 24 | 24 | #include <math.h> |
| | 25 | #include "libavutil/mathematics.h" |
| 25 | 26 | #include "dsp.h" |
| 26 | 27 | |
| 27 | 28 | /****************************************************************************** |
diff --git a/libaf/window.c b/libaf/window.c
index a970bdcbe..9cb374b09 100644
|
a
|
b
|
|
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | #include <math.h> |
| | 29 | #include "libavutil/mathematics.h" |
| 29 | 30 | #include "dsp.h" |
| 30 | 31 | |
| 31 | 32 | /* |
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index bb649715e..3ab3c2aa4 100644
|
a
|
b
|
|
| 23 | 23 | #include <string.h> |
| 24 | 24 | #include <math.h> |
| 25 | 25 | |
| | 26 | #include "libavutil/mathematics.h" |
| | 27 | |
| 26 | 28 | #include "ass_render.h" |
| 27 | 29 | #include "ass_parse.h" |
| 28 | 30 | |
diff --git a/libass/ass_render.c b/libass/ass_render.c
index e0fec919b..fb0cd7ad9 100644
|
a
|
b
|
|
| 21 | 21 | #include <assert.h> |
| 22 | 22 | #include <math.h> |
| 23 | 23 | |
| | 24 | #include "libavutil/mathematics.h" |
| | 25 | |
| 24 | 26 | #include "ass_render.h" |
| 25 | 27 | #include "ass_parse.h" |
| 26 | 28 | #include "ass_shaper.h" |
diff --git a/libmpcodecs/dec_teletext.c b/libmpcodecs/dec_teletext.c
index e3b8286a2..e46775dd1 100644
|
a
|
b
|
|
| 105 | 105 | #include "help_mp.h" |
| 106 | 106 | #include "libmpcodecs/img_format.h" |
| 107 | 107 | #include "libavutil/common.h" |
| | 108 | #include "libavutil/mathematics.h" |
| 108 | 109 | #include "input/input.h" |
| 109 | 110 | #include "osdep/timer.h" |
| 110 | 111 | |
diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c
index 6414ec3b2..477a113dc 100644
|
a
|
b
|
|
| 35 | 35 | #include "libavcodec/avcodec.h" |
| 36 | 36 | #include "libavutil/common.h" |
| 37 | 37 | #include "libavutil/eval.h" |
| | 38 | #include "libavutil/mathematics.h" |
| 38 | 39 | |
| 39 | 40 | struct vf_priv_s { |
| 40 | 41 | AVExpr * e[3]; |
diff --git a/libmpcodecs/vf_hue.c b/libmpcodecs/vf_hue.c
index 80a3bc0c3..811773f7d 100644
|
a
|
b
|
|
| 35 | 35 | #include "m_option.h" |
| 36 | 36 | #include "m_struct.h" |
| 37 | 37 | |
| | 38 | #include "libavutil/mathematics.h" |
| | 39 | |
| 38 | 40 | static struct vf_priv_s { |
| 39 | 41 | uint8_t *buf[2]; |
| 40 | 42 | float hue; |
diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c
index 31c9b5060..2a434bab0 100644
|
a
|
b
|
|
| 33 | 33 | |
| 34 | 34 | #include "libavcodec/avcodec.h" |
| 35 | 35 | #include "libavutil/eval.h" |
| | 36 | #include "libavutil/mathematics.h" |
| 36 | 37 | #include "libavutil/mem.h" |
| 37 | 38 | |
| 38 | 39 | |
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 8595f5459..f2f370d02 100644
|
a
|
b
|
|
| 27 | 27 | #include "mp_msg.h" |
| 28 | 28 | #include "mp_fifo.h" |
| 29 | 29 | #include "libavutil/common.h" |
| | 30 | #include "libavutil/mathematics.h" |
| 30 | 31 | #include "libavutil/avstring.h" |
| 31 | 32 | #include "x11_common.h" |
| 32 | 33 | |
diff --git a/xvid_vbr.c b/xvid_vbr.c
index 5af11f3bd..02a8e6cbb 100644
|
a
|
b
|
|
| 31 | 31 | #include <math.h> |
| 32 | 32 | |
| 33 | 33 | /* Local headers */ |
| | 34 | #include "libavutil/mathematics.h" |
| 34 | 35 | #include "xvid_vbr.h" |
| 35 | 36 | |
| 36 | 37 | /****************************************************************************** |