I have a camera module that supports 10-bit modes connected via MIPI and I want to try to use the H265 MAIN10 profile for recording with the Nvidia Multimedia API.
I have tried modifying the 10_camera_recording example in the Nvidia Multimedia API. The camera is set to a mode with both 10-bit input and output that I have confirmed via
If I modify the native buffer format to NV12_10LE
nativeBuffers[i] = DmaBuffer::create(STREAM_SIZE, NvBufferColorFormat_NV12_10LE, DO_CPU_PROCESS ? NvBufferLayout_Pitch : NvBufferLayout_BlockLinear);
Then I also changed the encoder to use the main10 profile
ret = m_VideoEncoder->setProfile(V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10);
and the pixel format for the encoder to a 10-bit one
ret = m_VideoEncoder->setOutputPlaneFormat(V4L2_PIX_FMT_P010M, STREAM_SIZE.width(), STREAM_SIZE.height());
Unfortunately when I do this I get the following error and no output is written
[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Broken pipe
If I change the encoder to 10-bit but leave the buffers as NV12 it doesn’t crash but the video that is written isn’t correct as the buffers/planes seem to be misaligned.
It seems to me that there should be a way to hook up 10-bit output from libargus from a 10-bit camera module to the encoder in 10-bit mode. Am I using the right pixel formats or will I need to do some extra conversion using the nvvidconv block? I was hoping to be able to avoid having to do that.
Thanks for the help!