Fix prefast issue in image transforms (#837)
* fix prefast issue in image transforms * Update image_transforms.hpp * Update image_transforms.hpp --------- Co-authored-by: Sayan Shaw <sayanshaw@microsoft.com> Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
This commit is contained in:
Родитель
be5aa773e3
Коммит
5b7e3d4b8b
|
@ -53,13 +53,15 @@ inline OrtxStatus convert_to_rgb(const ortc::Tensor<uint8_t>& input, ortc::Tenso
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Resize {
|
struct Resize {
|
||||||
static const std::unordered_map<std::string, int> InterpolationMethods() {
|
static const std::unordered_map<std::string, int>& InterpolationMethods() {
|
||||||
return {
|
static std::unordered_map<std::string, int> methods = {
|
||||||
{"NEAREST", IMAGING_TRANSFORM_NEAREST},
|
{"NEAREST", IMAGING_TRANSFORM_NEAREST},
|
||||||
{"LINEAR", IMAGING_TRANSFORM_BILINEAR},
|
{"LINEAR", IMAGING_TRANSFORM_BILINEAR},
|
||||||
{"CUBIC", IMAGING_TRANSFORM_BICUBIC},
|
{"CUBIC", IMAGING_TRANSFORM_BICUBIC},
|
||||||
{"LANCZOS", IMAGING_TRANSFORM_LANCZOS}
|
{"LANCZOS", IMAGING_TRANSFORM_LANCZOS}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return methods;
|
||||||
}
|
}
|
||||||
|
|
||||||
OrtxStatus Compute(const ortc::Tensor<uint8_t>& input, ortc::Tensor<uint8_t>& output) {
|
OrtxStatus Compute(const ortc::Tensor<uint8_t>& input, ortc::Tensor<uint8_t>& output) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче