Solved popcornmix/gbm 4k HEVC playback fails, EGL_BAD_MATCH
#1
@popcornmix - I built c131e47ada from your gbm branch on Arch ARM (RPi4 4G). 

Problem: This 4k HEVC video does not play/just get a blank screen.

Kodi debug log: https://gist.github.com/graysky2/c26a960...be66c1415a
Log from building: https://gist.github.com/graysky2/8d6dcbc...28b52a3159

Snippet from log:
Code:
...
2020-09-19 09:48:59.064 T:414     DEBUG <general>: EGL Debugging:
                                                   Error: EGL_BAD_MATCH
                                                   Command: eglCreateImageKHR
                                                   Type: EGL_DEBUG_MSG_ERROR_KHR
                                                   Message: unknown drm fourcc format
2020-09-19 09:48:59.064 T:414     ERROR <general>: CEGLImage::CreateImage - failed to import buffer into EGL image: 12297
2020-09-19 09:48:59.064 T:414     DEBUG <general>: CEGLImage::CreateImage - attributes:
                                                   EGL_WIDTH: 3840
                                                   EGL_HEIGHT: 2160
                                                   EGL_LINUX_DRM_FOURCC_EXT: 808661072
                                                   EGL_YUV_COLOR_SPACE_HINT_EXT: EGL_ITU_REC709_EXT
                                                   EGL_SAMPLE_RANGE_HINT_EXT: EGL_YUV_NARROW_RANGE_EXT
                                                   EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT: EGL_YUV_CHROMA_SITING_0_EXT
                                                   EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT: EGL_YUV_CHROMA_SITING_0_EXT
                                                   EGL_DMA_BUF_PLANE0_FD_EXT: 56
                                                   EGL_DMA_BUF_PLANE0_OFFSET_EXT: 0
                                                   EGL_DMA_BUF_PLANE0_PITCH_EXT: 7680
                                                   EGL_DMA_BUF_PLANE1_FD_EXT: 56
                                                   EGL_DMA_BUF_PLANE1_OFFSET_EXT: 276480
                                                   EGL_DMA_BUF_PLANE1_PITCH_EXT: 7680
...

My cmake stanza:
Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-L/opt/vc/lib -lvcsm" \
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/vc/lib -lvcsm" \
-DCMAKE_CXX_FLAGS="-Wl,-L/opt/vc/lib -Wl,-lvcsm" \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_FMT=ON \
-DENABLE_INTERNAL_CROSSGUID=ON \
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_SPDLOG=ON \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_OPENGL=OFF \
-DENABLE_MYSQLCLIENT=ON \
-Dlibdvdcss_URL="/libdvdcss-1.4.2-Leia-Beta-5.tar.gz" \
-Dlibdvdnav_URL="/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz" \
-Dlibdvdread_URL="/libdvdread-6.0.0-Leia-Alpha-3.tar.gz" \
-DFFMPEG_URL="/ffmpeg-4.3.1-Matrix-Alpha1-1.tar.gz" \
-DFMT_URL="/fmt-6.1.2.tar.gz" \
-DCROSSGUID_URL="/crossguid-8f399e8bd4.tar.gz" \
-DFSTRCMP_URL="/fstrcmp-0.7.D001.tar.gz" \
-DFLATBUFFERS_URL="/flatbuffers-1.11.0.tar.gz" \
-DSPDLOG_URL="/spdlog-1.5.0.tar.gz" \
-DCORE_PLATFORM_NAME=gbm \
-DGBM_RENDER_SYSTEM=gles \
../xbmc
make
make preinstall
Need help programming a Streamzap remote?
Reply
#2
@popcornmix - Any thoughts?  I updated this thread based on your recent commits.
Need help programming a Streamzap remote?
Reply
#3
We've tracked it down to this commit.
We're trying to work out the best solution for this (ideally would involve bumping libdrm to a version newer than standard repo versions).
gbm branch has a interim fix that makes video play again.
Reply
#4
@popcornmix - That's excellent, thank you!  I can confirm that bdcaa5132b3a138c2a6d7c5771445916d4c0962e fixes the issue.  Thank you.  For whatever reason, the red line artifacts are still present, but I think that's something that is independent of your gbm branch.  I opened 18444 for that.
Need help programming a Streamzap remote?
Reply
#5
Fix is merged into kodi tree. https://github.com/xbmc/xbmc/pull/18450
Reply
#6
@popcornmix - I applied that fix to 7f6bf8f but got the same results.  I will build the latest xbmc/master and re-test updating my ticket.  I am currently building your latest commit (gbm branch) and will also test it.  I do not want to pollute the ticket I opened making anyone on the team think that I am mixing the branches with that report. I will open a new thread here that specifically deals with your branch if needed.
Need help programming a Streamzap remote?
Reply
#7
The kodi fix is for the "EGL_BAD_MATCH" issue you've reported here. It has nothing to do with the red artifacts issue which is completely unrelated.
Reply
#8
@popcornmix - Yes, I totally agree.  The thing is, I get the same red line artifacts with your latest gbm branch, but I can play 4k 8-bit and 4k 10-bit videos with it whereas I cannot on xbmc/master.
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
popcornmix/gbm 4k HEVC playback fails, EGL_BAD_MATCH0