summaryrefslogtreecommitdiff
path: root/ccast/dpat.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:22:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:22:51 +0200
commitbc3604d9b226ac475a104cd8ae2ca2d1d4a27984 (patch)
treee796661f371a94a50edfdc693388bb911b253dfd /ccast/dpat.c
parent509016be676f7915d635fa57144d2a441e3090ca (diff)
parentc0b89ac5bfb90835ef01573267020e42d4fe070c (diff)
Merge new upstream release
Diffstat (limited to 'ccast/dpat.c')
-rwxr-xr-x[-rw-r--r--]ccast/dpat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ccast/dpat.c b/ccast/dpat.c
index 4962ae1..106c52a 100644..100755
--- a/ccast/dpat.c
+++ b/ccast/dpat.c
@@ -392,7 +392,7 @@ double get_ccast_dith(double ipat[DISIZE][DISIZE][3], double val[3]) {
/* 32 bit pseudo random sequencer based on XOR feedback */
/* generates number between 1 and 4294967295 */
-#define PSRAND32(S) (((S) & 0x80000000) ? (((S) << 1) ^ 0xa398655d) : ((S) << 1))
+#define PSRAND32F(S) (((S) & 0x80000000) ? (((S) << 1) ^ 0xa398655d) : ((S) << 1))
/* Locate the 8 surrounding RGB verticies */
for (n = 0; n < 8; n++) {
@@ -662,7 +662,7 @@ double get_ccast_dith(double ipat[DISIZE][DISIZE][3], double val[3]) {
// dot += d_rand(-rlevel, rlevel);
/* use a deterministic random element, so that */
/* the dither patterns are repeatable. */
- randv = PSRAND32(randv);
+ randv = PSRAND32F(randv);
dot += rlevel * 2.0 * ((randv - 1)/4294967294.0 - 0.5);
if (dot <= 0.0)