Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
orin
• DeepStream Version
6.1.0
• JetPack Version (valid for Jetson only)
35.1.0
• TensorRT Version
8.5.1
On the PC side, I realized how to replace the data in PIPLINE and how to achieve the function of replacement on jetson.。The code that can run properly on the PC port is as follows:
cudaMemcpy((void*)src_data(void*)surface->surfaceList[frame_meta->batch_id].dataPtr,surface->surfaceList[frame_meta->batch_id].dataSize,cudaMemcpyDeviceToDevice);
cv::cuda::GpuMat nv12_mat=cv::cuda::GpuMat(height, width, CV_8UC4, src_data,surface->surfaceList[frame_meta->batch_id].pitch);
cv::cuda::GpuMat nv12_mat_out=cv::cuda::GpuMat(height, width, CV_8UC4);
cv::cuda::resize(nv12_mat, nv12_mat, cv::Size(512,512 ));
cv::Rect area_new = cv::Rect(512, 0,512, 512);
nv12_mat.copyTo(nv12_mat_out(area_new));
cudaMemcpy((void*)surface->surfaceList[frame_meta->batch_id].dataPtr,(void*)nv12_mat_out.data,surface->surfaceList[frame_meta->batch_id].dataSize,cudaMemcpyDeviceToDevice);