openMSX
Scaler3.hh
Go to the documentation of this file.
1 #ifndef SCALER3_HH
2 #define SCALER3_HH
3 
4 #include "Scaler.hh"
5 #include "PixelOperations.hh"
6 
7 namespace openmsx {
8 
11 template <class Pixel> class Scaler3 : public Scaler<Pixel>
12 {
13 public:
14  void scaleImage(FrameSource& src, const RawFrame* superImpose,
15  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
16  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
17 
18 protected:
19  explicit Scaler3(const PixelOperations<Pixel>& pixelOps);
20 
21  void dispatchScale(FrameSource& src,
22  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
23  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
24  virtual void scaleBlank1to3(
25  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
26  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
27  virtual void scaleBlank2to3(
28  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
29  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
30  virtual void scale2x1to9x3(FrameSource& src,
31  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
32  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
33  virtual void scale2x2to9x3(FrameSource& src,
34  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
35  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
36  virtual void scale1x1to3x3(FrameSource& src,
37  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
38  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
39  virtual void scale1x2to3x3(FrameSource& src,
40  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
41  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
42  virtual void scale4x1to9x3(FrameSource& src,
43  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
44  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
45  virtual void scale4x2to9x3(FrameSource& src,
46  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
47  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
48  virtual void scale2x1to3x3(FrameSource& src,
49  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
50  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
51  virtual void scale2x2to3x3(FrameSource& src,
52  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
53  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
54  virtual void scale8x1to9x3(FrameSource& src,
55  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
56  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
57  virtual void scale8x2to9x3(FrameSource& src,
58  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
59  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
60  virtual void scale4x1to3x3(FrameSource& src,
61  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
62  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
63  virtual void scale4x2to3x3(FrameSource& src,
64  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
65  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
66 
68 };
69 
70 } // namespace openmsx
71 
72 #endif
virtual void scale1x2to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:133
virtual void scale4x1to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:203
Abstract base class for scalers.
virtual void scaleBlank2to3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:33
virtual void scale2x2to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:113
Interface for getting lines from a video frame.
Definition: FrameSource.hh:14
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
const PixelOperations< Pixel > pixelOps
Definition: Scaler3.hh:67
virtual void scale4x2to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:153
virtual void scale2x2to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:173
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual void scale4x1to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:143
virtual void scale8x2to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:193
virtual void scaleBlank1to3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:19
virtual void scale1x1to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:123
virtual void scale2x1to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:103
virtual void scale2x1to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:163
void dispatchScale(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:223
Scaler3(const PixelOperations< Pixel > &pixelOps)
Definition: Scaler3.cc:13
void scaleImage(FrameSource &src, const RawFrame *superImpose, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY) override
Scales the image in the given area, which must consist of lines which are all equally wide...
Definition: Scaler3.cc:298
virtual void scale8x1to9x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:183
virtual void scale4x2to3x3(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler3.cc:213
Base class for 3x scalers.
Definition: Scaler3.hh:11