summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/algorithm.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-07-18 09:15:59 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-28 13:47:51 +0300
commit2ef6eafb6f4efc8a9ae7381253c7121d488d123d (patch)
treec2ef147494201d2689a63dcbfa293e2ab0ee5c05 /src/ipa/libipa/algorithm.h
parentc1597f989654618f782012104f547b367082fa3e (diff)
ipa: raspberrypi: Introduce version 2.0 format for the camera tuning file
The existing tuning file format (version 1.0) requires the controller algorithms to run in the same order as listed in the JSON structure. The JSON specification does not mandate any such ordering, but the Boost JSON parser would maintain this order. In order to remove this reliance on the parser to provide ordering, introduce a new version 2.0 format for the camera tuning file. In this version, the algorithms are specified in a top level list node ("algorithms"), which does require strict ordering of the elements. A "version" node is added to distinguish between the version 1.0 and 2.0 formats. The absence of the "version" node implies version 1.0. A "target" node is also added to specify the target platform for this configuration. Update the controller to support either version of the tuning file by looking at the version node. CreateAlgorithm member function to now load and configure each algorithm. Additionally, make CreateAlgorithm a private member, it does not get called externally. If a version 1.0 format tuning file is used, throw a warning message indicating it will be soon deprecated. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/libipa/algorithm.h')
0 files changed, 0 insertions, 0 deletions
> 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>
 *
 * Vector and related operations
 */

#include "vector.h"

#include <libcamera/base/log.h>

/**
 * \file vector.h
 * \brief Vector class
 */

namespace libcamera {

LOG_DEFINE_CATEGORY(Vector)

namespace ipa {

/**
 * \class Vector
 * \brief Vector class
 * \tparam T Type of numerical values to be stored in the vector
 * \tparam Rows Number of dimension of the vector (= number of elements)
 */

/**
 * \fn Vector::Vector()
 * \brief Construct a zero vector
 */

/**
 * \fn Vector::Vector(const std::array<T, Rows> &data)
 * \brief Construct vector from supplied data
 * \param data Data from which to construct a vector
 *
 * The size of \a data must be equal to the dimension size Rows of the vector.
 */

/**
 * \fn T Vector::operator[](size_t i) const
 * \brief Index to an element in the vector
 * \param i Index of element to retrieve
 * \return Element at index \a i from the vector
 */

/**
 * \fn T &Vector::operator[](size_t i)
 * \copydoc Vector::operator[](size_t i) const