2016-01-16, 22:29
This one:
https://github.com/linux-sunxi/sunxi-mal...L/eglext.h
No EGL_SYNC_FENCE_KHR stuff in there.
https://github.com/linux-sunxi/sunxi-mal...L/eglext.h
No EGL_SYNC_FENCE_KHR stuff in there.
kodi.bin: opengl_nv.c:348: glVDPAUMapSurfacesNV: Assertion `nv' failed.
(2015-12-30, 14:16)mosterta Wrote: - it needs a special version of libvdpau-sunxi (due to using UMP + support for more video formats)
https://github.com/mosterta/libvdpau-sunxi
Quote:ve.c:30:32: fatal error: valgrind/ammt_reqs.h: No such file or directoryI don't have ammt_reqs.h file in valgrind directory and i don't know where to take it from. Any clues? Sorry if i ask something stupid, i am new into all this.
#include <valgrind/ammt_reqs.h>
^
compilation terminated.
Makefile:88: recipe for target 've.o' failed
make: *** [ve.o] Error 1
(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?
(2016-01-31, 20:46)mosterta Wrote: Hi RagnerBG,
the question is not studid, this is something I already forgot about: I modified valgrind to add more features, but which you probably don't need. you can remove the include line + in ve.c the line with
AMMT_SET_REGS_BASE.
BR
Quote:opengl_nv.c:29:32: fatal error: EGL/eglplatform_fb.h: No such file or directoryAt first i thought it is because i have X11 version of mali driver, so i install it for framebuffer, but the file is still missing. So i manually create file eglplatform_fb.h in /usr/include/EGL, with the content from here - sunxi-mali/include/EGL/eglplatform_fb.h and i make some progress, but end up with another missing file error:
#include <EGL/eglplatform_fb.h>
^
compilation terminated.
Makefile:88: recipe for target 'opengl_nv.o' failed
make: *** [opengl_nv.o] Error 1
Quote:opengl_nv.c:30:32: fatal error: EGL/fbdev_window.h: No such file or directoryI tried the same scenario and manually create the file in /usr/include/EGL, with the content from here - fbdev_window.h @ 3bf3af7b, but still something is not right because i end up with another error:
#include <EGL/fbdev_window.h>
^
compilation terminated.
Makefile:88: recipe for target 'opengl_nv.o' failed
Quote:opengl_nv.c: In function ‘createTexture2D’:for which i don't have an idea. I will appreciate if you give me some more clues .
opengl_nv.c:329:6: error: ‘fbdev_pixmap’ has no member named ‘format’
pm->format = 0;
^
opengl_nv.c: In function ‘vdp_device_opengles_nv_open’:
opengl_nv.c:75:1: warning: control reaches end of non-void function [-Wreturn-ty pe]
}
^
opengl_nv.c: In function ‘glVDPAURegisterOutputSurfaceNV’:
opengl_nv.c:204:1: warning: control reaches end of non-void function [-Wreturn-t ype]
}
^
opengl_nv.c: In function ‘glVDPAUIsSurfaceNV’:
opengl_nv.c:208:1: warning: control reaches end of non-void function [-Wreturn-t ype]
}
^
Makefile:88: recipe for target 'opengl_nv.o' failed
(2016-01-31, 22:22)RagnerBG Wrote:(2016-01-31, 20:46)mosterta Wrote: Hi RagnerBG,
the question is not studid, this is something I already forgot about: I modified valgrind to add more features, but which you probably don't need. you can remove the include line + in ve.c the line with
AMMT_SET_REGS_BASE.
BR
Thank you for your answer. I've already tried to remove "#include <valgrind/ammt_reqs.h>" in ve.c, now i've tried to remove "AMMT_SET_REGS_BASE(ve.regs);" line also. But i end up with the same error:
Quote:opengl_nv.c:29:32: fatal error: EGL/eglplatform_fb.h: No such file or directoryAt first i thought it is because i have X11 version of mali driver, so i install it for framebuffer, but the file is still missing. So i manually create file eglplatform_fb.h in /usr/include/EGL, with the content from here - sunxi-mali/include/EGL/eglplatform_fb.h and i make some progress, but end up with another missing file error:
#include <EGL/eglplatform_fb.h>
^
compilation terminated.
Makefile:88: recipe for target 'opengl_nv.o' failed
make: *** [opengl_nv.o] Error 1
Quote:opengl_nv.c:30:32: fatal error: EGL/fbdev_window.h: No such file or directoryI tried the same scenario and manually create the file in /usr/include/EGL, with the content from here - fbdev_window.h @ 3bf3af7b, but still something is not right because i end up with another error:
#include <EGL/fbdev_window.h>
^
compilation terminated.
Makefile:88: recipe for target 'opengl_nv.o' failed
Quote:opengl_nv.c: In function ‘createTexture2D’:for which i don't have an idea. I will appreciate if you give me some more clues .
opengl_nv.c:329:6: error: ‘fbdev_pixmap’ has no member named ‘format’
pm->format = 0;
^
opengl_nv.c: In function ‘vdp_device_opengles_nv_open’:
opengl_nv.c:75:1: warning: control reaches end of non-void function [-Wreturn-ty pe]
}
^
opengl_nv.c: In function ‘glVDPAURegisterOutputSurfaceNV’:
opengl_nv.c:204:1: warning: control reaches end of non-void function [-Wreturn-t ype]
}
^
opengl_nv.c: In function ‘glVDPAUIsSurfaceNV’:
opengl_nv.c:208:1: warning: control reaches end of non-void function [-Wreturn-t ype]
}
^
Makefile:88: recipe for target 'opengl_nv.o' failed
(2016-02-01, 00:08)mosterta Wrote: it's a long time ago that I installed the header files, so I am not sure where I get all these from. I thought from linux-sunxi/sunxi-mali but I checked and didn't find the include by myself. But you can get the header files from
https://github.com/codesnake/aml-mali/co...a7848c07f9
The header files in this repo should be comptible with the ones I use.
Quote:Failed to open VDPAU backend libvdpau_sunxi.so: cannot open shared object file:Is this some permission problem, or something else?
No such file or directory
(2016-02-01, 21:23)RagnerBG Wrote:(2016-02-01, 00:08)mosterta Wrote: it's a long time ago that I installed the header files, so I am not sure where I get all these from. I thought from linux-sunxi/sunxi-mali but I checked and didn't find the include by myself. But you can get the header files from
https://github.com/codesnake/aml-mali/co...a7848c07f9
The header files in this repo should be comptible with the ones I use.
Yes, this almost do the trick, thank you. But i had to rename/copy eglplatform.h as eglplatform_fb.h, because i noticed it is the same file, renamed when i install mali driver for framebuffer. After this, the error was about missing vdpau-sunxi in ld or something, so i installed libvdpau-sunxi from here first, then your version finally make and installs without errors. Now i have new libvdpau_sunxi.so and some libvdpau_nv_sunxi.so.1 in /usr/local/lib/vdpau. I also copy vdpau directory in /usr/lib as is mentioned in above link, do ldconfig, reboot etc.
The problem is i can't use this new version for some reason. When i try to open file with mplayer or check with vdpauinfo i have an error:
Quote:Failed to open VDPAU backend libvdpau_sunxi.so: cannot open shared object file:Is this some permission problem, or something else?
No such file or directory
[ 3567.081631] UMP<1>: Failed to allocate needed CMA memory 401408 bytes
[ 3567.087041] UMP<1>: _ump_ukk_allocate() failed in ump_ioctl_allocate()
[ 3567.092643] UMP<1>: Failed to allocate needed CMA memory 1597440 bytes
[ 3567.098820] UMP<1>: _ump_ukk_allocate() failed in ump_ioctl_allocate()
(2016-02-05, 22:59)tom81 Wrote: Some feedback:
I got it working now, disabling the video mixer solved my problem. So I did some tests with a number of video files, mainly h264 1080p and 720p. I also tested XVid and MPEG2 videos.
Results:
- H264 stuff generally works up to 1080p (as expected), but I had to decrease ve_size in sunxi_cedar_mod to 80MB or lower (I had 128MB), otherwise 1080p playback crashes Kodi and
appeared in my kernel log. sunxi_cedar_mod grabs mem in CMA when loaded, maybe vdpau-sunxi tries to grab another chunk of CMA via UMP and fails? Does vdpau-sunxi use the mem allocated by sunxi_cedar_mod?Code:[ 3567.081631] UMP<1>: Failed to allocate needed CMA memory 401408 bytes
[ 3567.087041] UMP<1>: _ump_ukk_allocate() failed in ump_ioctl_allocate()
[ 3567.092643] UMP<1>: Failed to allocate needed CMA memory 1597440 bytes
[ 3567.098820] UMP<1>: _ump_ukk_allocate() failed in ump_ioctl_allocate()
- H264 and XVid files played fine, but I noticed some skipping every 20secs or so. The video freezes, about 4 frames are skipped (according to counter), then playback continues.
- MPEG2 videos fail completely, audio plays fine but there's no video at all.
- CPU usage is a bit higher as compared to the old AW blobs, around 30% on both cores (blobs had ~10%). Shouldn't be so important though.
I uploaded some kodi log files for the different codec playback attempts, maybe they help solving the stuttering and MPEG2 issues.
https://www.dropbox.com/s/gxkexxbck8q5a3...s.zip?dl=0
Hope this helps a bit.
Tom
(2016-02-07, 21:19)tom81 Wrote: Thanks for the feedback. I tested your updated code and I can confirm that MPEG2 video playback now works. Without debugging compiled in, the stuttering is also gone.
Some more things I noticed:
- Your latest FFMPEG patch seems to be missing a file, avcodec/vdpau_msmpeg4.c. I re-added it from an earlier revision of the patch.
- Forward/backward skipping in videos is broken for any codec: If I fast-forward the video to some different time, I get some green flashing screen with the last few shown frames repeating in between over and over again. Audio continues to play normally, though.
- XVID/MPEG4 playback seems to be a mixed bag. Some files I have work nicely, others have some sort of block artifacts, tearing, choppy playback or no video at all. Maybe the options the videos were encoded with are important, I'll try to produce some "broken" test videos for debugging.
I also tried to port your code to the latest Kodi version (16rc), but I'm afraid I messed something up: I only get a red screen instead of any hw-accelerated video. Something important has changed between 14.2 and 16 I didn't take care of...
Best,
tom
(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)
Quote:configure: WARNING: unrecognized options: --with-ffmpegI 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:------------------------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:
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
------------------------
Quote:Makefile:301: recipe for target 'xbmc/cores/VideoRenderers/VideoRenderer.a' failedI 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.
make: *** [xbmc/cores/VideoRenderers/VideoRenderer.a] Error 2
(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;