What is the difference between NvBufferLayout_Pitch NvBufferLayout_BlockLinear in nvbuf_utils.h?

what is the difference between NvBufferLayout_Pitch NvBufferLayout_BlockLinear in nvbuf_utils.h?
google only return 4 results without meaningful info.

Hi,
For pitch linear format, you can refer to

It demonstrates data order of YUV420.

Data order of block linear format is not open for public.

Hi DaneLLL,
“Data order of block linear format is not open for public.”

if the format is block linear format, how can i dump the YUV data and save to a jpeg.
Thanks.

Hi,
Please refer to

/usr/src/jetson_multimedia_api/samples/05_jpeg_encode

You can use NvJPEGEncoder class to encode NvBuffer.

Hi DaneLLL, my reference topic is :

I want to dump the NV12 frame data, and transform to RGB with OPENCV. With my code, i got the yuv layout is NVBUF_LAYOUT_BLOCK_LINEAR. If I COPY the data as pitch, it gives me a strange image. Thanks.

Hi,
Please call NvBufSurfaceCreate() to create another buffer in NVBUF_LAYOUT_PITCH, call NvBufSurfTransform() to convert blocklinear to pitch format, and use the patch to dump YUV.