openMSX
Scaler2.hh
Go to the documentation of this file.
1 #ifndef SCALER2_HH
2 #define SCALER2_HH
3 
4 #include "Scaler.hh"
5 #include "PixelOperations.hh"
6 
7 namespace openmsx {
8 
11 template <class Pixel> class Scaler2 : 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 Scaler2(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 scaleBlank1to2(
25  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
26  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
27  virtual void scaleBlank1to1(
28  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
29  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
30  virtual void scale1x1to3x2(FrameSource& src,
31  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
32  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
33  virtual void scale1x1to3x1(FrameSource& src,
34  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
35  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
36  virtual void scale1x1to2x2(FrameSource& src,
37  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
38  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
39  virtual void scale1x1to2x1(FrameSource& src,
40  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
41  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
42  virtual void scale2x1to3x2(FrameSource& src,
43  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
44  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
45  virtual void scale2x1to3x1(FrameSource& src,
46  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
47  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
48  virtual void scale1x1to1x2(FrameSource& src,
49  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
50  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
51  virtual void scale1x1to1x1(FrameSource& src,
52  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
53  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
54  virtual void scale4x1to3x2(FrameSource& src,
55  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
56  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
57  virtual void scale4x1to3x1(FrameSource& src,
58  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
59  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
60  virtual void scale2x1to1x2(FrameSource& src,
61  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
62  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
63  virtual void scale2x1to1x1(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 scale1x1to2x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:119
virtual void scale4x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:185
virtual void scale1x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:93
Abstract base class for scalers.
virtual void scaleBlank1to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:33
virtual void scale1x1to1x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:149
Base class for 2x scalers.
Definition: Scaler2.hh:11
virtual void scale4x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:195
Interface for getting lines from a video frame.
Definition: FrameSource.hh:14
void dispatchScale(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:225
virtual void scale2x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:129
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
virtual void scale2x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:215
virtual void scale2x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:139
Scaler2(const PixelOperations< Pixel > &pixelOps)
Definition: Scaler2.cc:14
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual void scaleBlank1to2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:20
virtual void scale1x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:168
virtual void scale1x1to3x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:83
const PixelOperations< Pixel > pixelOps
Definition: Scaler2.hh:67
virtual void scale1x1to2x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:109
virtual void scale2x1to1x2(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler2.cc:205
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: Scaler2.cc:300