Go to advanced search

by marranxo
Thu May 02, 2019 1:23 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Is there any fix to theese problems/bugs that hungs the gpu? If not, are you trying to adress the issue or is it stalled? Thanks.
by marranxo
Mon Nov 26, 2018 11:01 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Well, the sample https://github.com/6by9/userland/blob/hello_mmal/host_applications/linux/apps/hello_pi/hello_mmal_encode/mmal_encode.c#L117 just throws error if you set WIDTH to 80 and HEIGHT to 60. Something should be wrong there. I'm testing with latest firmware plus a couple of bits and the por...
by marranxo
Fri Nov 09, 2018 8:19 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

I'm testing with latest firmware plus a couple of bits and the port_format_commit succeeds at 80x60. However I'm also on the 4.19 kernel and appear to be seeing VCHIQ issues so some of the output files are corrupt. Sorry, investigating those takes priority (and also explains some of the other issue...
by marranxo
Thu Nov 08, 2018 4:57 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Well, the sample https://github.com/6by9/userland/blob/h ... ode.c#L117 just throws error if you set WIDTH to 80 and HEIGHT to 60. Something should be wrong there.
by marranxo
Thu Nov 08, 2018 4:24 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

I've been playing with your sample https://github.com/6by9/userland/blob/403ef623ff0134a12c059b1509f7972a5d1757d3/host_applications/linux/apps/hello_pi/hello_mmal_encode/mmal_encode.c and it's working fine with common resolutions (320x240, 640x480, 1024x768, 1920x1080...) but it's not working with u...
by marranxo
Thu Nov 08, 2018 11:14 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

There's Doxygen markup in all the headers. Someone has compiled it and hosts it at http://www.jvcref.com/files/PI/document ... index.html (I have asked if we can get it and the IL component docs hosted on raspberrypi.org but apparently it's difficult to host anything except Github style markup). Th...
by marranxo
Thu Nov 08, 2018 8:22 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

The problem with MMAL is that there're not many examples available and I haven't found any documentation behind.
by marranxo
Wed Nov 07, 2018 4:58 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Thank you a lot for all your time and effort. I see that you've simplified most of my code. About your changes: 1. Is it healthy to change port settings even if PortSettingsChangedEvent was not received? 2. I used to call ilclient_change_component_state to make state transitions of tunneled componen...
by marranxo
Wed Nov 07, 2018 2:59 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

It did stall for me overnight. The GPU was waiting for buffers to be allocated before it could complete the port enable call. Having looked at the code you appear to set up the tunnel in odd places. Why create and enable the tunnel before you've had the OMX_EventPortSettingsChanged from the decoder...
by marranxo
Tue Nov 06, 2018 4:48 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

TBH I'm not fussed over exactly which construct is used. You want to sleep in the while loop until something happens that needs acting on, and the callbacks want to trigger the thread to wake up whenever any of them occurs. Two things: 1) It wants to be while(1) { while((buffer = ilclient_get_outpu...
by marranxo
Tue Nov 06, 2018 3:20 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Certainly at the lowest level EOS is transferred via a buffer with nFlags including OMX_BUFFERFLAG_EOS. The core picks up on that flag and signals an event on it, but should also deliver that buffer. Some components send the EOS on the last filled buffer, others as an empty buffer with the flag set...
by marranxo
Tue Nov 06, 2018 12:41 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Give me everything I need to run your test and I can take a look. Seeing as there is no main() in that code I can't run it without making assumptions about how you are setting things up. It sounds like a memory leak, but the components have had a fairly good hammering over the years to fix those. H...
by marranxo
Tue Nov 06, 2018 10:05 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Give me everything I need to run your test and I can take a look. Seeing as there is no main() in that code I can't run it without making assumptions about how you are setting things up. It sounds like a memory leak, but the components have had a fairly good hammering over the years to fix those. H...
by marranxo
Fri Nov 02, 2018 9:29 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Attached files used in tests. As I said some are jpeg, some are incomplet (truncated) jpegs and some are not related to jpeg
by marranxo
Fri Nov 02, 2018 9:20 am
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Re: Need advice with tuneled JPEG decoder + resizer

Thanks for your help. Remember that the bug shows after a lot of hours even days on my pi. #ifdef __cplusplus extern "C" { #endif #include <ilclient.h> #ifdef __cplusplus } #endif #include <bcm_host.h> #include <stdio.h> #include <vector> #include <iostream> #include <fstream> #include <unistd.h> #i...
by marranxo
Wed Oct 31, 2018 4:43 pm
Forum: OpenMAX
Topic: Need advice with tuneled JPEG decoder + resizer
Replies: 26
Views: 10343

Need advice with tuneled JPEG decoder + resizer

I'm running a test program that loads 10 files from filesystem. Those 10 files are: 5 jpeg files with different resolutions, 4 jpeg files with header but incomplete data, 1 non jpeg file. The program runs forever and after each iteration an action is taken depending on RNG: try decode one of the abo...
by marranxo
Mon Sep 10, 2018 9:58 am
Forum: OpenMAX
Topic: deadlock in ilclient_change_component_state
Replies: 0
Views: 5091

deadlock in ilclient_change_component_state

Hi, I'm running 2 threads and each one has one image_decode tunneled to a resizer to decode jpeg images and convert colorspace (yuv->rgb) , a image_encode to encode decoded images with some OSD and a video_encode encoding image sequences to h264. Both threads run the same code but with different inp...
by marranxo
Mon Sep 03, 2018 8:42 am
Forum: OpenMAX
Topic: bcm_host_init() stuck & vcgencmd not working
Replies: 6
Views: 6224

Re: bcm_host_init() stuck & vcgencmd not working

A new crash on the same place. SIGSEGV at VCHIQ completio List of threads at crash: 1 Thread 0x76ff4fa0 (LWP 750) "monitor" 0x768a7cb0 in poll () at ../sysdeps/unix/syscall-template.S:84 * 2 Thread 0x76747450 (LWP 753) "VCHIQ completio" 0x76f260f0 in completion_thread () from /opt/vc/lib/libvchiq_ar...
by marranxo
Thu Aug 30, 2018 2:16 pm
Forum: OpenMAX
Topic: bcm_host_init() stuck & vcgencmd not working
Replies: 6
Views: 6224

Re: bcm_host_init() stuck & vcgencmd not working

It happened again after 2 days of running uninterrupted. I got a SIGSEGV in a VC thread (VCHIQ completion), that blocked again any call to bcm_host_init and vcgencmd until system restart. Here I got some info. I'm running 6 different instances of ilclient (it shouldn't mater as each instance is only...
by marranxo
Fri Aug 24, 2018 3:21 pm
Forum: Troubleshooting
Topic: xpanel? blinking after dist-upgrade & rpi-upgrade
Replies: 2
Views: 176

xpanel? blinking after dist-upgrade & rpi-upgrade

Hi, I've just updated my 'old' raspberry 2B (Rev 1.1). Now I'm running kernel 4.14.62-v7+ and my distro according to /etc/os-release is Raspbian 7 (wheezy ). The upper panel that used to display the menu is blinking, like it's being created and destroed several times per second. Does anyone know how...
by marranxo
Fri Aug 24, 2018 3:04 pm
Forum: OpenMAX
Topic: bcm_host_init() stuck & vcgencmd not working
Replies: 6
Views: 6224

Re: bcm_host_init() stuck & vcgencmd not working

Yes I'm using MJPEG but I'm demuxing the rtsp/http streams in jpeg frames and sending to the image_decode component one at time. I'm also using a resizer component tunneled to the image_decode component to convert from yuv to rgba. No, I don't send any partial frame to the components. When handling ...
by marranxo
Fri Aug 24, 2018 1:20 pm
Forum: OpenMAX
Topic: bcm_host_init() stuck & vcgencmd not working
Replies: 6
Views: 6224

Re: bcm_host_init() stuck & vcgencmd not working

I call bcm_host_init once per application and I'm running a single application instance (the applications itself handles several streams). If I perform a query with vcgencmd it may consume an additional instance for a few milliseconds, but not close to 8 programs fighting for VCHIQ requests. The CPU...
by marranxo
Fri Aug 24, 2018 10:20 am
Forum: OpenMAX
Topic: bcm_host_init() stuck & vcgencmd not working
Replies: 6
Views: 6224

bcm_host_init() stuck & vcgencmd not working

Hi, I'm developing a c++ program that connects to several mjpg streams via rtsp/http, decodes the streams, does some processing with them and then reencodes them as mjpg and emits them via rtsp/http. To achieve that I'm using the raspberry encoder with OMX API and ilclient library. Everything works ...
by marranxo
Tue Aug 30, 2016 8:23 am
Forum: C/C++
Topic: send() blocks up to 30s
Replies: 2
Views: 775

Re: send() blocks up to 30s

The receiver is VLC media player in a windows 10 machine with good hw specs. Yes, HTTP is the higher protocol I'm using here to transmit the video. Encoded video frames arrive and are displayed correctly in the client but since I set the socket to non-blocking most of them are not send (-1) and I as...
by marranxo
Mon Aug 29, 2016 2:35 pm
Forum: C/C++
Topic: send() blocks up to 30s
Replies: 2
Views: 775

send() blocks up to 30s

Hi, I'm working on a project involving decoding video from a ip camera, processing it and sending in postprocessed and encoded to jpeg throw http. Everythink works fine until send() starts to block (call time can be between 5ms and 30s [not ms]). I'm emiting 14 chunks of jpg encoded images per secon...

Go to advanced search