/* param base PXP peripheral base address. param config Pointer to the configuration.  */
void PXP_SetProcessSurfaceBufferConfig(PXP_Type *base, const pxp_ps_buffer_config_t *config)
/* param base PXP peripheral base address. param config Pointer to the configuration.  */
void PXP_SetProcessSurfaceBufferConfig(PXP_Type *base, const pxp_ps_buffer_config_t *config)
{
    assert(NULL != config);
    base->PS_CTRL = ((base->PS_CTRL & ~(PXP_PS_CTRL_FORMAT_MASK | PXP_PS_CTRL_WB_SWAP_MASK)) |
                     PXP_PS_CTRL_FORMAT(config->pixelFormat) | PXP_PS_CTRL_WB_SWAP(config->swapByte));
    base->PS_BUF   = config->bufferAddr;
    base->PS_UBUF  = config->bufferAddrU;
    base->PS_VBUF  = config->bufferAddrV;
    base->PS_PITCH = config->pitchBytes;
}