XilinxProcessorIPLib/drivers/rgb2ycrcb/src/xrgb2ycrcb.c
void XRgb2YCrCb_Select_OutputRange(XRgb2YCrCb *InstancePtr,
					enum XRgb_OutputRanges Range)
{
	/* Verify arguments. */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(Range <= (u32)(XRGB_GRAPHICS_0_TO_255));

	/* Sets output range. */
	switch (Range) {
		case XRGB_TV_16_TO_240:
			(InstancePtr)->OutputRange =
					(u32)XRGB_TV_16_TO_240;
			break;

		case XRGB_STUDIO_16_TO_235:
			(InstancePtr)->OutputRange =
					(u32)XRGB_STUDIO_16_TO_235;
			break;

		case XRGB_GRAPHICS_0_TO_255:
			(InstancePtr)->OutputRange =
					(u32)XRGB_GRAPHICS_0_TO_255;
			break;

		default:
			;
			break;
	}
}
/*****************************************************************************/
/**
*
* This function governs the range of outputs Y, Cr and Cb by affecting the
* conversion coefficients as well as the clipping and clamping values.
*
* @param	InstancePtr is a pointer to the XRgb2YCrCb instance.
* @param	Range needs to be set from the enum XRgb_OutputRanges
*		values as:
*		0 = XRGB_TV_16_TO_240,
*		1 = XRGB_STUDIO_16_TO_235,
*		2 = XRGB_GRAPHICS_0_TO_255.
*
* @return	None.
*
* @note		None.
*
*****************************************************************************/
This function governs the range of outputs Y, Cr and Cb by affecting the
conversion coefficients as well as the clipping and clamping values.
This function governs the range of outputs Y Cr and Cb by affecting the conversion coefficients as well as the clipping and clamping values .
void XRgb2YCrCb_Select_OutputRange(XRgb2YCrCb *InstancePtr,
					enum XRgb_OutputRanges Range)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(Range <= (u32)(XRGB_GRAPHICS_0_TO_255));
	switch (Range) {
		case XRGB_TV_16_TO_240:
			(InstancePtr)->OutputRange =
					(u32)XRGB_TV_16_TO_240;
			break;
		case XRGB_STUDIO_16_TO_235:
			(InstancePtr)->OutputRange =
					(u32)XRGB_STUDIO_16_TO_235;
			break;
		case XRGB_GRAPHICS_0_TO_255:
			(InstancePtr)->OutputRange =
					(u32)XRGB_GRAPHICS_0_TO_255;
			break;
		default:
			;
			break;
	}
}
void XRgb2YCrCb_Select_OutputRange ( XRgb2YCrCb * InstancePtr , enum XRgb_OutputRanges Range ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( Range <= ( u32 ) ( XRGB_GRAPHICS_0_TO_255 ) ) ; switch ( Range ) { case XRGB_TV_16_TO_240 : ( InstancePtr ) -> OutputRange = ( u32 ) XRGB_TV_16_TO_240 ; break ; case XRGB_STUDIO_16_TO_235 : ( InstancePtr ) -> OutputRange = ( u32 ) XRGB_STUDIO_16_TO_235 ; break ; case XRGB_GRAPHICS_0_TO_255 : ( InstancePtr ) -> OutputRange = ( u32 ) XRGB_GRAPHICS_0_TO_255 ; break ; default : ; break ; } }
This function governs the range of outputs Y, Cr and Cb by affecting the
conversion coefficients as well as the clipping and clamping values.
This function governs the range of outputs Y Cr and Cb by affecting the conversion coefficients as well as the clipping and clamping values .
/* Verify arguments. */ /* Sets output range. */