XilinxProcessorIPLib/drivers/vprocss/src/xvprocss.c
static int SetupModeHCResampleOnly(XVprocSs *XVprocSsPtr)
{
  XVidC_ColorFormat HcrIn, HcrOut;
  u32 HeightOut = 0;
  u32 WidthOut = 0;
  int status = XST_SUCCESS;

  if(!XVprocSsPtr->HcrsmplrPtr) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IPABSENT);
    return(XST_FAILURE);
  }

  /* check if input/output stream configuration is supported */
  status = ValidateHCResampleOnlyConfig(XVprocSsPtr);

  if(status ==  XST_SUCCESS) {
    /* In the single-IP cases the reset has been done outside this routine */

    HcrIn = XVprocSsPtr->VidIn.ColorFormatId;
    HcrOut = XVprocSsPtr->VidOut.ColorFormatId;
    HeightOut = XVprocSsPtr->VidOut.Timing.VActive;
    WidthOut = XVprocSsPtr->VidOut.Timing.HActive;

    /* Configure H chroma resampler in and out color space */
    XV_HCrsmplSetFormat(XVprocSsPtr->HcrsmplrPtr,
                        HcrIn,
                        HcrOut);

    XV_HCrsmplSetActiveSize(XVprocSsPtr->HcrsmplrPtr,
                            WidthOut,
                            HeightOut);

    /* Start chroma resampler sub-core */
    XV_HCrsmplStart(XVprocSsPtr->HcrsmplrPtr);
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_SETUPOK);
  } else {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IGNORE);
  }

  return(status);
}
/*****************************************************************************/
/**
* This function configures the video subsystem pipeline for HCResample only
* topology of the subsystem
*
* @param  XVprocSsPtr is a pointer to the Subsystem instance to be worked on.
*
* @return XST_SUCCESS if successful else XST_FAILURE
*
* @note If use case is possible the subsystem will configure the sub-cores
*       accordingly else will ignore the request
*
******************************************************************************/
This function configures the video subsystem pipeline for HCResample only
topology of the subsystem
This function configures the video subsystem pipeline for HCResample only topology of the subsystem
static int SetupModeHCResampleOnly(XVprocSs *XVprocSsPtr)
{
  XVidC_ColorFormat HcrIn, HcrOut;
  u32 HeightOut = 0;
  u32 WidthOut = 0;
  int status = XST_SUCCESS;
  if(!XVprocSsPtr->HcrsmplrPtr) {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IPABSENT);
    return(XST_FAILURE);
  }
  status = ValidateHCResampleOnlyConfig(XVprocSsPtr);
  if(status ==  XST_SUCCESS) {
    HcrIn = XVprocSsPtr->VidIn.ColorFormatId;
    HcrOut = XVprocSsPtr->VidOut.ColorFormatId;
    HeightOut = XVprocSsPtr->VidOut.Timing.VActive;
    WidthOut = XVprocSsPtr->VidOut.Timing.HActive;
    XV_HCrsmplSetFormat(XVprocSsPtr->HcrsmplrPtr,
                        HcrIn,
                        HcrOut);
    XV_HCrsmplSetActiveSize(XVprocSsPtr->HcrsmplrPtr,
                            WidthOut,
                            HeightOut);
    XV_HCrsmplStart(XVprocSsPtr->HcrsmplrPtr);
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_SETUPOK);
  } else {
    XVprocSs_LogWrite(XVprocSsPtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IGNORE);
  }
  return(status);
}
static int SetupModeHCResampleOnly ( XVprocSs * XVprocSsPtr ) { XVidC_ColorFormat HcrIn , HcrOut ; u32 HeightOut = 0 ; u32 WidthOut = 0 ; int status = XST_SUCCESS ; if ( ! XVprocSsPtr -> HcrsmplrPtr ) { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_IPABSENT ) ; return ( XST_FAILURE ) ; } status = ValidateHCResampleOnlyConfig ( XVprocSsPtr ) ; if ( status == XST_SUCCESS ) { HcrIn = XVprocSsPtr -> VidIn . ColorFormatId ; HcrOut = XVprocSsPtr -> VidOut . ColorFormatId ; HeightOut = XVprocSsPtr -> VidOut . Timing . VActive ; WidthOut = XVprocSsPtr -> VidOut . Timing . HActive ; XV_HCrsmplSetFormat ( XVprocSsPtr -> HcrsmplrPtr , HcrIn , HcrOut ) ; XV_HCrsmplSetActiveSize ( XVprocSsPtr -> HcrsmplrPtr , WidthOut , HeightOut ) ; XV_HCrsmplStart ( XVprocSsPtr -> HcrsmplrPtr ) ; XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_SETUPOK ) ; } else { XVprocSs_LogWrite ( XVprocSsPtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_IGNORE ) ; } return ( status ) ; }
This function configures the video subsystem pipeline for HCResample only
topology of the subsystem
This function configures the video subsystem pipeline for HCResample only topology of the subsystem
/* check if input/output stream configuration is supported */ /* In the single-IP cases the reset has been done outside this routine */ /* Configure H chroma resampler in and out color space */ /* Start chroma resampler sub-core */