• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 23
hardware acceleration on allwinner A10/A20 with vdpau and OpenGLES (zero-copy)
(2016-10-16, 18:26)sergiodefontes Wrote:
(2016-10-15, 14:40)mapmot Wrote: sergiodefontes, wrong libMali.so. You need the framebuffer version, not the x11 one.

Thank you again mapmot, I have apreciated your concern about my (newbie's) questions. I'll try to solve this mistake and give you a feed-back soon.

Best regards,

Sergio

Hi guys,

I'm back to give you a feed back of my Odissey building a hardware acelerated version of Debian/Kodi to my Bananapi.

I followed the mapmot's sugestion (thks fellow) doing the right way to build a libmali.so framebuffer version.

In my case, to do that, I built sunxi-mali using the following parameters:

make config ABI=armhf VERSION=r3p0 EGL_TYPE=framebuffer

After that I could lauch Kodi successfully, finaly.

But, I realized that I couldn't play videos because of the following error:

Code:
root@bananapi:~# kodi
Playing: /media/HDExterno1/home/sergiodefontes/Downloads/test.mp4
[lavf] Using subtitle charset: ISO-8859-1
(+) Video --vid=1 (*) (h264)
(+) Audio --aid=1 --alang=dut (*) (aac)
(+) Subs  --sid=1 'Test.pr.srt' (subrip) (external)
Failed to open VDPAU backend /usr/lib/libvdpau_sunxi.so: undefined symbol: cedarv_memset
[vo/vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.
Video: no video

Exiting... (Errors when loading file)

In other words, I've got the same problem reported by porlock at his post #108.

I tried to follow the subsequent posts, but however, to me, the solution was not clear.... then I've searched on Internet for a solution, spending a lot of time, unfortunely without success...

That's why I ask for you help again....sorry about that...

Well, I'm using sunxi-mali from Mosterta's git: https://github.com/mosterta/libvdpau-sunxi, building it following those steps:

Code:
$cd /root/Sources/video_acceleration
$git clone https://github.com/codesnake/aml-mali
$cp aml-mali/include/EGL/eglplatform.h aml-mali/include/EGL/eglplatform_fb.h
$git clone https://github.com/mosterta/libvdpau-sunxi
$cd libvdpau-sunxi

Edit ve.c - comment the lines bellow

                 #include <valgrind/ammt_reqs.h>
                    VALGRIND_PRINTF("regs base addreess=%p\n", ve.regs);
                    AMMT_SET_REGS_BASE(ve.regs);

           - include line

             #include <string.h>

Edit opengl_nv.c - replace mem.mem_id with mem
Edit Makefile - change LIBS_VDPAU_SUNXI = -L /usr/local/lib/vdpau -lvdpau_sunxi
Edit h264.c - include line #include <stdio.h>
Edit mpeg12.c - include line  #include <stdio.h>
Edit mp4_block.c- include line  #include <stdio.h>
Edit presentation_queue.c - include line  #include <stdio.h>

$make CFLAGS="-I/root/Sources/video_acceleration/sunxi-mali/include -I/root/Sources/video_acceleration/aml-mali/include "

$make install

cp -v /usr/local/lib/vdpau/libvdpau_nv_sunxi.so.1 /usr/lib/
cp -v /usr/local/lib/vdpau/libvdpau_sunxi.so /usr/lib/
cp -v /usr/local/lib/vdpau/libvdpau_sunxi.so.1 /usr/lib/
cp -v /usr/local/lib/vdpau/libvdpau_trace.la /usr/lib/
cp -v /usr/local/lib/vdpau/libvdpau_trace.so /usr/lib/
cp -v /usr/local/lib/vdpau/libvdpau_trace.so.1.0.0 /usr/lib/

That's my building log: http://pastebin.com/G39fasMe

Running vdpauinfo I have:

Code:
root@bananapi:~# vdpauinfo
display: :0.0   screen: 0
Failed to open VDPAU backend /usr/lib/libvdpau_sunxi.so: undefined symbol: cedarv_memset
Error creating VDPAU device: 1

Same Kodi error, of course...

ldd command shows:

Code:
root@bananapi:~# ldd -r /usr/lib/libvdpau_sunxi.so
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6eb5000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e41000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e1e000)
        libUMP.so.3 => /usr/local/lib/libUMP.so.3 (0xb6e09000)
        libcedar_access.so => /usr/lib/libcedar_access.so (0xb6df7000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d07000)
        /lib/ld-linux-armhf.so.3 (0xb6f05000)
undefined symbol: cedarv_memset (/usr/lib/libvdpau_sunxi.so)

By the way, my libcedar_access.so and libcedar_access.so.1 in /usr/lib are built from from procedure above....

Code:
root@bananapi:/usr/lib# ldd -r libcedar_access.so
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6f47000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6ed3000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6eb0000)
    libUMP.so.3 => /usr/local/lib/libUMP.so.3 (0xb6e9b000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6dab000)
    /lib/ld-linux-armhf.so.3 (0xb6f85000)

And libUMP is from mosterta's git too....

I count on your help and patience again guys...

Thks in advance..
Reply
sergiodefontes, try libvdpau-sunxi from here: https://github.com/tnmeyer/libvdpau-sunxi, should compile and install without modifications.
Reply
(2016-10-21, 10:16)mapmot Wrote: sergiodefontes, try libvdpau-sunxi from here: https://github.com/tnmeyer/libvdpau-sunxi, should compile and install without modifications.

Ok mapmot, thks again about your concern. I'll try tnmeyer's libvdpau-sunxi and give you a feed-back soon.Big Grin
Reply
(2016-10-23, 21:40)sergiodefontes Wrote:
(2016-10-21, 10:16)mapmot Wrote: sergiodefontes, try libvdpau-sunxi from here: https://github.com/tnmeyer/libvdpau-sunxi, should compile and install without modifications.

Ok mapmot, thks again about your concern. I'll try tnmeyer's libvdpau-sunxi and give you a feed-back soon.Big Grin
and where your feed-back? Big Grin
Reply
The lack of feedback is good feedback. sergiodefontes is probably enjoying watching movies on his Bananapi Big Grin
Reply
Can I ask why a VDPAU based solution was chosen over a VAAPI based solution for this implementation?

I know Team Kodi developer fritsch have been working hard for a very long time at perfecting VAAPI in Kodi.

See. http://forum.kodi.tv/showthread.php?tid=231955 (and older thread http://forum.kodi.tv/showthread.php )

Just asking because would think that a VAAPI based solution might see a broader adoption of this, or?
Reply
Maybe because libvdpau-sunxi was already there and it was easier to extend vdpau instead of writing a new userspace backend.
Regards
Reply
I have been able to compile and run Kodi following the instructions in this thread, I had several issues resolved by reading it all. However I get a segmentation fault when I try to watch a movie and I am stuck at this point:

Code:
# kodi
Segmentation fault (core dumped)

This is the crash report http://pastebin.com/m5cKhv3M

And some info about my system.

The machine is a Cubieboard 2 using armbian and a recompiled kernel with the CMA config

I use kodi from @tom81 https://github.com/tnmeyer/xbmc branch "Jarvis_vdpau_gles"


Code:
# lsmod
Module                  Size  Used by
mali                  112372  0
ump                    61597  1 mali
cpufreq_userspace       3524  0
ipt_MASQUERADE          2386  2
iptable_nat             4890  1
nf_nat                 19354  2 ipt_MASQUERADE,iptable_nat
nfsd                  220987  1
tun                    14284  2
sha256_generic          8703  2
algif_skcipher          5379  0
af_alg                  6270  1 algif_skcipher
nf_conntrack_ipv4      14577  11 nf_nat,iptable_nat
nf_defrag_ipv4          1378  1 nf_conntrack_ipv4
xt_tcpudp               3051  20
xt_conntrack            2748  8
nf_conntrack           85715  5 ipt_MASQUERADE,nf_nat,xt_conntrack,iptable_nat,nf_conntrack_ipv4
xt_multiport            2459  17
iptable_filter          1541  1
ip_tables              13175  2 iptable_filter,iptable_nat
x_tables               17155  7 ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_conntrack,xt_multiport,iptable_filter,iptable_nat
sunxi_ir                4013  0
hidp                   17617  0
rfcomm                 58653  0
hci_uart               25000  0
bluetooth             264107  5 hidp,hci_uart,rfcomm
ppdev                   8292  0
lp                      8557  0
parport                35317  2 lp,ppdev
sg                     23859  0

Code:
# ldd -r /usr/lib/libvdpau_sunxi.so
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6f4c000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6ed4000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6eb0000)
    libUMP.so.3 => /usr/local/lib/libUMP.so.3 (0xb6e9a000)
    libcedar_access.so => //usr/lib/libcedar_access.so (0xb6e87000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d99000)
    /lib/ld-linux-armhf.so.3 (0xb6f95000)

Do you have an idea what could be wrong?
Reply
I have now tried to delete all libvdpau libs, recompile and reinstall. Interestingly I see this when trying to play a video:

Code:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory

Which I forgot I tried "fixed" it before by linking to libvdpau_sunxi.so, but it looks like there is a problem here. Why is vdpau trying to load libvdpau_nvidia.so?

Thank you in advance
Reply
(2017-01-07, 19:09)maggette Wrote: I have now tried to delete all libvdpau libs, recompile and reinstall. Interestingly I see this when trying to play a video:

Code:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory

Which I forgot I tried "fixed" it before by linking to libvdpau_sunxi.so, but it looks like there is a problem here. Why is vdpau trying to load libvdpau_nvidia.so?

Thank you in advance

I've just resolved this problem by doing this in the cli: export VDPAU_DRIVER=sunxi

However I still get a segmentation fault as before when trying to play a video.
Reply
Try to set deinterlace mode to 6(Bob) in guisettings.xml
(2017-01-07, 19:19)maggette Wrote:
(2017-01-07, 19:09)maggette Wrote: I have now tried to delete all libvdpau libs, recompile and reinstall. Interestingly I see this when trying to play a video:

Code:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory

Which I forgot I tried "fixed" it before by linking to libvdpau_sunxi.so, but it looks like there is a problem here. Why is vdpau trying to load libvdpau_nvidia.so?

Thank you in advance

I've just resolved this problem by doing this in the cli: export VDPAU_DRIVER=sunxi

However I still get a segmentation fault as before when trying to play a video.
Reply
I have tried it now but I get the exact same segmentation fault. I realized that this problem is exactly the same one that is mentioned by @rellla in the post #115

Code:
#1  0x004602dc in VDPAU::COutput::GLInit (this=this@entry=0xb002bb10) at VDPAU.cpp:4071

But it seems it was never resolved.

I'm going to try to compile kodi 14.2 by @mosterta
Reply
(2017-01-08, 20:23)maggette Wrote: I have tried it now but I get the exact same segmentation fault. I realized that this problem is exactly the same one that is mentioned by @rellla in the post #115

Code:
#1  0x004602dc in VDPAU::COutput::GLInit (this=this@entry=0xb002bb10) at VDPAU.cpp:4071

But it seems it was never resolved.

I'm going to try to compile kodi 14.2 by @mosterta

I was able to fix the segmentation fault, reading the VDPAU.cpp file I saw it was trying to find the vdpau libraries in /usr/lib/vdpau/ so I copied them from /usr/local/lib/vdpau/ and even I have been able to reproduce 1 video that before was crashing.

However for almost every video I play I'm getting this same error described here, but disabling the VDPAU mixing didn't fix my problem. Any other hints?

(2016-01-31, 20:50)mosterta Wrote:
(2016-01-17, 16:27)tom81 Wrote: A little bit of progress here:
I took the EGL includes from the Amlogic Mali libraries which had all the necessary defines. Some other things needed modifications to get your kodi version to build. Here's the patch against your github tree: http://pastebin.com/8xb52BgX

Kodi starts up alright, but as soon as I start some video playback, it crashes and I get the following on my console:

Code:
kodi.bin: opengl_nv.c:348: glVDPAUMapSurfacesNV: Assertion `nv' failed.

What's wrong?

Please disable in Kodi settings VDPAU mixing, but keep VDPAU itself enabled.
Reply
hello, how to solve this problem?

Code:
root@bananapi:~/.kodi/temp# grep ERROR kodi.log
13:25:51 T:3044745216   ERROR: PulseAudio: Failed to connect context
13:25:51 T:3044745216   ERROR: CSettings: unable to load settings from special://masterprofile/guisettings.xml, creating new default settings
13:25:52 T:3044745216   ERROR: Sunxi-DISP: display mode 255 is unknown. Assume refreh rate 60Hz
13:25:52 T:3044745216   ERROR: EGL error in InitDisplay: 3001
13:25:52 T:3044745216   ERROR: InitWindowSystem: Could not create display
13:25:52 T:3044745216   ERROR: EGL error in ReleaseContext: 3008
13:25:52 T:3044745216   ERROR: EGL error in DestroyDisplay: 3008

Code:
root@bananapi:~/.kodi/temp# lsmod
Module                  Size  Used by
disp_ump                 850  0
ap6210                627289  0
sunxi_cedar_mod        10332  0
mali_drm                2638  0
drm                   214678  1 mali_drm
mali                  114999  0
ump                    58543  2 mali,disp_ump
Reply
check that you have the correct (i.e. framebuffer based opengl library in you LD Libarary path)
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 23

Logout Mark Read Team Forum Stats Members Help
hardware acceleration on allwinner A10/A20 with vdpau and OpenGLES (zero-copy)2