Linux Amlogic hardware support

I am working on firmware for mediaplayer based on Amlogic CPU. This firmware in fact is Linux with Kodi as GUI.
I am using libamcodec to play video with hardware acceleration. And I have some problems on new Amlogic hardware - and

In both cases I got resolution that amcodec is obsolete and does not supported anymore. And I want to know - what is adequate alternative for Amcodec to play hardware accelerated video on Amlogic?
Your ticket seems to point to a firmware issue, really (get_decoder_firmware_data failed)
I test same videos in kplayer (it is mentioned in amlogic documentation as reference player with build in HW acceleration). And all works fine. As i can see it uses same libamcodec lib. Hence I think this is Kodi<->Amcodec interaction issue.

Last days i was trying to add VP9 support (my second issue) and not spend much time with h264 issue. Unfortunately my attempt is unsuccessful.

If there is no alternative for amcodec i will gather more information to find exact cause of problem with h264.
So. I spend some time in researching. And that is what I found:

1) When I run h264 4k video in Kodi on Android I get same message in dmesg -
[ 143.699209@1] codec:get_decoder_firmware_data vh264_mc for format 2 failed!

And video plays normally. So it is not the cause. Moreover I place debug output in function - get_decoder_firmware_data - it runs several time after error. I think finally it founds correct FW.

2) When I looked in my debug output I found that Android Media Codec (Android) and Kplayer (Linux) (which both normally plays all videos) try to load different files than Kodi (Linux):

kplayer - [235773.762412] codec:get_decoder_firmware_data vh264_mc for format 2 failed!

Kodi - [235947.017470] codec:get_decoder_firmware_data vh264_4k2k_mc_single for format 10 failed

And I commented this lines in xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp:

/*if (am_private->video_format == VFORMAT_H264) {
      CLog::Log(LOGDEBUG, "_MY CAMLCodec::OpenDecoder - video_format == VFORMAT_H264");
      if (hints.width > 1920 || hints.height > 1088) {
        am_private->video_format = VFORMAT_H264_4K2K;

After that problem with h264 gone. All h264 videos correctly plays in my Kodi build. But I am no sure if this is general solution for all cases.
VP9 is still not working - I am trying to find solution.
To fix 4K H.264 this would probably be a better patch, since it keeps compatibility for other chips (patch for Kodi 16.1):

To add VP9 support you need to add basics (again, patch for 16.1): and some header parsing/feeding for Amlogic (I'm not sure how it works) - you need to look it up in package/multimedia/libplayer/src/amplayer/player/player_hwdec.c from Amlogic buildroot.

Logout Mark Read Team Forum Stats Members Help
Amlogic hardware support0
This forum uses Lukasz Tkacz MyBB addons.