please choosego to mobile | Continue to access the PC version
Author: Rangarid

VPU CedarX drivers for Allwinner H3

[Copy link]

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-12-6 06:00:44 | Show all floors
Edited by fritz at 2015-12-5 23:14

slow forum!

read the post below.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-12-6 06:01:04 | Show all floors

h3-dev is now merged in master + add mpv

Edited by fritz at 2015-12-6 15:52

OK, here is the corrected How-To on a Lubuntu 14.04 (I don't have other debian based images and I don't want download others):
First you don't need mali for this!!!

install some packages:
  1. sudo apt-get install build-essential pkg-config git libx11-dev
Copy code

Then libvdpau (0.7.1)is to old on 14.04, you need newer. the simplest is to install it from packages:
  1. wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau1_1.1.1-3_armhf.deb
  2. wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau-dev_1.1.1-3_armhf.deb
  3. wget http://ftp.de.debian.org/debian/pool/main/v/vdpauinfo/vdpauinfo_1.0-1+b1_armhf.deb
Copy code

install packages with:
  1. sudo dpkg -i libvdpau1_1.1.1-3_armhf.deb
  2. sudo dpkg -i libvdpau-dev_1.1.1-3_armhf.deb
  3. sudo dpkg -i vdpauinfo_1.0-1+b1_armhf.deb
Copy code

Now compile and install libvdpau-sunxi:
  1. git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
  2. cd libvdpau-sunxi
  3. make
  4. make install
Copy code

Set permissions for disp/ion/cedar devices:

sudo vi /etc/udev/rules.d/50-disp.rules
  1. KERNEL=="disp", MODE="0660", GROUP="video"
Copy code

sudo vi /etc/udev/rules.d/50-ion.rules
  1. KERNEL=="ion", MODE="0660", GROUP="video"
Copy code

sudo vi /etc/udev/rules.d/50-cedar.rules
  1. KERNEL=="cedar_dev", MODE="0660", GROUP="video"
Copy code

Then check if orangepi user is in the group "video"
if not add it. (on lubuntu it was not)
  1. sudo usermod -a -G video orangepi
Copy code

REBOOT

open a terminal and type:
vdpauinfo

It should display something like this:
  1. orangepi@orangepi:~$ vdpauinfo
  2. display: localhost:10.0   screen: 0
  3. Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
  4. Error creating VDPAU device: 1
Copy code

Then export libvdpau-sunxi as VDPAU_DRIVER:
  1. orangepi@orangepi:~$ export VDPAU_DRIVER=sunxi
Copy code

Retype vdpauinfo and now if all is correct you should see something like this:
http://pastebin.com/4zBxArGF

Now you are ready to play some videos with mplayer or mpv:

  1. mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, test.mkv
  2. mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all test.mkv
Copy code

Wit the "stock" mplayer you can use this HW-accelerated codecs:
  1. ffmpeg12vdpau ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo_vdpau]
  2. ffwmv3vdpau ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3_vdpau]
  3. ffvc1vdpau  ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1_vdpau]
  4. ffh264vdpau ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264_vdpau]
  5. ffodivxvdpau ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4_vdpau]
Copy code

If you want to play HEVC/H.265 files you need to compile mplayer or mpv from source.
With a compiled mplayer 1.2 from source you can use this HW-accelerated codecs:
  1. ffmpeg12vdpau ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo]
  2. ffmpeg12vdpauold ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo_vdpau]
  3. ffwmv3vdpau ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3]
  4. ffwmv3vdpauold ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3_vdpau]
  5. ffvc1vdpau  ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1]
  6. ffvc1vdpauold ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1_vdpau]
  7. ffhevcvdpau ffmpeg    working   FFmpeg HEVC / H.265 (VDPAU)  [hevc]
  8. ffh264vdpau ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264]
  9. ffh264vdpauold ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264_vdpau]
  10. ffodivxvdpau ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4]
  11. ffodivxvdpauold ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4_vdpau]
Copy code

