optimisation (crash fix)
This commit is contained in:
@@ -25,10 +25,10 @@ enum Color : u32 {
|
||||
A4, // tested
|
||||
};
|
||||
CTRFF_API void EncodeImage(std::vector<ctrff::u8>& ret,
|
||||
std::vector<ctrff::u8> rgba, int w, int h,
|
||||
const std::vector<ctrff::u8>& rgba, int w, int h,
|
||||
Color dst);
|
||||
CTRFF_API void DecodeImage(std::vector<ctrff::u8>& ret,
|
||||
std::vector<ctrff::u8> pixels, int w, int h,
|
||||
const std::vector<ctrff::u8>& pixels, int w, int h,
|
||||
Color src);
|
||||
} // namespace Pica
|
||||
} // namespace ctrff
|
||||
@@ -4,7 +4,7 @@
|
||||
namespace ctrff {
|
||||
namespace Pica {
|
||||
CTRFF_API void EncodeImage(std::vector<ctrff::u8>& ret,
|
||||
std::vector<ctrff::u8> rgba, int w, int h,
|
||||
const std::vector<ctrff::u8>& rgba, int w, int h,
|
||||
Color dst_color) {
|
||||
// Only used in rgb/rgba
|
||||
int bpp = dst_color == RGBA8888 ? 4 : 3;
|
||||
@@ -152,7 +152,7 @@ CTRFF_API void EncodeImage(std::vector<ctrff::u8>& ret,
|
||||
}
|
||||
|
||||
CTRFF_API void DecodeImage(std::vector<ctrff::u8>& ret,
|
||||
std::vector<ctrff::u8> pixels, int w, int h,
|
||||
const std::vector<ctrff::u8>& pixels, int w, int h,
|
||||
Color src_color) {
|
||||
switch (src_color) {
|
||||
case RGB565:
|
||||
|
||||
Reference in New Issue
Block a user