summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-02-25 04:54:26 +0000
committersfan5 <sfan5@live.de>2023-02-26 16:45:07 +0100
commited5426c351d9c5b1c605cef82b78d2af625f5d7c (patch)
tree60cc4bf7369f4a3a8ead691b38c413a789c8a77e /video/out
parent8d67e891ab3a312a9eede0fb5909019a39727eb6 (diff)
downloadmpv-ed5426c351d9c5b1c605cef82b78d2af625f5d7c.tar.bz2
mpv-ed5426c351d9c5b1c605cef82b78d2af625f5d7c.tar.xz
various: fix warning -Wimplicit-const-int-float-conversion
Diffstat (limited to 'video/out')
-rw-r--r--video/out/dither.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/dither.c b/video/out/dither.c
index cf8fbf3fd4..f8fba735d3 100644
--- a/video/out/dither.c
+++ b/video/out/dither.c
@@ -71,7 +71,7 @@ static void makegauss(struct ctx *k, unsigned int sizeb)
for (unsigned int c = 0; c < k->size2; c++)
k->gauss[c] = 0;
- double sigma = -log(1.5 / UINT64_MAX * gauss_size2) / k->gauss_radius;
+ double sigma = -log(1.5 / (double) UINT64_MAX * gauss_size2) / k->gauss_radius;
for (unsigned int gy = 0; gy <= k->gauss_radius; gy++) {
for (unsigned int gx = 0; gx <= gy; gx++) {
@@ -79,7 +79,7 @@ static void makegauss(struct ctx *k, unsigned int sizeb)
int cy = (int)gy - k->gauss_radius;
int sq = cx * cx + cy * cy;
double e = exp(-sqrt(sq) * sigma);
- uint64_t v = e / gauss_size2 * UINT64_MAX;
+ uint64_t v = e / gauss_size2 * (double) UINT64_MAX;
k->gauss[XY(k, gx, gy)] =
k->gauss[XY(k, gy, gx)] =
k->gauss[XY(k, gx, gauss_size - 1 - gy)] =