openMSX
Simple2xScaler.hh
Go to the documentation of this file.
1#ifndef SIMPLESCALER_HH
2#define SIMPLESCALER_HH
3
4#include "Scaler2.hh"
5#include "Scanline.hh"
6#include "Multiply32.hh"
7
8namespace openmsx {
9
10class RenderSettings;
11
17template<std::unsigned_integral Pixel>
18class Simple2xScaler final : public Scaler2<Pixel>
19{
20public:
22 const PixelOperations<Pixel>& pixelOps,
23 RenderSettings& renderSettings);
24
25private:
26 void scaleImage(FrameSource& src, const RawFrame* superImpose,
27 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
28 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
29 void scaleBlank1to2(
30 FrameSource& src, unsigned srcStartY, unsigned srcEndY,
31 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
32 void scale1x1to2x2(FrameSource& src,
33 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
34 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
35 void scale1x1to1x2(FrameSource& src,
36 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
37 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
38
39 void drawScanline(std::span<const Pixel> in1, std::span<const Pixel> in2,
40 std::span<Pixel> out, int factor);
41 void blur1on2(std::span<const Pixel> in, std::span<Pixel> out, unsigned alpha);
42 void blur1on1(std::span<const Pixel> in, std::span<Pixel> out, unsigned alpha);
43
44private:
45 RenderSettings& settings;
47
51
52 Scanline<Pixel> scanline;
53};
54
55} // namespace openmsx
56
57#endif
Interface for getting lines from a video frame.
Definition: FrameSource.hh:20
Helper class to perform 'pixel x scalar' calculations.
Definition: Multiply32.hh:17
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:15
Class containing all settings for renderers.
Base class for 2x scalers.
Definition: Scaler2.hh:12
Helper class to draw scanlines.
Definition: Scanline.hh:46
Scaler which assigns the color of the original pixel to all pixels in the 2x2 square.
Simple2xScaler(const PixelOperations< Pixel > &pixelOps, RenderSettings &renderSettings)
This file implemented 3 utility functions:
Definition: Autofire.cc:9