| 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; |
no test coverage detected