Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic

How to realize rk3288 hevc/h265 HW decoder under linux

71

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
71
Posted at 10/17/2015 17:09:36     
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?
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

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

14

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
14
Posted at 10/28/2015 19:14:30     
Mac to the rescue as always!

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

Use props Report

71

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
71
Posted at 11/3/2015 16:22:27     
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,
Reply

Use props Report

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 11/12/2015 16:31:09     
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 ?
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

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

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 11/12/2015 23:43:31     
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.


Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

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

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 11/13/2015 18:23:47     
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
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

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

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

This forum Credits Rules

Quick Reply Back to top Back to list