Fix truncation and conversion warnings on MSVC2010.
Change-Id: I44845e13b97753333a7c80a80ead0b352b8906b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>bb10
parent
a1a00fc862
commit
d730e07d01
|
|
@ -3895,7 +3895,7 @@ static inline __m128i mergeQuestionMarks(__m128i chunk)
|
|||
# else
|
||||
// SSE has no compare instruction for unsigned comparison.
|
||||
// The variables must be shiffted + 0x8000 to be compared
|
||||
const __m128i signedBitOffset = _mm_set1_epi16(0x8000);
|
||||
const __m128i signedBitOffset = _mm_set1_epi16(short(0x8000));
|
||||
const __m128i thresholdMask = _mm_set1_epi16(short(0xff + 0x8000));
|
||||
|
||||
const __m128i signedChunk = _mm_add_epi16(chunk, signedBitOffset);
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con
|
|||
}
|
||||
|
||||
// Mask the 4 first colors of the RGB888 vector
|
||||
const __m128i shuffleMask = _mm_set_epi8(0xff, 9, 10, 11, 0xff, 6, 7, 8, 0xff, 3, 4, 5, 0xff, 0, 1, 2);
|
||||
const __m128i shuffleMask = _mm_set_epi8(char(0xff), 9, 10, 11, char(0xff), 6, 7, 8, char(0xff), 3, 4, 5, char(0xff), 0, 1, 2);
|
||||
|
||||
// Mask the 4 last colors of a RGB888 vector with an offset of 1 (so the last 3 bytes are RGB)
|
||||
const __m128i shuffleMaskEnd = _mm_set_epi8(0xff, 13, 14, 15, 0xff, 10, 11, 12, 0xff, 7, 8, 9, 0xff, 4, 5, 6);
|
||||
const __m128i shuffleMaskEnd = _mm_set_epi8(char(0xff), 13, 14, 15, char(0xff), 10, 11, 12, char(0xff), 7, 8, 9, char(0xff), 4, 5, 6);
|
||||
|
||||
// Mask to have alpha = 0xff
|
||||
const __m128i alphaMask = _mm_set1_epi32(0xff000000);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
|
|||
if (!minusOffsetToAlignSrcOn16Bytes) {\
|
||||
/* src is aligned, usual algorithm but with aligned operations.\
|
||||
See the SSE2 version for more documentation on the algorithm itself. */\
|
||||
const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\
|
||||
const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
|
||||
for (; x < length-3; x += 4) { \
|
||||
const __m128i srcVector = _mm_load_si128((__m128i *)&src[x]); \
|
||||
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
|
||||
|
|
@ -124,7 +124,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
|
|||
__m128i srcVectorPrevLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\
|
||||
const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\
|
||||
\
|
||||
const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\
|
||||
const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
|
||||
switch (palignrOffset) {\
|
||||
case 4:\
|
||||
BLENDING_LOOP(4, length)\
|
||||
|
|
|
|||
Loading…
Reference in New Issue