openMSX
|
Polymorphic line scaler. More...
#include <LineScalers.hh>
Public Member Functions | |
virtual void | operator() (std::span< const Pixel > in, std::span< Pixel > out)=0 |
Actually scale a line. More... | |
virtual bool | isCopy () const =0 |
Is this scale operation actually a copy? This info can be used to (in a multi-step scale operation) immediately produce the output of the previous step in this step's output buffer, so effectively skipping this step. More... | |
Protected Member Functions | |
~PolyLineScaler ()=default | |
Polymorphic line scaler.
Abstract base class for line scalers. Can be used when one basic algorithm should work in combination with multiple line scalers (e.g. several Scale_XonY variants). A line scaler takes one line of input pixels and outputs a different line of pixels. The input and output don't necessarily have the same number of pixels. An alternative (which we used in the past) is to templatize that algorithm on the LineScaler type. In theory this results in a faster routine, but in practice this performance benefit is often not measurable while it does result in bigger code size.
Definition at line 285 of file LineScalers.hh.
|
protecteddefault |
|
pure virtual |
Is this scale operation actually a copy? This info can be used to (in a multi-step scale operation) immediately produce the output of the previous step in this step's output buffer, so effectively skipping this step.
Implemented in openmsx::PolyScale< Pixel, Scaler >, and openmsx::PolyScaleRef< Pixel, Scaler >.
Referenced by openmsx::doHQScale2(), and openmsx::doHQScale3().
|
pure virtual |
Actually scale a line.
in | Buffer containing input line. |
out | Buffer that should be filled with output. Note: The relative size of the input and output depends on the actual scaler. For example Scale_2on1 requires twice as many pixels in the input than in the output. |
Implemented in openmsx::PolyScale< Pixel, Scaler >, and openmsx::PolyScaleRef< Pixel, Scaler >.