-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NV12 to pixel formats #253
Conversation
Signed-off-by: Lukas Schäper <[email protected]>
Hi, is there any merge plan for this PR, hope can use this format in Humble |
I was already wondering about this for the other "NV" formats: These formats do not seem to be supported by tooling in the ROS ecosystem. You can publish images in this encoding, but none of the official ROS tools, such as cv_bridge, supports the format. Why is it beneficial to add the encoding "key" to the header files? You can already place arbitrary image data in the Adding these encodings to the |
I mean, that is basically what the Image message allows today. Adding these encodings just make them somewhat more "official", in that somebody has thought about them. I agree that the hard work here isn't in adding this, but in adding support to the downstream components to interpret them. Nevertheless, I am inclined to take this, as it doesn't really change the situation much one way or another. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me, I'll run CI on it next.
Pulls: #253 |
I propose this PR to enable ROS2 support of NV12 pixel format as image encoding. The NV12 pixel format is a common output format of hardware-accelerated decoders. NV12 is quite similar to the NV21 pixel format, with the exception that the order of the interleaving of U and V is reversed. The hardware-accelerated video decoder I currently use only supports NV12 as output pixel format.
NV12 corresponds to the FourCC, which was previously recommended as the identifier (see also #204 and #214).
The image_encodings.hpp file has been extended with the necessary additions.
References to show unambiguousness of the NV12 pixel format: