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

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

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

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

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

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

  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
/*****************************************************************************/
/**
* This function validates the in and out stream configuration for VCResample
* only configuration. Converts 420->422 or 422->420.
*
* @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 in and out stream configuration for VCResample
only configuration.
This function validates the in and out stream configuration for VCResample only configuration .
static int ValidateVCResampleOnlyConfig(XVprocSs *XVprocSsPtr)
{
  XVidC_VideoStream *pStrmIn  = &XVprocSsPtr->VidIn;
  XVidC_VideoStream *pStrmOut = &XVprocSsPtr->VidOut;
  if((pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_420) &&
	 (pStrmIn->ColorFormatId != XVIDC_CSF_YCRCB_422)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_CFIN);
    return(XST_FAILURE);
  }
  if((pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_420) &&
	 (pStrmOut->ColorFormatId != XVIDC_CSF_YCRCB_422)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_CFOUT);
    return(XST_FAILURE);
  }
  if(pStrmIn->VmId != pStrmOut->VmId) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_VMDIFF);
    return(XST_FAILURE);
  }
  if(pStrmIn->Timing.HActive != pStrmOut->Timing.HActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_HDIFF);
    return(XST_FAILURE);
  }
  if(pStrmIn->Timing.VActive != pStrmOut->Timing.VActive) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_VDIFF);
    return(XST_FAILURE);
  }
  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
static int ValidateVCResampleOnlyConfig ( XVprocSs * XVprocSsPtr ) { XVidC_VideoStream * pStrmIn = & XVprocSsPtr -> VidIn ; XVidC_VideoStream * pStrmOut = & XVprocSsPtr -> VidOut ; if ( ( pStrmIn -> ColorFormatId != XVIDC_CSF_YCRCB_420 ) && ( pStrmIn -> ColorFormatId != XVIDC_CSF_YCRCB_422 ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_CFIN ) ; return ( XST_FAILURE ) ; } if ( ( pStrmOut -> ColorFormatId != XVIDC_CSF_YCRCB_420 ) && ( pStrmOut -> ColorFormatId != XVIDC_CSF_YCRCB_422 ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_CFOUT ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> VmId != pStrmOut -> VmId ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_VMDIFF ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> Timing . HActive != pStrmOut -> Timing . HActive ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_HDIFF ) ; return ( XST_FAILURE ) ; } if ( pStrmIn -> Timing . VActive != pStrmOut -> Timing . VActive ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_VDIFF ) ; return ( XST_FAILURE ) ; } XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_VALID ) ; return ( XST_SUCCESS ) ; }
This function validates the in and out stream configuration for VCResample
only configuration.
This function validates the in and out stream configuration for VCResample only configuration .