20 auto r =
getLine(line, std::span<Pixel>{buf0});
21 assert(r.size() == 320);
22 return std::span<const Pixel, 320>(r);
26 auto line0 =
getLine(2 * line + 0, std::span<Pixel>(buf0));
27 auto line1 =
getLine(2 * line + 1, std::span<Pixel>(buf1));
36 auto r =
getLine(line, std::span<Pixel>(buf));
37 assert(r.size() == 640);
38 return std::span<const Pixel, 640>(r);
41 auto r =
getLine(line / 2, std::span<Pixel>(buf));
42 assert(r.size() == 640);
43 return std::span<const Pixel, 640>(r);
50 unsigned l2 = (2 * line) / 3;
51 auto line0 =
getLine(l2 + 0, std::span<Pixel>(buf0));
52 if ((line % 3) != 1) {
53 assert(line0.size() == 960);
54 return std::span<const Pixel, 960>(line0);
57 auto line1 =
getLine(l2 + 1, std::span<Pixel>(buf1));
62 auto r =
getLine(line / 3, std::span<Pixel>(buf0));
63 assert(r.size() == 960);
64 return std::span<const Pixel, 960>(r);
69 std::span<const Pixel> in, std::span<Pixel> out)
const
72 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)
constexpr void fill(ForwardRange &&range, const T &value)
constexpr auto copy(InputRange &&range, OutputIter out)