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"
12 #include "cache_wrapper.h"
14 extern struct XM7_CPUID *pCpuID;
15 extern BOOL bFullScan;
17 extern void pVram2RGB_x125(Uint32 *src, Uint32 *dst, int x, int y, int yrep);
21 static void Scaler_DrawLine(Uint32 *dst, Uint32 *src, int ww, int repeat, int pitch)
33 #if AG_BIG_ENDIAN != 1
34 const Uint32 bb = 0xff000000;
36 const Uint32 bb = 0x000000ff;
39 if(repeat <= 0) return;
42 pitch2 = pitch / sizeof(Uint32);
43 if((bFullScan) || (repeat < 2)) {
44 for(xx = 0; xx < ww; xx += 8) {
48 // 76543210 -> 7654432100
49 for(yy = 0; yy < repeat; yy++) {
50 b2p[0] = b2p[1] = r1.i[0];
54 b2p[5] = b2p[6] = r2.i[0];
64 for(xx = 0; xx < ww; xx += 8) {
68 // 76543210 -> 776655444332211000
69 // 76543210 -> 7654432100
70 for(yy = 0; yy < repeat - 1; yy++) {
71 b2p[0] = b2p[1] = r1.i[0];
75 b2p[5] = b2p[6] = r2.i[0];
81 b2p[0] = b2p[1] = b2p[2] = b2p[3] =
82 b2p[4] = b2p[5] = b2p[6] = b2p[7] =
94 void pVram2RGB_x125_Line_SSE2(Uint32 *src, Uint8 *dst, int xbegin, int xend, int y, int yrep)
97 AG_Surface *Surface = GetDrawSurface();
112 if(Surface == NULL) return;
118 // if(ww > (w / 2)) ww = w / 2;
123 #if AG_BIG_ENDIAN != 1
128 // yrep = yrep * 16.0f;
132 d1 = (Uint32 *)((Uint8 *)dst + ((x * 10) / 8) * Surface->format->BytesPerPixel);
133 d2 = &src[x + y * 640];
134 Scaler_DrawLine(d1, (Uint32 *)d2, ww, yrep2, Surface->pitch);
135 // AG_SurfaceUnlock(Surface);
142 void pVram2RGB_x125_Line_SSE2(Uint32 *src, int xbegin, int xend, int y, int yrep)
144 pVram2RGB_x125_Line(src, dst, x, y, yrep);