Dear All ,
I have observed that 4 channel 8 bit RGBA to YUVA conversion doesn’t keep ALPHA intact as expected.
I am using nppiRGBToYUV_8u_AC4R.
As I understand for RGBA input of RGBA= {0xff,0xff,0xff,0x00} YUVA should be {0xFF,0x80,0x80,00}
But in turn I receive alpha as 0xff always I.e. I get {0xFF,0x80,0x80,0xff}
Here is what I am attempting
// THIS is allocated in using CUDAHostMalloc(), size is 1920x1080*4 bytes as it is RGBA
pCudaMemSrcRGBA = {0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00 …};
// THIS is allocated in using CUDAHostMalloc(), size is 1920x10804 bytes as it is RGBA
unsigned char pCudaMemYuva_Dst =NULL ;
cudaMalloc(&pCudaMemYuva_Dst,sizeof(unsigned char)19201080*4);
NppStatus uStatus0 = nppiRGBToYUV_8u_AC4R (pCudaMemSrcRGBA, 19204,pCudaMemYuva_Src, 19204, oSizeROI);
unsigned char* pYuvaHost_Src = (unsigned char*)malloc(sizeof(unsigned char)192010804);
cudaMemcpy(pYuvaHost_Src,pCudaMemYuva_Src,19201080*4, cudaMemcpyDefault);
pYuvaHost_Src contains {0xFF,0x80,0x80,0xff,0xFF,0x80,0x80,0xff…}
Please throw some light , what am I missing?
Regards,
Abhijit