Try to apply scan2x and tv2x filter to 640x200 mode

This commit is contained in:
frank-deng 2019-04-03 11:34:02 +08:00
parent f1e21acba5
commit e15e61da99
3 changed files with 66 additions and 74 deletions

View File

@ -222,40 +222,6 @@ ScalerSimpleBlock_t ScaleNormalDh = {
{ NormalDh_8_8_R, NormalDh_9_15_R , NormalDh_9_16_R , NormalDh_9_32_R }
}};
ScalerSimpleBlock_t ScaleCGA640Scanline = {
"CGAScan",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
1,2,{
{ CGA640Scanline_8_8_L, CGA640Scanline_8_15_L , CGA640Scanline_8_16_L , CGA640Scanline_8_32_L },
{ 0, CGA640Scanline_15_15_L, CGA640Scanline_15_16_L, CGA640Scanline_15_32_L},
{ 0, CGA640Scanline_16_15_L, CGA640Scanline_16_16_L, CGA640Scanline_16_32_L},
{ 0, CGA640Scanline_32_15_L, CGA640Scanline_32_16_L, CGA640Scanline_32_32_L},
{ CGA640Scanline_8_8_L, CGA640Scanline_9_15_L , CGA640Scanline_9_16_L , CGA640Scanline_9_32_L }
},{
{ CGA640Scanline_8_8_R, CGA640Scanline_8_15_R , CGA640Scanline_8_16_R , CGA640Scanline_8_32_R },
{ 0, CGA640Scanline_15_15_R, CGA640Scanline_15_16_R, CGA640Scanline_15_32_R},
{ 0, CGA640Scanline_16_15_R, CGA640Scanline_16_16_R, CGA640Scanline_16_32_R},
{ 0, CGA640Scanline_32_15_R, CGA640Scanline_32_16_R, CGA640Scanline_32_32_R},
{ CGA640Scanline_8_8_R, CGA640Scanline_9_15_R , CGA640Scanline_9_16_R , CGA640Scanline_9_32_R }
}};
ScalerSimpleBlock_t ScaleCGA640ScanlineDim = {
"CGAScanDim",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
1,2,{
{ CGA640ScanlineDim_8_8_L, CGA640ScanlineDim_8_15_L , CGA640ScanlineDim_8_16_L , CGA640ScanlineDim_8_32_L },
{ 0, CGA640ScanlineDim_15_15_L, CGA640ScanlineDim_15_16_L, CGA640ScanlineDim_15_32_L},
{ 0, CGA640ScanlineDim_16_15_L, CGA640ScanlineDim_16_16_L, CGA640ScanlineDim_16_32_L},
{ 0, CGA640ScanlineDim_32_15_L, CGA640ScanlineDim_32_16_L, CGA640ScanlineDim_32_32_L},
{ CGA640ScanlineDim_8_8_L, CGA640ScanlineDim_9_15_L , CGA640ScanlineDim_9_16_L , CGA640ScanlineDim_9_32_L }
},{
{ CGA640ScanlineDim_8_8_R, CGA640ScanlineDim_8_15_R , CGA640ScanlineDim_8_16_R , CGA640ScanlineDim_8_32_R },
{ 0, CGA640ScanlineDim_15_15_R, CGA640ScanlineDim_15_16_R, CGA640ScanlineDim_15_32_R},
{ 0, CGA640ScanlineDim_16_15_R, CGA640ScanlineDim_16_16_R, CGA640ScanlineDim_16_32_R},
{ 0, CGA640ScanlineDim_32_15_R, CGA640ScanlineDim_32_16_R, CGA640ScanlineDim_32_32_R},
{ CGA640ScanlineDim_8_8_R, CGA640ScanlineDim_9_15_R , CGA640ScanlineDim_9_16_R , CGA640ScanlineDim_9_32_R }
}};
ScalerSimpleBlock_t ScaleNormal2x = {
"Normal2x",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
@ -359,6 +325,23 @@ ScalerSimpleBlock_t ScaleTV2x = {
{ 0, TV2x_9_15_R , TV2x_9_16_R , TV2x_9_32_R }
}};
ScalerSimpleBlock_t ScaleTVDh = {
"TV2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
1,2,{
{ 0, TVDh_8_15_L , TVDh_8_16_L , TVDh_8_32_L },
{ 0, TVDh_15_15_L, TVDh_15_16_L, TVDh_15_32_L},
{ 0, TVDh_16_15_L, TVDh_16_16_L, TVDh_16_32_L},
{ 0, TVDh_32_15_L, TVDh_32_16_L, TVDh_32_32_L},
{ 0, TVDh_9_15_L , TVDh_9_16_L , TVDh_9_32_L }
},{
{ 0, TVDh_8_15_R , TVDh_8_16_R , TVDh_8_32_R },
{ 0, TVDh_15_15_R, TVDh_15_16_R, TVDh_15_32_R},
{ 0, TVDh_16_15_R, TVDh_16_16_R, TVDh_16_32_R},
{ 0, TVDh_32_15_R, TVDh_32_16_R, TVDh_32_32_R},
{ 0, TVDh_9_15_R , TVDh_9_16_R , TVDh_9_32_R }
}};
ScalerSimpleBlock_t ScaleTV3x = {
"TV3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
@ -393,6 +376,23 @@ ScalerSimpleBlock_t ScaleScan2x = {
{ 0, Scan2x_9_15_R , Scan2x_9_16_R , Scan2x_9_32_R }
}};
ScalerSimpleBlock_t ScaleScanDh = {
"Scan2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
1,2,{
{ 0, ScanDh_8_15_L , ScanDh_8_16_L , ScanDh_8_32_L },
{ 0, ScanDh_15_15_L, ScanDh_15_16_L, ScanDh_15_32_L},
{ 0, ScanDh_16_15_L, ScanDh_16_16_L, ScanDh_16_32_L},
{ 0, ScanDh_32_15_L, ScanDh_32_16_L, ScanDh_32_32_L},
{ 0, ScanDh_9_15_L , ScanDh_9_16_L , ScanDh_9_32_L }
},{
{ 0, ScanDh_8_15_R , ScanDh_8_16_R , ScanDh_8_32_R },
{ 0, ScanDh_15_15_R, ScanDh_15_16_R, ScanDh_15_32_R},
{ 0, ScanDh_16_15_R, ScanDh_16_16_R, ScanDh_16_32_R},
{ 0, ScanDh_32_15_R, ScanDh_32_16_R, ScanDh_32_32_R},
{ 0, ScanDh_9_15_R , ScanDh_9_16_R , ScanDh_9_32_R }
}};
ScalerSimpleBlock_t ScaleScan3x = {
"Scan3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,

View File

@ -115,16 +115,14 @@ extern ScalerSimpleBlock_t ScaleNormal2x;
extern ScalerSimpleBlock_t ScaleNormal3x;
extern ScalerSimpleBlock_t ScaleNormal4x;
extern ScalerSimpleBlock_t ScaleNormal5x;
extern ScalerSimpleBlock_t ScaleCGA640Scanline;
extern ScalerSimpleBlock_t ScaleCGA640ScanlineDim;
extern ScalerSimpleBlock_t ScaleCGA320Scanline;
extern ScalerSimpleBlock_t ScaleCGA320ScanlineDim;
#if RENDER_USE_ADVANCED_SCALERS>0
extern ScalerSimpleBlock_t ScaleTV2x;
extern ScalerSimpleBlock_t ScaleTVDh;
extern ScalerSimpleBlock_t ScaleTV3x;
extern ScalerSimpleBlock_t ScaleRGB2x;
extern ScalerSimpleBlock_t ScaleRGB3x;
extern ScalerSimpleBlock_t ScaleScan2x;
extern ScalerSimpleBlock_t ScaleScanDh;
extern ScalerSimpleBlock_t ScaleScan3x;
#endif
/* Complex scalers */

View File

@ -430,40 +430,6 @@ static inline void conc3d(Cache,SBPP,DBPP) (const void * s) {
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME CGA320Scanline
#define SCALERWIDTH 2
#define SCALERHEIGHT 2
#define SCALERFUNC \
{\
line0[0] = P;\
line0[1] = P;\
line1[0] = 0;\
line1[1] = 0;\
}
#include "render_simple.h"
#undef SCALERNAME
#undef SCALERWIDTH
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME CGA320ScanlineDim
#define SCALERWIDTH 2
#define SCALERHEIGHT 2
#define SCALERFUNC \
{\
Bitu halfpixel=(((P & redblueMask) * 4) >> 3) & redblueMask; \
halfpixel|=(((P & greenMask) * 4) >> 3) & greenMask; \
line0[0]=P; \
line0[1]=P; \
line1[0]=halfpixel;\
line1[1]=halfpixel;\
}
#include "render_simple.h"
#undef SCALERNAME
#undef SCALERWIDTH
#undef SCALERHEIGHT
#undef SCALERFUNC
#if (DBPP > 8)
#if RENDER_USE_ADVANCED_SCALERS>0
@ -473,8 +439,8 @@ static inline void conc3d(Cache,SBPP,DBPP) (const void * s) {
#define SCALERHEIGHT 2
#define SCALERFUNC \
{ \
Bitu halfpixel=(((P & redblueMask) * 5) >> 3) & redblueMask; \
halfpixel|=(((P & greenMask) * 5) >> 3) & greenMask; \
Bitu halfpixel=(((P & redblueMask) >> 1) & redblueMask; \
halfpixel|=(((P & greenMask) >> 1) & greenMask; \
line0[0]=halfpixel; \
line0[1]=halfpixel; \
line1[0]=P; \
@ -486,6 +452,22 @@ static inline void conc3d(Cache,SBPP,DBPP) (const void * s) {
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME TVDh
#define SCALERWIDTH 1
#define SCALERHEIGHT 2
#define SCALERFUNC \
{ \
Bitu halfpixel=(((P & redblueMask) >> 1) & redblueMask; \
halfpixel|=(((P & greenMask) >> 1) & greenMask; \
line0[0]=P; \
line1[0]=halfpixel; \
}
#include "render_simple.h"
#undef SCALERNAME
#undef SCALERWIDTH
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME TV3x
#define SCALERWIDTH 3
#define SCALERHEIGHT 3
@ -558,6 +540,18 @@ static inline void conc3d(Cache,SBPP,DBPP) (const void * s) {
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME ScanDh
#define SCALERWIDTH 1
#define SCALERHEIGHT 2
#define SCALERFUNC \
line0[0] = P; \
line1[0] = 0;
#include "render_simple.h"
#undef SCALERNAME
#undef SCALERWIDTH
#undef SCALERHEIGHT
#undef SCALERFUNC
#define SCALERNAME Scan3x
#define SCALERWIDTH 3
#define SCALERHEIGHT 3