Author: Rangarid

VPU CedarX drivers for Allwinner H3

[Copy link]

2

threads

21

posts

86

credits

Registered member

Rank: 2

credits
86
Published in 2015-11-22 07:29:20 | Show all floors
Hi all,
I just installed sunxi vdpa driver and output from vdpauinfo seems ok.
Unfortunately, I cannot reproduce video using mplayer due to the error below.
Any help appreciated.
  
mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4
...
[vdpau] Error when calling vdp_presentation_queue_target_create_x11: A catch-all error, used when no other error codes  applies.
FATAL: Cannot initialize video driver
FATAL: Could not initialize video filter (-vf) or video output (-vo)

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-22 15:45:09 | Show all floors
@barban
have you compiled from source?
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
 Author| Published in 2015-11-22 15:57:49 | Show all floors

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-22 16:38:27 | Show all floors
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
 Author| Published in 2015-11-22 16:46:23 | Show all floors
Ok that is new... looks like they added it after i asked... Why didnt they tell me

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-22 17:01:50 | Show all floors
@Rangarid
Pssssssssssssssssssssss!!!!
Don't tell it anyone!
It is a big secret!!!
We will publish it in three weeks on facebook and we will make a video tutorial on youtube.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
 Author| Published in 2015-11-22 23:32:43 | Show all floors
Sounds good. Cant wait. If you need testers let me know (with detailed instructions ).

2

threads

21

posts

86

credits

Registered member

Rank: 2

credits
86
Published in 2015-11-23 02:58:35 | Show all floors
Edited by barban at 2015-11-23 03:02
fritz replied at 2015-11-22 15:45
@barban
have you compiled from source?

Yes I did.
But from your answer I just realized to have considered the master branch
instead of the h3-dev branch...

I am going to rebuild and retry...  lolBR



3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
 Author| Published in 2015-12-1 18:36:44 | Show all floors
Edited by Rangarid at 2015-12-4 23:46

Just testet with Lubuntu Vivid and it seems to work. Follow these instructions:

  1. sudo apt-get install libvdpau-dev build-essential pkg-config
  2. cd
  3. git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
  4. cd libvdpau-sunxi
  5. git checkout h3-dev
Copy code

As the newly added h265 decoding still does not work we need to remove it for now. If you use Lubuntu the standard textedit is leafpad, but you can as well use nano or any other texteditor...
  1. leafpad Makefile
Copy code

remove h265.c from SRC define and save

  1. leafpad decoder.c
Copy code

search for text VDP_DECODER_PROFILE_HEVC_MAIN

remove the part marked here:
https://github.com/linux-sunxi/l ... v/decoder.c#L73-L78
and marked here:
https://github.com/linux-sunxi/l ... decoder.c#L205-L211

Save and close.

After that run
  1. make
  2. sudo make install
Copy code


Now there should be a folder in /usr/lib/vdpau with 2 files. For lubuntu to recognize libvdpau correctly we need to create a symlink to the nvidia vdpau lib (which does not exist but mplayer keeps asking for it).
  1. sudo ln -s /usr/lib/vdpau/libvdpau_sunxi.so.1 /usr/lib/libvdpau_nvidia.so
Copy code


As it is mentioned in the libvdpau installation instructions i also added this line in /etc/profile
  1. export VDPAU_DIVER=sunxi
Copy code

Not sure if this makes a difference though...

Now we still need to set the correct udev rules in /etc/udev/rules.d/

create file 50-disp.rules (need root permission)
  1. KERNEL=="disp", MODE="0660", GROUP="video"
Copy code


create file 50-cedar.rules (need root permission)
  1. KERNEL=="cedar_dev", MODE="0660", GROUP="video"
Copy code


Reboot and then it should all work. You can test it like this:
  1. wget https://github.com/raspberrypi/firmware/blob/master/opt/vc/src/hello_pi/hello_video/test.h264?raw=true
  2. mv test.h264?raw=true test.h264
  3. mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, -fs test.h264
Copy code


The -fs parameter means fullscreen. Scaling does not seem to work very well with that driver. If mplayer is not in fullscreen the video looks strange.

3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
 Author| Published in 2015-12-1 19:51:27 | Show all floors
Another note... disabling h265 just seems to apply to the libvdpau-dev version in the lubuntu apt repositories. That version is 0.9, but latest is 1.1.1, so it looks like the h265 related things were added in a later version. there it might not be necessary to remove the h265 things.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list