openMSX
|
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are applied. More...
#include <RawFrame.hh>
Public Member Functions | |
RawFrame (const PixelFormat &format, unsigned maxWidth, unsigned height) | |
template<std::unsigned_integral Pixel> | |
std::span< Pixel > | getLineDirect (unsigned y) |
unsigned | getLineWidthDirect (unsigned y) const |
void | setLineWidth (unsigned line, unsigned width) |
template<std::unsigned_integral Pixel> | |
void | setBlank (unsigned line, Pixel color) |
![]() | |
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... | |
virtual unsigned | getLineWidth (unsigned line) const =0 |
Gets the number of display pixels on the given line. More... | |
unsigned | getWidth () const |
Get the width of (all) lines in this frame. More... | |
template<std::unsigned_integral Pixel> | |
Pixel | getLineColor (unsigned line) const |
Get the (single) color of the given line. More... | |
template<std::unsigned_integral Pixel> | |
std::span< const Pixel > | getLine (int line, std::span< Pixel > buf) const |
Gets a pointer to the pixels of the given line number. More... | |
virtual const void * | getLineInfo (unsigned line, unsigned &lineWidth, void *buf, unsigned bufWidth) const =0 |
Abstract implementation of getLinePtr(). More... | |
template<std::unsigned_integral Pixel> | |
std::span< const Pixel, 320 > | getLinePtr320_240 (unsigned line, std::span< Pixel, 320 > buf) const |
Get a pointer to a given line in this frame, the frame is scaled to 320x240 pixels. More... | |
template<std::unsigned_integral Pixel> | |
std::span< const Pixel, 640 > | getLinePtr640_480 (unsigned line, std::span< Pixel, 640 > buf) const |
Get a pointer to a given line in this frame, the frame is scaled to 640x480 pixels. More... | |
template<std::unsigned_integral Pixel> | |
std::span< const Pixel, 960 > | getLinePtr960_720 (unsigned line, std::span< Pixel, 960 > buf) const |
Get a pointer to a given line in this frame, the frame is scaled to 960x720 pixels. More... | |
const PixelFormat & | getPixelFormat () 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... | |
![]() | |
FrameSource (const PixelFormat &format) | |
~FrameSource ()=default | |
void | setHeight (unsigned height_) |
virtual bool | hasContiguousStorage () const |
Returns true when two consecutive rows are also consecutive in memory. More... | |
template<std::unsigned_integral Pixel> | |
void | scaleLine (std::span< const Pixel > in, std::span< Pixel > out) const |
Additional Inherited Members | |
![]() | |
enum | FieldType { FIELD_NONINTERLACED , FIELD_EVEN , FIELD_ODD } |
What role does this frame play in interlacing? More... | |
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are applied.
Definition at line 14 of file RawFrame.hh.
openmsx::RawFrame::RawFrame | ( | const PixelFormat & | format, |
unsigned | maxWidth, | ||
unsigned | height | ||
) |
Definition at line 7 of file RawFrame.cc.
References openmsx::FrameSource::FIELD_NONINTERLACED, openmsx::DiskImageUtils::format(), openmsx::FrameSource::init(), openmsx::MemBuffer< T, ALIGNMENT >::resize(), setBlank(), openmsx::FrameSource::setHeight(), and xrange().
|
inline |
Definition at line 20 of file RawFrame.hh.
References openmsx::MemBuffer< T, ALIGNMENT >::data(), and openmsx::FrameSource::getHeight().
|
overrideprotectedvirtual |
Abstract implementation of getLinePtr().
Pixel type is unspecified (implementations that care about the exact type should get it via some other mechanism).
line | The line number for the requested line. |
lineWidth | Output parameter, the width of the returned line in pixel units. |
buf | Buffer space that can optionally be used by the implementation. |
bufWidth | The size of the above buffer, in pixel units. |
Implements openmsx::FrameSource.
Definition at line 41 of file RawFrame.cc.
References openmsx::MemBuffer< T, ALIGNMENT >::data(), and openmsx::FrameSource::getHeight().
|
overrideprotectedvirtual |
Gets the number of display pixels on the given line.
Implements openmsx::FrameSource.
Definition at line 35 of file RawFrame.cc.
References openmsx::FrameSource::getHeight().
|
inline |
Definition at line 25 of file RawFrame.hh.
References openmsx::FrameSource::getHeight().
|
overrideprotectedvirtual |
Returns true when two consecutive rows are also consecutive in memory.
Reimplemented from openmsx::FrameSource.
Definition at line 50 of file RawFrame.cc.
|
inline |
Definition at line 37 of file RawFrame.hh.
References openmsx::FrameSource::getHeight().
Referenced by RawFrame().
|
inline |
Definition at line 30 of file RawFrame.hh.
References openmsx::FrameSource::getHeight().