diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-10-07 12:28:59 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-10-07 16:56:46 +0100 |
commit | 365ecd713d5b3f635bea91de8d15a635e6c27594 (patch) | |
tree | 8b63ebbfb45f94c71fa6c745df1dd2f5234cf2be /include | |
parent | aec11fac6a14bc4337dbb9601f070d6010413a84 (diff) | |
download | mupdf-365ecd713d5b3f635bea91de8d15a635e6c27594.tar.xz |
More SWAR optimisation in plotters.
Slightly revised blending, making use of the fact that we can
no longer overflow due to ma + masa <= 0x100.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/math.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mupdf/fitz/math.h b/include/mupdf/fitz/math.h index 5e25f871..dc29e3fb 100644 --- a/include/mupdf/fitz/math.h +++ b/include/mupdf/fitz/math.h @@ -26,7 +26,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) (FZ_COMBINE((A), (B)) + FZ_COMBINE((C), (D))) +#define FZ_COMBINE2(A,B,C,D) (((A) * (B) + (C) * (D))>>8) /* Blend SRC and DST (in the same range) together according to * AMOUNT (in the 0...256 range). */ |