[urgent]About difference of 00_video_decode and 02_video_dec_cuda

Hello,


The difference between the two samples in terms of performance
How helpful is using cuda without copying the memory?

Thank you.

Hi,
02_video_dec_cuda is to demonstrate CUDA processing:

    /* Get EGLImage from dmabuf fd */
    ctx->egl_image = NvEGLImageFromFd(ctx->egl_display, buffer->planes[0].fd);
    if (ctx->egl_image == NULL)
    {
        fprintf(stderr, "Error while mapping dmabuf fd (0x%X) to EGLImage\n",
                 buffer->planes[0].fd);
        return false;
    }

    /* Map EGLImage to CUDA buffer, and call CUDA kernel to
       draw a 32x32 pixels black box on left-top of each frame */
    HandleEGLImage(&ctx->egl_image);

    /* Destroy EGLImage */
    NvDestroyEGLImage(ctx->egl_display, ctx->egl_image);
    ctx->egl_image = NULL;

This is the only deviation between the two samples.

1 Like