openMSX
Public Member Functions | List of all members
openmsx::MLAAScaler< Pixel > Class Template Referencefinal

Scaler that uses a variation of the morphological anti-aliasing algorithm. More...

#include <MLAAScaler.hh>

Inheritance diagram for openmsx::MLAAScaler< Pixel >:
Inheritance graph
[legend]
Collaboration diagram for openmsx::MLAAScaler< Pixel >:
Collaboration graph
[legend]

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...
 

Detailed Description

template<std::unsigned_integral Pixel>
class openmsx::MLAAScaler< Pixel >

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.

Constructor & Destructor Documentation

◆ MLAAScaler()

template<std::unsigned_integral Pixel>
openmsx::MLAAScaler< Pixel >::MLAAScaler ( unsigned  dstWidth,
const PixelOperations< Pixel > &  pixelOps 
)

Definition at line 17 of file MLAAScaler.cc.

Member Function Documentation

◆ scaleImage()

template<std::unsigned_integral Pixel>
void openmsx::MLAAScaler< Pixel >::scaleImage ( FrameSource src,
const RawFrame superImpose,
unsigned  srcStartY,
unsigned  srcEndY,
unsigned  srcWidth,
ScalerOutput< Pixel > &  dst,
unsigned  dstStartY,
unsigned  dstEndY 
)
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.

Parameters
srcSource: the frame to be scaled.
superImposeThe to-be-superimposed image (can be nullptr).
srcStartYY-coordinate of the top source line (inclusive).
srcEndYY-coordinate of the bottom source line (exclusive).
srcWidthThe number of pixels per line for the given area.
dstDestination: image to store the scaled output in.
dstStartYY-coordinate of the top destination line (inclusive).
dstEndYY-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().


The documentation for this class was generated from the following files: