openMSX
Scale2xScaler.hh
Go to the documentation of this file.
1#ifndef SCALE2XSCALER_HH
2#define SCALE2XSCALER_HH
3
4#include "Scaler2.hh"
5#include <cstddef>
6#include <span>
7
8namespace openmsx {
9
12template<std::unsigned_integral Pixel>
13class Scale2xScaler final : public Scaler2<Pixel>
14{
15public:
17
18 void scale1x1to2x2(FrameSource& src,
19 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
20 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
21 void scale1x1to1x2(FrameSource& src,
22 unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
23 ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
24
25private:
26 void scaleLine_1on2(std::span<Pixel> dst0, std::span<Pixel> dst1,
27 std::span<const Pixel> src0, std::span<const Pixel> src1, std::span<const Pixel> src2);
28 void scaleLineHalf_1on2(std::span<Pixel> dst,
29 std::span<const Pixel> src0, std::span<const Pixel> src1, std::span<const Pixel> src2);
30
31 void scaleLine_1on1(std::span<Pixel> dst0, std::span<Pixel> dst1,
32 std::span<const Pixel> src0, std::span<const Pixel> src1, std::span<const Pixel> src2);
33 void scaleLineHalf_1on1(std::span<Pixel> dst,
34 std::span<const Pixel> src0, std::span<const Pixel> src1, std::span<const Pixel> src2);
35};
36
37} // namespace openmsx
38
39#endif
Interface for getting lines from a video frame.
Definition: FrameSource.hh:20
Runs the Scale2x scaler algorithm.
void scale1x1to2x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
void scale1x1to1x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Scale2xScaler(const PixelOperations< Pixel > &pixelOps)
Base class for 2x scalers.
Definition: Scaler2.hh:12
const PixelOperations< Pixel > pixelOps
Definition: Scaler2.hh:68
This file implemented 3 utility functions:
Definition: Autofire.cc:9