Skip to content

drivers: video: sw_stats: software-based statistics #87008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

josuah
Copy link
Collaborator

@josuah josuah commented Mar 12, 2025

@josuah josuah changed the title Pr video sw stats drivers: video: sw_stats: software-based statistics Mar 12, 2025
@zephyrbot zephyrbot added area: Video Video subsystem area: Samples Samples labels Mar 12, 2025
@josuah josuah assigned josuah and unassigned kartben Mar 12, 2025
@josuah josuah marked this pull request as draft April 8, 2025 15:03
@josuah
Copy link
Collaborator Author

josuah commented Apr 8, 2025

Converting to draft until all dependencies are done and CI passes.

josuah added 8 commits April 28, 2025 00:52
Introduce an abstraction layer handling the diversity of ways hardware
have to report statistics. This allows to take advantage of the various
channel average or histograms present on some hardware, that skip the
need to manually compute statistics.
Fixes zephyrproject-rtos#85457

Signed-off-by: Josuah Demangeon <me@josuah.net>
Add support for the new API video_set_stats() to the emulated video RX
driver, and use it to implement simple API tests. The data returned
is arbitrary for the sake of testing the API itself.

Signed-off-by: Josuah Demangeon <me@josuah.net>
The "pixel" library aims facilitating the implementation of all image
processing tasks, such as pixel conversion, with a focus on low-resource
environments. The processing functions scale down to per-pixel "kernels"
to line-based conversion to full streams of several frames.

Signed-off-by: Josuah Demangeon <me@josuah.net>
The newly introduced lib/pixel features utilities that help composing
video pipelines together for the purpose of stream processing, as well
as debug utilities.

Signed-off-by: Josuah Demangeon <me@josuah.net>
This is a temporary test for CI only.

Signed-off-by: Josuah Demangeon <me@josuah.net>
Add a new driver computing software statistics over a frame passed to it.
This allows collecting channel averges or histogram of an input image
using the video statistics API even when no hardware provides it.

Signed-off-by: Josuah Demangeon <me@josuah.net>
Test it by filling a buffer manually with test data and verify that the
statistics produced are matching.

Signed-off-by: Josuah Demangeon <me@josuah.net>
The typo is `video_common` used while `video_emul` should have been used.

Signed-off-by: Josuah Demangeon <me@josuah.net>
@josuah
Copy link
Collaborator Author

josuah commented May 26, 2025

I propose implementing all of this inside of an application library on top of Zephyr, rather than a driver inside Zephyr.
https://libmpix.org/ already supports Zephyr and implements statistics collection.

@josuah josuah closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples area: Video Video subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants