Capture metadata from MIPI CSI2 ports on Tegra X1


We have been successfully able to capture from all the MIPI CSI ports on Tegra X1 but now we are interested on capturing also the metadata and not only the video that is being injected in the MIPI CSI Ports. I read in the Technical Reference Manual about potential support for long packets (page 2399):

“The exact use of embedded data is not clear, and therefore in most cases, embedded data is probably not used, or if sent by the transmitter, the embedded data packets can simply be discarded. If for some reason, it is important to receive the embedded data, there are other options that should be supported. Since there are two pixel parsers, if there is only one video source, it is best to direct embedded data to the other pixel parser which does not process the normal image data. In this way, the embedded data can be treated the same way as 8-bit arbitrary/compressed image data and can be output in 8-bit/clock or 16-bit/clock format. If there are two video sources that occupy both the pixel parsers, then embedded data if it has to be stored to memory, needs to be output in the same channel as the image data as 8-bit/16-bit data. But this also means that the module that receives output of CSI module and does image processing must have the ability to differentiate embedded data and not do image processing on this data prior to writing it to memory”

Where can I get information about how to configure the pixel parser to get the metadata? I don’t need support just some guidance of which register I would need to configure to get the metadata. Have someone tried it?

Just in case, I read in page 2406 that register CSI_PIXEL_STREAM_A_CONTROL0_0 on bits 21:20 could be used to tell the parser to extract the metadata, but then how I tell the parser on which memory address to save it?

“CSI_PPA_EMBEDDED_DATA_OPTIONS: CSI Pixel Parser A Embedded Data Options. This specifies how to deal with embedded data within the specified input stream assuming that the CSI_PPA_DATA_TYPE is not embedded data and assuming that embedded data is not already processed by other CSI pixel stream processor.
0 = DISCARD: discard (throw away) embedded data
1 = EMBEDDED: Output embedded data as an 8-bpp arbitrary data stream.”

You could reference metadata (embedded_metadata_height) in the following device tree file of R24.2.1 BSP package


Hi Chijen,

Thanks for your response. I will take a look on it!