NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

An ISC device represents a device that is attached or linked to the root I2C port.

Data Structures

struct  NvMediaISCAdvancedConfig
 Holds a pointer to a description of the target I2C device. More...
 
struct  NvMediaISCModuleConfig
 Holds the ISC Module ISP configuration. More...
 
struct  NvMediaISCAttrRange
 Holds the range of a sensor attribute. More...
 
struct  NvMediaISCSensorAttributes
 Holds the sensor attributes. More...
 
struct  NvMediaISCExposure
 Holds sensor exposure information. More...
 
struct  NvMediaISCWhiteBalance
 Holds the sensor white balance gain structure. More...
 
struct  NvMediaISCFrameReport
 Holds the sensor report frame report structure. More...
 
struct  NvMediaISCPWL
 Holds the sensor companding piecewise linear (PWL) structure. More...
 
struct  NvMediaISCTemperature
 Holds the sensor temperature structure. More...
 
struct  NvMediaISCCRC
 Holds the sensor CRC structure. More...
 
struct  NvMediaISCFrameSeqNum
 Holds the sensor frame sequence number structure. More...
 
struct  NvMediaISCSensorControl
 Holds the sensor control structure. More...
 
struct  NvMediaISCEmbeddedDataInfo
 Holds the sensor embedded data parsed info structure. More...
 
struct  NvMediaISCEmbeddedDataChunk
 
struct  NvMediaISCExposureControl
 Holds exposure control information. More...
 
struct  NvMediaISCWBGainControl
 Holds the white balance control structure. More...
 
struct  NvMediaISCEmbeddedDataBuffer
 Holds the embedded data buffer structure. More...
 
struct  NvMediaISCEmbeddedData
 Holds the embedded data structure. More...
 

Typedefs

typedef struct
NvMediaISCModuleConfig 
NvMediaISCModuleConfig
 Holds the ISC Module ISP configuration. More...
 
typedef struct NvMediaISCAttrRange NvMediaISCAttrRange
 Holds the range of a sensor attribute. More...
 
typedef struct
NvMediaISCSensorAttributes 
NvMediaISCSensorAttributes
 Holds the sensor attributes. More...
 
typedef struct NvMediaISCExposure NvMediaISCExposure
 Holds sensor exposure information. More...
 
typedef struct
NvMediaISCWhiteBalance 
NvMediaISCWhiteBalance
 Holds the sensor white balance gain structure. More...
 
typedef struct
NvMediaISCFrameReport 
NvMediaISCFrameReport
 Holds the sensor report frame report structure. More...
 
typedef struct NvMediaISCPWL NvMediaISCPWL
 Holds the sensor companding piecewise linear (PWL) structure. More...
 
typedef struct
NvMediaISCTemperature 
NvMediaISCTemperature
 Holds the sensor temperature structure. More...
 
typedef struct NvMediaISCCRC NvMediaISCCRC
 Holds the sensor CRC structure. More...
 
typedef struct
NvMediaISCFrameSeqNum 
NvMediaISCFrameSeqNum
 Holds the sensor frame sequence number structure. More...
 
typedef struct
NvMediaISCSensorControl 
NvMediaISCSensorControl
 Holds the sensor control structure. More...
 
typedef struct
NvMediaISCEmbeddedDataInfo 
NvMediaISCEmbeddedDataInfo
 Holds the sensor embedded data parsed info structure. More...
 
typedef struct
NvMediaISCEmbeddedDataChunk 
NvMediaISCEmbeddedDataChunk
 
typedef struct
NvMediaISCExposureControl 
NvMediaISCExposureControl
 Holds exposure control information. More...
 
typedef struct
NvMediaISCWBGainControl 
NvMediaISCWBGainControl
 Holds the white balance control structure. More...
 
typedef struct
NvMediaISCEmbeddedData 
NvMediaISCEmbeddedData
 Holds the embedded data structure. More...
 

Enumerations

