HEVC 10bit on amlogic s905W

  • Hello,

    maybe I'm late to the party but found an old box and tried to make something useful out of it.

    I know that the hardware or at least the PRIMEDRM implementation doesn't support h265 10bit hardware acceleration but I wanted to try decode in software.

    Here comes the first issue: configuration is all or nothing. I cannot force software decoding only for HEVC. It would be nice to be able to.

    But then comes the other issue. When I disable hardware acceleration but keep PRIMEDRM, kodi still fails and I see in the log

    Code
    error <general>: CDVDVideoCodecDRMPRIME::GetFormat - no supported pixel formats: yuv420p10le

    When I disable PRIMEDRM entirely, playing the file doesn't lock kodi anymore, I hear the audio but I see no video. The log shows:

    Code
    2026-08-30 07:50:59.652 T:9691    error <general>: virtual bool KODI::WINDOWING::GBM::CWinSystemGbmEGLContext::SetVideoOutput(const VideoPicture*): failed to choose EGL config for 10-bit
    2026-08-30 07:50:59.652 T:9691  warning <general>: LinuxRendererGLES::Configure: SetVideoOutput failed
    2026-08-30 07:50:59.665 T:9691     info <general>: GLES: Selecting YUV 2 RGB shader

    So my question is how to disable hardware acceleration only for particular formats (could be in some config file, no need to be in the UI), and how to make sure the 10bit format is converted to 8bit before displaying as apparently 10bit output is not supported.

    This can probably make the box much more useful for its intended purpose.

    Thank you!

    P.S. alternatively, if I can still view such videos directly with ffmpeg somehow as a workaround, this I will also appreciate. Now watching so often, if I have a reasonable way to play such files, that will not bother me much.

    -- LibreELEC (chewitt) 12.95.1, AMLGX.aarch64

  • The kernel drivers need to evolve to handle yuv420p10le and AFBC compression; which is a rather non-trivial task requiring human developer experience in media drivers and proper Amlogic silicon knowledge to ensure correct architecture. I've tried pointing the latest generations of LLM tools at the problem, but even Claude Fable quickly descends into AI-slop generation when trying to port things from the proprietary Amlogic BSP codebase. Amlogic are working on entirely new drivers and allegedly new DRM code; but this will focus on their newer chips (although they have promised to back-fill support for older ones) and due to their inexperience with upstreaming the progress is glacial.

    Kodi V4L2 decoding does not support per-codec enable/disable and the whole point of V4L2 decoding is a clean implementation that avoids the typical Android approach of band-aiding userspace apps to workaround flawed kernels. If the kernel side works the need to disable things goes away.

    NB: GXL chips like S905X/D/W/L/etc. support 10-bit decoding and processing inside the chip, but only 8-bit output, so these boards always have some visible banding. The dithering options recently added to K22 seem to help a little with this.

    TL/DR; I lack the developer skills and knowledge to fix the problem and there's not really anyone anywhere working on the staging driver to fix its many problems (it has some deeper architectural issues once you get to newer generations). Until that changes, it is what it is, sadly.