openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::RawFrame Class Referencefinal

A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are applied. More...

#include <RawFrame.hh>

Inheritance diagram for openmsx::RawFrame:
Inheritance graph
[legend]
Collaboration diagram for openmsx::RawFrame:
Collaboration graph
[legend]

Public Member Functions

 RawFrame (const SDL_PixelFormat &format, unsigned maxWidth, unsigned height)
 
template<typename Pixel >
PixelgetLinePtrDirect (unsigned y)
 
unsigned getLineWidthDirect (unsigned y) const
 
void setLineWidth (unsigned line, unsigned width)
 
template<class Pixel >
void setBlank (unsigned line, Pixel color)
 
unsigned getRowLength () const override
 Returns the distance (in pixels) between two consecutive lines. More...
 
V9958RasterizerBorderInfogetBorderInfo ()
 
- Public Member Functions inherited from openmsx::FrameSource
void init (FieldType fieldType_)
 (Re)initialize an existing FrameSource. More...
 
FieldType getField () const
 Gets the role this frame plays in interlacing. More...
 
unsigned getHeight () const
 Gets the number of lines in this frame. More...
 
unsigned getWidth () const
 Get the width of (all) lines in this frame. More...
 
template<typename Pixel >
Pixel getLineColor (unsigned line) const
 Get the (single) color of the given line. More...
 
template<typename Pixel >
const PixelgetLinePtr (int line, unsigned width, Pixel *buf) const
 Gets a pointer to the pixels of the given line number. More...
 
template<typename Pixel >
const PixelgetMultiLinePtr (int line, unsigned numLines, unsigned &actualLines, unsigned width, Pixel *buf) const
 Similar to the above getLinePtr() method, but now tries to get multiple lines at once. More...
 
template<typename Pixel >
const PixelgetLinePtr320_240 (unsigned line, Pixel *buf) const
 Get a pointer to a given line in this frame, the frame is scaled to 320x240 pixels. More...
 
template<typename Pixel >
const PixelgetLinePtr640_480 (unsigned line, Pixel *buf) const
 Get a pointer to a given line in this frame, the frame is scaled to 640x480 pixels. More...
 
template<typename Pixel >
const PixelgetLinePtr960_720 (unsigned line, Pixel *buf) const
 Get a pointer to a given line in this frame, the frame is scaled to 960x720 pixels. More...
 
const SDL_PixelFormat & getSDLPixelFormat () const
 

Protected Member Functions

unsigned getLineWidth (unsigned line) const override
 Gets the number of display pixels on the given line. More...
 
const void * getLineInfo (unsigned line, unsigned &width, void *buf, unsigned bufWidth) const override
 Abstract implementation of getLinePtr(). More...
 
bool hasContiguousStorage () const override
 Returns true when two consecutive rows are also consecutive in memory. More...
 
- Protected Member Functions inherited from openmsx::FrameSource
 FrameSource (const SDL_PixelFormat &format)
 
 ~FrameSource ()=default
 
void setHeight (unsigned height_)
 
template<typename Pixel >
void scaleLine (const Pixel *in, Pixel *out, unsigned inWidth, unsigned outWidth) const
 

Additional Inherited Members

- Public Types inherited from openmsx::FrameSource
enum  FieldType { FIELD_NONINTERLACED, FIELD_EVEN, FIELD_ODD }
 What role does this frame play in interlacing? More...
 

Detailed Description

A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are applied.

Definition at line 25 of file RawFrame.hh.

Constructor & Destructor Documentation

◆ RawFrame()

openmsx::RawFrame::RawFrame ( const SDL_PixelFormat &  format,
unsigned  maxWidth,
unsigned  height 
)

Member Function Documentation

◆ getBorderInfo()

V9958RasterizerBorderInfo& openmsx::RawFrame::getBorderInfo ( )
inline

Definition at line 57 of file RawFrame.hh.

◆ getLineInfo()

const void * openmsx::RawFrame::getLineInfo ( unsigned  line,
unsigned &  lineWidth,
void *  buf,
unsigned  bufWidth 
) const
overrideprotectedvirtual

Abstract implementation of getLinePtr().

Pixel type is unspecified (implementations that care about the exact type should get it via some other mechanism).

Parameters
lineThe line number for the requisted line.
lineWidthOutput parameter, the width of the returned line in pixel units.
bufBuffer space that can optionally be used by the implementation.
bufWidthThe size of the above buffer, in pixel units.
Returns
Pointer to the first pixel of the requested line. This might be the same as the given 'buf' parameter or it might be some internal buffer.

Implements openmsx::FrameSource.

Definition at line 41 of file RawFrame.cc.

References openmsx::MemBuffer< T, ALIGNMENT >::data(), and openmsx::FrameSource::getHeight().

◆ getLinePtrDirect()

template<typename Pixel >
Pixel* openmsx::RawFrame::getLinePtrDirect ( unsigned  y)
inline

Definition at line 31 of file RawFrame.hh.

◆ getLineWidth()

unsigned openmsx::RawFrame::getLineWidth ( unsigned  line) const
overrideprotectedvirtual

Gets the number of display pixels on the given line.

Returns
line width (=1 for a vertical border line)

Implements openmsx::FrameSource.

Definition at line 35 of file RawFrame.cc.

References openmsx::FrameSource::getHeight().

◆ getLineWidthDirect()

unsigned openmsx::RawFrame::getLineWidthDirect ( unsigned  y) const
inline

Definition at line 35 of file RawFrame.hh.

◆ getRowLength()

unsigned openmsx::RawFrame::getRowLength ( ) const
overridevirtual

Returns the distance (in pixels) between two consecutive lines.

Is meant to be used in combination with getMultiLinePtr(). The result is only meaningful when hasContiguousStorage() returns true (also only in that case does getMultiLinePtr() return more than 1 line).

Reimplemented from openmsx::FrameSource.

Definition at line 50 of file RawFrame.cc.

◆ hasContiguousStorage()

bool openmsx::RawFrame::hasContiguousStorage ( ) const
overrideprotectedvirtual

Returns true when two consecutive rows are also consecutive in memory.

Reimplemented from openmsx::FrameSource.

Definition at line 55 of file RawFrame.cc.

◆ setBlank()

template<class Pixel >
void openmsx::RawFrame::setBlank ( unsigned  line,
Pixel  color 
)
inline

Definition at line 46 of file RawFrame.hh.

Referenced by RawFrame().

◆ setLineWidth()

void openmsx::RawFrame::setLineWidth ( unsigned  line,
unsigned  width 
)
inline

Definition at line 39 of file RawFrame.hh.


The documentation for this class was generated from the following files: