openMSX
DeinterlacedFrame.cc
Go to the documentation of this file.
2#include <cassert>
3
4namespace openmsx {
5
7{
9 // TODO: I think these assertions make sense, but we cannot currently
10 // guarantee them. See TODO in PostProcessor::paint.
11 //assert(evenField->getField() == FrameSource::FieldType::EVEN);
12 //assert(oddField->getField() == FrameSource::FieldType::ODD);
13 assert(evenField->getHeight() == oddField->getHeight());
14 setHeight(2 * evenField->getHeight());
15 fields[0] = evenField;
16 fields[1] = oddField;
17}
18
19unsigned DeinterlacedFrame::getLineWidth(unsigned line) const
20{
21 return fields[line & 1]->getLineWidth(line >> 1);
22}
23
24std::span<const FrameSource::Pixel> DeinterlacedFrame::getUnscaledLine(
25 unsigned line, std::span<Pixel> helpBuf) const
26{
27 return fields[line & 1]->getUnscaledLine(line >> 1, helpBuf);
28}
29
30} // namespace openmsx
void init(FrameSource *evenField, FrameSource *oddField)
Interface for getting lines from a video frame.
void setHeight(unsigned height_)
void init(FieldType fieldType_)
(Re)initialize an existing FrameSource.
unsigned getHeight() const
Gets the number of lines in this frame.
@ NONINTERLACED
Interlacing is off for this frame.
This file implemented 3 utility functions:
Definition Autofire.cc:11