new file mode 100644
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+/*
+ * Copyright (C) 2025, Raspberry Pi Ltd
+ *
+ * default camera helper for unknown sensors
+ */
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "cam_helper.h"
+
+using namespace RPiController;
+
+class CamHelperDefault : public CamHelper
+{
+public:
+ CamHelperDefault();
+ uint32_t gainCode(double gain) const override;
+ double gain(uint32_t gainCode) const override;
+};
+
+CamHelperDefault::CamHelperDefault()
+ : CamHelper({}, 0)
+{
+}
+
+uint32_t CamHelperDefault::gainCode([[maybe_unused]] double gain) const
+{
+ return 0;
+}
+
+double CamHelperDefault::gain([[maybe_unused]] uint32_t gainCode) const
+{
+ return 1.0;
+}
+
+static CamHelper *create()
+{
+ return new CamHelperDefault();
+}
+
+static RegisterCamHelper reg("default", &create);
@@ -2,6 +2,7 @@
rpi_ipa_cam_helper_sources = files([
'cam_helper.cpp',
+ 'cam_helper_default.cpp',
'cam_helper_ov5647.cpp',
'cam_helper_imx219.cpp',
'cam_helper_imx283.cpp',
This will help make "memory cameras" work where there is no real sensor. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> --- src/ipa/rpi/cam_helper/cam_helper_default.cpp | 45 +++++++++++++++++++ src/ipa/rpi/cam_helper/meson.build | 1 + 2 files changed, 46 insertions(+) create mode 100644 src/ipa/rpi/cam_helper/cam_helper_default.cpp