diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-08-06 11:12:18 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-08-06 15:09:32 +0100 |
commit | bf42754794d22e3dc7cc83dbf63cc64f417364ca (patch) | |
tree | 44925811f314aa1fd1c5753d50a3e08a86e4316a /ipu3.cpp | |
parent | afb2b5856d11f4658d9918547c20525b81490334 (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>
Diffstat (limited to 'ipu3.cpp')
-rw-r--r-- | ipu3.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -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; |