MCPcopy Create free account
hub / github.com/MegEngine/MegCC / CvtColorReg

Method CvtColorReg

compiler/lib/KernelGen/BareMetal/CvtColor.cpp:227–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 };
226
227 CvtColorReg() {
228 reg_map = {
229 {"RGB2YUV", {gen_rgb_yuv, "rgb2yuv"}},
230 {"YUV2BGR_NV21", {gen_yuv_bgr_nv21, "yuv2bgr_nv21"}},
231 {"RGB2BGR", {gen_rgb_bgr, "rgb2bgr"}},
232 {"RGB2GRAY", {gen_rgb_gray, "rgb2gray"}},
233 {"GRAY2RGB", {gen_gray_rgb, "gray2rgb"}}
234
235 };
236 }
237
238 bool usable(const std::string& mode) { return reg_map.find(mode) != reg_map.end(); }
239 GenFunc get_func(const std::string& mode) { return reg_map[mode].func; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected