Firefly Open Source Community
Title: hw accelerated video / video processor (VPU) running on linux on RK3288 / fir... [Print This Page]
Author: mac_l1 Time: 4/17/2015 21:09
Title: hw accelerated video / video processor (VPU) running on linux on RK3288 / fir...
Higuys,
Justto show I've got the RK3288 video processor (VPU) working on linux-both decoder and encoder-:
TechnicallyI use
-Android's libraries: for access to the vpu device driver and formemory management ¨C both encoding and decoding h264 byte-streams
-libhybris: to access these libraries on linux/ubuntu
-rga2 device driver for 2D HW accelerated blitting and convertingframes (yuv/nv21 <=> rgb32)
-ARMs OpenGL library, driver and examples (fbdev) to render rotatedimages using the GPU
-raw framebuffer device access to blit full-screen (full-screen playerand recorder)
-avlib to demux movie containers (mp4/mov) to bytestreams (player) andvice versa (recorder)
Dueto a clean low-level interface it should be quite easy to add videoacceleration to xbmc, avlib-tools, gstreamer, vlc, ¡ Also all hwsupported formats should be supported (including HEVC).
Basicallythis should also work on RK3188 devices, as Androids libs are almostidentical and libhybris is also working (my next project...)
Cheers!
-- MAC
Author: e97 Time: 4/22/2015 07:31
Last edited by e97 In 4/22/2015 07:33 Editor
Great work!
Is 1080p / 60 fps VPU decode supported? Do you have a repo somewhere to further your work?
Author: mac_l1 Time: 4/22/2015 17:17
@e97: The vpu actually decodes the input stream per frame-packet. In the full screen/ full speed example i use the max decoding speed for an h264 movie and i dont wait for anything. Not for vertical blank nor some timeout. Basically it is a loop of: 1) parse movie to h264 byte stream, 2) decode this to frame, 3) blit it to framebuffer (no rendering) using hw, and again; with a bit of multi-threading. Then i get about 50fps max for these movies, wouldn't expect too much here.
Maybe a bit more efficient multi-threading can crank-up the fps a bit and also some other decoding format like hevc/h265, so 60fps might be do-able. Haven't checked that.
Repo is not yet there. But will certainly share it. Currently my code is a bit experimental and a mess. I have to clean it up and especially find a way to "package" libhybris and a minimal recompiled android /system image that is essential.
Author: zhansb Time: 4/23/2015 11:44
nice
could you share the firmware£¬ I want to have a try
Author: mac_l1 Time: 5/6/2015 14:51
Just to share an update I posted on: http://freaktab.com/forum/tv-pla ... k3288-firefly/page2.
"Update: i am now working on xbmc/kodi. Thanks to memeka I got his xbmc working based on hybris, android EGL/GLES and mediaplayer (not using the low-level libvpu i demo-ed), really thanks memeka! Runs both on rk3288 and rk3188. However sound is crap ,video not yet smooth (probably slow yuv2rgb shader and syncing issues) and some crashes. Now migrating to spmc of Koying as he has lots of rockchip support in his repos and keeps his stuff uptodate, maybe I can push to his repo later.
So still have to wait a bit, maybe a month or so. First a decent kodi version working and then a decent release (still looking for a decent way to package hybris)."
Author: youbainiao Time: 10/9/2015 09:38
hi,mac_l1,
I want to directly call codec method, not through xbmc, how to do? or can obtain xbmc source code, reference codec is how to call the codec method by hyris.
Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) |
Powered by Discuz! X3.1 |