Go to advanced search

by longo92
Wed Sep 19, 2018 3:56 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13375

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: 13375

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...
by longo92
Wed Sep 19, 2018 1:11 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13375

Re: EGLImageKHR to OpenMax

OK, suppose that i retrieve the buffer: vcsm_buffer = (unsigned char *) vcsm_lock_cache(vcsm_info.vcsm_handle, VCSM_CACHE_TYPE_HOST, &cache_type)[/url][/url][/url][/url] , and after i can call th EmptyThisBuffer. Example based on https://github.com/raspberrypi/userland/blob/master/host_applications/...
by longo92
Wed Sep 19, 2018 9:10 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13375

Re: EGLImageKHR to OpenMax

Ok, when i pass the buffer to the encoder should i use OMX_UseEGLImage or OMX_EmptyThisBuffer? both pointing to the OMX_BRCMVEGLIMAGETYPE ?
by longo92
Wed Sep 19, 2018 7:35 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13375

Re: EGLImageKHR to OpenMax

Instead if i use MMAL encoder with MMAL_ENCODING_EGL_IMAGE could be better?
by longo92
Tue Sep 18, 2018 4:06 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13375

EGLImageKHR to OpenMax

Hi, i have an EGL image, how can i pass it to the OpenMax encoder? i see that it supports this format as input port of the encoder ( OMX_COLOR_FormatBRCMEGL). How can i populate the the pBuffer and nFilledLen of OMX_BUFFERHEADERTYPE (http://maemo.org/api_refs/5.0/beta/libomxil-bellagio/struct_o_m_x_...
by longo92
Fri Sep 14, 2018 2:11 pm
Forum: OpenGLES
Topic: Camera frame on openGl texture
Replies: 0
Views: 5563

Camera frame on openGl texture

Hi, is there an efficent way to capture camera frame (from camera video port), render them on an opengl texture and after encode the frame buffer (without pass for the glReadPixels) in H264 video? At glance i say that i use the camera component tunneled to the egl render and then encode the frame bu...
by longo92
Thu Sep 13, 2018 10:03 am
Forum: Graphics programming
Topic: vcos_sempahore vs posix semaphore
Replies: 1
Views: 4146

vcos_sempahore vs posix semaphore

I don't know if is the right section where ask. I see on the mmal example code that are used vcos_semaphore: why don't use posix (http://www.csc.villanova.edu/~mdamian/t ... ixsem.html)? Or vcos sempahore are just a wrapper of posix sem?
by longo92
Wed Sep 12, 2018 12:29 pm
Forum: Graphics programming
Topic: MMAL graph
Replies: 1
Views: 4011

MMAL graph

HI, what are those utility functions? are those used for create easy code with standard components? If yes is possible to attach a callback on the last componente of the graph that return the data (i.e.: contain_reader->decoder-> callback with buffer frame)?
Thanks
by longo92
Mon Sep 10, 2018 2:09 pm
Forum: Graphics programming
Topic: jpeg encoding
Replies: 2
Views: 3287

Re: jpeg encoding

Ok, but i tell you the short story. I try to do something more sophisticated, but it's long to write. For now i write it simple. I have the video output port attached to a splitter and on one splitter's output i have the callback that pass the frame to the jpeg encoder . The video port is configured...
by longo92
Mon Sep 10, 2018 1:43 pm
Forum: Graphics programming
Topic: jpeg encoding
Replies: 2
Views: 3287

jpeg encoding

Hi, i set the camera video port with encoding MMAL_ENCODING_OPAQUE and encoding_variant MMAL_ENCODING_I420, in the video port callback i want to send it to a JPEG ENCODER. The questions is: can i pass the opaque buffer to the encoder (after setting the input port of JPEG encoder to MMAL_ENCODING_OPA...
by longo92
Mon Sep 10, 2018 10:34 am
Forum: Graphics programming
Topic: Encoding vs encoding_variant
Replies: 5
Views: 3228

Re: Encoding vs encoding_variant

Ok, i got it. So it gives you a small performance advantage when is used, right?
mmal_buffer_header_mem_lock/unlock performs the memory conversion from gpu to cpu?
by longo92
Mon Sep 10, 2018 10:13 am
Forum: Graphics programming
Topic: Encoding vs encoding_variant
Replies: 5
Views: 3228

Re: Encoding vs encoding_variant

Thanks!! i have another question about MMAL_ZERO_COPY : is it used for passing only the buffer's pointer between components instead of the entire buffer data ? If i have a callaback on output port of a component where zero-copy is enabled can i access to buffer->data or it is allocated in gpu memory...
by longo92
Mon Sep 10, 2018 9:01 am
Forum: Graphics programming
Topic: Encoding vs encoding_variant
Replies: 5
Views: 3228

Encoding vs encoding_variant

Hi, someone can tell me the differences on those parameters in mmal port?
by longo92
Fri Sep 07, 2018 1:29 pm
Forum: OpenMAX
Topic: Setting encoder input port with color format opaque
Replies: 1
Views: 5042

Setting encoder input port with color format opaque

Hi, Is possible to set the OpenMax encoder input with color format OMX_COLOR_FormatBRCMOpaque? I need because i configure the encoding parameter of the camera video port with MMAL_ENCODING_OPAQUE (for mazimum perfromance), and then attached a callback on that port. So at each frame the callback is t...
by longo92
Thu Sep 06, 2018 7:36 am
Forum: Graphics programming
Topic: Dynamic resizer resolution change
Replies: 7
Views: 2596

Re: Dynamic resizer resolution change

OK, i use it on the resizer component ("vc.ril.resize"). If i do like you said it works : disable port set up new format call mmal_port_format_commit enable port again provide it buffers (with the porper size and allocating the pool). If i do using MMAL_PARAM_RESIZE_T it doesn't work: disable port s...
by longo92
Wed Sep 05, 2018 6:49 am
Forum: Graphics programming
Topic: Dynamic resizer resolution change
Replies: 7
Views: 2596

Re: Dynamic resizer resolution change

You are right, now it works like a charm but, just for cuoriosity, when can you use MMAL_PARAMETER_RESIZE_T ?
by longo92
Mon Sep 03, 2018 4:13 pm
Forum: Graphics programming
Topic: Dynamic resizer resolution change
Replies: 7
Views: 2596

Re: Dynamic resizer resolution change

OK, but the program blocks on mmal_disable_port on resizer output port (the port "linked" to the callback), possible reasons?
by longo92
Mon Sep 03, 2018 3:56 pm
Forum: Graphics programming
Topic: Dynamic resizer resolution change
Replies: 7
Views: 2596

Dynamic resizer resolution change

Hi, I have a resizer attached to a camera component with tunneling (camera video port tunneled to reszier input port), on resizer output port i have a callback (called each frame) that makes some calculations on frame data. If i want change the resizer resolution dinamically how can i? I see that th...

Go to advanced search