XilinxProcessorIPLib/drivers/vprocss/src/xvprocss.c
void XVprocSs_SetPictureGain(XVprocSs *InstancePtr,
		                     XVprocSs_ColorChannel ChId,
		                     s32 NewValue)
{
  /* Verify arguments */
  Xil_AssertVoid(InstancePtr != NULL);
  Xil_AssertVoid(InstancePtr->CscPtr != NULL);
  Xil_AssertVoid((ChId >= XVPROCSS_COLOR_CH_Y_RED) &&
		         (ChId <= XVPROCSS_COLOR_CH_NUM_SUPPORTED));
  Xil_AssertVoid((NewValue >= 0) && (NewValue <= 100));

  if(InstancePtr->CscPtr) {
    switch(ChId)
    {
      case XVPROCSS_COLOR_CH_Y_RED:
            XV_CscSetRedGain(InstancePtr->CscPtr, NewValue);
			break;

	  case XVPROCSS_COLOR_CH_CB_GREEN:
            XV_CscSetGreenGain(InstancePtr->CscPtr, NewValue);
			break;

	  case XVPROCSS_COLOR_CH_CR_BLUE:
            XV_CscSetBlueGain(InstancePtr->CscPtr, NewValue);
			break;

	  default:
			break;
    }
  }
}
/*****************************************************************************/
/**
* This function updates picture gain setting with specified value
*
* @param  InstancePtr is a pointer to the Subsystem instance to be worked on.
* @param  ChId is the color channel id for which gain is to be updated
* @param  NewValue is the new value to be written
* 			- Range: 0-100
*
* @return none
*
* @note   Applicable only if CSC core is included in the subsystem
*
******************************************************************************/
This function updates picture gain setting with specified value
This function updates picture gain setting with specified value
void XVprocSs_SetPictureGain(XVprocSs *InstancePtr,
		                     XVprocSs_ColorChannel ChId,
		                     s32 NewValue)
{
  Xil_AssertVoid(InstancePtr != NULL);
  Xil_AssertVoid(InstancePtr->CscPtr != NULL);
  Xil_AssertVoid((ChId >= XVPROCSS_COLOR_CH_Y_RED) &&
		         (ChId <= XVPROCSS_COLOR_CH_NUM_SUPPORTED));
  Xil_AssertVoid((NewValue >= 0) && (NewValue <= 100));
  if(InstancePtr->CscPtr) {
    switch(ChId)
    {
      case XVPROCSS_COLOR_CH_Y_RED:
            XV_CscSetRedGain(InstancePtr->CscPtr, NewValue);
			break;
	  case XVPROCSS_COLOR_CH_CB_GREEN:
            XV_CscSetGreenGain(InstancePtr->CscPtr, NewValue);
			break;
	  case XVPROCSS_COLOR_CH_CR_BLUE:
            XV_CscSetBlueGain(InstancePtr->CscPtr, NewValue);
			break;
	  default:
			break;
    }
  }
}
void XVprocSs_SetPictureGain ( XVprocSs * InstancePtr , XVprocSs_ColorChannel ChId , s32 NewValue ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> CscPtr != NULL ) ; Xil_AssertVoid ( ( ChId >= XVPROCSS_COLOR_CH_Y_RED ) && ( ChId <= XVPROCSS_COLOR_CH_NUM_SUPPORTED ) ) ; Xil_AssertVoid ( ( NewValue >= 0 ) && ( NewValue <= 100 ) ) ; if ( InstancePtr -> CscPtr ) { switch ( ChId ) { case XVPROCSS_COLOR_CH_Y_RED : XV_CscSetRedGain ( InstancePtr -> CscPtr , NewValue ) ; break ; case XVPROCSS_COLOR_CH_CB_GREEN : XV_CscSetGreenGain ( InstancePtr -> CscPtr , NewValue ) ; break ; case XVPROCSS_COLOR_CH_CR_BLUE : XV_CscSetBlueGain ( InstancePtr -> CscPtr , NewValue ) ; break ; default : break ; } } }
This function updates picture gain setting with specified value
This function updates picture gain setting with specified value
/* Verify arguments */