MCPcopy Create free account
hub / github.com/NVIDIA/DALI / VerifyDecode

Method VerifyDecode

dali/test/dali_test_decoder.h:132–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 }
131
132 void VerifyDecode(const uint8_t *img, int h, int w, const ImgSetDescr &imgs,
133 int img_id) const {
134 // Compare w/ opencv result
135 const auto imgData = imgs.data_[img_id];
136 const auto imgSize = imgs.sizes_[img_id];
137
138 Tensor<CPUBackend> out;
139 const int c = this->GetNumColorComp();
140 this->DecodeImage(imgData, imgSize, c, this->ImageType(), &out);
141 this->CheckBuffers(h * w * c, out.mutable_data<uint8_t>(), img, false, nullptr, {h, w, c});
142 }
143
144 uint32_t GetImageLoadingFlags() const override {
145 return t_loadJPEGs | t_loadPNGs | t_loadTiffs | t_loadBmps | t_loadJPEG2ks;

Callers 1

RunTestDecodeMethod · 0.95

Calls 4

GetNumColorCompMethod · 0.80
DecodeImageMethod · 0.80
ImageTypeMethod · 0.80
CheckBuffersMethod · 0.80

Tested by

no test coverage detected