codeium: 1.24.2 -> 1.30.2 (#363819)
[NixPkgs.git] / pkgs / games / deliantra / 0001-abs.patch
blobd116317e243a6a8cc5f0adbcef5c3cdc5b82fa83
1 --- a/utils/cfhq2xa.C
2 +++ b/utils/cfhq2xa.C
3 @@ -182,10 +182,10 @@ static inline bool Diff (pixel w1, pixel w2)
4 pixel YUV1 = RGBAtoYUVA (w1);
5 pixel YUV2 = RGBAtoYUVA (w2);
7 - return ((abs (((YUV1 >> Rshift) & Cmask) - ((YUV2 >> Rshift) & Cmask)) > trY) ||
8 - (abs (((YUV1 >> Gshift) & Cmask) - ((YUV2 >> Gshift) & Cmask)) > trU) ||
9 - (abs (((YUV1 >> Bshift) & Cmask) - ((YUV2 >> Bshift) & Cmask)) > trV) ||
10 - (abs (((YUV1 >> Ashift) & Cmask) - ((YUV2 >> Ashift) & Cmask)) > trA) );
11 + return ((abs ((signed int)((YUV1 >> Rshift) & Cmask) - (signed int)((YUV2 >> Rshift) & Cmask)) > trY) ||
12 + (abs ((signed int)((YUV1 >> Gshift) & Cmask) - (signed int)((YUV2 >> Gshift) & Cmask)) > trU) ||
13 + (abs ((signed int)((YUV1 >> Bshift) & Cmask) - (signed int)((YUV2 >> Bshift) & Cmask)) > trV) ||
14 + (abs ((signed int)((YUV1 >> Ashift) & Cmask) - (signed int)((YUV2 >> Ashift) & Cmask)) > trA) );
17 static void