XilinxProcessorIPLib/drivers/dual_splitter/examples/xdualsplitter_example.c
int XDualSplitterExample(u16 DeviceId)
{
	int Status;
	u16 Height;
	u16 Width;
	u8 InputSamples ;
	u8 OutputSamples;
	u8 ImageSegments;
	u8 Overlap = 0;
	XDualSplitter_Config *Config;

	/* Initialize the Dual Splitter driver so that it's ready to use
	 * look up the configuration in the config table, then initialize it.
	 */
	Config = XDualSplitter_LookupConfig(DeviceId);
	if (NULL == Config) {
		return XST_FAILURE;
	}

	Status = XDualSplitter_CfgInitialize(&DualSplitterInst, Config,
						Config->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/* Enable the Dual Splitter core */
	XDualSplitter_Enable(&DualSplitterInst);

	/* Disable the register update, program all other registers and at
	 * the end of programming enable register update.
	 */
	XDualSplitter_RegUpdateDisable(&DualSplitterInst);

	/* Set image size width x height */
	Width = 1920;
	Height = 2160;
	XDualSplitter_SetImageSize(&DualSplitterInst, Height, Width);

	/* UHD2@60:
	 *	MST - 4 Streams: InputSamples per clock = 4
	 *			 OutputSamples per clock = 4
	 *			 Number of segments = 4
	 *	MST - 2 Streams: InputSamples per clock = 4
	 *			 OutPutSamples per clock = 4
	 *			 Number of segments = 2
	 * UHD@60:
	 *	SST :	InputSamples per clock = 4
	 *		OutputSamples per clock = 4
	 *		Number of segments = 1
	 * UHD@30:
	 *	SST :	InputSamples per clock = 2
	 *		OutputSamples per clock = 2
	 *		Number of segments = 1
	 */

	/* UHD2@60 in MST mode with 2 streams */
	InputSamples = 4;
	OutputSamples = 4;
	ImageSegments = 2;
	XDualSplitter_SetImgParam(&DualSplitterInst, InputSamples,
			OutputSamples, ImageSegments, Overlap);

	/* Enable the register update */
	XDualSplitter_RegUpdateEnable(&DualSplitterInst);

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function demonstrates the use of Dual Splitter driver functions.
*
* @param	DeviceId is the unique device ID of the Dual Splitter core.
*
* @return
*		- XST_SUCCESS if Dual Splitter example ran successfully.
*		- XST_FAILURE if Dual Splitter example failed.
*
* @note		None.
*
******************************************************************************/
This function demonstrates the use of Dual Splitter driver functions.
This function demonstrates the use of Dual Splitter driver functions .
int XDualSplitterExample(u16 DeviceId)
{
	int Status;
	u16 Height;
	u16 Width;
	u8 InputSamples ;
	u8 OutputSamples;
	u8 ImageSegments;
	u8 Overlap = 0;
	XDualSplitter_Config *Config;
	Config = XDualSplitter_LookupConfig(DeviceId);
	if (NULL == Config) {
		return XST_FAILURE;
	}
	Status = XDualSplitter_CfgInitialize(&DualSplitterInst, Config,
						Config->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	XDualSplitter_Enable(&DualSplitterInst);
	XDualSplitter_RegUpdateDisable(&DualSplitterInst);
	Width = 1920;
	Height = 2160;
	XDualSplitter_SetImageSize(&DualSplitterInst, Height, Width);
	InputSamples = 4;
	OutputSamples = 4;
	ImageSegments = 2;
	XDualSplitter_SetImgParam(&DualSplitterInst, InputSamples,
			OutputSamples, ImageSegments, Overlap);
	XDualSplitter_RegUpdateEnable(&DualSplitterInst);
	return XST_SUCCESS;
}
int XDualSplitterExample ( u16 DeviceId ) { int Status ; u16 Height ; u16 Width ; u8 InputSamples ; u8 OutputSamples ; u8 ImageSegments ; u8 Overlap = 0 ; XDualSplitter_Config * Config ; Config = XDualSplitter_LookupConfig ( DeviceId ) ; if ( NULL == Config ) { return XST_FAILURE ; } Status = XDualSplitter_CfgInitialize ( & DualSplitterInst , Config , Config -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } XDualSplitter_Enable ( & DualSplitterInst ) ; XDualSplitter_RegUpdateDisable ( & DualSplitterInst ) ; Width = 1920 ; Height = 2160 ; XDualSplitter_SetImageSize ( & DualSplitterInst , Height , Width ) ; InputSamples = 4 ; OutputSamples = 4 ; ImageSegments = 2 ; XDualSplitter_SetImgParam ( & DualSplitterInst , InputSamples , OutputSamples , ImageSegments , Overlap ) ; XDualSplitter_RegUpdateEnable ( & DualSplitterInst ) ; return XST_SUCCESS ; }
This function demonstrates the use of Dual Splitter driver functions.
This function demonstrates the use of Dual Splitter driver functions .
/* Initialize the Dual Splitter driver so that it's ready to use
	 * look up the configuration in the config table, then initialize it.
	 */ /* Enable the Dual Splitter core */ /* Disable the register update, program all other registers and at
	 * the end of programming enable register update.
	 */ /* Set image size width x height */ /* UHD2@60:
	 *	MST - 4 Streams: InputSamples per clock = 4
	 *			 OutputSamples per clock = 4
	 *			 Number of segments = 4
	 *	MST - 2 Streams: InputSamples per clock = 4
	 *			 OutPutSamples per clock = 4
	 *			 Number of segments = 2
	 * UHD@60:
	 *	SST :	InputSamples per clock = 4
	 *		OutputSamples per clock = 4
	 *		Number of segments = 1
	 * UHD@30:
	 *	SST :	InputSamples per clock = 2
	 *		OutputSamples per clock = 2
	 *		Number of segments = 1
	 */ /* UHD2@60 in MST mode with 2 streams */ /* Enable the register update */