pipeline: rpi: Don't call toV4L2DeviceFormat() from validate()
Don't make an unnecessary call to toV4L2DeviceFormat() from validate() to get a V4L2DeviceFormat. Instead, the conversion can happen directly from the RAW stream PixelFormat. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
parent
eed6a079d2
commit
fe73f05475
1 changed files with 4 additions and 3 deletions
|
@ -226,10 +226,11 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
|
||||||
/* Further fixups on the RAW streams. */
|
/* Further fixups on the RAW streams. */
|
||||||
for (auto &raw : rawStreams) {
|
for (auto &raw : rawStreams) {
|
||||||
StreamConfiguration &cfg = config_.at(raw.index);
|
StreamConfiguration &cfg = config_.at(raw.index);
|
||||||
V4L2DeviceFormat rawFormat;
|
|
||||||
|
|
||||||
BayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;
|
V4L2DeviceFormat rawFormat;
|
||||||
rawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat_, packing);
|
rawFormat.fourcc = raw.dev->toV4L2PixelFormat(cfg.pixelFormat);
|
||||||
|
rawFormat.size = cfg.size;
|
||||||
|
rawFormat.colorSpace = cfg.colorSpace;
|
||||||
|
|
||||||
int ret = raw.dev->tryFormat(&rawFormat);
|
int ret = raw.dev->tryFormat(&rawFormat);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue