Commit Graph

218 Commits

Author SHA1 Message Date
Eric Culp
9ba4c24ae1 GRAPHICS: Migrate global funcs and vars to Edge Plugin class 2021-03-15 16:48:40 +02:00
Eric Culp
b2dff9413e GRAPHICS: Rename functions in Edge filter according to guidelines 2021-03-15 16:48:40 +02:00
Eric Culp
fc3ee1989d GRAPHICS: Change another interpolation function in Edge filter.
A 2 to 1 interpolation was causing errors. It is fixed, renamed, and
moved to the common interpolation file.
2021-03-15 16:48:40 +02:00
Eric Culp
457e974c86 GRAPHICS: Use correct copyright notice in edge.cpp 2021-03-15 16:48:40 +02:00
Eric Culp
e77934b73d GRAPHICS: Change Edge filter to use shared interpolation functions 2021-03-15 16:48:40 +02:00
Eric Culp
592617e2ce GRAPHICS: Add Edge2x/3x scaler
This currently does not conform to coding standards and contains a lot
of dead code (This will be fixed). Thanks to Eric Welsh for the original
patch.
2021-03-15 16:48:40 +02:00
Eric Culp
9ed7fde732 GRAPHICS: Capitalized pixel in template parameters 2021-03-15 16:48:40 +02:00
Eric Culp
267b385890 GRAPHICS: Add 2xPM scaler with 16 and 32 bit support 2021-03-15 16:48:40 +02:00
Eric Culp
d91e970f4e GRAPHICS: Fix error in dotmatrix scaler initialization 2021-03-15 16:48:40 +02:00
Eric Culp
4a69e136d2 GRAPHICS: Add 32bpp support for TV scaler 2021-03-15 16:48:40 +02:00
Eric Culp
c7e874e2cd GRAPHICS: Add 32bpp support to dotmatrix scaler 2021-03-15 16:48:40 +02:00
Eric Culp
3d357dc9d1 GRAPHICS: Fix Errors in ifdefs and switches for asm hq scalers 2021-03-15 16:48:40 +02:00
Eric Culp
4432c5a4d1 GRAPHICS: Add 32bpp color support for HQ scalers
This implementation uses 16bpp rgb conversion to lookup Yuv values. A
different implementation will need to edit ConvertYUV and InitLUT
accordingly.
2021-03-15 16:48:40 +02:00
Eric Culp
b08da82253 GRAPHICS: Add 32bpp support for the sai family of scalers 2021-03-15 16:48:40 +02:00
Eric Culp
780d5a8689 GRAPHICS: Add 4 byte per pixel support for Normal scalers 2021-03-15 16:48:40 +02:00
Eric Culp
c2639a9ff6 GRAPHICS: Fix formatting in template 2021-03-15 16:48:40 +02:00
Eric Culp
a3a9736754 GRAPHICS: Add TV scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
7fd8107c76 GRAPHICS: Move Normal scaler functions into same file as plugin 2021-03-15 16:48:40 +02:00
Eric Culp
e620b79f15 GRAPHICS: add 4x scaling to AdvMame plugin 2021-03-15 16:48:40 +02:00
Eric Culp
20b4356ecd GRAPHICS: Add AdvMame scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
5e73533110 GRAPHICS: Add SuperEagle and SuperSAI scaler plugins 2021-03-15 16:48:40 +02:00
Eric Culp
8030b7879c GRAPHICS/SDL: add ifdefs for disabling scalers 2021-03-15 16:48:40 +02:00
Eric Culp
dcfbf9da7f GRAPHICS: Unify hq scalers with plugin
The scalers read pixelformat from the plugin now.
However there are still only 16bpp implementations.
2021-03-15 16:48:40 +02:00
Eric Culp
c8bcb3912f SDL/GRAPHICS: remove disableScaling() hack from scaler plugins 2021-03-15 16:48:40 +02:00
Eric Culp
90e855d1ab GRAPHICS: Move HQ init code from InitScalers to the plugin 2021-03-15 16:48:40 +02:00
Eric Culp
9d2eca9383 GRAPHICS: remove 1x scaling for non-normal scalers
Scalers that fell back on the Normal1x scaler no longer support 1x
scaling
2021-03-15 16:48:40 +02:00
Eric Culp
8b00ee4873 GRAPHICS: added 4x scaling to normal scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
45ad2a4882 GRAPHICS: add PrettyName to scaler api for gui 2021-03-15 16:48:40 +02:00
Eric Culp
70426d5e74 GRAPHICS: add getFactors() for scaler plugins 2021-03-15 16:48:40 +02:00
Eric Culp
d56a7d610c GRAPHICS: add static methods for 1x and 1.5x scale 2021-03-15 16:48:40 +02:00
Eric Culp
a54ea85641 GRAPHICS: fix dotmatrix inconsistencies
Now it uses the x and y coordinates to produce
the same pixels in the destination surface.
2021-03-15 16:48:40 +02:00
Eric Culp
b70a04214b GRAPHICS/BASE: adds Dotmatrix scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
6320ea772e GRAPHICS: small formatting change in HQPlugin 2021-03-15 16:48:40 +02:00
Eric Culp
8c9cb22734 GRAPHICS/SDL/BASE: fix scaler declarations
mainly adding const and using uint instead of int
2021-03-15 16:48:40 +02:00
Eric Culp
489d361d18 GRAPHICS: fix formatting to conform to guidelines 2021-03-15 16:48:40 +02:00
Eric Culp
a0299cf5d2 GRAPHICS: fixes the value of extraPixels for 2xsai 2021-03-15 16:48:40 +02:00
Eric Culp
ef2b057eef GRAPHICS: adds 2xsai as scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
83a8abda70 GRAPHICS: add support for hq scaler plugin 2021-03-15 16:48:40 +02:00
Eric Culp
0d103d01c4 GRAPHICS: adds comments for scalers and clean up 2021-03-15 16:48:40 +02:00
Eric Culp
60c430d6e5 GRAPHICS: adds additinoal methods to scaler api 2021-03-15 16:48:40 +02:00
Eric Culp
318130a905 BACKENDS/GRAPHICS: Stops overlay from being scaled 2021-03-15 16:48:40 +02:00
Eric Culp
202f4efdee GRAPHICS: Changes name of normal plugin to be consistant 2021-03-15 16:48:40 +02:00
Eric Culp
7bcc1f0b13 GRAPHICS: Adds a nearest neighbor plugin
It's not used yet, but it compiles and is managed by the plugin manager.
2021-03-15 16:48:40 +02:00
Cameron Cawley
e2e72af31d SDL: Remove duplicated cursorStretch200To240() function 2019-12-25 08:52:19 +02:00
Cameron Cawley
de096f56a5 GRAPHICS: Remove unused scaler code 2019-12-17 01:18:11 +02:00
Cameron Cawley
c4b1695505 GRAPHICS: Remove downscalers only used by the Windows CE port 2019-11-17 22:33:56 +01:00
D G Turner
be56e9afed GRAPHICS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 10:11:25 +00:00
Eric Culp
627fbaf8a0 GRAPHICS: Return value in dummy functions 2019-04-01 00:29:23 +03:00
Eric Culp
c666ecd41d GRAPHICS: Respect alpha and rgba formats in interpolation and conversion 2019-04-01 00:29:23 +03:00
Eric Culp
c2ddab7dd2 GRAPHICS: Fix braces in two interpolate functions 2019-04-01 00:29:23 +03:00
Eric Culp
e3357083d7 GRAPHICS: Change another interpolation function in Edge filter.
A 2 to 1 interpolation was causing errors. It is fixed, renamed, and
moved to the common interpolation file.
2019-04-01 00:29:23 +03:00
Eric Culp
0246ca8da0 GRAPHICS: Change Edge filter to use shared interpolation functions 2019-04-01 00:29:23 +03:00
Eric Culp
3d57c13af0 GRAPHICS: Add dummy specializations for some interpolate* functions
They use ColorMask values not present in 2-byte ColorMasks. Since they
should never be used on 2-byte pixel data, the dummy implementations
assert(0) and should be removed by any optimizing compiler since no
code path can ever reach them.
2019-04-01 00:29:23 +03:00
Eric Culp
2215e0cb51 GRAPHICS: Add 32bit versions of interpolate* functions 2019-04-01 00:29:23 +03:00
Thierry Crozat
3b542cea53 SURFACESDL: Respect filtering setting when performing aspect ratio correction 2018-10-24 23:34:41 +02:00
Adrian Frühwirth
3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Colin Snover
a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Bastien Bouclet
e9bfbbd470 GRAPHICS: Allow saving thumbnails of 32 bits screens
Fixes saving in Myst ME when using the OpenGL output
2016-03-27 14:52:34 +02:00
Johannes Schickel
e499a25a00 GRAPHICS: Manually specify function alignment in ARM assembly. 2014-03-06 20:21:48 +01:00
Johannes Schickel
53332e8066 GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Torbjörn Andersson
b8850522b6 GRAPHICS: Fix incorrect parameter order for getBasePtr.
This caused createThumbnail() to crash, e.g. when saving in the
Kyrandia engine. Probably other engines as well.
2013-08-08 06:55:17 +02:00
Johannes Schickel
5111746911 GRAPHICS: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +02:00
Johannes Schickel
dbef9fef3b GRAPHICS: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 04:02:49 +02:00
Johannes Schickel
ff451ba2dc GRAPHICS: Slight formatting fixes in thumbnail_intern.cpp. 2013-08-02 17:48:31 +02:00
Johannes Schickel
9a787fa586 GRAPHICS: Silence conversion warnings by using an explicit cast. 2013-08-02 17:33:13 +02:00
Johannes Schickel
adf8cee449 GRAPHICS: Allow arbitrary input sizes for thumbnail scaling.
Instead of a fixed 1/2 or 1/4 scaling we do a two step scaling now:
1) Scale image to width < 160*2 && height < [100,120]*2 with 1/4 or 1/2
   nearest-neighbor.
