mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
pipeline: uvcvideo: Add color space support
Add support for color space to the uvcvideo pipeline handler. UVC devices have a fixed color space per format, so only the validate() function needs to be extended to retrieve the color space from the kernel. There is no need to pass the value back to the driver in configure(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
fc9783acc6
commit
6b3f8a7875
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ CameraConfiguration::Status UVCCameraConfiguration::validate()
|
|||
cfg.stride = format.planes[0].bpl;
|
||||
cfg.frameSize = format.planes[0].size;
|
||||
|
||||
if (cfg.colorSpace != format.colorSpace) {
|
||||
cfg.colorSpace = format.colorSpace;
|
||||
status = Adjusted;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue