openMSX
HQ2xScaler.hh
Go to the documentation of this file.
1 #ifndef HQ2XSCALER_HH
2 #define HQ2XSCALER_HH
3 
4 #include "Scaler2.hh"
5 #include "PixelOperations.hh"
6 
7 namespace openmsx {
8 
11 template <class Pixel>
12 class HQ2xScaler final : public Scaler2<Pixel>
13 {
14 public:
15  explicit HQ2xScaler(const PixelOperations<Pixel>& pixelOps);
16 
17  void scale1x1to3x2(FrameSource& src,
18  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
19  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
20  void scale1x1to2x2(FrameSource& src,
21  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
22  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
23  void scale2x1to3x2(FrameSource& src,
24  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
25  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
26  void scale1x1to1x2(FrameSource& src,
27  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
28  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
29  void scale4x1to3x2(FrameSource& src,
30  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
31  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
32  void scale2x1to1x2(FrameSource& src,
33  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
34  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
35 
36 private:
37  PixelOperations<Pixel> pixelOps;
38 };
39 
40 } // namespace openmsx
41 
42 #endif
void scale1x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: HQ2xScaler.cc:166
void scale2x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: HQ2xScaler.cc:190
Base class for 2x scalers.
Definition: Scaler2.hh:11
Runs the hq2x scaler algorithm.
Definition: HQ2xScaler.hh:12
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
Definition: HQ2xScaler.cc:202
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void scale2x1to1x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: HQ2xScaler.cc:226
HQ2xScaler(const PixelOperations< Pixel > &pixelOps)
Definition: HQ2xScaler.cc:159
void scale4x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: HQ2xScaler.cc:214
void scale1x1to2x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: HQ2xScaler.cc:178