mirror of https://github.com/microsoft/vcpkg.git
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
diff --git a/modules/dnn/src/op_inf_engine.cpp b/modules/dnn/src/op_inf_engine.cpp
|
|
index d5f6902..b663428 100644
|
|
--- a/modules/dnn/src/op_inf_engine.cpp
|
|
+++ b/modules/dnn/src/op_inf_engine.cpp
|
|
@@ -53,7 +53,9 @@ Mat infEngineBlobToMat(const ov::Tensor& blob)
|
|
default:
|
|
CV_Error(Error::StsNotImplemented, "Unsupported blob precision");
|
|
}
|
|
- return Mat(size, type, blob.data());
|
|
+ // OpenVINO 2026 exposes const data for const tensors, but OpenCV still
|
|
+ // wraps infer request buffers in mutable Mats for its existing copy paths.
|
|
+ return Mat(size, type, const_cast<void*>(blob.data()));
|
|
}
|
|
|
|
void infEngineBlobsToMats(const ov::TensorVector& blobs,
|
|
diff --git a/modules/gapi/src/backends/ov/govbackend.cpp b/modules/gapi/src/backends/ov/govbackend.cpp
|
|
--- a/modules/gapi/src/backends/ov/govbackend.cpp
|
|
+++ b/modules/gapi/src/backends/ov/govbackend.cpp
|
|
@@ -87,7 +87,7 @@ static ov::element::Type toOV(int depth) {
|
|
case CV_16F: return ov::element::f16;
|
|
default: GAPI_Error("OV Backend: Unsupported data type");
|
|
}
|
|
- return ov::element::undefined;
|
|
+ return ov::element::dynamic;
|
|
}
|
|
|
|
static ov::preprocess::ResizeAlgorithm toOVInterp(int interpolation) {
|
|
@@ -141,7 +141,7 @@ static void copyFromOV(const ov::Tensor &tensor, cv::Mat &mat) {
|
|
cv::gimpl::convertInt64ToInt32(tensor.data<int64_t>(),
|
|
mat.ptr<int>(),
|
|
total);
|
|
} else {
|
|
- std::copy_n(reinterpret_cast<uint8_t*>(tensor.data()),
|
|
+ std::copy_n(reinterpret_cast<const uint8_t*>(tensor.data()),
|
|
tensor.get_byte_size(),
|
|
mat.ptr<uint8_t>());
|
|
}
|