openMSX
SaI3xScaler.hh
Go to the documentation of this file.
1 #ifndef SAI3XSCALER_HH
2 #define SAI3XSCALER_HH
3 
4 #include "Scaler3.hh"
5 #include "PixelOperations.hh"
6 
7 namespace openmsx {
8 
12 template <typename Pixel>
13 class SaI3xScaler final : public Scaler3<Pixel>
14 {
15 public:
16  explicit SaI3xScaler(const PixelOperations<Pixel>& pixelOps);
17  void scaleBlank1to3(
18  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
19  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
20  void scale1x1to3x3(FrameSource& src,
21  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
22  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
23 
24 private:
25  inline Pixel blend(Pixel p1, Pixel p2);
26 
27  template <unsigned NX, unsigned NY>
28  void scaleFixed(FrameSource& src,
29  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
30  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
31  void scaleAny(FrameSource& src,
32  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
33  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY)
34  __restrict;
35 
36  PixelOperations<Pixel> pixelOps;
37 };
38 
39 } // namespace openmsx
40 
41 #endif
SaI3xScaler(const PixelOperations< Pixel > &pixelOps)
Definition: SaI3xScaler.cc:18
void scaleBlank1to3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: SaI3xScaler.cc:25
void scale1x1to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Definition: SaI3xScaler.cc:537
2xSaI algorithm: edge-detection which produces a rounded look.
Definition: SaI3xScaler.hh:13
uint32_t Pixel
Interface for getting lines from a video frame.
Definition: FrameSource.hh:14
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Base class for 3x scalers.
Definition: Scaler3.hh:11