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
void init(FrameSource *evenField, FrameSource *oddField)
DeinterlacedFrame(const PixelFormat &format)
Interface for getting lines from a video frame.
Definition: FrameSource.hh:15
virtual unsigned getLineWidth(unsigned line) const =0
Gets the number of display pixels on the given line.
virtual const void * getLineInfo(unsigned line, unsigned &lineWidth, void *buf, unsigned bufWidth) const =0
Abstract implementation of getLinePtr().
void setHeight(unsigned height_)
Definition: FrameSource.hh:198
void init(FieldType fieldType_)
(Re)initialize an existing FrameSource.
Definition: FrameSource.hh:34
unsigned getHeight() const
Gets the number of lines in this frame.
Definition: FrameSource.hh:44
@ FIELD_NONINTERLACED
Interlacing is off for this frame.
Definition: FrameSource.hh:22
void format(SectorAccessibleDisk &disk, bool dos1)
Format the given disk (= a single partition).
This file implemented 3 utility functions:
Definition: Autofire.cc:5