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 
7 namespace openmsx {
8 
11 template<std::unsigned_integral Pixel>
12 class Scale2xScaler final : public Scaler2<Pixel>
13 {
14 public:
16 
17  void scale1x1to2x2(FrameSource& src,
18  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
19  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
20  void scale1x1to1x2(FrameSource& src,
21  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
22  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
23 
24 private:
25  void scaleLine_1on2(Pixel* dst0, Pixel* dst1,
26  const Pixel* src0, const Pixel* src1, const Pixel* src2,
27  size_t srcWidth) __restrict;
28  void scaleLineHalf_1on2(Pixel* dst,
29  const Pixel* src0, const Pixel* src1, const Pixel* src2,
30  size_t srcWidth) __restrict;
31 
32  void scaleLine_1on1(Pixel* dst0, Pixel* dst1,
33  const Pixel* src0, const Pixel* src1, const Pixel* src2,
34  size_t srcWidth) __restrict;
35  void scaleLineHalf_1on1(Pixel* dst,
36  const Pixel* src0, const Pixel* src1, const Pixel* src2,
37  size_t srcWidth) __restrict;
38 };
39 
40 } // namespace openmsx
41 
42 #endif
Interface for getting lines from a video frame.
Definition: FrameSource.hh:17
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
uint32_t Pixel