Go to advanced search

by longo92
Wed Jul 03, 2019 3:48 pm
Forum: C/C++
Topic: Clock_nanosleep issues
Replies: 1
Views: 118

Clock_nanosleep issues

Hi, i have a multi-threaded program with a certain number of periodic threads. The typical periodic thread code is the following: static void time_add_ms(struct timespec *t, int ms) { t->tv_sec += ms/1000; t->tv_nsec += (ms%1000)*1000000; if (t->tv_nsec > 1000000000) { t->tv_nsec -= 1000000000; t->t...
by longo92
Mon Mar 11, 2019 6:32 pm
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 609

Re: set the decode parameters using sps

I mean if you don't know the resolution of the incoming streaming and you want infer at run time. Is there a way? For inpurt port is passing the sps/pps but what options for the output port?
by longo92
Mon Mar 11, 2019 5:02 pm
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 609

Re: set the decode parameters using sps

OK, it works. For the output port is there a similar trick?
by longo92
Mon Mar 11, 2019 10:13 am
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 609

set the decode parameters using sps

Hi, Is there a way to set the decoder width and heigth of the input/output port using the sps? I know that pass it in the extradata field in the format input port (like in the example https://github.com/raspberrypi/userland/blob/master/interface/mmal/test/examples/example_basic_2.c) is used to set t...
by longo92
Tue Mar 05, 2019 8:33 am
Forum: Graphics programming
Topic: passing the mmal opaque buffer header through IPC(named pipe)
Replies: 3
Views: 550

Re: passing the mmal opaque buffer header through IPC(named pipe)

When that pool is destroyed the underlying image is released. Even though you have copied the data or pointer from buffer->data it can no longer be interpreted. Ok let's start from a general question: since i get the mmal buffer header from the callback associated to the video port of camera compon...
by longo92
Mon Mar 04, 2019 3:46 pm
Forum: Graphics programming
Topic: passing the mmal opaque buffer header through IPC(named pipe)
Replies: 3
Views: 550

passing the mmal opaque buffer header through IPC(named pipe)

Hi, i have two programs A and Brunning in parallel: -The program A takes frame from camera as opaque buffer (with encoding variant i420) and passes the mmal buffer header through a named pipe to program B. -The program B takes such mmal buffer and uses it in an opengl ES 2.0 rendering (using the dat...
by longo92
Thu Jan 24, 2019 4:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: using both dpi and i2s on bank 0
Replies: 2
Views: 307

using both dpi and i2s on bank 0

Hi, someone knows ifit is possibile to use dpi18 (for controlling head-mounted display) and i2s (for microphone/speaker) placed on bank 0 ? From trails it seems that enabling dpi mode disables all the other peripherals. I tried to modify the /boot/config.txt without effect. Is there an option to ove...
by longo92
Fri Nov 09, 2018 2:09 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3117

Re: Video decoder output port info

But the question is: why the opaque encoding is not listed as a supported encoding in the output port?
by longo92
Fri Nov 09, 2018 2:05 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3117

Re: Video decoder output port info

Ok, i resolved: it's possibile to decode as opaque buffer and use the buffer as an EGL IMAGE. Fantastic.
by longo92
Wed Nov 07, 2018 1:23 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3117

Video decoder output port info

HI, i have a file .h264 that is decoded using MMAL_COMPONENT_DEFAULT_VIDEO_DECODER. I want transform each decoded frame in an OpenGl ES texture. I know (and i tested) that there is a way to tranform each camera frame in an EGL image (and then use it as a texture) through opaque buffer (MMAL_ENCODING...
by longo92
Mon Oct 29, 2018 11:35 am
Forum: Graphics programming
Topic: MMAL_PARAMETER_RATECONTROL
Replies: 1
Views: 3298

MMAL_PARAMETER_RATECONTROL

What is MMAL_PARAMETER_RATECONTROL?
by longo92
Fri Oct 26, 2018 11:49 am
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4261

Re: MMAL Reziser input sets to opaque

Thanks for your really precious and precise answer. I try and the isp, on my case, for resizing is much faster.
by longo92
Fri Oct 26, 2018 6:19 am
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4261

Re: MMAL Reziser input sets to opaque

Another question: so if have to perform resize (not cropping) is always better to use the vc.ril.isp than the vc.ril.resize? Because isp uses hardware while resize is implemented in software (then it pass through the CPU), right? When yuoi said that now the encoder uses isp for conversion, it means ...
by longo92
Thu Oct 25, 2018 1:52 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4261

Re: MMAL Reziser input sets to opaque

I use all the four output of the splitter. Each splitter output is linked to a resizer with different downscaled camera's resolution.
So there is no boost to have an opaque handler to input to the encoder.
Thanks again.
by longo92
Thu Oct 25, 2018 1:27 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4261

Re: MMAL Reziser input sets to opaque

I mean "vc.ril.resize". Also can i set the output to the opaque and tunnel to the mmal vidoe encoder? I'm using the firmware of 25 May 2018, it's safe to use or shall i update to eliminate possible bugs? I have a simple application where a camera is tunneled to a splitter, the splitter tunneled to a...
by longo92
Thu Oct 25, 2018 12:52 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4261

MMAL Reziser input sets to opaque

Is possible to set the resizer input encoding to opaque?
by longo92
Mon Oct 08, 2018 9:09 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

Under MMAL, if you've rendered to a vcsm buffer then zero copy with MMAL_ENCODING_RGBA should be able to accept the buffer. If encoding to JPEG then it has to do a software conversion of the image to YUV.
It works. Thanks.
by longo92
Thu Oct 04, 2018 10:08 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

Is possible to pass to the encoder opnmax JPEG del EGL image in the same way of the openMax encoder? does the jpeg encoder supports EGL image?
by longo92
Thu Sep 27, 2018 9:58 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

Ok, this is the encoding format. But OMX_BRCMVEGLIMAGETYPE is the data struct that i pass to the encoder (through the pBuffer of OMX_BUFFERHEADERTYPE), there is an equivalent struct in MMAL? Or pass directly the vcsm handle to Data field of MMAL_BUFFER_HEADER_T ?
by longo92
Thu Sep 27, 2018 9:33 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

If you switch to MMAL, then setting MMAL_PARAMETER_ZERO_COPY on the buffer and populating buffer->data with the vcsm vc handle, and you should get the equivalent zero copy option as BRCMEGL.
Regarding this quote, i have a question:which is the equivalent OMX_BRCMVEGLIMAGETYPE in MMAL?
by longo92
Fri Sep 21, 2018 3:08 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

All Clear. Another cuorisity question: could i pass the vcsm_buffer retrieve with vcsm_buffer = (unsigned char *) vcsm_lock_cache(vcsm_info.vcsm_handle, VCSM_CACHE_TYPE_HOST, &cache_type) to the pBuffer and the proper size to the EmptyThisBuffer? Of course the encoder input port is set with OMX_COLO...
by longo92
Fri Sep 21, 2018 10:45 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

I must confess to getting lost in your various hacks as to where the output buffers were being returned. I recognise that you were just trying things out, but it did all get a little messy in there. Overriding the FillBufferDone callback totally threw me! I'd also recommend that you don't do too mu...
by longo92
Fri Sep 21, 2018 8:27 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

Thanks!!!! you're my saviour!! It works (rollback the firmware to the 3 of july)!! Of course i use this code only as base/educational-example on how can encode EGLimage. If i make my own application i design it with the apporpiate accuracy. I'm only a raspberry GPU-beginner proggrammer, this forum a...
by longo92
Wed Sep 19, 2018 3:56 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

https://github.com/AlessandroLongobardi/simple_camera_opengl_app/tree/master It is a demo based on RaspiStill and RaspiTex (i simply modify them).. I added the video encoder, the associated buffer and other encoder's stuff in RASPITEX_STATE. The Encoder Initializatione is in raspitex_init through in...
by longo92
Wed Sep 19, 2018 2:52 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13041

Re: EGLImageKHR to OpenMax

static int vcsm_square_redraw(RASPITEX_STATE *raspitex_state) { RASPITEX_STATE * state = raspitex_state; unsigned char *vcsm_buffer = NULL; static int onlyFirstTime = 0; const int bytes_per_pixel = 4; int buffer_size = state->width*state->height*4; OMX_ERRORTYPE omx_res; VCSM_CACHE_TYPE_T cache_typ...

Go to advanced search