"New" commandline with new mplayer:
  1. mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, test.mkv
Copy code
If you need to compile mplayer or mpv chose mpv it works better!
https://github.com/mpv-player/mpv-build#instructions-for-debian-and-ubuntu
This will build a debian-package mpv_0.13.0_armhf.deb  

That's it
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-12-6 09:04:12 | Show all floors
And last but not least a crappy youtube video only to show that it really works:
https://youtu.be/O4FFG2X3thY
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

18

threads

303

posts

9574

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9574
Published in 2015-12-6 12:40:59 | Show all floors
fritz replied at 2015-12-6 09:04
And last but not least a crappy youtube video only to show that it really works:
https://youtu.be/O4 ...

Can you write a guide of building mplayer2 from source? Mplayer plays but not good. Mpv is OK.

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-12-6 22:54:32 | Show all floors
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

18

threads

303

posts

9574

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9574
Published in 2015-12-7 22:23:30 | Show all floors
fritz replied at 2015-12-6 22:54
Build mpv it works better:
https://github.com/mpv-player/mpv-build#instructions-for-debian-and-ubunt ...

I have compiled a mpv-player deb package version 0.13. I will upload soon.

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-12-8 02:27:04 | Show all floors
Edited by fritz at 2015-12-7 19:37

@jacer
Please don't use words like:will upload soon, it will be released in three weeks, you need to wait, we are debugging mali driver........,
This words are reserved and can only be used by @steven and some others mod's here!

When you want share something, ulpload it and that's it. Don't make "big" announcements!
My shared google-drive folder with compiled mpv  debian-package:
My shared H3 folder

install it with:
  1. sudo dpkg -i mpv_0.13.0_armhf.deb
Copy code

PS: if you can try first to build it yourself at least you learn something!

Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

2

threads

21

posts

86

credits

Registered member

Rank: 2

credits
86
Published in 2015-12-8 04:21:49 | Show all floors
Hi,
thanks to you I was able to enable hw accel.  for video decoding too. Unfortunately I just realized that it is not useful for KODI since VDPAU/VAAPI cannot be enabled togrther with gles2
So my question is: which is the best solution to have KODI with hw accel. under Linux (Lubuntu) ? Should I point to Kodi implementations for CedarX such as the one for A10 or the Zidoo X1 one ? There are better choices ?
Thanks.

4

threads

1118

posts

9144

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9144
Published in 2015-12-8 04:45:12 | Show all floors
barban replied at 2015-12-7 21:21
Hi,
thanks to you I was able to enable hw accel.  for video decoding too. Unfortunately I just reali ...

Hi Barban,

I can tell you straight away that Zidoo X1 implementation is good only for Android and A10 version has old API, which is not useful on H3. Currently your best option is to use Kodi on Android if you want HW acceleration. However, I'm trying to write CedarX codec for Kodi but that may take a while before it becomes usable.

2

threads

21

posts

86

credits

Registered member

Rank: 2

credits
86
Published in 2015-12-8 05:27:52 | Show all floors
Edited by barban at 2015-12-8 05:30
jernej replied at 2015-12-8 04:45
Hi Barban,

I can tell you straight away that Zidoo X1 implementation is good only for Android and ...

Thanks for your suggestion, but I am really looking for a decent (and recent...) version of KODI on Linux and X11... lol , not Android.I was able to compile git repo of Zidoo X1 for H3 on Linux:https://github.com/zidootech/zidoo-kodi-14.2

I did it using ./configure --disable-gl --enable-gles --disable-vaapi --disable-openmax and by solving minor issues while building.
As result, I have a workig KODI 14.2 on X11 but without HW accel., even thought I find the source file where libvrender.so is called and it should apply also on Linux version:
  1. ./xbmc/cores/dvdplayer/DVDCodecs/Video/AWCodec.cpp:  DECLARE_DLL_WRAPPER(DllLibAwRender, "libvrender.so")
Copy code




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

Points Rule

Quick reply Top Return list