XilinxProcessorIPLib/drivers/vprocss/src/xvprocss.c
static int ValidateHCResampleOnlyConfig(XVprocSs *XVprocSsPtr)
{
  XVidC_VideoStream *pStrmIn  = &XVprocSsPtr->VidIn;
  XVidC_VideoStream *pStrmOut = &XVprocSsPtr->VidOut;

  if((pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_422) &&
	 (pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_444) ) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_CFIN);
    return(XST_FAILURE);
  }

  if((pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_422) &&
	 (pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_444) ) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_CFOUT);
    return(XST_FAILURE);
  }

  if(pStrmIn->VmId != pStrmOut->VmId) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VMDIFF);
    return(XST_FAILURE);
  }

  if(pStrmIn->Timing.HActive != pStrmOut->Timing.HActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_HDIFF);
    return(XST_FAILURE);
  }

  if(pStrmIn->Timing.VActive != pStrmOut->Timing.VActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VDIFF);
    return(XST_FAILURE);
  }

  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
/*****************************************************************************/
/**
* This function validates the input and output stream configuration for the
* HCResample only configuration
*
* @param  pStrmIn is a pointer to the input stream
* @param  pStrmOut is a pointer to the output stream
*
* @return XST_SUCCESS if successful else XST_FAILURE
*
* @note This function is applicable only for Stream mode configuration of the
*       subsystem. In this mode very limited functionality is available
******************************************************************************/
This function validates the input and output stream configuration for the
HCResample only configuration
This function validates the input and output stream configuration for the HCResample only configuration
static int ValidateHCResampleOnlyConfig(XVprocSs *XVprocSsPtr)
{
  XVidC_VideoStream *pStrmIn  = &XVprocSsPtr->VidIn;
  XVidC_VideoStream *pStrmOut = &XVprocSsPtr->VidOut;
  if((pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_422) &&
	 (pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_444) ) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_CFIN);
    return(XST_FAILURE);
  }
  if((pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_422) &&
	 (pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_444) ) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_CFOUT);
    return(XST_FAILURE);
  }
  if(pStrmIn->VmId != pStrmOut->VmId) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VMDIFF);
    return(XST_FAILURE);
  }
  if(pStrmIn->Timing.HActive != pStrmOut->Timing.HActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_HDIFF);
    return(XST_FAILURE);
  }
  if(pStrmIn->Timing.VActive != pStrmOut->Timing.VActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VDIFF);
    return(XST_FAILURE);
  }
  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
static int ValidateHCResampleOnlyConfig ( XVprocSs * XVprocSsPtr ) { XVidC_VideoStream * pStrmIn = & XVprocSsPtr -> VidIn ; XVidC_VideoStream * pStrmOut = & XVprocSsPtr -> VidOut ; if ( ( pStrmIn -> ColorFormatId != XVIDC_CSF_YCRCB_422 ) && ( pStrmIn -> ColorFormatId != XVIDC_CSF_YCRCB_444 ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_CFIN ) ; return ( XST_FAILURE ) ; } if ( ( pStrmOut -> ColorFormatId != XVIDC_CSF_YCRCB_422 ) && ( pStrmOut -> ColorFormatId != XVIDC_CSF_YCRCB_444 ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_CFOUT ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> VmId != pStrmOut -> VmId ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_VMDIFF ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> Timing . HActive != pStrmOut -> Timing . HActive ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_HDIFF ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> Timing . VActive != pStrmOut -> Timing . VActive ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_VDIFF ) ; return ( XST_FAILURE ) ; } XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_VALID ) ; return ( XST_SUCCESS ) ; }
This function validates the input and output stream configuration for the
HCResample only configuration
This function validates the input and output stream configuration for the HCResample only configuration