mipicsiss
Vitis Drivers API Documentation
pipeline_program.c File Reference

Overview

This file contains the video pipe line configuration, Sensor configuration and its programming as per the resolution selected by user.

Please see pipeline_program.h for more details.

MODIFICATION HISTORY:
Ver   Who    Date     Changes


1.00 pg 12/07/17 Initial release.

Functions

int SensorWriteData (u16 ByteCount)
 This function writes a buffer of data to the IIC serial sensor. More...
 
int SensorReadData (u8 *BufferPtr, u16 ByteCount)
 This function reads data from the IIC serial Camera Sensor into a specified buffer. More...
 
int SetupCameraSensor (void)
 This function setup Camera sensor programming wrt resolution selected. More...
 
int InitIIC (void)
 This function initializes IIC controller and gets config parameters. More...
 
void SetupIICIntrHandlers (void)
 This function sets send, receive and error handlers for IIC interrupts. More...
 
void ConfigCSC (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void ConfigGammaLut (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void ConfigDemosaic (u32 width, u32 height)
 This function programs colour space converter with the given width and height. More...
 
void FrmbufwrDoneCallback (void *CallbackRef)
 This function is called when a Frame Buffer Write Done has occurred. More...
 
void FrmbufrdDoneCallback (void *CallbackRef)
 This function is called when a Frame Buffer Read Done has occurred. More...
 
void DisableImageProcessingPipe (void)
 This function disables Demosaic, GammaLut and VProcSS IPs. More...
 
int config_csi_cap_path ()
 Main function to initialize the video pipleline and process user input. More...
 
void InitImageProcessingPipe (void)
 This function Initializes Image Processing blocks wrt to selected resolution. More...
 
void EnableCSI (void)
 This function enables MIPI CSI IP. More...
 
void DisableCSI (void)
 This function disables MIPI CSI IP. More...
 
int StartSensor (void)
 This function starts camera sensor to transmit captured video. More...
 
void InitVprocSs_Scaler (int count)
 This function initializes and configures VProcSS IP for scalar mode with the given input and output width and height values. More...
 
void ResetVprocSs_Scaler (void)
 This function resets VProcSS_scalar IP. More...
 
void EnableDSI (void)
 This function enables MIPI DSI SS. More...
 
void DisableDSI (void)
 This function disables MIPI DSI SS. More...
 
void InitDSI (void)
 This function programs MIPI DSI SS with the required timing paramters. More...
 
u32 SetupDSI (void)
 This function initializes MIPI DSI SS and gets config parameters. More...
 
void SelectDSIOutput (void)
 This function programs GPIO to 1 to select MIPI DSI SS Stream Path in AXI- Stream switch. More...
 
void SelectHDMIOutput (void)
 This function programs GPIO to '0' to select HDMI Stream path in AXI-Stream switch. More...
 
void DisableScaler (void)
 This function stops VProc_SS scalar IP. More...
 
u32 InitStreamMuxGpio (void)
 This function initializes GPIO IP for Stream Switch selection and gets config parameters. More...
 
u32 InitializeCsiRxSs (void)
 This function initializes MIPI CSI2 RX SS and gets config parameters. More...
 
XVidC_ColorDepth GetColorDepth (u32 CsiDataFormat)
 This function returns selected colour depth of MIPI CSI2 RX SS. More...
 
void SetColorDepth (void)
 This function sets colour depth value getting from MIPI CSI2 RX SS. More...
 
void PrintPipeConfig (void)
 This function prints the video pipeline information. More...
 

Function Documentation

int config_csi_cap_path ( )

Main function to initialize the video pipleline and process user input.

Returns
XST_SUCCESS if MIPI example was successful else XST_FAILURE
Note
None.

Referenced by main().

void ConfigCSC ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void ConfigDemosaic ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void ConfigGammaLut ( u32  width,
u32  height 
)

This function programs colour space converter with the given width and height.

Parameters
widthis Hsize of a packet in pixels.
heightis number of lines of a packet.
Returns
None.
Note
None.

Referenced by InitImageProcessingPipe().

void DisableCSI ( void  )

This function disables MIPI CSI IP.

Returns
None.
Note
None.

References XCsiSs_Reset().

void DisableDSI ( void  )

This function disables MIPI DSI SS.

Returns
None.
Note
None.
void DisableImageProcessingPipe ( void  )

This function disables Demosaic, GammaLut and VProcSS IPs.

Returns
None.
Note
None.
void DisableScaler ( void  )

This function stops VProc_SS scalar IP.

Returns
None.
Note
None.
void EnableCSI ( void  )

This function enables MIPI CSI IP.

Returns
None.
Note
None.

References XCsiSs_Activate(), XCsiSs_Configure(), and XCsiSs_Reset().

void EnableDSI ( void  )

This function enables MIPI DSI SS.

Returns
None.
Note
None.

Referenced by main().

void FrmbufrdDoneCallback ( void *  CallbackRef)

This function is called when a Frame Buffer Read Done has occurred.

Parameters
CallbackRefis a callback function reference.
Returns
None.
Note
None.

Referenced by config_csi_cap_path().

void FrmbufwrDoneCallback ( void *  CallbackRef)

This function is called when a Frame Buffer Write Done has occurred.

Parameters
CallbackRefis a callback function reference.
Returns
None.
Note
None.

Referenced by config_csi_cap_path().

XVidC_ColorDepth GetColorDepth ( u32  CsiDataFormat)

This function returns selected colour depth of MIPI CSI2 RX SS.

Parameters
CsiDataFormatis video data format
Returns
ColorDepth returns colour depth value.
Note
None.

Referenced by SetColorDepth().

void InitDSI ( void  )

This function programs MIPI DSI SS with the required timing paramters.

Returns
None.
Note
None.
u32 InitializeCsiRxSs ( void  )

This function initializes MIPI CSI2 RX SS and gets config parameters.

This function programs MIPI CSI SS with the required timing paramters.

Returns
XST_SUCCESS if successful or else XST_FAILURE.
Note
None.

References XCsiSs_Config::BaseAddr, XCsiSs_CfgInitialize(), and XCsiSs_LookupConfig().

int InitIIC ( void  )

This function initializes IIC controller and gets config parameters.

This function writes, reads, and verifies the data to the IIC EEPROM.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.
void InitImageProcessingPipe ( void  )

This function Initializes Image Processing blocks wrt to selected resolution.

Returns
None.
Note
None.

References ConfigCSC(), ConfigDemosaic(), and ConfigGammaLut().

Referenced by main().

u32 InitStreamMuxGpio ( void  )

This function initializes GPIO IP for Stream Switch selection and gets config parameters.

Returns
XST_SUCCESS if successful or else XST_FAILURE.
Note
None.

Referenced by main().

void InitVprocSs_Scaler ( int  count)

This function initializes and configures VProcSS IP for scalar mode with the given input and output width and height values.

Parameters
countis a flag value to initialize IP only once.
Returns
None.
Note
None.
void PrintPipeConfig ( void  )

This function prints the video pipeline information.

Returns
None.
Note
None.

Referenced by main().

void ResetVprocSs_Scaler ( void  )

This function resets VProcSS_scalar IP.

Returns
None.
Note
None.
void SelectDSIOutput ( void  )

This function programs GPIO to 1 to select MIPI DSI SS Stream Path in AXI- Stream switch.

Returns
None.
Note
None.

Referenced by main().

void SelectHDMIOutput ( void  )

This function programs GPIO to '0' to select HDMI Stream path in AXI-Stream switch.

Returns
None.
Note
None.

Referenced by main().

int SensorReadData ( u8 *  BufferPtr,
u16  ByteCount 
)

This function reads data from the IIC serial Camera Sensor into a specified buffer.

Parameters
BufferPtrcontains the address of the data buffer to be filled.
ByteCountcontains the number of bytes in the buffer to be read.
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References SensorWriteData().

Referenced by SetupCameraSensor().

int SensorWriteData ( u16  ByteCount)

This function writes a buffer of data to the IIC serial sensor.

Parameters
ByteCountis the number of bytes in the buffer to be written.
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

Referenced by SensorReadData(), SetupCameraSensor(), and StartSensor().

void SetColorDepth ( void  )

This function sets colour depth value getting from MIPI CSI2 RX SS.

Returns
None.
Note
None.

Referenced by main().

int SetupCameraSensor ( void  )

This function setup Camera sensor programming wrt resolution selected.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

Referenced by main().

u32 SetupDSI ( void  )

This function initializes MIPI DSI SS and gets config parameters.

This function programs MIPI DSI SS with the required timing paramters.

Returns
None.
Note
None.
void SetupIICIntrHandlers ( void  )

This function sets send, receive and error handlers for IIC interrupts.

Returns
None.
Note
None.

References ReceiveHandler(), SendHandler(), and StatusHandler().

int StartSensor ( void  )

This function starts camera sensor to transmit captured video.

Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

Referenced by main().