openMSX
Public Member Functions | List of all members
openmsx::SuperImposedVideoFrame< Pixel > Class Template Referencefinal

This class represents a frame that is the (per-pixel) alpha-blend of a (laser-disc) video frame and a V99x8 (or tms9918) video frame. More...

#include <SuperImposedVideoFrame.hh>

Inheritance diagram for openmsx::SuperImposedVideoFrame< Pixel >:
Inheritance graph
[legend]
Collaboration diagram for openmsx::SuperImposedVideoFrame< Pixel >:
Collaboration graph
[legend]

Public Member Functions

 SuperImposedVideoFrame (const FrameSource &src, const FrameSource &super, const PixelOperations< Pixel > &pixelOps)
 
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...
 
- 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...
 
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 PixelgetLine (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 PixelFormatgetPixelFormat () 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...
 
- Protected Member Functions inherited from openmsx::FrameSource
 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
 

Detailed Description

template<std::unsigned_integral Pixel>
class openmsx::SuperImposedVideoFrame< Pixel >

This class represents a frame that is the (per-pixel) alpha-blend of a (laser-disc) video frame and a V99x8 (or tms9918) video frame.

This is different from a generic 'SuperImposedFrame' class because it always outputs the resolution of the MSX frame. Except for the top/bottom border line, there we return a line with width=320. So usually this means the laserdisc video gets downscaled to 320x240 resolution. The rational for this was that we want the scalers to work on the proper MSX resolution. So the MSX graphics get scaled in the same way whether superimpose is enabled or not.

Definition at line 21 of file SuperImposedVideoFrame.hh.

Constructor & Destructor Documentation

◆ SuperImposedVideoFrame()

template<std::unsigned_integral Pixel>
openmsx::SuperImposedVideoFrame< Pixel >::SuperImposedVideoFrame ( const FrameSource src,
const FrameSource super,
const PixelOperations< Pixel > &  pixelOps 
)

Member Function Documentation

◆ getLineInfo()

template<std::unsigned_integral Pixel>
const void * openmsx::SuperImposedVideoFrame< Pixel >::getLineInfo ( unsigned  line,
unsigned &  lineWidth,
void *  buf,
unsigned  bufWidth 
) const
overridevirtual

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 requested 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 28 of file SuperImposedVideoFrame.cc.

References VLA_SSE_ALIGNED.

◆ getLineWidth()

template<std::unsigned_integral Pixel>
unsigned openmsx::SuperImposedVideoFrame< Pixel >::getLineWidth ( unsigned  line) const
overridevirtual

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 21 of file SuperImposedVideoFrame.cc.

Referenced by openmsx::RGBTriplet3xScaler< Pixel >::scaleImage().


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