• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 23
hardware acceleration on allwinner A10/A20 with vdpau and OpenGLES (zero-copy)
I use kodi from Tom81 that is https://github.com/tnmeyer/xbmc branch "Jarvis_vdpau_gles"

./configure --config-cache --prefix=/usr/local --disable-x11 --disable-sdl --disable-xrandr --disable-joystick --disable-gl --enable-vdpau --disable-vaapi --disable-openmax --enable-neon --enable-gles --disable-mysql --enable-airplay --enable-airtunes --enable-debug --enable-optimizations --with-ffmpeg=force --with-platform=allwinner-mali

I use a libvdpau-sunxi from https://github.com/mosterta/libvdpau-sunxi master branch

I revert te commit b709664 recompile and install libvdpau-sunxi but no luck it crash anyway Sad
Reply
(2016-03-09, 23:56)tom81 Wrote: I am currently uploading some code to https://github.com/tnmeyer?tab=repositories, but it's neither complete nor usable yet...

@tom81 Hi! I'm trying to compiling your version of xbmc and I got stucked in a very strange linking problem;

Quote:/usr/bin/ld: xbmc/windowing/egl/windowing_egl.a(EGLWrapper.o): undefined reference to symbol 'eglTerminate'
//usr/lib/libEGL_Mali.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:437: recipe for target 'kodi.bin' failed
make: *** [kodi.bin] Error 1

I strictly followed the build procedure in first post and all object file have been built.
It just failed in linking kodi.bin

did I missed something or did something wrong? Please help me!

PS: I believe symbol does exist in libEGL_Mali.so
Quote:2 root@bananapi /opt/xbmc (git)-[Jarvis_vdpau_gles] # readelf -s //usr/lib/libEGL_Mali.so | grep eglTerminate Sad
170: 000092a7 52 FUNC GLOBAL DEFAULT 11 eglTerminate
898: 000092a7 52 FUNC GLOBAL DEFAULT 11 eglTerminate
Reply
(2016-04-28, 10:35)bbscool Wrote: PS: I believe symbol does exist in libEGL_Mali.so
Quote:2 root@bananapi /opt/xbmc (git)-[Jarvis_vdpau_gles] # readelf -s //usr/lib/libEGL_Mali.so | grep eglTerminate Sad
170: 000092a7 52 FUNC GLOBAL DEFAULT 11 eglTerminate
898: 000092a7 52 FUNC GLOBAL DEFAULT 11 eglTerminate

Don't use Android binaries, use the proper armhf libs from https://github.com/linux-sunxi/sunxi-mal...r3p0/armhf
Reply
Hi all,
I'm trying to build Kodi on a A20-OLinuXIno-LIME2-4GB platform.
I created a libavcodec/vdpau_msmpeg4.c file with only an empty main function to workaround the missing file problem and now the Kodi building stops with the following message:

/xbmc/tools/depends/target/ffmpeg/ffmpeg-install/lib/libavcodec.a(allcodecs.o): In function `avcodec_register_all':
/xbmc/tools/depends/target/ffmpeg/ffmpeg-2.4.6-Helix/libavcodec/allcodecs.c:361: undefined reference to `ff_msmpeg4v3_vdpau_hwaccel'
collect2: error: ld returned 1 exit status
Makefile:533: recipe for target 'kodi.bin' failed
make: *** [kodi.bin] Error 1

I tried googling for the "undefined reference to `ff_msmpeg4v3_vdpau_hwaccel' " error, but I did not find anything about it.
Do you think this error is still due to the lack of the true vdpau_msmpeg4.c file?

Thanks
Reply
As I replied over here http://forum.kodi.tv/showthread.php?tid=251413 perhaps a better idea for acceptance would be to port this from VDPAU to a other API like example OpenMAX instead?

(2016-07-04, 11:39)rellla Wrote: We have our own GPL compliant code, that let's us use hardware accelerated video decoding. And we have that since 2013 now.

It's technically possible to use this piece of software with kodi, but it needs some adaptions. We cannot use it directly as a VDPAU backend, because KODI uses the nv_gl_interop feature. This is missing on ARM, because we have OpenGL/ES here and btw. vdpau wasn't designed to be used on arm anyway.

....

Another one would be, to drop the vdpau idea and write our own decoder class, using the knowledge of reverse engineering, that is implemented in the libvdpau-sunxi backend already.
Maybe the best idea would be to port that code to native OpenMAX codecs for Allwinner? OpenMAX codecscan be made compatible with OpenGL & OpenGL ES, ARM & x86, Linux & Android.

https://www.khronos.org/openmax/

And by that I am not suggesting to just write a OpenMAX wrapper for the VDPAU backend, but instead to actually make native OpenMAX codecs for Allwinner which does not rely on VDPAU at all.

(2016-07-04, 11:39)rellla Wrote: We have everything there, to get a gpl compliant kodi integration. It just has to be put together. And except for mali (which other platforms also depend on) we then have a real "open" integration. "Open" in the meaning in having not any blob for the video decoder (neiter on kernel nor on userland side). Is there any other platform out there, that has this advantage?
Intel does with with VAAPI for hardware video acceleration (and graphics acceleration) on most of its GPUs, they have gone almost completly open source with the exception of a few specific newer Intel GPUs like Intel Skylake & Broxton which require graphics firmware blobs.

