Cfa to rgb conversion

Hi all

I was using nppiCFAToRGBA_8u_C1AC4R, this NPP api to convert the bayer image to rgb image. The full conversion used is given below.

nppiCFAToRGBA_8u_C1AC4R(d_bcg, 400, {400, 400}, {0, 0, 400, 400}, d_rgb, 400 * 4, NPPI_BAYER_BGGR,NPPI_INTER_UNDEFINED, 200);

The aim of my work is to change color space values to get the resultant color transformed image. For that operation I need to work with individual channel of the output of the above mentioned api.

Getting 3 channel information from the output is found to be difficult in my case.

Can anyone tell me the proper steps to implement this?

Thanks in advance