• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 23
hardware acceleration on allwinner A10/A20 with vdpau and OpenGLES (zero-copy)
#31
(2016-02-09, 22:35)RagnerBG Wrote:
(2016-02-05, 15:24)mosterta Wrote: libvdpau_sunxi.so is loaded by libvdpau. It determines that from the location of its installation and adds the path vdpau (e.g. libvdpau in "/usr/lib" then libvdpau_sunxi.so must be installed in "/usr/lib/vdapu") (all AFAIK, since I dont have the code here)

There is also a hardcoded path for libvdpau_nv_sunxi.so.1 in kodi: This lib is currently expected to be in /usr/lib/vdpau. (AFAIK)

I copy everything from /usr/local/lib/vdpau into /usr/lib/vdapu, as i wrote. I also execute "export VDPAU_DRIVER=sunxi" and "sh -c "echo "export VDPAU_DRIVER=sunxi" >> /etc/profile", nevertheless i have the line in /etc/profile. I even start everything on fresh image from scratch and still have the same error. When i just copy the original libvdpau_sunxi.so1 over your version, vdpauinfo show correct version 0x1623 and everything work. So i give up on this and try to compile XBMC with this libvdpau-sunxi. Is it possible?
Anyway, i now face new bunch of errors and missing things, as expected. The first - i have the following message during configure:
Quote:configure: WARNING: unrecognized options: --with-ffmpeg
I couldn't find info of correct parameter for ffmpeg. Is it possible and if - how to set using of external ffmpeg? I have it compiled with vdpau support. My config look like this:
Quote:------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: No
SWIG Available: Yes
JRE Available: Yes
Doxygen Available: Yes
Crosscomp.: No
target ARCH: arm
target CPU: no
OpenGLES: Yes
ALSA: Yes
DBUS: Yes
VDPAU: Yes
VAAPI: No
CrystalHD: No
VDADecoder: No
VTBDecoder: No
OpenMax: No
Joystick: No
XRandR: No
GOOM: No
RSXS: Yes
ProjectM: Yes
Skin Touched: No
X11: No
Bluray: Yes
TexturePacker:No
MID Support: No
ccache: Yes
ALSA Support: Yes
PulseAudio: No
HAL Support: No
DVDCSS: Yes
Google Test Framework Configured: No
Avahi: Yes
Non-free: Yes
ASAP Codec: No
MySQL: No
Webserver: Yes
libssh support: Yes
libRTMP support: Yes
libsmbclient support: Yes
libnfs client support:Yes
libafpclient support: No
AirPLay support: No
AirTunes support: No
UPnP support: Yes
Optical drive: Yes
libudev support: Yes
libusb support: No
libcec support: Yes
libmp3lame support: Yes
libvorbisenc support: Yes
libcap support: Yes
additional players: No
External FFmpeg: No
PVR add-ons: No
prefix: /usr/local
------------------------
I removed "--enable-debug" but debugging is still there. Should i use "--disable-debug" instead? With most of missing things and errors and managed to fought with, but now i have new error during make:
Quote:Makefile:301: recipe for target 'xbmc/cores/VideoRenderers/VideoRenderer.a' failed
make: *** [xbmc/cores/VideoRenderers/VideoRenderer.a] Error 2
I can't find anything related to this in config.log and i am out of ideas. I guess this not gonna hapend in my system. Anyway - thanks for the help and a good idea.
And one last thing, a little offtopic. Any idea haw can i show subtitles in players using vdpau, mpv for example? I have "export VDPAU_OSD=1" in /etc/profile, mpv show to load subtitles, but nothing on the screen.

You can't use an external ffmpeg, since I did some changes to get it working with the kodi changes.
For the other questions: Sorry, I don't understand exactly which kind of problems do you have. Do you have build problems or run time problems: can you do a "ldd -r libvdpau_sunxi.so.1" on my version of that file and check if any symbols can't be resolved? If that works, can you start kodi via "strace" and check the output for the line where libvdpau_sunxi.so.1 is loaded if the right path is used?
Reply
#32
(2016-02-10, 15:26)mosterta Wrote: can you do a "ldd -r libvdpau_sunxi.so.1" on my version of that file and check if any symbols can't be resolved? If that works, can you start kodi via "strace" and check the output for the line where libvdpau_sunxi.so.1 is loaded if the right path is used?

