XilinxProcessorIPLib/drivers/vprocss/src/xvprocss.c
void XVprocSs_LoadChromaResamplerCoeff(XVprocSs *InstancePtr,
		                               u32 CoreId,
                                       u16 num_taps,
                                       const short *Coeff)
{
  /* Verify arguments */
  Xil_AssertVoid(InstancePtr != NULL);
  Xil_AssertVoid(Coeff != NULL);
  Xil_AssertVoid((CoreId == XVPROCSS_SUBCORE_CR_H)    ||
			     (CoreId == XVPROCSS_SUBCORE_CR_V_IN) ||
			     (CoreId == XVPROCSS_SUBCORE_CR_V_OUT));

  switch(CoreId)
  {
	case XVPROCSS_SUBCORE_CR_H:
		if(InstancePtr->HcrsmplrPtr) {
		  XV_HCrsmplrLoadExtCoeff(InstancePtr->HcrsmplrPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IPABSENT);
		}
		break;

	case XVPROCSS_SUBCORE_CR_V_IN:
		if(InstancePtr->VcrsmplrInPtr) {
		  XV_VCrsmplrLoadExtCoeff(InstancePtr->VcrsmplrInPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_IPABSENT);
		}
		break;

	case XVPROCSS_SUBCORE_CR_V_OUT:
		if(InstancePtr->VcrsmplrOutPtr) {
		  XV_VCrsmplrLoadExtCoeff(InstancePtr->VcrsmplrOutPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRO, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRO, XVPROCSS_EDAT_IPABSENT);
		}
		break;

	default:
	    break;
  }
}
/*****************************************************************************/
/**
* This function enables user to load external filter coefficients for
* Chroma Resampler cores, independently for H & V
*
* @param  InstancePtr is a pointer to the Subsystem instance to be worked on.
* @param  CoreId is the resampler core to be worked on
*           - XVPROCSS_SUBCORE_CR_H
*           - XVPROCSS_SUBCORE_CR_V_IN
*           - XVPROCSS_SUBCORE_CR_V_OUT
* @param  num_taps is the taps of the resampler hw instance
* @param  Coeff is the pointer to the filter table to be loaded
*
* @return None
*
* @note   Applicable only if Resampler cores are included in the subsystem
*
******************************************************************************/
This function enables user to load external filter coefficients for
Chroma Resampler cores, independently for H & V
This function enables user to load external filter coefficients for Chroma Resampler cores independently for H & V
void XVprocSs_LoadChromaResamplerCoeff(XVprocSs *InstancePtr,
		                               u32 CoreId,
                                       u16 num_taps,
                                       const short *Coeff)
{
  Xil_AssertVoid(InstancePtr != NULL);
  Xil_AssertVoid(Coeff != NULL);
  Xil_AssertVoid((CoreId == XVPROCSS_SUBCORE_CR_H)    ||
			     (CoreId == XVPROCSS_SUBCORE_CR_V_IN) ||
			     (CoreId == XVPROCSS_SUBCORE_CR_V_OUT));
  switch(CoreId)
  {
	case XVPROCSS_SUBCORE_CR_H:
		if(InstancePtr->HcrsmplrPtr) {
		  XV_HCrsmplrLoadExtCoeff(InstancePtr->HcrsmplrPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_HCR, XVPROCSS_EDAT_IPABSENT);
		}
		break;
	case XVPROCSS_SUBCORE_CR_V_IN:
		if(InstancePtr->VcrsmplrInPtr) {
		  XV_VCrsmplrLoadExtCoeff(InstancePtr->VcrsmplrInPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRI, XVPROCSS_EDAT_IPABSENT);
		}
		break;
	case XVPROCSS_SUBCORE_CR_V_OUT:
		if(InstancePtr->VcrsmplrOutPtr) {
		  XV_VCrsmplrLoadExtCoeff(InstancePtr->VcrsmplrOutPtr, num_taps, Coeff);
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRO, XVPROCSS_EDAT_LDCOEF);
		} else {
          XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VCRO, XVPROCSS_EDAT_IPABSENT);
		}
		break;
	default:
	    break;
  }
}
void XVprocSs_LoadChromaResamplerCoeff ( XVprocSs * InstancePtr , u32 CoreId , u16 num_taps , const short * Coeff ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( Coeff != NULL ) ; Xil_AssertVoid ( ( CoreId == XVPROCSS_SUBCORE_CR_H ) || ( CoreId == XVPROCSS_SUBCORE_CR_V_IN ) || ( CoreId == XVPROCSS_SUBCORE_CR_V_OUT ) ) ; switch ( CoreId ) { case XVPROCSS_SUBCORE_CR_H : if ( InstancePtr -> HcrsmplrPtr ) { XV_HCrsmplrLoadExtCoeff ( InstancePtr -> HcrsmplrPtr , num_taps , Coeff ) ; XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_LDCOEF ) ; } else { XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_HCR , XVPROCSS_EDAT_IPABSENT ) ; } break ; case XVPROCSS_SUBCORE_CR_V_IN : if ( InstancePtr -> VcrsmplrInPtr ) { XV_VCrsmplrLoadExtCoeff ( InstancePtr -> VcrsmplrInPtr , num_taps , Coeff ) ; XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_LDCOEF ) ; } else { XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_VCRI , XVPROCSS_EDAT_IPABSENT ) ; } break ; case XVPROCSS_SUBCORE_CR_V_OUT : if ( InstancePtr -> VcrsmplrOutPtr ) { XV_VCrsmplrLoadExtCoeff ( InstancePtr -> VcrsmplrOutPtr , num_taps , Coeff ) ; XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_VCRO , XVPROCSS_EDAT_LDCOEF ) ; } else { XVprocSs_LogWrite ( InstancePtr , XVPROCSS_EVT_CFG_VCRO , XVPROCSS_EDAT_IPABSENT ) ; } break ; default : break ; } }
This function enables user to load external filter coefficients for
Chroma Resampler cores, independently for H & V
This function enables user to load external filter coefficients for Chroma Resampler cores independently for H & V
/* Verify arguments */