summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-12-04 17:31:05 +0000
committerTor Andersson <tor@ghostscript.com>2010-12-04 17:31:05 +0000
commitc8c6acfa08a280e6eabd89eb7a2fedd95b4d2f48 (patch)
treed7a5b2b6e9bab39733e7d12653fc272d68f5435a /fitz
parent5e363d8e1a2925290cc626c4d4ab43346294c056 (diff)
downloadmupdf-c8c6acfa08a280e6eabd89eb7a2fedd95b4d2f48.tar.xz
The FZ_COMBINE2 rounding fix doesn't work. Implement it the other way (round then add).
Diffstat (limited to 'fitz')
-rw-r--r--fitz/fitz.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 37bffbc5..a2803899 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -197,7 +197,7 @@ static inline int fz_mul255(int a, int b)
/* Combine values A and C (in the same (any) range) and B and D (in the
* 0..256 range), to give a single value in the same range as A and C were. */
-#define FZ_COMBINE2(A,B,C,D) (((A)*(B)+(C)*(D))>>8)
+#define FZ_COMBINE2(A,B,C,D) (FZ_COMBINE((A), (B)) + FZ_COMBINE((C), (D)))
/* Blend SRC and DST (in the same range) together according to
* AMOUNT (in the 0...256 range). */