Hm, this command is new for me. As i wrote, i am new into this... The output of original libvdpau_sunxi.so.1 is as follow:
Quote: librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6e8d000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e19000)
libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6d24000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6d01000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6c11000)
libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb6bec000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6bd9000)
/lib/ld-linux-armhf.so.3 (0xb6ed8000)
libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb6ef0000)
libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb6bc6000)
The output of your version is this:
Quote: librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6ee2000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e6e000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e4b000)
libUMP.so.3 => /usr/local/lib/libUMP.so.3 (0xb6e36000)
libcedar_access.so => /usr/lib/libcedar_access.so (0xb6e24000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d34000)
/lib/ld-linux-armhf.so.3 (0xb6f3a000)
undefined symbol: VALGRIND_PRINTF (/usr/lib/libcedar_access.so)
undefined symbol: ump_phys_address_get (/usr/lib/libcedar_access.so)
undefined symbol: AMMT_SET_REGS_BASE (/usr/lib/libcedar_access.so)
As for kodi, i can't compile it yet, because i had this error during "make" in previous post, but i try to do it with original libvdpau_sunxi.so.1, so i probably mess it out in major.
Reply
#33
(2016-02-11, 20:44)RagnerBG Wrote:
(2016-02-10, 15:26)mosterta Wrote: can you do a "ldd -r libvdpau_sunxi.so.1" on my version of that file and check if any symbols can't be resolved? If that works, can you start kodi via "strace" and check the output for the line where libvdpau_sunxi.so.1 is loaded if the right path is used?

Hm, this command is new for me. As i wrote, i am new into this... The output of original libvdpau_sunxi.so.1 is as follow:
Quote: librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6e8d000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e19000)
libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6d24000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6d01000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6c11000)
libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb6bec000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6bd9000)
/lib/ld-linux-armhf.so.3 (0xb6ed8000)
libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb6ef0000)
libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb6bc6000)
The output of your version is this:
Quote: librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6ee2000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e6e000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e4b000)
libUMP.so.3 => /usr/local/lib/libUMP.so.3 (0xb6e36000)
libcedar_access.so => /usr/lib/libcedar_access.so (0xb6e24000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d34000)
/lib/ld-linux-armhf.so.3 (0xb6f3a000)
undefined symbol: VALGRIND_PRINTF (/usr/lib/libcedar_access.so)
undefined symbol: ump_phys_address_get (/usr/lib/libcedar_access.so)
undefined symbol: AMMT_SET_REGS_BASE (/usr/lib/libcedar_access.so)
As for kodi, i can't compile it yet, because i had this error during "make" in previous post, but i try to do it with original libvdpau_sunxi.so.1, so i probably mess it out in major.

You can see why my version is not running correctly: There are unresolveable symbols: VALGRIND_PRINTF and AMMT_SET_REGS_BASE are macros which can't be resolved with your version of valgrind and are interpreted as functions. So please comment them out, do a "make clean; make" and these symbols should vanish. The symbol ump_phys_address_get is missing, because you did not use my version of libUMP, or at least it is not found by the runtime linker.
Reply
#34
(2016-02-10, 00:32)tom81 Wrote:
(2016-02-07, 22:47)mosterta Wrote: Cool, you tried already porting it. I tried to intermediate step to 15.2, BUT a/v sync in 15.2 has changed a lot and video display skipped lots of frames. Then I wanted to skip 15.2 and concentrate on the latest 16rc, but I did not even start. Maybe be can do the port to 16rc together.. Btw if you see a red screen when you display a video, this means that all values in the UMP buffers are 0. Then after YUV to RGB conversion within the GLES shader the color get converted to red.
I had a similar problem in CLinuxRendererGLES::Render. Check that
- the textures are uploaded to OpenGLES by a function with name similar to uploadTextures
- for single pass rendering that there is NOT just the bold marked line. RenderSinglePass called with the parameter m_currentField uses the wrong index, hence the wrong (empty) texture is used. Therefor I have added the RenderProgessiveWeave function, which uses a different index (internally)
case RQ_SINGLEPASS:
if (m_format == RENDER_FMT_VDPAU_420 && m_currentField == FIELD_FULL)
RenderProgressiveWeave(index, m_currentField);
else
RenderSinglePass(index, m_currentField);

