[Scummvm-cvs-logs] CVS: scummvm/common/scaler hq2x_i386.asm,NONE,1.1 hq3x_i386.asm,NONE,1.1 hq2x.cpp,1.10,1.11 hq3x.cpp,1.8,1.9 intern.h,1.11,1.12
Eugene Sandulenko
sev at users.sourceforge.net
Thu May 20 19:09:05 CEST 2004
Update of /cvsroot/scummvm/scummvm/common/scaler
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1090/common/scaler
Modified Files:
hq2x.cpp hq3x.cpp intern.h
Added Files:
hq2x_i386.asm hq3x_i386.asm
Log Message:
Added assembly versions of HQ2x and HQ3x scalers.
--- NEW FILE: hq2x_i386.asm ---
;hq2x filter
;16bpp output
;----------------------------------------------------------
;Copyright (C) 2003 MaxSt ( maxst at hiend3d.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
[...1902 lines suppressed...]
dd .. at flag152, .. at flag153, .. at flag154, .. at flag155, .. at flag156, .. at flag157, .. at flag158, .. at flag159
dd .. at flag160, .. at flag161, .. at flag162, .. at flag163, .. at flag164, .. at flag165, .. at flag166, .. at flag167
dd .. at flag168, .. at flag169, .. at flag170, .. at flag171, .. at flag172, .. at flag173, .. at flag174, .. at flag175
dd .. at flag176, .. at flag177, .. at flag178, .. at flag179, .. at flag180, .. at flag181, .. at flag182, .. at flag183
dd .. at flag184, .. at flag185, .. at flag186, .. at flag187, .. at flag188, .. at flag189, .. at flag190, .. at flag191
dd .. at flag192, .. at flag193, .. at flag194, .. at flag195, .. at flag196, .. at flag197, .. at flag198, .. at flag199
dd .. at flag200, .. at flag201, .. at flag202, .. at flag203, .. at flag204, .. at flag205, .. at flag206, .. at flag207
dd .. at flag208, .. at flag209, .. at flag210, .. at flag211, .. at flag212, .. at flag213, .. at flag214, .. at flag215
dd .. at flag216, .. at flag217, .. at flag218, .. at flag219, .. at flag220, .. at flag221, .. at flag222, .. at flag223
dd .. at flag224, .. at flag225, .. at flag226, .. at flag227, .. at flag228, .. at flag229, .. at flag230, .. at flag231
dd .. at flag232, .. at flag233, .. at flag234, .. at flag235, .. at flag236, .. at flag237, .. at flag238, .. at flag239
dd .. at flag240, .. at flag241, .. at flag242, .. at flag243, .. at flag244, .. at flag245, .. at flag246, .. at flag247
dd .. at flag248, .. at flag249, .. at flag250, .. at flag251, .. at flag252, .. at flag253, .. at flag254, .. at flag255
FuncTable2
dd .. at cross0, .. at cross1, .. at cross2, .. at flag0,
dd .. at cross4, .. at flag0, .. at flag0, .. at flag0,
dd .. at cross8, .. at flag0, .. at flag0, .. at flag0,
dd .. at flag0, .. at flag0, .. at flag0, .. at flag0
--- NEW FILE: hq3x_i386.asm ---
;hq3x filter
;16bpp output
;----------------------------------------------------------
;Copyright (C) 2003 MaxSt ( maxst at hiend3d.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
[...2494 lines suppressed...]
dd .. at flag152, .. at flag153, .. at flag154, .. at flag155, .. at flag156, .. at flag157, .. at flag158, .. at flag159
dd .. at flag160, .. at flag161, .. at flag162, .. at flag163, .. at flag164, .. at flag165, .. at flag166, .. at flag167
dd .. at flag168, .. at flag169, .. at flag170, .. at flag171, .. at flag172, .. at flag173, .. at flag174, .. at flag175
dd .. at flag176, .. at flag177, .. at flag178, .. at flag179, .. at flag180, .. at flag181, .. at flag182, .. at flag183
dd .. at flag184, .. at flag185, .. at flag186, .. at flag187, .. at flag188, .. at flag189, .. at flag190, .. at flag191
dd .. at flag192, .. at flag193, .. at flag194, .. at flag195, .. at flag196, .. at flag197, .. at flag198, .. at flag199
dd .. at flag200, .. at flag201, .. at flag202, .. at flag203, .. at flag204, .. at flag205, .. at flag206, .. at flag207
dd .. at flag208, .. at flag209, .. at flag210, .. at flag211, .. at flag212, .. at flag213, .. at flag214, .. at flag215
dd .. at flag216, .. at flag217, .. at flag218, .. at flag219, .. at flag220, .. at flag221, .. at flag222, .. at flag223
dd .. at flag224, .. at flag225, .. at flag226, .. at flag227, .. at flag228, .. at flag229, .. at flag230, .. at flag231
dd .. at flag232, .. at flag233, .. at flag234, .. at flag235, .. at flag236, .. at flag237, .. at flag238, .. at flag239
dd .. at flag240, .. at flag241, .. at flag242, .. at flag243, .. at flag244, .. at flag245, .. at flag246, .. at flag247
dd .. at flag248, .. at flag249, .. at flag250, .. at flag251, .. at flag252, .. at flag253, .. at flag254, .. at flag255
FuncTable2
dd .. at cross0, .. at cross1, .. at cross2, .. at flag0,
dd .. at cross4, .. at flag0, .. at flag0, .. at flag0,
dd .. at cross8, .. at flag0, .. at flag0, .. at flag0,
dd .. at flag0, .. at flag0, .. at flag0, .. at flag0
Index: hq2x.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq2x.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- hq2x.cpp 6 Jan 2004 12:45:28 -0000 1.10
+++ hq2x.cpp 21 May 2004 02:08:47 -0000 1.11
@@ -22,6 +22,25 @@
#include "common/scaler/intern.h"
+#ifdef USE_NASM
+// Assembly version of HQ2x
+
+extern "C" {
+
+#ifndef _MSC_VER
+#define hq2x_16 _hq2x_16
+#endif
+
+void hq2x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
+
+}
+
+void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+ hq2x_16(srcPtr, dstPtr, width, height, srcPitch, dstPitch);
+}
+
+#else
+
#ifdef HAS_ALTIVEC
#include <sys/sysctl.h>
@@ -120,7 +139,6 @@
#undef bitFormat
#endif
-
void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
#ifdef HAS_ALTIVEC
if (isAltiVecAvailable()) {
@@ -131,8 +149,11 @@
return;
}
#endif
+
if (gBitFormat == 565)
HQ2x_565(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
else
HQ2x_555(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
}
+
+#endif //Assembly version
Index: hq3x.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq3x.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- hq3x.cpp 6 Jan 2004 12:45:28 -0000 1.8
+++ hq3x.cpp 21 May 2004 02:08:47 -0000 1.9
@@ -22,6 +22,25 @@
#include "common/scaler/intern.h"
+#ifdef USE_NASM
+// Assembly version of HQ3x
+
+extern "C" {
+
+#ifndef _MSC_VER
+#define hq3x_16 _hq3x_16
+#endif
+
+void hq3x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
+
+}
+
+void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+ hq3x_16(srcPtr, dstPtr, width, height, srcPitch, dstPitch);
+}
+
+#else
+
#ifdef HAS_ALTIVEC
#include <sys/sysctl.h>
@@ -122,7 +141,6 @@
#undef bitFormat
#endif
-
void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
#ifdef HAS_ALTIVEC
if (isAltiVecAvailable()) {
@@ -133,8 +151,11 @@
return;
}
#endif
+
if (gBitFormat == 565)
HQ3x_565(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
else
HQ3x_555(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
}
+
+#endif
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/intern.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- intern.h 6 Jan 2004 12:45:28 -0000 1.11
+++ intern.h 21 May 2004 02:08:47 -0000 1.12
@@ -153,7 +153,7 @@
* 16bit RGB to YUV conversion table. This table is setup by InitLUT().
* Used by the hq scaler family.
*/
-extern int RGBtoYUV[65536];
+extern "C" uint RGBtoYUV[65536];
/** Auxiliary macro to simplify creating those template function wrappers. */
#define MAKE_WRAPPER(FUNC) \
More information about the Scummvm-git-logs
mailing list