Jetpack 4.4 multimedium API SAMPLE 12 NVCOMPOSITE API segment falut

In Jetpack 3.3 with R28.2, I test multimedium API `NvBufferComposite APi all good. BUT in Jetpack 4.4, I add NvBufferComposite API in 12_camera_v4l2_cuda camera_v4l2_.cpp. When I use 12 sample capture usb camera, NvBufferComposite API report segment falut error.

NvBufferCompositeParams compositeParam;
int src_buf[2];
compositeParam.composite_flag = NVBUFFER_COMPOSITE;
compositeParam.intput_buf_count = 1;
compositeParam.dst_comp_rect_alpha[0] = 1.0f;

compositeParam.src_comp_rect[0].top = 0;`
compositeParam.src_comp_rect[0].left = 0;
compositeParam.src_comp_rect[0].width = 1024;
compositeParam.src_comp_rect[0].height = 768;

compositeParam.dst_comp_rect[0].top = 0;`
compositeParam.dst_comp_rect[0].left = 0;
compositeParam.dst_comp_rect[0].width = 1024;
compositeParam.dst_comp_rect[0].height = 768;

src_bufs[0] = ctx->g_buf[v4l2_buf.index].dmabuff_fd;



The same code in jetpack 3.3 is good,but in jetpack 4.4 is not.

Would need your help to make a patch to 12_camera_v4l2_cuda and share. So that we can replicate the issue and check.

camera_v4l2_cuda_tv.cpp (16.9 KB)

Thanks for the test sample. Will try to reproduce the error and update.


This setting looks not right. It should be at least > 1. Please check demonstration in 13_multi_camera:

        if (m_streams.size() > 1)
            /* Composite multiple input to one frame */
            NvBufferComposite(m_dmabufs, m_compositedFrame, &m_compositeParam);

We suggest make sure you can run 13_multi_camera first and refer to it for debugging.