NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
NvSIPLCamera.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 #ifndef NVSIPLCAMERA_HPP
13 #define NVSIPLCAMERA_HPP
14 
15 #include "NvSIPLCommon.hpp"
16 #include "NvSIPLPlatformCfg.hpp"
17 #include "NvSIPLPipelineMgr.hpp"
18 #include "INvSiplControlAuto.hpp"
19 #include "NvSIPLClient.hpp"
21 #include "NvSIPLCameraTypes.hpp"
22 
23 #include "nvscisync.h"
24 #include "nvscistream.h"
25 #include "nvscibuf.h"
26 
27 #include <cstdint>
28 #include <memory>
29 #include <vector>
30 
45 namespace nvsipl
46 {
47 
52 #if !NV_IS_SAFETY
53 
54 static constexpr size_t NITO_PARAMETER_SET_ID_SIZE {16U};
56 static constexpr size_t NITO_SCHEMA_HASH_SIZE {32U};
58 static constexpr size_t NITO_DATA_HASH_SIZE {32U};
59 
68 {
69  uint8_t parameterSetID[NITO_PARAMETER_SET_ID_SIZE]; //< Identifier of the parameter set
70  uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]; //< Hash value of the parameter set schema
71  uint8_t dataHash[NITO_DATA_HASH_SIZE]; //< Hash value of parameter values
72 };
73 
116 SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem,
117  size_t const nitoMemLength,
118  NvSIPLNitoMetadata *const metadataArray,
119  size_t const metadataArrayLength,
120  size_t *const metadataCount);
121 
122 #endif // NV_IS_SAFETY
123 
130 enum NvSiplNvSciSyncClientType : std::uint8_t
131 {
140 };
141 
148 enum NvSiplNvSciSyncObjType : std::uint8_t {
153 };
154 
163 enum FrameProcessingRate : std::uint8_t {
165  FULL_RATE = 0U,
174 };
175 
184 {
185  public:
217  static std::unique_ptr<INvSIPLCamera> GetInstance();
218 
254  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig) = 0;
255 
293  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig, NvSIPLDeviceBlockQueues &queues) = 0;
294 
339  virtual SIPLStatus SetPlatformCfg(sensorconfig::SensorSystemConfig const& config) = 0;
340 
376  virtual SIPLStatus SetPipelineCfg(uint32_t const index,
377  NvSIPLPipelineConfiguration const &pipelineCfg,
378  NvSIPLPipelineQueues& queues,
379  uint32_t const vcIdx = 0U) = 0;
380 
418  virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index,
420  ISiplControlAuto *const autoControl,
421  std::vector<uint8_t> const &blob,
422  uint32_t const vcIdx = 0U,
423  FrameProcessingRate const processingRate = FULL_RATE) = 0;
424 
464  virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index,
466  std::vector<ISiplControlAuto*> const &autoControls,
467  std::vector<std::vector<uint8_t>> const &blobs,
468  uint32_t const vcIdx = 0U,
469  std::vector<FrameProcessingRate> const &processingRates = {}) = 0;
470 
506  virtual SIPLStatus Init() = 0;
507 
508 #if !NV_IS_SAFETY
509 
548  virtual SIPLStatus SetSensorCharMode(uint32_t const index, uint8_t expNo) = 0;
549 #endif // !NV_IS_SAFETY
550 
652  virtual SIPLStatus GetImageAttributes(uint32_t const index,
654  NvSciBufAttrList const &imageAttr,
655  uint32_t const vcIdx = 0U) = 0;
656 
693  virtual SIPLStatus ReadEEPROMData(uint32_t const index,
694  uint16_t const address,
695  uint32_t const length,
696  uint8_t * const buffer) = 0;
697 
804  virtual SIPLStatus RegisterImages(uint32_t const index,
806  std::vector<NvSciBufObj> const &images,
807  uint32_t const vcIdx = 0U) = 0;
808 
843  virtual SIPLStatus Start() = 0;
844 
875  virtual SIPLStatus Stop() = 0;
876 
910  virtual SIPLStatus Deinit() = 0;
911 
949  virtual SIPLStatus GetMaxErrorSize(uint32_t const devBlkIndex,
950  size_t & maxErrorSize) = 0;
951 
999  virtual SIPLStatus GetDeserializerErrorInfo(uint32_t const devBlkIndex,
1000  SIPLErrorDetails * const deserializerErrorInfo,
1001  bool & isRemoteError,
1002  uint8_t& linkErrorMask) = 0;
1003 
1056  virtual SIPLStatus GetModuleErrorInfo(uint32_t const index,
1057  SIPLErrorDetails * const serializerErrorInfo,
1058  SIPLErrorDetails * const sensorErrorInfo,
1059  SIPLModuleErrorReadFlag const errorsToRead
1061 
1095  virtual SIPLStatus DisableLink(uint32_t const index) = 0;
1096 
1132  virtual SIPLStatus EnableLink(uint32_t const index, bool const resetModule) = 0;
1133 
1134 #if !NV_IS_SAFETY
1135 
1168  virtual SIPLStatus ToggleLED(uint32_t const index, bool enable) = 0;
1169 #endif // !NV_IS_SAFETY
1170 
1172  virtual ~INvSIPLCamera() = default;
1173 
1175  INvSIPLCamera(INvSIPLCamera& other) = delete;
1176 
1178  INvSIPLCamera& operator=(INvSIPLCamera& other) & = delete;
1179 
1181  INvSIPLCamera(INvSIPLCamera&& other) = delete;
1182 
1184  INvSIPLCamera& operator=(INvSIPLCamera&& other) & = delete;
1185 
1240  virtual SIPLStatus FillNvSciSyncAttrList(uint32_t const index,
1242  NvSciSyncAttrList const attrList,
1243  NvSiplNvSciSyncClientType const clientType,
1244  uint32_t const vcIdx = 0U) = 0;
1245 
1279  virtual SIPLStatus RegisterNvSciSyncObj(uint32_t const index,
1281  NvSiplNvSciSyncObjType const syncobjtype,
1282  NvSciSyncObj const syncobj,
1283  uint32_t const vcIdx = 0U) = 0;
1284 
1321  virtual SIPLStatus GetPipelineInterfaceProvider(uint32_t const index,
1322  IInterfaceProvider *&interfaceProvider,
1323  uint32_t const vcIdx = 0U) noexcept = 0;
1324 
1360  virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t const devBlkIndex,
1361  IInterfaceProvider *&interfaceProvider) = 0;
1362 
1399  virtual SIPLStatus GetModuleInterfaceProvider(uint32_t const index,
1400  IInterfaceProvider *&interfaceProvider) = 0;
1401 
1402 protected:
1404  INvSIPLCamera() = default;
1405 
1406 }; // INvSIPLCamera
1407 
1409 } // namespace nvsipl
1410 
1411 
1412 
1413 #endif // NVSIPLCAMERA_HPP
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
nvsipl::NITO_PARAMETER_SET_ID_SIZE
static constexpr size_t NITO_PARAMETER_SET_ID_SIZE
Size of the NITO Parameters set ID.
Definition: NvSIPLCamera.hpp:54
nvsipl::INvSIPLCamera::GetDeserializerInterfaceProvider
virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t const devBlkIndex, IInterfaceProvider *&interfaceProvider)=0
Retrieve custom interface provider for deserializer.
nvsipl::INvSIPLCamera::RegisterAutoControlPlugin
virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index, PluginType type, ISiplControlAuto *const autoControl, std::vector< uint8_t > const &blob, uint32_t const vcIdx=0U, FrameProcessingRate const processingRate=FULL_RATE)=0
Register the Auto Control plugin to be used for a specific pipeline.
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in NvSIPL modules.
Definition: NvSIPLCommon.hpp:168
nvsipl::FULL_RATE
@ FULL_RATE
Process Auto Control (AE-AWB) and ISP every frame (default).
Definition: NvSIPLCamera.hpp:165
nvsipl::INvSIPLCamera::SetPipelineCfg
virtual SIPLStatus SetPipelineCfg(uint32_t const index, NvSIPLPipelineConfiguration const &pipelineCfg, NvSIPLPipelineQueues &queues, uint32_t const vcIdx=0U)=0
Set a pipeline configuration.
nvsipl::INvSIPLCamera::GetMaxErrorSize
virtual SIPLStatus GetMaxErrorSize(uint32_t const devBlkIndex, size_t &maxErrorSize)=0
Get maximum size of error information.
INvSiplControlAuto.hpp
NVIDIA SIPL: Auto Control Interface - SIPL Auto Control
nvsipl::INvSIPLCamera::GetImageAttributes
virtual SIPLStatus GetImageAttributes(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSciBufAttrList const &imageAttr, uint32_t const vcIdx=0U)=0
Get image attributes.
nvsipl::INvSIPLCamera::FillNvSciSyncAttrList
virtual SIPLStatus FillNvSciSyncAttrList(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSciSyncAttrList const attrList, NvSiplNvSciSyncClientType const clientType, uint32_t const vcIdx=0U)=0
Fill an NvSciSyncAttrList.
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSiplControlAutoDef.hpp:48
nvsipl::INvSIPLCamera::Stop
virtual SIPLStatus Stop()=0
Stop streaming from all sensors in the selected platform configuration.
nvsipl::INvSIPLCamera::GetInstance
static std::unique_ptr< INvSIPLCamera > GetInstance()
Get a handle to an INvSIPLCamera instance.
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - NvSIPL
nvsipl::HALF_RATE
@ HALF_RATE
Process Auto Control (AE-AWB) and ISP every 2nd frame (half rate).
Definition: NvSIPLCamera.hpp:167
nvsipl::INvSIPLClient::ConsumerDesc::OutputType
OutputType
Defines the types of the SIPL pipeline output.
Definition: NvSIPLClient.hpp:472
nvsipl::NvSiplNvSciSyncClientType
NvSiplNvSciSyncClientType
Defines SIPL NvSciSync client types.
Definition: NvSIPLCamera.hpp:130
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:327
nvsipl::SIPLModuleErrorReadFlag
SIPLModuleErrorReadFlag
Flag indicating which module errors to read.
Definition: NvSIPLCommon.hpp:259
nvsipl::SIPLErrorDetails
Error details for a particular device.
Definition: NvSIPLCommon.hpp:236
nvsipl::NvSIPLNitoMetadata::schemaHash
uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]
Definition: NvSIPLCamera.hpp:70
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
INvSIPLDeviceInterfaceProvider.hpp
NVIDIA SIPL: Device Interface Provider Interface
nvsipl::INvSIPLCamera::Init
virtual SIPLStatus Init()=0
Initialize the API for the selected platform configuration.
nvsipl::INvSIPLCamera::Deinit
virtual SIPLStatus Deinit()=0
Deinitialize the API for the selected platform configuration.
nvsipl::AWB_THIRD_RATE
@ AWB_THIRD_RATE
Process AE and ISP every frame, AWB every 3rd frame.
Definition: NvSIPLCamera.hpp:173
nvsipl::INvSIPLCamera::DisableLink
virtual SIPLStatus DisableLink(uint32_t const index)=0
Disable a given link.
nvsipl::NVSIPL_EOFSYNCOBJ
@ NVSIPL_EOFSYNCOBJ
Specifies an NvSciSyncObj type for which SIPL acts as a signaler, signaling EOFFence.
Definition: NvSIPLCamera.hpp:152
nvsipl::GetNitoMetadataFromMemory
SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem, size_t const nitoMemLength, NvSIPLNitoMetadata *const metadataArray, size_t const metadataArrayLength, size_t *const metadataCount)
Get NITO Metadata (knobset UUID, schema hash, data hash) from a NITO memory buffer.
nvsipl::INvSIPLCamera::RegisterNvSciSyncObj
virtual SIPLStatus RegisterNvSciSyncObj(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSiplNvSciSyncObjType const syncobjtype, NvSciSyncObj const syncobj, uint32_t const vcIdx=0U)=0
Register an NvSciSyncObj.
nvsipl::PlatformCfg
Defines the camera platform configuration.
Definition: NvSIPLPlatformCfg.hpp:47
nvsipl::SIPL_WAITER
@ SIPL_WAITER
For a given NvSciSyncObj SIPL acts as a waiter.
Definition: NvSIPLCamera.hpp:139
nvsipl::NvSIPLPipelineQueues
This is the output structure for INvSIPLCamera::SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:809
nvsipl::INvSIPLCamera::GetModuleInterfaceProvider
virtual SIPLStatus GetModuleInterfaceProvider(uint32_t const index, IInterfaceProvider *&interfaceProvider)=0
Retrieve custom interface provider for module.
nvsipl::INvSIPLCamera::RegisterImages
virtual SIPLStatus RegisterImages(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, std::vector< NvSciBufObj > const &images, uint32_t const vcIdx=0U)=0
Register images.
nvsipl::NVSIPL_MODULE_ERROR_READ_ALL
@ NVSIPL_MODULE_ERROR_READ_ALL
Read both sensor and serializer error information when getting error details.
Definition: NvSIPLCommon.hpp:274
nvsipl::INvSIPLCamera::SetPlatformCfg
virtual SIPLStatus SetPlatformCfg(PlatformCfg const *const platformConfig)=0
Set a platform configuration.
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:525
NvSIPLPipelineMgr.hpp
NVIDIA SIPL: Pipeline Manager - NvSIPL Pipeline Manager
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
A container constituting an attribute list which contains.
Definition: nvscibuf.h:3914
nvsipl::INvSIPLCamera
The top-level API for SIPL.
Definition: NvSIPLCamera.hpp:183
nvsipl::NITO_DATA_HASH_SIZE
static constexpr size_t NITO_DATA_HASH_SIZE
Size of the NITO Data Hash.
Definition: NvSIPLCamera.hpp:58
nvsipl::SIPL_SIGNALER
@ SIPL_SIGNALER
For a given NvSciSyncObj SIPL acts as a signaler.
Definition: NvSIPLCamera.hpp:135
nvsipl::INvSIPLCamera::operator=
INvSIPLCamera & operator=(INvSIPLCamera &other) &=delete
Delete copy assignment operator.
nvscistream.h
NVIDIA Software Communications Interface (SCI) : NvSciStream
nvsipl::IInterfaceProvider
Class providing access to device interfaces.
Definition: INvSIPLDeviceInterfaceProvider.hpp:201
nvscibuf.h
NVIDIA Software Communications Interface (SCI) : NvSciBuf
nvsipl::NvSiplNvSciSyncObjType
NvSiplNvSciSyncObjType
Defines SIPL NvSciSyncObj types.
Definition: NvSIPLCamera.hpp:148
nvsipl::FrameProcessingRate
FrameProcessingRate
Defines Auto Control and ISP processing rate options.
Definition: NvSIPLCamera.hpp:163
nvsipl::INvSIPLCamera::INvSIPLCamera
INvSIPLCamera()=default
Default constructor declared in order to allow construction of derived objects.
nvsipl::INvSIPLCamera::SetSensorCharMode
virtual SIPLStatus SetSensorCharMode(uint32_t const index, uint8_t expNo)=0
Set sensor in characterization mode.
nvsipl::INvSIPLCamera::GetPipelineInterfaceProvider
virtual SIPLStatus GetPipelineInterfaceProvider(uint32_t const index, IInterfaceProvider *&interfaceProvider, uint32_t const vcIdx=0U) noexcept=0
Retrieve the custom interface provider for a sensor pipeline.
nvsipl::AWB_HALF_RATE
@ AWB_HALF_RATE
Process AE and ISP every frame, AWB every 2nd frame.
Definition: NvSIPLCamera.hpp:171
nvsipl::INvSIPLCamera::GetModuleErrorInfo
virtual SIPLStatus GetModuleErrorInfo(uint32_t const index, SIPLErrorDetails *const serializerErrorInfo, SIPLErrorDetails *const sensorErrorInfo, SIPLModuleErrorReadFlag const errorsToRead=NVSIPL_MODULE_ERROR_READ_ALL)=0
Gets generic module error information.
nvsipl::INvSIPLCamera::GetDeserializerErrorInfo
virtual SIPLStatus GetDeserializerErrorInfo(uint32_t const devBlkIndex, SIPLErrorDetails *const deserializerErrorInfo, bool &isRemoteError, uint8_t &linkErrorMask)=0
Get generic deserializer error information.
nvsipl::NVSIPL_PRESYNCOBJ
@ NVSIPL_PRESYNCOBJ
Specifies an NvSciSyncObj type for which SIPL acts as a waiter.
Definition: NvSIPLCamera.hpp:150
nvsipl::THIRD_RATE
@ THIRD_RATE
Process Auto Control (AE-AWB) and ISP every 3rd frame (third rate).
Definition: NvSIPLCamera.hpp:169
nvsipl
Describes the custom interface for IMX623.
Definition: AR0820_CUST1_CustomInterface.hpp:21
nvsipl::NITO_SCHEMA_HASH_SIZE
static constexpr size_t NITO_SCHEMA_HASH_SIZE
Size of the NITO Schema Hash.
Definition: NvSIPLCamera.hpp:56
nvsipl::NvSIPLNitoMetadata::dataHash
uint8_t dataHash[NITO_DATA_HASH_SIZE]
Definition: NvSIPLCamera.hpp:71
nvsipl::INvSIPLCamera::EnableLink
virtual SIPLStatus EnableLink(uint32_t const index, bool const resetModule)=0
Enable a given link.
nvsipl::INvSIPLCamera::ToggleLED
virtual SIPLStatus ToggleLED(uint32_t const index, bool enable)=0
Control the LED on the associated camera module.
nvsipl::NvSIPLNitoMetadata
NvSIPLNitoMetadata defines the 3-tuple returned by a successful call to GetNitoMetadataFromMemory().
Definition: NvSIPLCamera.hpp:67
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:308
nvsipl::ISiplControlAuto
Defines SIPL Control Auto Interface Class.
Definition: INvSiplControlAuto.hpp:46
nvsipl::INvSIPLCamera::~INvSIPLCamera
virtual ~INvSIPLCamera()=default
Default destructor.
nvsipl::INvSIPLCamera::ReadEEPROMData
virtual SIPLStatus ReadEEPROMData(uint32_t const index, uint16_t const address, uint32_t const length, uint8_t *const buffer)=0
Read from an EEPROM in a camera module.
nvsipl::NvSIPLNitoMetadata::parameterSetID
uint8_t parameterSetID[NITO_PARAMETER_SET_ID_SIZE]
Definition: NvSIPLCamera.hpp:69
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:845
nvsipl::INvSIPLCamera::Start
virtual SIPLStatus Start()=0
Begin streaming from all sensors in the selected platform configuration.
type
const WFDCommitType type
Definition: wfdext.h:531