XilinxProcessorIPLib/drivers/v_sditx/src/xv_sditx.c
u32 XV_SdiTx_GetPayloadByte1(u16 VActiveValid, XSdiVid_TransMode SdiMode, u8 *Data)
{
	/* These values are taken from ST352, ST 2082-10, ST 2081-10 documents */
	switch (VActiveValid) {
	case 720:
		if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x88;
		else
				*Data = 0x84;
		break;
	case 1080:
		if (SdiMode == XSDIVID_MODE_12G)
				*Data = 0xCE;
		else if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x89;
		else if (SdiMode == XSDIVID_MODE_3GB)
				*Data = 0x8A;
		else if (SdiMode == XSDIVID_MODE_6G)
				*Data = 0xC1;
		else
				*Data = 0x85;
		break;
	case 2160:
		if (SdiMode == XSDIVID_MODE_12G)
				*Data = 0xCE;
		else if (SdiMode == XSDIVID_MODE_6G)
				*Data = 0xC0;
		else if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x89;
		else
				*Data = 0x8A;
		break;
	case 576:
	case 480:
			*Data = 0x81;
		break;
	default:
			return XST_FAILURE;

	}
	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 *
 * This function calculates the 2nd byte of the Payload packet for all SDI modes
 *
 * @param	VActiveValid is a variable for number of active vertical lines.
 * @param	SdiMode is a variable to the XSdiVid_TransMode.
 * @param	Data is a pointer to populate the Byte1 of ST352 payload.
 *
 * @return
 *		- returns 8-bit value
 *
 * @note		None.
 *
 ******************************************************************************/
This function calculates the 2nd byte of the Payload packet for all SDI modes
@param       VActiveValid is a variable for number of active vertical lines.
@param       SdiMode is a variable to the XSdiVid_TransMode.
@param       Data is a pointer to populate the Byte1 of ST352 payload.

@return
- returns 8-bit value

@note                None.
This function calculates the 2nd byte of the Payload packet for all SDI modes @param VActiveValid is a variable for number of active vertical lines . @param SdiMode is a variable to the XSdiVid_TransMode . @param Data is a pointer to populate the Byte1 of ST352 payload . @return - returns 8 - bit value @note None .
u32 XV_SdiTx_GetPayloadByte1(u16 VActiveValid, XSdiVid_TransMode SdiMode, u8 *Data)
{
	switch (VActiveValid) {
	case 720:
		if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x88;
		else
				*Data = 0x84;
		break;
	case 1080:
		if (SdiMode == XSDIVID_MODE_12G)
				*Data = 0xCE;
		else if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x89;
		else if (SdiMode == XSDIVID_MODE_3GB)
				*Data = 0x8A;
		else if (SdiMode == XSDIVID_MODE_6G)
				*Data = 0xC1;
		else
				*Data = 0x85;
		break;
	case 2160:
		if (SdiMode == XSDIVID_MODE_12G)
				*Data = 0xCE;
		else if (SdiMode == XSDIVID_MODE_6G)
				*Data = 0xC0;
		else if (SdiMode == XSDIVID_MODE_3GA)
				*Data = 0x89;
		else
				*Data = 0x8A;
		break;
	case 576:
	case 480:
			*Data = 0x81;
		break;
	default:
			return XST_FAILURE;
	}
	return XST_SUCCESS;
}
u32 XV_SdiTx_GetPayloadByte1 ( u16 VActiveValid , XSdiVid_TransMode SdiMode , u8 * Data ) { switch ( VActiveValid ) { case 720 : if ( SdiMode == XSDIVID_MODE_3GA ) * Data = 0x88 ; else * Data = 0x84 ; break ; case 1080 : if ( SdiMode == XSDIVID_MODE_12G ) * Data = 0xCE ; else if ( SdiMode == XSDIVID_MODE_3GA ) * Data = 0x89 ; else if ( SdiMode == XSDIVID_MODE_3GB ) * Data = 0x8A ; else if ( SdiMode == XSDIVID_MODE_6G ) * Data = 0xC1 ; else * Data = 0x85 ; break ; case 2160 : if ( SdiMode == XSDIVID_MODE_12G ) * Data = 0xCE ; else if ( SdiMode == XSDIVID_MODE_6G ) * Data = 0xC0 ; else if ( SdiMode == XSDIVID_MODE_3GA ) * Data = 0x89 ; else * Data = 0x8A ; break ; case 576 : case 480 : * Data = 0x81 ; break ; default : return XST_FAILURE ; } return XST_SUCCESS ; }
This function calculates the 2nd byte of the Payload packet for all SDI modes
 @param       VActiveValid is a variable for number of active vertical lines.
This function calculates the 2nd byte of the Payload packet for all SDI modes @param VActiveValid is a variable for number of active vertical lines .
/* These values are taken from ST352, ST 2082-10, ST 2081-10 documents */