Go to advanced search

by dividuum
Fri Aug 16, 2019 9:14 pm
Forum: Graphics programming
Topic: MMAL video playback into DRM planes.
Replies: 3
Views: 294

Re: MMAL video playback into DRM planes.

Continuing the journey speaking to myself: The rotation seems to be indeed limited to a few options. It it looks like it's impossible to rotate a video by 90/270 degree right now. Is that something that will be supported in the future? Or is the `video_render` component the only way to achieve this?
by dividuum
Thu Aug 15, 2019 2:17 pm
Forum: Graphics programming
Topic: Relationship between mode set with `tvservice` and DRM
Replies: 2
Views: 173

Relationship between mode set with `tvservice` and DRM

If I set a video mode with `tvservice` on a FullHD display, for example like this: [email protected]:~# tvservice -e "CEA 4" Powering on HDMI with explicit settings (CEA mode 4) [email protected]:~# tvservice -s state 0xa [HDMI CEA (4) RGB lim 16:9], 1280x720 @ 60.00Hz, progressive The modetest tool d...
by dividuum
Wed Aug 14, 2019 4:40 pm
Forum: Graphics programming
Topic: MMAL video playback into DRM planes.
Replies: 3
Views: 294

Re: MMAL video playback into DRM planes.

Anything? Anyone? I was able to figure out how to rotate a DRM plane (although only the rotate-180 bitmask value seem to work) and found the "zpos" property. Looking at the output of modeset (below) and my own output doesn't mark the "zpos" plane property as immutable. I tried setting various values...
by dividuum
Fri Aug 09, 2019 10:03 pm
Forum: Graphics programming
Topic: Strange segfault after several hours of running program
Replies: 30
Views: 1009

Re: Strange segfault after several hours of running program

Mind giving a few insights on how scheduling works now? Previously with OMX I've used the schedule component together with a clock to sync audio and video. How does a similar pipeline now work with mmal? Are you using the schedule component now?
by dividuum
Fri Aug 09, 2019 8:49 pm
Forum: OpenGLES
Topic: Overlay OpenGLES and MMAL h264 decoder
Replies: 4
Views: 185

Re: Overlay OpenGLES and MMAL h264 decoder

I got that working using the old OMX API from my existing code. I'm currently porting this over to the MMAL API and run into basically the same issues myself. See my post at https://www.raspberrypi.org/forums/view ... 7&t=248353
by dividuum
Fri Aug 09, 2019 8:40 pm
Forum: OpenGLES
Topic: Overlay OpenGLES and MMAL h264 decoder
Replies: 4
Views: 185

Re: Overlay OpenGLES and MMAL h264 decoder

A good start is probably to take a look at the output of `vcgencmd dispmanx_list`. It'll show your the arrangement of layers.
by dividuum
Fri Aug 09, 2019 6:04 pm
Forum: Graphics programming
Topic: MMAL video playback into DRM planes.
Replies: 3
Views: 294

MMAL video playback into DRM planes.

I'm currently working on a DRM/MMAL based video playback using the new Pi4 APIs. Essentially I'm trying to replicate (as a first step) what omxplayer does with dispmanx and OMX. I'm having a few difficulties understanding how that's all supposed to work. With OMX it was pretty simple: Create a dispm...
by dividuum
Thu Aug 08, 2019 4:37 pm
Forum: Graphics programming
Topic: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?
Replies: 6
Views: 274

Re: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?

Are those freshly created textures on the change? In which case something may well be memsetting it to 0, leaving a transparent alpha channel. I'm not sure I fully understand what you're asking, but right now the code creates a configurable number (I tried from 2 to 10) number of textures with the ...
by dividuum
Thu Aug 08, 2019 3:33 pm
Forum: OpenMAX
Topic: OpenMax video covers all X window and keeps topmost
Replies: 11
Views: 1406

Re: OpenMax video covers all X window and keeps topmost

You should be able to find that out if you run `vcgencmd dispmanx_list`. You'll see the various dispmanx parameters used to compose the final video output.
by dividuum
Thu Aug 08, 2019 3:05 pm
Forum: Graphics programming
Topic: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?
Replies: 6
Views: 274

Re: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?

Can you add frame numbers to the top and bottom half of the images and check to see if the top and bottom halves are from the same image? I can't quite tell from your image, but it looks like the bottom half is from an earlier frame, in which case I have a guess. Unfortunately that doesn't seem to ...
by dividuum
Thu Aug 08, 2019 2:33 pm
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 387

Re: Missing egl/gl function

aire39 wrote:
Thu Aug 08, 2019 2:04 pm
They all load libEGL_mesa.so but I didn't see any of the combinations load libGL_mesa.so lib at least on my pi4.
Right. You're correct. I meant libEGL_mesa.so, not libGL_mesa.so. I've fixed my previous post. I've yet to understand how all those GL lib play together on the Pi4.
by dividuum
Thu Aug 08, 2019 11:54 am
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 632

Re: HEVC/H265 Decoding

MMAL does allow ARM side components, and indeed there is a libavcodec wrapper component. It hasn't been used for a long time, but it may be possible to resurrect it to allow use of H265 from MMAL. No such option really exists in IL, therefore this is not an option with that API. Isn't the ALSA supp...
by dividuum
Thu Aug 08, 2019 11:44 am
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 387

Re: Missing egl/gl function