VerifyGLState();
break;

I have found the problem: RenderUpdate has changed in Jarvis and it was uploading YUV planes with the wrong field index (I think...). I hacked it a bit and kicked out RenderProgessiveWeave again. RenderUpdate now checks directly for RENDER_FMT_VDPAU_420.
Video playback now works for me like in Kodi 14.2.
The patch against 16.0rc3 is here: https://www.dropbox.com/s/fbqsm3nmsbhqg5...ch.gz?dl=0
Concerning MPEG4 playback: XVid files with global motion compensation enabled are broken, but I think this is a hardware limitation: My AmLogic based Kodi box also fails to play those files correctly. A workaround would be to disable hw decoder for any SD (<720p) files, at least the A20 is fast enough for that (and noone uses XVid for HD content anyway?)

Best,
tom

Very cool. I did have a brief look at your patch, but currently my free time to work on kodi was not much. Have you had a look to the statistics onscreen page to see whether there are any skipped or dropped pictures (with 720p resolution). For 1080p resolution I assume that there are drops, due to memory bandwidth.
Are you going to provide your 16.0rc release on github (or somewhere else)?
Regarding the Xvid files: I havent had a look at it and whether it is a hardware limitation. But I have an issue with disabling the HW xvid support completely since I have a A10 as my primary kodi player and most of the xvid files are without GMC. But that is of course just my personal view.. maybe a better soluiton would be to decide within ffmpeg if the hw decoder or sw decoder is used, depending on the features used in the video file. But that is just a thought of mine. But currently my libvdpau-sunxi is not able to display pics decoded by a software player, so some work would be necessary there as well.

But my first priority is to fix the isse when a forward/backward jump in a movie is done.
Reply
#35
I didn't see any drops or skips even with 1080p h264 files. Maybe the A20's memory bandwidth is sufficient. I also noticed that seeking/skipping is only broken with h264 video files. Seeking in Xvid and MPEG2 works fine for me.
I currently don't have any github account or something like that, maybe I should get one. There's not so much free time for me as well a.t.m. but eventually I will clean up the code a little bit and kill some now-dead code from the old cedarv port.
Reply
#36
Bug 
Hi monsterta,
i try to create a Debian build running your Kernel and Kodi Version on a Cubietruck. But it fails on the first step, building the Kernel. What did i do to understand?

