12template<std::
unsigned_
integral Pixel>
18 , superImpose(superImpose_)
23template<std::
unsigned_
integral Pixel>
26 return output.getWidth();
29template<std::
unsigned_
integral Pixel>
32 return output.getHeight();
35template<std::
unsigned_
integral Pixel>
38 return output.acquireLine(y);
41template<std::
unsigned_
integral Pixel>
44 unsigned width = output.getWidth();
45 assert(buf.size() == width);
48 auto srcLine = getSrcLine(y, buf2);
50 alphaBlend(buf, srcLine, buf);
51 output.releaseLine(y, buf);
54template<std::
unsigned_
integral Pixel>
57 auto dstLine = output.acquireLine(y);
58 if (pixelOps.isFullyOpaque(color)) {
60 memset(dstLine, color);
62 auto srcLine = getSrcLine(y, dstLine);
63 if (pixelOps.isFullyTransparent(color)) {
67 if (srcLine.data() != dstLine.data()) {
69 copy(srcLine, dstLine);
73 alphaBlend(color, srcLine, dstLine);
76 output.releaseLine(y, dstLine);
79template<std::
unsigned_
integral Pixel>
82 auto width = buf.size();
84 return superImpose.getLinePtr320_240(y, std::span<Pixel, 320>(buf));
85 }
else if (width == 640) {
86 return superImpose.getLinePtr640_480(y, std::span<Pixel, 640>(buf));
87 }
else if (width == 960) {
88 return superImpose.getLinePtr960_720(y, std::span<Pixel, 960>(buf));
97template class SuperImposeScalerOutput<uint16_t>;
100template class SuperImposeScalerOutput<uint32_t>;
AlphaBlendLines functor Generate an output line that is a per-pixel-alpha-blend of the two input line...
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
unsigned getHeight() const override
std::span< Pixel > acquireLine(unsigned y) override
unsigned getWidth() const override
void fillLine(unsigned y, Pixel color) override
void releaseLine(unsigned y, std::span< Pixel > buf) override
SuperImposeScalerOutput(ScalerOutput< Pixel > &output, const RawFrame &superImpose_, const PixelOperations< Pixel > &pixelOps_)
This file implemented 3 utility functions:
auto copy(InputRange &&range, OutputIter out)
#define VLA_SSE_ALIGNED(TYPE, NAME, LENGTH)