diff options
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/libwebp/patches/godot-msvc-arm64-fpstrict-fix.patch | 18 | ||||
-rw-r--r-- | thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/thirdparty/libwebp/patches/godot-msvc-arm64-fpstrict-fix.patch b/thirdparty/libwebp/patches/godot-msvc-arm64-fpstrict-fix.patch new file mode 100644 index 0000000000..b0be515ea8 --- /dev/null +++ b/thirdparty/libwebp/patches/godot-msvc-arm64-fpstrict-fix.patch @@ -0,0 +1,18 @@ +diff --git a/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c b/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c +index 09028428ac..3184e2b80f 100644 +--- a/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c ++++ b/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c +@@ -26,7 +26,13 @@ static uint32_t kGammaToLinearTabS[GAMMA_TO_LINEAR_TAB_SIZE + 2]; + #define LINEAR_TO_GAMMA_TAB_SIZE (1 << LINEAR_TO_GAMMA_TAB_BITS) + static uint32_t kLinearToGammaTabS[LINEAR_TO_GAMMA_TAB_SIZE + 2]; + ++// -- GODOT start -- ++#if defined(_MSC_VER) ++static const double kGammaF = 2.222222222222222; ++#else + static const double kGammaF = 1. / 0.45; ++#endif ++// -- GODOT end -- + #define GAMMA_TO_LINEAR_BITS 16 + + static volatile int kGammaTablesSOk = 0; diff --git a/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c b/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c index 09028428ac..73b75e98b4 100644 --- a/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c +++ b/thirdparty/libwebp/sharpyuv/sharpyuv_gamma.c @@ -26,7 +26,13 @@ static uint32_t kGammaToLinearTabS[GAMMA_TO_LINEAR_TAB_SIZE + 2]; #define LINEAR_TO_GAMMA_TAB_SIZE (1 << LINEAR_TO_GAMMA_TAB_BITS) static uint32_t kLinearToGammaTabS[LINEAR_TO_GAMMA_TAB_SIZE + 2]; +// -- GODOT start -- +#if defined(_MSC_VER) +static const double kGammaF = 2.222222222222222; +#else static const double kGammaF = 1. / 0.45; +#endif +// -- GODOT end -- #define GAMMA_TO_LINEAR_BITS 16 static volatile int kGammaTablesSOk = 0; |