Merge branch 'FreeBSD_9i386_fix' of https://github.com/madpilot78/calibre

This commit is contained in:
Kovid Goyal 2016-05-21 22:29:31 +05:30
commit 5b6b23d85a

View File

@ -582,9 +582,9 @@ QImage despeckle(const QImage &image) {
// overlay() {{{
static inline unsigned int BYTE_MUL(unsigned int x, unsigned int a) {
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
t &= 0x00ff00ff00ff00ff;
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ffULL) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ffULL) + 0x80008000800080ULL) >> 8;
t &= 0x00ff00ff00ff00ffULL;
return ((unsigned int)(t)) | ((unsigned int)(t >> 24));
}