summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp2
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 00559ce3..af51fb2d 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -185,7 +185,7 @@ void IPU3CameraConfiguration::adjustStream(StreamConfiguration &cfg, bool scale)
* Provide a suitable default that matches the sensor aspect
* ratio.
*/
- if (!cfg.size.width || !cfg.size.height) {
+ if (cfg.size.isNull()) {
cfg.size.width = 1280;
cfg.size.height = 1280 * cio2Configuration_.size.height
/ cio2Configuration_.size.width;
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 3c3f3f3a..051d77a6 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -506,7 +506,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
MEDIA_BUS_FMT_SGRBG8_1X8,
MEDIA_BUS_FMT_SRGGB8_1X8 },
cfg.size);
- if (!sensorFormat_.size.width || !sensorFormat_.size.height)
+ if (sensorFormat_.size.isNull())
sensorFormat_.size = sensor->resolution();
/*
@@ -517,7 +517,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
*/
const Size size = cfg.size;
- if (!cfg.size.width || !cfg.size.height) {
+ if (cfg.size.isNull()) {
cfg.size.width = 1280;
cfg.size.height = 1280 * sensorFormat_.size.height
/ sensorFormat_.size.width;