I'm using GL without X and use DRM directly. I also ran into this issue. I'm linking with -lGLESv2 -lEGL. Regardless of that, the call to eglGetPlatformDisplay seems to dynamically load libEGL_mesa.so.0 (after consulting /usr/share/glvnd/egl_vendor.d/50_mesa.json). So even without explicitly linking...
by dividuum
Thu Aug 08, 2019 10:28 am
Forum: Graphics programming
Topic: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?
Replies: 6
Views: 274

Re: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?

I've noticed that the colors of the image seem weird is that what the image should look like? which drm fourcc are you using for your egl import? Is the incoming image RGB or YUV? DRM fourcc should be XB24. The isp component converts to RGBA and the colors are correct (it's 1:14 into this video ). ...
by dividuum
Wed Aug 07, 2019 6:16 pm
Forum: Graphics programming
Topic: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?
Replies: 6
Views: 274

Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?

Hi. I've managed a basic MMAL based video playback on a DRM GL surface on the Pi4. I've now run into an odd issue that I don't have any explanation for. Have a look at this image: https://usercontent.infobeamer.com/mmal-video-render-flickering.jpg Edit: Here's a video . What you see in screen captur...
by dividuum
Sat Aug 03, 2019 12:14 pm
Forum: Graphics programming
Topic: Pi4 DRM questions
Replies: 6
Views: 447

Re: Pi4 DRM questions

Two threads, each independently wait on a drmModePageFlip for their respective display? Not at the moment. Is that how it's supposed to work? Right now I eglSwapBuffers, then gbm_surface_lock_front_buffer, optionally create a drm fb from if none exists yet and then issue two drmModePageFlip calls f...
by dividuum
Fri Aug 02, 2019 12:14 pm
Forum: Graphics programming
Topic: Pi4 DRM questions
Replies: 6
Views: 447

Re: Pi4 DRM questions

Another day and a few follow up comments and questions. modetest is the lowest level DRM test tool. "modetest -M vc4" for my single headed display lists [...] Thanks for that. That makes it easier to see what's going on. I don't believe there is any guarantee that the displays will be in sync, and t...
by dividuum
Thu Aug 01, 2019 3:38 pm
Forum: Graphics programming
Topic: Pi4 DRM questions
Replies: 6
Views: 447

Re: Pi4 DRM questions

Hey. Thanks a lot for the quick response and very useful insight. I'll see how far I get :-)
by dividuum
Thu Aug 01, 2019 2:28 pm
Forum: Graphics programming
Topic: Pi4 DRM questions
Replies: 6
Views: 447

Pi4 DRM questions

I'm currently porting info-beamer pi to the Pi4. I'm using DRM to set up a GL surface without using X at all. A few questions came up while working on that: When is /dev/dri/card0 and when is /dev/dri/card1 active? Usually it's card1, but I remember seeing card0 successfully working as well. Are the...
by dividuum
Thu Aug 01, 2019 10:53 am
Forum: Graphics programming
Topic: Screen capture and video encoding
Replies: 5
Views: 484

Re: Screen capture and video encoding

Thanks for the pointers. It looks like it might be possible through the dispmanx API. At least from my understanding (of up to the Pi3, no idea about what the Pi4 might do at some point), there's no way to efficiently get any kind of realtime screen capturing. The vc_dispmanx_snapshot function resu...
by dividuum
Mon Jul 01, 2019 10:31 am
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 68
Views: 4781

Re: OpenGL on Buster on both Pi 3 and Pi 4

DeluxePixel wrote:
Mon Jul 01, 2019 10:28 am
More to the point, is it possible on the pi4 to use any form of accelerated opengl without using X?

A simple yes or no from someone who knows would be great. :)
Yes. With the mechanism from my previous post. No X required.
by dividuum
Mon Jul 01, 2019 10:12 am
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 68
Views: 4781

Re: OpenGL on Buster on both Pi 3 and Pi 4

Not quite, EGL is still used, its dispmanx that has been replaced by X11 as the lower layer. You need to be able to provide and Xwindow id to eglCreateWindowSurface rather than a EGL_DISPMANX_WINDOW_T Not necessarily: You can also use DRM/GBM(?). See this code (run with ./kmscube -D /dev/dri/card1)...
by dividuum
Mon Jul 01, 2019 10:04 am
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 68
Views: 4781

Re: OpenGL on Buster on both Pi 3 and Pi 4

Is there any good documentation on DRM and all the other APIs that are used now? https://01.org/linuxgraphics/gfx-docs/drm/gpu/index.html seems to document the driver side point of view. Even the man pages link to non-existing documentation pages (for example drmModePageFlip). Only somewhat complete...
by dividuum
Mon Jul 01, 2019 9:33 am
Forum: OpenMAX
Topic: Playing UHD H264
Replies: 3
Views: 323

Re: Playing UHD H264

Edited: The H264 decoder only supports 1920x1080. Oh. Didn't know that. Thanks. So HVEC is required for that? How does one decode that? I naively modified my existing code to send HVEC video frames to the `video_decode` component and never got a OMX_EventPortSettingsChanged event. Is OMX still supp...
by dividuum
Mon Jul 01, 2019 9:00 am
Forum: OpenMAX
Topic: Playing UHD H264
Replies: 3
Views: 323

Playing UHD H264

How exactly does that work? Can we the existing OpenMAX API? I tried omxplayer with jellyfish-120-mbps-4k-uhd-h264.mkv from http://jell.yfish.us/ without success: [email protected]:~# ffprobe jellyfish-120-mbps-4k-uhd-h264.mkv ffprobe version 4.1.3-1+rpt1 Copyright (c) 2007-2019 the FFmpeg developers...

Go to advanced search