Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: Rangarid

VPU CedarX drivers for Allwinner H3

[Copy link]

5

Threads

355

Posts

2143

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2143
Post time 2015-12-6 06:00:44 | Show all posts
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

355

Posts

2143

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2143
Post time 2015-12-6 06:01:04 | Show all posts

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 the 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 the 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 the 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 the 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 the Code

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

sudo vi /etc/udev/rules.d/50-cedar.rules
  1. KERNEL=="cedar_dev", MODE="0660", GROUP="video"
Copy the 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 the 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 the Code

Then export libvdpau-sunxi as VDPAU_DRIVER:
  1. orangepi@orangepi:~$ export VDPAU_DRIVER=sunxi
Copy the 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 the 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 the 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 the Code

"New" commandline with new mplayer:
  1. mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, test.mkv
Copy the 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

355

Posts

2143

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2143
Post time 2015-12-6 09:04:12 | Show all posts
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

7972

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7972
Post time 2015-12-6 12:40:59 | Show all posts
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

355

Posts

2143

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2143
Post time 2015-12-6 22:54:32 | Show all posts
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

18

Threads

303

Posts

7972

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7972
Post time 2015-12-7 22:23:30 | Show all posts
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

355

Posts

2143

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2143
Post time 2015-12-8 02:27:04 | Show all posts
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 the 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
Post time 2015-12-8 04:21:49 | Show all posts
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

1128

Posts

7705

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
7705
Post time 2015-12-8 04:45:12 | Show all posts
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
Post time 2015-12-8 05:27:52 | Show all posts
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 the Code




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

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2020-8-7 21:08 GMT+8 , Processed in 0.034310 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list