10template<std::
unsigned_
integral Pixel>
15 , src(src_), super(super_), pixelOps(pixelOps_)
20template<std::
unsigned_
integral Pixel>
23 unsigned width = src.getLineWidth(line);
24 return (width == 1) ? 320 : width;
27template<std::
unsigned_
integral Pixel>
29 unsigned line,
unsigned& width,
void* buf1_,
unsigned bufWidth)
const
31 auto* buf1 =
static_cast<Pixel*
>(buf1_);
36 auto* srcLine =
static_cast<const Pixel*
>(
37 src.getLineInfo(line, width, buf1, bufWidth));
41 memset(std::span{buf1, 320}, srcLine[0]);
48 assert(super.getHeight() == 480);
50 if (src.getHeight() == 240) {
52 auto sup0 = super.getLine(2 * line + 0, buf2);
53 auto sup1 = super.getLine(2 * line + 1, buf3);
55 blend(sup0, sup1, buf2);
56 return std::span<const Pixel>(buf2);
58 assert(src.getHeight() == super.getHeight());
59 return super.getLine(line, buf2);
66 blend(std::span{srcLine, width}, supLine, std::span{buf1, width});
AlphaBlendLines functor Generate an output line that is a per-pixel-alpha-blend of the two input line...
BlendLines functor Generate an output line that is an interpolation of two input lines.
Interface for getting lines from a video frame.
void setHeight(unsigned height_)
unsigned getHeight() const
Gets the number of lines in this frame.
This class represents a frame that is the (per-pixel) alpha-blend of a (laser-disc) video frame and a...
SuperImposedVideoFrame(const FrameSource &src, const FrameSource &super, const PixelOperations< Pixel > &pixelOps)
const void * getLineInfo(unsigned line, unsigned &width, void *buf, unsigned bufWidth) const override
Abstract implementation of getLinePtr().
unsigned getLineWidth(unsigned line) const override
Gets the number of display pixels on the given line.
This file implemented 3 utility functions:
#define VLA_SSE_ALIGNED(TYPE, NAME, LENGTH)