NVIDIA DRIVE OS Linux SDK API Reference

6.0.10.0 Release
NvSIPLPipelineMgr.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 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 
13 #ifndef NVSIPLPIPELINEMGR_HPP
14 #define NVSIPLPIPELINEMGR_HPP
15 
16 #include "NvSIPLCommon.hpp"
17 #include "NvSIPLClient.hpp"
18 #include "NvSIPLPlatformCfg.hpp"
19 #include "NvSIPLInterrupts.hpp"
20 
21 #include <cstdint>
22 #include <vector>
23 
32 namespace nvsipl
33 {
54 {
56  static constexpr uint32_t MAX_DEVICE_GPIOS {16U};
57 
58 public:
60  enum NotificationType : std::uint16_t
61  {
67 
74 
81 
89 
96 
102 
108 
114 
120 
126 
132 
138 
144 
150 
157 
164 
171 
177 
184 
191 
199 
206 
213  };
214 
220  {
224  uint32_t uIndex;
226  uint8_t uLinkMask;
228  uint64_t frameSeqNumber;
230  uint64_t frameCaptureTSC;
234  InterruptCode intrCode;
236  uint64_t intrData;
238  uint32_t gpioIdxs[MAX_DEVICE_GPIOS];
240  uint32_t numGpioIdxs;
241  };
242 
244  NvSIPLPipelineNotifier() = default;
245 
248 
251 
254 
257 
259  virtual ~NvSIPLPipelineNotifier(void) = default;
260 };
261 
262 #if !(NV_IS_SAFETY) || (SAFETY_DBG_OV)
263 
279 {
280 public:
282  struct RawBuffer
283  {
287  uint32_t uIndex;
293  uint64_t frameCaptureTSC;
296  };
297 
309  virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer) = 0;
310 
312  NvSIPLImageGroupWriter() = default;
313 
316 
319 
322 
325 
327  virtual ~NvSIPLImageGroupWriter(void) = default;
328 };
329 #endif // !(NV_IS_SAFETY) || (SAFETY_DBG_OV)
330 
336 {
339 
341  bool isp0OutputRequested {false};
342 
344  bool isp1OutputRequested {false};
345 
347  bool isp2OutputRequested {false};
348 
351 
358 
359 #if !(NV_IS_SAFETY) || (SAFETY_DBG_OV)
360 
362 #endif // !(NV_IS_SAFETY) || (SAFETY_DBG_OV)
363 
365  bool disableSubframe {false};
366 };
367 
372 {
373 public:
374 
413  size_t const timeoutUsec) = 0;
414 
439  virtual size_t GetCount() const = 0;
440 
441 protected:
442 
444  INvSIPLFrameCompletionQueue() = default;
445 
447  virtual ~INvSIPLFrameCompletionQueue() = default;
448 
449 private:
450 
453 
456 
459 
462 };
463 
468 {
469 public:
470 
506  size_t const timeoutUsec) = 0;
507 
532  virtual size_t GetCount() const = 0;
533 
534 protected:
535 
537  INvSIPLNotificationQueue() = default;
538 
540  virtual ~INvSIPLNotificationQueue() = default;
541 
542 private:
543 
546 
549 
551  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue &) & = delete;
552 
554  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue &&) & = delete;
555 };
556 
563 {
569 
575 
581 
587 
590 };
591 
596 {
599 };
600 
603 } // namespace nvsipl
604 
605 
606 #endif // NVSIPLPIPELINEMGR_HPP
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
nvsipl::NvSIPLPipelineQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue
The queue for event notifications.
Definition: NvSIPLPipelineMgr.hpp:589
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureTSC
uint64_t frameCaptureTSC
Holds the TSC timestamp of the end of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:230
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_PROCESSING_DONE
@ NOTIF_INFO_ICP_PROCESSING_DONE
Pipeline event, indicates ICP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:66
nvsipl::NvSIPLPipelineQueues::isp1CompletionQueue
INvSIPLFrameCompletionQueue * isp1CompletionQueue
The queue for completed frames from the second ISP output.
Definition: NvSIPLPipelineMgr.hpp:580
nvsipl::NvSIPLDownscaleCropCfg
Downscale and crop configuration.
Definition: NvSIPLISPStructs.hpp:107
nvsipl::INvSIPLNotificationQueue
The interface to the notification queue.
Definition: NvSIPLPipelineMgr.hpp:467
nvsipl::NvSIPLPipelineQueues::captureCompletionQueue
INvSIPLFrameCompletionQueue * captureCompletionQueue
The queue for completed capture frames.
Definition: NvSIPLPipelineMgr.hpp:568
nvsipl::NvSIPLPipelineQueues::isp0CompletionQueue
INvSIPLFrameCompletionQueue * isp0CompletionQueue
The queue for completed frames from the first ISP output.
Definition: NvSIPLPipelineMgr.hpp:574
nvsipl::INvSIPLFrameCompletionQueue::Get
virtual SIPLStatus Get(INvSIPLClient::INvSIPLBuffer *&item, size_t const timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLImageGroupWriter::RawBuffer::discontinuity
bool discontinuity
Holds a flag to signal discontinuity for the current raw buffer from the previous one.
Definition: NvSIPLPipelineMgr.hpp:289
nvsipl::NvSIPLPipelineNotifier::NotificationData::intrData
uint64_t intrData
Holds the Interrupt Data.
Definition: NvSIPLPipelineMgr.hpp:236
nvsipl::NvSIPLPipelineNotifier::NotificationData::uLinkMask
uint8_t uLinkMask
Holds the device block link mask.
Definition: NvSIPLPipelineMgr.hpp:226
nvsipl::NvSIPLImageGroupWriter::operator=
NvSIPLImageGroupWriter & operator=(NvSIPLImageGroupWriter &) &=delete
Delete copy assigned Constructor.
nvsipl::NvSIPLImageGroupWriter::~NvSIPLImageGroupWriter
virtual ~NvSIPLImageGroupWriter(void)=default
Default destructor.
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureStartTSC
uint64_t frameCaptureStartTSC
Holds the TSC timestamp of the start of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:232
nvsipl::NvSIPLPipelineNotifier::NotificationData::eNotifType
NotificationType eNotifType
Holds the NotificationType event type.
Definition: NvSIPLPipelineMgr.hpp:222
nvsipl::NvSIPLPipelineNotifier::NotificationData::gpioIdxs
uint32_t gpioIdxs[MAX_DEVICE_GPIOS]
Holds the GPIO indices.
Definition: NvSIPLPipelineMgr.hpp:238
nvsipl::NvSIPLPipelineQueues::isp2CompletionQueue
INvSIPLFrameCompletionQueue * isp2CompletionQueue
The queue for completed frames from the third ISP output.
Definition: NvSIPLPipelineMgr.hpp:586
nvsipl::NvSIPLPipelineNotifier::NvSIPLPipelineNotifier
NvSIPLPipelineNotifier()=default
Default Constructor.
nvsipl::NvSIPLPipelineNotifier::NotificationData::intrCode
InterruptCode intrCode
Holds the Interrupt Code.
Definition: NvSIPLPipelineMgr.hpp:234
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTR_LOCALIZATION_FAILURE
@ NOTIF_ERROR_INTR_LOCALIZATION_FAILURE
Device block event, indicates interrupt localization failure (i.e.
Definition: NvSIPLPipelineMgr.hpp:198
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
nvsipl::NvSIPLPipelineNotifier::NotificationType
NotificationType
Defines the events of the image processing pipeline and the device block.
Definition: NvSIPLPipelineMgr.hpp:60
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESERIALIZER_FAILURE
@ NOTIF_ERROR_DESERIALIZER_FAILURE
Device block event, indicates a deserializer failure.
Definition: NvSIPLPipelineMgr.hpp:156
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ACP_PROCESSING_DONE
@ NOTIF_INFO_ACP_PROCESSING_DONE
Pipeline event, indicates auto control processing is finished.
Definition: NvSIPLPipelineMgr.hpp:80
nvsipl::INvSIPLNotificationQueue::INvSIPLNotificationQueue
INvSIPLNotificationQueue()=default
Default Constructor.
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_FRAME_DISCONTINUITY
@ NOTIF_WARN_ICP_FRAME_DISCONTINUITY
Pipeline event, indicates a discontinuity was detected in parsed embedded data frame sequence number.
Definition: NvSIPLPipelineMgr.hpp:107
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
Definition: nvscibuf.h:3102
nvsipl::NvSIPLPipelineNotifier::NotificationData
Defines the notification data.
Definition: NvSIPLPipelineMgr.hpp:219
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_AUTH_OUT_OF_ORDER
@ NOTIF_ERROR_ICP_AUTH_OUT_OF_ORDER
Pipeline event, indicates out of order image is detected.
Definition: NvSIPLPipelineMgr.hpp:190
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvsipl::NvSIPLPipelineNotifier::NotificationData::uIndex
uint32_t uIndex
Holds the ID of the pipeline.
Definition: NvSIPLPipelineMgr.hpp:224
nvsipl::NvSIPLPipelineConfiguration::statsOverrideSettings
NvSIPLIspStatsOverrideSetting statsOverrideSettings
Holds ISP statistics override parameters.
Definition: NvSIPLPipelineMgr.hpp:357
nvsipl::INvSIPLClient::INvSIPLBuffer
Abstract interface for SIPL buffers.
Definition: NvSIPLClient.hpp:129
nvsipl::NvSIPLPipelineConfiguration::captureOutputRequested
bool captureOutputRequested
true if the client wants capture output frames to be delivered
Definition: NvSIPLPipelineMgr.hpp:338
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_AUTH_FAILURE
@ NOTIF_ERROR_ICP_AUTH_FAILURE
Pipeline event, indicates image authentication failure.
Definition: NvSIPLPipelineMgr.hpp:183
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ACP_PROCESSING_FAILURE
@ NOTIF_ERROR_ACP_PROCESSING_FAILURE
Pipeline event, indicates auto control processing failure.
Definition: NvSIPLPipelineMgr.hpp:143
nvsipl::NvSIPLPipelineConfiguration::disableSubframe
bool disableSubframe
true if the client wants to disable the subframe feature
Definition: NvSIPLPipelineMgr.hpp:365
nvsipl::NvSIPLPipelineNotifier
Describes the interfaces of the SIPL pipeline notification handler.
Definition: NvSIPLPipelineMgr.hpp:53
nvsipl::NvSIPLImageGroupWriter::RawBuffer
Describes an unprocessed sensor output buffer.
Definition: NvSIPLPipelineMgr.hpp:282
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTERNAL_FAILURE
@ NOTIF_ERROR_INTERNAL_FAILURE
Pipeline and device block event, indicates an unexpected internal failure.
Definition: NvSIPLPipelineMgr.hpp:212
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE
@ NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE
Pipeline event, indicates embedded data parsing failure.
Definition: NvSIPLPipelineMgr.hpp:131
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:152
nvsipl::NvSIPLPipelineQueues
This is the output structure for INvSIPLCamera::SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:562
nvsipl::NvSIPLImageGroupWriter::RawBuffer::uIndex
uint32_t uIndex
Holds the ID of the sensor in PlatformCfg.
Definition: NvSIPLPipelineMgr.hpp:287
nvsipl::NvSIPLPipelineConfiguration::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:361
nvsipl::NvSIPLPipelineConfiguration::isp2OutputRequested
bool isp2OutputRequested
true if the client wants frames to be delivered from the third ISP output
Definition: NvSIPLPipelineMgr.hpp:347
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:335
nvsipl::INvSIPLNotificationQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::INvSIPLNotificationQueue::Get
virtual SIPLStatus Get(NvSIPLPipelineNotifier::NotificationData &item, size_t const timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLPipelineNotifier::operator=
NvSIPLPipelineNotifier & operator=(NvSIPLPipelineNotifier &) &=delete
Delete copy assigned Constructor.
nvsipl::NvSIPLDeviceBlockQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue[MAX_DEVICEBLOCKS_PER_PLATFORM]
Queues for event notifications for each device block.
Definition: NvSIPLPipelineMgr.hpp:598
nvsipl::NvSIPLPipelineConfiguration::isp1OutputRequested
bool isp1OutputRequested
true if the client wants frames to be delivered from the second ISP output
Definition: NvSIPLPipelineMgr.hpp:344
nvsipl::NvSIPLPipelineConfiguration::isp0OutputRequested
bool isp0OutputRequested
true if the client wants frames to be delivered from the first ISP output
Definition: NvSIPLPipelineMgr.hpp:341
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ISP_PROCESSING_DONE
@ NOTIF_INFO_ISP_PROCESSING_DONE
Pipeline event, indicates ISP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:73
nvsipl::NvSIPLImageGroupWriter
Describes the interfaces of SIPL pipeline feeder.
Definition: NvSIPLPipelineMgr.hpp:278
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameSeqNumber
uint64_t frameSeqNumber
Holds a sequence number of a captured frame.
Definition: NvSIPLPipelineMgr.hpp:228
nvsipl::INvSIPLNotificationQueue::~INvSIPLNotificationQueue
virtual ~INvSIPLNotificationQueue()=default
Default Destructor.
nvsipl::INvSIPLFrameCompletionQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::INvSIPLFrameCompletionQueue
The interface to the frame completion queue.
Definition: NvSIPLPipelineMgr.hpp:371
nvsipl::NvSIPLImageGroupWriter::RawBuffer::image
NvSciBufObj image
Holds an NvSciBufObj.
Definition: NvSIPLPipelineMgr.hpp:285
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_CDI_PROCESSING_DONE
@ NOTIF_INFO_CDI_PROCESSING_DONE
Pipeline event, indicates CDI processing is finished.
Definition: NvSIPLPipelineMgr.hpp:88
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE
@ NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE
Pipeline event, indicates CDI set sensor control failure.
Definition: NvSIPLPipelineMgr.hpp:149
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTR_LOCALIZATION_TIMEOUT
@ NOTIF_ERROR_INTR_LOCALIZATION_TIMEOUT
Device block event, indicates interrupt localization timeout.
Definition: NvSIPLPipelineMgr.hpp:205
nvsipl::NvSIPLImageGroupWriter::FillRawBuffer
virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer)=0
Populates the buffer with RAW data.
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_AUTH_SUCCESS
@ NOTIF_INFO_ICP_AUTH_SUCCESS
Pipeline event, indicates image authentication success.
Definition: NvSIPLPipelineMgr.hpp:95
nvsipl::NvSIPLImageGroupWriter::RawBuffer::dropBuffer
bool dropBuffer
Holds a flag to signal that the pipeline should drop the current buffer.
Definition: NvSIPLPipelineMgr.hpp:291
nvsipl::NvSIPLPipelineNotifier::~NvSIPLPipelineNotifier
virtual ~NvSIPLPipelineNotifier(void)=default
Default destructor.
nvsipl::INvSIPLFrameCompletionQueue::~INvSIPLFrameCompletionQueue
virtual ~INvSIPLFrameCompletionQueue()=default
Default Destructor.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SERIALIZER_FAILURE
@ NOTIF_ERROR_SERIALIZER_FAILURE
Device block event, indicates a serializer failure.
Definition: NvSIPLPipelineMgr.hpp:163
nvsipl::NvSIPLPipelineNotifier::NotificationData::numGpioIdxs
uint32_t numGpioIdxs
Holds the number of GPIO indices in the array.
Definition: NvSIPLPipelineMgr.hpp:240
nvsipl::NvSIPLIspStatsOverrideSetting
SIPL ISP Statistics Override Parameters.
Definition: NvSIPLISPStat.hpp:623
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:35
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_BAD_INPUT_STREAM
@ NOTIF_ERROR_ICP_BAD_INPUT_STREAM
Pipeline event, indicates ICP bad input stream.
Definition: NvSIPLPipelineMgr.hpp:119
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_FRAME_DROP
@ NOTIF_WARN_ICP_FRAME_DROP
Pipeline event, indicates pipeline was forced to drop a frame due to a slow consumer or system issues...
Definition: NvSIPLPipelineMgr.hpp:101
nvsipl::INvSIPLFrameCompletionQueue::INvSIPLFrameCompletionQueue
INvSIPLFrameCompletionQueue()=default
Default Constructor.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SENSOR_FAILURE
@ NOTIF_ERROR_SENSOR_FAILURE
Device block event, indicates a sensor failure.
Definition: NvSIPLPipelineMgr.hpp:170
nvsipl::NvSIPLImageGroupWriter::RawBuffer::frameCaptureStartTSC
uint64_t frameCaptureStartTSC
Holds the TSC timestamp of the start of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:295
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE
Pipeline event, indicates ISP processing failure.
Definition: NvSIPLPipelineMgr.hpp:137
nvsipl::NvSIPLPipelineConfiguration::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:350
nvsipl::NvSIPLImageGroupWriter::RawBuffer::frameCaptureTSC
uint64_t frameCaptureTSC
Holds the TSC timestamp of the end of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:293
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_CAPTURE_FAILURE
@ NOTIF_ERROR_ICP_CAPTURE_FAILURE
Pipeline event, indicates ICP capture failure.
Definition: NvSIPLPipelineMgr.hpp:125
nvsipl::MAX_DEVICEBLOCKS_PER_PLATFORM
static constexpr uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM
Indicates the maximum number of device blocks per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:45
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:595
nvsipl::NvSIPLImageGroupWriter::NvSIPLImageGroupWriter
NvSIPLImageGroupWriter()=default
Default Constructor.
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_CAPTURE_TIMEOUT
@ NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Pipeline event, indicates occurrence of timeout while capturing.
Definition: NvSIPLPipelineMgr.hpp:113
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE_RECOVERABLE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE_RECOVERABLE
Pipeline event, indicates isp process failure due to recoverable errors.
Definition: NvSIPLPipelineMgr.hpp:176