I tried to write a jpeg compresser for ROS based on
NvVideoConverter + NvJpegEncoder. but experience the issue that BGR and RGB seemed to be flipped although the format specifies it correctly.
As output plane I have:
- USERPTR, pitch linear
- BGRA8 ( ROS/ OpenCv byte order -> bgra), which maps to
V4L2_PIX_FMT_ABGR32(see V4L2 RGB formats)
As capture plane:
- MMAP, block linear
- NV12 (
encodeFromFdlike in the jpeg_encode sample. If I flip the channels beforehand the output looks fine, although if display the original image using ROS the order appears correct.
Could somebody confirm this behaviour/bug or tell me if I am missing something?
Besides I do not see that any formats with more bits per channel are supported through the Multimedia API (vidconv and jpegenc). I am looking for formats to encode gray (12-bit encoded as 16 bit) or rgb (12-bit encoded as 16 bit). Are there some formats resp. is it supported?