RCS file: /cvsroot/scummvm/scummvm/common/scaler.cpp,v
retrieving revision 1.49
diff -u -r1.49 scaler.cpp
|
|
|
233 | 233 | } |
234 | 234 | |
235 | 235 | template<int bitFormat> |
236 | | void TV2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, |
| 236 | void doTV2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, |
237 | 237 | int width, int height) { |
238 | 238 | const uint32 nextlineSrc = srcPitch / sizeof(uint16); |
239 | 239 | const uint16 *p = (const uint16 *)srcPtr; |
RCS file: /cvsroot/scummvm/scummvm/common/scaler/2xsai.cpp,v
retrieving revision 1.2
diff -u -r1.2 2xsai.cpp
|
|
|
62 | 62 | #define Q_INTERPOLATE Q_INTERPOLATE<bitFormat> |
63 | 63 | |
64 | 64 | template<int bitFormat> |
65 | | void Super2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
| 65 | void doSuper2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
66 | 66 | const uint16 *bP; |
67 | 67 | uint16 *dP; |
68 | 68 | const uint32 nextlineSrc = srcPitch >> 1; |
… |
… |
|
171 | 171 | MAKE_WRAPPER(Super2xSaI) |
172 | 172 | |
173 | 173 | template<int bitFormat> |
174 | | void SuperEagle(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
| 174 | void doSuperEagle(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
175 | 175 | const uint16 *bP; |
176 | 176 | uint16 *dP; |
177 | 177 | const uint32 nextlineSrc = srcPitch >> 1; |
… |
… |
|
282 | 282 | MAKE_WRAPPER(SuperEagle) |
283 | 283 | |
284 | 284 | template<int bitFormat> |
285 | | void _2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
| 285 | void do_2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
286 | 286 | const uint16 *bP; |
287 | 287 | uint16 *dP; |
288 | 288 | const uint32 nextlineSrc = srcPitch >> 1; |
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq2x.cpp,v
retrieving revision 1.4
diff -u -r1.4 hq2x.cpp
|
|
|
82 | 82 | * Adapted for ScummVM to 16 bit output and optimized by Max Horn. |
83 | 83 | */ |
84 | 84 | template<int bitFormat> |
85 | | void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
| 85 | void doHQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
86 | 86 | int w[10]; |
87 | 87 | |
88 | 88 | const uint32 nextlineSrc = srcPitch / sizeof(uint16); |
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq3x.cpp,v
retrieving revision 1.3
diff -u -r1.3 hq3x.cpp
|
|
|
85 | 85 | * Adapted for ScummVM to 16 bit output and optimized by Max Horn. |
86 | 86 | */ |
87 | 87 | template<int bitFormat> |
88 | | void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
| 88 | void doHQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { |
89 | 89 | int w[10]; |
90 | 90 | |
91 | 91 | const uint32 nextlineSrc = srcPitch / sizeof(uint16); |
RCS file: /cvsroot/scummvm/scummvm/common/scaler/intern.h,v
retrieving revision 1.3
diff -u -r1.3 intern.h
|
|
|
30 | 30 | #include "common/util.h" |
31 | 31 | |
32 | 32 | |
33 | | template<int bitFormat> |
34 | | struct ColorMasks { |
| 33 | namespace ColorMasks_565 { |
| 34 | const int highBits = 0xF7DEF7DE; |
| 35 | const int lowBits = 0x08210821; |
| 36 | const int qhighBits = 0xE79CE79C; |
| 37 | const int qlowBits = 0x18631863; |
| 38 | const int redblueMask = 0xF81F; |
| 39 | const int greenMask = 0x07E0; |
35 | 40 | }; |
36 | 41 | |
37 | | struct ColorMasks<565> { |
38 | | static const int highBits = 0xF7DEF7DE; |
39 | | static const int lowBits = 0x08210821; |
40 | | static const int qhighBits = 0xE79CE79C; |
41 | | static const int qlowBits = 0x18631863; |
42 | | static const int redblueMask = 0xF81F; |
43 | | static const int greenMask = 0x07E0; |
| 42 | namespace ColorMasks_555 { |
| 43 | const int highBits = 0x04210421; |
| 44 | const int lowBits = 0x04210421; |
| 45 | const int qhighBits = 0x739C739C; |
| 46 | const int qlowBits = 0x0C630C63; |
| 47 | const int redblueMask = 0x7C1F; |
| 48 | const int greenMask = 0x03E0; |
44 | 49 | }; |
45 | 50 | |
46 | | struct ColorMasks<555> { |
47 | | static const int highBits = 0x04210421; |
48 | | static const int lowBits = 0x04210421; |
49 | | static const int qhighBits = 0x739C739C; |
50 | | static const int qlowBits = 0x0C630C63; |
51 | | static const int redblueMask = 0x7C1F; |
52 | | static const int greenMask = 0x03E0; |
53 | | }; |
| 51 | #define ColorMasks(bitFormat,member) (((bitFormat) == 555) ? ColorMasks_555::member : ColorMasks_565::member) |
54 | 52 | |
55 | | #define highBits ColorMasks<bitFormat>::highBits |
56 | | #define lowBits ColorMasks<bitFormat>::lowBits |
57 | | #define qhighBits ColorMasks<bitFormat>::qhighBits |
58 | | #define qlowBits ColorMasks<bitFormat>::qlowBits |
59 | | #define redblueMask ColorMasks<bitFormat>::redblueMask |
60 | | #define greenMask ColorMasks<bitFormat>::greenMask |
| 53 | #define highBits ColorMasks(bitFormat,highBits) |
| 54 | #define lowBits ColorMasks(bitFormat,lowBits) |
| 55 | #define qhighBits ColorMasks(bitFormat,qhighBits) |
| 56 | #define qlowBits ColorMasks(bitFormat,qlowBits) |
| 57 | #define redblueMask ColorMasks(bitFormat,redblueMask) |
| 58 | #define greenMask ColorMasks(bitFormat,greenMask) |
61 | 59 | |
62 | 60 | |
63 | 61 | extern int gBitFormat; |
… |
… |
|
129 | 127 | #define MAKE_WRAPPER(FUNC) \ |
130 | 128 | void FUNC(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { \ |
131 | 129 | if (gBitFormat == 565) \ |
132 | | FUNC<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \ |
| 130 | do ## FUNC<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \ |
133 | 131 | else \ |
134 | | FUNC<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \ |
| 132 | do ## FUNC<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \ |
135 | 133 | } |
136 | 134 | |
137 | 135 | #endif |