mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
d3d11-nv12 interop
fixed issues with ocl nv12 cvt kernel finisged ocl nv12-to-rgba kernel, update dx-interop samples. (ocl rgba-to-nv12 kernel will be added later) an attempt to fix build issue fix for non opencl build issue fix typo fix compilation warnings fix compile issue for Mac (OpenCL) add convertion from rgba to nv12 (still need to debug kernel) remove empty line at the EOF fixed compilation warning
This commit is contained in:
@@ -108,7 +108,7 @@ public:
|
||||
if (!m_cap.read(m_frame_bgr))
|
||||
return -1;
|
||||
|
||||
cv::cvtColor(m_frame_bgr, m_frame_rgba, CV_RGB2RGBA);
|
||||
cv::cvtColor(m_frame_bgr, m_frame_rgba, CV_BGR2BGRA);
|
||||
|
||||
D3DLOCKED_RECT memDesc = { 0, NULL };
|
||||
RECT rc = { 0, 0, m_width, m_height };
|
||||
@@ -143,6 +143,9 @@ public:
|
||||
if (m_shutdown)
|
||||
return 0;
|
||||
|
||||
// capture user input once
|
||||
MODE mode = m_mode == MODE_GPU_NV12 ? MODE_GPU_RGBA : m_mode;
|
||||
|
||||
HRESULT r;
|
||||
LPDIRECT3DSURFACE9 pSurface;
|
||||
|
||||
@@ -154,7 +157,7 @@ public:
|
||||
|
||||
m_timer.start();
|
||||
|
||||
switch (m_mode)
|
||||
switch (mode)
|
||||
{
|
||||
case MODE_CPU:
|
||||
{
|
||||
@@ -185,7 +188,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case MODE_GPU:
|
||||
case MODE_GPU_RGBA:
|
||||
{
|
||||
// process video frame on GPU
|
||||
cv::UMat u;
|
||||
|
||||
Reference in New Issue
Block a user