XilinxProcessorIPLib/drivers/v_sditx/src/xv_sditx.c
u8 XV_SdiTx_GetPayloadFrameRate(XVidC_FrameRate FrameRateValid, XSdiVid_BitRate BitRate)
{
	u32 Data;

	/* Verify argument. */
	if (BitRate == XSDIVID_BR_INTEGER) {
		switch (FrameRateValid) {
		case (XVIDC_FR_24HZ):
			Data = 0x3;
			break;

		case (XVIDC_FR_25HZ):
			Data = 0x5;
			break;

		case (XVIDC_FR_30HZ):
			Data = 0x7;
			break;

		case (XVIDC_FR_48HZ):
			Data = 0x8;
			break;

		case (XVIDC_FR_50HZ):
			Data = 0x9;
			break;

		case (XVIDC_FR_60HZ):
			Data = 0xB;
			break;

		case (XVIDC_FR_96HZ):
			Data = 0xC;
			break;

		case (XVIDC_FR_100HZ):
			Data = 0xD;
			break;

		case (XVIDC_FR_120HZ):
			Data = 0xF;
			break;

		default:
			Data = 0;
			break;
		}
	} else {
		switch (FrameRateValid) {
		case (XVIDC_FR_24HZ):
			Data = 0x2;
			break;

		case (XVIDC_FR_30HZ):
			Data = 0x6;
			break;

		case (XVIDC_FR_48HZ):
			Data = 0x4;
			break;

		case (XVIDC_FR_60HZ):
			Data = 0xA;
			break;

		case (XVIDC_FR_96HZ):
			Data = 0x1;
			break;

		case (XVIDC_FR_120HZ):
			Data = 0xE;
			break;

		default:
			Data = 0;
			break;
		}
	}

	return Data & 0xF;
}
/*****************************************************************************/
/**
 *
 * This function calculates the equivalent payload nibble for Framerate
 *
 * @param	FrameRateValid is a calculated framerate based on interlaced
 * 		or progressive video.
 * @param	BitRate is a variable of type XSdiVid_BitRate.
 *
 * @return
 *		- returns 4-bit value
 *
 * @note		None.
 *
 ******************************************************************************/
This function calculates the equivalent payload nibble for Framerate
@param       FrameRateValid is a calculated framerate based on interlaced
or progressive video.
@param       BitRate is a variable of type XSdiVid_BitRate.

@return
- returns 4-bit value

@note                None.
This function calculates the equivalent payload nibble for Framerate @param FrameRateValid is a calculated framerate based on interlaced or progressive video . @param BitRate is a variable of type XSdiVid_BitRate . @return - returns 4 - bit value @note None .
u8 XV_SdiTx_GetPayloadFrameRate(XVidC_FrameRate FrameRateValid, XSdiVid_BitRate BitRate)
{
	u32 Data;
	if (BitRate == XSDIVID_BR_INTEGER) {
		switch (FrameRateValid) {
		case (XVIDC_FR_24HZ):
			Data = 0x3;
			break;
		case (XVIDC_FR_25HZ):
			Data = 0x5;
			break;
		case (XVIDC_FR_30HZ):
			Data = 0x7;
			break;
		case (XVIDC_FR_48HZ):
			Data = 0x8;
			break;
		case (XVIDC_FR_50HZ):
			Data = 0x9;
			break;
		case (XVIDC_FR_60HZ):
			Data = 0xB;
			break;
		case (XVIDC_FR_96HZ):
			Data = 0xC;
			break;
		case (XVIDC_FR_100HZ):
			Data = 0xD;
			break;
		case (XVIDC_FR_120HZ):
			Data = 0xF;
			break;
		default:
			Data = 0;
			break;
		}
	} else {
		switch (FrameRateValid) {
		case (XVIDC_FR_24HZ):
			Data = 0x2;
			break;
		case (XVIDC_FR_30HZ):
			Data = 0x6;
			break;
		case (XVIDC_FR_48HZ):
			Data = 0x4;
			break;
		case (XVIDC_FR_60HZ):
			Data = 0xA;
			break;
		case (XVIDC_FR_96HZ):
			Data = 0x1;
			break;
		case (XVIDC_FR_120HZ):
			Data = 0xE;
			break;
		default:
			Data = 0;
			break;
		}
	}
	return Data & 0xF;
}
u8 XV_SdiTx_GetPayloadFrameRate ( XVidC_FrameRate FrameRateValid , XSdiVid_BitRate BitRate ) { u32 Data ; if ( BitRate == XSDIVID_BR_INTEGER ) { switch ( FrameRateValid ) { case ( XVIDC_FR_24HZ ) : Data = 0x3 ; break ; case ( XVIDC_FR_25HZ ) : Data = 0x5 ; break ; case ( XVIDC_FR_30HZ ) : Data = 0x7 ; break ; case ( XVIDC_FR_48HZ ) : Data = 0x8 ; break ; case ( XVIDC_FR_50HZ ) : Data = 0x9 ; break ; case ( XVIDC_FR_60HZ ) : Data = 0xB ; break ; case ( XVIDC_FR_96HZ ) : Data = 0xC ; break ; case ( XVIDC_FR_100HZ ) : Data = 0xD ; break ; case ( XVIDC_FR_120HZ ) : Data = 0xF ; break ; default : Data = 0 ; break ; } } else { switch ( FrameRateValid ) { case ( XVIDC_FR_24HZ ) : Data = 0x2 ; break ; case ( XVIDC_FR_30HZ ) : Data = 0x6 ; break ; case ( XVIDC_FR_48HZ ) : Data = 0x4 ; break ; case ( XVIDC_FR_60HZ ) : Data = 0xA ; break ; case ( XVIDC_FR_96HZ ) : Data = 0x1 ; break ; case ( XVIDC_FR_120HZ ) : Data = 0xE ; break ; default : Data = 0 ; break ; } } return Data & 0xF ; }
This function calculates the equivalent payload nibble for Framerate
 @param       FrameRateValid is a calculated framerate based on interlaced
              or progressive video.
This function calculates the equivalent payload nibble for Framerate @param FrameRateValid is a calculated framerate based on interlaced or progressive video .
/* Verify argument. */