66 Commits

Author SHA1 Message Date
Eugene Sandulenko
e4bd258fd6 Fix bug which led to an endless loop if 1.5x scaler is fed with odd value.
svn-id: r17003
2005-03-06 11:28:10 +00:00
Eugene Sandulenko
78ee0bfdaf Mouse part of big patch #1013937 (OSystem layer with bigger resolution)
svn-id: r16800
2005-02-17 23:01:00 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Torbjörn Andersson
039e6dc8db Relaxed the assertion for the 3x scaler a bit. Since it uses pointers to
uint16, it should be enough that dstPtr is even; it doesn't have to be a
multiple of four.

The old assertion failed for me when I used the 3x scaler without aspect
ratio correction.

svn-id: r14536
2004-08-10 17:46:04 +00:00
Max Horn
5564f36b0e Slightly optimiized Normal2x
svn-id: r14519
2004-08-08 15:45:58 +00:00
Gregory Montoir
db6e7ae2ca centers the scaled bitmap and fix the scaling of borders for ASM version)
svn-id: r14505
2004-08-07 17:21:53 +00:00
Max Horn
2a9c6f6d5f Base our advmame scalers on the official Scale2x source - this way we can easily update to new version and benefit from their optimizations (e.g. MMX support)
svn-id: r14502
2004-08-07 16:04:43 +00:00
Max Horn
a461c7550e irrelevant tweak, but I am a const-junkie :-)
svn-id: r14089
2004-06-27 22:04:19 +00:00
Paweł Kołodziejski
6801dd2eef fixed mingw compilation
svn-id: r13846
2004-05-21 17:30:51 +00:00
Eugene Sandulenko
d33b24036e Added assembly versions of HQ2x and HQ3x scalers.
svn-id: r13844
2004-05-21 02:08:48 +00:00
Max Horn
0a0a0c7b06 Updated to match scale2x 2.0
svn-id: r13563
2004-04-12 21:16:32 +00:00
Max Horn
751435d54f cleanup
svn-id: r13069
2004-02-27 15:52:23 +00:00
Max Horn
033ff78ae9 updated copyright notice
svn-id: r12176
2004-01-06 12:45:34 +00:00
Paweł Kołodziejski
b5a7ef0822 cleanup whitespaces
svn-id: r11219
2003-11-08 22:43:46 +00:00
Max Horn
ba1cf0e957 cut down dependencies a bit (so that I don't have to recompile hq2x/hq3x whenever common/scaler.h is changed :-)
svn-id: r11168
2003-11-06 23:54:12 +00:00
Torbjörn Andersson
27b22efe17 Fixed typo and added FIXME comment for the DotMatrix scaler.
svn-id: r10956
2003-10-24 17:14:56 +00:00
Max Horn
a02c13a52e fix scaler compilation for MSVC6. However, the produced code stll seems to be incorrect... Jamieson, maybe the MSVC6_COMPAT should be re-added then after all?
svn-id: r10552
2003-10-02 23:29:58 +00:00
Max Horn
7ccafa467c synced hq2x with upstream changes; some performance tweaks to hq2x/hq3x (I think for bigger speed improvement we'd have to use ASM (with C++ fallback of course)...
svn-id: r10494
2003-09-29 23:34:43 +00:00
Max Horn
c40e7d68a5 templatized more of the scalers; also introduced template struct ColorMasks (shortens/simplifies other code a bit)
svn-id: r10489
2003-09-29 18:38:51 +00:00
Max Horn
4a7385b4e7 split out scalers into separate source files in common/scaler; some optimizations (in particular, the hq2x/hq3x scalers now are compiled into two versions, one for 555 and one for 565 mode)
svn-id: r10488
2003-09-29 16:02:47 +00:00
Max Horn
1d40ce68c2 get rid of explicit redMask/blueMask and use redBlueMask instead (this will be useful should we choose to templatize the scalers for 555/565 mode optimizations)
svn-id: r10451
2003-09-27 23:59:09 +00:00
Max Horn
b2b9a7cb07 cheak doxygen comments
svn-id: r10448
2003-09-27 23:11:26 +00:00
Jamieson Christian
44c0654ffd Fixed template function compile quirks under MSVC6.
Apparently MSVC6 does not like overloading of template
functions when the template arguments vary between
versions of the overloaded function. I replaced
interpolate16 with functions that have two different
names, so MSVC6 won't see them as being the same
function with [it insists] the same number of template
arguments.

svn-id: r10446
2003-09-27 22:53:24 +00:00
Max Horn
e032e79a4a added hq2x scaler (no, I am not going to add hq4x anytime soon. It would be another 4-5000 lines of code, and scaler.cpp already takes far too long to compile. Maybe we should seperate the scalers into several files in common/scaler/ ?)
svn-id: r10438
2003-09-27 21:19:17 +00:00
Max Horn
d87f65ff06 added a FIXME (regarding optimization) to INTERPOLATE; added new template function interpolate16 which is used by hq3x (advantage of the old trick which abused Q_INTERPOLATE: smaller & better optimized code; very easy to adapt the function for other uses, like for hq2x/hq3x. Drawback: scaler.cpp takes even longer to compile now :-)
svn-id: r10433
2003-09-27 18:09:50 +00:00
Max Horn
8a5e6289a5 use our own ABS instead of the math.h abs(); some tweaks
svn-id: r10363
2003-09-22 23:29:47 +00:00
Max Horn
ab1c58c1b1 fixed InitLUTs for 555 mode; some tweaks
svn-id: r10354
2003-09-21 17:56:11 +00:00
Torbjörn Andersson
14813704ae Applied ScummVM formatting conventions
svn-id: r10349
2003-09-21 15:46:27 +00:00
Max Horn
74e3448a4c added HQ3x filter
svn-id: r10346
2003-09-21 12:10:32 +00:00
Jochen Hoenicke
c9ece33b81 Fixed aspect ratio scaler
svn-id: r9723
2003-08-16 11:00:13 +00:00
Max Horn
0df319e952 #include cleanup (explicityl specify the location for headers from common/, so that we at some point can get rid of -Icommon; exception is made for stdafx.h, since a) we might want to rename it and b) might want to move it to the top level)
svn-id: r9359
2003-08-01 12:21:04 +00:00
Max Horn
a7391d0a9a Rest of patch #774556 (small optimization for aspect ratio correction)
svn-id: r9103
2003-07-21 00:07:27 +00:00
Max Horn
dcbd402670 added TODOs; made switching between asepct modes a bit nice; made scale a template parameter to help compile optimizations
svn-id: r9074
2003-07-19 11:35:01 +00:00
Max Horn
621e356b42 don't default to the slowest aspect ratio correcter; rather use the medium one (good quality with acceptable speed)
svn-id: r8715
2003-07-02 14:47:06 +00:00
Max Horn
71ea8f7228 fix the inaccurate version of interpolate5Line to work correctly for odd widths
svn-id: r8628
2003-06-22 17:32:50 +00:00
Max Horn
31bdf9f450 undoing this optimization: despite my initial sureness about this being correct - I was wrong :-) just plug in 0xFFFFFFFF to see it (roughly spoken, we can loose the uppermost bits if we shift after the addition instead of before it)
svn-id: r8627
2003-06-22 17:29:55 +00:00
Paweł Kołodziejski
288f101bc9 fixed warning
svn-id: r8623
2003-06-22 15:06:48 +00:00
Torbjörn Andersson
160c4f9104 Fixed the last (?) glitches around the mouse cursor [*] in aspect-ratio
correction mode by making sure that dirty rects always start on a line
that won't have its colours changed by the stretching function. This was
probably only noticeable when using the 1x scaler.

[*] Actually, the glitches weren't specific to the mouse cursor, but it was
    useful for triggering them.

svn-id: r8621
2003-06-22 14:59:21 +00:00
Bertrand Augereau
7e86b215bb Rearranged logic in SuperEagle
svn-id: r8620
2003-06-22 14:52:34 +00:00
Torbjörn Andersson
53d679bfb7 Fix some graphics glitches that would sometimes be visible around the mouse
cursor in aspect-ratio correction mode.

svn-id: r8618
2003-06-22 14:41:09 +00:00
Max Horn
2aa0a86038 cleanup
svn-id: r8616
2003-06-22 14:36:12 +00:00
Paweł Kołodziejski
9d09b77f21 fixed warnings
svn-id: r8613
2003-06-22 14:30:32 +00:00
Max Horn
e7c3fae1e8 no need to keep these regression tests: the changes are mathematically and operationally (read: taking into account side effects and special cases in computer arithmetics) equivalent to the old code
svn-id: r8606
2003-06-22 12:03:24 +00:00
Max Horn
11ff7fe9a3 Patch #757827: Aspect-ratio correction
svn-id: r8605
2003-06-22 11:55:40 +00:00
Bertrand Augereau
fa184730af Reduced the number of shifts in highly used functions in Super2xSaI and SuperEagle
svn-id: r8604
2003-06-22 11:52:40 +00:00
Max Horn
01cb6e2ab9 indention
svn-id: r8447
2003-06-12 15:20:58 +00:00
Jamieson Christian
167ad2575a Fixed MSVC warning
svn-id: r8431
2003-06-11 05:08:41 +00:00
Max Horn
f36459f8ba cleanup
svn-id: r8429
2003-06-10 16:25:49 +00:00
Max Horn
c5ea0839ef as Bertrand points out, using && introduces unnecessary branching, so & is better
svn-id: r7979
2003-05-25 23:33:24 +00:00
Max Horn
35f8c2202f cleanup / added some more const qualifiers
svn-id: r7975
2003-05-25 22:01:19 +00:00