Thank you very much for your willingness to help us improve the program functions.
To answer your question, first of all, XRGB8888, ARGB8888, ABGR8888 formats are not supported. In the process of our verification, VYUY can also work, we have not found such a situation for NV12/NV21/YUV420, please provide the testing equipment and display, as well as the recurrence method, so that we can locate the problem more quickly.
In addition, attach all the formats we currently support:
Formats: RG16 UYVY VYUY YUYV YVYU YU12 NV21 NV12 XR24 AR24 AB24
we have not found such a situation for NV12/NV21/YUV420, please provide the testing equipment and display
For YUV sources, anything goes, but the simplest option is the vivid V4L2 test driver, which supports a broad range of pixel formats.
I have an LG TV set for output via HDMI, but I doubt that really matters.
It seems to me that the DRM driver is ignoring the plane parameters, handles, pitches and offsets from struct drm_mode_fb_cmd2 in ioctl(DRM_IOCTL_MODE_ADDFB2). For single plane formats, this is most inconsequential as offsets is pretty much always 0, but for multiple planes, this leads to misaligned colors.
To be honest, RGB565 is mostly useless for video use-cases in general. And in the case of the JH7100, there is neither GPU nor vectors, so it is not realistic computationally to convert the YUV planes from the video decoder into RGB colour space. We really have to pass the pictures straight from decoder to display controller.
The most two needed formats will be:
YUV420 (a.k.a. DRM “YU12”) and
the formats output by the VPU (I suppose NV12 or NV21?).
In principles, VLC already has OpenMAX IL support. All that’s needed is the name of the library to load, since unfortunately OpenMAX did not standardise it.
There’s also support for using gstreamer decoders, though that’s so far only been used for Texas Instruments’.
It’s also possible to write a new decoder directly to the VPU API.
With that said, I have not actually tried the Freelight SDK. It seems that the VPU drivers are managing device registers, memory buffers and interruptions in user space. Normally the kernel takes care of it. User mode is inadequate for VLC use cases as it provides no user isolation nor protection for memory, other processes and kernel in case of problem in the VLC process.
So overall, it’s not clear to me what API should be used as of yet.