Hi,
I am using MIPI camera and the resolution is 4192*3120 UYVY. I am using dma buffer configuration in V4L2 application to capture the image. I am able to capture the image and verified the image by writing in to a file. I have to convert this image to YUV420M format. I am using NvBufferTransform. But, the image is full of lines only, I am not getting proper image. This pipeline works if I use mmap in v4l2.
I have followed 12_camera_v4l2_cuda sample application.
if (ctx->capture_dmabuf) {
// Cache sync for VIC operation
NvBufferMemSyncForDevice(ctx->g_buff[v4l2_buf.index].dmabuff_fd, 0, (void**)&ctx->g_buff[v4l2_buf.index].start);
}
else {
Raw2NvBuffer(ctx->g_buff[v4l2_buf.index].start, 0,ctx->cam_w, ctx->cam_h, ctx->g_buff[v4l2_buf.index].dmabuff_fd);
}
// Convert the camera buffer from UYVY422 to YUV420P
if (-1 == NvBufferTransform(ctx->g_buff[v4l2_buf.index].dmabuff_fd, ctx->render_dmabuf_fd, &transParams))
I have configured the transparams:
memset(&transParams, 0, sizeof(transParams));
transParams.transform_flag = NVBUFFER_TRANSFORM_FILTER;
transParams.transform_filter = NvBufferTransform_Filter_Smart;
transParams.transform_flip = NvBufferTransform_None;
I am using the following params to create the buffer:
input_params_scale.payloadType = NvBufferPayload_SurfArray;
input_params_scale.width = 4192;
input_params_scale.height = 3120;
input_params_scale.layout = NvBufferLayout_Pitch;
input_params_scale.colorFormat = get_nvbuff_color_fmt(V4L2_PIX_FMT_YUV420M);
input_params_scale.nvbuf_tag = NvBufferTag_VIDEO_CONVERT;
if (-1 == NvBufferCreateEx(&ctx->scale_dmabuf_fd, &input_params_scale))
The above pipeline works with mmap but not working with dma buffers. The latency is very high in mmap, so I can not use in my application.
I am using Jetpack 4.4
Any help/suggestion…?
Thanks,
JSP