summaryrefslogtreecommitdiff
path: root/src/libcamera/bayer_format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/bayer_format.cpp')
-rw-r--r--src/libcamera/bayer_format.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp
index 1acf91d4..ae730d94 100644
--- a/src/libcamera/bayer_format.cpp
+++ b/src/libcamera/bayer_format.cpp
@@ -216,6 +216,23 @@ std::string BayerFormat::toString() const
}
/**
+ * \brief Compare two BayerFormats for equality
+ * \return True if order, bitDepth and packing are equal, or false otherwise
+ */
+bool operator==(const BayerFormat &lhs, const BayerFormat &rhs)
+{
+ return lhs.order == rhs.order && lhs.bitDepth == rhs.bitDepth &&
+ lhs.packing == rhs.packing;
+}
+
+/**
+ * \fn bool operator!=(const BayerFormat &lhs, const BayerFormat &rhs)
+ * \brief Compare two BayerFormats for inequality
+ * \return True if either order, bitdepth or packing are not equal, or false
+ * otherwise
+ */
+
+/**
* \brief Convert a BayerFormat into the corresponding V4L2PixelFormat
* \return The V4L2PixelFormat corresponding to this BayerFormat
*/