Fixed HQ2x compiler warnings

This commit is contained in:
J08nY 2016-07-05 16:52:31 +02:00
parent 628b0a9375
commit 0f767fe8b9
No known key found for this signature in database
GPG key ID: 7F4A448FE68F329D

View file

@ -91,7 +91,7 @@ _FORCE_INLINE_ static bool isDifferent(
#define HQX_MIX_2(C0,C1,W0,W1) \
((((C0 & MASK_RB) * W0 + (C1 & MASK_RB) * W1) / (W0 + W1)) & MASK_RB) | \
((((C0 & MASK_G) * W0 + (C1 & MASK_G) * W1) / (W0 + W1)) & MASK_G) | \
(((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1) / (W0 + W1)) << 8) & MASK_A
((((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1) / (W0 + W1)) << 8) & MASK_A)
/**
* @brief Mixes three colors using the given weights.
@ -99,7 +99,7 @@ _FORCE_INLINE_ static bool isDifferent(
#define HQX_MIX_3(C0,C1,C2,W0,W1,W2) \
((((C0 & MASK_RB) * W0 + (C1 & MASK_RB) * W1 + (C2 & MASK_RB) * W2) / (W0 + W1 + W2)) & MASK_RB) | \
((((C0 & MASK_G) * W0 + (C1 & MASK_G) * W1 + (C2 & MASK_G) * W2) / (W0 + W1 + W2)) & MASK_G) | \
(((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1 + ((C2 & MASK_A) >> 8) * W2) / (W0 + W1 + W2)) << 8) & MASK_A
((((((C0 & MASK_A) >> 8) * W0 + ((C1 & MASK_A) >> 8) * W1 + ((C2 & MASK_A) >> 8) * W2) / (W0 + W1 + W2)) << 8) & MASK_A)
#define MIX_00_4 *output = w[4];