NVIDIA / GMAT

A toolkit showing GPU's all-round capability in video processing
Other
181 stars 40 forks source link

How to scale frame with specified GPU Index? #10

Closed AmosJh closed 7 months ago

AmosJh commented 7 months ago

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?

AmosJh commented 7 months ago

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