2) Use a bilinear scaler to scale aspect preserving to 160x[100,120]

This fixes bug #3614568 "GRAPHICS: Odd thumbnail sizes crash".
2013-07-13 01:57:23 +02:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
David-John Willis
e7921438cd GRAPHICS: Rename NEON_ASPECT_CORRECTOR to USE_ARM_NEON_ASPECT_CORRECTOR
* This better matches other ARM codepaths.
* Also remove #ifdef OPENPANDORA as moved to configure.
2012-10-21 18:43:07 +01:00
Johannes Schickel
dc6b98f64c GRAPHICS: Slight formatting fixes in aspect.cpp. 2012-09-25 15:16:54 +02:00
Bertrand Augereau
4c02e19742 SCALER: Neon code for aspect correction for OpenPandora
It gains 35% on the first function of the profiling on Indy IV
It is now nearly memory-bound (~10%) so it might not be needed to schedule the code better than this
2012-09-17 22:13:34 +02:00
Bertrand Augereau
5f6a98cb5b SCALER: No need to inline interpolate5Line, it just bloats stretch200To240 for nothing 2012-09-03 01:34:41 +02:00
Johannes Schickel
0075fa2f98 GRAPHICS: Replace OverlayColor with uint16 in scaler code.
Scalers are actually fixed at 2Bpp right now and not at the
depth of OverlayColor.
2012-06-12 04:18:59 +02:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Willem Jan Palenstijn
052177d136 COMMON: Remove some double-underscore defines (reserved) 2011-11-14 14:59:58 +01:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
CeRiAl
d809756c8d SCALERS: Fix Normal1xAspect scaler bug reported in bug #3313709 2011-06-14 22:43:28 +02:00
Willem Jan Palenstijn
a1f12c25ca ARM: Fix normal2x scaler for width % 4 != 0
The first jump to 'thin:' didn't leave r14 (remaining width)
in the right state.
2011-06-10 21:31:03 +02:00
CeRiAl
ef3484646a SCALERS: Fix for compiling for ARM without using ASM scalers 2011-06-10 21:30:45 +02:00
Alyssa Milburn
1529287082 GRAPHICS: Move comment to the right function. 2011-06-08 19:30:22 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
peres
6ddf6693ce GRAPHICS: use the new interpolate16_5_3 2011-05-07 08:38:53 +09:00
peres
2dddcbf41d GRAPHICS: implement the long awaited interpolate16_5_3 2011-05-07 08:38:32 +09:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Johannes Schickel
3fd919060c GRPAHICS: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:58:08 +02:00
Johannes Schickel
39b993fb02 GRAPHICS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:24:52 +02:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Johannes Schickel
f53f1af062 GRAPHICS: Adapt thumbnail code to grabPalette RGBA->RGB change. 2011-02-14 17:08:32 +01:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Max Horn
dbddd758d1 GRAPHICS: colour -> color
svn-id: r54287
2010-11-17 12:21:37 +00:00
Max Horn
7e7ad149c2 GRAPHICS: Cleanup advmame scaler code; don't include assert.h
svn-id: r54104
2010-11-07 00:37:04 +00:00
Johannes Schickel
2662d569d9 Fix long standing regression (introduced with r34053) in thumbnail scaling code for Hercules graphics.
svn-id: r50605
2010-07-02 22:38:42 +00:00
Filippos Karapetis
e22a75de99 Rewrote the handling of thumbnail creation for KQ6 Windows in rev #50600, so that it recreates the screen buffer like the other workarounds above it (thanks to LordHoto for pointing this out)
svn-id: r50601
2010-07-02 19:04:44 +00:00
Filippos Karapetis
1beff1a599 Added a special case for KQ6 hires in the thumbnail creation code, which runs at a resolution of 640x440
svn-id: r50600
2010-07-02 16:52:09 +00:00
Johannes Schickel
d163686d2d Document that the current Hercules mode thumbnail scaler code is pretty much aimed for SCUMM games.
svn-id: r48736
2010-04-19 20:44:25 +00:00
Johannes Schickel
498d1da182 Cleanup.
svn-id: r48735
2010-04-19 20:44:05 +00:00
Andre Heider
64cba2878a Do not call OSystem::grabPalette() for 16bit modes, when the result is not used anyway for those modes.
svn-id: r48733
2010-04-19 20:37:20 +00:00
Robin Watts
9bb92eba9e Fix for ARM Normal2xAspect scaler that was causing crashes when the screen
'shakes' (such as when the head/bomb goes of at the start of sam'n'max).
Was overwriting the end of the screen when asked to plot a non-multiple of
5 lines.

svn-id: r48690
2010-04-17 15:45:06 +00:00
Robin Watts
99e032e954 Fix missing definition of gBitFormat.
svn-id: r48213
2010-03-09 01:20:23 +00:00
Johannes Schickel
56bd4a6e18 Use a template for hq2x and hq3x instead of using #include and defines.
svn-id: r48197
2010-03-08 19:16:50 +00:00