Using VPI in a Custom DeepStream Plugin

Hi,

1.
Do you see the attached file in this comment?
We wrap the buffer with vpiImageCreateCUDAMemWrapper directly to avoid duplicate buffer mapping.

2.
Since perspective warp is not a point-to-point operation, you need to use different buffers to store input and output.

CHECK_VPI_STATUS(vpiSubmitPerspectiveWarp(dsexample->vpi_stream, 0, dsexample->warp, img, xform, out
                                            , VPI_INTERP_LINEAR, VPI_BORDER_ZERO, 0));
CHECK_VPI_STATUS(vpiSubmitConvertImageFormat(dsexample->vpi_stream, VPI_BACKEND_CUDA, out, img, NULL));
CHECK_VPI_STATUS(vpiStreamSync(dsexample->vpi_stream))

Please check the attached file for the detailed implementation.

Thanks.

1 Like