Go to advanced search

by aire39
Wed Aug 28, 2019 9:00 pm
Forum: OpenGLES
Topic: Fastest way to transfer FBO from GPU to CPU memory
Replies: 2
Views: 648

Re: Fastest way to transfer FBO from GPU to CPU memory

You would need to generate a vcsm buffer. I've done this on the pi 3 b+ with the raspbian stretch os so I'm not sure if this works on buster. I'm working with a pi 4 with the new os and this method didn't seem to work so I had to come up with an updated way to do this. #include <GLES2/gl2.h> #includ...
by aire39
Fri Aug 23, 2019 6:24 pm
Forum: Graphics programming
Topic: getting mmal buffer from queue timing
Replies: 2
Views: 390

Re: getting mmal buffer from queue timing

So there was a problem in the way I was releasing the buffers for the output buffer pool. I would notice an ENOMEM. I have fixed that issue so when I check the queue size for both the input and output buffer pools I'm getting the correct length before grabbing a buffer. I would like some insight int...
by aire39
Fri Aug 23, 2019 12:09 am
Forum: Graphics programming
Topic: getting mmal buffer from queue timing
Replies: 2
Views: 390

getting mmal buffer from queue timing

I'm using the isp component for mmal to convert an image from rgba to yuv (i420). I'm using an already defined vcsm buffer as a data source for the input buffer. input_port->encoding = MMAL_ENCODING_RGBA; [...] auto input_buffer_pool = mmal_port_create_buffers(input_port, 1/*num bufs*/, 0 /*buf size...
by aire39
Tue Aug 20, 2019 7:55 pm
Forum: OpenVG
Topic: Recommendation for an alternative to OpenVG for RP4
Replies: 14
Views: 3384

Re: Recommendation for an alternative to OpenVG for RP4

rainer wrote: Great if nanovg actually works. Has anyone tested this out on the RP4 multiple displays? Also can someone confirm they have actually got this really working on a RP4 & Buster? And even better record the runes to get it to work? Yes, nanovg works. I'm using it in my own project to draw...
by aire39
Mon Aug 12, 2019 4:42 am
Forum: OpenVG
Topic: Recommendation for an alternative to OpenVG for RP4
Replies: 14
Views: 3384

Re: Recommendation for an alternative to OpenVG for RP4

Gavinmc42 wrote: Looks like OpenGL and GLES so it should run on all Pi's. Can that be used without X11? It seems like nanovg may be able to work with all pi though I would probably use a pi 2 and up. It also works fine without X11. I'm using it now to create an overlay without using X11. Gavinmc42 ...
by aire39
Sat Aug 10, 2019 4:47 pm
Forum: OpenVG
Topic: Recommendation for an alternative to OpenVG for RP4
Replies: 14
Views: 3384

Re: Recommendation for an alternative to OpenVG for RP4

nanovg . This seems to be a nice library that is similar to openvg but uses opengles 2 or 3 for its rendering backend and actually got it to work. I'm still messing with it as I'm not sure what actually limitations it might have. The project isn't being maintained anymore as well but last bit of ac...
by aire39
Thu Aug 08, 2019 2:04 pm
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 1780

Re: Missing egl/gl function

yes, I didn't take a close enough look at eglGetProcAddress which could also grab opengles functions as well. I just didn't have much of an issue with it since I was running the application headless anyway and I didn't have a need to make X function calls. as far as libGL_mesa.so I don't see that be...
by aire39
Wed Aug 07, 2019 8:29 pm
Forum: Graphics programming
Topic: Pi4: MMAL video in GL (on DRM). Flickering texture. Any idea what might be wrong?
Replies: 6
Views: 1249

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?

What happens if you add a glFinish call before the eglSwapBuffers call?
by aire39
Sat Aug 03, 2019 2:49 pm
Forum: OpenGLES
Topic: Offline OpenGL render target - is it possible?
Replies: 1
Views: 1297

Re: Offline OpenGL render target - is it possible?

It should be possible, I'm working my way through this now. I did this with the PI3 B+ with success but a few things are a bit different using the PI4 with the new driver. I used 6by9 github project X11_export for reference as it shows how to create an offline buffer using vcsm and get it's fd. The ...
by aire39
Tue Jul 30, 2019 2:43 pm
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 1780

Re: Missing egl/gl function

Using libGLESv2.so will show the same extensions but the issue is that a few of the egl/gl function symbols are missing from libGLESv2.so
but exist in the libGL.so. So when the program tries to link you end up with a compile error because it didn't see a particular function.
by aire39
Tue Jul 30, 2019 5:09 am
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 1780

Re: Missing egl/gl function

I made the mistake of linking against libGLESv2.so instead of libGL.so. I didn't think I would be able to get opengl es 3.0 using that lib file.
by aire39
Sat Jul 27, 2019 12:36 am
Forum: OpenGLES
Topic: Missing egl/gl function
Replies: 6
Views: 1780

Missing egl/gl function

Using the Pi4 ( I don't have this issue with the Pi3 using the legacy driver and libs) The new v3d driver reports that the extension GL_OES_EGL_image_external extension is available and that should allow the use of the glEGLImageTargetTexture2DOES function but I'm having some linker problems. The fu...
by aire39
Mon Jul 15, 2019 2:49 pm
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 72
Views: 11332

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

6x9 wrote: The display stack parses the EDID of the connected display to know the supported modes, therefore in the absence of an EDID/hotplug you get no display. Add "hdmi_edid_file=1" and put the EDID of the display you want in /boot/edid.dat (save it with "tvservice -d edid.dat"). I suspect you ...
by aire39
Sun Jul 14, 2019 7:33 pm
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 72
Views: 11332

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

Is it possible to use the new driver headless or without a monitor hooked up? I cannot get it to work without hooking up a monitor to the pi4.

export DISPLAY=:0 will only work when I have a monitor initially hooked up to the pi4.


Also is openVG not available support in the new driver?
by aire39
Tue May 14, 2019 11:36 pm
Forum: Graphics programming
Topic: Properly releasing VCSM attached to fbo
Replies: 3
Views: 657

Re: Properly releasing VCSM attached to fbo

Thanks, I wasn't aware of those debug options. I did eventually find out what was going on which was that I missed releasing a mmal buffer pool on the input port for the isp component. Once I destroyed the input ports memory pool for the isp component I was able to successfully release the isp compo...
by aire39
Mon May 13, 2019 10:35 pm
Forum: Graphics programming
Topic: Properly releasing VCSM attached to fbo
Replies: 3
Views: 657

Re: Properly releasing VCSM attached to fbo

I've noticed that when I try to release the isp component (vc.ril.isp) the resource/thread is never released. Is this a known issue? The other mmal components don't have this issue from what I can see.
by aire39
Thu May 09, 2019 7:23 pm
Forum: Graphics programming
Topic: Properly releasing VCSM attached to fbo
Replies: 3
Views: 657

Properly releasing VCSM attached to fbo

I provide this process where I do this vcsm -> egltexture -> opengl texture -> fbo and this works great but I have a situation where I need to restart this process. The problem comes when I restart the process it seems that the vcsm cannot generate a handle for me and so the program crashes. When I ...
by aire39
Fri Apr 12, 2019 12:08 am
Forum: Graphics, sound and multimedia
Topic: camera center when using modes
Replies: 0
Views: 170

camera center when using modes

I'm using raspivid piped to gstreamer which is working fine to do my tests and I'm using the ov5647 sensor from the spycam I've noticed that the mode 1 which is the 1920x1080 partial fov does not grab the pixels centered on the sensor. Is there a way to change this? I tested this by getting an image...
by aire39
Fri Dec 21, 2018 7:28 pm
Forum: Graphics programming
Topic: EGL image to ISP component input port (MMAL)
Replies: 2
Views: 1438

Re: EGL image to ISP component input port (MMAL)

Great but if I have a 2048x1024 vcsm buffer but my incoming camera frame is only 1280x720 am I able to tell the input port to assume a 1280x720 buffer? In the post you linked to the openmax data structure used specifies a stride and width where the stride is the size of the vcsm and width is what th...
by aire39
Fri Dec 21, 2018 3:49 am
Forum: Graphics programming
Topic: VCSM and the FBO
Replies: 1
Views: 1440

VCSM and the FBO

assuming a 2048x1024 vcsm buffer because I need to turn it into an opengl texture and so the vcsm buffer needs to be a power of 2 because of the hardware. When using EGL_IMAGE_BRCM_VCSM to generate an opengl texture do opengl functions like glClear(GL_COLOR_BUFFER_BIT) clear the entire 2048x1024 buf...
by aire39
Fri Dec 21, 2018 3:05 am
Forum: Graphics programming
Topic: EGL image to ISP component input port (MMAL)
Replies: 2
Views: 1438

EGL image to ISP component input port (MMAL)

GPU (vcsm) -> input_port (isp component). I use the EGL_IMAGE_BRCM_VCSM when generating a buffer that I eventually turn into an opengl texture that is attached to a frame buffer object (fbo) in opengl. I render into this fbo which renders into the vcsm buffer. After a frame rendered with the gpu has...
by aire39
Thu Dec 20, 2018 2:30 am
Forum: C/C++
Topic: mmal resizer (isp) cropping support offsets?
Replies: 4
Views: 1091

Re: mmal resizer (isp) cropping support offsets?

I believe the 64 pixels off happened because I was changing the parameters of the crop.[width&height] of the input port of my resizer (using the isp component). I changed the parameters so that the crop.[width&height] of the input port just matched my actual frame [width&height] instead and relied o...
by aire39
Sat Dec 15, 2018 5:10 am
Forum: C/C++
Topic: mmal resizer (isp) cropping support offsets?
Replies: 4
Views: 1091

Re: mmal resizer (isp) cropping support offsets?

I solved my own question MMAL_PARAMETER_CROP_T crop = {{MMAL_PARAMETER_CROP, sizeof(MMAL_PARAMETER_CROP_T)}, {0,0,0,0}}; crop.rect.x = 100; crop.rect.y = 0; crop.rect.width = 1080; crop.rect.height = 720; mmal_port_parameter_set(ispComponent->input[0], &crop.hdr); by setting MMAL_PARAMETER_CROP_T on...
by aire39
Sat Dec 15, 2018 12:59 am
Forum: C/C++
Topic: mmal resizer (isp) cropping support offsets?
Replies: 4
Views: 1091

mmal resizer (isp) cropping support offsets?

I'm trying to crop a 1280x720 to 1080x720 with an x offset of 100. I have notice the width scale I set is correct but that the x offset that I set is being ignored. Is the isp able to do a crop with a x offset? The image is not provided by the camera but by a separate pipeline not connected to the c...
by aire39
Wed Nov 21, 2018 12:00 am
Forum: C/C++
Topic: 720p bitrate limitation (MMAL)?
Replies: 2
Views: 2100

Re: 720p bitrate limitation (MMAL)?

basic non-moving scene it simply does not need to use more then 1.8 or so MBits/s

That explains what was going on! I did not have much movement in the scene which explains why the encoder is only hitting around 1.8 MBits/s.

Go to advanced search