diff options
| author | Max Horn | 2010-03-08 10:31:42 +0000 | 
|---|---|---|
| committer | Max Horn | 2010-03-08 10:31:42 +0000 | 
| commit | 2cdf8996f3394e3bde74eba404bdde121b41abe7 (patch) | |
| tree | 57f380925b547ee4590a45bb051cee1d014a5dff /backends/platform | |
| parent | 0fc137cdf2f04d676b196efb6bc0599efd53e84f (diff) | |
| download | scummvm-rg350-2cdf8996f3394e3bde74eba404bdde121b41abe7.tar.gz scummvm-rg350-2cdf8996f3394e3bde74eba404bdde121b41abe7.tar.bz2 scummvm-rg350-2cdf8996f3394e3bde74eba404bdde121b41abe7.zip  | |
Rename PocketPCLandscapeAspect to Normal1xAspect and move it to
graphics/scaler/aspect.cpp
svn-id: r48192
Diffstat (limited to 'backends/platform')
| -rw-r--r-- | backends/platform/wince/CEScaler.cpp | 61 | ||||
| -rw-r--r-- | backends/platform/wince/CEScaler.h | 10 | ||||
| -rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 2 | 
3 files changed, 1 insertions, 72 deletions
diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp index 8334ba7a04..cb97907497 100644 --- a/backends/platform/wince/CEScaler.cpp +++ b/backends/platform/wince/CEScaler.cpp @@ -25,67 +25,6 @@  #include "graphics/scaler/intern.h"  #include "CEScaler.h" -void PocketPCLandscapeAspect(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - -	const int redblueMasks[] = { 0x7C1F, 0xF81F }; -	const int greenMasks[] = { 0x03E0, 0x07E0 }; -	const int RBM = redblueMasks[gBitFormat == 565]; -	const int GM = greenMasks[gBitFormat == 565]; - -	int i,j; -	unsigned int p1, p2; -	const uint8 *inbuf, *instart; -	uint8 *outbuf, *outstart; - -#define RB(x) ((x & RBM)<<8) -#define G(x)  ((x & GM)<<3) - -#define P20(x) (((x)>>2)-((x)>>4)) -#define P40(x) (((x)>>1)-((x)>>3)) -#define P60(x) (((x)>>1)+((x)>>3)) -#define P80(x) (((x)>>1)+((x)>>2)+((x)>>4)) - -#define MAKEPIXEL(rb,g) ((((rb)>>8) & RBM | ((g)>>3) & GM)) - -	inbuf = (const uint8 *)srcPtr; -	outbuf = (uint8 *)dstPtr; -	height /= 5; - -	// Various casts below go via (void *) to avoid warning. This is -	// safe as these are all even addresses. -	for (i = 0; i < height; i++) { -		instart = inbuf; -		outstart = outbuf; -		for (j=0; j < width; j++) { - -			p1 = *(const uint16*)(const void *)inbuf; inbuf += srcPitch; -			*(uint16*)(void *)outbuf = p1; outbuf += dstPitch; - -			p2 = *(const uint16*)(const void *)inbuf; inbuf += srcPitch; -			*(uint16*)(void *)outbuf = MAKEPIXEL(P20(RB(p1))+P80(RB(p2)),P20(G(p1))+P80(G(p2)));  outbuf += dstPitch; - -			p1 = p2; -			p2 = *(const uint16*)(const void *)inbuf; inbuf += srcPitch; -			*(uint16*)(void *)outbuf = MAKEPIXEL(P40(RB(p1))+P60(RB(p2)),P40(G(p1))+P60(G(p2)));  outbuf += dstPitch; - -			p1 = p2; -			p2 = *(const uint16*)(const void *)inbuf; inbuf += srcPitch; -			*(uint16*)(void *)outbuf = MAKEPIXEL(P60(RB(p1))+P40(RB(p2)),P60(G(p1))+P40(G(p2)));  outbuf += dstPitch; - -			p1 = p2; -			p2 = *(const uint16*)(const void *)inbuf; -			*(uint16*)(void *)outbuf = MAKEPIXEL(P80(RB(p1))+P20(RB(p2)),P80(G(p1))+P20(G(p2)));  outbuf += dstPitch; - -			*(uint16*)(void *)outbuf = p2; - -			inbuf = inbuf - srcPitch*4 + sizeof(uint16); -			outbuf = outbuf - dstPitch*5 + sizeof(uint16); -		} -		inbuf = instart + srcPitch*5; -		outbuf = outstart + dstPitch*6; -	} -} -  #ifdef ARM  extern "C" {  	void SmartphoneLandscapeARM(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int mask); diff --git a/backends/platform/wince/CEScaler.h b/backends/platform/wince/CEScaler.h index b806630d31..a51cd5528c 100644 --- a/backends/platform/wince/CEScaler.h +++ b/backends/platform/wince/CEScaler.h @@ -32,16 +32,6 @@  #include "graphics/scaler/intern.h"  /** - * This filter (up)scales the source image vertically by a factor of 6/5. - * For example, a 320x200 image is scaled to 320x240. - * - * The main difference to the code in graphics/scaler/aspect.cpp is the - * out-of-place operation, omitting a straight blit step the sdl backend - * does. Also, tests show unaligned access errors with the stock aspect scaler. - */ -DECLARE_SCALER(PocketPCLandscapeAspect); - -/**   * This filter (down)scales the source image horizontally by a factor of 2/3   * and vertically by 7/8. For example, a 320x200 image is scaled to 213x175.   * diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 02538f879f..1b332d1942 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1166,7 +1166,7 @@ bool OSystem_WINCE3::update_scalers() {  				_scaleFactorXd = 1;  				_scaleFactorYm = 6;  				_scaleFactorYd = 5; -				_scalerProc = PocketPCLandscapeAspect; +				_scalerProc = Normal1xAspect;  				_modeFlags = 0;  				_videoMode.aspectRatioCorrection = true;  			} else {  | 
