openMSX
DeinterlacedFrame.cc
Go to the documentation of this file.
1 #include "DeinterlacedFrame.hh"
2 #include <cassert>
3 
4 namespace openmsx {
5 
8 {
9 }
10 
11 void DeinterlacedFrame::init(FrameSource* evenField, FrameSource* oddField)
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 
24 unsigned DeinterlacedFrame::getLineWidth(unsigned line) const
25 {
26  return fields[line & 1]->getLineWidth(line >> 1);
27 }
28 
29 const 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
openmsx::DiskImageUtils::format
void format(SectorAccessibleDisk &disk, bool dos1)
Format the given disk (= a single partition).
Definition: DiskImageUtils.cc:182
openmsx::FrameSource::getLineWidth
virtual unsigned getLineWidth(unsigned line) const =0
Gets the number of display pixels on the given line.
openmsx::PixelFormat
Definition: PixelFormat.hh:9
openmsx::FrameSource::setHeight
void setHeight(unsigned height_)
Definition: FrameSource.hh:197
openmsx::FrameSource::getLineInfo
virtual const void * getLineInfo(unsigned line, unsigned &lineWidth, void *buf, unsigned bufWidth) const =0
Abstract implementation of getLinePtr().
openmsx::FrameSource::FIELD_NONINTERLACED
@ FIELD_NONINTERLACED
Interlacing is off for this frame.
Definition: FrameSource.hh:21
openmsx::FrameSource::init
void init(FieldType fieldType_)
(Re)initialize an existing FrameSource.
Definition: FrameSource.hh:33
openmsx::FrameSource::getHeight
unsigned getHeight() const
Gets the number of lines in this frame.
Definition: FrameSource.hh:43
openmsx::DeinterlacedFrame::init
void init(FrameSource *evenField, FrameSource *oddField)
Definition: DeinterlacedFrame.cc:11
DeinterlacedFrame.hh
openmsx::FrameSource
Interface for getting lines from a video frame.
Definition: FrameSource.hh:14
openmsx::DeinterlacedFrame::DeinterlacedFrame
DeinterlacedFrame(const PixelFormat &format)
Definition: DeinterlacedFrame.cc:6
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5