1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/mathematics: add missing constants

Including float variants for all of them.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2023-05-11 20:03:48 -03:00
parent 1b05d27346
commit 4d885271bb
2 changed files with 52 additions and 1 deletions

View File

@ -36,30 +36,81 @@
#ifndef M_E #ifndef M_E
#define M_E 2.7182818284590452354 /* e */ #define M_E 2.7182818284590452354 /* e */
#endif #endif
#ifndef M_Ef
#define M_Ef 2.7182818284590452354f /* e */
#endif
#ifndef M_LN2 #ifndef M_LN2
#define M_LN2 0.69314718055994530942 /* log_e 2 */ #define M_LN2 0.69314718055994530942 /* log_e 2 */
#endif #endif
#ifndef M_LN2f
#define M_LN2f 0.69314718055994530942f /* log_e 2 */
#endif
#ifndef M_LN10 #ifndef M_LN10
#define M_LN10 2.30258509299404568402 /* log_e 10 */ #define M_LN10 2.30258509299404568402 /* log_e 10 */
#endif #endif
#ifndef M_LN10f
#define M_LN10f 2.30258509299404568402f /* log_e 10 */
#endif
#ifndef M_LOG2_10 #ifndef M_LOG2_10
#define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */
#endif #endif
#ifndef M_LOG2_10f
#define M_LOG2_10f 3.32192809488736234787f /* log_2 10 */
#endif
#ifndef M_PHI #ifndef M_PHI
#define M_PHI 1.61803398874989484820 /* phi / golden ratio */ #define M_PHI 1.61803398874989484820 /* phi / golden ratio */
#endif #endif
#ifndef M_PHIf
#define M_PHIf 1.61803398874989484820f /* phi / golden ratio */
#endif
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */ #define M_PI 3.14159265358979323846 /* pi */
#endif #endif
#ifndef M_PIf
#define M_PIf 3.14159265358979323846f /* pi */
#endif
#ifndef M_PI_2 #ifndef M_PI_2
#define M_PI_2 1.57079632679489661923 /* pi/2 */ #define M_PI_2 1.57079632679489661923 /* pi/2 */
#endif #endif
#ifndef M_PI_2f
#define M_PI_2f 1.57079632679489661923f /* pi/2 */
#endif
#ifndef M_PI_4
#define M_PI_4 0.78539816339744830962 /* pi/4 */
#endif
#ifndef M_PI_4f
#define M_PI_4f 0.78539816339744830962f /* pi/4 */
#endif
#ifndef M_1_PI
#define M_1_PI 0.31830988618379067154 /* 1/pi */
#endif
#ifndef M_1_PIf
#define M_1_PIf 0.31830988618379067154f /* 1/pi */
#endif
#ifndef M_2_PI
#define M_2_PI 0.63661977236758134308 /* 2/pi */
#endif
#ifndef M_2_PIf
#define M_2_PIf 0.63661977236758134308f /* 2/pi */
#endif
#ifndef M_2_SQRTPI
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
#endif
#ifndef M_2_SQRTPIf
#define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */
#endif
#ifndef M_SQRT1_2 #ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif #endif
#ifndef M_SQRT1_2f
#define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */
#endif
#ifndef M_SQRT2 #ifndef M_SQRT2
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
#endif #endif
#ifndef M_SQRT2f
#define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */
#endif
#ifndef NAN #ifndef NAN
#define NAN av_int2float(0x7fc00000) #define NAN av_int2float(0x7fc00000)
#endif #endif

View File

@ -79,7 +79,7 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 58 #define LIBAVUTIL_VERSION_MAJOR 58
#define LIBAVUTIL_VERSION_MINOR 8 #define LIBAVUTIL_VERSION_MINOR 9
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \