Firefly Open Source Community

Title: How to realize rk3288 hevc/h265 HW decoder under linux [Print This Page]

Author: youbainiao    Time: 10/17/2015 17:09
Title: 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?
Author: mac_l1    Time: 10/28/2015 14:54
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

Author: Martijn    Time: 10/28/2015 19:14
Mac to the rescue as always!

Can we offer our services as babysitters to free up more of your time? haha!
Author: youbainiao    Time: 11/3/2015 16:22
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,
Author: fd101283    Time: 11/12/2015 16:31
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 ?
Author: mac_l1    Time: 11/12/2015 19:22
hi fd101283,

there was an issue however should be fixed. have you installed latest machybris?
if not, please do:
  1. curl -O http://mac-l1.com/install_machybris.sh; bash install_machybris.sh
Copy the code

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

Author: fd101283    Time: 11/12/2015 23:43
Hi mac_l1,



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.



Author: mac_l1    Time: 11/13/2015 13:26
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:
  1.   git clone https://github.com/esrlabs/Mindroid.cpp.git
  2.   cd Mindroid.cpp
  3.   sed 's/-D__ARMv6_CPU_ARCH__ -fPIC -O2/-fPIC -O2 -Wa,-mimplicit-it=thumb/g' Makefile.RPi > Makefile.ARM
  4.   make -f Makefile.ARM
  5.   sudo cp libmindroid.so /usr/local/lib
Copy the code

hope this helps!
Author: fd101283    Time: 11/13/2015 18:23
OK i'm completely sorry

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

Author: mac_l1    Time: 11/13/2015 18:44
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:
  1. cd Mindroid.cpp
  2. sudo cp libmindroid.so /usr/local/lib
  3. sudo ldconfig
Copy the code

should run now...

Author: fd101283    Time: 11/16/2015 18:38
Many Thanks mac_l1   

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 ....





Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1