mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
OneVPL fixes
This commit is contained in:
parent
cde18648dc
commit
a1d752bfc0
@ -499,11 +499,11 @@ int main(int argc, char *argv[]) {
|
|||||||
std::tie(dx11_dev, dx11_ctx) = create_device_with_ctx(intel_adapter.get());
|
std::tie(dx11_dev, dx11_ctx) = create_device_with_ctx(intel_adapter.get());
|
||||||
gpu_accel_device = cv::util::make_optional(
|
gpu_accel_device = cv::util::make_optional(
|
||||||
cv::gapi::wip::onevpl::create_dx11_device(
|
cv::gapi::wip::onevpl::create_dx11_device(
|
||||||
reinterpret_cast<void*>(dx11_dev.get()),
|
reinterpret_cast<void*>(dx11_dev.release()),
|
||||||
"GPU"));
|
"GPU"));
|
||||||
gpu_accel_ctx = cv::util::make_optional(
|
gpu_accel_ctx = cv::util::make_optional(
|
||||||
cv::gapi::wip::onevpl::create_dx11_context(
|
cv::gapi::wip::onevpl::create_dx11_context(
|
||||||
reinterpret_cast<void*>(dx11_ctx.get())));
|
reinterpret_cast<void*>(dx11_ctx.release())));
|
||||||
#endif // HAVE_D3D11
|
#endif // HAVE_D3D11
|
||||||
#endif // HAVE_DIRECTX
|
#endif // HAVE_DIRECTX
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -42,7 +42,14 @@ VPLVAAPIAccelerationPolicy::VPLVAAPIAccelerationPolicy(device_selector_ptr_t sel
|
|||||||
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
||||||
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
}
|
}
|
||||||
|
#else // __linux__
|
||||||
|
VPLVAAPIAccelerationPolicy::VPLVAAPIAccelerationPolicy(device_selector_ptr_t selector) :
|
||||||
|
VPLAccelerationPolicy(selector) {
|
||||||
|
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
||||||
|
}
|
||||||
|
#endif // __linux__
|
||||||
|
|
||||||
|
#if defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
VPLVAAPIAccelerationPolicy::~VPLVAAPIAccelerationPolicy() {
|
VPLVAAPIAccelerationPolicy::~VPLVAAPIAccelerationPolicy() {
|
||||||
vaTerminate(va_handle);
|
vaTerminate(va_handle);
|
||||||
GAPI_LOG_INFO(nullptr, "destroyed");
|
GAPI_LOG_INFO(nullptr, "destroyed");
|
||||||
@ -90,12 +97,7 @@ cv::MediaFrame::AdapterPtr VPLVAAPIAccelerationPolicy::create_frame_adapter(pool
|
|||||||
return cpu_dispatcher->create_frame_adapter(key, params);
|
return cpu_dispatcher->create_frame_adapter(key, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // __linux__
|
#else // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
|
|
||||||
VPLVAAPIAccelerationPolicy::VPLVAAPIAccelerationPolicy(device_selector_ptr_t selector) :
|
|
||||||
VPLAccelerationPolicy(selector) {
|
|
||||||
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
|
||||||
}
|
|
||||||
|
|
||||||
VPLVAAPIAccelerationPolicy::~VPLVAAPIAccelerationPolicy() = default;
|
VPLVAAPIAccelerationPolicy::~VPLVAAPIAccelerationPolicy() = default;
|
||||||
|
|
||||||
@ -128,7 +130,7 @@ cv::MediaFrame::AdapterPtr VPLVAAPIAccelerationPolicy::create_frame_adapter(pool
|
|||||||
const FrameConstructorArgs &) {
|
const FrameConstructorArgs &) {
|
||||||
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current configuration");
|
||||||
}
|
}
|
||||||
#endif // __linux__
|
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
} // namespace onevpl
|
} // namespace onevpl
|
||||||
} // namespace wip
|
} // namespace wip
|
||||||
} // namespace gapi
|
} // namespace gapi
|
||||||
|
@ -31,12 +31,11 @@
|
|||||||
#endif // HAVE_DIRECTX
|
#endif // HAVE_DIRECTX
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
#if defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
#if defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
#include "va/va.h"
|
#include "va/va.h"
|
||||||
#include "va/va_drm.h"
|
#include "va/va_drm.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
|
||||||
#endif // __linux__
|
#endif // __linux__
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user