2 * Zoom x1.25x2 i.e. 800x480.
6 * 2013-04-02 Move from scaler_x2.c
10 #include "simd_types.h"
11 #include "sdl_cpuid.h"
13 extern struct XM7_CPUID *pCpuID;
14 extern BOOL bFullScan;
16 static void Scaler_DrawLine(Uint32 *dst, Uint32 *src, int ww, int repeat, int pitch)
28 #if AG_BIG_ENDIAN != 1
29 const Uint32 bb = 0xff000000;
31 const Uint32 bb = 0x000000ff;
34 if(repeat <= 0) return;
37 pitch2 = pitch / sizeof(Uint32);
38 if((bFullScan) || (repeat < 2)) {
39 for(xx = 0; xx < ww; xx += 8) {
43 // 76543210 -> 7654432100
44 for(yy = 0; yy < repeat; yy++) {
45 b2p[0] = b2p[1] = r1.i[0];
49 b2p[5] = b2p[6] = r2.i[0];
59 for(xx = 0; xx < ww; xx += 8) {
63 // 76543210 -> 776655444332211000
64 // 76543210 -> 7654432100
65 for(yy = 0; yy < repeat - 1; yy++) {
66 b2p[0] = b2p[1] = r1.i[0];
70 b2p[5] = b2p[6] = r2.i[0];
76 b2p[0] = b2p[1] = b2p[2] = b2p[3] =
77 b2p[4] = b2p[5] = b2p[6] = b2p[7] =
89 void pVram2RGB_x125_Line(Uint32 *src, Uint8 *dst, int xbegin, int xend, int y, int yrep)
92 AG_Surface *Surface = GetDrawSurface();
107 if(Surface == NULL) return;
113 // if(ww > (w / 2)) ww = w / 2;
118 #if AG_BIG_ENDIAN != 1
123 // yrep = yrep * 16.0f;
127 d1 = (Uint32 *)((Uint8 *)dst + ((x * 10) / 8) * Surface->format->BytesPerPixel);
128 d2 = &src[x + y * 640];
129 Scaler_DrawLine(d1, (Uint32 *)d2, ww, yrep2, Surface->pitch);
130 // AG_SurfaceUnlock(Surface);