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: 6c71ee1f15 ("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>
This commit is contained in:
committed by
Laurent Pinchart
parent
954ba8a803
commit
7802471a3b
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user