openMSX
Scaler1.hh
Go to the documentation of this file.
1 #ifndef SCALER1_HH
2 #define SCALER1_HH
3 
4 #include "Scaler.hh"
5 #include "PixelOperations.hh"
6 
7 namespace openmsx {
8 
9 template <typename Pixel>
10 class Scaler1 final : public Scaler<Pixel>
11 {
12 public:
13  explicit Scaler1(const PixelOperations<Pixel>& pixelOps);
14 
15  void scaleImage(FrameSource& src, const RawFrame* superImpose,
16  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
17  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY) override;
18 
19 protected:
20  void dispatchScale(FrameSource& src,
21  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
22  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
23  virtual void scaleBlank1to1(
24  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
25  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
26  virtual void scaleBlank2to1(
27  FrameSource& src, unsigned srcStartY, unsigned srcEndY,
28  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
29  virtual void scale2x1to3x1(FrameSource& src,
30  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
31  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
32  virtual void scale2x2to3x1(FrameSource& src,
33  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
34  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
35  virtual void scale1x1to1x1(FrameSource& src,
36  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
37  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
38  virtual void scale1x2to1x1(FrameSource& src,
39  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
40  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
41  virtual void scale4x1to3x1(FrameSource& src,
42  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
43  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
44  virtual void scale4x2to3x1(FrameSource& src,
45  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
46  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
47  virtual void scale2x1to1x1(FrameSource& src,
48  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
49  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
50  virtual void scale2x2to1x1(FrameSource& src,
51  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
52  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
53  virtual void scale8x1to3x1(FrameSource& src,
54  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
55  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
56  virtual void scale8x2to3x1(FrameSource& src,
57  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
58  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
59  virtual void scale4x1to1x1(FrameSource& src,
60  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
61  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
62  virtual void scale4x2to1x1(FrameSource& src,
63  unsigned srcStartY, unsigned srcEndY, unsigned srcWidth,
64  ScalerOutput<Pixel>& dst, unsigned dstStartY, unsigned dstEndY);
65 
67 };
68 
69 } // namespace openmsx
70 
71 #endif
virtual void scale2x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:175
virtual void scale2x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:185
Abstract base class for scalers.
virtual void scale1x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:119
virtual void scale8x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:205
const PixelOperations< Pixel > pixelOps
Definition: Scaler1.hh:66
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: Scaler1.cc:310
void dispatchScale(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:235
Interface for getting lines from a video frame.
Definition: FrameSource.hh:14
virtual void scaleBlank2to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:45
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
virtual void scale2x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:99
virtual void scaleBlank1to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:33
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Scaler1(const PixelOperations< Pixel > &pixelOps)
Definition: Scaler1.cc:15
virtual void scale2x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:109
virtual void scale4x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:155
virtual void scale8x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:195
virtual void scale4x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:165
virtual void scale4x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:225
virtual void scale4x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:215
virtual void scale1x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:137