DeinterlacedFrame.hh 874 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef DEINTERLACEDFRAME_HH
  2. #define DEINTERLACEDFRAME_HH
  3. #include "FrameSource.hh"
  4. namespace openmsx {
  5. /** Produces a deinterlaced video frame based on two other FrameSources
  6. * (typically two RawFrames) containing the even and odd field.
  7. * This class does not copy the data from the input FrameSources.
  8. */
  9. class DeinterlacedFrame final : public FrameSource
  10. {
  11. public:
  12. explicit DeinterlacedFrame(const PixelFormat& format);
  13. void init(FrameSource* evenField, FrameSource* oddField);
  14. private:
  15. unsigned getLineWidth(unsigned line) const override;
  16. const void* getLineInfo(
  17. unsigned line, unsigned& width,
  18. void* buf, unsigned bufWidth) const override;
  19. /** The original frames whose data will be deinterlaced.
  20. * The even frame is at index 0, the odd frame at index 1.
  21. */
  22. FrameSource* fields[2];
  23. };
  24. } // namespace openmsx
  25. #endif // DEINTERLACEDFRAME_HH