19 auto r =
getLine(line, std::span<Pixel>{buf0});
20 assert(r.size() == 320);
21 return std::span<const Pixel, 320>(r);
25 auto line0 =
getLine(2 * line + 0, std::span<Pixel>(buf0));
26 auto line1 =
getLine(2 * line + 1, std::span<Pixel>(buf1));
35 auto r =
getLine(line, std::span<Pixel>(buf));
36 assert(r.size() == 640);
37 return std::span<const Pixel, 640>(r);
40 auto r =
getLine(line / 2, std::span<Pixel>(buf));
41 assert(r.size() == 640);
42 return std::span<const Pixel, 640>(r);
49 unsigned l2 = (2 * line) / 3;
50 auto line0 =
getLine(l2 + 0, std::span<Pixel>(buf0));
51 if ((line % 3) != 1) {
52 assert(line0.size() == 960);
53 return std::span<const Pixel, 960>(line0);
56 auto line1 =
getLine(l2 + 1, std::span<Pixel>(buf1));
61 auto r =
getLine(line / 3, std::span<Pixel>(buf0));
62 assert(r.size() == 960);
63 return std::span<const Pixel, 960>(r);
68 std::span<const Pixel> in, std::span<Pixel> out)
const
71 if (in.data() == out.data()) [[unlikely]] {
89 case 1: out[0] = in[0];
break;
101 switch (out.size()) {
102 case 1: out[0] = in[0];
break;
114 switch (out.size()) {
115 case 1: out[0] = in[0];
break;
127 switch (out.size()) {
128 case 1: out[0] = in[0];
break;
140 switch (out.size()) {
141 case 1: out[0] = in[0];
break;
153 switch (out.size()) {
154 case 1: out[0] = in[0];
break;
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, 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.
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.
void scaleLine(std::span< const Pixel > in, std::span< Pixel > out) const
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.
unsigned getHeight() const
Gets the number of lines in this frame.
This file implemented 3 utility functions:
void scale_3on1(std::span< const Pixel > in, std::span< Pixel > out)
void blendLines(std::span< const Pixel > in1, std::span< const Pixel > in2, std::span< Pixel > out)
BlendLines functor Generate an output line that is an interpolation of two input lines.
void scale_2on1(std::span< const Pixel > in, std::span< Pixel > out)
void scale_2on3(std::span< const Pixel > in, std::span< Pixel > out)
void scale_4on9(std::span< const Pixel > in, std::span< Pixel > out)
void scale_6on1(std::span< const Pixel > in, std::span< Pixel > out)
void scale_1on2(std::span< const Pixel > in, std::span< Pixel > out)
void scale_1on3(std::span< const Pixel > in, std::span< Pixel > out)
Scale_XonY functions Transforms an input line of pixel to an output line (possibly) with a different ...
void scale_4on3(std::span< const Pixel > in, std::span< Pixel > out)
void scale_3on2(std::span< const Pixel > in, std::span< Pixel > out)
void scale_3on8(std::span< const Pixel > in, std::span< Pixel > out)
void scale_2on9(std::span< const Pixel > in, std::span< Pixel > out)
void scale_1on4(std::span< const Pixel > in, std::span< Pixel > out)
CharacterConverter::Pixel Pixel
void scale_1on6(std::span< const Pixel > in, std::span< Pixel > out)
void scale_4on1(std::span< const Pixel > in, std::span< Pixel > out)
void scale_3on4(std::span< const Pixel > in, std::span< Pixel > out)
void scale_8on9(std::span< const Pixel > in, std::span< Pixel > out)
void scale_8on3(std::span< const Pixel > in, std::span< Pixel > out)
auto copy(InputRange &&range, OutputIter out)
#define VLA_SSE_ALIGNED(TYPE, NAME, LENGTH)