OXYGENHUB
◆ main openmsx / src / video / DeinterlacedFrame.hh
877 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef DEINTERLACEDFRAME_HH
2
#define DEINTERLACEDFRAME_HH
3
4
#include "FrameSource.hh"
5
6
#include <array>
7
8
namespace openmsx {
9
10
/** Produces a deinterlaced video frame based on two other FrameSources
11
  * (typically two RawFrames) containing the even and odd field.
12
  * This class does not copy the data from the input FrameSources.
13
  */
14
class DeinterlacedFrame final : public FrameSource
15
{
16
public:
17
	void init(FrameSource* evenField, FrameSource* oddField);
18
19
private:
20
	[[nodiscard]] unsigned getLineWidth(unsigned line) const override;
21
	[[nodiscard]] std::span<const Pixel> getUnscaledLine(
22
		unsigned line, std::span<Pixel> helpBuf) const override;
23
24
private:
25
	/** The original frames whose data will be deinterlaced.
26
	  * The even frame is at index 0, the odd frame at index 1.
27
	  */
28
	std::array<FrameSource*, 2> fields;
29
};
30
31
} // namespace openmsx
32
33
#endif // DEINTERLACEDFRAME_HH