enum  NvMediaISCExposureMode {
  NVMEDIA_ISC_EXPOSURE_MODE_LONG,
  NVMEDIA_ISC_EXPOSURE_MODE_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_MAX
}
 Defines Exposure mode. More...
 
enum  NvMediaISCSensorAttrType {
  NVMEDIA_ISC_SENSOR_ATTR_FUSE_ID,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_FINE,
  NVMEDIA_ISC_SENSOR_ATTR_ET_STEP,
  NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR,
  NVMEDIA_ISC_SENSOR_ATTR_QE_PIXEL_RATIO,
  NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE,
  NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES
}
 Defines ISC sensor attributes. More...
 

Functions

NvMediaISCDeviceNvMediaISCDeviceCreate (NvMediaISCRootDevice *rootDevice, uint32_t *deviceAddressList, uint32_t numDevices, NvMediaISCDeviceDriver *deviceDriver, NvMediaISCAdvancedConfig *advancedConfig)
 Creates an object that describes a device and returns a handle to the object. More...
 
void NvMediaISCDeviceDestroy (NvMediaISCDevice *device)
 Destroys the object that describes an ISC device. More...
 
NvMediaStatus NvMediaISCDeviceRead (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t regLength, uint8_t *regData, uint32_t dataLength, uint8_t *data)
 Performs a read operation over I2C. More...
 
