I’m using L4T 32.3.1 on a Jetson Nano based product and I am interested in supporting encoding of extended color range data to H.264 and H.265 using the MMAPI. I have modified our own product code to support this but I noticed that the encoder does not seem to support any of the _ER formats (e.g. NvBufferColorFormat_YUV420_ER).
Thinking it was probably a mistake I made, I went back and flashed the stock Ubuntu distro and tested the video_encode sample as well, with the --enable-extcolorfmt flag. This also fails in the same way as my own code. There are some messages printed to the console when this happens (these are from running the video_encode sample):
NvMMLiteVideoEncDoWork:NvMSEncConvertSurfaceFormat failed VENC: NvMMLiteVideoEncDoWork: 4231: BlockSide error 0x4 NvVideoEnc: BlockError NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 667 NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=678 [ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Invalid argument Error while dequeing buffer from output plane [ERROR] (NvV4l2ElementPlane.cpp:256) <enc0> Output Plane:Error while Qing buffer: Invalid argument Error while queueing buffer at output plane
If I run the video_encode sample without the --enable-extcolorfmt flag it does work as expected.
For reference, I have a different TX1-based product which originally used L4T 28.2. I updated this product to 28.3.2 and added support for extended color range formats, and everything is working on this product.
Any ideas or help with this are greatly appreciated.