diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-06-30 14:42:32 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-07-07 11:39:34 +0300 |
commit | 7802471a3badb561f1e017c3ecdafc95a0a43d61 (patch) | |
tree | fded0d3134b52445e0901646fcf0f6383a44ea2b /src/libcamera/pipeline/rpi/common/pipeline_base.cpp | |
parent | 954ba8a803c078784dfaa6674e687847f49a1dfb (diff) |
pipeline: rpi: Account for Bayer packing when validating format
RPiCameraConfiguration::validate() did not account for user supplied
Bayer packing when validating the RAW stream configuration. Fix this
by seeing what packing (if any) has been specified selecting the output
RAW stream format.
Fixes: 6c71ee1f1530 ("pipeline: raspberrypi: Introduce PipelineHandlerBase class")
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rpi/common/pipeline_base.cpp')
-rw-r--r-- | src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index d438bdb6..179a5b81 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -288,8 +288,8 @@ CameraConfiguration::Status RPiCameraConfiguration::validate() unsigned int bitDepth = info.isValid() ? info.bitsPerPixel : defaultRawBitDepth; V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size, bitDepth); - rawFormat.size = sensorFormat.size; - rawFormat.fourcc = raw.dev->toV4L2PixelFormat(cfg.pixelFormat); + BayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing; + rawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat, packing); int ret = raw.dev->tryFormat(&rawFormat); if (ret) |