Converting NvMediaImage with Block Linear surface layout to Pitch Linear surface layout efficiently

I would like to learn the suggested way to convert NvMediaImage data with Block-Linear surface layout (for a semi-planar YUV 420) into Pitch-Linear surface layout, by using NvMedia libraries in Drive OS 5.2

The purpose is to be able to directly feed the output of the ISP0/1 into the jpeg encoder, which seems to accept only Pitch-Linear surface layout.

My current approach is doing the following:

	    status = NvMedia2DBlitEx(m_i2d,           /* i2d */
	                             imageFrame,      /* dstSurface */
	                             NULL,       /* dstRect */
	                             imagePtr,      /* srcSurface */
	                             NULL,       /* srcRect */
	                             NULL,   /* params */
	                             NULL);              /* paramsOut */

where imageFrame is allocated with NvMediaImageCreateNew, with a pitch linear surface layout, and imagePtr is obtained from the output buffer of ISP0, which is in block linear surface layout.

This seems to work, since I can use imageFrame with NvMediaIJPEFeedFrame. However, I’m not sure if this way of blitting is the most efficient way to use the hardware.

This looks like a DRIVE platform issue. We recommend you to raise it to the respective platform from the below link
Latest DRIVE AGX/DRIVE AGX General topics - NVIDIA Developer Forums

ok thanks