NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
NvSIPLPipelineMgr.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, 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 #include "nvmedia_image.h"
19 #include "nvmedia_surface.h"
20 
21 #include <cstdint>
22 #include <vector>
23 #include <set>
24 
33 namespace nvsipl
34 {
35 
49 enum PluginType {
50  NV_PLUGIN = 0,
53 };
54 
65 {
66 public:
69  {
75 
81 
87 
93 
99 
105 
111 
117 
123 
129 
135 
141 
147 
153 
159 
165 
171 
178  };
179 
185  {
189  uint32_t uIndex;
191  uint8_t uLinkMask;
193  uint64_t frameCaptureTSC;
195  std::set<uint32_t> gpioIdxs;
196  };
197 
199  virtual ~NvSIPLPipelineNotifier(void) = default;
200 };
201 
202 #if !NV_IS_SAFETY
203 
220 {
221 public:
223  struct RawBuffer
224  {
228  uint32_t uIndex;
231  };
232 
244  virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer) = 0;
245 
247  virtual ~NvSIPLImageGroupWriter(void) = default;
248 };
249 #endif // !NV_IS_SAFETY
250 
257 
259  std::vector<NvMediaSurfAllocAttr> surfaceAllocAttr;
260 };
261 
264 {
266  bool ispInputCropEnable {false};
269 
271  bool isp0OutputCropEnable {false};
274 
276  bool isp1OutputCropEnable {false};
279 
281  bool isp0DownscaleEnable {false};
286 
288  bool isp1DownscaleEnable {false};
293 };
294 
300 {
303 
305  bool isp0OutputRequested {false};
306 
308  bool isp1OutputRequested {false};
309 
312 
313 #if !NV_IS_SAFETY
314 
316 #endif // !NV_IS_SAFETY
317 };
318 
323 {
324 public:
325 
345  size_t timeoutUsec) = 0;
346 
352  virtual size_t GetCount() const = 0;
353 
354 protected:
355 
356  INvSIPLFrameCompletionQueue() = default;
357  virtual ~INvSIPLFrameCompletionQueue() = default;
358 
359 private:
360 
362  INvSIPLFrameCompletionQueue& operator=(INvSIPLFrameCompletionQueue const& rhs) = delete;
363 };
364 
369 {
370 public:
371 
388  size_t timeoutUsec) = 0;
389 
395  virtual size_t GetCount() const = 0;
396 
397 protected:
398 
399  INvSIPLNotificationQueue() = default;
400  virtual ~INvSIPLNotificationQueue() = default;
401 
402 private:
403 
404  INvSIPLNotificationQueue(INvSIPLNotificationQueue const& other) = delete;
405  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue const& rhs) = delete;
406 };
407 
414 {
420 
426 
432 
435 };
436 
441 {
444 };
445 
448 } // namespace nvsipl
449 
450 
451 #endif // NVSIPLPIPELINEMGR_HPP
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SENSOR_FAILURE
@ NOTIF_ERROR_SENSOR_FAILURE
Device block event, indicates a sensor failure.
Definition: NvSIPLPipelineMgr.hpp:170
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:104
nvsipl::NvSIPLPipelineQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue
The queue for event notifications.
Definition: NvSIPLPipelineMgr.hpp:434
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:43
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureTSC
uint64_t frameCaptureTSC
Holds the TSC timestamp of the frame capture.
Definition: NvSIPLPipelineMgr.hpp:193
nvsipl::NvSIPLPipelineQueues::isp1CompletionQueue
INvSIPLFrameCompletionQueue * isp1CompletionQueue
The queue for completed frames from the second ISP output.
Definition: NvSIPLPipelineMgr.hpp:431
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
nvsipl::NvSIPLDownscaleCropCfg
Downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:263
nvsipl::INvSIPLNotificationQueue
The interface to the notification queue.
Definition: NvSIPLPipelineMgr.hpp:368
nvsipl::NvSIPLPipelineQueues::captureCompletionQueue
INvSIPLFrameCompletionQueue * captureCompletionQueue
The queue for completed capture frames.
Definition: NvSIPLPipelineMgr.hpp:419
nvsipl::NvSIPLImageGroupWriter::RawBuffer::imageGroup
NvMediaImageGroup * imageGroup
Holds a pointer to NvMediaImageGroup.
Definition: NvSIPLPipelineMgr.hpp:226
nvsipl::NvSIPLPipelineQueues::isp0CompletionQueue
INvSIPLFrameCompletionQueue * isp0CompletionQueue
The queue for completed frames from the first ISP output.
Definition: NvSIPLPipelineMgr.hpp:425
nvsipl::NvSIPLImageGroupWriter::RawBuffer::discontinuity
bool discontinuity
Holds a flag to signal discontinuity for the current raw buffer from the previous one.
Definition: NvSIPLPipelineMgr.hpp:230
nvsipl::NvSIPLPipelineNotifier::NotificationData::uLinkMask
uint8_t uLinkMask
Holds the device block link mask.
Definition: NvSIPLPipelineMgr.hpp:191
nvsipl::NvSIPLImageGroupWriter::~NvSIPLImageGroupWriter
virtual ~NvSIPLImageGroupWriter(void)=default
Default destructor.
nvsipl::INvSIPLNotificationQueue::Get
virtual SIPLStatus Get(NvSIPLPipelineNotifier::NotificationData &item, size_t timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESER_LINK_FAILURE
@ NOTIF_ERROR_DESER_LINK_FAILURE
Device block event, indicates a deserializer link error.
Definition: NvSIPLPipelineMgr.hpp:152
nvsipl::NvSIPLPipelineNotifier::NotificationData::eNotifType
NotificationType eNotifType
Holds the NotificationType event type.
Definition: NvSIPLPipelineMgr.hpp:187
nvsipl::CUSTOM_PLUGIN0
@ CUSTOM_PLUGIN0
Custom plug-in 0.
Definition: NvSIPLPipelineMgr.hpp:51
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
nvsipl::INvSIPLFrameCompletionQueue::Get
virtual SIPLStatus Get(INvSIPLClient::INvSIPLBuffer *&item, size_t timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_BAD_INPUT_STREAM
@ NOTIF_ERROR_ICP_BAD_INPUT_STREAM
Pipeline event, indicates ICP bad input stream.
Definition: NvSIPLPipelineMgr.hpp:116
nvsipl::INvSIPLNotificationQueue::INvSIPLNotificationQueue
INvSIPLNotificationQueue()=default
nvsipl::NvSIPLImageAttr::surfaceAllocAttr
std::vector< NvMediaSurfAllocAttr > surfaceAllocAttr
Holds a vector of NvMediaSurfAllocAttr objects.
Definition: NvSIPLPipelineMgr.hpp:259
nvsipl::NvSIPLPipelineNotifier::NotificationData
Defines the notification data.
Definition: NvSIPLPipelineMgr.hpp:184
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE
Pipeline event, indicates ISP processing failure.
Definition: NvSIPLPipelineMgr.hpp:134
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCropEnable
bool isp1OutputCropEnable
Indicates if ISP1 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:276
nvsipl::NvSIPLPipelineNotifier::NotificationData::uIndex
uint32_t uIndex
Holds the ID of the pipeline.
Definition: NvSIPLPipelineMgr.hpp:189
nvsipl::INvSIPLClient::INvSIPLBuffer
Describes the interfaces of SIPL buffer.
Definition: NvSIPLClient.hpp:97
nvsipl::NvSIPLImageAttr::surfaceType
NvMediaSurfaceType surfaceType
Holds the surface type of the image.
Definition: NvSIPLPipelineMgr.hpp:256
nvsipl::NvSIPLPipelineConfiguration::captureOutputRequested
bool captureOutputRequested
true if the client wants capture output frames to be delivered
Definition: NvSIPLPipelineMgr.hpp:302
nvsipl::NvSIPLPipelineNotifier
Describes the interfaces of the SIPL pipeline notification handler.
Definition: NvSIPLPipelineMgr.hpp:64
nvsipl::NvSIPLImageGroupWriter::RawBuffer
Describes an unprocessed sensor output buffer.
Definition: NvSIPLPipelineMgr.hpp:223
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESERIALIZER_FAILURE
@ NOTIF_ERROR_DESERIALIZER_FAILURE
Device block event, indicates a deserializer failure.
Definition: NvSIPLPipelineMgr.hpp:158
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleEnable
bool isp0DownscaleEnable
Indicates if ISP0 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:281
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:98
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleHeight
uint32_t isp1DownscaleHeight
ISP1 downscale height.
Definition: NvSIPLPipelineMgr.hpp:292
nvsipl::NvSIPLDownscaleCropCfg::ispInputCropEnable
bool ispInputCropEnable
Indicates if ISP input crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:266
nvsipl::NvSIPLPipelineQueues
This is the output structure for SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:413
nvsipl::NvSIPLImageGroupWriter::RawBuffer::uIndex
uint32_t uIndex
Holds the ID of the sensor in PlatformCfg.
Definition: NvSIPLPipelineMgr.hpp:228
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:146
nvsipl::NvSIPLPipelineConfiguration::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:315
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_CAPTURE_FAILURE
@ NOTIF_ERROR_ICP_CAPTURE_FAILURE
Pipeline event, indicates ICP capture failure.
Definition: NvSIPLPipelineMgr.hpp:122
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:299
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:550
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:254
nvsipl::NvSIPLDeviceBlockQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue[MAX_DEVICEBLOCKS_PER_PLATFORM]
Queues for event notifications for each device block.
Definition: NvSIPLPipelineMgr.hpp:443
nvsipl::NvSIPLPipelineConfiguration::isp1OutputRequested
bool isp1OutputRequested
true if the client wants frames to be delivered from the second ISP output
Definition: NvSIPLPipelineMgr.hpp:308
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:40
nvsipl::NvSIPLPipelineConfiguration::isp0OutputRequested
bool isp0OutputRequested
true if the client wants frames to be delivered from the first ISP output
Definition: NvSIPLPipelineMgr.hpp:305
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_CAPTURE_TIMEOUT
@ NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Pipeline event, indicates occurrence of timeout while capturing.
Definition: NvSIPLPipelineMgr.hpp:110
nvsipl::NV_PLUGIN
@ NV_PLUGIN
NVIDIA plug-in.
Definition: NvSIPLPipelineMgr.hpp:50
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SERIALIZER_FAILURE
@ NOTIF_ERROR_SERIALIZER_FAILURE
Device block event, indicates a serializer failure.
Definition: NvSIPLPipelineMgr.hpp:164
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ACP_PROCESSING_FAILURE
@ NOTIF_ERROR_ACP_PROCESSING_FAILURE
Pipeline event, indicates auto control processing failure.
Definition: NvSIPLPipelineMgr.hpp:140
nvsipl::NvSIPLImageGroupWriter
Describes the interfaces of SIPL pipeline feeder.
Definition: NvSIPLPipelineMgr.hpp:219
nvsipl::INvSIPLNotificationQueue::~INvSIPLNotificationQueue
virtual ~INvSIPLNotificationQueue()=default
NvMediaSurfaceType_Unsupported
#define NvMediaSurfaceType_Unsupported
Unsupported types.
Definition: nvmedia_surface.h:553
nvsipl::INvSIPLFrameCompletionQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::NvSIPLDownscaleCropCfg::ispInputCrop
NvMediaRect ispInputCrop
ISP input crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:268
nvsipl::INvSIPLFrameCompletionQueue
The interface to the frame completion queue.
Definition: NvSIPLPipelineMgr.hpp:322
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleWidth
uint32_t isp0DownscaleWidth
ISP0 downscale width.
Definition: NvSIPLPipelineMgr.hpp:283
nvsipl::NvSIPLDownscaleCropCfg::isp0OutputCropEnable
bool isp0OutputCropEnable
Indicates if ISP0 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:271
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_CDI_PROCESSING_DONE
@ NOTIF_INFO_CDI_PROCESSING_DONE
Pipeline event, indicates CDI processing is finished.
Definition: NvSIPLPipelineMgr.hpp:92
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleEnable
bool isp1DownscaleEnable
Indicates if ISP1 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:288
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::NvSIPLDownscaleCropCfg::isp0OutputCrop
NvMediaRect isp0OutputCrop
ISP0 output crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:273
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_PROCESSING_DONE
@ NOTIF_INFO_ICP_PROCESSING_DONE
Pipeline event, indicates ICP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:74
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSIPLPipelineMgr.hpp:49
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTERNAL_FAILURE
@ NOTIF_ERROR_INTERNAL_FAILURE
Pipeline and device block event, indicates an unexpected internal failure.
Definition: NvSIPLPipelineMgr.hpp:177
nvsipl::NvSIPLPipelineNotifier::NotificationData::gpioIdxs
std::set< uint32_t > gpioIdxs
Holds the GPIO indices.
Definition: NvSIPLPipelineMgr.hpp:195
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ACP_PROCESSING_DONE
@ NOTIF_INFO_ACP_PROCESSING_DONE
Pipeline event, indicates auto control processing is finished.
Definition: NvSIPLPipelineMgr.hpp:86
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::INvSIPLFrameCompletionQueue::INvSIPLFrameCompletionQueue
INvSIPLFrameCompletionQueue()=default
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleHeight
uint32_t isp0DownscaleHeight
ISP0 downscale height.
Definition: NvSIPLPipelineMgr.hpp:285
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCrop
NvMediaRect isp1OutputCrop
ISP1 output crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:278
nvsipl::NvSIPLPipelineNotifier::NotificationType
NotificationType
Defines the events of the image processing pipeline and the device block.
Definition: NvSIPLPipelineMgr.hpp:68
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleWidth
uint32_t isp1DownscaleWidth
ISP1 downscale width.
Definition: NvSIPLPipelineMgr.hpp:290
nvsipl::NvSIPLPipelineConfiguration::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:311
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:128
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:440
nvsipl::MAX_NUM_PLUGINS
@ MAX_NUM_PLUGINS
Maximum number of plug-ins supported.
Definition: NvSIPLPipelineMgr.hpp:52
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ISP_PROCESSING_DONE
@ NOTIF_INFO_ISP_PROCESSING_DONE
Pipeline event, indicates ISP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:80