XilinxProcessorIPLib/drivers/rgb2ycrcb/src/xrgb2ycrcb.c
void XRgb2YCrCb_SetActiveSize(XRgb2YCrCb *InstancePtr, u16 HSize, u16 VSize)
{
	u32 Size;

	/* Verify arguments. */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid((VSize >= (u16)(XRGB_VSIZE_FIRST)) &&
			(VSize <= (u16)(XRGB_VSIZE_LAST)));
	Xil_AssertVoid((HSize >= (u16)(XRGB_HSIZE_FIRST)) &&
			(HSize <= (u16)(XRGB_HSIZE_LAST)));

	/* The core supports spatial resolutions from 32x32 to 7680x7680 */
	Size = (((u32)VSize) << ((u32)(XRGB_ACTSIZE_NUM_LINE_SHIFT))) |
					(HSize);
	XRgb2YCrCb_WriteReg(InstancePtr->Config.BaseAddress,
				(XRGB_ACTIVE_SIZE_OFFSET), Size);
}
/*****************************************************************************/
/**
*
* This function sets active H/V sizes in the active size register.
*
* @param	InstancePtr is a pointer to the XRgb2YCrCb instance.
* @param	HSize specifies the number of Active Pixels per scanline that
*		needs to be set within the range [32, 7680].
* @param	VSize specifies the number of Active Lines per frame that needs
*		to be set within the range [32, 7680].
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function sets active H/V sizes in the active size register.
This function sets active H / V sizes in the active size register .
void XRgb2YCrCb_SetActiveSize(XRgb2YCrCb *InstancePtr, u16 HSize, u16 VSize)
{
	u32 Size;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid((VSize >= (u16)(XRGB_VSIZE_FIRST)) &&
			(VSize <= (u16)(XRGB_VSIZE_LAST)));
	Xil_AssertVoid((HSize >= (u16)(XRGB_HSIZE_FIRST)) &&
			(HSize <= (u16)(XRGB_HSIZE_LAST)));
	Size = (((u32)VSize) << ((u32)(XRGB_ACTSIZE_NUM_LINE_SHIFT))) |
					(HSize);
	XRgb2YCrCb_WriteReg(InstancePtr->Config.BaseAddress,
				(XRGB_ACTIVE_SIZE_OFFSET), Size);
}
void XRgb2YCrCb_SetActiveSize ( XRgb2YCrCb * InstancePtr , u16 HSize , u16 VSize ) { u32 Size ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( ( VSize >= ( u16 ) ( XRGB_VSIZE_FIRST ) ) && ( VSize <= ( u16 ) ( XRGB_VSIZE_LAST ) ) ) ; Xil_AssertVoid ( ( HSize >= ( u16 ) ( XRGB_HSIZE_FIRST ) ) && ( HSize <= ( u16 ) ( XRGB_HSIZE_LAST ) ) ) ; Size = ( ( ( u32 ) VSize ) << ( ( u32 ) ( XRGB_ACTSIZE_NUM_LINE_SHIFT ) ) ) | ( HSize ) ; XRgb2YCrCb_WriteReg ( InstancePtr -> Config . BaseAddress , ( XRGB_ACTIVE_SIZE_OFFSET ) , Size ) ; }
This function sets active H/V sizes in the active size register.
This function sets active H / V sizes in the active size register .
/* Verify arguments. */ /* The core supports spatial resolutions from 32x32 to 7680x7680 */