NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
NvSIPLPipelineMgr.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef NVSIPLPIPELINEMGR_HPP
12 #define NVSIPLPIPELINEMGR_HPP
13 
14 #include "NvSIPLCommon.hpp"
15 #include "NvSIPLClient.hpp"
16 #include "NvSIPLPlatformCfg.hpp"
17 
18 #if !NV_IS_SAFETY
19 #include "nvmedia_image.h"
20 #include "nvmedia_surface.h"
21 #endif // !NV_IS_SAFETY
22 
23 #include <cstdint>
24 #include <vector>
25 
34 namespace nvsipl
35 {
56 {
58  static const uint32_t MAX_DEVICE_GPIOS = 8U;
59 
60 public:
63  {
69 
75 
81 
89 
95 
101 
107 
113 
119 
125 
131 
137 
143 
149 
155 
161 
167 
174  };
175 
181  {
185  uint32_t uIndex;
187  uint8_t uLinkMask;
189  uint64_t frameCaptureTSC;
193  uint32_t gpioIdxs[MAX_DEVICE_GPIOS];
195  uint32_t numGpioIdxs;
196  };
197 
199  virtual ~NvSIPLPipelineNotifier(void) = default;
200 };
201 
219 {
220 public:
222  struct RawBuffer
223  {
224 #if !NV_IS_SAFETY
225 
231 #endif // !NV_IS_SAFETY
232 
235  uint32_t uIndex;
238  };
239 
251  virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer) = 0;
252 
254  virtual ~NvSIPLImageGroupWriter(void) = default;
255 };
256 
257 #if !NV_IS_SAFETY
258 
268 
270  std::vector<NvMediaSurfAllocAttr> surfaceAllocAttr;
271 };
272 #endif // !NV_IS_SAFETY
273 
279 {
282 
284  bool isp0OutputRequested {false};
285 
287  bool isp1OutputRequested {false};
288 
290  bool isp2OutputRequested {false};
291 
294 
301 
304 
306  bool enableFuSaCapBackend {false};
307 };
308 
313 {
314 public:
315 
352  size_t const timeoutUsec) = 0;
353 
376  virtual size_t GetCount() const = 0;
377 
378 protected:
379 
380  INvSIPLFrameCompletionQueue() = default;
381  virtual ~INvSIPLFrameCompletionQueue() = default;
382 
383 private:
384 
386  INvSIPLFrameCompletionQueue& operator=(INvSIPLFrameCompletionQueue const& rhs) = delete;
387 };
388 
393 {
394 public:
395 
429  size_t const timeoutUsec) = 0;
430 
453  virtual size_t GetCount() const = 0;
454 
455 protected:
456 
457  INvSIPLNotificationQueue() = default;
458  virtual ~INvSIPLNotificationQueue() = default;
459 
460 private:
461 
462  INvSIPLNotificationQueue(INvSIPLNotificationQueue const& other) = delete;
463  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue const& rhs) = delete;
464 };
465 
472 {
478 
484 
490 
496 
499 };
500 
505 {
508 };
509 
512 } // namespace nvsipl
513 
514 
515 #endif // NVSIPLPIPELINEMGR_HPP
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SENSOR_FAILURE
@ NOTIF_ERROR_SENSOR_FAILURE
Device block event, indicates a sensor failure.
Definition: NvSIPLPipelineMgr.hpp:166
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
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:100
nvsipl::NvSIPLPipelineQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue
The queue for event notifications.
Definition: NvSIPLPipelineMgr.hpp:498
nvsipl::MAX_DEVICEBLOCKS_PER_PLATFORM
static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM
Indicates the maximum number of device blocks per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:46
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureTSC
uint64_t frameCaptureTSC
Holds the TSC timestamp of the end of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:189
nvsipl::NvSIPLPipelineQueues::isp1CompletionQueue
INvSIPLFrameCompletionQueue * isp1CompletionQueue
The queue for completed frames from the second ISP output.
Definition: NvSIPLPipelineMgr.hpp:489
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
nvsipl::NvSIPLDownscaleCropCfg
Downscale and crop configuration.
Definition: NvSIPLISPStructs.hpp:87
nvsipl::INvSIPLNotificationQueue
The interface to the notification queue.
Definition: NvSIPLPipelineMgr.hpp:392
nvsipl::NvSIPLPipelineQueues::captureCompletionQueue
INvSIPLFrameCompletionQueue * captureCompletionQueue
The queue for completed capture frames.
Definition: NvSIPLPipelineMgr.hpp:477
nvsipl::NvSIPLImageGroupWriter::RawBuffer::imageGroup
NvMediaImageGroup * imageGroup
Definition: NvSIPLPipelineMgr.hpp:230
nvsipl::NvSIPLPipelineQueues::isp0CompletionQueue
INvSIPLFrameCompletionQueue * isp0CompletionQueue
The queue for completed frames from the first ISP output.
Definition: NvSIPLPipelineMgr.hpp:483
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:237
nvsipl::NvSIPLPipelineNotifier::NotificationData::uLinkMask
uint8_t uLinkMask
Holds the device block link mask.
Definition: NvSIPLPipelineMgr.hpp:187
nvsipl::NvSIPLImageGroupWriter::~NvSIPLImageGroupWriter
virtual ~NvSIPLImageGroupWriter(void)=default
Default destructor.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESER_LINK_FAILURE
@ NOTIF_ERROR_DESER_LINK_FAILURE
Device block event, indicates a deserializer link error.
Definition: NvSIPLPipelineMgr.hpp:148
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureStartTSC
uint64_t frameCaptureStartTSC
Holds the TSC timestamp of the start of frame for capture.
Definition: NvSIPLPipelineMgr.hpp:191
nvsipl::NvSIPLPipelineNotifier::NotificationData::eNotifType
NotificationType eNotifType
Holds the NotificationType event type.
Definition: NvSIPLPipelineMgr.hpp:183
nvsipl::NvSIPLPipelineNotifier::NotificationData::gpioIdxs
uint32_t gpioIdxs[MAX_DEVICE_GPIOS]
Holds the GPIO indices.
Definition: NvSIPLPipelineMgr.hpp:193
nvsipl::NvSIPLPipelineQueues::isp2CompletionQueue
INvSIPLFrameCompletionQueue * isp2CompletionQueue
The queue for completed frames from the third ISP output.
Definition: NvSIPLPipelineMgr.hpp:495
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_BAD_INPUT_STREAM
@ NOTIF_ERROR_ICP_BAD_INPUT_STREAM
Pipeline event, indicates ICP bad input stream.
Definition: NvSIPLPipelineMgr.hpp:112
nvsipl::INvSIPLNotificationQueue::INvSIPLNotificationQueue
INvSIPLNotificationQueue()=default
nvsipl::NvSIPLImageAttr::surfaceAllocAttr
std::vector< NvMediaSurfAllocAttr > surfaceAllocAttr
Holds a vector of NvMediaSurfAllocAttr objects.
Definition: NvSIPLPipelineMgr.hpp:270
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
Definition: nvscibuf.h:2578
nvsipl::NvSIPLPipelineNotifier::NotificationData
Defines the notification data.
Definition: NvSIPLPipelineMgr.hpp:180
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE
Pipeline event, indicates ISP processing failure.
Definition: NvSIPLPipelineMgr.hpp:130
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvsipl::NvSIPLPipelineNotifier::NotificationData::uIndex
uint32_t uIndex
Holds the ID of the pipeline.
Definition: NvSIPLPipelineMgr.hpp:185
nvsipl::NvSIPLPipelineConfiguration::statsOverrideSettings
NvSIPLIspStatsOverrideSetting statsOverrideSettings
Holds ISP statistics override parameters.
Definition: NvSIPLPipelineMgr.hpp:300
nvsipl::INvSIPLClient::INvSIPLBuffer
Abstract interface for SIPL buffers.
Definition: NvSIPLClient.hpp:138
nvsipl::NvSIPLImageAttr::surfaceType
NvMediaSurfaceType surfaceType
Holds the surface type of the image.
Definition: NvSIPLPipelineMgr.hpp:267
nvsipl::NvSIPLPipelineConfiguration::captureOutputRequested
bool captureOutputRequested
true if the client wants capture output frames to be delivered
Definition: NvSIPLPipelineMgr.hpp:281
nvsipl::NvSIPLPipelineNotifier
Describes the interfaces of the SIPL pipeline notification handler.
Definition: NvSIPLPipelineMgr.hpp:55
nvsipl::NvSIPLPipelineConfiguration::enableFuSaCapBackend
bool enableFuSaCapBackend
true if the client wants to use FuSa Capture backend instead of NvMedia backend
Definition: NvSIPLPipelineMgr.hpp:306
nvsipl::NvSIPLImageGroupWriter::RawBuffer
Describes an unprocessed sensor output buffer.
Definition: NvSIPLPipelineMgr.hpp:222
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESERIALIZER_FAILURE
@ NOTIF_ERROR_DESERIALIZER_FAILURE
Device block event, indicates a deserializer failure.
Definition: NvSIPLPipelineMgr.hpp:154
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:94
nvsipl::NvSIPLPipelineQueues
This is the output structure for SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:471
nvsipl::NvSIPLImageGroupWriter::RawBuffer::uIndex
uint32_t uIndex
Holds the ID of the sensor in PlatformCfg.
Definition: NvSIPLPipelineMgr.hpp:235
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:142
nvsipl::NvSIPLPipelineConfiguration::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:303
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_CAPTURE_FAILURE
@ NOTIF_ERROR_ICP_CAPTURE_FAILURE
Pipeline event, indicates ICP capture failure.
Definition: NvSIPLPipelineMgr.hpp:118
nvsipl::NvSIPLPipelineConfiguration::isp2OutputRequested
bool isp2OutputRequested
true if the client wants frames to be delivered from the third ISP output
Definition: NvSIPLPipelineMgr.hpp:290
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:278
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:568
nvsipl::INvSIPLNotificationQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::NvSIPLImageAttr
Describes attributes of images used in image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:265
nvsipl::INvSIPLNotificationQueue::Get
virtual SIPLStatus Get(NvSIPLPipelineNotifier::NotificationData &item, size_t const timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLDeviceBlockQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue[MAX_DEVICEBLOCKS_PER_PLATFORM]
Queues for event notifications for each device block.
Definition: NvSIPLPipelineMgr.hpp:507
nvsipl::NvSIPLPipelineConfiguration::isp1OutputRequested
bool isp1OutputRequested
true if the client wants frames to be delivered from the second ISP output
Definition: NvSIPLPipelineMgr.hpp:287
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:64
nvsipl::NvSIPLPipelineConfiguration::isp0OutputRequested
bool isp0OutputRequested
true if the client wants frames to be delivered from the first ISP output
Definition: NvSIPLPipelineMgr.hpp:284
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_CAPTURE_TIMEOUT
@ NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Pipeline event, indicates occurrence of timeout while capturing.
Definition: NvSIPLPipelineMgr.hpp:106
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SERIALIZER_FAILURE
@ NOTIF_ERROR_SERIALIZER_FAILURE
Device block event, indicates a serializer failure.
Definition: NvSIPLPipelineMgr.hpp:160
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ACP_PROCESSING_FAILURE
@ NOTIF_ERROR_ACP_PROCESSING_FAILURE
Pipeline event, indicates auto control processing failure.
Definition: NvSIPLPipelineMgr.hpp:136
nvsipl::NvSIPLImageGroupWriter
Describes the interfaces of SIPL pipeline feeder.
Definition: NvSIPLPipelineMgr.hpp:218
nvsipl::INvSIPLNotificationQueue::~INvSIPLNotificationQueue
virtual ~INvSIPLNotificationQueue()=default
NvMediaSurfaceType_Unsupported
#define NvMediaSurfaceType_Unsupported
Unsupported types.
Definition: nvmedia_surface.h:571
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:312
nvsipl::NvSIPLImageGroupWriter::RawBuffer::image
NvSciBufObj image
Holds an NvSciBufObj.
Definition: NvSIPLPipelineMgr.hpp:233
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_CDI_PROCESSING_DONE
@ NOTIF_INFO_CDI_PROCESSING_DONE
Pipeline event, indicates CDI processing is finished.
Definition: NvSIPLPipelineMgr.hpp:88
NvMediaImageGroup
Holds a handle representing an image group.
Definition: nvmedia_image.h:115
nvsipl::NvSIPLImageGroupWriter::FillRawBuffer
virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer)=0
Populates the buffer with RAW data.
nvsipl::NvSIPLPipelineNotifier::~NvSIPLPipelineNotifier
virtual ~NvSIPLPipelineNotifier(void)=default
Default destructor.
nvsipl::INvSIPLFrameCompletionQueue::~INvSIPLFrameCompletionQueue
virtual ~INvSIPLFrameCompletionQueue()=default
nvsipl::NvSIPLPipelineNotifier::NotificationData::numGpioIdxs
uint32_t numGpioIdxs
Holds the number of GPIO indices in the array.
Definition: NvSIPLPipelineMgr.hpp:195
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_PROCESSING_DONE
@ NOTIF_INFO_ICP_PROCESSING_DONE
Pipeline event, indicates ICP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:68
nvsipl::NvSIPLIspStatsOverrideSetting
SIPL ISP Statistics Override Parameters.
Definition: NvSIPLISPStat.hpp:212
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTERNAL_FAILURE
@ NOTIF_ERROR_INTERNAL_FAILURE
Pipeline and device block event, indicates an unexpected internal failure.
Definition: NvSIPLPipelineMgr.hpp:173
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
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::INvSIPLFrameCompletionQueue::INvSIPLFrameCompletionQueue
INvSIPLFrameCompletionQueue()=default
nvsipl::NvSIPLPipelineNotifier::NotificationType
NotificationType
Defines the events of the image processing pipeline and the device block.
Definition: NvSIPLPipelineMgr.hpp:62
nvsipl::NvSIPLPipelineConfiguration::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:293
nvmedia_image.h
NVIDIA Media Interface: Image Processing
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:124
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:504
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ISP_PROCESSING_DONE
@ NOTIF_INFO_ISP_PROCESSING_DONE
Pipeline event, indicates ISP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:74