summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2022-11-22 11:30:48 +0000
committerJacopo Mondi <jacopo@jmondi.org>2022-12-01 11:26:44 +0100
commitd2f9c1f0c344f884a8a4296ee77fc0c47655df7a (patch)
treefd330040c3334eaa9013de27cbd906affff28bf8 /include
parentb35f04b3c19487de903b67340fcfb801557295d3 (diff)
libcamera: bayer_format: Add toMbusCode method
This makes it easier to perform transformations on Bayer type mbus codes by converting them to a BayerFormat, doing the transform, and then converting them back again. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/bayer_format.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h
index 78ba3969..3601dccb 100644
--- a/include/libcamera/internal/bayer_format.h
+++ b/include/libcamera/internal/bayer_format.h
@@ -47,6 +47,7 @@ public:
}
static const BayerFormat &fromMbusCode(unsigned int mbusCode);
+ unsigned int toMbusCode() const;
bool isValid() const { return bitDepth != 0; }
std::string toString() const;