RGB565 to ARGB888

Camera send RGB565(16 bit) and I want to extend it to ARGB888(32 bit). Can I do this?
JetPack 4.6.2
board: TX2

regards
Azadi

Hi,
One possible solution is to capture frame data into CUDA buffer through v4l2, and then implement CUDA code for converting RGB565 to ARGB8888. For capturing frame data into CUDA buffer, please refer to

/usr/src/jetson_multimedia_api/samples/v4l2cuda/

And you would need to implement RGB565 to ARGB8888 conversion.

thanks for your reply,
Can I do this work in kernel? (in vi or sensor_common or camera_common)
regards
Azadi

Hi,
The CUDA code is in userpsace and cannot be run in kernel.

I conveyed my meaning wrongly.
Can I do this work (RGB565 to ARGB888) in kernel? (in vi or sensor_common or camera_common)
regards
Azadi

Hi,
It should be a possible solution but the loading will be on CPU. For large resolution it may not achieve target frame rate.

Thanks for your reply.

Can you help me, How to add RGB565 to ARGB888 to kernel?

regards
Azadi

Hi,
There is discussion in the web page:
algorithm - How does one convert 16-bit RGB565 to 24-bit RGB888? - Stack Overflow

Please take a look.

thanks for your reply,
I will check it.

In V4L, Where do I access each signal(R,G,B) individually?

Hi,
This would need other users to share experience. We generally access frame data in userspace.

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.