Added deprecation of nv12 legacy API (#16982)

* Added deprecation of nv12 legacy API

* Added new files

* Change macros

* Suppress warnings for preprocessing

* Suppress warnings in tests

* Suppress warnings for Windows
This commit is contained in:
Ilya Churaev
2023-04-17 18:13:43 +04:00
committed by GitHub
parent dc2fa65224
commit 25826bfe7d
11 changed files with 126 additions and 11 deletions

View File

@@ -129,6 +129,7 @@ public:
* @param nv12_surf A ID3D11Texture2D instance to create NV12 blob from
* @return NV12 remote blob
*/
OPENVINO_DEPRECATED("This function is deprecated and will be removed in 2023.1 release")
static inline Blob::Ptr make_shared_blob_nv12(size_t height,
size_t width,
RemoteContext::Ptr ctx,

View File

@@ -230,6 +230,7 @@ public:
* @param nv12_image_plane_uv cl::Image2D object containing UV plane data.
* @return A shared remote blob instance
*/
OPENVINO_DEPRECATED("This function is deprecated and will be removed in 2023.1 release")
static inline Blob::Ptr make_shared_blob_nv12(RemoteContext::Ptr ctx,
cl::Image2D& nv12_image_plane_y,
cl::Image2D& nv12_image_plane_uv) {

View File

@@ -100,6 +100,7 @@ public:
* @param nv12_surf NV12 `VASurfaceID` to create NV12 from
* @return A remote NV12 blob wrapping `VASurfaceID`
*/
OPENVINO_DEPRECATED("This function is deprecated and will be removed in 2023.1 release")
static inline Blob::Ptr make_shared_blob_nv12(size_t height,
size_t width,
RemoteContext::Ptr ctx,

View File

@@ -118,7 +118,9 @@ protected:
/**
* @brief Represents a blob that contains two planes (Y and UV) in NV12 color format
*/
class INFERENCE_ENGINE_API_CLASS(NV12Blob) : public CompoundBlob {
class INFERENCE_ENGINE_DEPRECATED("This class is deprecated and will be removed in 2023.1 release")
INFERENCE_ENGINE_API_CLASS(NV12Blob)
: public CompoundBlob {
public:
/**
* @brief A smart pointer to the NV12Blob object
@@ -176,7 +178,9 @@ public:
/**
* @brief Represents a blob that contains three planes (Y,U and V) in I420 color format
*/
class INFERENCE_ENGINE_API_CLASS(I420Blob) : public CompoundBlob {
class INFERENCE_ENGINE_DEPRECATED("This class is deprecated and will be removed in 2023.1 release")
INFERENCE_ENGINE_API_CLASS(I420Blob)
: public CompoundBlob {
public:
/**
* @brief A smart pointer to the I420Blob object

View File

@@ -14,6 +14,7 @@
#include <utility>
#include <vector>
IE_SUPPRESS_DEPRECATED_START
namespace InferenceEngine {
namespace {

View File

@@ -245,6 +245,7 @@ TEST_F(CompoundBlobTests, compoundBlobHoldsValidDataWhenUnderlyingBlobIsDestroye
EXPECT_EQ(stored_value, mb0->rmap().as<const uint8_t*>()[0]);
}
IE_SUPPRESS_DEPRECATED_START
TEST_F(NV12BlobTests, cannotCreateNV12BlobFromNullptrBlobs) {
Blob::Ptr valid = make_shared_blob<uint8_t>(TensorDesc(Precision::U8, {1, 1, 4, 4}, NHWC));
EXPECT_THROW(make_shared_blob<NV12Blob>(valid, nullptr), InferenceEngine::Exception);