Merge branch 'svn/trunk' r4317
This commit is contained in:
commit
bbd40ca73e
4 changed files with 37 additions and 6 deletions
|
@ -280,6 +280,11 @@ static void RENDER_Reset( void ) {
|
|||
gfx_scalew = 1;
|
||||
gfx_scaleh = 1;
|
||||
}
|
||||
|
||||
/* Don't do software scaler sizes larger than 4k */
|
||||
Bitu maxsize_current_input = SCALER_MAXLINE_WIDTH/width;
|
||||
if (render.scale.size > maxsize_current_input) render.scale.size = maxsize_current_input;
|
||||
|
||||
if ((dblh && dblw) || (render.scale.forced && !dblh && !dblw)) {
|
||||
/* Initialize always working defaults */
|
||||
if (render.scale.size == 2)
|
||||
|
@ -347,6 +352,10 @@ static void RENDER_Reset( void ) {
|
|||
#endif
|
||||
} else if (dblw) {
|
||||
simpleBlock = &ScaleNormalDw;
|
||||
if (width * simpleBlock->xscale > SCALER_MAXLINE_WIDTH) {
|
||||
// This should only happen if you pick really bad values... but might be worth adding selecting a scaler that fits
|
||||
simpleBlock = &ScaleNormal1x;
|
||||
}
|
||||
} else if (dblh) {
|
||||
simpleBlock = &ScaleNormalDh;
|
||||
} else {
|
||||
|
|
|
@ -31,9 +31,9 @@ Bitu Scaler_ChangedLineIndex;
|
|||
|
||||
static union {
|
||||
//The +1 is a at least for the normal scalers not needed. (-1 is enough)
|
||||
Bit32u b32 [SCALER_MAX_MUL_HEIGHT+1][SCALER_MAXWIDTH*SCALER_MAX_MUL_WIDTH];
|
||||
Bit16u b16 [SCALER_MAX_MUL_HEIGHT+1][SCALER_MAXWIDTH*SCALER_MAX_MUL_WIDTH];
|
||||
Bit8u b8 [SCALER_MAX_MUL_HEIGHT+1][SCALER_MAXWIDTH*SCALER_MAX_MUL_WIDTH];
|
||||
Bit32u b32 [SCALER_MAX_MUL_HEIGHT + 1][SCALER_MAXLINE_WIDTH];
|
||||
Bit16u b16 [SCALER_MAX_MUL_HEIGHT + 1][SCALER_MAXLINE_WIDTH];
|
||||
Bit8u b8 [SCALER_MAX_MUL_HEIGHT + 1][SCALER_MAXLINE_WIDTH];
|
||||
} scalerWriteCache;
|
||||
//scalerFrameCache_t scalerFrameCache;
|
||||
scalerSourceCache_t scalerSourceCache;
|
||||
|
|
|
@ -26,16 +26,25 @@
|
|||
#define SCALER_MAX_MUL_HEIGHT 3
|
||||
|
||||
#if RENDER_USE_ADVANCED_SCALERS>0
|
||||
#define SCALER_MAXWIDTH 1280
|
||||
#define SCALER_MAXWIDTH 1280
|
||||
#define SCALER_MAXHEIGHT 1024
|
||||
#define SCALER_MAXX 4096
|
||||
#else
|
||||
// reduced to save some memory
|
||||
#define SCALER_MAXWIDTH 800
|
||||
#define SCALER_MAXWIDTH 800
|
||||
#define SCALER_MAXHEIGHT 600
|
||||
#define SCALER_MAXX 2048
|
||||
#endif
|
||||
|
||||
#if (SCALER_MAX_MUL_WIDTH * SCALER_MAXWIDTH) > SCALER_MAXX
|
||||
#define SCALER_MAXLINE_WIDTH SCALER_MAXX
|
||||
#else
|
||||
#define SCALER_MAXLINE_WIDTH (SCALER_MAX_MUL_WIDTH * SCALER_MAXWIDTH)
|
||||
#endif
|
||||
|
||||
|
||||
#if RENDER_USE_ADVANCED_SCALERS>1
|
||||
#define SCALER_COMPLEXWIDTH 800
|
||||
#define SCALER_COMPLEXWIDTH 800
|
||||
#define SCALER_COMPLEXHEIGHT 600
|
||||
#endif
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
|
|||
#if (SCALERHEIGHT > 3)
|
||||
PTYPE *line3 = WC[2];
|
||||
#endif
|
||||
#if (SCALERHEIGHT > 4)
|
||||
PTYPE *line4 = WC[3];
|
||||
#endif
|
||||
#else
|
||||
#if (SCALERHEIGHT > 1)
|
||||
PTYPE *line1 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch);
|
||||
|
@ -87,6 +90,9 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
|
|||
#if (SCALERHEIGHT > 3)
|
||||
PTYPE *line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 3);
|
||||
#endif
|
||||
#if (SCALERHEIGHT > 4)
|
||||
PTYPE *line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 4);
|
||||
#endif
|
||||
#endif //defined(SCALERLINEAR)
|
||||
hadChange = 1;
|
||||
for (Bitu i = x > 32 ? 32 : x;i>0;i--,x--) {
|
||||
|
@ -104,6 +110,9 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
|
|||
#endif
|
||||
#if (SCALERHEIGHT > 3)
|
||||
line3 += SCALERWIDTH;
|
||||
#endif
|
||||
#if (SCALERHEIGHT > 4)
|
||||
line4 += SCALERWIDTH;
|
||||
#endif
|
||||
}
|
||||
#if defined(SCALERLINEAR)
|
||||
|
@ -117,6 +126,10 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
|
|||
#if (SCALERHEIGHT > 3)
|
||||
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*3,WC[2], copyLen );
|
||||
#endif
|
||||
#if (SCALERHEIGHT > 4)
|
||||
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*4,WC[3], copyLen );
|
||||
#endif
|
||||
|
||||
#endif //defined(SCALERLINEAR)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue