The V4L2 specification defines the sensor test pattern modes through a menu control, where a numerical index is associated to a string that describes the test pattern. The index-to-pattern mapping is driver specific and requires a corresponding representation in the library. Add to the static list of CameraSensorProperties a map of indexes to libcamera::controls::TestPatternModes values to be able to map the indexes returned by the driver to the corresponding test pattern mode. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
27 lines
629 B
C++
27 lines
629 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2021, Google Inc.
|
|
*
|
|
* camera_sensor_properties.h - Database of camera sensor properties
|
|
*/
|
|
#ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__
|
|
#define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
#include <libcamera/geometry.h>
|
|
|
|
namespace libcamera {
|
|
|
|
struct CameraSensorProperties {
|
|
static const CameraSensorProperties *get(const std::string &sensor);
|
|
|
|
Size unitCellSize;
|
|
std::map<int32_t, int32_t> testPatternModes;
|
|
};
|
|
|
|
} /* namespace libcamera */
|
|
|
|
#endif /* __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ */
|