What is the maximum input resolution that nvbuf_surf_src supports?

We use the resolution of 28801860, and the converted graphics show stripes as shown picture.
src:2880
1860 YUV422
dst:2880*1860 NV12
Board:AGX Orin 64G
NvBufSurfTransform(nvbuf_surf_src, nvbuf_surf_dst, &transform_params);

Hi,
Do yo use NvBufSurface? It looks like the frame data is not correctly put into NvBufSurface. You may miss to consider data alignment when copying data to the NvBufSurface.

Yeah,we use NvBufSurface. But how to align data?Do you have a demo? Our camera resolution is 2880*1860. Thank you.
This is our code:

int
NvBufSurf::NvTransform(NvCommonTransformParams *transformParams, int src_fd, int dst_fd)
{
    int ret = 0;
    if (transformParams == NULL)
      return -1;
    NvBufSurfTransformRect src_rect = {0};
    NvBufSurfTransformRect dest_rect = {0};
    NvBufSurfTransformParams transform_params;
    NvBufSurface *nvbuf_surf_src = 0;
    NvBufSurface *nvbuf_surf_dst = 0;
    src_rect.top = transformParams->src_top;
    src_rect.left = transformParams->src_left;
    src_rect.width = transformParams->src_width;
    src_rect.height = transformParams->src_height;
    dest_rect.top = transformParams->dst_top;
    dest_rect.left = transformParams->dst_left;
    dest_rect.width = transformParams->dst_width;
    dest_rect.height = transformParams->dst_height;

    memset(&transform_params,0,sizeof(transform_params));
    /* Indicates which of the transform parameters are valid. */
    transform_params.transform_flag = transformParams->flag;
    transform_params.transform_flip = transformParams->flip;
    transform_params.transform_filter = transformParams->filter;
    transform_params.src_rect = &src_rect;
    transform_params.dst_rect = &dest_rect;
    NvBufSurfaceFromFd(src_fd, (void**)(&nvbuf_surf_src));
    NvBufSurfaceFromFd(dst_fd, (void**)(&nvbuf_surf_dst));

    ret = NvBufSurfTransform(nvbuf_surf_src, nvbuf_surf_dst, &transform_params);

    return ret;
}

Hi,
For more information about data alignment of DMA buffer, please check the discussion in the topic:
Unexpected results from 960x540 YUV 422 NvBuffer and conversion failure - #6 by DaneLLL

If the source can generate frame data fitting the alignment, there’s no additional memory copy.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.