https://www.freedesktop.org/wiki/Software/vaapi/

It should however be noted that VAAPI, like VDPAU, is designed for x86, not ARM. Which is why I suggested OpenMAX instead of VAAPI, and strongly suggest to checkout OpenMAX for Allwinner.
Reply
(2016-07-04, 12:55)RockerC Wrote: As I replied over here http://forum.kodi.tv/showthread.php?tid=251413 perhaps a better idea for acceptance would be to port this from VDPAU to a other API like example OpenMAX instead?

(2016-07-04, 11:39)rellla Wrote: We have our own GPL compliant code, that let's us use hardware accelerated video decoding. And we have that since 2013 now.

It's technically possible to use this piece of software with kodi, but it needs some adaptions. We cannot use it directly as a VDPAU backend, because KODI uses the nv_gl_interop feature. This is missing on ARM, because we have OpenGL/ES here and btw. vdpau wasn't designed to be used on arm anyway.

....

Another one would be, to drop the vdpau idea and write our own decoder class, using the knowledge of reverse engineering, that is implemented in the libvdpau-sunxi backend already.
Maybe the best idea would be to port that code to native OpenMAX codecs for Allwinner? OpenMAX codecscan be made compatible with OpenGL & OpenGL ES, ARM & x86, Linux & Android.

https://www.khronos.org/openmax/

And by that I am not suggesting to just write a OpenMAX wrapper for the VDPAU backend, but instead to actually make native OpenMAX codecs for Allwinner which does not rely on VDPAU at all.

(2016-07-04, 11:39)rellla Wrote: We have everything there, to get a gpl compliant kodi integration. It just has to be put together. And except for mali (which other platforms also depend on) we then have a real "open" integration. "Open" in the meaning in having not any blob for the video decoder (neiter on kernel nor on userland side). Is there any other platform out there, that has this advantage?
Intel does with with VAAPI for hardware video acceleration (and graphics acceleration) on most of its GPUs, they have gone almost completly open source with the exception of a few specific newer Intel GPUs like Intel Skylake & Broxton which require graphics firmware blobs.

https://www.freedesktop.org/wiki/Software/vaapi/

It should however be noted that VAAPI, like VDPAU, is designed for x86, not ARM. Which is why I suggested OpenMAX instead of VAAPI, and strongly suggest to checkout OpenMAX for Allwinner.

I am not really familiar with openmax, but do you have zero-copy approach from hardware to the display engine? And I don't mean OpenGL(ES) output (because Mali/memory bandwidth is too low for full HD), but access to the disp device/hardware layer to display the decoded frames with zero-copy..
this is crucial if you don't have much power as on an A10 or A20..
Reply
(2016-03-20, 00:55)tom81 Wrote: If you want to help improving the sunxi support in kodi, please test video playback with some of your files and report back if something strange happens. It would be helpful if you could provide the unshortened kodi.log file with debug logging enabled (found under /storage/.kodi/temp/kodi.log). Samples of video files where playback is broken are also welcome.

Hi tom81, thanks for work, I'm testing your build
HD and SD files to play well
Problem with IP TV, if played with the VDPAU - Kodi restarts
Reply
kodi down if IPTV is H.264 / AVC / MPEG-4

Code:
00:55:52 T:2654229504  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
00:55:52 T:2654229504  NOTICE: Creating video thread
00:55:52 T:2654229504  NOTICE: Opening stream: 1 source: 256
00:55:52 T:2654229504  NOTICE: Finding audio codec for: 86016
00:55:52 T:2654229504  NOTICE: Creating audio thread
00:55:52 T:2654229504  NOTICE: Opening stream: 2 source: 256
00:55:52 T:2662618112  NOTICE: running thread: video_thread
00:55:52 T:2654229504   ERROR: OpenStream - Unable to init overlay codec
00:55:52 T:2654229504 WARNING: OpenStream - Unsupported stream 2. Stream disabled.
00:55:52 T:2596271104  NOTICE: running thread: CDVDPlayerAudio::Process()
00:55:52 T:2596271104  NOTICE: Creating audio stream (codec id: 86016, channels: 1, sample rate: 48000, no pass-through)
00:55:52 T:2662618112  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating VDPAU(720x576)
00:55:52 T:2596271104  NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 24
00:55:52 T:2662618112  NOTICE: VDPAU::CreateContext - creating decoder context
00:55:52 T:2662618112  NOTICE: vdp_device = 0x00000001 vdp_st = 0x00000000
00:55:52 T:2662618112  NOTICE: VDPAU Decoder capabilities:
00:55:52 T:2662618112  NOTICE: name          level macbs width height
00:55:52 T:2662618112  NOTICE: ------------------------------------
00:55:52 T:2662618112  NOTICE: MPEG1            16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: MPEG2_SIMPLE     16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: MPEG2_MAIN       16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: H264_BASELINE    16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: H264_MAIN        16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: H264_HIGH        16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: MPEG4_PART2_ASP  16 32400  3840  2160
00:55:52 T:2662618112  NOTICE: ------------------------------------
00:55:52 T:2662618112  NOTICE:  (VDPAU) ConfigVDPAU
00:55:52 T:2662618112  NOTICE:  (VDPAU) screenWidth:720 vidWidth:720 surfaceWidth:720
00:55:52 T:2662618112  NOTICE:  (VDPAU) screenHeight:576 vidHeight:576 surfaceHeight:576
00:55:52 T:2642965504  NOTICE: COutput::OnStartup: Output Thread created
00:55:52 T:2642965504  NOTICE:  (VDPAU) COutput Init
00:55:52 T:2642965504  NOTICE: VDPAU::COutput::CreateGlxContext - created context
00:55:52 T:2642965504  NOTICE: VDPAU::COutput: vdpau gl interop initialized
00:55:52 T:2571105280  NOTICE: CMixer::OnStartup: Mixer Thread created
00:55:52 T:2571105280  NOTICE:  (VDPAU) CMixer Init
00:55:52 T:2642965504  NOTICE: VDPAU::COutput registered surface
00:55:52 T:2662618112  NOTICE:  fps: 50.000000, pwidth: 720, pheight: 576, dwidth: 720, dheight: 528
00:55:52 T:2662618112  NOTICE:  (RenderGLES) Configure
00:55:52 T:2662618112  NOTICE: Display resolution DESKTOP : 1280x720 @ 60.00 - Full Screen (16)
00:55:52 T:3038330880  NOTICE: Using GL_TEXTURE_2D
00:55:52 T:2642965504  NOTICE: VDPAU::COutput registered surface
00:55:52 T:3038330880  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
00:55:52 T:3038330880  NOTICE: GLES: NPOT texture support detected
00:55:52 T:2642965504  NOTICE: VDPAU::COutput registered surface
00:55:52 T:2596271104  NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 24
00:55:52 T:2642965504  NOTICE: Previous line repeats 14 times.
00:55:52 T:2642965504  NOTICE: VDPAU::COutput registered surface
Reply
(2016-03-29, 09:28)porlock Wrote: twisted_tits:
This headers must to be used for building Kodi not only for libvdpau, so it is needed do put them in system patch tree.

I successfully build Kodi, now im fighting with a krenel, it was compiled successfully but stuck on booting Undecided i'm searching what can cause that.

Hi porlock,

I've same problem compiling DVDVideoCodecFFmpeg.cpp (error: ‘EGLSyncKHR’ does not name a type EGLSyncKHR fence)...what do you mean when you say "so it (the headers) is needed do put them in system patch tree."? Could you give more details about what you have done?

For the record: I've built my own kernel with mosterta's patches and followed succefully twisted_tits's tutorial (https://twistedlinux.wordpress.com/2016/...eleration/). I've tried to use CFLAGS pointing to the new EGL headers to compile Kodi, but i had no success at all...

Could you help me budy??
Thanks in advance for yours great jobs guys.
Reply
sergiodefontes,

You need to put the libraries from https://github.com/codesnake/aml-mali/tr...er/include in /usr/include in your system, preserving the folder structure, i.e. you should have /usr/include/EGL, /usr/include/GLES and so on with respective files inside.

Regards,

Valentin
Reply
(2016-10-14, 07:50)mapmot Wrote: sergiodefontes,

You need to put the libraries from https://github.com/codesnake/aml-mali/tr...er/include in /usr/include in your system, preserving the folder structure, i.e. you should have /usr/include/EGL, /usr/include/GLES and so on with respective files inside.

Regards,

Valentin

Thks a lot mapmot, solved my Kodi compiling problem. that did the trick. Rofl Cool...

Now I've Kernel and Kodi built successfully.

But, I stuck on segmentation fault problem when I launch Kodi. That's the error:

root@bananapi:~/Sources/xbmc# kodi
ERROR: Unable to create GUI. Exiting
Segmentation fault
Crash report available at /root/kodi_crashlog-20161015_065624.log

And that's the crash log: http://pastebin.com/fmaQLrfw

And my lsmod:

Code:
root@bananapi:~/Sources/xbmc# lsmod
Module                  Size  Used by
disp_ump                 850  0
sunxi_cedar_mod        10500  0
mali_drm                2638  1
drm                   213313  2 mali_drm
mali                  113907  0
ump                    61597  4 mali,disp_ump
cpufreq_conservative     5704  0
cpufreq_powersave       1242  0
cpufreq_userspace       3524  0
cpufreq_stats           5940  0
8021q                  18601  0
garp                    6068  1 8021q
stp                     2028  1 garp
llc                     5357  2 stp,garp
sg                     27595  0
Any ideas to help me guys? Old libraries on my system? Kernel set up?

Thanks in advance
Thanks again mapmot
Reply
Remove the crashlog and use pastebin.com to start with
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Ok Martijn , excuse me.

Thks. I did it now.
Reply
sergiodefontes, wrong libMali.so. You need the framebuffer version, not the x11 one.
Reply
(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
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 23

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