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 
66 protected:
68 };
69 
70 } // namespace openmsx
71 
72 #endif
Interface for getting lines from a video frame.
Definition: FrameSource.hh:16
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:14
virtual void scale4x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:166
virtual void scale1x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:138
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:311
virtual void scale2x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:186
virtual void scaleBlank2to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:46
virtual void scale2x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:176
virtual void scale2x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:100
virtual void scale2x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:110
const PixelOperations< Pixel > pixelOps
Definition: Scaler1.hh:67
void dispatchScale(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:236
virtual void scale8x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:196
virtual void scale1x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:120
virtual void scaleBlank1to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:34
virtual void scale4x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:156
virtual void scale8x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:206
virtual void scale4x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:226
virtual void scale4x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:216
Scaler1(const PixelOperations< Pixel > &pixelOps)
Definition: Scaler1.cc:16
Abstract base class for scalers.
Definition: Scaler.hh:14
This file implemented 3 utility functions:
Definition: Autofire.cc:9