summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index 410e9f5d..63c643f2 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -7,6 +7,8 @@
#include "rkisp1_path.h"
+#include <linux/media-bus-format.h>
+
#include <libcamera/formats.h>
#include <libcamera/stream.h>
@@ -125,6 +127,16 @@ int RkISP1Path::configure(const StreamConfiguration &config,
<< "Configuring " << name_ << " resizer output pad with "
<< ispFormat.toString();
+ switch (config.pixelFormat) {
+ case formats::NV12:
+ case formats::NV21:
+ ispFormat.mbus_code = MEDIA_BUS_FMT_YUYV8_1_5X8;
+ break;
+ default:
+ ispFormat.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8;
+ break;
+ }
+
ret = resizer_->setFormat(1, &ispFormat);
if (ret < 0)
return ret;