Skip to content

Add support for MJPEG on UVC#1668

Merged
hathach merged 8 commits intohathach:masterfrom
kkitayam:add_support_for_mjpeg
Oct 19, 2022
Merged

Add support for MJPEG on UVC#1668
hathach merged 8 commits intohathach:masterfrom
kkitayam:add_support_for_mjpeg

Conversation

@kkitayam
Copy link
Copy Markdown
Collaborator

@kkitayam kkitayam commented Oct 9, 2022

Describe the PR
Add support for MJPEG on UVC.

It is tested with video_capture example on frdm_kl25z and raspberry pi pico

Additional context
video_capture uses MJPG video instead of uncompressed video when it builds with CFG_EXAMPLE_VIDEO_READONLY defined.

If a MCU has not enough SRAM for frame buffers, CFG_EXAMPLE_VIDEO_READONLY is already defined in board.mk at hw/bsp/<board>. For example, frdm_kl25z and so on. Any other MCU which has enough SRAM for frame buffers use uncompressed video in default. To force the use of MJPG video, add the FORCE_READONLY argument to make or cmake.
For example:

make FORCE_READONLY=1 BOARD=frdm_kl25z
cmake -B build_rp2040 -G Ninja -DFAMILY=rp2040 -DPICO_SDK_PATH=c:\pico_sdk -DFORCE_READONLY=1

@kkitayam
Copy link
Copy Markdown
Collaborator Author

kkitayam commented Oct 9, 2022

@me-no-dev

Would you see if this PR is useful or not for your application which indicated #1118 (comment) ?

Copy link
Copy Markdown
Contributor

@tswan-quasi tswan-quasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only checked the descriptors and class files as that is what I used in my setup. Some type consistency changes that also affect the functionality. Regardless, it runs fine on my setup, tested on LPC55S69 (using #1676).

@kkitayam kkitayam changed the title Add support for MJPG on UVC Add support for MJPEG on UVC Oct 12, 2022
@kkitayam
Copy link
Copy Markdown
Collaborator Author

@tswan-quasi
Thank you for your helpful comments. I feel that your comments helped improve this PR.

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

superb! Thank you very much for yet another great PR. And thank @tswan-quasi for helping with reviewing. To be honest, I am still not catching up with UVC

@hathach hathach merged commit e79325a into hathach:master Oct 19, 2022
@kkitayam kkitayam deleted the add_support_for_mjpeg branch October 20, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants