MCPcopy Create free account
hub / github.com/alibaba/MNN / _getBpp

Function _getBpp

source/cv/ImageProcess.cpp:81–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81static int _getBpp(CV::ImageFormat format) {
82 switch (format) {
83 case CV::RGB:
84 case CV::BGR:
85 case CV::YCrCb:
86 case CV::YUV:
87 case CV::HSV:
88 case CV::XYZ:
89 return 3;
90 case CV::RGBA:
91 case CV::BGRA:
92 return 4;
93 case CV::GRAY:
94 return 1;
95 case CV::BGR555:
96 case CV::BGR565:
97 return 2;
98 default:
99 break;
100 }
101 return 0;
102}
103
104Tensor* ImageProcess::createImageTensor(halide_type_t type, int width, int height, int bpp, void* p) {
105 return Tensor::create(std::vector<int>{1, height, width, bpp}, type, p);

Callers 1

convertMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected