Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

How to realize rk3288 hevc/h265 HW decoder under linux

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 10/28/2015 14:54:00      1#
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
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 11/12/2015 19:22:57      2#
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
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 11/13/2015 13:26:57      3#
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!
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 11/13/2015 18:44:08      4#
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...
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list