SuperImposedVideoFrame.hh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef SUPERIMPOSEDVIDEOFRAME_HH
  2. #define SUPERIMPOSEDVIDEOFRAME_HH
  3. #include "FrameSource.hh"
  4. #include "PixelOperations.hh"
  5. namespace openmsx {
  6. /** This class represents a frame that is the (per-pixel) alpha-blend of a
  7. * (laser-disc) video frame and a V99x8 (or tms9918) video frame. This is
  8. * different from a generic 'SuperImposedFrame' class because it always
  9. * outputs the resolution of the MSX frame. Except for the top/bottom
  10. * border line, there we return a line with width=320.
  11. * So usually this means the laserdisc video gets downscaled to 320x240
  12. * resolution. The rational for this was that we want the scalers to work
  13. * on the proper MSX resolution. So the MSX graphics get scaled in the same
  14. * way whether superimpose is enabled or not.
  15. */
  16. template <typename Pixel>
  17. class SuperImposedVideoFrame final : public FrameSource
  18. {
  19. public:
  20. SuperImposedVideoFrame(const FrameSource& src, const FrameSource& super,
  21. const PixelOperations<Pixel>& pixelOps);
  22. // FrameSource
  23. unsigned getLineWidth(unsigned line) const override;
  24. const void* getLineInfo(
  25. unsigned line, unsigned& width,
  26. void* buf, unsigned bufWidth) const override;
  27. private:
  28. const FrameSource& src;
  29. const FrameSource& super;
  30. PixelOperations<Pixel> pixelOps;
  31. };
  32. } // namespace openmsx
  33. #endif