NVIDIA/GMAT

How to scale frame with specified GPU Index?

AmosJh opened this issue · 1 comments

I have use sws_getContext with flag SWS_HWACCEL_CUDA to get context, and successfully call sws_scale.
It is work when frame data is on the GPU0, but when I decode frame on other GPUs, I get error while use function cv::cuda::GpuMat download :,error is :(-217:Gpu API call) an illegal memory access was encountered in function 'download'.
How could I specify the GPU index before sws_scale?

sorry, I need to call cv::cuda::setDevice(index) before construct cv::cuda::GpuMat value