15 #ifndef _NVMEDIA_ICP_H
16 #define _NVMEDIA_ICP_H
42 #define NVMEDIA_ICP_VERSION_MAJOR 4
44 #define NVMEDIA_ICP_VERSION_MINOR 8
50 #define NVMEDIA_IMAGE_CAPTURE_TIMEOUT_INFINITE 0xFFFFFFFF
53 #define NVMEDIA_ICP_MAX_VIRTUAL_GROUPS 4u
56 #define NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS 3u
62 #define NVMEDIA_ICP_HANDLER(icpEx, groupIdx) (icpEx->icp[groupIdx].hIcp)
70 #define NVMEDIA_ICP_SETTINGS_HANDLER(icpSettingsEx, groupIdx, vcIdx) \
71 (&icpSettingsEx.virtualGroups[groupIdx].virtualChannels[vcIdx].icpSettings)
81 #define NVMEDIA_ICP_ERROR(_type_, _error_, _value_, _desc_) \
82 NVMEDIA_ICP_##_type_##_ERROR_##_error_ = _value_,
304 NVMEDIA_ICP_ERROR(CAPTURE, NONE, 0x0000,
"Either no error occurred or error could not be translated")
307 NVMEDIA_ICP_ERROR(CSI, FS_FAULT, 0x0001,
"A frame start occurred before previous frame end")
308 NVMEDIA_ICP_ERROR(CSI, FE_CSI_FAULT, 0x0002,
"A NVCSI fault received at frame end")
309 NVMEDIA_ICP_ERROR(CSI, FE_FRAMEID_FAULT, 0x0003,
"Frame ID for FE packet does not match that of FS packet")
310 NVMEDIA_ICP_ERROR(CSI, FE_FORCED_FAULT, 0x0004,
"A frame end was injected by the CSI hardware")
311 NVMEDIA_ICP_ERROR(CSI, PXL_ENABLE_FAULT , 0x0005,
"An illegal pixel encoding has been detected")
314 NVMEDIA_ICP_ERROR(VI, SHORT_FRAME, 0x0010,
"FE packet arrived before the normal number of pixels has appeared ")
315 NVMEDIA_ICP_ERROR(VI, FAULT_FE, 0x0011,
"Data specific fault occurred on a channel")
318 NVMEDIA_ICP_ERROR(VI, PXL_MISSING_LE, 0x0100,
"Two LS packets were detected without a LE packet between them")
319 NVMEDIA_ICP_ERROR(VI, PXL_RUNAWAY, 0x0101,
"More lines were received than expected")
320 NVMEDIA_ICP_ERROR(VI, PXL_SPURIOUS, 0x0102,
"A pixel data packet was received without a LS packet first")
321 NVMEDIA_ICP_ERROR(VI, PXL_LONG_LINE, 0x0103,
"More pixels were received than expected in a line")
322 NVMEDIA_ICP_ERROR(VI, PXL_SHORT_LINE, 0x0104,
"Fewer pixels were received than expected in a line")
323 NVMEDIA_ICP_ERROR(VI, EMB_MISSING_LE, 0x0105,
"Two LS packets were detected without a LE packet between them in emb data")
324 NVMEDIA_ICP_ERROR(VI, EMB_RUNAWAY, 0x0106,
"More lines were received than expected in emb data")
325 NVMEDIA_ICP_ERROR(VI, EMB_SPURIOUS, 0x0107,
"A pixel data packet was received without a LS packet first in emb data")
326 NVMEDIA_ICP_ERROR(VI, EMB_LONG_LINE, 0x0108,
"More pixels were received than expected in a line in emb data")
327 NVMEDIA_ICP_ERROR(VI, EMB_INFRINGE, 0x0109,
"Embedded data was received on a frame where no embedded data was expected")
328 NVMEDIA_ICP_ERROR(VI, DTYPE_MISMATCH, 0x010A,
"The pixel datatype changed in the middle of the line")
405 uint32_t millisecondTimeout
424 unsigned int millisecondTimeout
489 uint32_t millisecondTimeout,
513 uint32_t millisecondTimeout,
Input format type: RAW 10.
NvMediaICPInterfaceType
Determines the image capture interface type for CSI interface.
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
NvMediaStatus NvMediaICPFeedImageGroup(NvMediaICP *icp, NvMediaImageGroup *imageGrp, unsigned int millisecondTimeout)
Adds an image group to the image capture pool.
NvMediaStatus NvMediaICPFeedFrame(NvMediaICP *icp, NvMediaImage *image, uint32_t millisecondTimeout)
Adds an image to the image capture pool.
Input format type : User defined 6 (0x35)
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Input format type : User defined 4 (0x33)
Input format type : User defined 3 (0x32)
NvMediaStatus NvMediaICPGetImageGroup(NvMediaICP *icp, uint32_t millisecondTimeout, NvMediaImageGroup **imageGrp)
Gets a captured image group with frame status.
Input format type : User defined 5 (0x34)
Input format type: RAW 6.
Interface: CSI, port: AB.
#define NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS
Defines the maximum number of virtual channels per virtual group.
NvMediaStatus NvMediaICPWaitForSoF(NvMediaICP *icp)
Waits for next SoF(Start of Frame).
Interface: CSI, port: CD.
Input format type : User defined 7 (0x36)
Input format type : YUV 4:2:2 8bits.
Interface: CSI, port: EF.
#define NVMEDIA_ICP_MAX_VIRTUAL_GROUPS
Defines the maximum number of virtual groups.
NvMediaStatus NvMediaICPResume(NvMediaICP *icp)
Resumes the image capture.
NvMediaICPEx * NvMediaICPCreateEx(NvMediaICPSettingsEx *settings)
Creates an image capture object used to capture various formats of input into an NvMediaImage.
NvMediaStatus NvMediaICPReleaseImageGroup(NvMediaICP *icp, NvMediaImageGroup **imageGrp)
Gets an image group from the internal pool that the client previously supplied with NvMediaICPFeedIma...
NvMediaStatus
The set of all possible error codes.
Input format type : YUV 4:2:2 10bits.
NvMediaStatus NvMediaICPGetErrorInfo(NvMediaICP *icp, NvMediaICPErrorInfo *icpErrorInfo)
Gets the capture error information.
Input format type : User defined 8 (0x37)
Input format type: RAW 8.
NvMediaICPInputFormatType
Determines the image capture input format type.
Interface: CSI, port: GH.
NvMediaStatus NvMediaICPStop(NvMediaICP *icp)
Stops the image capture.
Input format type : RGBA.
void NvMediaICP
Image capture object per virtual group.
Input format type: RAW 14.
NvMediaICPErrorStatus
Defines codes that describe error status.
Input format type: RAW 20.
Input format type : YUV 4:4:4.
NvMediaICPCsiPhyMode
Specifies CSI phy mode.
NvMediaBitsPerPixel
Bits per pixel.
NvMediaStatus NvMediaICPGetFrameEx(NvMediaICP *icp, uint32_t millisecondTimeout, NvMediaImage **image)
Gets a captured frame with frame status.
Input format type : User defined 1 (0x30)
Input format type : User defined 2 (0x31)
NvMediaStatus NvMediaICPReleaseFrame(NvMediaICP *icp, NvMediaImage **image)
Gets a frame from the internal pool that the client previously supplied with NvMediaICPFeedFrame().
Input format type: RAW 7.
NvMediaStatus NvMediaICPGetVersion(NvMediaVersion *version)
Checks the version compatibility for the NvMedia ICP library.
Input format type: RAW 16.
#define NVMEDIA_ICP_ERROR(_type_, _error_, _value_, _desc_)
Defines a macro that creates an enumerator in enum NvMediaICPErrorStatus.
void NvMediaICPDestroyEx(NvMediaICPEx *icpEx)
Destroys the image capture object created by NvMediaICPCreateEx.
Input format type: RAW 12.