@@ -12,6 +12,7 @@
#include <string>
#include <vector>
+#include <libcamera/color_filter_array.h>
#include <libcamera/color_space.h>
#include <libcamera/framebuffer.h>
#include <libcamera/geometry.h>
@@ -50,6 +51,22 @@ struct StreamConfiguration {
std::optional<ColorSpace> colorSpace;
+ /**
+ * \brief The color filter array pattern of the raw data of the stream
+ *
+ * This field is only meaningful for streams with a raw pixel format.
+ * Pipeline handlers populate it in
+ * CameraConfiguration::generateConfiguration() with the sensor's
+ * native color filter array pattern, and adjust it in
+ * CameraConfiguration::validate() for any transform applied to the
+ * sensor data.
+ *
+ * A ColorFilterArray::MONO value indicates monochrome raw data
+ * without a color filter array. The field is left unset for non-raw
+ * streams.
+ */
+ std::optional<ColorFilterArray> bayerOrder;
+
Stream *stream() const { return stream_; }
void setStream(Stream *stream) { stream_ = stream; }
const StreamFormats &formats() const { return formats_; }
Now that we only use bayer-independent PixelFormats, communicate the bayer order through an optional property in StreamConfiguration for raw streams so applications can process them correctly. Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> --- include/libcamera/stream.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)