| 1 |
/* |
| 2 |
* Copyright (C) 2002-2010 The DOSBox Team |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation; either version 2 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 |
*/ |
| 18 |
|
| 19 |
|
| 20 |
//TODO: |
| 21 |
//Maybe just do the cache checking back into the simple scalers so they can |
| 22 |
//just handle it all in one go, but this seems to work well enough for now |
| 23 |
|
| 24 |
#include "dosbox.h" |
| 25 |
#include "render.h" |
| 26 |
#include <string.h> |
| 27 |
|
| 28 |
Bit8u Scaler_Aspect[SCALER_MAXHEIGHT]; |
| 29 |
Bit16u Scaler_ChangedLines[SCALER_MAXHEIGHT]; |
| 30 |
Bitu Scaler_ChangedLineIndex; |
| 31 |
|
| 32 |
static union { |
| 33 |
Bit32u b32 [4][SCALER_MAXWIDTH*3]; |
| 34 |
Bit16u b16 [4][SCALER_MAXWIDTH*3]; |
| 35 |
Bit8u b8 [4][SCALER_MAXWIDTH*3]; |
| 36 |
} scalerWriteCache; |
| 37 |
//scalerFrameCache_t scalerFrameCache; |
| 38 |
scalerSourceCache_t scalerSourceCache; |
| 39 |
#if RENDER_USE_ADVANCED_SCALERS>1 |
| 40 |
scalerChangeCache_t scalerChangeCache; |
| 41 |
#endif |
| 42 |
|
| 43 |
#define _conc2(A,B) A ## B |
| 44 |
#define _conc3(A,B,C) A ## B ## C |
| 45 |
#define _conc4(A,B,C,D) A ## B ## C ## D |
| 46 |
#define _conc5(A,B,C,D,E) A ## B ## C ## D ## E |
| 47 |
#define _conc7(A,B,C,D,E,F,G) A ## B ## C ## D ## E ## F ## G |
| 48 |
|
| 49 |
#define conc2(A,B) _conc2(A,B) |
| 50 |
#define conc3(A,B,C) _conc3(A,B,C) |
| 51 |
#define conc4(A,B,C,D) _conc4(A,B,C,D) |
| 52 |
#define conc2d(A,B) _conc3(A,_,B) |
| 53 |
#define conc3d(A,B,C) _conc5(A,_,B,_,C) |
| 54 |
#define conc4d(A,B,C,D) _conc7(A,_,B,_,C,_,D) |
| 55 |
|
| 56 |
static INLINE void BituMove( void *_dst, const void * _src, Bitu size) { |
| 57 |
Bitu * dst=(Bitu *)(_dst); |
| 58 |
const Bitu * src=(Bitu *)(_src); |
| 59 |
size/=sizeof(Bitu); |
| 60 |
for (Bitu x=0; x<size;x++) |
| 61 |
dst[x] = src[x]; |
| 62 |
} |
| 63 |
|
| 64 |
static INLINE void ScalerAddLines( Bitu changed, Bitu count ) { |
| 65 |
if ((Scaler_ChangedLineIndex & 1) == changed ) { |
| 66 |
Scaler_ChangedLines[Scaler_ChangedLineIndex] += count; |
| 67 |
} else { |
| 68 |
Scaler_ChangedLines[++Scaler_ChangedLineIndex] = count; |
| 69 |
} |
| 70 |
render.scale.outWrite += render.scale.outPitch * count; |
| 71 |
} |
| 72 |
|
| 73 |
|
| 74 |
#define BituMove2(_DST,_SRC,_SIZE) \ |
| 75 |
{ \ |
| 76 |
Bitu bsize=(_SIZE)/sizeof(Bitu); \ |
| 77 |
Bitu * bdst=(Bitu *)(_DST); \ |
| 78 |
Bitu * bsrc=(Bitu *)(_SRC); \ |
| 79 |
while (bsize--) *bdst++=*bsrc++; \ |
| 80 |
} |
| 81 |
|
| 82 |
#define interp_w2(P0,P1,W0,W1) \ |
| 83 |
((((P0&redblueMask)*W0+(P1&redblueMask)*W1)/(W0+W1)) & redblueMask) | \ |
| 84 |
((((P0& greenMask)*W0+(P1& greenMask)*W1)/(W0+W1)) & greenMask) |
| 85 |
#define interp_w3(P0,P1,P2,W0,W1,W2) \ |
| 86 |
((((P0&redblueMask)*W0+(P1&redblueMask)*W1+(P2&redblueMask)*W2)/(W0+W1+W2)) & redblueMask) | \ |
| 87 |
((((P0& greenMask)*W0+(P1& greenMask)*W1+(P2& greenMask)*W2)/(W0+W1+W2)) & greenMask) |
| 88 |
#define interp_w4(P0,P1,P2,P3,W0,W1,W2,W3) \ |
| 89 |
((((P0&redblueMask)*W0+(P1&redblueMask)*W1+(P2&redblueMask)*W2+(P3&redblueMask)*W3)/(W0+W1+W2+W3)) & redblueMask) | \ |
| 90 |
((((P0& greenMask)*W0+(P1& greenMask)*W1+(P2& greenMask)*W2+(P3& greenMask)*W3)/(W0+W1+W2+W3)) & greenMask) |
| 91 |
|
| 92 |
|
| 93 |
#define CC scalerChangeCache |
| 94 |
|
| 95 |
/* Include the different rendering routines */ |
| 96 |
#define SBPP 8 |
| 97 |
#define DBPP 8 |
| 98 |
#include "render_templates.h" |
| 99 |
#undef DBPP |
| 100 |
#define DBPP 15 |
| 101 |
#include "render_templates.h" |
| 102 |
#undef DBPP |
| 103 |
#define DBPP 16 |
| 104 |
#include "render_templates.h" |
| 105 |
#undef DBPP |
| 106 |
#define DBPP 32 |
| 107 |
#include "render_templates.h" |
| 108 |
#undef SBPP |
| 109 |
#undef DBPP |
| 110 |
|
| 111 |
/* SBPP 9 is a special case with palette check support */ |
| 112 |
#define SBPP 9 |
| 113 |
#define DBPP 8 |
| 114 |
#include "render_templates.h" |
| 115 |
#undef DBPP |
| 116 |
#define DBPP 15 |
| 117 |
#include "render_templates.h" |
| 118 |
#undef DBPP |
| 119 |
#define DBPP 16 |
| 120 |
#include "render_templates.h" |
| 121 |
#undef DBPP |
| 122 |
#define DBPP 32 |
| 123 |
#include "render_templates.h" |
| 124 |
#undef SBPP |
| 125 |
#undef DBPP |
| 126 |
|
| 127 |
#define SBPP 15 |
| 128 |
#define DBPP 15 |
| 129 |
#include "render_templates.h" |
| 130 |
#undef DBPP |
| 131 |
#define DBPP 16 |
| 132 |
#include "render_templates.h" |
| 133 |
#undef DBPP |
| 134 |
#define DBPP 32 |
| 135 |
#include "render_templates.h" |
| 136 |
#undef SBPP |
| 137 |
#undef DBPP |
| 138 |
|
| 139 |
#define SBPP 16 |
| 140 |
#define DBPP 15 |
| 141 |
#include "render_templates.h" |
| 142 |
#undef DBPP |
| 143 |
#define DBPP 16 |
| 144 |
#include "render_templates.h" |
| 145 |
#undef DBPP |
| 146 |
#define DBPP 32 |
| 147 |
#include "render_templates.h" |
| 148 |
#undef SBPP |
| 149 |
#undef DBPP |
| 150 |
|
| 151 |
#define SBPP 32 |
| 152 |
#define DBPP 15 |
| 153 |
#include "render_templates.h" |
| 154 |
#undef DBPP |
| 155 |
#define DBPP 16 |
| 156 |
#include "render_templates.h" |
| 157 |
#undef DBPP |
| 158 |
#define DBPP 32 |
| 159 |
#include "render_templates.h" |
| 160 |
#undef SBPP |
| 161 |
#undef DBPP |
| 162 |
|
| 163 |
|
| 164 |
#if RENDER_USE_ADVANCED_SCALERS>1 |
| 165 |
ScalerLineBlock_t ScalerCache = { |
| 166 |
{ Cache_8_8, Cache_8_15 , Cache_8_16 , Cache_8_32 }, |
| 167 |
{ 0, Cache_15_15, Cache_15_16, Cache_15_32}, |
| 168 |
{ 0, Cache_16_15, Cache_16_16, Cache_16_32}, |
| 169 |
{ 0, Cache_32_15, Cache_32_16, Cache_32_32}, |
| 170 |
{ Cache_8_8, Cache_9_15 , Cache_9_16 , Cache_9_32 } |
| 171 |
}; |
| 172 |
#endif |
| 173 |
|
| 174 |
ScalerSimpleBlock_t ScaleNormal1x = { |
| 175 |
"Normal", |
| 176 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 177 |
1,1,{ |
| 178 |
{ Normal1x_8_8_L, Normal1x_8_15_L , Normal1x_8_16_L , Normal1x_8_32_L }, |
| 179 |
{ 0, Normal1x_15_15_L, Normal1x_15_16_L, Normal1x_15_32_L}, |
| 180 |
{ 0, Normal1x_16_15_L, Normal1x_16_16_L, Normal1x_16_32_L}, |
| 181 |
{ 0, Normal1x_32_15_L, Normal1x_32_16_L, Normal1x_32_32_L}, |
| 182 |
{ Normal1x_8_8_L, Normal1x_9_15_L , Normal1x_9_16_L , Normal1x_9_32_L } |
| 183 |
},{ |
| 184 |
{ Normal1x_8_8_R, Normal1x_8_15_R , Normal1x_8_16_R , Normal1x_8_32_R }, |
| 185 |
{ 0, Normal1x_15_15_R, Normal1x_15_16_R, Normal1x_15_32_R}, |
| 186 |
{ 0, Normal1x_16_15_R, Normal1x_16_16_R, Normal1x_16_32_R}, |
| 187 |
{ 0, Normal1x_32_15_R, Normal1x_32_16_R, Normal1x_32_32_R}, |
| 188 |
{ Normal1x_8_8_R, Normal1x_9_15_R , Normal1x_9_16_R , Normal1x_9_32_R } |
| 189 |
}}; |
| 190 |
|
| 191 |
ScalerSimpleBlock_t ScaleNormalDw = { |
| 192 |
"Normal", |
| 193 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 194 |
2,1,{ |
| 195 |
{ NormalDw_8_8_L, NormalDw_8_15_L , NormalDw_8_16_L , NormalDw_8_32_L }, |
| 196 |
{ 0, NormalDw_15_15_L, NormalDw_15_16_L, NormalDw_15_32_L}, |
| 197 |
{ 0, NormalDw_16_15_L, NormalDw_16_16_L, NormalDw_16_32_L}, |
| 198 |
{ 0, NormalDw_32_15_L, NormalDw_32_16_L, NormalDw_32_32_L}, |
| 199 |
{ NormalDw_8_8_L, NormalDw_9_15_L , NormalDw_9_16_L , NormalDw_9_32_L } |
| 200 |
},{ |
| 201 |
{ NormalDw_8_8_R, NormalDw_8_15_R , NormalDw_8_16_R , NormalDw_8_32_R }, |
| 202 |
{ 0, NormalDw_15_15_R, NormalDw_15_16_R, NormalDw_15_32_R}, |
| 203 |
{ 0, NormalDw_16_15_R, NormalDw_16_16_R, NormalDw_16_32_R}, |
| 204 |
{ 0, NormalDw_32_15_R, NormalDw_32_16_R, NormalDw_32_32_R}, |
| 205 |
{ NormalDw_8_8_R, NormalDw_9_15_R , NormalDw_9_16_R , NormalDw_9_32_R } |
| 206 |
}}; |
| 207 |
|
| 208 |
ScalerSimpleBlock_t ScaleNormalDh = { |
| 209 |
"Normal", |
| 210 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 211 |
1,2,{ |
| 212 |
{ NormalDh_8_8_L, NormalDh_8_15_L , NormalDh_8_16_L , NormalDh_8_32_L }, |
| 213 |
{ 0, NormalDh_15_15_L, NormalDh_15_16_L, NormalDh_15_32_L}, |
| 214 |
{ 0, NormalDh_16_15_L, NormalDh_16_16_L, NormalDh_16_32_L}, |
| 215 |
{ 0, NormalDh_32_15_L, NormalDh_32_16_L, NormalDh_32_32_L}, |
| 216 |
{ NormalDh_8_8_L, NormalDh_9_15_L , NormalDh_9_16_L , NormalDh_9_32_L } |
| 217 |
},{ |
| 218 |
{ NormalDh_8_8_R, NormalDh_8_15_R , NormalDh_8_16_R , NormalDh_8_32_R }, |
| 219 |
{ 0, NormalDh_15_15_R, NormalDh_15_16_R, NormalDh_15_32_R}, |
| 220 |
{ 0, NormalDh_16_15_R, NormalDh_16_16_R, NormalDh_16_32_R}, |
| 221 |
{ 0, NormalDh_32_15_R, NormalDh_32_16_R, NormalDh_32_32_R}, |
| 222 |
{ NormalDh_8_8_R, NormalDh_9_15_R , NormalDh_9_16_R , NormalDh_9_32_R } |
| 223 |
}}; |
| 224 |
|
| 225 |
ScalerSimpleBlock_t ScaleNormal2x = { |
| 226 |
"Normal2x", |
| 227 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 228 |
2,2,{ |
| 229 |
{ Normal2x_8_8_L, Normal2x_8_15_L, Normal2x_8_16_L, Normal2x_8_32_L }, |
| 230 |
{ 0, Normal2x_15_15_L, Normal2x_15_16_L, Normal2x_15_32_L}, |
| 231 |
{ 0, Normal2x_16_15_L, Normal2x_16_16_L, Normal2x_16_32_L}, |
| 232 |
{ 0, Normal2x_32_15_L, Normal2x_32_16_L, Normal2x_32_32_L}, |
| 233 |
{ Normal2x_8_8_L, Normal2x_9_15_L , Normal2x_9_16_L, Normal2x_9_32_L } |
| 234 |
},{ |
| 235 |
{ Normal2x_8_8_R, Normal2x_8_15_R , Normal2x_8_16_R, Normal2x_8_32_R }, |
| 236 |
{ 0, Normal2x_15_15_R, Normal2x_15_16_R, Normal2x_15_32_R}, |
| 237 |
{ 0, Normal2x_16_15_R, Normal2x_16_16_R, Normal2x_16_32_R}, |
| 238 |
{ 0, Normal2x_32_15_R, Normal2x_32_16_R, Normal2x_32_32_R}, |
| 239 |
{ Normal2x_8_8_R, Normal2x_9_15_R , Normal2x_9_16_R, Normal2x_9_32_R }, |
| 240 |
}}; |
| 241 |
|
| 242 |
ScalerSimpleBlock_t ScaleNormal3x = { |
| 243 |
"Normal3x", |
| 244 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 245 |
3,3,{ |
| 246 |
{ Normal3x_8_8_L, Normal3x_8_15_L , Normal3x_8_16_L , Normal3x_8_32_L }, |
| 247 |
{ 0, Normal3x_15_15_L, Normal3x_15_16_L, Normal3x_15_32_L}, |
| 248 |
{ 0, Normal3x_16_15_L, Normal3x_16_16_L, Normal3x_16_32_L}, |
| 249 |
{ 0, Normal3x_32_15_L, Normal3x_32_16_L, Normal3x_32_32_L}, |
| 250 |
{ Normal3x_8_8_L, Normal3x_9_15_L , Normal3x_9_16_L , Normal3x_9_32_L } |
| 251 |
},{ |
| 252 |
{ Normal3x_8_8_R, Normal3x_8_15_R , Normal3x_8_16_R , Normal3x_8_32_R }, |
| 253 |
{ 0, Normal3x_15_15_R, Normal3x_15_16_R, Normal3x_15_32_R}, |
| 254 |
{ 0, Normal3x_16_15_R, Normal3x_16_16_R, Normal3x_16_32_R}, |
| 255 |
{ 0, Normal3x_32_15_R, Normal3x_32_16_R, Normal3x_32_32_R}, |
| 256 |
{ Normal3x_8_8_R, Normal3x_9_15_R , Normal3x_9_16_R , Normal3x_9_32_R } |
| 257 |
}}; |
| 258 |
|
| 259 |
#if RENDER_USE_ADVANCED_SCALERS>0 |
| 260 |
ScalerSimpleBlock_t ScaleTV2x = { |
| 261 |
"TV2x", |
| 262 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 263 |
2,2,{ |
| 264 |
{ 0, TV2x_8_15_L , TV2x_8_16_L , TV2x_8_32_L }, |
| 265 |
{ 0, TV2x_15_15_L, TV2x_15_16_L, TV2x_15_32_L}, |
| 266 |
{ 0, TV2x_16_15_L, TV2x_16_16_L, TV2x_16_32_L}, |
| 267 |
{ 0, TV2x_32_15_L, TV2x_32_16_L, TV2x_32_32_L}, |
| 268 |
{ 0, TV2x_9_15_L , TV2x_9_16_L , TV2x_9_32_L } |
| 269 |
},{ |
| 270 |
{ 0, TV2x_8_15_R , TV2x_8_16_R , TV2x_8_32_R }, |
| 271 |
{ 0, TV2x_15_15_R, TV2x_15_16_R, TV2x_15_32_R}, |
| 272 |
{ 0, TV2x_16_15_R, TV2x_16_16_R, TV2x_16_32_R}, |
| 273 |
{ 0, TV2x_32_15_R, TV2x_32_16_R, TV2x_32_32_R}, |
| 274 |
{ 0, TV2x_9_15_R , TV2x_9_16_R , TV2x_9_32_R } |
| 275 |
}}; |
| 276 |
|
| 277 |
ScalerSimpleBlock_t ScaleTV3x = { |
| 278 |
"TV3x", |
| 279 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 280 |
3,3,{ |
| 281 |
{ 0, TV3x_8_15_L , TV3x_8_16_L , TV3x_8_32_L }, |
| 282 |
{ 0, TV3x_15_15_L, TV3x_15_16_L, TV3x_15_32_L}, |
| 283 |
{ 0, TV3x_16_15_L, TV3x_16_16_L, TV3x_16_32_L}, |
| 284 |
{ 0, TV3x_32_15_L, TV3x_32_16_L, TV3x_32_32_L}, |
| 285 |
{ 0, TV3x_9_15_L , TV3x_9_16_L , TV3x_9_32_L } |
| 286 |
},{ |
| 287 |
{ 0, TV3x_8_15_R , TV3x_8_16_R , TV3x_8_32_R }, |
| 288 |
{ 0, TV3x_15_15_R, TV3x_15_16_R, TV3x_15_32_R}, |
| 289 |
{ 0, TV3x_16_15_R, TV3x_16_16_R, TV3x_16_32_R}, |
| 290 |
{ 0, TV3x_32_15_R, TV3x_32_16_R, TV3x_32_32_R}, |
| 291 |
{ 0, TV3x_9_15_R , TV3x_9_16_R , TV3x_9_32_R } |
| 292 |
}}; |
| 293 |
|
| 294 |
ScalerSimpleBlock_t ScaleScan2x = { |
| 295 |
"Scan2x", |
| 296 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 297 |
2,2,{ |
| 298 |
{ 0, Scan2x_8_15_L , Scan2x_8_16_L , Scan2x_8_32_L }, |
| 299 |
{ 0, Scan2x_15_15_L, Scan2x_15_16_L, Scan2x_15_32_L}, |
| 300 |
{ 0, Scan2x_16_15_L, Scan2x_16_16_L, Scan2x_16_32_L}, |
| 301 |
{ 0, Scan2x_32_15_L, Scan2x_32_16_L, Scan2x_32_32_L}, |
| 302 |
{ 0, Scan2x_9_15_L , Scan2x_9_16_L , Scan2x_9_32_L } |
| 303 |
},{ |
| 304 |
{ 0, Scan2x_8_15_R , Scan2x_8_16_R , Scan2x_8_32_R }, |
| 305 |
{ 0, Scan2x_15_15_R, Scan2x_15_16_R, Scan2x_15_32_R}, |
| 306 |
{ 0, Scan2x_16_15_R, Scan2x_16_16_R, Scan2x_16_32_R}, |
| 307 |
{ 0, Scan2x_32_15_R, Scan2x_32_16_R, Scan2x_32_32_R}, |
| 308 |
{ 0, Scan2x_9_15_R , Scan2x_9_16_R , Scan2x_9_32_R } |
| 309 |
}}; |
| 310 |
|
| 311 |
ScalerSimpleBlock_t ScaleScan3x = { |
| 312 |
"Scan3x", |
| 313 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 314 |
3,3,{ |
| 315 |
{ 0, Scan3x_8_15_L , Scan3x_8_16_L , Scan3x_8_32_L }, |
| 316 |
{ 0, Scan3x_15_15_L, Scan3x_15_16_L, Scan3x_15_32_L}, |
| 317 |
{ 0, Scan3x_16_15_L, Scan3x_16_16_L, Scan3x_16_32_L}, |
| 318 |
{ 0, Scan3x_32_15_L, Scan3x_32_16_L, Scan3x_32_32_L}, |
| 319 |
{ 0, Scan3x_9_15_L , Scan3x_9_16_L , Scan3x_9_32_L }, |
| 320 |
},{ |
| 321 |
{ 0, Scan3x_8_15_R , Scan3x_8_16_R , Scan3x_8_32_R }, |
| 322 |
{ 0, Scan3x_15_15_R, Scan3x_15_16_R, Scan3x_15_32_R}, |
| 323 |
{ 0, Scan3x_16_15_R, Scan3x_16_16_R, Scan3x_16_32_R}, |
| 324 |
{ 0, Scan3x_32_15_R, Scan3x_32_16_R, Scan3x_32_32_R}, |
| 325 |
{ 0, Scan3x_9_15_R , Scan3x_9_16_R , Scan3x_9_32_R } |
| 326 |
}}; |
| 327 |
|
| 328 |
ScalerSimpleBlock_t ScaleRGB2x = { |
| 329 |
"RGB2x", |
| 330 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 331 |
2,2,{ |
| 332 |
{ 0, RGB2x_8_15_L , RGB2x_8_16_L , RGB2x_8_32_L }, |
| 333 |
{ 0, RGB2x_15_15_L, RGB2x_15_16_L, RGB2x_15_32_L}, |
| 334 |
{ 0, RGB2x_16_15_L, RGB2x_16_16_L, RGB2x_16_32_L}, |
| 335 |
{ 0, RGB2x_32_15_L, RGB2x_32_16_L, RGB2x_32_32_L}, |
| 336 |
{ 0, RGB2x_9_15_L , RGB2x_9_16_L , RGB2x_9_32_L } |
| 337 |
},{ |
| 338 |
{ 0, RGB2x_8_15_R , RGB2x_8_16_R , RGB2x_8_32_R }, |
| 339 |
{ 0, RGB2x_15_15_R, RGB2x_15_16_R, RGB2x_15_32_R}, |
| 340 |
{ 0, RGB2x_16_15_R, RGB2x_16_16_R, RGB2x_16_32_R}, |
| 341 |
{ 0, RGB2x_32_15_R, RGB2x_32_16_R, RGB2x_32_32_R}, |
| 342 |
{ 0, RGB2x_9_15_R , RGB2x_9_16_R , RGB2x_9_32_R } |
| 343 |
}}; |
| 344 |
|
| 345 |
ScalerSimpleBlock_t ScaleRGB3x = { |
| 346 |
"RGB3x", |
| 347 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 348 |
3,3,{ |
| 349 |
{ 0, RGB3x_8_15_L , RGB3x_8_16_L , RGB3x_8_32_L }, |
| 350 |
{ 0, RGB3x_15_15_L, RGB3x_15_16_L, RGB3x_15_32_L}, |
| 351 |
{ 0, RGB3x_16_15_L, RGB3x_16_16_L, RGB3x_16_32_L}, |
| 352 |
{ 0, RGB3x_32_15_L, RGB3x_32_16_L, RGB3x_32_32_L}, |
| 353 |
{ 0, RGB3x_9_15_L , RGB3x_9_16_L , RGB3x_9_32_L } |
| 354 |
},{ |
| 355 |
{ 0, RGB3x_8_15_R , RGB3x_8_16_R , RGB3x_8_32_R }, |
| 356 |
{ 0, RGB3x_15_15_R, RGB3x_15_16_R, RGB3x_15_32_R}, |
| 357 |
{ 0, RGB3x_16_15_R, RGB3x_16_16_R, RGB3x_16_32_R}, |
| 358 |
{ 0, RGB3x_32_15_R, RGB3x_32_16_R, RGB3x_32_32_R}, |
| 359 |
{ 0, RGB3x_9_15_R , RGB3x_9_16_R , RGB3x_9_32_R } |
| 360 |
}}; |
| 361 |
#endif |
| 362 |
|
| 363 |
|
| 364 |
/* Complex scalers */ |
| 365 |
|
| 366 |
#if RENDER_USE_ADVANCED_SCALERS>2 |
| 367 |
ScalerComplexBlock_t ScaleAdvMame2x ={ |
| 368 |
"AdvMame2x", |
| 369 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 370 |
2,2, |
| 371 |
{ AdvMame2x_8_L,AdvMame2x_16_L,AdvMame2x_16_L,AdvMame2x_32_L}, |
| 372 |
{ AdvMame2x_8_R,AdvMame2x_16_R,AdvMame2x_16_R,AdvMame2x_32_R} |
| 373 |
}; |
| 374 |
|
| 375 |
ScalerComplexBlock_t ScaleAdvMame3x = { |
| 376 |
"AdvMame3x", |
| 377 |
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32, |
| 378 |
3,3, |
| 379 |
{ AdvMame3x_8_L,AdvMame3x_16_L,AdvMame3x_16_L,AdvMame3x_32_L}, |
| 380 |
{ AdvMame3x_8_R,AdvMame3x_16_R,AdvMame3x_16_R,AdvMame3x_32_R} |
| 381 |
}; |
| 382 |
|
| 383 |
/* These need specific 15bpp versions */ |
| 384 |
ScalerComplexBlock_t ScaleHQ2x ={ |
| 385 |
"HQ2x", |
| 386 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 387 |
2,2, |
| 388 |
{ 0,HQ2x_16_L,HQ2x_16_L,HQ2x_32_L}, |
| 389 |
{ 0,HQ2x_16_R,HQ2x_16_R,HQ2x_32_R} |
| 390 |
}; |
| 391 |
|
| 392 |
ScalerComplexBlock_t ScaleHQ3x ={ |
| 393 |
"HQ3x", |
| 394 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 395 |
3,3, |
| 396 |
{ 0,HQ3x_16_L,HQ3x_16_L,HQ3x_32_L}, |
| 397 |
{ 0,HQ3x_16_R,HQ3x_16_R,HQ3x_32_R} |
| 398 |
}; |
| 399 |
|
| 400 |
ScalerComplexBlock_t ScaleSuper2xSaI ={ |
| 401 |
"Super2xSaI", |
| 402 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 403 |
2,2, |
| 404 |
{ 0,Super2xSaI_16_L,Super2xSaI_16_L,Super2xSaI_32_L}, |
| 405 |
{ 0,Super2xSaI_16_R,Super2xSaI_16_R,Super2xSaI_32_R} |
| 406 |
}; |
| 407 |
|
| 408 |
ScalerComplexBlock_t Scale2xSaI ={ |
| 409 |
"2xSaI", |
| 410 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 411 |
2,2, |
| 412 |
{ 0,_2xSaI_16_L,_2xSaI_16_L,_2xSaI_32_L}, |
| 413 |
{ 0,_2xSaI_16_R,_2xSaI_16_R,_2xSaI_32_R} |
| 414 |
}; |
| 415 |
|
| 416 |
ScalerComplexBlock_t ScaleSuperEagle ={ |
| 417 |
"SuperEagle", |
| 418 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 419 |
2,2, |
| 420 |
{ 0,SuperEagle_16_L,SuperEagle_16_L,SuperEagle_32_L}, |
| 421 |
{ 0,SuperEagle_16_R,SuperEagle_16_R,SuperEagle_32_R} |
| 422 |
}; |
| 423 |
|
| 424 |
ScalerComplexBlock_t ScaleAdvInterp2x = { |
| 425 |
"AdvInterp2x", |
| 426 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 427 |
2,2, |
| 428 |
{ 0,AdvInterp2x_15_L,AdvInterp2x_16_L,AdvInterp2x_32_L}, |
| 429 |
{ 0,AdvInterp2x_15_R,AdvInterp2x_16_R,AdvInterp2x_32_R} |
| 430 |
}; |
| 431 |
|
| 432 |
ScalerComplexBlock_t ScaleAdvInterp3x = { |
| 433 |
"AdvInterp3x", |
| 434 |
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY, |
| 435 |
3,3, |
| 436 |
{ 0,AdvInterp3x_15_L,AdvInterp3x_16_L,AdvInterp3x_32_L}, |
| 437 |
{ 0,AdvInterp3x_15_R,AdvInterp3x_16_R,AdvInterp3x_32_R} |
| 438 |
}; |
| 439 |
|
| 440 |
#endif |