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