openMSX
DeinterlacedFrame.cc
Go to the documentation of this file.
2#include <cassert>
3
4namespace openmsx {
5
8{
9}
10
12{
14 // TODO: I think these assertions make sense, but we cannot currently
15 // guarantee them. See TODO in PostProcessor::paint.
16 //assert(evenField->getField() == FrameSource::FIELD_EVEN);
17 //assert(oddField->getField() == FrameSource::FIELD_ODD);
18 assert(evenField->getHeight() == oddField->getHeight());
19 setHeight(2 * evenField->getHeight());
20 fields[0] = evenField;
21 fields[1] = oddField;
22}
23
24unsigned DeinterlacedFrame::getLineWidth(unsigned line) const
25{
26 return fields[line & 1]->getLineWidth(line >> 1);
27}
28
29const void* DeinterlacedFrame::getLineInfo(
30 unsigned line, unsigned& width, void* buf, unsigned bufWidth) const
31{
32 return fields[line & 1]->getLineInfo(line >> 1, width, buf, bufWidth);
33}
34
35} // namespace openmsx
void init(FrameSource *evenField, FrameSource *oddField)
DeinterlacedFrame(const PixelFormat &format)
Interface for getting lines from a video frame.
Definition: FrameSource.hh:20
void setHeight(unsigned height_)
Definition: FrameSource.hh:159
void init(FieldType fieldType_)
(Re)initialize an existing FrameSource.
Definition: FrameSource.hh:39
unsigned getHeight() const
Gets the number of lines in this frame.
Definition: FrameSource.hh:49
@ FIELD_NONINTERLACED
Interlacing is off for this frame.
Definition: FrameSource.hh:27
void format(SectorAccessibleDisk &disk, bool dos1)
Format the given disk (= a single partition).
This file implemented 3 utility functions:
Definition: Autofire.cc:9