Skip to content
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

JPEG Control Reference in bcm2835-codec driver. Add control ID V4L2_CID_JPEG_RESTART_INTERVAL #6250

Open
wants to merge 2 commits into
base: rpi-6.6.y
Choose a base branch
from

Conversation

bllem
Copy link

@bllem bllem commented Jul 4, 2024

I added Image Process Control ID to be able to add RSTn markers to the generated JPEG file.

Tested on a live example.
Example of use:

v4l2_control controls;
controls.id = V4L2_CID_JPEG_RESTART_INTERVAL;
controls.value = 100;
        
if(0 < ioctl(fd,  VIDIOC_S_CTRL, &controls)) {
    perror("Error  VIDIOC_S_EXT_CTRLS"); 
}

@6by9
Copy link
Contributor

6by9 commented Jul 5, 2024

Fundamentally the patches look OK, but a couple of things.

  • Please squash the two patches together as we don't need the intermediate step with the default being 1. (We can do that during the merge, but it's as easy for you to do it as there are other changes being requested).
  • Linux contributions need to be identifiable as documented in https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin. Your commits as "root@DESKTOP-EB9E36V" with no name aren't, so can't be accepted in that form. Please use a valid email address and your name.
  • If I've read it right, the top end limit of 1,000,000 would be 256MPix between restart markers. That seems a little excessive. The other drivers in mainline that support this control either use a max of 100 (coda and mediatek) or 0xFFFF (Samsung).

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.

2 participants