openMSX
|
Scaler that uses a variation of the morphological anti-aliasing algorithm. More...
#include <MLAAScaler.hh>
Public Member Functions | |
MLAAScaler (unsigned dstWidth, const PixelOperations< Pixel > &pixelOps) | |
void | scaleImage (FrameSource &src, const RawFrame *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override |
Scales the image in the given area, which must consist of lines which are all equally wide. More... | |
Public Member Functions inherited from openmsx::Scaler< Pixel > | |
virtual | ~Scaler ()=default |
virtual void | scaleImage (FrameSource &src, const RawFrame *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)=0 |
Scales the image in the given area, which must consist of lines which are all equally wide. More... | |
Scaler that uses a variation of the morphological anti-aliasing algorithm.
The paper that describes the original MLAA algorithm can be found here: http://visual-computing.intel-research.net /publications/papers/2009/mlaa/mlaa.pdf The original algorithm is a filter; it was adapted to scale the image. The classification of edges has been expanded to work better with the hand-drawn 2D images we apply the scaler to, as opposed to the 3D rendered images that the original algorithm was designed for.
Definition at line 19 of file MLAAScaler.hh.
openmsx::MLAAScaler< Pixel >::MLAAScaler | ( | unsigned | dstWidth, |
const PixelOperations< Pixel > & | pixelOps | ||
) |
Definition at line 17 of file MLAAScaler.cc.
|
overridevirtual |
Scales the image in the given area, which must consist of lines which are all equally wide.
Scaling factor depends on the concrete scaler.
src | Source: the frame to be scaled. |
superImpose | The to-be-superimposed image (can be nullptr). |
srcStartY | Y-coordinate of the top source line (inclusive). |
srcEndY | Y-coordinate of the bottom source line (exclusive). |
srcWidth | The number of pixels per line for the given area. |
dst | Destination: image to store the scaled output in. |
dstStartY | Y-coordinate of the top destination line (inclusive). |
dstEndY | Y-coordinate of the bottom destination line (exclusive). |
Implements openmsx::Scaler< Pixel >.
Definition at line 25 of file MLAAScaler.cc.
References openmsx::ScalerOutput< Pixel >::acquireLine(), gl::clamp(), openmsx::MemBuffer< T, ALIGNMENT >::data(), openmsx::ScalerOutput< Pixel >::getHeight(), openmsx::FrameSource::getLine(), gl::length(), gl::max(), gl::min(), openmsx::ScalerOutput< Pixel >::releaseLine(), VLA, and xrange().