summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-26 13:27:39 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-03-15 12:55:03 +0200
commitd41e0585e972c1350d55679e61e0b91368bb61f9 (patch)
treec524928f8b3e928cc7fa7a97fd86c60513ec63a6 /src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
parent4c82481fc4622c2e78ec9f426bcad27728bb7079 (diff)
libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormat::mbus_code to code
The V4L2SubdeviceFormat::mbus_code member doesn't follow the libcamera coding style as it should use camelCase. Fix it by renaming it to just 'code', to shorten lines in addition to fixing the coding style. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/imx8-isi/imx8-isi.cpp')
-rw-r--r--src/libcamera/pipeline/imx8-isi/imx8-isi.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
index 9bdfff0b..a3782aea 100644
--- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
+++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
@@ -554,7 +554,7 @@ CameraConfiguration::Status ISICameraConfiguration::validate()
PixelFormat pixelFormat = config_[0].pixelFormat;
V4L2SubdeviceFormat sensorFormat{};
- sensorFormat.mbus_code = data_->getMediaBusFormat(&pixelFormat);
+ sensorFormat.code = data_->getMediaBusFormat(&pixelFormat);
sensorFormat.size = maxSize;
LOG(ISI, Debug) << "Computed sensor configuration: " << sensorFormat;
@@ -569,7 +569,7 @@ CameraConfiguration::Status ISICameraConfiguration::validate()
* the smallest larger format without considering the aspect ratio
* as the ISI can freely scale.
*/
- auto sizes = sensor->sizes(sensorFormat.mbus_code);
+ auto sizes = sensor->sizes(sensorFormat.code);
Size bestSize;
for (const Size &s : sizes) {
@@ -595,7 +595,7 @@ CameraConfiguration::Status ISICameraConfiguration::validate()
return Invalid;
}
- sensorFormat_.mbus_code = sensorFormat.mbus_code;
+ sensorFormat_.code = sensorFormat.code;
sensorFormat_.size = bestSize;
LOG(ISI, Debug) << "Selected sensor format: " << sensorFormat_;
@@ -632,7 +632,7 @@ StreamConfiguration PipelineHandlerISI::generateYUVConfiguration(Camera *camera,
/* Adjust the requested size to the sensor's capabilities. */
V4L2SubdeviceFormat sensorFmt;
- sensorFmt.mbus_code = mbusCode;
+ sensorFmt.code = mbusCode;
sensorFmt.size = size;
int ret = data->sensor_->tryFormat(&sensorFmt);
@@ -891,7 +891,7 @@ int PipelineHandlerISI::configure(Camera *camera, CameraConfiguration *c)
unsigned int isiCode = ISICameraConfiguration::formatsMap_.at(config.pixelFormat);
V4L2SubdeviceFormat isiFormat{};
- isiFormat.mbus_code = isiCode;
+ isiFormat.code = isiCode;
isiFormat.size = config.size;
ret = pipe->isi->setFormat(1, &isiFormat);