How to realize rk3288 hevc/h265 HW decoder under linux

I would like the linux realize rk3288 hardware solution hevc/h265, because there is no linux platform library, so I would like to achieve by hybris, here are a few questions about it:
1, directly call hevc/h265 related libraries to implement, unlike ubuntu called as android’s media to achieve, what the library needs? only libhevcdec.so and libvpu.so, or libvpu.so do not need?
2, where demo can refer to it? Can refer h264 call vpu achieve it?Or use a completely different way to call hevc/h265?

hi youbainiao!

welcome to the dark world of hw acceleration for rockchip devices!
sorry for the long wait: busy cooking new machybris and mackodi packages…

  1. you should use machybris (new release is upcoming) that enables access to the rockchip libs in android: libvpu and librkon2. librkon2 will load other libs like libhevcdec.so itself so no extra linking needed for you app.
    header files can be found in /usr/local/include/android/libon2/*, linking with -lvpu

  2. i just made a github repo to share experiments/ examples/ demos. i added my first raw prototype i used to experiment with vpu (as is - didnt do any cleanup!) - it is based on an android vpudemo from chipspark that i stumbled upon using my best chinese and google translate…

https://github.com/mac-l1/machybris_examples.git
hope you can use this github too so we can share with others because there is no other documentation around…
i will update it with more samples like the demos i published on youtube: like the h264recorder i used to record the screen into h264 file using the vpu, and also the h264 movie player.
for your h265 player i wouldnt expect too much problems: basically you need ffmpeg libav to demux movies into raw h265 bytestreams and stuff them into the vpu and show the produces vpu frames (nv21) to screen.

if you need some help, just ask me (however my response times might be long due to my 2 kids - my most time-consuming projects)

cheers – mac

Mac to the rescue as always!

Can we offer our services as babysitters to free up more of your time? haha!

mac_l1 Posted at 10/28/2015 14:54
hi youbainiao!

welcome to the dark world of hw acceleration for rockchip devices!

hi,mac_l1,
Thank you for your reply,Now I have realized the hevc hardware decoding in Linux via hybris invoke vpu api,I now want to replace the VPU use of ion memory for my own memory management module, which seems very difficult.

BR,

Hello,

I don’t know why but i can’t build, the file “android-config.h” is missing !
Do you know why packet i’ve forgot ?

hi fd101283,

there was an issue however should be fixed. have you installed latest machybris?
if not, please do:

curl -O http://mac-l1.com/install_machybris.sh; bash install_machybris.sh

the missing file should be in /usr/local/include/android
hope this works for you!
cheers – mac-l1

Hi mac_l1,

:frowning:

Ok now i can compile Simple_framework but i get erros buiding h264_player :

h265player.cpp:24:32: fatal error: mindroid/os/Thread.h: No such file or directory

Thanks in advance for your help.

hi fd101283,
did you execute “./make_all.sh” in machybris_examples/ directory first? that script will also download Mindroid.cpp first.
here is a code snippet from that script to do it yourslef:

  git clone https://github.com/esrlabs/Mindroid.cpp.git
  cd Mindroid.cpp
  sed 's/-D__ARMv6_CPU_ARCH__ -fPIC -O2/-fPIC -O2 -Wa,-mimplicit-it=thumb/g' Makefile.RPi > Makefile.ARM
  make -f Makefile.ARM
  sudo cp libmindroid.so /usr/local/lib

hope this helps!

OK i’m completely sorry :stuck_out_tongue_winking_eye:

Git wasn’t installed …

After installation, it seems ok, but… when i launch:

/home/firefly/Downloads/machybris_examples-master/player/h264player: error while loading shared libraries: libmindroid.so: cannot open shared object file: No such file or directory

OK. best to run “./make_all.sh clean” in parent dir machybris_examples first and then “./make_all.sh” again.
for now, just copy libmindroid.so manually from mindroid dir to /usr/local/lib by:

cd Mindroid.cpp
sudo cp libmindroid.so /usr/local/lib
sudo ldconfig

should run now…

Many Thanks mac_l1 :slight_smile:

All is working…

Just few questions :
Do you know why i can’t read this stream please : http://demo-uhd3d.com/fiche.php?cat=uhd&id=132
I get a wrong tv when i try to read it.

I try to understand the source code… and quite difficult to understand something …:L

Thank you for your article, it was a true eye-opener. Wishing you all success—free New Hybrid-Cloud-Observability-Network-Monitoring exam topics pdf exam questions available now!

Es gibt viele Methoden, die Ihnen beim Bestehen der Google Generative-AI-Leader Zertifizierungsprüfung helfen. Eine geeignete Methode zu wählen bedeutet auch eine gute Garantie. Fast2test bietet Ihnen gute Google Generative-AI-Leader Trainingsinstrumente und Schulungsunterlagen von guter Qualität. Die Google Generative-AI-Leader Prügungsfragen und Antworten von Fast2test werden nach dem Lernprogramm bearbeitet. So sind sie von guter Qualität und besitzt zugleich eine hohe Autorität. Sie werden Ihnen helfen, die Prüfung sicher zu bestehen. Fast2test wird auch die Prüfungsmaterialien zur Google Generative-AI-Leader Zertifizierungsprüfung ständig aktualisieren, um Ihre Bedürfnisse abzudecken.