- RedMarsBlueMoon
- Posts: 501
- Joined: Mon Apr 06, 2020 3:49 am
Could there be more latency after mmal draw frame?
Hi!
I'm trying to work out where some latency is coming from in the system I'm working on.
The 'last' thing that happens before display, in our software at least, is a function that uses mmal/openmax to decode and draw an h264 video stream. This gets triggered on each full frame of video data. This function originates from 'hello_video' and is not much different in essence in the way it works.
I used chronos to time the beginning and the end of that function call and got roughly 0.0004 seconds, or 0.4ms. Every 10 frames or so there's a small hitch with up to ~2ms. But mostly it's around 0.4ms.
What I was wondering was if there's anything more that happens that could take much time after this? Before the frame is sent out to the monitor?
For example is there work on the hardware that happens after the software has done its part, per frame?
I don't care about any screen drawing or monitor latency as I did swap my two test monitors around and got the same results so I'm assuming that part is cancelled out.
Cheers, Fred
I'm trying to work out where some latency is coming from in the system I'm working on.
The 'last' thing that happens before display, in our software at least, is a function that uses mmal/openmax to decode and draw an h264 video stream. This gets triggered on each full frame of video data. This function originates from 'hello_video' and is not much different in essence in the way it works.
I used chronos to time the beginning and the end of that function call and got roughly 0.0004 seconds, or 0.4ms. Every 10 frames or so there's a small hitch with up to ~2ms. But mostly it's around 0.4ms.
What I was wondering was if there's anything more that happens that could take much time after this? Before the frame is sent out to the monitor?
For example is there work on the hardware that happens after the software has done its part, per frame?
I don't care about any screen drawing or monitor latency as I did swap my two test monitors around and got the same results so I'm assuming that part is cancelled out.
Cheers, Fred
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion