From bf42754794d22e3dc7cc83dbf63cc64f417364ca Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 6 Aug 2021 11:12:18 +0100 Subject: 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 Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- data/00ov13858.aiqb | Bin 522800 -> 0 bytes data/01ov5670.aiqb | Bin 215064 -> 0 bytes data/meson.build | 12 ------------ data/ov13858_7BAD03T2.aiqb | Bin 522800 -> 0 bytes data/ov13858_TFC13MYHCE.aiqb | Bin 522800 -> 0 bytes ipu3.cpp | 25 +++++++++++++++---------- meson.build | 1 - 7 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 data/00ov13858.aiqb delete mode 100644 data/01ov5670.aiqb delete mode 100644 data/meson.build delete mode 100644 data/ov13858_7BAD03T2.aiqb delete mode 100644 data/ov13858_TFC13MYHCE.aiqb diff --git a/data/00ov13858.aiqb b/data/00ov13858.aiqb deleted file mode 100644 index a1a658e..0000000 Binary files a/data/00ov13858.aiqb and /dev/null differ diff --git a/data/01ov5670.aiqb b/data/01ov5670.aiqb deleted file mode 100644 index 365dd16..0000000 Binary files a/data/01ov5670.aiqb and /dev/null 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 Binary files a/data/ov13858_7BAD03T2.aiqb and /dev/null differ diff --git a/data/ov13858_TFC13MYHCE.aiqb b/data/ov13858_TFC13MYHCE.aiqb deleted file mode 100644 index a1a658e..0000000 Binary files a/data/ov13858_TFC13MYHCE.aiqb and /dev/null 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 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') -- cgit v1.2.1