summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-06 11:12:18 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-06 15:09:32 +0100
commitbf42754794d22e3dc7cc83dbf63cc64f417364ca (patch)
tree44925811f314aa1fd1c5753d50a3e08a86e4316a
parentafb2b5856d11f4658d9918547c20525b81490334 (diff)
ipu3: Use ChromeOS tuning file paths
During development, the IPA relied upon tuning database files copied from Chrome OS, duplicated in this repository, and installed in a second location on the target, in /usr/share/libcamera/ipa/ipu3/. Having two copies of the same files on the target devices is not only pointless, it also causes an issue with some Soraka models that use a different sensor module, with a different tuning file. Use the tuning files from Chrome OS directly and drop our copies. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--data/00ov13858.aiqbbin522800 -> 0 bytes
-rw-r--r--data/01ov5670.aiqbbin215064 -> 0 bytes
-rw-r--r--data/meson.build12
-rw-r--r--data/ov13858_7BAD03T2.aiqbbin522800 -> 0 bytes
-rw-r--r--data/ov13858_TFC13MYHCE.aiqbbin522800 -> 0 bytes
-rw-r--r--ipu3.cpp25
-rw-r--r--meson.build1
7 files changed, 15 insertions, 23 deletions
diff --git a/data/00ov13858.aiqb b/data/00ov13858.aiqb
deleted file mode 100644
index a1a658e..0000000
--- a/data/00ov13858.aiqb
+++ /dev/null
Binary files differ
diff --git a/data/01ov5670.aiqb b/data/01ov5670.aiqb
deleted file mode 100644
index 365dd16..0000000
--- a/data/01ov5670.aiqb
+++ /dev/null
Binary files differ
diff --git a/data/meson.build b/data/meson.build
deleted file mode 100644
index 3d6e5f5..0000000
--- a/data/meson.build
+++ /dev/null
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-ipa_data_dir = get_option('datadir') / 'libcamera' / 'ipa'
-
-ipu3_aiqb_data = files([
- '00ov13858.aiqb',
- '01ov5670.aiqb',
-])
-
-install_data(ipu3_aiqb_data,
- install_dir : ipa_data_dir / 'ipu3')
-
diff --git a/data/ov13858_7BAD03T2.aiqb b/data/ov13858_7BAD03T2.aiqb
deleted file mode 100644
index 5b30ab1..0000000
--- a/data/ov13858_7BAD03T2.aiqb
+++ /dev/null
Binary files differ
diff --git a/data/ov13858_TFC13MYHCE.aiqb b/data/ov13858_TFC13MYHCE.aiqb
deleted file mode 100644
index a1a658e..0000000
--- a/data/ov13858_TFC13MYHCE.aiqb
+++ /dev/null
Binary files differ
diff --git a/ipu3.cpp b/ipu3.cpp
index 4fce647..b8015af 100644
--- a/ipu3.cpp
+++ b/ipu3.cpp
@@ -88,15 +88,17 @@ int IPAIPU3::init(const IPASettings &settings)
int ret;
/*
- * Temporary mapping of the sensor name to the AIQB data file.
- *
- * \todo: This mapping table should be handled more generically
- * or through the configuration interfaces perhaps.
- */
+ * Temporary mapping of the sensor name to the AIQB data file.
+ *
+ * The tuningPath used here is specific to ChromeOS.
+ *
+ * \todo This mapping table should be handled more generically
+ * or through the configuration interfaces.
+ */
std::map<std::string, std::string> aiqb_paths = {
- { "ov13858", "/usr/share/libcamera/ipa/ipu3/00ov13858.aiqb" },
- { "ov5670", "/usr/share/libcamera/ipa/ipu3/01ov5670.aiqb" },
- { "imx258", "/etc/camera/ipu3/00imx258.aiqb" },
+ { "ov13858", "00ov13858.aiqb" },
+ { "ov5670", "01ov5670.aiqb" },
+ { "imx258", "00imx258.aiqb" },
};
LOG(IPAIPU3, Info) << "Initialising IPA IPU3 for "
@@ -108,8 +110,11 @@ int IPAIPU3::init(const IPASettings &settings)
return -EINVAL;
}
- LOG(IPAIPU3, Info) << "Using tuning file: " << it->second;
- ret = aiqb_.load(it->second.c_str());
+ std::string tuningPath = "/etc/camera/ipu3/";
+ std::string tuningFile = tuningPath + it->second;
+
+ LOG(IPAIPU3, Info) << "Using tuning file: " << tuningFile;
+ ret = aiqb_.load(tuningFile.c_str());
if (ret) {
LOG(IPAIPU3, Error) << "Failed to load AIQB";
return -ENODATA;
diff --git a/meson.build b/meson.build
index e7d6c6b..6ea2793 100644
--- a/meson.build
+++ b/meson.build
@@ -96,7 +96,6 @@ ipu3_ipa_deps = [
subdir('aic')
subdir('aiq')
-subdir('data')
subdir('src')
subdir('stats')