|
Haio 0.2.X
Homebrew Asset IO/CDN
|
Concepts | |
| concept | Haio::Codecs::Movable |
the hot loops, writing pixels into a buffer the caller already owns. this is where the simd lives.
| Result< void > Haio::Codecs::Move< Color::BGR888, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
the same three bytes the other way round, and an alpha nobody stored
Definition at line 1 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::BGRA8888, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
red and blue trade places and the alpha stays where it was
Definition at line 1 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::ETC1, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
Definition at line 30 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::GRAY8, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
one sample becomes three, opaque. grey is grey in every channel
Definition at line 1 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGB555, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
the spare top bit is dropped rather than read: in this colour it means nothing
Definition at line 6 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGB565, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
Definition at line 7 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGB888, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
add an opaque alpha channel.
Definition at line 1 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA5551, Color::RGBA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
the bottom bit is the whole alpha: a pixel is either there or it is not
Definition at line 5 of file rgba8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::BGR888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
blue first and the alpha dropped, which is a tga or a bmp scanline
Definition at line 1 of file bgr888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::BGRA8888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
the same swap as the way back, written out again rather than shared.
it is its own file because the pair is what the build scans for: a move that appeared in the other direction's file would be declared whenever that one was compiled, which is not the same thing as this one existing.
Definition at line 1 of file bgra8888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::ETC1 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::RGB555 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
five bits a channel, rounded rather than truncated, and the alpha is dropped: this colour has nowhere to put it and saying so here is better than leaving a caller to wonder why a transparent picture came back solid.
Definition at line 1 of file rgb555.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::RGB565 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
five bits of red, six of green, five of blue, rounded rather than truncated
Definition at line 1 of file rgb565.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::RGB888 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
drop the alpha channel
Definition at line 76 of file rgb888.cpp.
| Result< void > Haio::Codecs::Move< Color::RGBA8888, Color::RGBA5551 > | ( | Bytes | src, |
| std::span< uint8_t > | dst, | ||
| Size | size ) |
five bits a channel and one of alpha.
the alpha rounds like everything else does, at half: a pixel that is more there than not stays, and the rest goes. there is no third answer to give, which is the whole reason a one bit alpha is worth asking for rather than something to apologise for – a sprite sheet for hardware that only ever tested one bit wants exactly this.
Definition at line 1 of file rgba5551.cpp.