22template<std::
unsigned_
integral Pixel>
26 auto r =
getLine(line, std::span<Pixel>{buf0});
27 assert(r.size() == 320);
28 return std::span<const Pixel, 320>(r);
32 auto line0 =
getLine(2 * line + 0, std::span<Pixel>(buf0));
33 auto line1 =
getLine(2 * line + 1, std::span<Pixel>(buf1));
36 blend(line0, line1, buf0);
41template<std::
unsigned_
integral Pixel>
45 auto r =
getLine(line, std::span<Pixel>(buf));
46 assert(r.size() == 640);
47 return std::span<const Pixel, 640>(r);
50 auto r =
getLine(line / 2, std::span<Pixel>(buf));
51 assert(r.size() == 640);
52 return std::span<const Pixel, 640>(r);
56template<std::
unsigned_
integral Pixel>
60 unsigned l2 = (2 * line) / 3;
61 auto line0 =
getLine(l2 + 0, std::span<Pixel>(buf0));
62 if ((line % 3) != 1) {
63 assert(line0.size() == 960);
64 return std::span<const Pixel, 960>(line0);
67 auto line1 =
getLine(l2 + 1, std::span<Pixel>(buf1));
70 blend(line0, line1, buf0);
74 auto r =
getLine(line / 3, std::span<Pixel>(buf0));
75 assert(r.size() == 960);
76 return std::span<const Pixel, 960>(r);
80template<std::
unsigned_
integral Pixel>
82 std::span<const Pixel> in, std::span<Pixel> out)
const
87 if (in.data() == out.data()) [[unlikely]] {
104 switch (out.size()) {
145 switch (out.size()) {
186 switch (out.size()) {
227 switch (out.size()) {
268 switch (out.size()) {
309 switch (out.size()) {
357template std::span<const uint16_t, 320> FrameSource::getLinePtr320_240<uint16_t>(
unsigned, std::span<uint16_t, 320>)
const;
358template std::span<const uint16_t, 640> FrameSource::getLinePtr640_480<uint16_t>(
unsigned, std::span<uint16_t, 640>)
const;
359template std::span<const uint16_t, 960> FrameSource::getLinePtr960_720<uint16_t>(
unsigned, std::span<uint16_t, 960>)
const;
360template void FrameSource::scaleLine<uint16_t>(std::span<const uint16_t>, std::span<uint16_t>)
const;
362#if HAVE_32BPP || COMPONENT_GL
363template std::span<const uint32_t, 320> FrameSource::getLinePtr320_240<uint32_t>(
unsigned, std::span<uint32_t, 320>)
const;
364template std::span<const uint32_t, 640> FrameSource::getLinePtr640_480<uint32_t>(
unsigned, std::span<uint32_t, 640>)
const;
365template std::span<const uint32_t, 960> FrameSource::getLinePtr960_720<uint32_t>(
unsigned, std::span<uint32_t, 960>)
const;
366template void FrameSource::scaleLine<uint32_t>(std::span<const uint32_t>, std::span<uint32_t>)
const;
BlendLines functor Generate an output line that is an interpolation of two input lines.
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.
void scaleLine(std::span< const Pixel > in, std::span< Pixel > out) const
FrameSource(const PixelFormat &format)
std::span< const Pixel > getLine(int line, std::span< Pixel > buf) const
Gets a pointer to the pixels of the given line number.
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.
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.
unsigned getHeight() const
Gets the number of lines in this frame.
Scale_XonY functors Transforms an input line of pixel to an output line (possibly) with a different w...
constexpr mat4 scale(const vec3 &xyz)
void format(SectorAccessibleDisk &disk, MSXBootSectorType bootType)
Format the given disk (= a single partition).
This file implemented 3 utility functions:
auto copy(InputRange &&range, OutputIter out)
#define VLA_SSE_ALIGNED(TYPE, NAME, LENGTH)