NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
NvSIPLPipelineMgr.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2021, 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 
32 namespace nvsipl
33 {
34 
48 enum PluginType {
49  NV_PLUGIN = 0,
52 };
53 
64 {
66  static const uint32_t MAX_DEVICE_GPIOS = 8U;
67 
68 public:
71  {
77 
83 
89 
97 
103 
109 
115 
121 
127 
133 
139 
145 
151 
157 
163 
169 
175 
182  };
183 
189  {
193  uint32_t uIndex;
195  uint8_t uLinkMask;
197  uint64_t frameCaptureTSC;
199  uint32_t gpioIdxs[MAX_DEVICE_GPIOS];
201  uint32_t numGpioIdxs;
202  };
203 
205  virtual ~NvSIPLPipelineNotifier(void) = default;
206 };
207 
208 #if !NV_IS_SAFETY
209 
226 {
227 public:
229  struct RawBuffer
230  {
234  uint32_t uIndex;
237  };
238 
250  virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer) = 0;
251 
253  virtual ~NvSIPLImageGroupWriter(void) = default;
254 };
255 #endif // !NV_IS_SAFETY
256 
263 
265  std::vector<NvMediaSurfAllocAttr> surfaceAllocAttr;
266 };
267 
270 {
272  bool ispInputCropEnable {false};
275 
277  bool isp0OutputCropEnable {false};
280 
282  bool isp1OutputCropEnable {false};
285 
287  bool isp0DownscaleEnable {false};
292 
294  bool isp1DownscaleEnable {false};
299 };
300 
306 {
309 
311  bool isp0OutputRequested {false};
312 
314  bool isp1OutputRequested {false};
315 
318 
319 #if !NV_IS_SAFETY
320 
322 #endif // !NV_IS_SAFETY
323 };
324 
329 {
330 public:
331 
351  size_t const timeoutUsec) = 0;
352 
358  virtual size_t GetCount() const = 0;
359 
360 protected:
361 
362  INvSIPLFrameCompletionQueue() = default;
363  virtual ~INvSIPLFrameCompletionQueue() = default;
364 
365 private:
366 
368  INvSIPLFrameCompletionQueue& operator=(INvSIPLFrameCompletionQueue const& rhs) = delete;
369 };
370 
375 {
376 public:
377 
394  size_t const timeoutUsec) = 0;
395 
401  virtual size_t GetCount() const = 0;
402 
403 protected:
404 
405  INvSIPLNotificationQueue() = default;
406  virtual ~INvSIPLNotificationQueue() = default;
407 
408 private:
409 
410  INvSIPLNotificationQueue(INvSIPLNotificationQueue const& other) = delete;
411  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue const& rhs) = delete;
412 };
413 
420 {
426 
432 
438 
441 };
442 
447 {
450 };
451 
454 } // namespace nvsipl
455 
456 
457 #endif // NVSIPLPIPELINEMGR_HPP
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SENSOR_FAILURE
@ NOTIF_ERROR_SENSOR_FAILURE
Device block event, indicates a sensor failure.
Definition: NvSIPLPipelineMgr.hpp:174
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:108
nvsipl::NvSIPLPipelineQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue
The queue for event notifications.
Definition: NvSIPLPipelineMgr.hpp:440
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:42
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureTSC
uint64_t frameCaptureTSC
Holds the TSC timestamp of the frame capture.
Definition: NvSIPLPipelineMgr.hpp:197
nvsipl::NvSIPLPipelineQueues::isp1CompletionQueue
INvSIPLFrameCompletionQueue * isp1CompletionQueue
The queue for completed frames from the second ISP output.
Definition: NvSIPLPipelineMgr.hpp:437
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
nvsipl::NvSIPLDownscaleCropCfg
Downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:269
nvsipl::INvSIPLNotificationQueue
The interface to the notification queue.
Definition: NvSIPLPipelineMgr.hpp:374
nvsipl::NvSIPLPipelineQueues::captureCompletionQueue
INvSIPLFrameCompletionQueue * captureCompletionQueue
The queue for completed capture frames.
Definition: NvSIPLPipelineMgr.hpp:425
nvsipl::NvSIPLImageGroupWriter::RawBuffer::imageGroup
NvMediaImageGroup * imageGroup
Holds a pointer to NvMediaImageGroup.
Definition: NvSIPLPipelineMgr.hpp:232
nvsipl::NvSIPLPipelineQueues::isp0CompletionQueue
INvSIPLFrameCompletionQueue * isp0CompletionQueue
The queue for completed frames from the first ISP output.
Definition: NvSIPLPipelineMgr.hpp:431
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:236
nvsipl::NvSIPLPipelineNotifier::NotificationData::uLinkMask
uint8_t uLinkMask
Holds the device block link mask.
Definition: NvSIPLPipelineMgr.hpp:195
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:156
nvsipl::NvSIPLPipelineNotifier::NotificationData::eNotifType
NotificationType eNotifType
Holds the NotificationType event type.
Definition: NvSIPLPipelineMgr.hpp:191
nvsipl::NvSIPLPipelineNotifier::NotificationData::gpioIdxs
uint32_t gpioIdxs[MAX_DEVICE_GPIOS]
Holds the GPIO indices.
Definition: NvSIPLPipelineMgr.hpp:199
nvsipl::CUSTOM_PLUGIN0
@ CUSTOM_PLUGIN0
Custom plug-in 0.
Definition: NvSIPLPipelineMgr.hpp:50
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:120
nvsipl::INvSIPLNotificationQueue::INvSIPLNotificationQueue
INvSIPLNotificationQueue()=default
nvsipl::NvSIPLImageAttr::surfaceAllocAttr
std::vector< NvMediaSurfAllocAttr > surfaceAllocAttr
Holds a vector of NvMediaSurfAllocAttr objects.
Definition: NvSIPLPipelineMgr.hpp:265
nvsipl::NvSIPLPipelineNotifier::NotificationData
Defines the notification data.
Definition: NvSIPLPipelineMgr.hpp:188
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE
Pipeline event, indicates ISP processing failure.
Definition: NvSIPLPipelineMgr.hpp:138
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCropEnable
bool isp1OutputCropEnable
Indicates if ISP1 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:282
nvsipl::NvSIPLPipelineNotifier::NotificationData::uIndex
uint32_t uIndex
Holds the ID of the pipeline.
Definition: NvSIPLPipelineMgr.hpp:193
nvsipl::INvSIPLClient::INvSIPLBuffer
Describes the interfaces of SIPL buffer.
Definition: NvSIPLClient.hpp:112
nvsipl::NvSIPLImageAttr::surfaceType
NvMediaSurfaceType surfaceType
Holds the surface type of the image.
Definition: NvSIPLPipelineMgr.hpp:262
nvsipl::NvSIPLPipelineConfiguration::captureOutputRequested
bool captureOutputRequested
true if the client wants capture output frames to be delivered
Definition: NvSIPLPipelineMgr.hpp:308
nvsipl::NvSIPLPipelineNotifier
Describes the interfaces of the SIPL pipeline notification handler.
Definition: NvSIPLPipelineMgr.hpp:63
nvsipl::NvSIPLImageGroupWriter::RawBuffer
Describes an unprocessed sensor output buffer.
Definition: NvSIPLPipelineMgr.hpp:229
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESERIALIZER_FAILURE
@ NOTIF_ERROR_DESERIALIZER_FAILURE
Device block event, indicates a deserializer failure.
Definition: NvSIPLPipelineMgr.hpp:162
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleEnable
bool isp0DownscaleEnable
Indicates if ISP0 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:287
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:102
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleHeight
uint32_t isp1DownscaleHeight
ISP1 downscale height.
Definition: NvSIPLPipelineMgr.hpp:298
nvsipl::NvSIPLDownscaleCropCfg::ispInputCropEnable
bool ispInputCropEnable
Indicates if ISP input crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:272
nvsipl::NvSIPLPipelineQueues
This is the output structure for SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:419
nvsipl::NvSIPLImageGroupWriter::RawBuffer::uIndex
uint32_t uIndex
Holds the ID of the sensor in PlatformCfg.
Definition: NvSIPLPipelineMgr.hpp:234
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:150
nvsipl::NvSIPLPipelineConfiguration::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:321
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_CAPTURE_FAILURE
@ NOTIF_ERROR_ICP_CAPTURE_FAILURE
Pipeline event, indicates ICP capture failure.
Definition: NvSIPLPipelineMgr.hpp:126
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:305
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:260
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:449
nvsipl::NvSIPLPipelineConfiguration::isp1OutputRequested
bool isp1OutputRequested
true if the client wants frames to be delivered from the second ISP output
Definition: NvSIPLPipelineMgr.hpp:314
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:311
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_CAPTURE_TIMEOUT
@ NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Pipeline event, indicates occurrence of timeout while capturing.
Definition: NvSIPLPipelineMgr.hpp:114
nvsipl::NV_PLUGIN
@ NV_PLUGIN
NVIDIA plug-in.
Definition: NvSIPLPipelineMgr.hpp:49
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_SERIALIZER_FAILURE
@ NOTIF_ERROR_SERIALIZER_FAILURE
Device block event, indicates a serializer failure.
Definition: NvSIPLPipelineMgr.hpp:168
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ACP_PROCESSING_FAILURE
@ NOTIF_ERROR_ACP_PROCESSING_FAILURE
Pipeline event, indicates auto control processing failure.
Definition: NvSIPLPipelineMgr.hpp:144
nvsipl::NvSIPLImageGroupWriter
Describes the interfaces of SIPL pipeline feeder.
Definition: NvSIPLPipelineMgr.hpp:225
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:274
nvsipl::INvSIPLFrameCompletionQueue
The interface to the frame completion queue.
Definition: NvSIPLPipelineMgr.hpp:328
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleWidth
uint32_t isp0DownscaleWidth
ISP0 downscale width.
Definition: NvSIPLPipelineMgr.hpp:289
nvsipl::NvSIPLDownscaleCropCfg::isp0OutputCropEnable
bool isp0OutputCropEnable
Indicates if ISP0 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:277
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_CDI_PROCESSING_DONE
@ NOTIF_INFO_CDI_PROCESSING_DONE
Pipeline event, indicates CDI processing is finished.
Definition: NvSIPLPipelineMgr.hpp:96
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleEnable
bool isp1DownscaleEnable
Indicates if ISP1 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:294
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:279
nvsipl::NvSIPLPipelineNotifier::NotificationData::numGpioIdxs
uint32_t numGpioIdxs
Holds the number of GPIO indices in the array.
Definition: NvSIPLPipelineMgr.hpp:201
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_PROCESSING_DONE
@ NOTIF_INFO_ICP_PROCESSING_DONE
Pipeline event, indicates ICP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:76
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSIPLPipelineMgr.hpp:48
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTERNAL_FAILURE
@ NOTIF_ERROR_INTERNAL_FAILURE
Pipeline and device block event, indicates an unexpected internal failure.
Definition: NvSIPLPipelineMgr.hpp:181
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ACP_PROCESSING_DONE
@ NOTIF_INFO_ACP_PROCESSING_DONE
Pipeline event, indicates auto control processing is finished.
Definition: NvSIPLPipelineMgr.hpp:88
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:291
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCrop
NvMediaRect isp1OutputCrop
ISP1 output crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:284
nvsipl::NvSIPLPipelineNotifier::NotificationType
NotificationType
Defines the events of the image processing pipeline and the device block.
Definition: NvSIPLPipelineMgr.hpp:70
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleWidth
uint32_t isp1DownscaleWidth
ISP1 downscale width.
Definition: NvSIPLPipelineMgr.hpp:296
nvsipl::NvSIPLPipelineConfiguration::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:317
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:132
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:446
nvsipl::MAX_NUM_PLUGINS
@ MAX_NUM_PLUGINS
Maximum number of plug-ins supported.
Definition: NvSIPLPipelineMgr.hpp:51
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ISP_PROCESSING_DONE
@ NOTIF_INFO_ISP_PROCESSING_DONE
Pipeline event, indicates ISP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:82