6 #include "debugtools.h"
7 DEFAULT_DEBUG_CHANNEL(quartz);
12 #define QUARTZ_LOBYTE(pix) ((BYTE)((pix)&0xff))
13 #define QUARTZ_HIBYTE(pix) ((BYTE)((pix)>>8))
15 void VIDEOBLT_Blt_888_to_332(
16 BYTE* pDst, LONG pitchDst,
17 const BYTE* pSrc, LONG pitchSrc,
18 LONG width, LONG height,
19 const RGBQUAD* prgbSrc, LONG nClrUsed )
23 for ( y = 0; y < height; y++ )
25 for ( x = 0; x < width; x++ )
27 *pDst++ = ((pSrc[2]&0xe0) ) |
32 pDst += pitchDst - width;
33 pSrc += pitchSrc - width*3;
37 void VIDEOBLT_Blt_888_to_555(
38 BYTE* pDst, LONG pitchDst,
39 const BYTE* pSrc, LONG pitchSrc,
40 LONG width, LONG height,
41 const RGBQUAD* prgbSrc, LONG nClrUsed )
46 for ( y = 0; y < height; y++ )
48 for ( x = 0; x < width; x++ )
50 pix = ((unsigned)(pSrc[2]&0xf8)<<7) |
51 ((unsigned)(pSrc[1]&0xf8)<<2) |
52 ((unsigned)(pSrc[0]&0xf8)>>3);
53 *pDst++ = QUARTZ_LOBYTE(pix);
54 *pDst++ = QUARTZ_HIBYTE(pix);
57 pDst += pitchDst - width*2;
58 pSrc += pitchSrc - width*3;
62 void VIDEOBLT_Blt_888_to_565(
63 BYTE* pDst, LONG pitchDst,
64 const BYTE* pSrc, LONG pitchSrc,
65 LONG width, LONG height,
66 const RGBQUAD* prgbSrc, LONG nClrUsed )
71 for ( y = 0; y < height; y++ )
73 for ( x = 0; x < width; x++ )
75 pix = ((unsigned)(pSrc[2]&0xf8)<<8) |
76 ((unsigned)(pSrc[1]&0xfc)<<3) |
77 ((unsigned)(pSrc[0]&0xf8)>>3);
78 *pDst++ = QUARTZ_LOBYTE(pix);
79 *pDst++ = QUARTZ_HIBYTE(pix);
82 pDst += pitchDst - width*2;
83 pSrc += pitchSrc - width*3;
87 void VIDEOBLT_Blt_888_to_8888(
88 BYTE* pDst, LONG pitchDst,
89 const BYTE* pSrc, LONG pitchSrc,
90 LONG width, LONG height,
91 const RGBQUAD* prgbSrc, LONG nClrUsed )
95 for ( y = 0; y < height; y++ )
97 for ( x = 0; x < width; x++ )
102 *pDst++ = (BYTE)0xff;
104 pDst += pitchDst - width*4;
105 pSrc += pitchSrc - width*3;