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

  if ((pStrmIn->ColorFormatId == XVIDC_CSF_YCRCB_420) && !XV_VscalerIs420Enabled(XVprocSsPtr->VscalerPtr)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VSCALER, XVPROCSS_EDAT_NO420);
    return(XST_FAILURE);
  }

  if ((pStrmIn->ColorFormatId == XVIDC_CSF_YCRCB_422) && !XV_HscalerIs422Enabled(XVprocSsPtr->HscalerPtr)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_NO422);
    return(XST_FAILURE);
  }

  if (!XV_HScalerValidateConfig(XVprocSsPtr->HscalerPtr, pStrmIn->ColorFormatId, pStrmOut->ColorFormatId))
  {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_FAILURE);
    return(XST_FAILURE);
  }

  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
/*****************************************************************************/
/**
* This function validates the input and output stream configuration for scaler
* only configuration
*
* @param  XVprocSsPtr is a pointer to the Subsystem instance to be worked on.
*
* @return XST_SUCCESS if successful else XST_FAILURE
*
* @note This function is applicable only for Stream mode configuration of the
*       subsystem. In this mode only picture resizing is available
******************************************************************************/
This function validates the input and output stream configuration for scaler
only configuration
This function validates the input and output stream configuration for scaler only configuration
static int ValidateScalerOnlyConfig(XVprocSs *XVprocSsPtr)
{
  XVidC_VideoStream *pStrmIn  = &XVprocSsPtr->VidIn;
  XVidC_VideoStream *pStrmOut = &XVprocSsPtr->VidOut;
  if ((pStrmIn->ColorFormatId == XVIDC_CSF_YCRCB_420) && !XV_VscalerIs420Enabled(XVprocSsPtr->VscalerPtr)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_VSCALER, XVPROCSS_EDAT_NO420);
    return(XST_FAILURE);
  }
  if ((pStrmIn->ColorFormatId == XVIDC_CSF_YCRCB_422) && !XV_HscalerIs422Enabled(XVprocSsPtr->HscalerPtr)) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_NO422);
    return(XST_FAILURE);
  }
  if (!XV_HScalerValidateConfig(XVprocSsPtr->HscalerPtr, pStrmIn->ColorFormatId, pStrmOut->ColorFormatId))
  {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_FAILURE);
    return(XST_FAILURE);
  }
  XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HSCALER, XVPROCSS_EDAT_VALID);
  return(XST_SUCCESS);
}
static int ValidateScalerOnlyConfig ( XVprocSs * XVprocSsPtr ) { XVidC_VideoStream * pStrmIn = & XVprocSsPtr -> VidIn ; XVidC_VideoStream * pStrmOut = & XVprocSsPtr -> VidOut ; if ( ( pStrmIn -> ColorFormatId == XVIDC_CSF_YCRCB_420 ) && ! XV_VscalerIs420Enabled ( XVprocSsPtr -> VscalerPtr ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_VSCALER , XVPROCSS_EDAT_NO420 ) ; return ( XST_FAILURE ) ; } if ( ( pStrmIn -> ColorFormatId == XVIDC_CSF_YCRCB_422 ) && ! XV_HscalerIs422Enabled ( XVprocSsPtr -> HscalerPtr ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HSCALER , XVPROCSS_EDAT_NO422 ) ; return ( XST_FAILURE ) ; } if ( ! XV_HScalerValidateConfig ( XVprocSsPtr -> HscalerPtr , pStrmIn -> ColorFormatId , pStrmOut -> ColorFormatId ) ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HSCALER , XVPROCSS_EDAT_FAILURE ) ; return ( XST_FAILURE ) ; } XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HSCALER , XVPROCSS_EDAT_VALID ) ; return ( XST_SUCCESS ) ; }
This function validates the input and output stream configuration for scaler
only configuration
This function validates the input and output stream configuration for scaler only configuration