XilinxProcessorIPLib/drivers/v_hdmitxss/examples/xhdmi_example/TxOnly/xhdmi_example.c
void UpdateColorDepth(XVphy             *VphyPtr,
		      XV_HdmiTxSs       *HdmiTxSsPtr,
		      XVidC_ColorDepth  ColorDepth) {

	XVidC_VideoStream *HdmiTxSsVidStreamPtr;
	HdmiTxSsVidStreamPtr = XV_HdmiTxSs_GetVideoStream(HdmiTxSsPtr);

	/* Check if the TX isn't busy already */
	if (!CheckTxBusy()) {
		/* Check Passthrough */
		if (IsPassThrough) {
			xil_printf("Color depth conversion in pass-through"
					   " mode not supported!\r\n");
			return;
		}

		/* Check Color Space: YUV422 */
		else if ((HdmiTxSsVidStreamPtr->ColorFormatId ==
							XVIDC_CSF_YCRCB_422) &&
				 (ColorDepth != XVIDC_BPC_12)) {
			xil_printf("YUV422 only supports 36-bits color"
								" depth!\r\n");
			return;
		}

		/* Check Rate more than 5.94 Gbps */
		else if (
			((HdmiTxSsVidStreamPtr->VmId ==
				XVIDC_VM_3840x2160_60_P) ||
			(HdmiTxSsVidStreamPtr->VmId ==
				XVIDC_VM_3840x2160_50_P)) &&
			((HdmiTxSsVidStreamPtr->ColorFormatId ==
				XVIDC_CSF_RGB) ||
			(HdmiTxSsVidStreamPtr->ColorFormatId ==
				XVIDC_CSF_YCRCB_444)) &&
			(ColorDepth != XVIDC_BPC_8)) {

			xil_printf("2160p60 & 2160p50 on RGB & YUV444 only"
					  " supports 24-bits colordepth!\r\n");
			return;
		}

		EnableColorBar(VphyPtr,
			HdmiTxSsPtr,
			HdmiTxSsVidStreamPtr->VmId,
			HdmiTxSsVidStreamPtr->ColorFormatId,
			ColorDepth);
	}
}
/*****************************************************************************/
/**
*
* This function updates the ColorDepth for the current video stream
*
* @param VphyPtr is a pointer to the VPHY core instance.
* @param HdmiTxSsPtr is a pointer to the XV_HdmiTxSs instance.
* @param Requested ColorFormat
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function updates the ColorDepth for the current video stream
This function updates the ColorDepth for the current video stream
void UpdateColorDepth(XVphy             *VphyPtr,
		      XV_HdmiTxSs       *HdmiTxSsPtr,
		      XVidC_ColorDepth  ColorDepth) {
	XVidC_VideoStream *HdmiTxSsVidStreamPtr;
	HdmiTxSsVidStreamPtr = XV_HdmiTxSs_GetVideoStream(HdmiTxSsPtr);
	if (!CheckTxBusy()) {
		if (IsPassThrough) {
			xil_printf("Color depth conversion in pass-through"
					   " mode not supported!\r\n");
			return;
		}
		else if ((HdmiTxSsVidStreamPtr->ColorFormatId ==
							XVIDC_CSF_YCRCB_422) &&
				 (ColorDepth != XVIDC_BPC_12)) {
			xil_printf("YUV422 only supports 36-bits color"
								" depth!\r\n");
			return;
		}
		else if (
			((HdmiTxSsVidStreamPtr->VmId ==
				XVIDC_VM_3840x2160_60_P) ||
			(HdmiTxSsVidStreamPtr->VmId ==
				XVIDC_VM_3840x2160_50_P)) &&
			((HdmiTxSsVidStreamPtr->ColorFormatId ==
				XVIDC_CSF_RGB) ||
			(HdmiTxSsVidStreamPtr->ColorFormatId ==
				XVIDC_CSF_YCRCB_444)) &&
			(ColorDepth != XVIDC_BPC_8)) {
			xil_printf("2160p60 & 2160p50 on RGB & YUV444 only"
					  " supports 24-bits colordepth!\r\n");
			return;
		}
		EnableColorBar(VphyPtr,
			HdmiTxSsPtr,
			HdmiTxSsVidStreamPtr->VmId,
			HdmiTxSsVidStreamPtr->ColorFormatId,
			ColorDepth);
	}
}
void UpdateColorDepth ( XVphy * VphyPtr , XV_HdmiTxSs * HdmiTxSsPtr , XVidC_ColorDepth ColorDepth ) { XVidC_VideoStream * HdmiTxSsVidStreamPtr ; HdmiTxSsVidStreamPtr = XV_HdmiTxSs_GetVideoStream ( HdmiTxSsPtr ) ; if ( ! CheckTxBusy ( ) ) { if ( IsPassThrough ) { xil_printf ( " " " \r \n " ) ; return ; } else if ( ( HdmiTxSsVidStreamPtr -> ColorFormatId == XVIDC_CSF_YCRCB_422 ) && ( ColorDepth != XVIDC_BPC_12 ) ) { xil_printf ( " " " \r \n " ) ; return ; } else if ( ( ( HdmiTxSsVidStreamPtr -> VmId == XVIDC_VM_3840x2160_60_P ) || ( HdmiTxSsVidStreamPtr -> VmId == XVIDC_VM_3840x2160_50_P ) ) && ( ( HdmiTxSsVidStreamPtr -> ColorFormatId == XVIDC_CSF_RGB ) || ( HdmiTxSsVidStreamPtr -> ColorFormatId == XVIDC_CSF_YCRCB_444 ) ) && ( ColorDepth != XVIDC_BPC_8 ) ) { xil_printf ( " " " \r \n " ) ; return ; } EnableColorBar ( VphyPtr , HdmiTxSsPtr , HdmiTxSsVidStreamPtr -> VmId , HdmiTxSsVidStreamPtr -> ColorFormatId , ColorDepth ) ; } }
This function updates the ColorDepth for the current video stream
This function updates the ColorDepth for the current video stream
/* Check if the TX isn't busy already */ /* Check Passthrough */ /* Check Color Space: YUV422 */ /* Check Rate more than 5.94 Gbps */