Hello,
I’m trying to get the central 1920x1080 pixels of a 3840x1920 dma buffer.
I use NvBufferTransform but I’m unable to get the required pixels with good quality.
The documentation in nvbuffer_utils.h is very poor. By test/failure process I understood the basic use of the NvBufferTransform function. The resulting image is left half correct and right half pixelated.
I use the 13_multi_camera sample and this is the code snippet:
NvBufferTransformParams transfer_params = {0};
transfer_params.transform_flag = NVBUFFER_TRANSFORM_CROP_SRC ;
transfer_params.src_rect.top = 540;
transfer_params.src_rect.left = 960;
transfer_params.src_rect.width = 1920;
transfer_params.src_rect.height = 1080;
transfer_params.dst_rect.top = 0;
transfer_params.dst_rect.left = 0;
NvBufferTransform (m_dmabufs[i], m_dmabufs[i], &transfer_params);