NvMediaStatus NvMediaISCDeviceWrite (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
 Performs a write operation over I2C. More...
 
NvMediaStatus NvMediaISCGetModuleConfig (NvMediaISCDevice *device, NvMediaISCModuleConfig *moduleConfig)
 Gets the module ISP configuration. More...
 
NvMediaStatus NvMediaISCGetSensorAttributes (NvMediaISCDevice *device, NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
 Gets the sensor attributes. More...
 
NvMediaStatus NvMediaISCSetSensorControls (NvMediaISCDevice *device, const NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
 Sets sensor control parameters. More...
 
NvMediaStatus NvMediaISCParseEmbedDataInfo (NvMediaISCDevice *device, const NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t embeddedDataChunkStructSize, NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
 Parses sensor embedded data info and provides sensor image settings information for the captured frame. More...
 
NvMediaStatus NvMediaISCSetSensorCharMode (NvMediaISCDevice *device, uint8_t expNo)
 Set sensor to characterization mode. More...
 

Typedef Documentation

Holds the range of a sensor attribute.

typedef struct NvMediaISCCRC NvMediaISCCRC

Holds the sensor CRC structure.

Holds the embedded data structure.

Deprecated:
Use the new structure NvMediaISCEmbeddedDataInfo instead.

Holds the sensor embedded data parsed info structure.

The sensor driver can selectively activate or deactivate any of the parsed info blocks, depending on whether the sensor supports it.

To activate a sensor info block, the sensor driver must set the info block's valid flag to TRUE and populate the parsed information corresponding to the block. To disable a sensor info block, it must set the valid flag to FALSE.

For example, if a sensor supports only exposure, white balance and CRC info, the sensor driver activates only the sensorExpInfo, sensorWBInfo, and sensorCRCInfo blocks (it sets their valid flags to TRUE) and disables all of the others (it sets their valid flags to FALSE).

Holds sensor exposure information.

Holds exposure control information.

Deprecated:
Use NvMediaISCSensorControl instead.

Holds the sensor report frame report structure.

Holds the sensor frame sequence number structure.

Holds the ISC Module ISP configuration.

typedef struct NvMediaISCPWL NvMediaISCPWL

Holds the sensor companding piecewise linear (PWL) structure.

Holds the sensor attributes.

Holds the sensor control structure.

Note

To activate a sensor control block, set the corresponding valid flag to TRUE and populate the control settings to be set.

To disable a sensor control block, set the corresponding valid flag to FALSE.

For example, to activate the white balance control block, set the wbValid flag in the wbControl structure to TRUE and populate the white balance settings to be programmed. To disable white balance control block, set the wbValid flag to FALSE.

Holds the sensor temperature structure.

Holds the white balance control structure.

Deprecated:
Use NvMediaISCSensorControl instead.

Holds the sensor white balance gain structure.

Enumeration Type Documentation

Defines Exposure mode.

Deprecated:
Use the NvMediaISCSetSensorCharMode() parameter expNo instead.
Enumerator
NVMEDIA_ISC_EXPOSURE_MODE_LONG 

Specifies long exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_SHORT 

Specifies short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT 

Specifies very short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_MAX 

Specifies the exposure mode count.

Definition at line 1575 of file nvmedia_isc.h.

Defines ISC sensor attributes.

Deprecated:
Use the new function NvMediaISCGetSensorAttributes() instead.
Enumerator
NVMEDIA_ISC_SENSOR_ATTR_FUSE_ID 

Specifies a unique ID per instance of camera module.

Data type: char[32]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN 

Specifies minimum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX 

Specifies maximum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MIN 

Specifies minimum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MAX 

Specifies maximum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_FINE 

Specifies fine integration time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_STEP 

Specifies exposure time step values in seconds.

Data type: double[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX 

Specifies maximum possible HDR ratio value.

Data type: uint32_t

NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR 

Specifies gain factor between the exposures.

If non zero, possible factors are 1, x, 1/x.

Data type: float_t

NVMEDIA_ISC_SENSOR_ATTR_QE_PIXEL_RATIO 

Specifies sensitivity ratios for different exposures.

The ratios are normalized to the maximum sensitivity, so that all ratios are in the range [0.0, 1.0].

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE 

Specifies frames per second.

Data type: float_t

NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES 

Specifies active number of exposures.

Data type: uint32_t

Definition at line 1653 of file nvmedia_isc.h.

Function Documentation

NvMediaISCDevice* NvMediaISCDeviceCreate ( NvMediaISCRootDevice rootDevice,
uint32_t *  deviceAddressList,
uint32_t  numDevices,
NvMediaISCDeviceDriver deviceDriver,
NvMediaISCAdvancedConfig advancedConfig 
)

Creates an object that describes a device and returns a handle to the object.

Parameters
[in]rootDeviceA pointer to the root device created with NvMediaISCRootDeviceCreate().
[in]deviceAddressListA pointer to a list of I2C device addresses corresponding to this NvMediaISCDevice object.
[in]numDevicesNumber of I2C addresses in deviceAddressList.
[in]deviceDriverA pointer to a structure that defines the behavior of the device.
[in]advancedConfigA pointer to a structure that defines advanced configuration information about the device.
Returns
device The new device's handle if successful, or NULL otherwise.
void NvMediaISCDeviceDestroy ( NvMediaISCDevice device)

Destroys the object that describes an ISC device.

Parameters
[in]deviceHandle to the device to destroy.
NvMediaStatus NvMediaISCDeviceRead ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  regLength,
uint8_t *  regData,
uint32_t  dataLength,
uint8_t *  data 
)

Performs a read operation over I2C.

For safety use cases, application software must perform a read followed by a read back of the same register locations using NvMediaISCDeviceRead() and verify that the two values match.

Parameters
[in]deviceA pointer to the device to use.
[in]deviceIndexIndex of the subdevice to use
[in]regLengthLength of the register address, in bytes.
[in]regDataA pointer to the register address.
[in]dataLengthLength of data to be read, in bytes.
[out]dataA pointer to the location for storing the read data.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCDeviceWrite ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  dataLength,
const uint8_t *  data 
)

Performs a write operation over I2C.

For safety use cases, application software must perform a write using NvMediaISCDeviceWrite() followed by a read back of the same register locations using NvMediaISCDeviceRead() and verify that the write was successful.

Parameters
[in]deviceA pointer to the device to use.
[in]deviceIndexIndex of the subdevice to use.
[in]dataLengthLength of data to be written, in bytes.
[in]dataA pointer to data to be written to device via I2C.
Returns
NvMediaStatus The completion status of the operation.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCGetModuleConfig ( NvMediaISCDevice device,
NvMediaISCModuleConfig moduleConfig 
)

Gets the module ISP configuration.

Parameters
[in]deviceA pointer to the device to use.
[out]moduleConfigA pointer to the module ISP configuration.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCGetSensorAttributes ( NvMediaISCDevice device,
NvMediaISCSensorAttributes sensorAttr,
const size_t  sensorAttrStructSize 
)

Gets the sensor attributes.

Sensor attributes are static properties like sensor name, exposure-gain ranges supported, and number of active exposures.

Parameters
[in]deviceA pointer to the device to use.
[out]sensorAttrA pointer a sensor attributes structure.
[in]sensorAttrStructSizeSize of the sensorAttr structure.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCParseEmbedDataInfo ( NvMediaISCDevice device,
const NvMediaISCEmbeddedDataChunk embeddedTopDataChunk,
const NvMediaISCEmbeddedDataChunk embeddedBotDataChunk,
const size_t  embeddedDataChunkStructSize,
NvMediaISCEmbeddedDataInfo embeddedDataInfo,
const size_t  dataInfoStructSize 
)

Parses sensor embedded data info and provides sensor image settings information for the captured frame.

This function can be used to retrieve sensor image settings like exposure, gain, and white balance information applied to the frame.

Parameters
[in]deviceA pointer to the device to use.
[in]embeddedTopDataChunkA pointer to the top sensor embedded data chunk structure.
[in]embeddedBotDataChunkA pointer to the bottom sensor embedded data chunk structure.
[in]embeddedDataChunkStructSizeSize of the embeddedTopDataChunk and embeddedBottomDataChunk structures, in bytes.
[out]embeddedDataInfoA pointer to the embedded data parsed info structure.
[in]dataInfoStructSizeSize of the embeddedDataInfo structure, in bytes.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL or invalid.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCSetSensorCharMode ( NvMediaISCDevice device,
uint8_t  expNo 
)

Set sensor to characterization mode.

This function configures the sensor for characterization. Sensor characterization provides optimal parameters, corresponding to the sensor's physical and functional characteristics, for image processing.

Sensor characterization for High Dynamic Range (HDR) sensors with multiple exposures (T1, T2,... Tn) requires separately characterizing individual exposures for some sensors. This function can configure the sensor to capture each exposure separately, if required by sensor characterization. It changes sensor static attributes like numActiveExposures, sensorExpRange, and sensorGainRange, and so must be called during sensor initialization.

To characterize sensor exposure number n, where n = {1,2,3, … , N} for an N-exposure HDR sensor, set expNo to n. For a non-HDR sensor, set expNo to 1.

Parameters
[in]deviceA pointer to the sensor control device in use.
[in]expNoSensor exposure number to be used for characterization. Must be in the range [0, (NVMEDIA_ISC_MAX_EXPOSURES - 1)]. For a non-HDR sensor, must be set to 1.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that device was NULL or invalid.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.
NvMediaStatus NvMediaISCSetSensorControls ( NvMediaISCDevice device,
const NvMediaISCSensorControl sensorControl,
const size_t  sensrCtrlStructSize 
)

Sets sensor control parameters.

This function enables you to control sensor image settings like exposure time, sensor gain, and white balance gain. All parameters provided to this function are applied together at a frame boundary through ISC's "group hold" functionality, if supported by the sensor.

Note
This function invokes the device driver function specified by the call to SetSensorControls().
Parameters
[in]deviceA pointer to the sensor control device in use.
[in]sensorControlA pointer to a sensor control structure for device.
[in]sensrCtrlStructSizeSize of the sensorControl structure.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more pointer parameters was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the device driver does not support this functionality.
NVMEDIA_STATUS_ERRORindicates that any other error occurred.