Copy mpashchenkov's changes

Minor refactoring

Partially address review comments

Move DX-related stuff from the sample to a default source

Simplify the default OneVPL config

Address minor review comments

Add class for the default VPL source

WIP: Add initial stub for tests with description

Removing default vpl source and minor refactoring

Refactor default files

Fix build and application crash

Address review comments

Add test on VPL + OCL interaction compared to CPU behavior

Fix test
This commit is contained in:
Alexey Smirnov
2022-09-23 12:08:29 +01:00
parent 2aad039b4f
commit 4c74e6d89d
16 changed files with 387 additions and 17 deletions
@@ -119,6 +119,10 @@ template<typename U> struct ocl_get_in<cv::GArray<U> >
{
static const std::vector<U>& get(GOCLContext &ctx, int idx) { return ctx.inArg<VectorRef>(idx).rref<U>(); }
};
template<> struct ocl_get_in<cv::GFrame>
{
static cv::MediaFrame get(GOCLContext &ctx, int idx) { return ctx.inArg<cv::MediaFrame>(idx); }
};
template<typename U> struct ocl_get_in<cv::GOpaque<U> >
{
static const U& get(GOCLContext &ctx, int idx) { return ctx.inArg<OpaqueRef>(idx).rref<U>(); }
@@ -0,0 +1,29 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2022 Intel Corporation
#ifndef OPENCV_GAPI_STREAMING_ONEVPL_UTILS_HPP
#define OPENCV_GAPI_STREAMING_ONEVPL_UTILS_HPP
#include <opencv2/gapi/own/exports.hpp> // GAPI_EXPORTS
#include <opencv2/gapi/streaming/onevpl/cfg_params.hpp>
#include <opencv2/gapi/streaming/onevpl/device_selector_interface.hpp>
namespace cv {
namespace gapi {
namespace wip {
namespace onevpl {
/**
* @brief Provides default device selector based on config.
*/
GAPI_EXPORTS std::shared_ptr<IDeviceSelector> getDefaultDeviceSelector(const std::vector<CfgParam>& cfg_params);
} // namespace onevpl
} // namespace wip
} // namespace gapi
} // namespace cv
#endif // OPENCV_GAPI_STREAMING_ONEVPL_UTILS_HPP