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
openmsx::Scaler1
Definition: Scaler1.hh:10
openmsx::PixelOperations
Definition: PixelOperations.hh:142
openmsx::Scaler1::scale2x1to3x1
virtual void scale2x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:99
openmsx::Scaler
Abstract base class for scalers.
Definition: FBPostProcessor.hh:13
openmsx::Scaler1::scale4x2to1x1
virtual void scale4x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:225
openmsx::Scaler1::scaleImage
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
openmsx::Scaler1::scale4x1to1x1
virtual void scale4x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:215
openmsx::ScalerOutput
Definition: Scaler.hh:8
Scaler.hh
openmsx::Scaler1::scale2x1to1x1
virtual void scale2x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:175
openmsx::Scaler1::scale1x2to1x1
virtual void scale1x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:137
openmsx::Scaler1::scale4x2to3x1
virtual void scale4x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:165
openmsx::Scaler1::scale4x1to3x1
virtual void scale4x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:155
openmsx::RawFrame
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
PixelOperations.hh
openmsx::Scaler1::scale8x2to3x1
virtual void scale8x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:205
openmsx::Scaler1::pixelOps
const PixelOperations< Pixel > pixelOps
Definition: Scaler1.hh:66
openmsx::Scaler1::scale1x1to1x1
virtual void scale1x1to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:119
openmsx::FrameSource
Interface for getting lines from a video frame.
Definition: FrameSource.hh:13
openmsx::Scaler1::scale8x1to3x1
virtual void scale8x1to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:195
openmsx::Scaler1::scale2x2to3x1
virtual void scale2x2to3x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:109
openmsx::Scaler1::dispatchScale
void dispatchScale(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:235
openmsx::Scaler1::Scaler1
Scaler1(const PixelOperations< Pixel > &pixelOps)
Definition: Scaler1.cc:15
openmsx::Scaler1::scale2x2to1x1
virtual void scale2x2to1x1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, unsigned srcWidth, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:185
openmsx::Scaler1::scaleBlank2to1
virtual void scaleBlank2to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:45
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::Scaler1::scaleBlank1to1
virtual void scaleBlank1to1(FrameSource &src, unsigned srcStartY, unsigned srcEndY, ScalerOutput< Pixel > &dst, unsigned dstStartY, unsigned dstEndY)
Definition: Scaler1.cc:33