[Scummvm-cvs-logs] CVS: scummvm/common scaler.cpp,1.37,1.38 scaler.h,1.15,1.16
Max Horn
fingolfin at users.sourceforge.net
Sun Sep 21 05:11:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv14551/common
Modified Files:
scaler.cpp scaler.h
Log Message:
added HQ3x filter
Index: scaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- scaler.cpp 16 Aug 2003 11:00:12 -0000 1.37
+++ scaler.cpp 21 Sep 2003 12:10:30 -0000 1.38
@@ -23,6 +23,8 @@
#include "stdafx.h"
#include "common/scummsys.h"
#include "common/scaler.h"
+#include "common/util.h"
+
// TODO: get rid of the colorMask etc. variables and instead use templates.
// This should give a respectable boost, since variable access (i.e. memory reads)
@@ -55,7 +57,9 @@
};
static const uint16 *dotmatrix;
[...3865 lines suppressed...]
+ r = i << 3;
+ for (j=0; j<64; j++) {
+ g = j << 2;
+ for (k=0; k<32; k++) {
+ b = k << 3;
+ Y = (r + g + b) >> 2;
+ u = 128 + ((r - b) >> 2);
+ v = 128 + ((-r + 2*g -b)>>3);
+ RGBtoYUV[ (i << 11) + (j << 5) + k ] = (Y<<16) + (u<<8) + v;
+ }
+ }
+ }
+}
+
+
+#pragma mark -
+
#define kVeryFastAndUglyAspectMode 0 // No interpolation at all, but super-fast
#define kFastAndNiceAspectMode 1 // Quite good quality with good speed
Index: scaler.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- scaler.h 16 Aug 2003 11:00:13 -0000 1.15
+++ scaler.h 21 Sep 2003 12:10:31 -0000 1.16
@@ -21,7 +21,7 @@
#ifndef COMMON_SCALER_H
#define COMMON_SCALER_H
-extern int Init_2xSaI (uint32 BitFormat);
+extern void InitScalers(uint32 BitFormat);
typedef void ScalerProc(const uint8 *srcPtr, uint32 srcPitch,
uint8 *dstPtr, uint32 dstPitch, int width, int height);
@@ -40,6 +40,7 @@
DECLARE_SCALER(Normal3x);
DECLARE_SCALER(TV2x);
DECLARE_SCALER(DotMatrix);
+DECLARE_SCALER(HQ3x);
FORCEINLINE int real2Aspect(int y) {
return y + (y + 1) / 5;
@@ -64,6 +65,7 @@
GFX_ADVMAME3X = 7,
GFX_TV2X = 8,
GFX_DOTMATRIX = 9,
+ GFX_HQ3X = 10,
GFX_BILINEAR = 12, // OpenGL backend
More information about the Scummvm-git-logs
mailing list