Missing support for Motion jpeg (as mjpeg or .avi) in case of s922x and maybe others amlogic processors

In this time is fixed HW accelerated playing of VMW 3, but is not solved MJPEG yet. Ugoos AM6+, hardware decoder not working - #25 by atirage21

Please add mjpeg to only software decoding (disable am-amjpeg), also for situation generaly enabled hw decoding of all formats. Only as ffmpeg software decoding for mjpeg would be good solution for it in CE21NG and CE22NO. If is not device with good hw acceleration of mjpeg on CE21NG and CE22NO. Thank you.

I tried also hw acceleration on second device Minix with s 922xj and also have issue with mmjpeg than at ugoos device.

Please add setting for disable mmjpeg hw acceleration as part of existing setting for mpeg4 in CE21NG and CE22NO. It would be elegant and fast solution for broked am-amjpeg (mjpeg have too many standards …from microsift, apple, manufactures of cameras,…sw decoding is best solution: (Motion JPEG - Wikipedia).

Disable omxplayer but not MMAL. It will still be hardware accelerated.

https://forum.kodi.tv/archive/index.php?thread-225563.html

Since CE is Linux there is only “amcodec” used for hw acceleration, no place for Android’s “omxplayer” stuff…

So after solution is only disabling of unfuctional am-mjpeg.

This issue is fixed on Raspberry Pi devices when using kodi21. It more accurately detects pixel formats that can’t be decoded by the hardware (e.g. YUV422, YUV444), and falls back to software decode.

This will not affect amcodec issues on coreelec (which has a different implementation).

I tried ask for chatgpt and analyze code of aml_mjpeg_parser.c of CE and my sample video. Issue is that this video is not in cmyk, but in RGB. According to chatgpt is not hw accelerated RGB video for mjpeg at amlogic devices. Tomorow i know add here a proposal of patch from chatgpt. He would maybe a proposal for software decoding (i have chatgpt 5 only as free and it spent more days due to limits of answer for free users).

Here is patch from Chatgpt:

rgb_mjpeg_fallback.patch (864 Bytes)

Run code in root folder of kernel source code:

patch -p1 < rgb_mjpeg_fallback.patch

After recompile and save module:
make modules M=drivers/amvdec_ports/decoder
sudo insmod aml_mjpeg_parser.ko

After test of plaing video must be see in dmesg:
aml_mjpeg_parser: RGB MJPEG detected → forcing SW decode fallback

Or in rockchips foeum also was solved this issue of mjpeg in rgb format: