• 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 23
hardware acceleration on allwinner A10/A20 with vdpau and OpenGLES (zero-copy)
(2017-07-29, 12:42)mosterta Wrote:
(2017-07-29, 11:14)pdrobek Wrote:
Code:
CC      libavcodec/mp3_header_decompress_bsf.o
CC      libavcodec/mpc.o
CC      libavcodec/mpc7.o
CC      libavcodec/mpc8.o
CC      libavcodec/mpeg12.o
In file included from libavcodec/vdpau_internal.h:58:0,
                 from libavcodec/mpeg12.c:42:
libavcodec/vdpau.h:104:5: error: unknown type name 'VdpDecoderSetControlData'
     VdpDecoderSetControlData *set_video_header;
     ^
make: *** [common.mak:57: libavcodec/mpeg12.o] Error 1
make: *** Waiting for unfinished jobs....
ERROR: Building ffmpeg failed
checking for FFMPEG... yes
configure: error: "/usr/lib/libavcodec.a not found"

How can i fix it?

Code:
cb2 kodi-16.1 # grep -r --include "*.h" VdpDecoderSetControlData
tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vdpau.h:    VdpDecoderSetControlData *set_video_header;
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h:  VdpDecoderSetControlData *                    vdp_decoder_set_video_control_data;

I assume you use the jarvis_allwinner_opengles_support branch from my repository.

Since I do not do any development anymore on this branch it is not that easy and resporitories may be run out of sync. You need the right combination of this branch with the repositories mosterta/libvdpau-sunix and mosterta/libvdpau.

You can try this combination:
mosterta/libvdpau-sunxi 837b534bed2a3e3f8e964dd1b3a6147869ce8a41
mosterta/libvdau ccc63ad1e79597535bb14a7ea24fd95101f26314

It should work, but I am not 100% sure.

ok i try :-) thank you. Please tell me on which kodi version you are working at the moment? I can be beta tester if you wish
Reply
Code:
AR      libavcodec/libavcodec.a
ar: libavcodec/vdpau_msmpeg4.o: No such file or directory
make: *** [library.mak:41: libavcodec/libavcodec.a] Error 1
make: *** Waiting for unfinished jobs....
ERROR: Building ffmpeg failed
checking for FFMPEG... yes
configure: error: "/usr/lib/libavcodec.a not found"

next issue, on page there is toms81 patch but it will work on jarvis? @mosterta any idea?
Reply
(2017-07-29, 16:58)pdrobek Wrote:
(2017-07-29, 12:42)mosterta Wrote:
(2017-07-29, 11:14)pdrobek Wrote:
Code:
CC      libavcodec/mp3_header_decompress_bsf.o
CC      libavcodec/mpc.o
CC      libavcodec/mpc7.o
CC      libavcodec/mpc8.o
CC      libavcodec/mpeg12.o
In file included from libavcodec/vdpau_internal.h:58:0,
                 from libavcodec/mpeg12.c:42:
libavcodec/vdpau.h:104:5: error: unknown type name 'VdpDecoderSetControlData'
     VdpDecoderSetControlData *set_video_header;
     ^
make: *** [common.mak:57: libavcodec/mpeg12.o] Error 1
make: *** Waiting for unfinished jobs....
ERROR: Building ffmpeg failed
checking for FFMPEG... yes
configure: error: "/usr/lib/libavcodec.a not found"

How can i fix it?

Code:
cb2 kodi-16.1 # grep -r --include "*.h" VdpDecoderSetControlData
tools/depends/target/ffmpeg/ffmpeg-2.8.6-Jarvis-16.0/libavcodec/vdpau.h:    VdpDecoderSetControlData *set_video_header;
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h:  VdpDecoderSetControlData *                    vdp_decoder_set_video_control_data;

I assume you use the jarvis_allwinner_opengles_support branch from my repository.

Since I do not do any development anymore on this branch it is not that easy and resporitories may be run out of sync. You need the right combination of this branch with the repositories mosterta/libvdpau-sunix and mosterta/libvdpau.

You can try this combination:
mosterta/libvdpau-sunxi 837b534bed2a3e3f8e964dd1b3a6147869ce8a41
mosterta/libvdau ccc63ad1e79597535bb14a7ea24fd95101f26314

It should work, but I am not 100% sure.

ok i try :-) thank you. Please tell me on which kodi version you are working at the moment? I can be beta tester if you wish

my development branch (which should be more stable in compiling) is the master_allwinner_layered_vdpau and master branches of mosterta/libvdpau-sunxi and mosterta/libvdpau
Reply
(2017-07-30, 03:34)pdrobek Wrote:
Code:
AR      libavcodec/libavcodec.a
ar: libavcodec/vdpau_msmpeg4.o: No such file or directory
make: *** [library.mak:41: libavcodec/libavcodec.a] Error 1
make: *** Waiting for unfinished jobs....
ERROR: Building ffmpeg failed
checking for FFMPEG... yes
configure: error: "/usr/lib/libavcodec.a not found"

next issue, on page there is toms81 patch but it will work on jarvis? @mosterta any idea?

I don't know toms81 patch, therefore I can't tell you whether it works. check if file ffmpeg/libavcodec/vdpau_msmpeg4.c exists. It should be generated (among other changes) by the file "ffmpeg*.patch" in tools/depends/ffmpeg
If it does not exist, then the part in the patch is somehow missing.

Then the best option is to switch to my development branch, or I need to check and maybe provide a patch file containing the missing file. You also can try to extract the file from the latest development branch in master_allwinner_layered_vdpau.
Reply
(2017-07-30, 11:06)mosterta Wrote:
(2017-07-30, 03:34)pdrobek Wrote:
Code:
AR      libavcodec/libavcodec.a
ar: libavcodec/vdpau_msmpeg4.o: No such file or directory
make: *** [library.mak:41: libavcodec/libavcodec.a] Error 1
make: *** Waiting for unfinished jobs....
ERROR: Building ffmpeg failed
checking for FFMPEG... yes
configure: error: "/usr/lib/libavcodec.a not found"

next issue, on page there is toms81 patch but it will work on jarvis? @mosterta any idea?

I don't know toms81 patch, therefore I can't tell you whether it works. check if file ffmpeg/libavcodec/vdpau_msmpeg4.c exists. It should be generated (among other changes) by the file "ffmpeg*.patch" in tools/depends/ffmpeg
If it does not exist, then the part in the patch is somehow missing.

Then the best option is to switch to my development branch, or I need to check and maybe provide a patch file containing the missing file. You also can try to extract the file from the latest development branch in master_allwinner_layered_vdpau.

i took toms81 patch from his repo and give a shot. if no luck then i would compile his jarvis. if still no luck i consider switch to your or his master branch.
Reply
@mosterta

is there any way to use kodi with X and GLES?

is your master build still need such fancy configuration as jarvis needs?

Tom81s Jarvis build successful but

Code:
20:47:18 T:3030601728   ERROR: EGL error in InitDisplay: 3001
20:47:18 T:3030601728   ERROR: InitWindowSystem: Could not create display

any idea what is wrong?
Reply
(2017-07-31, 12:39)pdrobek Wrote: @mosterta

is there any way to use kodi with X and GLES?

is your master build still need such fancy configuration as jarvis needs?

Tom81s Jarvis build successful but

Code:
20:47:18 T:3030601728   ERROR: EGL error in InitDisplay: 3001
20:47:18 T:3030601728   ERROR: InitWindowSystem: Could not create display

any idea what is wrong?
do you have a complete log file?
can you check which libGLESv2 is used? Can you do a
ldd kodi.bin
on a shell? (of course you must cd to the directory where you have installed kodi, or in the xbmc source root directory)
It seems something with EGL initializations goes wrong
Reply
(2017-08-01, 17:55)mosterta Wrote:
(2017-07-31, 12:39)pdrobek Wrote: @mosterta

is there any way to use kodi with X and GLES?

is your master build still need such fancy configuration as jarvis needs?

Tom81s Jarvis build successful but

Code:
20:47:18 T:3030601728   ERROR: EGL error in InitDisplay: 3001
20:47:18 T:3030601728   ERROR: InitWindowSystem: Could not create display

any idea what is wrong?
do you have a complete log file?
can you check which libGLESv2 is used? Can you do a
ldd kodi.bin
on a shell? (of course you must cd to the directory where you have installed kodi, or in the xbmc source root directory)
It seems something with EGL initializations goes wrong

now i rebuilding whole environment because at the beginnig i created X environment. full log i will show after i prepare one, also with ldd kodi.bin
Reply
hi @mosterta
first I want to thank you for you work on bringing kodi to allwinner SoCs.
I'm using A13 Tablet (no g2d) ,
I tried your Jarvis branch and solved the many problems I faced , but it didnt work well ( video is half screen and plays briefly the stops and back to playing and so on) , note it was using h264-vdpau (hw) not software.
also I checked your libvdpau-sunxi is working by using mplayer , it works fine fullscreen of course because you have removed all x11 dependences.
reading this thread you said that you are not working on jarvis anymore and switched to krypton , so in order to not bother you with jarvis problems I switched to master_allwinner_layered_vdpau because it's your development branch and stable as you stated earlier.
however It's not working with me (empty black video ) and segmentation faults, and this error
Code:
ASSERT EXIT: In file: ump_frontend.c  function: ump_phys_address_get()   line: 149
Reference count too low
here's the crash log + backtrace:
https://pastebin.com/tTTQPRHv
I hope You can help me to make this work , Thanks
Reply
(2017-08-02, 20:16)xchetah Wrote: hi @mosterta
first I want to thank you for you work on bringing kodi to allwinner SoCs.
I'm using A13 Tablet (no g2d) ,
I tried your Jarvis branch and solved the many problems I faced , but it didnt work well ( video is half screen and plays briefly the stops and back to playing and so on) , note it was using h264-vdpau (hw) not software.
also I checked your libvdpau-sunxi is working by using mplayer , it works fine fullscreen of course because you have removed all x11 dependences.
reading this thread you said that you are not working on jarvis anymore and switched to krypton , so in order to not bother you with jarvis problems I switched to master_allwinner_layered_vdpau because it's your development branch and stable as you stated earlier.
however It's not working with me (empty black video ) and segmentation faults, and this error
Code:
ASSERT EXIT: In file: ump_frontend.c  function: ump_phys_address_get()   line: 149
Reference count too low
here's the crash log + backtrace:
https://pastebin.com/tTTQPRHv
I hope You can help me to make this work , Thanks

Hi xchetah,
I guess I know the issue: the crash you see is just a crash follow up the root cause. The root cause is probably that a wrong video frame display method is used. There a difference versions of /dev/disp, depending on whether A10/A20, H3 or any other Allwinner CPU is used.
Can you do a
cat /proc/cpuinfo
on the shell and post the output?

Currently I use the "Hardware" field in the output to choose which implementation for video frame displaying is used and I see that the wrong one is used (Error output: 16:47:04.026 T:3000897536 ERROR: CHwLayerAllwinnerDisp2: DISP_LAYER_GET_CONFIG failed.). Maybe my method is just not working correctly.
Reply
Hi @mosterta: When I load the code into gdb and just start to run it, I get the following:
(gdb) run
Starting program: /root/kodi/xbmc/kodi.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Cannot access memory at address 0x0

Program received signal SIGILL, Illegal instruction.
0xb6e14e68 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0

Something wrong with my gdb?
When loading it, I get tons of messages like:
BFD: /root/kodi/xbmc/kodi.bin: invalid string offset 16925297 >= 9583562 for section `.strtab'
BFD: /root/kodi/xbmc/kodi.bin: invalid string offset 134365851 >= 9583562 for section `.strtab'
...

But eventually it loads the code into gdb and says "done."
Reply
Hi @mosterta
thank you for taking the time to review this, here's the output :
Code:
Processor    : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 1001.88
Features    : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part    : 0xc08
CPU revision    : 2

Hardware    : sun5i
Revision    : 0000
Serial        : 0000000000000000
Reply
(2017-08-02, 23:03)matrzh Wrote: Hi @mosterta: When I load the code into gdb and just start to run it, I get the following:
(gdb) run
Starting program: /root/kodi/xbmc/kodi.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Cannot access memory at address 0x0

Program received signal SIGILL, Illegal instruction.
0xb6e14e68 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0

Something wrong with my gdb?
When loading it, I get tons of messages like:
BFD: /root/kodi/xbmc/kodi.bin: invalid string offset 16925297 >= 9583562 for section `.strtab'
BFD: /root/kodi/xbmc/kodi.bin: invalid string offset 134365851 >= 9583562 for section `.strtab'
...

But eventually it loads the code into gdb and says "done."

SIGILL in libcrypto is normal, there is some kind of check done in libcrypto using an illegal instruction. Just continue in gdb with command "continue" or easier "c".
The BFD is strange, I have never seen it. BFD is used to read the elf file (I guess), but either there is something strange in your binary or in the BFD lib.. where did you get gdb from? which linux distribution are you using?
Reply
(2017-08-02, 23:07)xchetah Wrote: Hi @mosterta
thank you for taking the time to review this, here's the output :
Code:
Processor    : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 1001.88
Features    : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part    : 0xc08
CPU revision    : 2

Hardware    : sun5i
Revision    : 0000
Serial        : 0000000000000000

That is the root cause. Currently I don't check for sun5i, I didn't know that it exists. I have added support for A13. you can check out the latest kodi in the repository, same branch. Currently the changes are untested.
But since I do not have an A13 and I don't know how the display render hardware in A13 is close to A10 or A20 or something in between there can be some issues. Mainly when alpha blending is used. Alpha blending is used when you display something above the video, e.g. the timeline or kodi menu. You need to try and tell if anything looks strange or "wrong".
Reply
@mosterta Thanks , I've applied the patch and waiting for the build to complete.
I'll report back when done
Reply
  • 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 23

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