diff --git a/src/filters/filters.hpp b/src/filters/filters.hpp index 15f2faaa..6f74bfef 100644 --- a/src/filters/filters.hpp +++ b/src/filters/filters.hpp @@ -4,6 +4,10 @@ #include "interframe.hpp" +// most 16-bit filters require space in src rounded up to u32 +// those that take delta take 1 src line of pixels, rounded up to u32 size +// initial value appears to be all-0xff + //pixel.cpp void Pixelate(u8 *srcPtr, u32 srcPitch, u8 *deltaPtr, u8 *dstPtr, u32 dstPitch, int width, int height); void Pixelate32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, u8 *dstPtr, u32 dstPitch, int width, int height); @@ -22,6 +26,7 @@ void ScanlinesTV32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, u8 *dstPtr, u3 // the simple ones could greatly benefit from correct usage of preprocessor.. // in any case, they are worthless, since all renderers do "simple" or // better by default +int Init_2xSaI(u32 BitFormat); void Simple2x16(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, u8 *dstPtr, u32 dstPitch, int width, int height); void Simple2x32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, @@ -48,6 +53,35 @@ void BilinearPlus(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, void BilinearPlus32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, u8 *dstPtr, u32 dstPitch, int width, int height); +//admame.cpp +void AdMame2x(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, + u8 *dstPtr, u32 dstPitch, int width, int height); +void AdMame2x32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, + u8 *dstPtr, u32 dstPitch, int width, int height); + +//2xSal.cpp +// next 3*2 use Init_2xSaI(555|565) and do not take into account +int Init_2xSaI(u32 BitFormat); +// endianness or bit shift variables in init. +// next 4*2 may be MMX-accelerated +void _2xSaI (u8 *srcPtr, u32 srcPitch, u8 *deltaPtr, + u8 *dstPtr, u32 dstPitch, int width, int height); +void _2xSaI32 (u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, + u8 *dstPtr, u32 dstPitch, int width, int height); +//This one was commented out in other source files +void Scale_2xSaI (u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, + u8 *dstPtr, u32 dstPitch, + u32 dstWidth, u32 dstHeight, int width, int height); +void Super2xSaI (u8 *srcPtr, u32 srcPitch, + u8 *deltaPtr, u8 *dstPtr, u32 dstPitch, + int width, int height); +void Super2xSaI32 (u8 *srcPtr, u32 srcPitch, + u8 * /* deltaPtr */, u8 *dstPtr, u32 dstPitch, + int width, int height); +void SuperEagle (u8 *srcPtr, u32 srcPitch, u8 *deltaPtr, + u8 *dstPtr, u32 dstPitch, int width, int height); +void SuperEagle32 (u8 *srcPtr, u32 srcPitch, u8 *deltaPtr, + u8 *dstPtr, u32 dstPitch, int width, int height); //hq2x.cpp //These require calling hq2x_init first and whenever bpp changes /*static void hq2x_16_def(u16* dst0, u16* dst1, const u16* src0, const u16* src1, const u16* src2, unsigned count); @@ -64,4 +98,28 @@ void lq2x(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, void lq2x32(u8 *srcPtr, u32 srcPitch, u8 * /* deltaPtr */, u8 *dstPtr, u32 dstPitch, int width, int height); +//hq/asm/hq3x32.cpp +//16 bit input, see below for 32 bit input +// note: 16-bit input for asm version only! +void hq3x32(unsigned char * pIn, unsigned int srcPitch, + unsigned char *, + unsigned char * pOut, unsigned int dstPitch, + int Xres, int Yres); +void hq4x32(unsigned char * pIn, unsigned int srcPitch, + unsigned char *, + unsigned char * pOut, unsigned int dstPitch, + int Xres, int Yres); +void hq3x16(unsigned char * pIn, unsigned int srcPitch, + unsigned char *, + unsigned char * pOut, unsigned int dstPitch, + int Xres, int Yres); +void hq4x16(unsigned char * pIn, unsigned int srcPitch, + unsigned char *, + unsigned char * pOut, unsigned int dstPitch, + int Xres, int Yres); +// this takes 32-bit input +// (by converting to 16-bit first in asm version +void hq3x32_32(unsigned char *pIn, unsigned int srcPitch, unsigned char *, unsigned char *pOut, unsigned int dstPitch, int Xres, int Yres); +void hq4x32_32(unsigned char *pIn, unsigned int srcPitch, unsigned char *, unsigned char *pOut, unsigned int dstPitch, int Xres, int Yres); + #endif //FILTERS_FILTERS_HPP diff --git a/src/gtk/filters.cpp b/src/gtk/filters.cpp index a092b19d..f2f546d8 100644 --- a/src/gtk/filters.cpp +++ b/src/gtk/filters.cpp @@ -18,20 +18,6 @@ #include "filters.h" #include "intl.h" -#include "../filters/filters.hpp" - -void _2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int); -void _2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int); -void Super2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int); -void Super2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int); -void SuperEagle (u8 *, u32, u8 *, u8 *, u32, int, int); -void SuperEagle32 (u8 *, u32, u8 *, u8 *, u32, int, int); -void AdMame2x (u8 *, u32, u8 *, u8 *, u32, int, int); -void AdMame2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); -void hq2x (u8 *, u32, u8 *, u8 *, u32, int, int); -void hq2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); -void lq2x (u8 *, u32, u8 *, u8 *, u32, int, int); -void lq2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); namespace VBA { diff --git a/src/gtk/filters.h b/src/gtk/filters.h index bc4dea60..b5ec4ff8 100644 --- a/src/gtk/filters.h +++ b/src/gtk/filters.h @@ -21,8 +21,7 @@ #define __VBA_FILTERS_H__ #include "../System.h" - -int Init_2xSaI(u32); +#include "../filters/filters.hpp" namespace VBA { diff --git a/src/sdl/filters.cpp b/src/sdl/filters.cpp index 7ba760f5..9955770d 100644 --- a/src/sdl/filters.cpp +++ b/src/sdl/filters.cpp @@ -24,26 +24,12 @@ // Screen filters // -extern int Init_2xSaI(u32); -extern void hq2x_init(unsigned); extern bool sdlStretchInit(int colorDepth, int sizeMultiplier, int srcWidth); extern void sdlStretch1x(u8*,u32,u8*,u8*,u32,int,int); extern void sdlStretch2x(u8*,u32,u8*,u8*,u32,int,int); extern void sdlStretch3x(u8*,u32,u8*,u8*,u32,int,int); extern void sdlStretch4x(u8*,u32,u8*,u8*,u32,int,int); -extern void _2xSaI(u8*,u32,u8*,u8*,u32,int,int); -extern void _2xSaI32(u8*,u32,u8*,u8*,u32,int,int); -extern void Super2xSaI(u8*,u32,u8*,u8*,u32,int,int); -extern void Super2xSaI32(u8*,u32,u8*,u8*,u32,int,int); -extern void SuperEagle(u8*,u32,u8*,u8*,u32,int,int); -extern void SuperEagle32(u8*,u32,u8*,u8*,u32,int,int); -extern void AdMame2x(u8*,u32,u8*,u8*,u32,int,int); -extern void AdMame2x32(u8*,u32,u8*,u8*,u32,int,int); -extern void hq3x16(u8*,u32,u8*,u8*,u32,int,int); -extern void hq4x16(u8*,u32,u8*,u8*,u32,int,int); -extern void hq3x32_32(u8*,u32,u8*,u8*,u32,int,int); -extern void hq4x32_32(u8*,u32,u8*,u8*,u32,int,int); struct FilterDesc { char name[30]; diff --git a/src/wx/filters.h b/src/wx/filters.h deleted file mode 100644 index 86935c54..00000000 --- a/src/wx/filters.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef FILTERS_H -#define FILTERS_H - -// FIXME: these should be in a system header included by all users and all -// files which define these functions -// most 16-bit filters require space in src rounded up to u32 -// those that take delta take 1 src line of pixels, rounded up to u32 size -// initial value appears to be all-0xff - -#include "../filters/filters.hpp" - -// next 3*2 use Init_2xSaI(555|565) and do not take into account -int Init_2xSaI(u32 BitFormat); -// endianness or bit shift variables in init. -// next 4*2 may be MMX-accelerated -void _2xSaI32(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -void _2xSaI(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -// void Scale_2xSaI(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -void Super2xSaI32(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -void Super2xSaI(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -void SuperEagle32(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -void SuperEagle(u8 *src, u32 spitch, u8 *delta, u8 *dst, u32 dstp, int w, int h); -void AdMame2x32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -void AdMame2x(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); - -// note: 16-bit input for asm version only! -void hq3x32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -// this takes 32-bit input -// (by converting to 16-bit first in asm version) -void hq3x32_32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -void hq3x16(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -// note: 16-bit input for asm version only! -void hq4x32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -// this takes 32-bit input -// (by converting to 16-bit first in asm version) -void hq4x32_32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); -void hq4x16(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h); - -#endif /* FILTERS_H */ diff --git a/src/wx/wxvbam.h b/src/wx/wxvbam.h index f6404e20..942887d0 100644 --- a/src/wx/wxvbam.h +++ b/src/wx/wxvbam.h @@ -561,6 +561,6 @@ extern int joypress[4], autofire; #define KEYM_MOTION_LEFT (1<<17) #define KEYM_MOTION_RIGHT (1<<18) -#include "filters.h" +#include "../filters/filters.hpp" #endif /* WX_WXVBAM_H */