Fixed a partable C dithering option, fixing the red artific on shadows for some configurations

This commit is contained in:
ptitSeb 2017-07-24 12:23:16 +02:00
parent dce391583c
commit 360d19b01c

View File

@ -882,7 +882,7 @@ nextRowO:
#else #else
union uConv union uConv
{ {
ULONG val; __int64 val;
DWORD dwords[2]; DWORD dwords[2];
UWORD words[4]; UWORD words[4];
WORD iwords[4]; WORD iwords[4];
@ -891,7 +891,8 @@ nextRowO:
for (int i=0; i<pixHeight; i++) { for (int i=0; i<pixHeight; i++) {
int idx = i&3; int idx = i&3;
uConv dith; uConv dith;
dith.val = pulDitherTable[idx]; dith.dwords[0] = pulDitherTable[idx];
dith.dwords[1] = pulDitherTable[idx+1];
for (int j=0; j<4; j++) { dith.words[j] >>= mmShifter; } for (int j=0; j<4; j++) { dith.words[j] >>= mmShifter; }
dith.val &= mmMask; dith.val &= mmMask;
uConv* src = (uConv*)(pulSrc+i*pixWidth); uConv* src = (uConv*)(pulSrc+i*pixWidth);