openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::PolyLineScaler< Pixel > Class Template Referenceabstract

Polymorphic line scaler. More...

#include <LineScalers.hh>

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

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
 

Detailed Description

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

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.

Constructor & Destructor Documentation

◆ ~PolyLineScaler()

template<std::unsigned_integral Pixel>
openmsx::PolyLineScaler< Pixel >::~PolyLineScaler ( )
protecteddefault

Member Function Documentation

◆ isCopy()

template<std::unsigned_integral Pixel>
virtual bool openmsx::PolyLineScaler< Pixel >::isCopy ( ) const
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().

◆ operator()()

template<std::unsigned_integral Pixel>
virtual void openmsx::PolyLineScaler< Pixel >::operator() ( std::span< const Pixel in,
std::span< Pixel out 
)
pure virtual

Actually scale a line.

Parameters
inBuffer containing input line.
outBuffer 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 >.


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