1. git clone https://github.com/mosterta/linux-sunxi.git (on a Debian 8 VM)
2. git checkout ump_sunxi-3.4
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig (for a A20 CPU)
4. apt-get install libncurses5-dev (based on this howto: http://linux-sunxi.org/Linux_Kernel#Compilation)
5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig (leaved all options as default settings)
And now let's start build the needed Kernel where the error appears:
6. make -j$(nproc) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules

The error is in result of a missing file in "drivers/video/sunxi/disp". The Make script search for a file named "dev_disp.o" in this path. Im a newby in linux and i have no idea to fix this problem. Can you help me to find out what i did wrong?
Reply
#37
Can you provide the complete build log?
Regards
rellla
Reply
#38
(2016-02-24, 09:51)rellla Wrote: Can you provide the complete build log?
Regards
rellla

Where is the compile log saved? Huh
Reply
#39
Huh. Can't you copy and paste it?
Reply
#40
Here is my log before the error occures:

Code:
root@debian-vm:~/linux-sunxi# make -j$(nproc) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC      drivers/video/sunxi/disp/dev_disp.o
  CC      drivers/video/sunxi/hdmi/hdmi_core.o
In file included from drivers/video/sunxi/disp/drv_disp_i.h:23:0,
                 from drivers/video/sunxi/disp/dev_disp.c:33:
drivers/video/sunxi/disp/bsp_display.h:56:30: fatal error: video/sunxi_disp.h: Datei oder Verzeichnis nicht gefunden
#include <video/sunxi_disp.h>
                              ^
compilation terminated.
In file included from drivers/video/sunxi/hdmi/../disp/OSAL_Clock.h:23:0,
                 from drivers/video/sunxi/hdmi/hdmi_core.c:23:
drivers/video/sunxi/hdmi/../disp/bsp_display.h:56:30: fatal error: video/sunxi_disp.h: Datei oder Verzeichnis nicht gefunden
#include <video/sunxi_disp.h>
                              ^
compilation terminated.
scripts/Makefile.build:307: recipe for target 'drivers/video/sunxi/disp/dev_disp.o' failed
make[3]: *** [drivers/video/sunxi/disp/dev_disp.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/video/sunxi/disp' failed
make[2]: *** [drivers/video/sunxi/disp] Error 2
make[2]: *** Warte auf noch nicht beendete Prozesse...
scripts/Makefile.build:307: recipe for target 'drivers/video/sunxi/hdmi/hdmi_core.o' failed
make[3]: *** [drivers/video/sunxi/hdmi/hdmi_core.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/video/sunxi/hdmi' failed
make[2]: *** [drivers/video/sunxi/hdmi] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/video' failed
make[1]: *** [drivers/video] Error 2
Makefile:947: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Warte auf noch nicht beendete Prozesse...
Reply
#41
Ok. Seems this commit https://github.com/mosterta/linux-sunxi/...f44ce1e278 broke it. video/sunxi_disp.h is missing as the log says. Maybe it got lost during commit ...
Maybe mosterta can push the missing file Wink
Regards
rellla
Reply
#42
(2016-02-24, 19:25)rellla Wrote: Ok. Seems this commit https://github.com/mosterta/linux-sunxi/...f44ce1e278 broke it. video/sunxi_disp.h is missing as the log says. Maybe it got lost during commit ...
Maybe mosterta can push the missing file Wink
Regards
rellla

i hope so Nod
Reply
#43
@tom81 - i found your kodi image on german cubietruck forum. It works great on my Cubietruck. But i can't get working my old Apple Remote with it. I get the signal with irw and ir-keytable -t ... But in Kodi nothing appears. Can you help me?

I write you here because I can't register to the german forum. I get no activation link and no answer from admin. So, i write you here. Are private messages disabled in this board? I cant write to Tom81 a private message.
Reply
#44
And here some feedback to mosterta builds. I gave up to create my own image based on his howto because there a so many errors and so much open questions.

First step, compiling the Kernel dit not worked for me because of missing files. So, i build my own kernel with mosterta ump fixes. This works and you can get it here: https://git.t3cube.de/groups/cubietruck-kodi

I run into the same problems as RagnerBG. I cant getting run the libvdpau from mosterta because of undefined symbol: ump_phys_address_get - libump is installed and my ump kernel too. So i have no idea to fix that.

At last i failed to compile kodi 16rc3 with the patch from tom81. Errors stopping compiling. My patched Kodi based on Tom81s patch you can find on my gitlab link, too.

At this time, i am happy with toms old image. Only my remote wont work Sad
Reply
#45
Hi guys,

for the ump error, see the fix in my repo https://github.com/rellla/libump/commits/ump
For the kernel you did right. You have to apply the 2 ump patches on top of your preferred kernel branch or use mosterta's branch and redo commit cf07273 in here https://github.com/mosterta/linux-sunxi/..._sunxi-3.4
I have neither compiled the other dependencies nor kodi itself. I just needed the ump thing fr another task.

Hope this helps you in the meantime.

Regards
rellla
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 23

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